
/* Shiyou / 深色影厅 v2 —— 全站设计令牌的唯一来源。
   改颜色只改这里；home.css 与 game-page.css 都不再写死颜色值。
   game.html 只加载 assets/site.css（= home.css + game-page.css），
   index.html 内联 home.css —— 所以改完必须跑 generate_site.py 重建。 */
:root {
  color-scheme: dark;

  /* 基底：不用纯黑，深蓝灰让封面暖色更跳 */
  --bg-canvas: #0a0c11;
  --bg-page: #0f1218;
  --surface-1: #161a23;
  --surface-2: #1d222d;
  --surface-3: #262c39;
  --surface-4: #2f3646;
  --line-subtle: #202634;
  --line: #2c3343;
  --line-strong: #3d4658;

  /* 文字：四级，正文级全部 >= 4.5:1。--ink-4 仅装饰。 */
  --ink: #f3f5f9;
  --ink-2: #aeb6c6;
  --ink-3: #8b93a5;
  --ink-4: #626a7c;

  /* 品牌：琥珀金是唯一主行动色 */
  --brand: #ff9f2e;
  --brand-hi: #ffb454;
  --brand-lo: #e8871a;
  --brand-ink: #1c1206;
  --brand-soft: #33260f;
  --brand-line: #5a4018;

  /* 语义色：与品牌色相互独立 */
  --ok: #3ecf8e; --ok-soft: #0e2b20;
  --warn: #ffc531; --warn-soft: #302608;
  --danger: #ff6b6b; --danger-soft: #331616;
  --info: #5b9dff; --info-soft: #131f36; --info-line: #2a4472;

  /* 分类色相：只做 4px 圆点 / 色条，不做大面积填充 */
  --h-action: #ff7a59;
  --h-rpg: #a78bfa;
  --h-strategy: #5b9dff;
  --h-puzzle: #38d6c0;
  --h-racing: #ffc531;
  --h-indie: #f472b6;

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans",
               -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas,
               "Liberation Mono", monospace;

  /* 字号：最小 12px，正文 15px。深色底上小字更难读，这是本次的硬基线。 */
  --fs-display: clamp(36px, 4.4vw, 56px);
  --fs-h1: clamp(28px, 2.8vw, 40px);
  --fs-h2: 24px;
  --fs-h3: 18px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-xs: 13px;
  --fs-label: 11px;   /* 唯一破例：全大写拉丁小标签，靠字距补偿 */

  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-xl: 18px; --r-full: 999px;

  --elev-1: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 2px 8px rgb(0 0 0 / 32%);
  --elev-2: 0 1px 0 rgb(255 255 255 / 5%) inset, 0 10px 28px rgb(0 0 0 / 46%);
  --elev-3: 0 1px 0 rgb(255 255 255 / 6%) inset, 0 26px 64px rgb(0 0 0 / 60%);

  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --t-fast: 130ms; --t-base: 200ms; --t-slow: 380ms;

  --w-page: 1440px;
  --w-read: 720px;
  --h-header: 60px;
  --h-toolbar: 56px;
  --ring: 0 0 0 3px rgb(255 159 46 / 42%);

  --z-sticky: 20; --z-toolbar: 30; --z-drawer: 60; --z-dialog: 80; --z-toast: 100;
}
* { box-sizing: border-box; }
/* 详情页封面环境光是全出血的，模糊会溢出元素盒；
   用 clip 而不是 hidden —— clip 不创建滚动容器，position: sticky 仍然有效。 */
