/* 配色和字体取自游戏：纸色、墨线来自 MapBorderTexture / Tile_02_512，字体是游戏 UI 用的 Nunito Sans，圆角对应 Rounded_Rect_10px */
:root {
  --paper: #fff9ee;
  --paper-2: #f5ead3;
  --card: #fffdf8;
  --rule: #e4d7bd;
  --ink: #302e2e;
  --ink-2: #6f6359;
  --gold: #f0ae3c;
  --gold-wash: #fcefd0;
  --pine: #2e5a44;
  --r: 10px;
  --lift: 0 1px 2px rgba(48, 46, 46, .16), 0 4px 12px rgba(48, 46, 46, .08);
  --panel-w: 344px;
  --bar: 48px;
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-optical-sizing: auto;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); display: flex; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* 游戏图标都是白色剪影，放在墨色底上 */
img[src*="img/cars/"], img[src*="img/cosmetics/"], img[src*="img/upgrades/"], img[src*="img/tools/"] { background: var(--ink); border-radius: 6px; }

/* ---- panel ---- */
#panel {
  width: var(--panel-w); flex: none; height: 100%; overflow-y: auto;
  background: var(--paper-2); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 20px; padding-bottom: 18px;
  scrollbar-color: var(--rule) transparent;
}
.brand { position: relative; padding: 22px 20px 0; }
#panel nav.site { gap: 4px 14px; font-size: 14px; }
.brand h1 { margin: 0; font-size: 36px; line-height: .95; font-weight: 900; letter-spacing: -.025em; }
.brand h1 span { display: block; }
.brand p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; max-width: 32ch; }

/* 区域按钮：拍立得样式，图是游戏选区域界面的卡片 */
.areas { padding: 0 20px; display: grid; gap: 14px; }
.areas h2 { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.areas .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.areas button {
  display: flex; flex-direction: column; padding: 5px 5px 0; border: 0; border-radius: 3px;
  background: var(--card); box-shadow: var(--lift); cursor: pointer; text-align: left;
  transition: transform .15s ease-out, box-shadow .15s;
}
.areas img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 1px; }
.areas span { padding: 6px 2px 8px; font-size: 12.5px; line-height: 1.2; font-weight: 700; }
.areas button:hover { transform: rotate(1.5deg); }
.areas button[aria-current="true"] {
  transform: rotate(-2.5deg) translateY(-2px);
  box-shadow: 0 0 0 3px var(--gold), 0 6px 16px rgba(48, 46, 46, .2);
}

.search { padding: 0 20px; position: relative; }
.search input {
  width: 100%; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--rule);
  background: var(--card); font-size: 15px;
}
.search input::placeholder { color: var(--ink-2); }
#results {
  list-style: none; margin: 6px 0 0; padding: 4px; background: var(--card); box-shadow: var(--lift);
  border-radius: var(--r); max-height: 320px; overflow-y: auto;
}
#results button {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 7px 8px; border: 0;
  background: none; text-align: left; cursor: pointer; border-radius: 6px;
}
#results button:hover, #results button:focus-visible { background: var(--paper-2); }
#results small { display: block; color: var(--ink-2); font-size: 12px; }
#results .empty { padding: 8px; font-size: 14px; color: var(--ink-2); }

