/* ============================================================
   白凛的补丁库 · 粉红色主题
   设计参考：KunMoe/kun-galgame-forum（OKLCH 语义 token + 深浅双模式）
   ============================================================ */

/* ---- 主题 token（粉红，色相 355°） ---- */
:root {
  --primary-accent: 0.62 0.25 355;
  --primary-50: 0.972 0.02 355;
  --primary-100: 0.945 0.04 355;
  --primary-200: 0.892 0.08 355;
  --primary-300: 0.82 0.14 355;
  --primary-400: 0.715 0.2 355;
  --primary-500: 0.62 0.25 355;
  --primary-600: 0.52 0.22 355;
  --primary-700: 0.44 0.18 355;
  --primary-800: 0.36 0.15 355;
  --primary-900: 0.28 0.12 355;
  --primary-950: 0.215 0.09 355;

  --bg: oklch(0.988 0.007 355);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.97 0.01 355);
  --text: oklch(0.27 0.02 355);
  --muted: oklch(0.52 0.03 355);
  --border: oklch(0.91 0.015 355);
  --shadow: 0 1px 2px oklch(0.4 0.1 355 / 0.06), 0 8px 24px oklch(0.4 0.1 355 / 0.08);
  --shadow-sm: 0 1px 2px oklch(0.4 0.1 355 / 0.05);
  --radius: 14px;
  color-scheme: light;
}

html.kun-dark-mode {
  --primary-50: 0.215 0.09 355;
  --primary-100: 0.28 0.12 355;
  --primary-200: 0.36 0.15 355;
  --primary-300: 0.44 0.18 355;
  --primary-400: 0.52 0.22 355;
  --primary-500: 0.62 0.25 355;
  --primary-600: 0.715 0.2 355;
  --primary-700: 0.82 0.14 355;
  --primary-800: 0.892 0.08 355;
  --primary-900: 0.945 0.04 355;
  --primary-950: 0.972 0.02 355;

  --bg: oklch(0.185 0.015 355);
  --surface: oklch(0.225 0.018 355);
  --surface-2: oklch(0.26 0.02 355);
  --text: oklch(0.93 0.012 355);
  --muted: oklch(0.72 0.02 355);
  --border: oklch(0.32 0.02 355);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px oklch(0 0 0 / 0.35);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  color-scheme: dark;
}

/* ---- 基础 ---- */
@font-face {
  font-family: "KunLolita";
  /* 子集化 WOFF2（只含站内用到的字符，约 45KB）；不支持 woff2 的老浏览器回退原 TTF */
  src: url("fonts/Lolita-subset.woff2") format("woff2"),
       url("fonts/Lolita.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap; /* 加载完成前先用回退字体，避免阻塞 */
}
* { box-sizing: border-box; }
:root {
  /* 全站唯一字体 —— 采用 kungal(KunUI) 的字体系（以主页字体为准，正文/标题/按钮/输入框统一） */
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font-sans);
  text-autospace: normal;
  background: var(--bg);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}