html, body { overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg-page); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.72; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
svg { display: block; }
button svg, a svg { flex-shrink: 0; }
input, select, textarea { min-width: 0; }
[hidden] { display: none !important; }
::selection { background: var(--brand); color: var(--brand-ink); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.container { max-width: 1200px; width: calc(100% - 96px); margin: auto; }
.site-header { height: 68px; position: sticky; top: 0; z-index: var(--z-sticky); background: rgb(15 18 24 / 86%); border-bottom: 1px solid var(--line-subtle); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-symbol { width: 31px; height: 31px; }
.brand-copy { display: flex; align-items: baseline; gap: 10px; }
.brand-name { font-size: 22px; font-weight: 720; letter-spacing: -1px; color: var(--ink); }
.brand-en { font-size: var(--fs-label); font-weight: 600; letter-spacing: 1.7px; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 32px; height: 100%; }
.nav-link { display: flex; align-items: center; gap: 5px; position: relative; height: 100%; font-size: var(--fs-xs); white-space: nowrap; color: var(--ink-2); }
.nav-link:hover, .nav-link.active { color: var(--brand); }
.nav-link.active { font-weight: 600; }
.nav-count { min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-size: var(--fs-xs); background: var(--brand-soft); color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 15px; }
.search-trigger { border: 0; background: none; padding: 8px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.search-trigger kbd { font: inherit; font-size: var(--fs-xs); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; }
.manage-trigger { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: var(--fs-xs); border-radius: 20px; white-space: nowrap; }
.manage-trigger:hover { background: var(--surface-2); }
.manage-trigger .icon { width: 14px; height: 14px; }
.mobile-menu { display: none; border: 0; background: none; padding: 10px; }
.game-breadcrumb { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 24px 0 0; font-size: var(--fs-xs); color: var(--ink-3); }
.breadcrumb-current { color: var(--ink); }
.ui-version { display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); letter-spacing: 1px; }
.ui-version:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.hero { position: relative; padding: 46px 0 0; text-align: center; }
.hero-copy { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.eyebrow { font-size: var(--fs-xs); letter-spacing: 2px; font-weight: 600; color: var(--brand); }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); letter-spacing: 1.5px; font-size: var(--fs-xs); color: var(--ink-2); }
.hero .eyebrow:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.hero h1 { font-size: clamp(44px, 5.1vw, 68px); font-weight: 750; line-height: 1.14; letter-spacing: -3px; margin: 20px 0 18px; color: var(--ink); }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #ffc471 5%, var(--brand) 55%, #ff7a59 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-description { font-size: 16px; line-height: 1.8; color: var(--ink-2); letter-spacing: .4px; margin: 0 0 24px; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: var(--r-full); padding: 12px 21px; min-height: 44px; font-size: var(--fs-sm); font-weight: 500; line-height: 1.35; transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hi); box-shadow: 0 6px 18px rgb(255 159 46 / 26%); }
.btn-secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-quiet { padding: 10px 0; background: none; color: var(--brand); }
.btn-quiet:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-danger { background: var(--danger); color: #2a1010; }
.btn:disabled { background: var(--surface-2); border-color: var(--line); color: var(--ink-3); box-shadow: none; }
.hero-actions .btn-primary > .icon:first-child { display: none; }
.hero-actions .btn-quiet { border: 0; }
.hero-showcase { position: relative; max-width: 1140px; height: 342px; margin: 36px auto 0; isolation: isolate; }
.hero-showcase:before { content: ""; position: absolute; inset: 35px 10% 0; border-radius: 50%; background: radial-gradient(ellipse, rgb(255 159 46 / 16%), rgb(255 122 89 / 9%) 40%, transparent 72%); filter: blur(24px); z-index: -1; }
.hero-art { position: absolute; top: 0; left: 17%; width: 66%; height: 320px; border: 7px solid var(--surface-3); border-radius: 25px; box-shadow: var(--elev-2); z-index: 1; background: var(--surface-2); }
.showcase-side { position: absolute; top: 48px; width: 26%; height: 241px; overflow: hidden; border: 6px solid var(--surface-3); border-radius: 23px; box-shadow: var(--elev-1); background: var(--surface-2); }
.showcase-side img { width: 100%; height: 100%; object-fit: cover; }
.showcase-side-left { left: 1.5%; transform: rotate(-8deg); }
.showcase-side-right { right: 1.5%; transform: rotate(8deg); }
.showcase-side span { position: absolute; bottom: 14px; left: 14px; border-radius: 20px; padding: 6px 11px; background: rgb(10 12 17 / 78%); color: var(--ink); font-size: var(--fs-xs); }
.hero-featured { position: absolute; z-index: 3; right: 19.3%; bottom: 43px; left: 19.3%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 17px; background: rgb(15 18 24 / 85%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); text-align: left; color: var(--ink); }
.hero-featured small { display: block; font-size: var(--fs-label); letter-spacing: 1.6px; color: var(--ink-3); }
.hero-featured strong { display: inline-block; font-size: 20px; font-weight: 650; letter-spacing: -.4px; margin-top: 5px; }
.hero-featured span span { font-size: var(--fs-xs); color: var(--ink-3); margin-left: 12px; }
.hero-featured > .icon { width: 36px; height: 36px; padding: 9px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); }
.hero-footnote { display: flex; align-items: center; justify-content: center; gap: 11px; font-size: var(--fs-xs); color: var(--ink-3); margin: 13px 0 0; }
.hero-footnote .tiny-rule { display: none; }
.preview-notice { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 16px 0 24px; margin: 0 0 42px; font-size: var(--fs-xs); color: var(--ink-3); border-bottom: 1px solid var(--line); }
.notice-copy { display: flex; align-items: center; gap: 7px; line-height: 1.7; }
.notice-copy .icon { width: 14px; height: 14px; flex-shrink: 0; }
.preview-notice button { border: 0; background: none; font-size: var(--fs-xs); color: var(--brand); white-space: nowrap; padding: 4px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.8px; }
.section-en { margin-left: 14px; font-size: var(--fs-label); letter-spacing: 1.5px; font-weight: 400; color: var(--ink-3); }
.more-link { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 5px 0; background: none; color: var(--brand); font-size: var(--fs-xs); white-space: nowrap; }
.more-link .icon { width: 16px; height: 16px; }
.topic-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 56px; }
.topic-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 154px; padding: 26px; border: 1px solid var(--line-subtle); border-radius: var(--r-xl); text-align: left; overflow: hidden; background: var(--surface-1); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--elev-2); }
.topic-work { color: var(--h-strategy); }
.topic-design { color: var(--h-indie); }
.topic-type { color: var(--h-rpg); }
.topic-copy { position: relative; z-index: 1; }
.topic-number { display: block; font-size: var(--fs-label); letter-spacing: .5px; color: var(--ink-3); }
.topic-card h3 { margin: 13px 0 9px; font-size: 18px; font-weight: 650; letter-spacing: -.5px; color: var(--ink); }
.topic-card p { font-size: var(--fs-sm); margin: 0; color: var(--ink-3); }
.topic-card > svg { width: 70px; height: 70px; flex-shrink: 0; }
.topic-card > svg [stroke] { stroke: currentColor; }
.topic-card > svg [fill]:not([fill="none"]) { fill: currentColor; fill-opacity: .16; }
.catalogue { padding: 0 0 50px; }
.catalogue-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 25px; padding-top: 6px; }
.catalogue-heading h2 { font-size: 34px; letter-spacing: -1px; line-height: 1.3; margin: 0 0 9px; font-weight: 720; }
.catalogue-heading p { font-size: var(--fs-sm); color: var(--ink-2); margin: 0; line-height: 1.7; }
.result-total { color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; padding-bottom: 3px; }
.catalogue-toolbar { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 17px; height: 49px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); flex: 1; color: var(--ink-3); min-width: 0; }
.search-box:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.search-box input { width: 100%; flex: 1; border: 0; background: none; height: 100%; color: var(--ink); font-size: 13px; outline: none; }
.search-box input::placeholder { color: var(--ink-3); }
.search-box > .icon { width: 18px; height: 18px; flex-shrink: 0; }
.search-box kbd { font: inherit; font-size: var(--fs-xs); border: 1px solid var(--line); padding: 2px 7px; border-radius: var(--r-xs); color: var(--ink-3); }
.search-clear { border: 0; padding: 6px; background: none; color: var(--ink-3); }
.search-clear .icon { width: 15px; height: 15px; }
.sort-select { height: 49px; padding: 0 15px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); font-size: var(--fs-xs); }
.categories { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 27px; }
.category-pill { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--r-full); background: transparent; color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap; min-height: 40px; transition: background var(--t-fast) var(--ease); }
.category-pill .icon { width: 15px; height: 15px; }
.category-pill .count { margin-left: 2px; font-size: var(--fs-xs); color: var(--ink-3); }
.category-pill:hover { background: var(--surface-2); }
.category-pill.active { background: var(--brand); color: var(--brand-ink); }
.category-pill.active .count { color: rgb(28 18 6 / 62%); }
.active-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand); font-size: var(--fs-xs); margin-bottom: 20px; }
.active-filters button { border: 0; background: none; color: var(--brand); font-size: var(--fs-xs); white-space: nowrap; }
.resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px 20px; }
.resource-card { position: relative; min-width: 0; background: var(--surface-1); border: 1px solid var(--line-subtle); border-radius: var(--r-lg); overflow: hidden; box-shadow: none; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.resource-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--elev-2); }
.card-visual { display: block; border: 0; background: var(--surface-2); padding: 0; width: 100%; aspect-ratio: 1.55; overflow: hidden; }
.card-visual > svg { width: 100%; height: 100%; transition: transform .35s; }
.card-visual > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.resource-card:hover .card-visual > svg { transform: scale(1.035); }
.resource-card:hover .card-visual > img { transform: scale(1.035); }
.card-category { position: absolute; top: 12px; left: 12px; padding: 5px 8px; border-radius: 20px; color: var(--ink); background: rgb(10 12 17 / 78%); font-size: var(--fs-xs); backdrop-filter: blur(10px); pointer-events: none; }
.favorite-button { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: rgb(10 12 17 / 72%); display: grid; place-items: center; color: var(--ink-2); backdrop-filter: blur(10px); }
.favorite-button .icon { width: 17px; height: 17px; }
.favorite-button:hover { color: var(--brand); background: var(--surface-3); }
.favorite-button[aria-pressed="true"] { color: var(--brand); background: var(--surface-3); }
.favorite-button[aria-pressed="true"] .icon { fill: var(--brand); stroke: var(--brand); }
.card-content { padding: 18px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { display: block; min-width: 0; max-width: 100%; background: none; padding: 0; border: 0; text-align: left; font-size: 17px; line-height: 1.5; font-weight: 650; letter-spacing: -.35px; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-title-row > .icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-4); }
.game-subtitle { font-size: var(--fs-xs); letter-spacing: .55px; color: var(--ink-3); margin: 5px 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-description { font-size: var(--fs-sm); line-height: 1.8; min-height: 43px; color: var(--ink-2); margin: 0 0 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 5px; border-top: 1px solid var(--line-subtle); padding-top: 12px; }
.card-tags { display: flex; gap: 5px; min-width: 0; overflow: hidden; }
.card-tag { max-width: 95px; border-radius: var(--r-xs); background: var(--surface-2); color: var(--ink-3); font-size: var(--fs-xs); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-status { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.card-status.ready { color: var(--ok); }
.source-draft .card-status { color: var(--warn); }
.pagination { display: flex; flex-direction: column; align-items: center; gap: 15px; margin: 34px 0 0; }
.pagination-info { font-size: var(--fs-xs); color: var(--ink-3); }
.load-more { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 24px; min-width: 166px; border: 1px solid var(--line-strong); border-radius: var(--r-full); background: var(--surface-2); color: var(--ink); font-size: var(--fs-xs); }
.load-more:hover { background: var(--surface-3); }
.load-more .icon { width: 15px; height: 15px; }
.empty-state { grid-column: 1/-1; text-align: center; padding: 64px 20px; background: var(--surface-1); border-radius: var(--r-xl); }
.empty-state > svg { width: 110px; height: 92px; margin: 0 auto 22px; }
.empty-state > svg [fill] { fill: rgb(255 159 46 / 14%); }
.empty-state > svg [stroke] { stroke: rgb(255 159 46 / 55%); }
.empty-state h3 { font-size: 20px; margin: 0 0 12px; }
.empty-state p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.8; margin: 0 0 22px; }
.bottom-callout { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 36px 40px; background: var(--brand-soft); border-radius: var(--r-xl); margin: 4px 0 52px; }
.callout-copy { display: flex; align-items: center; gap: 23px; }
.callout-mark { width: 43px; height: 43px; color: var(--brand); flex-shrink: 0; }
.callout-mark circle { fill: var(--brand-soft); }
.bottom-callout h3 { font-size: 23px; letter-spacing: -.5px; margin: 0 0 10px; font-weight: 650; }
.bottom-callout p { font-size: var(--fs-sm); color: var(--ink-2); margin: 0; line-height: 1.6; }
.bottom-callout .btn { background: var(--brand); color: var(--brand-ink); white-space: nowrap; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 32px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--ink-3); font-size: var(--fs-xs); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { font-size: 18px; color: var(--ink); }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-links button, .footer-links a { border: 0; background: none; padding: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.footer-links button:hover, .footer-links a:hover { color: var(--brand); }
.preview-badge { font-size: var(--fs-label); letter-spacing: .8px; padding: 4px 7px; border: 1px solid var(--line); border-radius: var(--r-xs); color: var(--ink-3); }
.page-heading { padding: 60px 0 32px; }
.page-heading h1 { font-size: 40px; line-height: 1.35; letter-spacing: -1.5px; font-weight: 700; margin: 15px 0; }
.page-heading > p { font-size: 14px; color: var(--ink-2); line-height: 1.8; margin: 0; }
#catalogue:not([hidden]):first-child { padding-top: 38px; }
body:has(#home-intro[hidden]) .catalogue-heading { padding-top: 45px; }
.topics-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 32px; }
.topics-page-grid .topic-card { min-height: 240px; padding: 28px; align-items: flex-start; }
.topics-page-grid .topic-card h3 { font-size: 23px; margin: 19px 0 13px; }
.topics-page-grid .topic-card > svg { position: absolute; bottom: 5px; right: 8px; width: 110px; height: 110px; opacity: .55; }
.topic-note { padding: 24px; border-radius: var(--r-xl); background: var(--surface-1); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.9; margin-bottom: 46px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 30px; }
.guide-card { padding: 30px; background: var(--surface-1); border-radius: var(--r-xl); }
.guide-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: var(--brand-soft); color: var(--brand); margin-bottom: 27px; }
.guide-card small { font-size: var(--fs-label); letter-spacing: 1px; color: var(--ink-3); }
.guide-card h3 { font-size: 19px; margin: 13px 0; }
.guide-card p { font-size: var(--fs-sm); line-height: 1.9; color: var(--ink-2); margin: 0; }
.faq { background: var(--surface-1); border-radius: var(--r-xl); overflow: hidden; margin-bottom: 45px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { padding: 23px 28px; font-size: 14px; font-weight: 600; cursor: pointer; }
.faq details p { padding: 0 28px 24px; margin: 0; font-size: var(--fs-sm); line-height: 1.9; color: var(--ink-2); max-width: 960px; }
.management-notice, .local-storage-note, .draft-note { padding: 15px 20px; border: 1px solid var(--info-line); border-radius: var(--r-lg); background: var(--info-soft); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.85; margin: 0 0 24px; }
.manage-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.manage-stat { padding: 24px 28px; background: var(--surface-1); border-radius: var(--r-xl); }
.manage-stat span { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 11px; }
.manage-stat strong { font-size: 34px; font-weight: 650; letter-spacing: -1px; }
.manage-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 22px; }
.manage-actions-group { display: flex; gap: 10px; flex-wrap: wrap; }
.manage-actions .btn { font-size: var(--fs-xs); }
.table-wrap { overflow: auto; border-radius: var(--r-xl); background: var(--surface-1); margin-bottom: 45px; border: 1px solid var(--line); }
table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
th { padding: 17px 22px; background: var(--surface-2); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
td { padding: 16px 22px; border-top: 1px solid var(--line-subtle); font-size: var(--fs-xs); color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 550; max-width: 330px; }
td button { border: 0; background: none; padding: 5px 0; color: var(--brand); font-size: var(--fs-xs); margin-right: 15px; }
td button.danger-text { color: var(--danger); }
.table-status { padding: 5px 8px; border-radius: var(--r-xs); background: var(--ok-soft); color: var(--ok); font-size: var(--fs-xs); white-space: nowrap; }
.table-status.missing { background: var(--warn-soft); color: var(--warn); }
.dialog { padding: 0; width: min(940px, calc(100% - 40px)); max-height: calc(100dvh - 64px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface-1); color: var(--ink); box-shadow: var(--elev-3); }
.dialog::backdrop { background: rgb(3 4 8 / 68%); backdrop-filter: blur(9px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; background: var(--chrome-3); backdrop-filter: blur(18px); }
.dialog-header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.close-button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); }
.close-button .icon { width: 16px; height: 16px; }
.detail-body { padding: 30px; }
.detail-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.detail-cover { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 1.6; }
.detail-cover svg { width: 100%; height: 100%; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-label { font-size: var(--fs-xs); letter-spacing: 1.1px; color: var(--brand); margin: 4px 0 14px; }
.detail-info h2 { font-size: 34px; line-height: 1.25; letter-spacing: -1px; margin: 0 0 9px; }
.detail-info .detail-en { font-size: var(--fs-xs); letter-spacing: 1px; color: var(--ink-3); margin: 0 0 18px; }
.detail-info > p { font-size: var(--fs-sm); line-height: 1.9; color: var(--ink-2); margin: 0 0 17px; }
.detail-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-tags span { font-size: var(--fs-xs); color: var(--ink-2); background: var(--surface-2); padding: 6px 10px; border-radius: var(--r-sm); }
.detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 26px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-meta span { display: block; color: var(--ink-3); font-size: var(--fs-xs); margin-bottom: 9px; }
.detail-meta strong { font-size: var(--fs-xs); font-weight: 500; }
.detail-section { margin-top: 23px; }
.detail-section h3 { font-size: 15px; margin: 0 0 12px; }
.detail-section p { font-size: var(--fs-sm); line-height: 1.9; color: var(--ink-2); margin: 0; }
.detail-section a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.detail-warning { margin-top: 22px; padding: 15px 18px; border-radius: var(--r-lg); background: var(--warn-soft); color: var(--warn); font-size: var(--fs-xs); line-height: 1.8; }
.detail-download { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 25px; padding: 23px; background: var(--surface-2); border-radius: var(--r-lg); }
.detail-download strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.detail-download p { margin: 0; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.7; }
.detail-download-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-download .btn { font-size: var(--fs-xs); padding: 11px 15px; }
.inline-edit { border: 0; background: none; color: var(--brand); font-size: var(--fs-xs); text-decoration: underline; text-underline-offset: 3px; margin-top: 14px; padding: 0; }
.editor-dialog { max-width: 720px; }
.editor-form { padding: 27px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 20px; }
.field.full { grid-column: 1/-1; }
.field > label { display: block; font-size: var(--fs-xs); color: var(--ink-2); margin-bottom: 9px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-size: var(--fs-sm); outline-offset: 2px; }
.field textarea { resize: vertical; min-height: 78px; line-height: 1.8; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field small { display: block; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.7; margin-top: 7px; }
.field > .check-field { display: flex; gap: 9px; align-items: flex-start; line-height: 1.8; }
.check-field input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--brand); margin: 3px 0 0; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 23px; margin-top: 23px; border-top: 1px solid var(--line); }
.confirm-dialog { max-width: 470px; }
.confirm-content { padding: 27px; }
.confirm-content p { font-size: 14px; line-height: 1.9; color: var(--ink-2); margin: 0 0 25px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 11px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px); width: max-content; max-width: calc(100% - 30px); z-index: var(--z-toast); display: flex; align-items: center; gap: 10px; padding: 14px 21px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--chrome-3); color: var(--ink); box-shadow: var(--elev-3); backdrop-filter: blur(16px); font-size: var(--fs-xs); line-height: 1.7; opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { width: 17px; height: 17px; color: var(--ok); flex-shrink: 0; }
.toast-message { max-width: 490px; }
.local-storage-note { margin-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* ==========================================================================
   皮肤令牌 · 默认皮肤 = 极光蓝（aurora）
   --------------------------------------------------------------------------
   下面这个 :root 覆盖上面基础 :root 的同名颜色项；字号 / 圆角 / 层叠 / 缓动这些
   结构化令牌仍由基础 :root 提供。
   换皮肤：给 <html> 加 data-skin="obsidian|porcelain|dune"，
   或临时在地址后加 ?px-skin=obsidian（只影响你自己这次浏览）。
   ========================================================================== */
:root {
  color-scheme: dark;

  --bg-canvas: #070912;
  --bg-page: #0b0e1a;
  --surface-1: #121627;
  --surface-2: #181d33;
  --surface-3: #20263f;
  --surface-4: #2b3252;
  --line-subtle: #1c2138;
  --line: #272d48;
  --line-strong: #3b4468;

  --ink: #f4f6fc;
  --ink-2: #b5bdd6;
  --ink-3: #8b95b4;
  --ink-4: #616b8a;

  /* 冰蓝紫：Linear / Vercel 那一挂的「工具级高级感」 */
  --brand: #8fa5ff;
  --brand-hi: #a9baff;
  --brand-lo: #7189ef;
  --brand-ink: #090c18;
  --brand-soft: #181f3d;
  --brand-line: #313d72;
  --brand-rgb: 143 165 255;

  --ok: #45d69a; --ok-soft: #10301f;
  --warn: #ffcb45; --warn-soft: #332b0c;
  --danger: #ff7b7b; --danger-soft: #3b1a1a;
  --info: #7ab6ff; --info-soft: #16233d; --info-line: #33517f;

  --h-action: #ff8f70;
  --h-rpg: #b79dff;
  --h-strategy: #7ab6ff;
  --h-puzzle: #4adcc8;
  --h-racing: #ffcb45;
  --h-indie: #f78cc4;

  --elev-1: 0 1px 0 rgb(255 255 255 / 5%) inset, 0 2px 8px rgb(4 6 16 / 34%);
  --elev-2: 0 1px 0 rgb(255 255 255 / 7%) inset, 0 14px 34px -12px rgb(3 5 14 / 60%);
  --elev-3: 0 1px 0 rgb(255 255 255 / 8%) inset, 0 30px 70px -18px rgb(3 5 14 / 72%);
  --ring: 0 0 0 3px rgb(143 165 255 / 42%);

  --chrome: rgb(11 14 26 / 82%);
  --chrome-2: rgb(11 14 26 / 90%);
  --chrome-3: rgb(11 14 26 / 97%);
  --glass: rgb(20 25 44 / 88%);
  --glass-line: rgb(255 255 255 / 9%);
  --pill: rgb(9 11 24 / 72%);
  --pill-ink: #f4f6fc;
  --pill-line: rgb(255 255 255 / 15%);
  --grain: .04;
  --spec: rgb(255 255 255 / 5%);
  --edge: rgb(255 255 255 / 8%);
  --card-shadow: 0 1px 2px rgb(3 5 14 / 46%), 0 14px 34px -16px rgb(3 5 14 / 62%);
  --card-shadow-h: 0 2px 6px rgb(3 5 14 / 44%), 0 32px 66px -22px rgb(3 5 14 / 74%);
  /* 三层光源：左上冰蓝 / 右上紫罗兰 / 底部青绿。深浅有层次，就不是一块死黑 */
  --aurora:
    radial-gradient(1000px 600px at 10% -8%, rgb(122 162 255 / 22%), transparent 62%),
    radial-gradient(900px 560px at 90% 0%, rgb(178 140 255 / 18%), transparent 64%),
    radial-gradient(1200px 780px at 50% 108%, rgb(70 220 208 / 11%), transparent 66%);
}

/* ---- 备选皮肤（当前未启用，留作一键切换） ---- */
:root[data-skin="obsidian"] {
  color-scheme: dark;

  --bg-canvas: #06070a;
  --bg-page: #0a0c11;
  --surface-1: #11141b;
  --surface-2: #171b24;
  --surface-3: #1f242f;
  --surface-4: #2a303d;
  --line-subtle: #1b2029;
  --line: #262c38;
  --line-strong: #3a4252;

  --ink: #f6f7f9;
  --ink-2: #b6bcc8;
  --ink-3: #8d94a3;
  --ink-4: #626a78;

  /* 香槟金：同一色相里把饱和度压低、明度提亮，比 #ff9f2e 更「贵」 */
  --brand: #e0ab5c;
  --brand-hi: #efc078;
  --brand-lo: #c4913f;
  --brand-ink: #171004;
  --brand-soft: #221a0c;
  --brand-line: #47381a;
  --brand-rgb: 224 171 92;

  --ok: #3ecf8e; --ok-soft: #0e2b20;
  --warn: #e5b95c; --warn-soft: #2b2209;
  --danger: #ff6b6b; --danger-soft: #331616;
  --info: #6fa5ff; --info-soft: #131f36; --info-line: #2a4472;

  --h-action: #ff8a66;
  --h-rpg: #b09bfa;
  --h-strategy: #6fa5ff;
  --h-puzzle: #43d9c2;
  --h-racing: #e5b95c;
  --h-indie: #f58cbd;

  --elev-1: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 2px 8px rgb(0 0 0 / 34%);
  --elev-2: 0 1px 0 rgb(255 255 255 / 6%) inset, 0 14px 34px -12px rgb(0 0 0 / 64%);
  --elev-3: 0 1px 0 rgb(255 255 255 / 7%) inset, 0 30px 70px -18px rgb(0 0 0 / 76%);
  --ring: 0 0 0 3px rgb(224 171 92 / 40%);

  /* 玻璃 / 遮罩 / 胶囊 / 颗粒 / 镜面 / 阴影 —— 质感层全部读这几个 */
  --chrome: rgb(10 12 17 / 84%);
  --chrome-2: rgb(10 12 17 / 92%);
  --chrome-3: rgb(10 12 17 / 97%);
  --glass: rgb(16 19 26 / 88%);
  --glass-line: rgb(255 255 255 / 8%);
  --pill: rgb(10 12 17 / 74%);
  --pill-ink: #f6f7f9;
  --pill-line: rgb(255 255 255 / 14%);
  --grain: .045;
  --spec: rgb(255 255 255 / 5%);
  --edge: rgb(255 255 255 / 7%);
  --card-shadow: 0 1px 2px rgb(0 0 0 / 44%), 0 14px 34px -16px rgb(0 0 0 / 66%);
  --card-shadow-h: 0 2px 6px rgb(0 0 0 / 42%), 0 32px 66px -22px rgb(0 0 0 / 78%);
  --aurora:
    radial-gradient(1080px 620px at 50% -14%, rgb(224 171 92 / 13%), transparent 64%),
    radial-gradient(880px 660px at 6% 34%, rgb(122 132 162 / 7%), transparent 62%),
    radial-gradient(1000px 700px at 98% 82%, rgb(96 72 38 / 13%), transparent 66%);
}
:root[data-skin="porcelain"] {
  color-scheme: light;

  --bg-canvas: #eef0f4;
  --bg-page: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f4;
  --surface-4: #e2e5eb;
  --line-subtle: #eef0f3;
  --line: #e1e4ea;
  --line-strong: #c6cbd4;

  --ink: #0e1117;
  --ink-2: #434a56;
  --ink-3: #6a727f;
  --ink-4: #98a0ac;

  /* 白底上必须加深，否则所有按钮文字都过不了 4.5:1 */
  --brand: #9a5f0c;
  --brand-hi: #b06f14;
  --brand-lo: #7d4c06;
  --brand-ink: #ffffff;
  --brand-soft: #fdf4e4;
  --brand-line: #efdcb8;
  --brand-rgb: 176 111 20;

  --ok: #0f7a4a; --ok-soft: #e2f4ea;
  --warn: #8d6100; --warn-soft: #fbf2d8;
  --danger: #bf2b2b; --danger-soft: #fbeaea;
  --info: #1f66d0; --info-soft: #e8f0fc; --info-line: #b6cff2;

  --h-action: #cf4f28;
  --h-rpg: #6640d6;
  --h-strategy: #1f66d0;
  --h-puzzle: #0b8a80;
  --h-racing: #a07200;
  --h-indie: #b92a58;

  --elev-1: 0 1px 2px rgb(16 24 40 / 5%), 0 2px 6px -2px rgb(16 24 40 / 6%);
  --elev-2: 0 4px 8px -3px rgb(16 24 40 / 7%), 0 16px 32px -12px rgb(16 24 40 / 13%);
  --elev-3: 0 8px 16px -6px rgb(16 24 40 / 8%), 0 32px 64px -20px rgb(16 24 40 / 20%);
  --ring: 0 0 0 3px rgb(154 95 12 / 26%);

  --chrome: rgb(255 255 255 / 78%);
  --chrome-2: rgb(255 255 255 / 90%);
  --chrome-3: rgb(255 255 255 / 98%);
  --glass: rgb(255 255 255 / 90%);
  --glass-line: rgb(16 24 40 / 8%);
  --pill: rgb(255 255 255 / 92%);
  --pill-ink: #14181f;
  --pill-line: rgb(16 24 40 / 10%);
  --grain: .022;
  --spec: rgb(255 255 255 / 0%);
  --edge: rgb(255 255 255 / 0%);
  --card-shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 12px 28px -16px rgb(16 24 40 / 16%);
  --card-shadow-h: 0 2px 6px rgb(16 24 40 / 6%), 0 30px 56px -22px rgb(16 24 40 / 26%);
  --aurora: radial-gradient(1200px 560px at 50% -12%, rgb(80 110 180 / 5%), transparent 60%);
}
:root[data-skin="dune"] {
  color-scheme: light;

  --bg-canvas: #ece5d9;
  --bg-page: #faf7f1;
  --surface-1: #ffffff;
  --surface-2: #f5f0e6;
  --surface-3: #ece5d8;
  --surface-4: #dfd6c5;
  --line-subtle: #f0eadd;
  --line: #e2d9c9;
  --line-strong: #c7b9a1;

  --ink: #1c1913;
  --ink-2: #4c453a;
  --ink-3: #736a5b;
  --ink-4: #9c9282;

  --brand: #9c5b12;
  --brand-hi: #b46c1b;
  --brand-lo: #7d4708;
  --brand-ink: #ffffff;
  --brand-soft: #fbf1de;
  --brand-line: #eed9b2;
  --brand-rgb: 180 108 27;

  --ok: #1c7048; --ok-soft: #e4f2e9;
  --warn: #8a5c06; --warn-soft: #faf0d9;
  --danger: #b92c2c; --danger-soft: #fae9e7;
  --info: #2a5fbe; --info-soft: #e9eefb; --info-line: #bacaf0;

  --h-action: #c8491f;
  --h-rpg: #62409a;
  --h-strategy: #2a5fbe;
  --h-puzzle: #14776c;
  --h-racing: #8f6600;
  --h-indie: #a82b52;

  --elev-1: 0 1px 2px rgb(60 44 24 / 6%), 0 2px 6px -2px rgb(60 44 24 / 7%);
  --elev-2: 0 4px 8px -3px rgb(60 44 24 / 8%), 0 16px 32px -12px rgb(60 44 24 / 14%);
  --elev-3: 0 8px 16px -6px rgb(60 44 24 / 9%), 0 32px 64px -20px rgb(60 44 24 / 22%);
  --ring: 0 0 0 3px rgb(156 91 18 / 26%);

  --chrome: rgb(250 247 241 / 80%);
  --chrome-2: rgb(250 247 241 / 92%);
  --chrome-3: rgb(250 247 241 / 98%);
  --glass: rgb(255 253 249 / 91%);
  --glass-line: rgb(60 44 24 / 9%);
  --pill: rgb(255 253 249 / 93%);
  --pill-ink: #241f17;
  --pill-line: rgb(60 44 24 / 12%);
  --grain: .028;
  --spec: rgb(255 255 255 / 0%);
  --edge: rgb(255 255 255 / 0%);
  --card-shadow: 0 1px 2px rgb(60 44 24 / 6%), 0 12px 28px -16px rgb(60 44 24 / 18%);
  --card-shadow-h: 0 2px 6px rgb(60 44 24 / 7%), 0 30px 56px -22px rgb(60 44 24 / 28%);
  --aurora: radial-gradient(1300px 620px at 50% -14%, rgb(196 140 60 / 8%), transparent 62%);
}

/* ==========================================================================
   本地专属入口（线上隐藏）
   --------------------------------------------------------------------------
   「资源管理 / 本地草稿」只对站长自己有意义 —— 对访客来说那是一个往自己浏览器
   localStorage 里写草稿的演示表格，公开展示反而像半敞开的后台。
   所以线上隐藏，只有 file:// 或本机地址（含 localhost）打开时才出现。
   判定脚本在 <head> 里由 generate_site.py 的 metadata() 注入；
   想要本地预览线上形态，加 ?px-local=off 即可。
   ========================================================================== */
.local-only,
.manage-trigger { display: none !important; }
:root[data-local="on"] .local-only { display: revert !important; }
:root[data-local="on"] .manage-trigger { display: flex !important; }

/* ==========================================================================
   高级皮肤层 · 氛围 / 质感 / 交互
   --------------------------------------------------------------------------
   源文件：design/ui-v2/premium/（实验台 px-lab.html 与线上共用同一份实现）。
   这一层不含任何节点与数据依赖：关掉 JavaScript 时，凡是靠 [data-fx] 开关的
   效果一律不生效，页面退回完整的静态形态。
   ========================================================================== */

/* ==========================================================================
   2. 氛围层：光源 + 胶片颗粒
   ========================================================================== */

/* 光源直接做在 body 的 background-image 上，不新增节点、不动 z-index，
   所以不会干扰任何 sticky / 层叠。fixed 让光「挂在天上」，滚动时不移位。 */
body {
  background-color: var(--bg-page);
  background-image: var(--aurora);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 颗粒：全站唯一一个全局覆盖层。pointer-events:none 所以不挡任何点击；
   用灰度噪点、不加混合模式 —— 深底上是提亮、浅底上是压暗，两边都成立，
   也避免 mix-blend-mode 带来的合成开销。 */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
:root:not([data-fx~="grain"])::after { display: none; }

/* ==========================================================================
   3. 排版精修
   --------------------------------------------------------------------------
   高级感的另一半在字上：大字收字距、小字放字距、数字等宽、标题平衡换行。
   ========================================================================== */
.brand-name { font-weight: 750; letter-spacing: -.028em; }
.brand-symbol { filter: drop-shadow(0 0 16px rgb(var(--brand-rgb) / 24%)); }
.hero h1 { font-weight: 780; letter-spacing: -.04em; text-wrap: balance; }
.catalogue-heading h2,
.section-head h2,
.bottom-callout h3,
.drawer-head h2 { text-wrap: balance; letter-spacing: -.022em; }
.card-title { letter-spacing: -.016em; }
.card-description { letter-spacing: .002em; }
.hero-description { letter-spacing: .012em; max-width: 620px; }

/* 所有数字用等宽字形：计数、体积、天数对齐后整块会「安静」很多 */
.nav-count, .card-status, .result-total, .eyebrow, .brand-en,
.hero-footnote, .footer-legal .footer-uptime, #pagination-info,
#hero-resource-count, .opt .count { font-variant-numeric: tabular-nums; }

/* 大字渐变跟随品牌色，不再写死橙红（否则换肤后文字与主色打架） */
.hero h1 em {
  background: linear-gradient(96deg, var(--brand-hi) 2%, var(--brand) 52%, var(--brand-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ==========================================================================
   4. 骨架质感
   ========================================================================== */

/* ---- 4.1 页头：玻璃 + 滚动加深 ---- */
.site-header {
  background: var(--chrome);
  border-bottom-color: transparent;
  transition: background 320ms var(--ease), box-shadow 320ms var(--ease), backdrop-filter 320ms var(--ease);
}
/* 底部不是实线，而是一条「中间亮、两端消失」的光带 —— 比 1px 实线精细 */
.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--brand-rgb) / 26%) 22%, var(--glass-line) 50%, rgb(var(--brand-rgb) / 26%) 78%, transparent);
  opacity: .5;
  transition: opacity 320ms var(--ease);
  pointer-events: none;
}
body.px-scrolled .site-header {
  background: var(--chrome-2);
  box-shadow: 0 18px 40px -26px rgb(0 0 0 / 78%);
  backdrop-filter: saturate(190%) blur(28px);
  -webkit-backdrop-filter: saturate(190%) blur(28px);
}
body.px-scrolled .site-header::after { opacity: 1; }
body.px-scrolled .brand-symbol { filter: drop-shadow(0 0 18px rgb(var(--brand-rgb) / 42%)); }

/* ---- 4.2 阅读进度条 ---- */
#px-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--brand-lo), var(--brand), var(--brand-hi));
  box-shadow: 0 0 12px rgb(var(--brand-rgb) / 70%);
  pointer-events: none;
}

/* ---- 4.3 工具条 / 抽屉 / 对话框 ---- */
.catalogue-toolbar {
  background: var(--chrome-2);
  border-bottom: 1px solid var(--glass-line);
  backdrop-filter: saturate(170%) blur(22px);
  -webkit-backdrop-filter: saturate(170%) blur(22px);
}
.nav { background: var(--chrome-3); }
.drawer { background: var(--glass); border-left-color: var(--glass-line); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); }
.dialog { background: var(--surface-1); border-color: var(--line); box-shadow: var(--elev-3); }
.hero-featured { background: var(--glass); border-color: var(--glass-line); box-shadow: var(--elev-2); }