.legend { padding: 0 20px; }
.legend-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.legend-head h2 { margin: 0 auto 0 0; font-size: 19px; font-weight: 900; letter-spacing: -.01em; }
.legend-head button { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.legend-head button:hover { color: var(--ink); }
#cats { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
#cats li { border-bottom: 1px solid var(--rule); }
#cats button {
  width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px;
  padding: 9px 2px; background: none; border: 0; cursor: pointer; text-align: left;
}
#cats button[aria-pressed="false"] { opacity: .45; }
#cats button[aria-pressed="false"] .badge { filter: grayscale(1); }
#cats .name { font-size: 15px; font-weight: 650; }
#cats .count { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#cats .bar { grid-column: 2 / 4; height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; margin-top: -4px; }
#cats .bar i { display: block; height: 100%; background: var(--gold); }
.opt { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.opt input { accent-color: var(--pine); width: 16px; height: 16px; }

.species { margin: 0 20px; background: var(--card); border-radius: var(--r); box-shadow: var(--lift); }
.species summary { padding: 11px 14px; cursor: pointer; font-size: 15px; font-weight: 700; }
#species { list-style: none; margin: 0; padding: 0 14px 10px; display: grid; gap: 2px; }
#species label { display: grid; grid-template-columns: 16px 10px 1fr auto; gap: 8px; align-items: center; font-size: 14px; padding: 4px 0; cursor: pointer; }
#species input { accent-color: var(--pine); margin: 0; }
#species .count { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
#species .none { color: var(--ink-2); font-size: 13px; padding: 4px 0; }

footer { margin-top: auto; padding: 0 20px; }
footer a { color: var(--pine); }
footer p { margin: 0 0 8px; font-size: 12px; line-height: 1.5; color: var(--ink-2); max-width: 40ch; }

/* ---- map ---- */
#map { flex: 1; height: 100%; background: var(--paper); }
/* 游戏地图的双线边框（MapBorderTexture），固定在视口上，不随地图移动 */
#map::after {
  content: ""; position: absolute; inset: 14px; z-index: 900; pointer-events: none;
  border: 1px solid var(--ink); box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--ink);
}
#map .leaflet-top .leaflet-control { margin-top: 30px; }
#map .leaflet-right .leaflet-control { margin-right: 30px; }
#map .leaflet-bottom .leaflet-control { margin-bottom: 22px; }
.leaflet-container { font-family: inherit; }
.leaflet-bar { border: 0 !important; box-shadow: var(--lift) !important; border-radius: var(--r) !important; overflow: hidden; }
.leaflet-bar a { background: var(--card); color: var(--ink); border-color: var(--rule); width: 34px; height: 34px; line-height: 34px; }
.leaflet-bar a:hover { background: var(--paper-2); }
.badge {
  --c: #555; width: 28px; height: 28px; border-radius: 50%; background: var(--c);
  display: grid; place-items: center; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(40, 30, 10, .45);
}
.badge img, .leaflet-container .leaflet-marker-pane .badge img { width: 62%; height: 62%; object-fit: contain; }
.badge.small { width: 20px; height: 20px; }
.badge.dot { width: 12px; height: 12px; box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgba(40, 30, 10, .5); }
.legend .badge { box-shadow: none; }
#species .badge.dot { box-shadow: none; width: 10px; height: 10px; }
.pin { background: none; border: 0; }
.pin .badge { transition: transform .12s; }
.pin:hover .badge, .pin.active .badge { transform: scale(1.18); }
.pin.found .badge { opacity: .38; filter: grayscale(.8); }