/* 表单控件默认不继承字体，这里统一继承主页字体 */
input, button, select, textarea { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); }
/* 品牌与标题使用 Lolita 少女体（kungal 同款显示字体，加载前自动回退） */
.brand-text, .hero h1, .drawer-title,
.pg-info h1, .pg-main h2, .tools-hero h1,
.g-hero h1, .g-main h2, .flw-hero h1, .flw-season > h2, .share-panel h2 {
  font-family: "KunLolita", var(--font-sans);
}
a { color: oklch(var(--primary-600)); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; font-size: 0.85em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- 顶栏 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; padding: 10px 20px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 22px; color: oklch(0.65 0.22 355); display: inline-flex; }
/* 线条图标容器 */
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.ico svg { width: 1em; height: 1em; }
.brand-text { background: linear-gradient(90deg, oklch(0.62 0.25 355), oklch(0.55 0.22 15)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.4px; align-self: center; margin-top: 3px; white-space: nowrap; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  text-decoration: none;
  transition: all 0.15s ease;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active {
  background: oklch(var(--primary-500));
  color: oklch(1 0 0);
  box-shadow: var(--shadow-sm);
}

.controls { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.search {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 14px; width: 210px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search:focus { border-color: oklch(var(--primary-500)); box-shadow: 0 0 0 3px oklch(var(--primary-500) / 0.18); }
.switch-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.switch-label input { accent-color: oklch(var(--primary-500)); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg-btn {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12.5px; padding: 5px 12px; transition: all 0.15s ease;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: oklch(var(--primary-500)); color: #fff; font-weight: 600; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: oklch(var(--primary-500)); background: var(--surface-2); }

/* ---- Hero ---- */
.hero { padding: 36px 0 8px; }
.hero h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: 0.5px; }
.hero-en { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 1px; vertical-align: 2px; margin-left: 2px; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.hero b { color: oklch(var(--primary-600)); }
/* 首屏 CTA（above the fold） */
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-cta .btn { padding: 9px 16px; font-size: 13.5px; }

/* ---- 卡片网格 ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  padding: 24px 0 48px;
  scroll-margin-top: 84px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: oklch(var(--primary-400) / 0.6); }

.card-cover {
  position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden;
}
.card-cover-link { display: block; height: 100%; cursor: pointer; }
.card-cover-link:hover img { transform: scale(1.02); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.card-cover .fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; background:
    linear-gradient(135deg, color-mix(in oklab, oklch(var(--primary-300)) 25%, var(--surface-2)), var(--surface-2));
}
/* NSFW 封面模糊 + 遮罩 */
.card-cover.blur img { filter: blur(14px) saturate(0.85); transform: scale(1.08); }
.card-cover.blur::after {
  content: "R18 · 点击显示"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 2px;
  background: oklch(0.3 0.12 355 / 0.45); cursor: pointer;
}
.card-cover.blur.revealed img { filter: none; transform: none; }
.card-cover.blur.revealed::after { display: none; }
/* R18 封面防护：详情页大图（点击显示） */
.pg-cover.blur img { filter: blur(20px) saturate(0.85); transform: scale(1.06); }
.pg-cover.blur::after {
  content: "R18 · 点击显示封面"; position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 2px;
  background: oklch(0.3 0.12 355 / 0.45); cursor: pointer;
}
.pg-cover.blur.revealed img { filter: none; transform: none; }
.pg-cover.blur.revealed::after { display: none; }
/* 「显示 R18 封面」开关：一次性解除全部模糊（body.show-r18） */
body.show-r18 .card-cover.blur img,
body.show-r18 .pg-cover.blur img,
body.show-r18 .shot.blur img { filter: none; transform: none; }
body.show-r18 .card-cover.blur::after,
body.show-r18 .pg-cover.blur::after,
body.show-r18 .shot.blur::after { display: none; }
.badge-nsfw {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: oklch(0.6 0.25 15 / 0.92); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  letter-spacing: 1px;
}

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: oklch(var(--primary-600)); }
.detail-link { margin-left: auto; font-size: 12.5px; color: oklch(var(--primary-600)); font-weight: 600; }
.detail-link:hover { text-decoration: underline; }
.card-resource { margin: 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card-sub .vndb { color: oklch(var(--primary-600)); }

.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; line-height: 1; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface-2);
  white-space: nowrap; vertical-align: middle;
  /* 中西文同字体渲染，避免 Arial/YaHei 混排导致的文字视觉高低不一 */
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}
.chip.manual { background: oklch(var(--primary-500) / 0.14); border-color: oklch(var(--primary-500) / 0.35); color: oklch(var(--primary-600)); }
.chip.age-r18 {
  background: oklch(0.6 0.25 15 / 0.14); border-color: oklch(0.6 0.25 15 / 0.4);
  color: oklch(0.55 0.22 15); font-weight: 700;
}
.chip.age-all {
  background: oklch(0.65 0.13 160 / 0.13); border-color: oklch(0.65 0.13 160 / 0.35);
  color: oklch(0.55 0.11 160); font-weight: 700;
}
.chip.yuri-pure {
  background: linear-gradient(90deg, oklch(0.62 0.25 355), oklch(0.6 0.22 330));
  border-color: transparent; color: #fff; font-weight: 700;
}
.chip.yuri-other {
  background: oklch(0.6 0.2 330 / 0.12); border-color: oklch(0.6 0.2 330 / 0.38);
  color: oklch(0.55 0.18 330); font-weight: 700;
}
.chip.yuri-none {
  background: oklch(0.5 0.02 0 / 0.08); border-color: oklch(0.5 0.02 0 / 0.25);
  color: var(--muted); font-weight: 600;
}
.chip.ai { background: oklch(0.62 0.2 300 / 0.14); border-color: oklch(0.62 0.2 300 / 0.35); color: oklch(0.55 0.18 300); }
.chip.machine_polishing, .chip.machine { background: oklch(0.7 0.15 60 / 0.16); border-color: oklch(0.7 0.15 60 / 0.4); color: oklch(0.6 0.13 60); }
.chip.lang { background: oklch(0.65 0.13 160 / 0.13); border-color: oklch(0.65 0.13 160 / 0.35); color: oklch(0.55 0.11 160); }
.chip.platform { background: oklch(0.6 0.05 260 / 0.1); border-color: oklch(0.6 0.05 260 / 0.3); color: var(--muted); }

.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.card-meta { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 正版购入下拉 */
.buy-wrap { position: relative; }
.btn-buy {
  border-color: oklch(var(--primary-500) / 0.55);
  color: oklch(var(--primary-600));
  background: oklch(var(--primary-500) / 0.08);
}
.btn-buy:hover { border-color: oklch(var(--primary-500)); background: oklch(var(--primary-500) / 0.16); }
.caret { font-size: 10px; margin-left: 1px; opacity: 0.75; }
.buy-menu {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 40;
  min-width: 190px; max-height: 240px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 4px;
  transform-origin: bottom right;
  opacity: 0; visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.22, 0.9, 0.36, 1), visibility 0s linear 0.18s;
}
.buy-menu.open {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.22, 0.9, 0.36, 1);
}
.buy-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; font-size: 13px;
  color: var(--text); text-decoration: none !important;
}
.buy-item:hover { background: var(--surface-2); }
.buy-item + .buy-item { border-top: 1px solid transparent; }
.buy-ico { font-size: 15px; width: 18px; color: oklch(var(--primary-600)); }

/* ---- 筛选按钮 + 下拉面板（参考 KunUI Popover / Select 风格） ---- */
.fbtn-wrap { position: relative; }
.fbtn { gap: 4px; }
.fbtn-sum { color: oklch(var(--primary-600)); font-weight: 700; margin: 0 1px; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 240px; max-height: 72vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 8px;
  transform-origin: top right;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.22, 0.9, 0.36, 1), visibility 0s linear 0.18s;
}
.menu.open {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.22, 0.9, 0.36, 1);
}
.fsec { display: flex; flex-direction: column; gap: 2px; padding: 2px; }
.fsec-label { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 4px 10px 2px; letter-spacing: 0.3px; }
.fsep { height: 1px; background: var(--border); margin: 8px 4px; }
.f-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; border: none; background: transparent; cursor: pointer;
  color: var(--text); font-size: 13.5px; padding: 7px 10px; border-radius: 9px;
  transition: background 0.12s ease, color 0.12s ease;
}
.f-opt:hover { background: var(--surface-2); }
.f-opt.on { color: oklch(var(--primary-600)); font-weight: 700; }
.f-opt .fcheck { opacity: 0; font-weight: 800; color: oklch(var(--primary-500)); font-size: 12px; }
.f-opt.on .fcheck { opacity: 1; }
.frow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; font-size: 13.5px; color: var(--text); cursor: pointer; border-radius: 9px;
  margin: 0 2px;
}
.frow:hover { background: var(--surface-2); }
.frow input { accent-color: oklch(var(--primary-500)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: all 0.15s ease;
}
.btn:hover { border-color: oklch(var(--primary-500)); }
.btn-primary { background: oklch(var(--primary-500)); border-color: oklch(var(--primary-500)); color: #fff; }
.btn-primary:hover { background: oklch(var(--primary-600)); border-color: oklch(var(--primary-600)); box-shadow: 0 4px 14px oklch(var(--primary-500) / 0.4); }
.btn-small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn .code { font-size: 11px; opacity: 0.85; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* 首页网格的静态目录（无 JS / 爬虫视角；app.js 加载后替换为卡片网格） */
.grid > .gs-title, .grid > .grid-static { grid-column: 1 / -1; }
.gs-title { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.grid-static { list-style: none; margin: 0; padding: 0; columns: 2 260px; column-gap: 18px; }
.gs-item { break-inside: avoid; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.gs-tags { display: inline-block; margin-right: 6px; font-size: 11px; color: var(--muted); }
.gs-link { font-weight: 700; color: var(--text); }
.gs-link:hover { text-decoration: underline; }
.gs-meta { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
@media (max-width: 760px) { .grid-static { columns: 1; } }

/* ---- 首页：分享 & 加入我们 ---- */
.share-sec { margin: 8px 0 26px; }
.share-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.share-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 15px 16px; box-shadow: var(--shadow-sm);
}
.share-panel h2 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 17px; }
.share-panel h2 .ico svg { width: 16px; height: 16px; }
.share-lead { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-net { min-width: 78px; justify-content: center; }
.btn.copied { border-color: oklch(0.55 0.18 160 / 0.55); color: oklch(0.5 0.16 160); }
.share-blurb {
  margin: 12px 0 0; padding: 9px 11px; font-size: 12px; line-height: 1.75; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px;
}
.join-links { display: flex; flex-direction: column; gap: 8px; }
.join-link {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none !important; color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.join-link:hover { border-color: oklch(var(--primary-500) / 0.6); transform: translateY(-1px); }
.join-ico { flex-shrink: 0; margin-top: 2px; color: oklch(var(--primary-600)); }
.join-ico svg { width: 16px; height: 16px; }
.join-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.join-body .muted { font-size: 11.5px; line-height: 1.6; }

/* ---- 实验：百合度判定搜索 ---- */
.analyzer {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin: 6px 0 18px; box-shadow: var(--shadow-sm);
}
.analyzer-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.analyzer-title { font-weight: 700; font-size: 15px; }
.analyzer-title em { font-weight: 400; font-size: 12px; }
.analyzer-bar .search { flex: 1 1 260px; }
.analyzer-note {
  display: flex; align-items: center; gap: 6px;
  margin: 10px 0 2px; font-size: 12px; color: var(--muted);
}
.analyzer-note .ico svg { width: 13px; height: 13px; }
.yuri-results { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ana-online { display: flex; flex-direction: column; gap: 10px; }
.ana-online + .ana-online { border-top: 1px dashed var(--border); padding-top: 10px; }
.ana-empty { margin: 6px 2px; }
/* 加载状态：spinner + 文案 */
.spinner {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid oklch(var(--primary-500) / 0.25);
  border-top-color: oklch(var(--primary-500));
  animation: ana-spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes ana-spin { to { transform: rotate(360deg); } }
.loading-box { display: flex; align-items: center; gap: 8px; }
.btn[aria-busy="true"] { opacity: 0.65; cursor: progress; }
.ana-count { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.ana-row {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; text-decoration: none !important; color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ana-row:hover { border-color: oklch(var(--primary-500) / 0.6); transform: translateY(-1px); }
.ana-thumb { width: 88px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--surface); }
.ana-cover { width: 60px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); }
.ana-date { color: var(--muted); font-size: 11px; }
.ana-zh {
  color: oklch(0.55 0.18 160); font-size: 11px; font-weight: 700;
  border: 1px solid oklch(0.55 0.18 160 / 0.45); border-radius: 99px; padding: 0 7px;
}
.ana-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ana-name { font-weight: 700; font-size: 14.5px; }
.ana-bar { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.ana-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, oklch(0.7 0.2 355), oklch(0.55 0.24 15)); }
.ana-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.ana-lv { padding: 1px 9px; border-radius: 99px; font-weight: 700; font-size: 11.5px; }
.lv-strict { background: oklch(var(--primary-500)); color: #fff; }
.lv-high { background: oklch(var(--primary-500) / 0.18); color: oklch(var(--primary-600)); }
.lv-mid { background: oklch(0.72 0.15 60 / 0.25); color: oklch(0.6 0.14 60); }
.lv-edge { background: oklch(0.6 0.05 260 / 0.15); color: var(--muted); }
.lv-none { background: oklch(0.5 0.02 0 / 0.12); color: var(--muted); }
.ana-strict { color: oklch(0.55 0.2 160); font-weight: 700; }
.ana-nostrict { color: var(--muted); }
.ana-score { font-weight: 700; color: oklch(var(--primary-600)); }
.ana-src { color: var(--muted); font-size: 11px; }
.ana-name a { color: var(--text); }
.ana-name a:hover { text-decoration: underline; }
.ana-tags { font-size: 11px; color: var(--muted); line-height: 1.7; word-break: break-all; }
.ana-bgmrow {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  font-size: 11px; color: var(--muted);
  border-top: 1px dashed var(--border); padding-top: 7px; margin-top: 2px;
}
.ana-bgmrow > a { font-weight: 700; color: oklch(var(--primary-600)); }
.ana-bgmrow > a:hover { text-decoration: underline; }
/* 站内展开的完整详情 */
.ana-detail {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px;
  padding: 12px 14px;
}
.ana-detail-cover {
  width: 96px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px;
  flex-shrink: 0; background: var(--surface); border: 1px solid var(--border);
}
.ana-detail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ana-detail-title { font-weight: 700; font-size: 14.5px; display: flex; flex-direction: column; gap: 2px; }
.ana-detail-alias { font-weight: 400; font-size: 11px; color: var(--muted); }
.ana-detail-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); }
.ana-detail-desc { font-size: 12.5px; color: var(--text); line-height: 1.8; max-height: 220px; overflow-y: auto; scrollbar-width: thin; }
.ana-detail-open { text-decoration: none; }
.ana-detail-open:hover { text-decoration: underline; }

/* ---- 许愿墙：便利贴瀑布流 ---- */
.wish-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 12px; flex-wrap: wrap; }
.wish-sorts {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
}
.wish-sort {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.wish-sort:hover { color: var(--text); }
.wish-sort.on { background: oklch(var(--primary-500)); color: #fff; }
.wish-total { font-size: 12px; color: var(--muted); }
.wish-empty { margin: 8px 2px; }
.wish-wall { columns: 3 220px; column-gap: 12px; }
.wish-note {
  break-inside: avoid; -webkit-column-break-inside: avoid; position: relative;
  margin: 0 0 12px; padding: 11px 13px 44px;
  background: oklch(0.975 0.045 var(--h, 350));
  border: 1px solid oklch(0.9 0.06 var(--h, 350));
  border-radius: 3px 14px 6px 12px;
  box-shadow: 0 3px 0 oklch(0.9 0.05 var(--h, 350)), var(--shadow-sm);
  transform: rotate(-0.5deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wish-note:nth-child(even) { transform: rotate(0.7deg); }
.wish-note:nth-child(3n) { transform: rotate(-1deg); }
.wish-note::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 44px; height: 11px;
  transform: translateX(-50%) rotate(-2deg);
  background: oklch(0.86 0.05 var(--h, 350) / 0.75); border-radius: 2px;
}
.wish-note:hover { transform: rotate(0) translateY(-2px); box-shadow: 0 6px 14px oklch(var(--primary-500) / 0.18), var(--shadow-sm); }
.wish-note.lv1 { background: oklch(0.968 0.055 var(--h, 350)); }
.wish-note.lv2 { background: oklch(0.958 0.065 var(--h, 350)); box-shadow: 0 4px 0 oklch(0.88 0.06 var(--h, 350)), var(--shadow-sm); }
.wish-note.lv3 { background: oklch(0.948 0.075 var(--h, 350)); box-shadow: 0 5px 0 oklch(0.86 0.07 var(--h, 350)), var(--shadow-sm); }
.note-top { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
/* 封面：便签左边一张竖版小图（没有封面时用占位块） */
.note-head { display: flex; gap: 9px; align-items: flex-start; }
.note-head-main { flex: 1; min-width: 0; }
.note-cover {
  flex-shrink: 0; width: 46px; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 4px; border: 1px solid oklch(0.88 0.05 var(--h, 350)); background: oklch(1 0 0 / 0.5);
}
.note-cover-none {
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: oklch(0.75 0.06 var(--h, 350));
}
.kun-dark-mode .note-cover { border-color: oklch(0.42 0.05 var(--h, 350)); background: oklch(0.25 0.03 var(--h, 350)); }
.note-num { font-size: 22px; font-weight: 800; line-height: 1; color: oklch(0.55 0.2 var(--h, 350)); }
.wish-note.lv3 .note-num { font-size: 28px; }
.note-unit { font-size: 11px; color: var(--muted); }
.note-name { display: block; margin: 7px 0 9px; font-size: 14px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.wish-note.lv2 .note-name, .wish-note.lv3 .note-name { font-size: 15px; }
a.note-name { color: var(--text); }
a.note-name:hover { text-decoration: underline; }
/* 愿望已在站内有汉化：绿色描边 + 徽标，名字链到站内详情页 */
.wish-note.matched {
  background: oklch(0.972 0.05 165);
  border-color: oklch(0.86 0.08 165);
  box-shadow: 0 3px 0 oklch(0.88 0.06 165), var(--shadow-sm);
}
.wish-note.matched::before { background: oklch(0.85 0.08 165 / 0.8); }
.wish-note.matched .note-num { color: oklch(0.5 0.14 165); }
.note-hit {
  margin-left: auto; font-size: 10.5px; font-weight: 700; white-space: nowrap;
  color: oklch(0.45 0.13 165); background: oklch(0.62 0.14 165 / 0.16);
  border-radius: 99px; padding: 1px 7px;
}
.kun-dark-mode .wish-note.matched { background: oklch(0.3 0.05 165); border-color: oklch(0.42 0.07 165); }
.kun-dark-mode .note-hit { color: oklch(0.85 0.12 165); background: oklch(0.6 0.12 165 / 0.25); }
.note-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.note-src { border: 1px solid currentColor; border-radius: 99px; padding: 0 6px; opacity: 0.7; }
.note-btn { position: absolute; left: 12px; right: 12px; bottom: 11px; width: auto; }
.wish-more-wrap { text-align: center; margin: 8px 0 4px; }
/* 许愿候选：VNDB / Bangumi 搜索结果（只收游戏条目） */
.wish-suggest {
  display: flex; flex-direction: column; gap: 6px;
  margin: 10px 0 2px; padding: 8px; max-height: 320px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.wish-suggest.hidden { display: none; }
.wish-suggest-tip { margin: 4px 6px; font-size: 12.5px; }
.wish-cand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.wish-cand.hit { border-color: oklch(0.62 0.14 165 / 0.45); background: oklch(0.975 0.03 165); }
.wish-cand-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wish-cand-cover { flex-shrink: 0; width: 34px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.wish-cand-main b { font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.wish-cand-alias { font-size: 11.5px; color: var(--muted); word-break: break-word; }
.wish-cand-sub { font-size: 11px; color: var(--muted); }
.wish-cand-btn, .wish-cand-link { flex-shrink: 0; }
.wish-cand-btn.done { opacity: 0.7; cursor: default; border-color: oklch(0.55 0.18 160 / 0.5); color: oklch(0.5 0.16 160); }
.kun-dark-mode .wish-cand.hit { background: oklch(0.3 0.045 165); }
.kun-dark-mode .wish-note { background: oklch(0.3 0.05 var(--h, 350)); border-color: oklch(0.4 0.06 var(--h, 350)); box-shadow: 0 3px 0 oklch(0.22 0.05 var(--h, 350)); }
.kun-dark-mode .wish-note.lv1 { background: oklch(0.32 0.055 var(--h, 350)); }
.kun-dark-mode .wish-note.lv2 { background: oklch(0.34 0.065 var(--h, 350)); }
.kun-dark-mode .wish-note.lv3 { background: oklch(0.37 0.08 var(--h, 350)); }
.kun-dark-mode .note-num { color: oklch(0.82 0.14 var(--h, 350)); }
.kun-dark-mode .wish-note::before { background: oklch(0.45 0.06 var(--h, 350) / 0.6); }
/* 判定 / 随机结果行上的许愿按钮 */
.wish-btn { align-self: flex-start; }
.wish-btn.done {
  opacity: 0.75; cursor: default;
  border-color: oklch(0.55 0.18 160 / 0.5); color: oklch(0.5 0.16 160);
}
.wish-btn.done:hover { border-color: oklch(0.55 0.18 160 / 0.5); }

/* ---- 布局：单列内容（侧栏已改为全屏侧拉抽屉） ---- */
.layout { display: block; padding-top: 6px; }

/* ---- 侧拉抽屉（所有屏幕，参考 kungal） ---- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 130;
  width: min(330px, 88vw); display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 10px 12px 24px; overflow-y: auto; scrollbar-width: thin;
  transform: translateX(-105%);
  transition: transform 0.26s ease;
  box-shadow: none;
}
.sidebar.open {
  transform: translateX(0);
  box-shadow: 12px 0 40px oklch(0.15 0.02 355 / 0.25);
}
.drawer-btn { display: inline-flex; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.drawer-title { font-size: 15px; font-weight: 800; }
.drawer-overlay {
  position: fixed; inset: 0; z-index: 125;
  background: oklch(0.14 0.015 355 / 0.5); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer-sec { font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 14px 8px 4px; letter-spacing: 0.5px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.drawer-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 9px; font-size: 13.5px;
  color: var(--text); text-decoration: none !important;
  transition: background 0.12s ease, color 0.12s ease;
}
.drawer-link:hover { background: var(--surface-2); color: oklch(var(--primary-600)); }

/* ---- 工具与链接独立页 ---- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 12px 12px; box-shadow: var(--shadow-sm); }
.panel-title { font-size: 14px; font-weight: 800; margin: 0 4px 8px; }
.tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-link { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-decoration: none !important; color: var(--text); transition: background 0.12s ease; }
.tool-link:hover { background: var(--surface-2); }
.tool-ico { font-size: 19px; width: 26px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: oklch(var(--primary-600)); }
.tool-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tool-name { font-size: 13px; font-weight: 700; }
.tool-desc { font-size: 11px; color: var(--muted); line-height: 1.35; }
.tool-go { font-size: 11px; color: oklch(var(--primary-600)); white-space: nowrap; flex-shrink: 0; }
.tip-text { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.tip-text b { color: var(--text); }
.tip-list { margin: 6px 0 0 18px; padding: 0; font-size: 13px; line-height: 1.9; color: var(--text); }
.tip-list b { color: oklch(var(--primary-600)); }
.side-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.side-links a { font-size: 12.5px; color: oklch(var(--primary-600)); }
.side-links a:hover { text-decoration: underline; }
.tools-hero { padding: 34px 0 6px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 20px 0 46px; }

/* ---- 页脚 ---- */
.footer { border-top: 1px solid var(--border); padding: 26px 0 40px; font-size: 13px; color: var(--muted); background: var(--surface); }
.footer p { margin: 4px 0; }

/* ============================================================
   表单页（反馈 / 感谢 / 政策）
   ============================================================ */
.form-main { padding-bottom: 50px; }
.form-title { font-size: 26px; margin: 12px 0 6px; }
.form-lead { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 16px 16px; box-shadow: var(--shadow-sm); max-width: 720px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field .req { color: oklch(0.58 0.2 20); }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 14px; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: oklch(var(--primary-500)); box-shadow: 0 0 0 3px oklch(var(--primary-500) / 0.15);
}
.field-hint { margin: 0; font-size: 12px; color: var(--muted); }
.field-error { margin: 0; font-size: 12px; color: oklch(0.55 0.19 25); font-weight: 600; }
.field [aria-invalid="true"] { border-color: oklch(0.6 0.2 25); background: oklch(0.6 0.2 25 / 0.06); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.form-status { margin: 12px 0 0; font-size: 13px; min-height: 18px; }
.form-status.err { color: oklch(0.55 0.19 25); font-weight: 600; }
.form-status.ok { color: oklch(0.55 0.18 160); font-weight: 600; }
.policy { max-width: 760px; }
.policy h2 { font-size: 17px; margin: 22px 0 8px; }
.policy p, .policy li { font-size: 14px; line-height: 1.85; color: var(--text); }
.policy ul { padding-left: 20px; }
.policy .updated { color: var(--muted); font-size: 12.5px; }
.footer-links { margin-top: 10px; }
.footer-links a, .pg-footer-links a { color: var(--muted); }
.footer-links a:hover, .pg-footer-links a:hover { color: oklch(var(--primary-600)); }
.pg-footer-links { margin-left: auto; font-size: 12.5px; }
/* Cookie / 本地存储提示条 */
.consent-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 140;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; box-shadow: 0 10px 30px oklch(0 0 0 / 0.14);
}
.consent-text { margin: 0; flex: 1 1 320px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.consent-text a { color: oklch(var(--primary-600)); }
.consent-actions { display: flex; gap: 8px; }
@media (max-width: 760px) {
  /* 移动端提示条位于吸底 CTA 之上 */
  .consent-bar { left: 10px; right: 10px; bottom: 86px; flex-direction: column; align-items: stretch; }
  .consent-actions { justify-content: flex-end; }
}
/* 感谢页 */
.thanks-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 34px 22px 28px; box-shadow: var(--shadow-sm); max-width: 640px; text-align: center;
}
.thanks-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: oklch(var(--primary-500) / 0.12); color: oklch(var(--primary-600));
}
.thanks-icon svg { width: 28px; height: 28px; }
.thanks-card h1 { font-size: 22px; margin: 0 0 8px; }
.thanks-card .form-lead { margin-bottom: 20px; }
.thanks-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.thanks-note { margin-top: 18px; font-size: 12.5px; }

/* ---- 响应式 ---- */
/* 移动端吸底 CTA：默认隐藏，小屏固定底部 */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 18px oklch(0 0 0 / 0.08);
  }
  .sticky-cta .btn { flex: 1 1 0; justify-content: center; min-height: 44px; }
  /* 打开判定/随机面板时让位（避免遮挡结果） */
  body.panel-open .sticky-cta { display: none; }
  body { padding-bottom: 78px; }
}

@media (max-width: 760px) {
  .topbar-inner { gap: 10px; }
  .search { width: 100%; order: 10; }
  .grid { grid-template-columns: 1fr; gap: 14px; padding: 18px 0 40px; }
  .hero { padding: 26px 0 6px; }
  .hero h1 { font-size: 24px; }
  .hero-en { font-size: 13px; display: block; margin: 4px 0 0; vertical-align: 0; }
  .hero p { font-size: 13px; }
  .hero-cta { gap: 8px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  /* 分析器面板：竖排更好点按 */
  .analyzer-bar { gap: 8px; }
  .analyzer-title { font-size: 14.5px; }
  .analyzer-bar .search { flex: 1 1 100%; order: 5; }
  .analyzer { padding: 12px 12px 14px; }
  .ana-row { padding: 9px 10px; gap: 10px; }
  .ana-cover { width: 52px; }
  .ana-thumb { width: 72px; }
  .ana-detail { flex-direction: column; }
  .ana-detail-cover { width: 108px; }
  .ana-wish-btn, .ana-detail-open { min-height: 32px; }
  .wish-btn { min-height: 32px; }
  /* 许愿墙：移动端两列便利贴，贴纸更紧凑（封面收窄给文字留空间） */
  .wish-wall { columns: 2 140px; column-gap: 10px; }
  .wish-note { padding: 10px 11px 40px; margin-bottom: 10px; }
  .note-head { gap: 7px; }
  .note-cover { width: 38px; }
  .note-num { font-size: 19px; }
  .wish-note.lv3 .note-num { font-size: 23px; }
  .note-name { font-size: 13px; }
  .wish-note.lv2 .note-name, .wish-note.lv3 .note-name { font-size: 13.5px; }
  .note-btn { left: 10px; right: 10px; bottom: 9px; }
  .wish-sort { padding: 6px 12px; }
  .share-cols { grid-template-columns: 1fr; gap: 10px; }
  .share-actions .btn { flex: 1 1 auto; justify-content: center; }
  .chip, .f-opt { min-height: 34px; }
  /* 触控友好的主要操作按钮高度 */
  .hero-cta .btn, .analyzer-bar .btn { min-height: 42px; }
}

@media (max-width: 420px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .hero h1 { font-size: 21px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .card { border-radius: 12px; }
  .card-title { font-size: 15px; }
  .analyzer-bar .btn { flex: 1 1 auto; justify-content: center; }
  .pg-cover { aspect-ratio: 4 / 3; }
  .pg-shots { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ---- 详情页：补丁资料 / 通用步骤 / 常见故障 ---- */
.pg-facts { margin: 10px 0 6px; display: grid; grid-template-columns: 132px 1fr; gap: 8px 14px; }
.pg-facts dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pg-facts dd { margin: 0; font-size: 13.5px; line-height: 1.75; word-break: break-word; }
.pg-facts dd a { color: oklch(var(--primary-600)); }
.pg-facts-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
/* 一个游戏多个补丁版本时，每条补丁的小标题与元信息 */
.pg-patch-title { margin: 18px 0 2px; font-size: 15px; }
.pg-patch-meta { margin: 0 0 4px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.pg-patch-title + .pg-patch-meta + .pg-facts { margin-top: 4px; }
.pg-steps { margin: 8px 0 4px; padding-left: 22px; font-size: 13.5px; line-height: 1.9; }
.pg-steps code { font-size: 12px; }
.pg-faq { margin: 8px 0 4px; display: grid; grid-template-columns: 168px 1fr; gap: 6px 14px; }
.pg-faq dt { font-size: 13px; font-weight: 700; }
.pg-faq dd { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
@media (max-width: 760px) {
  .pg-facts, .pg-faq { grid-template-columns: 1fr; gap: 2px 0; }
  .pg-facts dt, .pg-faq dt { margin-top: 8px; }
}

/* ============================================================
   补丁详情子页面
   ============================================================ */
.pg-main { padding-bottom: 60px; }
.pg-breadcrumb { padding: 18px 0 4px; font-size: 13px; color: var(--muted); }
.pg-breadcrumb a { color: var(--muted); }
.pg-breadcrumb a:hover { color: oklch(var(--primary-600)); }
.pg-header { display: grid; grid-template-columns: 300px 1fr; gap: 26px; padding: 18px 0 26px; }
.pg-cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow-sm);
}
.pg-cover img, .pg-cover .fallback { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.pg-info h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.35; }
.pg-resname { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.pg-stats { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.pg-stat { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.pg-label { color: var(--muted); font-size: 12.5px; min-width: 74px; }
.pg-value { font-weight: 600; }
.pg-value.star { color: oklch(0.62 0.17 75); font-weight: 700; }
.pg-age-r18 { color: oklch(0.55 0.22 15); font-weight: 800; }
.pg-age-all { color: oklch(0.5 0.11 160); font-weight: 700; }
.pg-sub { color: var(--muted); font-size: 12px; }
.pg-stat-top { align-items: flex-start; }
.pg-value-block { display: flex; flex-direction: column; gap: 4px; }
.pg-dev-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pg-dev-name { font-weight: 700; color: var(--text); }
.pg-dev-name:hover { color: oklch(var(--primary-600)); }
.pg-dev-link {
  font-size: 11.5px; padding: 1px 9px; border-radius: 999px;
  border: 1px solid oklch(var(--primary-500) / 0.35);
  color: oklch(var(--primary-600));
  background: oklch(var(--primary-500) / 0.08);
  text-decoration: none !important;
}
.pg-dev-link:hover { background: oklch(var(--primary-500) / 0.16); }
.pg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.pg-lang-switch { display: inline-flex; gap: 4px; margin-top: 14px; }
.pg-lang-switch button {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 3px 12px; border-radius: 999px; font-size: 12px; cursor: pointer;
  transition: all 0.15s ease;
}
.pg-lang-switch button:hover { border-color: oklch(var(--primary-500)); color: var(--text); }
.pg-lang-switch button.on { background: oklch(var(--primary-500)); border-color: oklch(var(--primary-500)); color: #fff; }
.ai-badge {
  font-size: 11px; font-weight: 600; color: oklch(var(--primary-600));
  background: oklch(var(--primary-500) / 0.12); border: 1px solid oklch(var(--primary-500) / 0.3);
  border-radius: 999px; padding: 1px 8px; vertical-align: 2px; white-space: nowrap;
}
.pg-desc-orig { display: none; }
body.lang-orig .pg-desc-zh { display: none; }
body.lang-orig .pg-desc-orig { display: block; }
.pg-main h2 { margin: 30px 0 12px; font-size: 19px; }
.pg-main h2::before { content: ""; display: inline-block; width: 4px; height: 16px; border-radius: 2px; background: oklch(var(--primary-500)); margin-right: 8px; vertical-align: -2px; }
.pg-desc, .pg-note { font-size: 14.5px; line-height: 1.85; color: var(--text); }
.pg-note { background: oklch(var(--primary-500) / 0.06); border: 1px solid oklch(var(--primary-500) / 0.2); border-radius: 10px; padding: 12px 16px; }

.pg-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
  background: oklch(var(--primary-500) / 0.09);
  border: 1px solid oklch(var(--primary-500) / 0.28);
  color: var(--text);
}
.pg-tag .tag-rating {
  font-size: 11px; font-weight: 700; color: #fff;
  background: oklch(var(--primary-500)); border-radius: 999px; padding: 1px 7px;
}

.pg-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shot {
  position: relative; margin: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 16 / 9;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.shot:hover img { transform: scale(1.03); }
.shot.blur img { filter: blur(16px) saturate(0.8); }
.shot.blur::after {
  content: "R18 · 点击查看"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 2px; cursor: pointer;
  background: oklch(0.3 0.12 355 / 0.45);
}
.shot.blur.revealed img { filter: none; }
.shot.blur.revealed::after { display: none; }

.pg-footer { margin-top: 40px; font-size: 14px; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: oklch(0.1 0.01 355 / 0.9); cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid oklch(1 0 0 / 0.3); background: oklch(1 0 0 / 0.12);
  color: #fff; font-size: 18px; cursor: pointer;
}

@media (max-width: 760px) {
  .pg-header { grid-template-columns: 1fr; }
  .pg-cover { aspect-ratio: 16 / 9; }
  .pg-shots { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