/* ---- 4.4 压在图上的胶囊 / 收藏键 ----
   深色皮肤：深色磨砂（原来就是这样，正确）。
   浅色皮肤：翻成白色磨砂 —— 白底黑字压在任意封面上都读得清，也更接近 iOS/Apple 的做法。 */
.card-category,
.showcase-side span { background: var(--pill); color: var(--pill-ink); border: 1px solid var(--pill-line); }
.favorite-button {
  background: var(--pill);
  color: var(--pill-ink);
  border-color: var(--pill-line);
  transition: transform 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
}
.favorite-button::before { background: transparent; box-shadow: none; }
.favorite-button:hover { background: var(--pill); color: var(--brand); transform: scale(1.08); }
.favorite-button[aria-pressed="true"] { background: var(--pill); color: var(--brand); }
.favorite-button[aria-pressed="true"] .icon { fill: var(--brand); stroke: var(--brand); }
/* 浅色皮肤下品牌色偏深，压在深色遮罩上会糊 → 单独提亮 */
:root[data-skin="porcelain"] .card-category,
:root[data-skin="dune"] .card-category,
:root[data-skin="porcelain"] .showcase-side span,
:root[data-skin="dune"] .showcase-side span { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }


/* ---- 4.4b 只有亮底才会暴露的两处写死色 ----
   深色皮肤不要动：那边 --danger 是亮红，需要深色字；空状态插图本来也够亮。 */