.leaflet-popup-content-wrapper { background: var(--card); color: var(--ink); border-radius: var(--r); box-shadow: 0 6px 22px rgba(48, 46, 46, .28); }
.leaflet-popup-tip { background: var(--card); }
.leaflet-popup-content { margin: 14px 16px; width: 270px !important; font-size: 14px; line-height: 1.45; }
.pop a { color: var(--pine); font-weight: 650; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pop-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.pop-head .badge { flex: none; box-shadow: none; }
.pop h3 { margin: 0; font-size: 18px; line-height: 1.2; font-weight: 900; letter-spacing: -.01em; }
.pop .sub { margin: 1px 0 0; color: var(--ink-2); font-size: 13px; }
.pop p { margin: 6px 0; }
.pop h4 { margin: 10px 0 4px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rewards li { display: flex; gap: 8px; align-items: center; }
.rewards img { width: 46px; height: 26px; object-fit: contain; }
.rewards .tag { font-size: 12px; color: var(--ink-2); }
.rewards .car { font-weight: 700; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0; }
.pop dt { color: var(--ink-2); }
.pop dd { margin: 0; }
.pop table { border-collapse: collapse; font-size: 13px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.pop th, .pop td { padding: 2px 10px 2px 0; text-align: left; }
.pop th { font-weight: 700; color: var(--ink-2); }
.pop .meta { color: var(--ink-2); font-size: 13px; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.actions label { display: flex; gap: 6px; align-items: center; cursor: pointer; font-weight: 700; margin-right: auto; }
.actions input { accent-color: var(--pine); width: 16px; height: 16px; }
.actions button { background: var(--paper-2); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 650; }
.actions button:hover { background: var(--rule); }
.pop .go { background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 700; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-2); }
.leaflet-control-attribution { font-size: 11px; background: rgba(255, 249, 238, .9) !important; border-radius: 6px; }

#panel-toggle { display: none; }

@media (max-width: 760px) {
  /* 地图页：地图在导航条下面铺满，侧栏变成从底部拉起的面板 */
  body { display: block; }
  #map { position: fixed; inset: var(--bar) 0 0; }
  #map::after { inset: 8px; }
  #map .leaflet-top .leaflet-control { margin-top: 22px; }
  #map .leaflet-right .leaflet-control { margin-right: 22px; }
  /* 不用 transform 滑动：transform 会让面板里 position: fixed 的导航条跟着面板走 */
  #panel {
    position: fixed; z-index: 1000; left: 0; right: 0; bottom: -78vh; bottom: -78dvh; top: auto; width: auto;
    height: 78vh; height: 78dvh; border-right: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(48, 46, 46, .2);
    visibility: hidden; transition: bottom .22s ease-out, visibility .22s;
  }
  #panel.open { bottom: 0; visibility: visible; }
  #panel-toggle {
    display: block; position: fixed; z-index: 1001; left: 22px; bottom: 56px; max-width: calc(100% - 44px);
    background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 11px 20px;
    font-weight: 800; box-shadow: 0 3px 10px rgba(48, 46, 46, .3);
  }
  #panel-toggle::after { content: "▴"; margin-left: 8px; }
  #panel-toggle[aria-expanded="true"]::after { content: "▾"; }
  /* 矮屏上别顶到导航条 */
  #panel.open ~ #panel-toggle { bottom: min(calc(78vh + 10px), calc(100vh - var(--bar) - 56px)); bottom: min(calc(78dvh + 10px), calc(100dvh - var(--bar) - 56px)); }
}
@media (prefers-reduced-motion: reduce) {
  #panel, .pin .badge, .areas button { transition: none; }
}

/* ---- 文章页（vehicles.html 等），复用上面的 token ---- */
body.doc { display: block; overflow: visible; height: auto; line-height: 1.5; }
.doc a { color: var(--pine); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--pine); }
.doc .brand { max-width: 1100px; margin: 0 auto; padding: 22px 16px 8px; }
.doc .brand h1 { font-size: 22px; letter-spacing: -.01em; }
.doc .brand h1 span { margin-top: 2px; font-size: clamp(44px, 7vw, 72px); letter-spacing: -.03em; }
.doc .brand p { max-width: 60ch; font-size: 17px; }
nav.site { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 16px; font-size: 15px; font-weight: 700; }
nav.site a { color: var(--ink-2); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); }
nav.site a[aria-current="page"] { box-shadow: 0 3px 0 var(--gold); }
nav.site a[hreflang] { margin-left: auto; } /* 切换语言放在最右 */
.doc main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.doc .sec { margin: 40px 0 6px; font-size: 25px; font-weight: 900; letter-spacing: -.015em; }
.doc .note { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.scroll { overflow-x: auto; border-radius: var(--r); box-shadow: var(--lift); }
/* 表比屏幕宽时：右边缘的阴影提示还能往右滑（滑到底被 local 那层盖住），第一列粘在左边 */
.scroll {
  background:
    linear-gradient(to left, var(--card) 10px, rgba(255, 253, 248, 0)) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, rgba(48, 46, 46, .22), transparent) right / 14px 100% no-repeat scroll,
    var(--card);
}
.grid tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: inset -1px 0 var(--rule); }
.grid thead tr > :first-child { background: var(--paper-2); }
.grid tbody tr:hover > :first-child { background: var(--paper); }
.grid tr:target > :first-child { background: var(--gold-wash); box-shadow: inset 3px 0 var(--gold), inset -1px 0 var(--rule); }
/* separate 而不是 collapse：粘住的第一列要带着自己的边线走 */
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.grid th, .grid td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: middle; }
.grid thead th { font-size: 12px; font-weight: 800; color: var(--ink-2); background: var(--paper-2); }
.grid tbody tr:last-child > * { border-bottom: 0; }
.grid tbody tr:hover { background: var(--paper); }
.grid .n { font-variant-numeric: tabular-nums; }
.grid td small { display: block; color: var(--ink-2); font-size: 12px; }
.grid .who { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; }
.grid .who img, .car header img { object-fit: contain; }
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-top: 40px; }
.cars .car { background: var(--card); border-radius: var(--r); box-shadow: var(--lift); padding: 16px; scroll-margin-top: 16px; }
.cars .car:target { box-shadow: 0 0 0 3px var(--gold), var(--lift); }
.car header { display: flex; gap: 14px; align-items: center; }
.car header img { flex: none; width: 96px; height: 54px; }
.car h2 { margin: 0; font-size: 22px; line-height: 1.1; font-weight: 900; letter-spacing: -.01em; }
.car .how { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.car .desc { font-size: 15px; margin: 12px 0; }
.car dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 14px; }
.car dt { color: var(--ink-2); }
.car dd { margin: 0; font-variant-numeric: tabular-nums; }
.car h3 { margin: 14px 0 4px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.doc footer { max-width: 1100px; margin: 48px auto 0; padding: 16px 16px 32px; border-top: 1px solid var(--rule); }
.doc footer p { max-width: 80ch; margin: 0 0 8px; }
.liv { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.liv li { display: grid; justify-items: center; font-size: 12px; color: var(--ink-2); }
.liv img { border-radius: 3px; display: block; }
.liv.km { gap: 8px; margin-top: 8px; }
.liv b { font-weight: 700; font-variant-numeric: tabular-nums; }
/* 锚点跳转到的行 */
.grid tr:target, .dreams li:target { background: var(--gold-wash); box-shadow: inset 3px 0 var(--gold); }
/* 外观件页 */
.doc .sec small { font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; }
.grid.cos td { vertical-align: top; }
.grid.cos .who img { width: 40px; height: 40px; flex: none; padding: 4px; box-sizing: border-box; }
.grid.cos tr { scroll-margin-top: 16px; }
.grid .none { color: var(--ink-2); }
.grid.cos td { white-space: normal; }

/* 升级件页 */
.grid.up { min-width: 760px; }
.grid.up td { white-space: normal; }
.grid.up td:first-child { white-space: nowrap; }
.grid.up .who img { width: 40px; height: 40px; flex: none; padding: 4px; box-sizing: border-box; object-fit: contain; }
.grid.up tr.line th { padding-top: 18px; font-size: 16px; font-weight: 900; color: var(--ink); background: none; }
.grid.up tr.line th small { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.grid.up tbody:first-of-type tr.line th { padding-top: 10px; }
.grid.up tr.stock td { color: var(--ink-2); }
.grid.up tr.stock td:first-child { padding-left: 62px; }
.grid thead th small { display: block; font-weight: 400; }
/* 动物图鉴页 */
.doc ul.note { padding-left: 20px; max-width: 80ch; }
.doc ul.note li { margin-bottom: 4px; }
.grid.wild tr { scroll-margin-top: 16px; }
.grid.wild .where { white-space: normal; }
.grid.wild .where small { display: inline; margin: 0 12px 0 4px; }
/* 天气页 */
.grid.wx .next { white-space: normal; min-width: 20ch; }
.grid.wx .next small { display: inline; margin-right: 8px; }
/* 故事页 */
.dreams { list-style: none; padding: 0; margin: 0; max-width: 80ch; columns: 2 320px; column-gap: 32px; }
.dreams li { display: flex; gap: 12px; break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
.dreams .no { flex: none; width: 2.5ch; text-align: right; font-weight: 900; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dreams p, .talk p { margin: 0 0 2px; font-style: italic; }
.talk { max-width: 80ch; }
.talk h3 { margin: 16px 0 4px; font-size: 15px; font-weight: 800; }
/* 页头图：游戏加载画面（scripts/build_art.py） */
.doc .hero { display: block; width: 100%; height: auto; aspect-ratio: 16 / 5; object-fit: cover; margin-top: 20px; border-radius: var(--r); }
/* 标题里的 over the hill 链回首页 */
.brand h1 a { color: inherit; text-decoration: none; }
.brand h1 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }

/* ---- 首页（scripts/build_home.py） ---- */
/* 页头：一张加载画面铺满，字和搜索放在天空上，像游戏的标题画面 */
.home .cover { position: relative; min-height: clamp(440px, 46vw, 600px); display: flex; overflow: hidden; }
.home .cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.home .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--paper) 0, rgba(255, 249, 238, .55) 26%, rgba(255, 249, 238, 0) 52%); }
.home .brand { position: relative; z-index: 1; width: 100%; padding-top: 22px; }
.home .brand h1 { font-size: clamp(48px, 9vw, 104px); letter-spacing: -.04em; line-height: .9; margin-top: 18px; }
.home .brand p { font-size: 18px; max-width: 44ch; color: var(--ink); }
.find { position: relative; max-width: 560px; margin-top: 22px; }
.find input {
  width: 100%; padding: 14px 18px; border: 0; border-radius: 999px; font-size: 17px;
  background: var(--card); box-shadow: 0 2px 4px rgba(48, 46, 46, .14), 0 8px 24px rgba(48, 46, 46, .14);
}
.find input::placeholder { color: var(--ink-2); }
#hits {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; list-style: none; margin: 0; padding: 6px;
  background: var(--card); border-radius: var(--r); box-shadow: 0 8px 28px rgba(48, 46, 46, .22); max-height: 60vh; overflow-y: auto;
}
#hits a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 700; }
#hits a:hover, #hits a:focus-visible { background: var(--paper-2); }
#hits small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); }
#hits .empty { padding: 8px 12px; color: var(--ink-2); }