:root[data-skin="porcelain"] .btn-danger,
:root[data-skin="dune"] .btn-danger { color: #fff; }
:root[data-skin="porcelain"] .empty-state > svg [fill],
:root[data-skin="dune"] .empty-state > svg [fill] { fill: rgb(154 95 12 / 18%); }
:root[data-skin="porcelain"] .empty-state > svg [stroke],
:root[data-skin="dune"] .empty-state > svg [stroke] { stroke: rgb(154 95 12 / 75%); }

/* ---- 4.5 按钮：顶边高光 + 品牌色投影（不是灰糊糊的一团） ---- */
.btn { transition: transform 170ms var(--ease), background 170ms var(--ease), border-color 170ms var(--ease), box-shadow 240ms var(--ease); }
.btn-primary {
  background-image: linear-gradient(180deg, rgb(255 255 255 / 20%), rgb(255 255 255 / 0%) 62%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 26%) inset, 0 6px 18px -8px rgb(var(--brand-rgb) / 66%);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 1px 0 rgb(255 255 255 / 32%) inset, 0 12px 30px -10px rgb(var(--brand-rgb) / 82%);
}
.btn-secondary { border-color: var(--glass-line); background: var(--surface-2); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.category-pill.active .count { color: color-mix(in srgb, var(--brand-ink) 62%, transparent); }
.seg { border-color: var(--glass-line); }
.seg button[aria-pressed="true"] { background: var(--surface-4); box-shadow: 0 1px 0 var(--edge) inset; }

/* ---- 4.6 卡片：镜面高光 + 多层堆叠阴影 ---- */
.resource-card {
  background: linear-gradient(180deg, var(--spec), rgb(255 255 255 / 0%) 46%), var(--surface-1);
  border-color: var(--line);
  box-shadow: 0 1px 0 var(--edge) inset, var(--card-shadow);
  transform: translateY(var(--lift, 0px));
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), box-shadow 320ms var(--ease), background 260ms var(--ease);
  --mx: 50%;
  --my: 50%;
}
.resource-card:hover {
  --lift: -6px;
  border-color: var(--line-strong);
  box-shadow: 0 1px 0 var(--edge) inset, var(--card-shadow-h), 0 0 0 1px rgb(var(--brand-rgb) / 18%);
}
/* 只在真正被指着的卡上加 will-change，避免上百张卡各自提升成合成层 */
.resource-card.px-live { will-change: transform; transition-duration: 90ms, 90ms, 320ms, 260ms; }

/* 聚光：跟着指针走的柔光 */
.resource-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease);
  background: radial-gradient(340px circle at var(--mx) var(--my), rgb(var(--brand-rgb) / 17%), transparent 62%);
}
/* 描边高光：同样跟着指针，但只亮边框那一圈（用 mask 挖掉内容区） */
.resource-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease);
  background: radial-gradient(300px circle at var(--mx) var(--my), rgb(var(--brand-rgb) / 80%), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
:root[data-fx~="spotlight"] .resource-card:hover::after,
:root[data-fx~="spotlight"] .resource-card:hover::before { opacity: 1; }

/* 列表视图不做倾斜/抬升，改成整行底色变化 —— 列表里位移会让人晕 */
.resource-grid.view-list .resource-card,
.resource-grid.view-list .resource-card:hover { transform: none; --lift: 0px; }
.resource-grid.view-list .resource-card:hover { background: var(--surface-2); border-color: var(--line-strong); box-shadow: var(--card-shadow); }

/* ---- 4.7 封面渐显（避免一张张「啪」地弹出来） ---- */
:root[data-fx~="fadein"] .card-visual > img.px-img { opacity: 0; filter: blur(14px); }
:root[data-fx~="fadein"] .card-visual > img.px-img.px-loaded {
  opacity: 1;
  filter: blur(0);
  transition: opacity 620ms var(--ease), filter 620ms var(--ease), transform 350ms var(--ease);
}
.card-visual > img.px-loaded { transition: transform 350ms var(--ease); }

/* ---- 4.8 滚动揭示 ---- */
:root[data-fx~="reveal"] .resource-card.px-reveal { opacity: 0; transform: translateY(16px); }
:root[data-fx~="reveal"] .resource-card.px-reveal.px-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 560ms var(--ease) var(--rd, 0ms), transform 560ms var(--ease) var(--rd, 0ms);
}
/* 揭示和倾斜同时开着时，已经进入的元素交回给 --lift 管 */
:root[data-fx~="reveal"] .resource-card.px-reveal.px-in:hover { transform: translateY(var(--lift, 0px)); }

/* ---- 4.9 视图切换：错位淡入（不做 FLIP —— 24 张卡满屏乱飞会晕） ---- */
.resource-grid.px-swap > .resource-card { animation: px-in 460ms var(--ease) both; animation-delay: var(--rd, 0ms); }
@keyframes px-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- 4.10 磁吸按钮 ---- */
.px-mag { transition: transform 220ms var(--ease), background 170ms var(--ease), box-shadow 240ms var(--ease); }

/* ---- 4.11 骨架屏（首屏未渲染完时不留白） ---- */
.px-skeleton { border-radius: var(--r-lg); background: linear-gradient(100deg, var(--surface-1) 30%, var(--surface-3) 50%, var(--surface-1) 70%); background-size: 260% 100%; animation: px-shimmer 1.4s linear infinite; }
@keyframes px-shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* ==========================================================================
   5. 悬停预览：封面轮播真实截图
   --------------------------------------------------------------------------
   原来是浮层（#px-peek）—— 在 4 列密网格里必然压住右边的卡，已废弃。
   现在改成卡片自己换内容：悬停把封面区换成真实截图并轮播，什么都不遮。
   （行为在 assets/premium.js 第 6 节；这里的 .pk-* 只被它使用）
   ========================================================================== */
.resource-card, .game-card { transition: transform 220ms cubic-bezier(.2,.7,.3,1), box-shadow 220ms ease; }
.resource-card.px-lift, .game-card.px-lift {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -26px rgb(0 0 0 / 55%);
  z-index: 5;
}
.pk-shotbox {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: var(--bg-page);
}
.pk-shotbox img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pk-shotbox .pk-tip {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: rgb(6 8 14 / 62%);
  color: #fff;
  font-size: var(--fs-xs);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pk-shotbox .pk-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--r-full);
  background: rgb(6 8 14 / 42%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pk-shotbox .pk-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 45%);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 20%);
}
.pk-shotbox .pk-dots i.on { background: var(--brand); width: 16px; border-radius: 3px; }

/* ==========================================================================
   6. 命令面板（⌘K / Ctrl+K）
   --------------------------------------------------------------------------
   原来 ⌘K 只是「聚焦搜索框」。改成「搜 + 直接跳转」：输入即出结果，
   方向键选、回车跳详情页，不用滚动列表找。
   ========================================================================== */
#px-palette { position: fixed; inset: 0; z-index: 2147482500; display: none; }
#px-palette.px-on { display: block; }
#px-palette .pl-veil { position: absolute; inset: 0; background: rgb(3 4 8 / 62%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: px-veil 220ms var(--ease) both; }
@keyframes px-veil { from { opacity: 0; } to { opacity: 1; } }
#px-palette .pl-box {
  position: relative;
  width: min(620px, calc(100% - 32px));
  margin: 12vh auto 0;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-xl);
  background: var(--glass);
  box-shadow: var(--elev-3);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  overflow: hidden;
  animation: px-pop 280ms var(--ease) both;
}
@keyframes px-pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
#px-palette .pl-head { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--line-subtle); }
#px-palette .pl-head .icon { width: 19px; height: 19px; color: var(--ink-3); flex-shrink: 0; }
#px-palette input { flex: 1; border: 0; background: none; outline: none; color: var(--ink); font-size: 16px; letter-spacing: -.01em; }
#px-palette input::placeholder { color: var(--ink-4); }
#px-palette kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--ink-3); font: inherit; font-size: var(--fs-xs); }
#px-palette .pl-list { max-height: min(46vh, 380px); overflow: auto; padding: 7px; }
#px-palette .pl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 11px; border: 0; border-radius: var(--r-md); background: none; text-align: left; color: var(--ink); }
#px-palette .pl-row img,
#px-palette .pl-ph { width: 62px; height: 36px; flex-shrink: 0; border-radius: var(--r-xs); object-fit: cover; background: var(--surface-3); }
#px-palette .pl-ph { background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-subtle); }
#px-palette .pl-row .pl-copy { min-width: 0; flex: 1; }
#px-palette .pl-row strong { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#px-palette .pl-row small { display: block; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#px-palette .pl-row .pl-tag { flex-shrink: 0; padding: 3px 8px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-xs); color: var(--ink-3); }
#px-palette .pl-row.px-sel { background: var(--brand-soft); }
#px-palette .pl-row.px-sel strong { color: var(--brand); }
#px-palette .pl-empty { padding: 34px 18px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }
#px-palette .pl-foot { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line-subtle); color: var(--ink-3); font-size: var(--fs-xs); }
#px-palette .pl-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ==========================================================================
   7. 页头换肤控件
   --------------------------------------------------------------------------
   节点由 assets/premium.js 的 buildSkinSwitch() 建好并挂进 .header-actions，
   这里只管样式 —— 首页与详情页共用同一份实现，所以两边外观必然一致。
   ========================================================================== */
.sk-switch { position: relative; display: flex; align-items: center; }
.sk-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-2);
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.sk-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.sk-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--brand); border-color: var(--brand-line); }
.sk-ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sk-ico .sk-half { fill: currentColor; stroke: none; }
/* 当前皮肤的主色小点：不打开菜单也知道现在是哪套 */
.sk-dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 1px var(--glass-line); transition: background 240ms var(--ease); }
.sk-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 2;
  min-width: 176px;
  padding: 7px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--elev-3);
  animation: px-pop 200ms var(--ease) both;
}
.sk-menu[hidden] { display: none; }
.sk-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink);
  font-size: var(--fs-sm);
  text-align: left;
  white-space: nowrap;
}
.sk-opt:hover { background: var(--surface-2); }
.sk-opt[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }
.sk-opt[aria-selected="true"] .sk-name::after { content: "✓"; margin-left: 9px; font-weight: 700; }
.sk-sw { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 1px var(--glass-line); }
/* ---------------------------------------------------------------------------
   header 视觉升级（方案 A：极简细线导航）
   设计意图：不再是 12px 小灰字飘着，也不要胶囊。导航用「字重 + 底部细线指示器」
   表达层级，右侧只保留一个带边框的元素（资源管理），避免一排圆角色块。
   位置：必须留在首个 /* ---- 首页 hero 卖点徽章 ---- */
.hero-perks { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 26px; padding: 0; list-style: none; }
.hero-perks li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .2px;
}
.hero-perks .icon { width: 14px; height: 14px; stroke-width: 2.4; }

/* ---- 首页置顶区（列表上方）---- */
.pinned-section { margin: 0 0 36px; }
.pinned-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 15px; }
.pinned-head h2 { margin: 0; font-size: var(--fs-h3); font-weight: 720; letter-spacing: -.01em; color: var(--ink); }
.pinned-head p { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
.pinned-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pin-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: inherit; text-decoration: none;
  transition: border-color .18s, transform .18s, background .18s;
}
.pin-card:hover { border-color: var(--brand); background: var(--surface-2); transform: translateY(-2px); }
.pin-card.is-static { cursor: default; }
.pin-card.is-static:hover { transform: none; border-color: var(--line); }
.pin-card > .icon { flex: 0 0 auto; color: var(--ink-4); }
.pin-thumb {
  flex: 0 0 104px; width: 104px; height: 60px;
  border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3);
}
.pin-thumb img, .pin-thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pin-badge {
  align-self: flex-start;
  padding: 2px 9px; margin-bottom: 2px;
  border-radius: var(--r-full);
  background: var(--brand-soft); color: var(--brand);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .3px;
}
.pin-title { font-size: var(--fs-body); font-weight: 650; color: var(--ink); line-height: 1.45; }
.pin-desc {
  font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ---- 列表卡片上的置顶角标 ---- */
.resource-card.is-pinned { border-color: var(--brand-line); }
.pin-flag {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--brand); color: var(--brand-ink);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .4px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 22%);
}
@media (max-width: 720px) {
  .pinned-grid { grid-template-columns: 1fr; }
  .pin-thumb { flex-basis: 84px; width: 84px; height: 50px; }
}

@media 之前 —— 后面的 @media 里的写死值会反过来压掉覆盖。
   --------------------------------------------------------------------------- */
.site-header { height: 64px; }
.header-inner { gap: 36px; }

.brand { gap: 10px; }
.brand-symbol { width: 33px; height: 33px; }
.brand-copy { gap: 11px; }
.brand-name { font-size: 22px; letter-spacing: -0.5px; }
.brand-en { font-size: 11px; letter-spacing: 2.4px; color: var(--ink-4); }

.nav { gap: 36px; height: 100%; }
.nav-link {
  height: 100%;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
/* 指示器：一条 2px 细线，悬停/选中时从中间展开 */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: translateX(-50%);
  transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 16px; }
.nav-link.active { color: var(--ink); font-weight: 640; }
.nav-link.active::after { width: 22px; }
.nav-count {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: 12px;
  min-width: 19px;
  height: 19px;
}

.search-trigger { border: 0; background: transparent; color: var(--ink-2); padding: 9px; border-radius: 10px; }
.search-trigger:hover { background: var(--surface-2); color: var(--ink); }
.search-trigger kbd { font-size: 12px; color: var(--ink-4); border-color: var(--line-subtle); }

.manage-trigger { border-radius: 10px; font-size: 13px; padding: 8px 14px; }
.manage-trigger .icon { width: 15px; height: 15px; }

/* 移动端：导航是下拉菜单，不需要指示器 */
@media (max-width: 780px) {
  .nav-link { padding: 0; }
  .nav-link::after { display: none; }
}

@media (prefers-reduced-motion: reduce) { .sk-menu { animation: none; } }
@media (max-width: 600px) {
  .sk-btn { min-width: 44px; min-height: 44px; justify-content: center; padding: 0 8px; }
  .sk-menu { min-width: 158px; }
}

/* ==========================================================================
   8. 响应式 / 降级
   ========================================================================== */
@media (max-width: 780px) {
  .pk-shotbox .pk-dots { display: none; }   /* 触屏没有 hover，进度点也没意义 */
  #px-palette .pl-box { margin-top: 8vh; }
  #px-palette .pl-row img { width: 50px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html::after { display: none; }
  .resource-card,
  .resource-card.px-reveal,
  .resource-grid.px-swap > .resource-card,
  #px-palette .pl-box, #px-palette .pl-veil, .pk-shotbox { animation: none !important; transition-duration: 1ms !important; }
  :root[data-fx~="reveal"] .resource-card.px-reveal { opacity: 1; transform: none; }
  :root[data-fx~="fadein"] .card-visual > img.px-img { opacity: 1; filter: none; }
}