/* 区域：游戏选区域界面的卡片，拍立得样式（同地图侧栏） */
.area-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px; }
.area-cards a {
  display: flex; flex-direction: column; height: 100%; padding: 8px 8px 12px; border-radius: 3px; background: var(--card);
  box-shadow: var(--lift); color: var(--ink); text-decoration: none; transition: transform .15s ease-out;
}
.area-cards li:nth-child(odd) a { transform: rotate(-1.2deg); }
.area-cards li:nth-child(even) a { transform: rotate(1deg); }
.area-cards a:hover, .area-cards a:focus-visible { transform: rotate(0) translateY(-3px); }
.area-cards img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 1px; margin-bottom: 10px; }
.area-cards b { font-size: 17px; font-weight: 900; line-height: 1.2; }
.area-cards small { font-size: 13px; color: var(--ink-2); }
.area-cards span { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

/* 指南：各文章页，图是它们的页头图 */
.guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.guides a { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: var(--r); box-shadow: var(--lift); overflow: hidden; color: var(--ink); text-decoration: none; }
.guides a:hover b { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.guides img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }
.guides b { padding: 12px 14px 0; font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.guides span { padding: 4px 14px 14px; font-size: 14px; color: var(--ink-2); }

/* 游戏简介：左边一段话和 Steam 按钮，右边基础信息 */
.about { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 4px 36px; align-items: start; }
.about .sec { grid-column: 1 / -1; }
.about p { margin: 0 0 14px; max-width: 64ch; font-size: 16px; }
.about .links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-weight: 700; }
.about .steam { padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; box-shadow: var(--lift); }
.about .steam:hover { background: var(--pine); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 16px 18px; background: var(--card); border-radius: var(--r); box-shadow: var(--lift); font-size: 15px; }
.specs dt { font-weight: 800; }
.specs dd { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .about { grid-template-columns: minmax(0, 1fr); } }

.facts { margin: 0; padding: 0 0 0 20px; max-width: 72ch; font-size: 16px; }
.facts li { margin-bottom: 10px; padding-left: 4px; }
.facts li::marker { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .area-cards a { transition: none; } }

/* 常见问题（scripts/build_seo.py 插入） */
.faq, .prose { max-width: 72ch; }
.faq h3 { margin: 20px 0 4px; font-size: 17px; font-weight: 800; }
.faq p, .prose p { margin: 0; }
.faq p + p, .prose p + p { margin-top: 8px; }
.doc main > p.note { margin-top: 40px; }
#panel .faq { padding: 0 20px; font-size: 14px; line-height: 1.5; }
#panel .faq h2 { margin: 0; font-size: 19px; font-weight: 900; }
#panel .faq h3 { margin: 14px 0 2px; font-size: 14px; }
#panel .faq p { color: var(--ink-2); }

/* 手机：站点导航固定在顶部，横向滑动；当前页由导航后面那行脚本滚到中间。放在文件末尾，盖过上面的 nav.site */
@media (max-width: 760px) {
  nav.site {
    position: fixed; z-index: 1100; top: 0; left: 0; right: 0; height: var(--bar); margin: 0; padding: 0 6px;
    flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    background: var(--paper); border-bottom: 1px solid var(--rule); visibility: visible;
  }
  nav.site::-webkit-scrollbar { display: none; }
  nav.site a { flex: none; padding: 0 11px; line-height: var(--bar); }
  nav.site a[aria-current="page"] { box-shadow: inset 0 -3px var(--gold); }
  nav.site a[hreflang] { position: sticky; right: -6px; background: var(--paper); border-left: 1px solid var(--rule); } /* 横滑时也一直在右边 */
  body.doc { padding-top: var(--bar); }
  html { scroll-padding-top: var(--bar); }
  .toc a { display: inline-block; padding: 5px 0; }
}
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.chips b { flex-basis: 100%; }
.chips .who { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; scroll-margin-top: 16px; }
.chips .who img { width: 32px; height: 32px; object-fit: contain; }
.chips .who:target { background: var(--gold-wash); box-shadow: 0 0 0 3px var(--gold); }