@media (min-width: 1600px) {
  .container { max-width: 1280px; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 74px; }
  .hero-showcase { height: 370px; max-width: 1180px; }
  .hero-art { height: 348px; }
  .showcase-side { height: 260px; }
}
@media (max-width: 1100px) {
  .container { width: calc(100% - 56px); }
  .brand-en, .search-trigger kbd { display: none; }
  .nav { gap: 25px; }
  .topic-card { padding: 23px; }
  .topic-card h3 { font-size: 17px; }
  .topic-card > svg { position: absolute; right: 5px; bottom: 9px; opacity: .24; width: 68px; }
  .topic-copy { max-width: 100%; }
  .resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-art { left: 12%; width: 76%; }
  .hero-featured { left: 14.5%; right: 14.5%; }
  .showcase-side { width: 25%; }
  .footer-inner { align-items: flex-start; }
  .footer-brand { flex-wrap: wrap; }
  .footer-links { justify-content: flex-end; }
  .bottom-callout { padding: 30px; }
  .bottom-callout h3 { font-size: 21px; }
  .topics-page-grid .topic-card h3 { font-size: 20px; }
}
@media (max-width: 780px) {
  .container { width: calc(100% - 40px); }
  .site-header { height: 62px; }
  .header-inner { gap: 15px; }
  .header-actions { gap: 7px; }
  .nav { gap: 20px; }
  .nav-link { font-size: 13px; }
  .manage-trigger { font-size: 0; padding: 9px; }
  .manage-trigger .icon { width: 16px; height: 16px; }
  .game-breadcrumb { padding-top: 20px; }
  .hero { padding-top: 38px; }
  .hero h1 { font-size: 54px; }
  .hero-description { font-size: 15px; }
  .hero-showcase { height: 300px; }
  .hero-art { height: 280px; left: 7%; width: 86%; }
  .showcase-side { height: 211px; top: 36px; }
  .hero-featured { left: 10%; right: 10%; bottom: 40px; }
  .hero-featured span span { display: none; }
  .section-en { display: none; }
  .section-head h2 { font-size: 23px; }
  .topic-strip { gap: 13px; margin-bottom: 44px; }
  .topic-card { padding: 20px; min-height: 140px; }
  .topic-number { font-size: 12px; letter-spacing: 0; }
  .topic-card h3 { font-size: 16px; line-height: 1.5; margin: 11px 0 8px; }
  .topic-card p { font-size: 12px; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 17px; }
  .bottom-callout { padding: 28px; align-items: flex-start; }
  .callout-mark { display: none; }
  .bottom-callout h3 { font-size: 19px; }
  .bottom-callout p { font-size: 12px; }
  .bottom-callout .btn { font-size: 12px; padding: 11px 15px; }
  .footer-inner { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .guide-grid { gap: 13px; }
  .guide-card { padding: 22px; }
  .guide-card h3 { font-size: 17px; }
  .guide-card p { font-size: 12px; }
  .topics-page-grid { gap: 14px; }
  .topics-page-grid .topic-card { padding: 22px; }
  .topics-page-grid .topic-card h3 { font-size: 19px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 36px); }
  .site-header { height: 60px; }
  .brand-name { font-size: 21px; }
  .brand-symbol { width: 28px; height: 28px; }
  .header-actions { gap: 4px; }
  .mobile-menu { display: block; }
  .nav { display: none; position: absolute; top: 59px; left: 0; right: 0; height: auto; padding: 12px 20px; background: var(--chrome-3); border-bottom: 1px solid var(--line); box-shadow: var(--elev-2); justify-content: space-around; gap: 12px; }
  .site-header.menu-open .nav { display: flex; }
  .nav-link { min-height: 40px; font-size: 13px; }
  .game-breadcrumb { font-size: 12px; padding-top: 18px; }
  .ui-version { font-size: 12px; letter-spacing: .5px; }
  .hero { padding-top: 36px; }
  .hero .eyebrow { font-size: 12px; }
  .hero h1 { font-size: clamp(32px, 10.5vw, 47px); letter-spacing: -2px; line-height: 1.17; margin: 21px 0 17px; }
  .hero-description { font-size: 14px; letter-spacing: 0; max-width: 300px; margin: 0 auto 22px; line-height: 1.8; }
  .hero-description span { display: block; }
  .search-trigger, .mobile-menu, .manage-trigger { min-width: 44px; min-height: 44px; justify-content: center; }
  .nav-link { min-height: 44px; }
  .hero-actions { gap: 18px; }
  .hero-actions .btn { font-size: 12px; gap: 7px; }
  .hero-actions .btn-primary { padding: 12px 18px; }
  .hero-actions .btn-quiet { padding: 12px 0; }
  .hero-showcase { height: 238px; margin-top: 29px; }
  .hero-art { top: 9px; left: 0; width: 100%; height: 213px; border: 5px solid var(--surface-3); border-radius: 21px; }
  .showcase-side { display: none; }
  .hero-featured { left: 15px; right: 15px; bottom: 30px; padding: 12px 14px; border-radius: 13px; }
  .hero-featured small { font-size: 12px; letter-spacing: 1px; }
  .hero-featured strong { font-size: 19px; }
  .hero-featured > .icon { width: 31px; height: 31px; padding: 8px; }
  .hero-footnote { gap: 8px; font-size: 12px; margin-top: 4px; flex-wrap: wrap; }
  .hero-footnote > span:nth-last-child(-n+2) { display: none; }
  .preview-notice { gap: 7px; font-size: 12px; margin-bottom: 30px; padding: 16px 0 20px; flex-direction: column; align-items: center; }
  .notice-copy { align-items: flex-start; line-height: 1.8; }
  .preview-notice button { font-size: 12px; min-height: 36px; padding: 7px 12px; }
  .notice-copy .icon { width: 13px; height: 13px; margin-top: 4px; }
  .section-head { margin-bottom: 16px; }
  .section-head h2 { font-size: 22px; }
  .more-link { font-size: 12px; }
  .topic-strip { display: flex; overflow-x: auto; gap: 12px; margin: 0 -18px 35px; padding: 1px 18px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .topic-strip::-webkit-scrollbar { display: none; }
  .topic-strip .topic-card { min-width: 266px; min-height: 140px; padding: 23px; scroll-snap-align: center; }
  .topic-card h3 { font-size: 18px; }
  .topic-number { font-size: 12px; }
  .topic-card p { font-size: 12px; }
  .topic-strip .topic-card > svg { opacity: .55; right: 8px; width: 73px; }
  .catalogue { padding-bottom: 37px; }
  .catalogue-heading { margin-bottom: 22px; gap: 9px; }
  .catalogue-heading h2 { font-size: 29px; }
  .catalogue-heading p { font-size: 12px; max-width: 240px; }
  .result-total { font-size: 12px; }
  .catalogue-toolbar { gap: 9px; margin-bottom: 15px; }
  .search-box { padding: 0 12px; gap: 8px; height: 47px; border-radius: 12px; }
  .search-box input { font-size: 12px; }
  .search-box kbd { display: none; }
  .sort-select { height: 47px; padding: 0 8px; max-width: 101px; font-size: 12px; }
  .categories { flex-wrap: nowrap; overflow: auto; margin: 0 -18px 21px; padding: 0 18px 5px; scrollbar-width: none; gap: 7px; }
  .category-pill { flex-shrink: 0; font-size: 12px; padding: 9px 13px; }
  .category-pill .count { font-size: 12px; }
  .resource-grid { gap: 17px 12px; }
  .resource-card { border-radius: 17px; }
  .card-visual { aspect-ratio: 1.18; }
  .card-category { left: 8px; top: 14px; padding: 4px 6px; font-size: 12px; }
  .favorite-button { right: 5px; top: 5px; width: 44px; height: 44px; border: 0; background: transparent; backdrop-filter: none; }
  .favorite-button::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--pill); box-shadow: 0 1px 6px rgb(0 0 0 / 40%); }
  .favorite-button:hover, .favorite-button[aria-pressed="true"] { background: transparent; }
  .favorite-button .icon { position: relative; z-index: 1; width: 16px; height: 16px; }
  .card-content { padding: 14px 12px; }
  .card-title { font-size: 15px; letter-spacing: -.4px; }
  .card-title-row > .icon { display: none; }
  .game-subtitle { font-size: 12px; letter-spacing: 0; margin: 6px 0 10px; }
  .card-description { font-size: 12px; line-height: 1.75; min-height: 42px; margin-bottom: 12px; color: var(--ink-2); }
  .card-bottom { padding-top: 10px; }
  .card-tags .card-tag:nth-child(2) { display: none; }
  .card-tag { font-size: 12px; max-width: 75px; padding: 4px 5px; }
  .card-status { font-size: 12px; color: var(--ink-3); }
  .bottom-callout { flex-direction: column; gap: 22px; padding: 27px; margin-bottom: 34px; }
  .bottom-callout h3 { font-size: 20px; line-height: 1.5; }
  .bottom-callout .btn { align-self: flex-start; }
  .footer-inner { gap: 22px; font-size: 12px; }
  .footer-links { gap: 15px; }
  .footer-links button, .footer-links a { font-size: 12px; }
  .preview-badge { font-size: 12px; }
  .page-heading { padding-top: 37px; padding-bottom: 26px; }
  .page-heading h1 { font-size: 31px; letter-spacing: -1px; }
  .page-heading > p { font-size: 13px; }
  .page-heading .eyebrow { font-size: 12px; letter-spacing: 1px; }
  .topics-page-grid, .guide-grid { grid-template-columns: 1fr; gap: 15px; }
  .topics-page-grid .topic-card { min-height: 178px; padding: 27px; }
  .topics-page-grid .topic-card h3 { font-size: 23px; }
  .guide-card { padding: 27px; }
  .guide-card h3 { font-size: 20px; }
  .guide-card p { font-size: 13px; }
  .faq summary { font-size: 13px; padding: 21px; }
  .faq details p { font-size: 12px; padding: 0 21px 23px; }
  .manage-stats { gap: 10px; }
  .manage-stat { padding: 18px 13px; border-radius: 16px; }
  .manage-stat span { font-size: 12px; line-height: 1.6; }
  .manage-stat strong { font-size: 28px; }
  .manage-actions { flex-direction: column; align-items: flex-start; }
  .manage-actions-group { gap: 7px; }
  .manage-actions .btn { font-size: 12px; padding: 10px 13px; }
  .management-notice { padding: 14px 17px; font-size: 12px; }
  .dialog { width: calc(100% - 20px); max-height: calc(100dvh - 28px); border-radius: 21px; }
  .dialog-header { padding: 17px 20px; }
  .detail-body, .editor-form { padding: 21px; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .detail-info h2 { font-size: 32px; }
  .detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-download { padding: 19px; }
  .detail-download-actions { width: 100%; }
  .form-grid { gap: 17px 13px; }
  .field.mobile-full { grid-column: 1/-1; }
  .field input, .field select, .field textarea { font-size: 16px; padding: 11px; }
  .editor-actions .btn { font-size: 12px; padding: 11px 16px; }
  .toast { bottom: 17px; padding: 12px 16px; font-size: 12px; }
  .toast-message { max-width: 290px; }
  .active-filters { font-size: 12px; }
  .active-filters button { font-size: 12px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 35px; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { font-size: 12px; }
  .hero-featured { left: 12px; right: 12px; }
  .hero-footnote { gap: 8px; font-size: 12px; }
  .card-content { padding: 12px 10px; }
  .card-title { font-size: 14px; }
  .card-category { font-size: 12px; }
  .card-bottom { flex-wrap: wrap; gap: 6px; }
  .card-status { font-size: 12px; }
  .result-total { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .resource-card:hover, .topic-card:hover, .resource-card:hover .card-visual > svg, .resource-card:hover .card-visual > img { transform: none; }
}
/* ---- 页脚法务声明 + 安全运行天数 ---- */
.footer-legal { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-subtle); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.9; letter-spacing: 0.01em; }
/* 法务正文限制单行长度（12-13px 中文一行别超过 ~70 字），但整块仍与上方页脚同行对齐。
   注意：不要在 .footer-legal 上写 max-width —— 它会覆盖 .container 的居中，把整块推到屏幕左边缘。 */
.footer-legal > p:first-child { max-width: 860px; }
.footer-legal p { margin: 0; }
.footer-legal a { color: var(--brand); text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
.footer-legal .footer-uptime { margin-top: 14px; color: var(--ink); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.footer-legal .footer-uptime strong { font-size: 15px; font-weight: 700; color: var(--brand); }
@media (max-width: 720px) {
  .footer-legal { margin-top: 18px; padding-top: 14px; font-size: var(--fs-sm); line-height: 1.85; }
  .footer-legal .footer-uptime strong { font-size: 13px; }
}

/* ============================================================
   v2 批次二：首页布局层
   ------------------------------------------------------------
   这一层叠在上面 500 行基线之上，目的只有一个：
   把首屏让给「卡片 + 筛选」，而不是让给 342px 的 hero 展示区。
   基线里对应的规则（.hero / .catalogue-toolbar / .resource-grid …）
   应该在下一轮统一合并进基线，避免长期双写。
   ============================================================ */

/* ---- 1. Hero：居中堆叠 → 左文案 / 右封面 ----
   原型实测：改双栏 + 压到 232px 后，1440×900 首屏能看到第一排卡片。 */
.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: 36px; padding: 30px 0 0; text-align: left; }
.hero-copy { max-width: none; margin: 0; }
.hero h1 { font-size: clamp(32px, 3.3vw, 46px); line-height: 1.16; letter-spacing: -1.6px; margin: 14px 0 12px; }
.hero-description { font-size: 15px; line-height: 1.7; margin: 0 0 20px; }
.hero-actions { justify-content: flex-start; gap: 18px; }
.hero-showcase { height: 232px; max-width: none; margin: 0; }
.hero-showcase:before { inset: 10px 4% 0; }
.hero-art { top: 0; left: 9%; width: 82%; height: 212px; border-width: 6px; border-radius: 20px; }
.showcase-side { top: 24px; width: 21%; height: 156px; border-width: 5px; border-radius: 18px; }
.showcase-side-left { left: 0; }
.showcase-side-right { right: 0; }
.showcase-side span { display: none; }
.hero-featured { right: 11%; left: 11%; bottom: 22px; padding: 11px 14px; border-radius: 14px; }
.hero-featured strong { font-size: 17px; margin-top: 3px; }
.hero-featured span span { display: none; }
.hero-featured > .icon { width: 32px; height: 32px; padding: 8px; }
.hero-footnote { grid-column: 1/-1; justify-content: flex-start; margin: 12px 0 0; }

/* ---- 2. 提示条：压成一条细信息条，不再占据整屏 ---- */
.preview-notice { justify-content: space-between; gap: 16px; padding: 12px 18px; margin: 14px 0 26px; border: 1px solid var(--line-subtle); border-radius: var(--r-lg); background: var(--surface-1); }
.preview-notice button { min-height: 36px; }

/* ---- 3. 工具条吸顶 ----
   搜索、排序、视图、筛选全在这一条里，所以它吸顶就等于「所有控制常驻」。
   z-index 比页头低一档，滚动时页头盖住工具条上沿。 */
html { scroll-padding-top: 148px; }
.catalogue { scroll-margin-top: 150px; }
.catalogue-toolbar { position: sticky; top: 68px; z-index: var(--z-toolbar); flex-wrap: nowrap; gap: 10px; padding: 10px 0; margin: 0 0 16px; background: var(--chrome-2); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); }
.search-box { background: var(--surface-2); }
.sort-select { flex: 0 0 auto; }

/* 分段视图开关（网格 / 列表） */
.seg { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); }
.seg button { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-3); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface-4); color: var(--ink); }
.seg .icon { width: 17px; height: 17px; }

/* 工具条按钮（筛选 / 清除） */
.toolbar-btn { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 49px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap; }
.toolbar-btn:hover { background: var(--surface-3); color: var(--ink); }
.toolbar-btn .icon { width: 16px; height: 16px; }
.toolbar-btn .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--brand); color: var(--brand-ink); font-size: var(--fs-xs); font-weight: 600; }

/* ---- 4. 列表视图：纯 CSS 改布局，不动卡片标记 ----
   卡片标记同时被 generate_site.py 的 static_card() 和浏览器端 card() 生成，
   改标记等于同时改两处并且会碰到 pageFor() 的跳转判定。
   用 CSS 把同一份标记重排成横向行，零风险。 */
.resource-grid.view-list { display: flex; flex-direction: column; gap: 10px; }
.view-list .resource-card { display: grid; grid-template-columns: 232px minmax(0, 1fr); border-radius: var(--r-md); }
.view-list .resource-card:hover { transform: none; }
.view-list .card-visual { aspect-ratio: 16 / 10; height: 100%; }
.view-list .card-content { display: flex; flex-direction: column; padding: 15px 18px; }
.view-list .card-description { min-height: 0; margin-bottom: 10px; }
.view-list .card-bottom { margin-top: auto; }
.view-list .card-category { top: 10px; left: 10px; }
.view-list .favorite-button { top: 8px; right: 8px; width: 40px; height: 40px; }

/* ---- 5. 筛选抽屉 ---- */
.drawer-backdrop { position: fixed; inset: 0; z-index: var(--z-drawer); background: rgb(3 4 8 / 64%); opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 1); display: flex; flex-direction: column; width: min(396px, 100%); background: var(--surface-1); border-left: 1px solid var(--line); box-shadow: var(--elev-3); transform: translateX(100%); transition: transform var(--t-slow) var(--ease); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: var(--fs-h3); }
.drawer-body { display: flex; flex: 1; flex-direction: column; gap: 22px; overflow: auto; padding: 18px 20px; }
.drawer-group h3 { margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.drawer-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-xs); }
.opt:hover { background: var(--surface-3); color: var(--ink); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.opt .count { color: inherit; opacity: .62; }
.drawer-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.drawer-foot .btn { flex: 1; }

/* ---- 6. 已选条件 chips ---- */
.active-filters { flex-wrap: wrap; gap: 10px; }
.f-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.f-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px 5px 11px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-xs); }
.f-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); }
.f-chip button:hover { background: var(--surface-4); color: var(--danger); }
.f-chip .icon { width: 13px; height: 13px; }

/* ---- 7. 「更多玩法」移到卡片墙之后 ---- */
#home-lower { display: block; }
#home-lower .topic-strip { margin: 34px 0 52px; }

@media (max-width: 1100px) {
  .hero { gap: 24px; }
  .hero h1 { font-size: clamp(30px, 3.6vw, 40px); letter-spacing: -1.2px; }
  .hero-showcase { height: 208px; }
  .hero-art { height: 190px; left: 7%; width: 86%; }
  .showcase-side { height: 140px; top: 20px; }
  .hero-featured { left: 9%; right: 9%; }
  .view-list .resource-card { grid-template-columns: 190px minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .hero-showcase { height: 224px; }
  .hero-art { left: 6%; width: 88%; height: 206px; }
  .hero-featured { left: 8%; right: 8%; }
  .hero-footnote { margin-top: 6px; }
}
@media (max-width: 780px) {
  .catalogue-toolbar { top: 62px; }
  .toolbar-btn { padding: 0 12px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 132px; }
  .catalogue { scroll-margin-top: 134px; }
  .catalogue-toolbar { top: 60px; flex-wrap: wrap; gap: 8px; padding: 9px 0; }
  .catalogue-toolbar .search-box { flex: 1 1 100%; order: -1; }
  .seg button { width: 44px; min-height: 44px; }
  .toolbar-btn { min-height: 44px; }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: clamp(27px, 7.6vw, 35px); letter-spacing: -1.1px; margin: 11px 0 10px; }
  .hero-description { font-size: 14px; margin-bottom: 16px; }
  .hero-showcase { height: 170px; margin-top: 2px; }
  .hero-art { top: 0; left: 0; width: 100%; height: 160px; border-width: 5px; border-radius: 16px; }
  .hero-featured { left: 10px; right: 10px; bottom: 12px; padding: 9px 12px; }
  .hero-featured strong { font-size: 15px; }
  .hero-featured small { letter-spacing: 1.1px; }
  .hero-featured > .icon { width: 28px; height: 28px; padding: 7px; }
  /* 首屏尽量留给卡片：这一行信息在「发现游戏」标题旁已经重复出现 */
  .hero-footnote { display: none; }
  .preview-notice { flex-direction: row; align-items: center; padding: 11px 14px; margin: 12px 0 20px; }
  .view-list .resource-card { grid-template-columns: 124px minmax(0, 1fr); }
  .view-list .card-content { padding: 12px 13px; }
  .view-list .card-description { display: none; }
  .view-list .game-subtitle { margin: 4px 0 8px; }
  .drawer { width: 100%; }
  #home-lower .topic-strip { margin: 28px 0 40px; }
}


/* 游戏详情及静态页面。颜色一律走 home.css 的 :root 令牌，这里不写死颜色。 */
.game-page {
  background: var(--bg-page);
  color: var(--ink);
}

/* 避免网格子项、长标题和链接在窄屏撑开页面。 */
:where(
  .game-page-breadcrumb,
  .game-page-hero,
  .game-demo-band,
  .game-page-layout,
  .related-section,
  .static-map-intro,
  .map-section,
  .site-map-bottom,
  .error-page
),
:where(
  .game-page-breadcrumb,
  .game-page-hero,
  .game-demo-band,
  .game-page-layout,
  .related-section,
  .static-map-intro,
  .map-section,
  .site-map-bottom,
  .error-page
) * {
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: anywhere;
}

.game-page-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 32px 0 28px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.game-page-breadcrumb a {
  color: var(--ink-2);
}

.game-page-breadcrumb a:hover {
  color: var(--brand);
}

.game-page-breadcrumb .sep {
  color: var(--ink-2);
}

.game-page-breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}

.game-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 0 0 48px;
}

.game-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.77;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
}

.game-poster > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px 16px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 16px;
  background: rgb(10 12 17 / 82%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.3px;
  color: rgb(255 255 255 / 92%);
}

.poster-caption b {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.game-heading .eyebrow {
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 1.6px;
  color: var(--brand);
}

.game-heading h1 {
  margin: 0 0 14px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -1px;
  color: var(--ink);
}

.game-heading .game-english {
  margin: 0 0 24px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 1.5px;
  color: var(--ink-2);
}

.game-lead {
  max-width: 500px;
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
}

.game-platform-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1);
}

.platform-chip .icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.game-demo-band {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 32px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

.game-demo-band .icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  color: var(--brand);
}

/* 阅读区域与侧栏。 */
.game-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 32px;
  margin-bottom: 48px;
}

.game-main-column {
  width: 100%;
  min-width: 0;
}

.game-reading-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
  color: var(--ink);
}

.game-table-of-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
}

.game-table-of-contents a {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  text-decoration: none;
}

.game-table-of-contents a:hover {
  color: var(--brand);
}

.article-section {
  padding: 32px;
  scroll-margin-top: 96px;
}

.article-section + .article-section {
  border-top: 1px solid var(--line);
}

.article-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.article-section h2:before {
  content: "";
  flex-shrink: 0;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--brand);
}

.article-section h3 {
  margin: 24px 0 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.article-section p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.article-section a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.concept-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.concept-highlight {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
}

.concept-highlight .number {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 1.5px;
  color: var(--brand);
}

.concept-highlight h3 {
  margin: 12px 0 10px;
  font-size: 16px;
  color: var(--ink);
}

.concept-highlight p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.resource-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
}

.resource-facts div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
}

.resource-facts dt {
  flex: 0 1 40%;
  color: var(--ink-2);
}

.resource-facts dd {
  flex: 1 1 0;
  margin: 0;
  text-align: right;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.resource-facts div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.requirements-note {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: var(--surface-2);
}

.article-section .requirements-note p {
  font-size: 14px;
  color: var(--ink-2);
}

.source-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
}

.source-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
}

.source-box span {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}

.source-box a {
  max-width: 100%;
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}

.game-sidebar {
  position: sticky;
  top: 98px;
}

.download-box {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
  color: var(--ink);
}

.download-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 1.4px;
  color: var(--ink-2);
}

.download-kicker:before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.download-box h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.download-box > p {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.download-box .btn {
  width: 100%;
  min-height: 44px;
  padding: 13px 16px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  color: var(--brand-ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.download-box .btn:hover {
  border-color: var(--brand-lo);
  background: var(--brand-lo);
}

.download-box .btn + .btn {
  margin-top: 12px;
}

.download-box .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-box .btn-row .btn {
  width: auto;
  min-width: 0;
  flex: 1 1 150px;
}

.download-box .btn-row .btn + .btn {
  margin-top: 0;
}

.download-box .btn-row + .btn {
  margin-top: 12px;
}

.download-box .btn-secondary {
  border-color: var(--brand-line);
  background: var(--surface-1);
  color: var(--brand);
}

.download-box .btn-secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.download-box .btn-secondary.saved {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.download-box .btn-secondary.saved .icon {
  fill: var(--brand);
}

/* 禁用样式置于交互状态之后，避免悬停或收藏状态覆盖。 */
.download-box .btn:disabled,
.download-box .btn[aria-disabled="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  opacity: 1;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.download-box .btn:disabled .icon,
.download-box .btn[aria-disabled="true"] .icon {
  fill: none;
  color: var(--ink-2);
}

.download-box .btn-secondary.saved:disabled .icon,
.download-box .btn-secondary.saved[aria-disabled="true"] .icon {
  fill: currentColor;
}

.download-notes {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.download-notes a {
  color: var(--brand);
}

.game-side-note {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
}

.game-side-note h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.game-side-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.game-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--brand);
}

.game-back-link .icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
}

/* 关联卡片保留原图，不添加暗色遮罩。 */
.related-section {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.related-games {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.related-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
  color: var(--ink);
  transition: transform 0.2s, border-color 0.2s;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
}

.related-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.8;
  object-fit: cover;
  background: var(--surface-1);
}

.related-card-body {
  padding: 20px;
}

.related-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.related-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.3px;
  color: var(--ink-2);
}

/* 分享回退和草稿提示同样使用浅色表面。 */
.share-fallback {
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

.share-fallback input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-1);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.draft-note {
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.source-draft .card-status {
  background: var(--surface-2);
  font-size: 12px;
  color: var(--ink-2);
}

.draft-panel-note {
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* 站点目录与错误页面。 */
.static-map-intro {
  padding: 48px 0 32px;
  color: var(--ink);
}

.static-map-intro h1 {
  margin: 0 0 20px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.8px;
  color: var(--ink);
}

.static-map-intro p {
  max-width: 800px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
}

.map-section {
  margin: 0 0 24px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
  scroll-margin-top: 96px;
}

.map-section h2 {
  margin: 0 0 24px;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
}

.map-section ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-section li a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-1);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.map-section li a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.map-section small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.5px;
  color: var(--ink-2);
}

.site-map-bottom {
  padding: 16px 0 48px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

.site-map-bottom a {
  color: var(--brand);
}

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 70vh;
  padding: 72px 24px;
  background: var(--surface-2);
  text-align: center;
  color: var(--ink);
}

.error-page .error-code {
  margin: 0;
  font-family: monospace;
  font-size: 100px;
  line-height: 1.15;
  letter-spacing: 4px;
  color: var(--brand);
}

.error-page h1 {
  margin: 24px 0 16px;
  font-size: 28px;
  line-height: 1.3;
  color: var(--ink);
}

.error-page p {
  max-width: 440px;
  margin: 0 0 32px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
}

.game-page footer {
  margin-top: 0;
}

/* 键盘焦点保持清晰，不修改已有点击和分享逻辑。 */
:where(
  .game-page-breadcrumb,
  .game-table-of-contents,
  .article-section,
  .game-sidebar,
  .related-section,
  .map-section,
  .site-map-bottom,
  .error-page
) :is(a, button, input):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.related-card:focus-visible,
.share-fallback input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -3px;
}

/* 平板保留阅读区与侧栏双列，避免 768px 附近提前堆叠。 */
@media (max-width: 1000px) {
  .game-page-layout {
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 24px;
  }

  .game-page-hero {
    gap: 40px;
  }

  .game-lead {
    font-size: 14px;
  }

  .download-box {
    padding: 24px;
  }

  .game-table-of-contents {
    gap: 12px 18px;
  }

  .concept-highlights,
  .resource-facts {
    grid-template-columns: 1fr;
  }

  .resource-facts div:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .game-platform-row {
    margin-top: 20px;
  }

  .map-section ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .game-page-breadcrumb {
    padding: 24px 0;
  }

  .game-page-hero {
    gap: 32px;
    padding-bottom: 36px;
  }

  .game-heading h1 {
    font-size: 36px;
  }

  .game-heading .eyebrow {
    margin-bottom: 12px;
    letter-spacing: 1px;
  }

  .game-heading .game-english {
    margin-bottom: 18px;
    letter-spacing: 1px;
  }

  .game-lead {
    margin-bottom: 18px;
  }

  .game-platform-row {
    gap: 8px;
    font-size: 12px;
  }

  .platform-chip {
    padding: 6px 9px;
  }

  .game-page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 20px;
  }

  .game-sidebar .download-box {
    grid-row: span 2;
  }

  .game-side-note {
    margin-top: 0;
  }

  .game-back-link {
    padding: 16px 0;
  }

  .game-demo-band {
    margin-bottom: 24px;
  }

  .related-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .concept-highlights,
  .resource-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-facts div:nth-last-child(2) {
    border-bottom: 0;
  }
}

/* 640px 及以下统一单列；320px 下长文本仍可自然换行。 */
@media (max-width: 640px) {
  .game-page-breadcrumb {
    gap: 8px;
    padding: 20px 0;
    font-size: 12px;
  }

  .game-page-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-bottom: 32px;
  }

  .game-poster {
    aspect-ratio: 1.67;
  }

  .poster-caption {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 10px 12px;
  }

  .game-heading h1 {
    margin-bottom: 12px;
    font-size: 36px;
    line-height: 1.2;
  }

  .game-heading .eyebrow {
    margin-bottom: 14px;
  }

  .game-heading .game-english {
    font-size: 12px;
  }

  .game-lead {
    margin-bottom: 20px;
    font-size: 14px;
  }

  .game-platform-row {
    margin-top: 20px;
  }

  .game-demo-band {
    gap: 8px;
    padding: 16px 20px;
    font-size: 13px;
  }

  .game-page-layout {
    gap: 24px;
    margin-bottom: 32px;
  }

  .game-sidebar {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .game-sidebar .download-box {
    grid-row: auto;
  }

  .download-box {
    padding: 24px;
  }

  .download-box h2 {
    font-size: 24px;
  }

  .download-box > p,
  .download-notes,
  .game-side-note p,
  .draft-note,
  .draft-panel-note,
  .share-fallback {
    font-size: 13px;
  }

  .game-side-note {
    padding: 24px;
  }

  .game-table-of-contents {
    flex-wrap: nowrap;
    gap: 20px;
    max-width: 100%;
    overflow-x: auto;
    padding: 18px 24px;
  }

  .game-table-of-contents a {
    flex: 0 0 auto;
    font-size: 13px;
    white-space: nowrap;
  }

  .article-section {
    padding: 24px;
  }

  .article-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
  }

  .article-section p {
    font-size: 14px;
    line-height: 1.9;
  }

  .concept-highlights {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 24px;
  }

  .concept-highlight {
    padding: 20px;
  }

  .concept-highlight h3 {
    font-size: 15px;
  }

  .resource-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-facts div {
    gap: 12px;
    padding: 14px 0;
    font-size: 13px;
  }

  .resource-facts div:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .source-box {
    gap: 12px;
    padding: 18px;
  }

  .source-box a {
    font-size: 13px;
  }

  .source-box span {
    font-size: 12px;
  }

  .related-section {
    padding: 32px 0 40px;
  }

  .related-games {
    gap: 16px 12px;
  }

  .related-card img {
    aspect-ratio: 1.4;
  }

  .related-card-body {
    padding: 16px;
  }

  .related-card h3 {
    font-size: 14px;
  }

  .static-map-intro {
    padding: 32px 0 24px;
  }

  .static-map-intro h1 {
    font-size: 32px;
  }

  .static-map-intro p,
  .site-map-bottom {
    font-size: 13px;
  }

  .map-section {
    padding: 24px;
  }

  .map-section ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .map-section h2 {
    font-size: 20px;
  }

  .map-section li a {
    padding: 16px;
    font-size: 14px;
  }

  .error-page {
    padding: 56px 20px;
  }

  .error-page .error-code {
    font-size: 80px;
    letter-spacing: 2px;
  }

  .error-page h1 {
    font-size: 24px;
  }

  .error-page p {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .game-heading h1 {
    font-size: 32px;
  }

  .article-section,
  .game-table-of-contents,
  .download-box,
  .game-side-note,
  .map-section {
    padding: 20px;
  }

  .related-card-body {
    padding: 14px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .related-card,
  .download-box .btn {
    transition: none;
  }

  .related-card:hover {
    transform: none;
  }
}

/* 视频播放器：全宽大屏，封面层 + 播放按钮。 */
.video-player {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #05070b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

.video-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070b;
}

.video-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.28));
  -webkit-tap-highlight-color: transparent;
}

.video-cover-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 26px;
  padding-left: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s, background 0.25s;
}

.video-cover:hover .video-cover-btn {
  transform: scale(1.08);
  background: var(--brand-hi);
}

.video-cover-title {
  max-width: 82%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-player.playing .video-cover {
  display: none;
}

/* 截图画廊：第一张全宽大图，其余两列，无文字标注。 */
.screenshots-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.screenshot-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.screenshot-item:first-child {
  grid-column: 1 / -1;
  border-radius: 18px;
}

.screenshot-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.screenshot-item:hover img {
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .video-cover-btn {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .screenshots-gallery {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .screenshots-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .screenshot-item,
  .video-player {
    border-radius: 12px;
  }
}

/* ============================================================
   v2 批次三：详情页
   ------------------------------------------------------------
   目标：让人在上方 1.5 屏内就判断出「这游戏装不装得下、能不能下」，
   并且下载入口在手机上永远在拇指够得到的地方。
   全部是 CSS 增强 + 生成器复用已有字段，不新增数据、不引入 JS 依赖，
   因此关掉 JavaScript 后正文和链接依然完整可读。
   ============================================================ */

/* ---- 1. 封面环境光 ----
   用真实 <img> 而不是 CSS 自定义属性里的 url()：
   实测 Firefox 会把自定义属性中的相对 URL 按「引用它的样式表」的基准解析，
   而那张样式表是 assets/site.css，于是 ../../assets/... 被解析成 F:/assets/...
   （页面是 file:///F:/网站克隆/games/<slug>/index.html）。
   写成 <img src> 就按文档基准解析，和 .game-poster > img 用的是同一个路径，天然正确。
   同一张图会被浏览器缓存复用，不额外产生网络请求。 */
.game-page-hero { position: relative; isolation: isolate; }
.hero-glow {
  position: absolute;
  z-index: -1;
  top: -70px;
  left: calc(50% - 50vw);
  width: 100vw;
  height: calc(100% + 40px);
  object-fit: cover;
  object-position: center 26%;
  filter: blur(60px) saturate(150%);
  opacity: .38;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 36%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 36%, transparent 90%);
}

/* ---- 2. 关键信息条 ----
   旧版只有「平台 + 更新日期」，配置和体积要翻到页面最底部才看得到。
   这里把版本 / 大小 / 语言提到标题下面，和平台并排。 */
.game-platform-row { gap: 8px; margin-top: 22px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-1);
}
.meta-chip > span { color: var(--ink-3); }
.meta-chip > b { font-weight: 600; color: var(--ink); }
.game-platform-row .updated { color: var(--ink-3); }

/* ---- 3. 目录吸顶 ----
   ⚠️ 旧值 overflow: hidden 会把阅读面板变成滚动容器，面板内部永远不滚动，
   于是目录的 position: sticky 彻底失效（表现为「目录不吸顶」）。
   overflow: clip 不创建滚动容器，同时仍然按圆角裁剪。 */
.game-reading-panel { overflow: clip; }
.game-table-of-contents {
  position: sticky;
  top: 68px;
  z-index: 5;
  gap: 10px 22px;
  padding: 15px 32px;
  background: rgb(22 26 35 / 96%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.game-table-of-contents a { padding: 3px 0; border-bottom: 2px solid transparent; }
.game-table-of-contents a:hover { border-bottom-color: var(--brand); }
.article-section { scroll-margin-top: 148px; }

/* ---- 4. 侧栏下载卡：吸顶位置跟着页头走 ---- */
.game-sidebar { top: 84px; }

/* ---- 5. 移动端吸底 CTA ----
   复用 @@DOWNLOAD@@ 已经渲染出的同一批链接，只是换了个位置显示，
   所以不增加数据依赖，也不需要 JS。 */
.dock { display: none; }
@media (max-width: 1080px) {
  .dock {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--chrome-3);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -10px 30px rgb(0 0 0 / 45%);
  }
  .dock-info { min-width: 0; }
  .dock-info strong { display: block; overflow: hidden; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
  .dock-info span { display: block; margin-top: 3px; overflow: hidden; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
  .dock-actions { display: flex; flex: 0 0 auto; gap: 8px; }
  .dock .btn { min-height: 44px; padding: 11px 16px; font-size: var(--fs-xs); }
  .dock .btn > .icon:last-child { display: none; }
  .game-page { padding-bottom: 84px; }
}
@media (max-width: 420px) {
  .dock { justify-content: center; }
  .dock-info { display: none; }
}

/* ---- 6. 窄屏收起环境光、压低吸顶偏移 ---- */
@media (max-width: 767px) {
  .hero-glow { top: -34px; height: calc(100% + 20px); opacity: .3; filter: blur(40px) saturate(140%); }
  .game-table-of-contents { top: 60px; padding: 12px 20px; }
  .article-section { scroll-margin-top: 126px; }
}
@media (max-width: 600px) {
  .game-table-of-contents { top: 60px; }
  .article-section { scroll-margin-top: 122px; }
}

/* ==========================================================================
   高级皮肤层 · 详情页补充
   --------------------------------------------------------------------------
   通用部分在 templates/home.css 里（该文件是 site.css 的第一段，本页同样生效）。
   这里只放详情页独有的四件事。
   ========================================================================== */

/* ---- 1. 氛围光源 ----
   body 上的 .game-page 会重写 background 简写，把首页那份光源盖掉，这里补回来。 */
body.game-page {
  background-color: var(--bg-page);
  background-image: var(--aurora);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ---- 2. 相关游戏卡片：和首页卡片同一套质感 ---- */
.related-card {
  position: relative;
  background: linear-gradient(180deg, var(--spec), rgb(255 255 255 / 0%) 46%), var(--surface-1);
  box-shadow: 0 1px 0 var(--edge) inset, var(--card-shadow);
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), box-shadow 320ms var(--ease);
  --mx: 50%;
  --my: 50%;
}
.related-card:hover {
  box-shadow: 0 1px 0 var(--edge) inset, var(--card-shadow-h), 0 0 0 1px rgb(var(--brand-rgb) / 18%);
}
.related-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease);
  background: radial-gradient(300px circle at var(--mx) var(--my), rgb(var(--brand-rgb) / 17%), transparent 62%);
}
.related-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease);
  background: radial-gradient(260px circle at var(--mx) var(--my), rgb(var(--brand-rgb) / 80%), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
:root[data-fx~="spotlight"] .related-card:hover::after,
:root[data-fx~="spotlight"] .related-card:hover::before { opacity: 1; }
/* 卡片内文压在遮罩之上，避免被聚光层盖住 */
.related-card > * { position: relative; z-index: 5; }

/* ---- 3. 吸顶目录：当前阅读位置 ----
   原来只有 hover 反馈，滚动时看不出自己读到哪一节。 */
.game-table-of-contents a.px-current {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.game-table-of-contents a.px-current::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  vertical-align: 2px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px rgb(var(--brand-rgb) / 80%);
}

/* ---- 4. 封面渐显 ---- */
:root[data-fx~="fadein"] .game-poster > img.px-img,
:root[data-fx~="fadein"] .related-card img.px-img { opacity: 0; filter: blur(14px); }
:root[data-fx~="fadein"] .game-poster > img.px-img.px-loaded,
:root[data-fx~="fadein"] .related-card img.px-img.px-loaded {
  opacity: 1;
  filter: blur(0);
  transition: opacity 620ms var(--ease), filter 620ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .related-card,
  .related-card::after,
  .related-card::before { transition-duration: 1ms !important; }
  :root[data-fx~="fadein"] .game-poster > img.px-img,
  :root[data-fx~="fadein"] .related-card img.px-img { opacity: 1; filter: none; }
}

/* 吸顶目录原来写死了深色底，换成玻璃令牌后才能跟着皮肤走 */
.game-table-of-contents { background: var(--chrome-2); }
/* ---- 留言板与围观计数（game page #comments section）---- */
.view-badge {
  display: inline-block;
  margin-left: 12px;
  padding: 2px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 400;
  vertical-align: middle;
}
.view-badge b {
  color: var(--brand);
  font-weight: 700;
}
.comment-intro {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 0;
}
.comment-item {
  background: var(--surface-1);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
.comment-item-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.comment-item-name {
  color: var(--brand);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.comment-item-time {
  margin-left: auto;
  color: var(--ink-4);
  font-size: var(--fs-xs);
}
.comment-item-text {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: var(--fs-body);
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-empty {
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.comment-input,
.comment-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: var(--fs-body);
}
.comment-input:focus,
.comment-textarea:focus {
  outline: none;
  border-color: var(--brand);
}
.comment-textarea {
  resize: vertical;
  min-height: 72px;
}
.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comment-submit {
  background: var(--brand);
  color: var(--brand-ink);
  border: 0;
  border-radius: var(--r-sm);
  padding: 9px 20px;
  font-weight: 600;
  font-size: var(--fs-body);
  cursor: pointer;
}
.comment-submit:hover { background: var(--brand-hi); }
.comment-submit:disabled { opacity: 0.55; cursor: default; }
.comment-msg {
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.comment-msg.err { color: var(--danger); }
/* ---- 站长回复：金色徽章 + 嵌套回复气泡 ----
   徽章只在服务端下发 role='admin' 时由 JS 画出来；
   普通留言把昵称写成「站长」也不会出现徽章（服务端还会直接拒收这类昵称）。 */
.comment-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-hi), var(--brand));
  color: var(--brand-ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  white-space: nowrap;
}
.comment-item.is-admin {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.comment-replies {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--brand-line);
}
.comment-reply {
  background: var(--surface-2);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}
.comment-reply + .comment-reply { margin-top: 8px; }
.comment-reply.is-admin {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.comment-reply-btn {
  margin-left: 10px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}
.comment-reply-btn:hover {
  color: var(--brand);
  border-color: var(--brand-line);
}
.comment-reply-slot:empty { display: none; }
.comment-reply-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--brand-line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.comment-reply-box .comment-textarea { min-height: 56px; }
.comment-reply-cancel {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.comment-admin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.comment-admin-on {
  color: var(--brand);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.comment-admin-btn {
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-4);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}
.comment-admin-btn:hover {
  color: var(--brand);
  border-color: var(--brand-line);
}
@media (max-width: 560px) {
  .comment-item-head { flex-wrap: wrap; }
  .comment-reply-btn { margin-left: 0; }
}

