/* 纳什洲玩家手册。版式是百科那一类：左边导航，中间一栏以文字为主的条目，
   信息框、目录、表格、页底导航框。配色沿用玩家中心平板的米白和藏青
   （modules/player-web-ui/dashboard.css 的 .player-mode）。 */
:root {
  --page: #f4f0e7;
  --surface: #fffdfa;
  --soft: #faf8f3;
  --bar: #f8f5ee;
  --head: #f1ede3;
  --line: #ded8cb;
  --line-soft: #eae4d9;
  --ink: #10264e;
  --text: #1f2c44;
  --muted: #627087;
  --navy: #173763;
  --link: #2a5fa8;
  --serif: "Linux Libertine", Georgia, "Times New Roman", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--page); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.7; }
button, input { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #285ca1; outline-offset: 2px; }
main:focus { outline: 0; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 6px 12px; background: var(--navy); color: #fffdfa; }
.skip-link:focus { top: 12px; }

/* 页头 */
.site-header { background: var(--bar); border-bottom: 1px solid var(--line); }
.header-inner, .layout { max-width: 1260px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 36px; height: 36px; image-rendering: pixelated; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: .02em; }
.brand small { font-size: 10px; letter-spacing: .28em; color: var(--muted); }
.search-box { display: flex; align-items: center; gap: 8px; flex: 0 1 340px; min-width: 0; height: 34px; margin-left: auto; padding: 0 10px; border: 1px solid #c9c2b3; border-radius: 2px; background: var(--surface); color: var(--muted); }
.search-box:focus-within { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.search-box svg { flex: none; width: 15px; height: 15px; }
.search-box input { flex: 1; width: 0; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: #7b8698; }
.menu-button { display: none; flex: none; width: 34px; height: 34px; padding: 8px; border: 0; border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; }
.menu-button:hover { background: var(--line-soft); }
.menu-button svg { display: block; width: 100%; height: 100%; }

/* 版式 */
.layout { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 20px; padding-bottom: 40px; }
.column { min-width: 0; }
.content { min-width: 0; padding: 20px 32px 32px; border: 1px solid var(--line); background: var(--surface); overflow-wrap: anywhere; }
.content::after { content: ""; display: block; clear: both; }

/* 左侧导航：一组组纯文字链接 */
.sidebar { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 4px 0 12px; font-size: 13.5px; line-height: 1.5; scrollbar-width: thin; scrollbar-color: #c2c6cb transparent; }
.sidebar h2 { margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 400; color: var(--muted); }
.sidebar h2:first-child { margin-top: 0; }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar a { display: block; padding: 3px 0; }
.sidebar a[aria-current] { color: var(--ink); font-weight: 700; }

/* 标题 */
.content h1, .content h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); overflow: hidden; }
.content h1 { margin: 0; padding-bottom: 4px; border-bottom: 1px solid #c9c2b3; font-size: 30px; line-height: 1.35; }
.tagline { margin: 4px 0 16px; font-size: 12.5px; color: var(--muted); }
.tagline a { color: inherit; }
.tagline span + span::before { content: "›"; margin: 0 6px; color: #a3abb8; }
.content h2 { margin: 28px 0 10px; padding-bottom: 3px; border-bottom: 1px solid var(--line); font-size: 23px; line-height: 1.4; }
.content h3 { margin: 20px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.content p { margin: 8px 0; }
.content p a, .content li a, .content td a, .content dd a { text-decoration: underline; text-decoration-color: #2a5fa855; text-underline-offset: 3px; }
.content p a:hover, .content li a:hover, .content td a:hover, .content dd a:hover { text-decoration-color: currentColor; }
.content strong { color: var(--ink); }
.content ul, .content ol { margin: 8px 0; padding-left: 26px; }
.content li { margin: 3px 0; }
.content li::marker { color: #8795a9; }
code { padding: 1px 5px; border: 1px solid var(--line-soft); border-radius: 2px; background: var(--soft); color: #253e62; font-family: ui-monospace, "Cascadia Mono", Consolas, "Noto Sans Mono CJK SC", monospace; font-size: .9em; }

/* 状态标记 */
.status { display: inline-block; padding: 0 7px; border-radius: 3px; background: #eef0f1; color: #576476; font-size: 12px; line-height: 20px; white-space: nowrap; }
.status.live { background: #e4eee7; color: #3f6850; }
.status.testing { background: #e0eafb; color: #2d5890; }
.status.dev { background: #f8e9c6; color: #835511; }

/* 提示框：条目顶部的状态说明、正文里的说明和注意 */
.mbox { margin: 12px 0; padding: 8px 14px; border: 1px solid var(--line); border-left: 8px solid #c9b98f; background: var(--soft); font-size: 14px; line-height: 1.65; overflow: hidden; }
.mbox b { margin-right: 8px; color: var(--ink); }
.mbox.live { border-left-color: #4f8a6a; }
.mbox.testing { border-left-color: #3b6fb5; }
.mbox.dev { border-left-color: #c08a2b; }
.mbox.planned { border-left-color: #9aa3b0; }
.mbox.warn { border-left-color: #a44940; background: #fff6f2; }

/* 信息框 */
.infobox { float: right; clear: right; width: 272px; margin: 0 0 16px 24px; border: 1px solid var(--line); border-collapse: collapse; background: var(--soft); font-size: 13px; line-height: 1.55; }
.infobox caption { padding: 7px 10px; background: var(--navy); color: #fffdfa; font-size: 15px; font-weight: 700; line-height: 1.4; }
.infobox th, .infobox td { padding: 6px 10px; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.infobox th { width: 82px; color: var(--ink); font-weight: 700; white-space: nowrap; }
.infobox .infobox-image { padding: 16px 10px 12px; text-align: center; background: var(--surface); }
.infobox .infobox-image img { display: block; width: 96px; height: 96px; margin: 0 auto; image-rendering: pixelated; }
.infobox .infobox-image span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 目录 */
.toc { display: table; margin: 16px 0; padding: 8px 18px 10px 14px; border: 1px solid var(--line); background: var(--soft); font-size: 13.5px; line-height: 1.6; }
.content .toc h2 { margin: 0 0 4px; padding: 0; border: 0; font-family: var(--sans); font-size: 13.5px; font-weight: 700; text-align: center; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { margin: 1px 0; counter-increment: toc; }
.toc li::before { content: counter(toc); display: inline-block; min-width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
.content .toc a { text-decoration: none; }
.content .toc a:hover { text-decoration: underline; }

/* 表格 */
.table-wrap { margin: 12px 0; overflow-x: auto; }
.wikitable { border-collapse: collapse; border: 1px solid #c9c2b3; background: var(--surface); font-size: 14px; line-height: 1.6; }
.wikitable th, .wikitable td { padding: 6px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.wikitable th { background: var(--head); color: var(--ink); font-weight: 700; }
.wikitable thead th { white-space: nowrap; }
.wikitable td { font-variant-numeric: tabular-nums; }
.wikitable.wide { width: 100%; }
.wikitable .col-title { width: 22%; min-width: 132px; font-weight: 700; }
.wikitable .col-status { width: 1%; white-space: nowrap; }
.wikitable .col-here { background: #f6f8fb; }

/* 导航框：一个栏目的全部条目按分组排开 */
.navbox { width: 100%; border-collapse: collapse; border: 1px solid #c9c2b3; background: var(--surface); font-size: 13.5px; line-height: 1.7; }
.navbox caption { padding: 4px 10px; border: 1px solid #c9c2b3; border-bottom: 0; background: var(--navy); color: #fffdfa; font-weight: 700; text-align: center; }
.navbox caption a { color: inherit; }
.navbox th, .navbox td { padding: 5px 11px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.navbox tr:first-child th, .navbox tr:first-child td { border-top: 0; }
.navbox th { width: 1%; background: var(--head); color: var(--ink); font-weight: 700; white-space: nowrap; text-align: right; }
.navbox .sep { margin: 0 2px; color: #a3abb8; }
.navbox .here { color: var(--ink); font-weight: 700; }
.content .navbox a { text-decoration: none; }
.content .navbox a:hover { text-decoration: underline; }
.content > .table-wrap:last-child { margin-top: 32px; margin-bottom: 0; }

/* 搜索结果 */
.content .results { margin: 16px 0 0; padding: 0; list-style: none; }
.results li { margin: 0 0 16px; }
.results a { font-size: 17px; }
.content .results a { text-decoration: none; }
.content .results a:hover { text-decoration: underline; }
.results p { margin: 1px 0 0; }
.results small { font-size: 12.5px; color: var(--muted); }

.site-footer { padding: 14px 2px 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.site-footer p { margin: 0; }

/* 窄屏：导航收进页头的按钮里，信息框不再靠右浮动 */
@media (max-width: 820px) {
  .header-inner, .layout { padding-left: 12px; padding-right: 12px; }
  .header-inner { gap: 10px; height: 52px; }
  .menu-button { display: block; }
  .brand img { width: 30px; height: 30px; }
  .brand strong { font-size: 17px; }
  .brand small { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; padding-bottom: 28px; }
  .sidebar { display: none; position: static; max-height: none; padding: 12px 16px; border: 1px solid var(--line); background: var(--surface); }
  .nav-open .sidebar { display: block; }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .sidebar a { padding: 5px 0; }
  .content { padding: 14px 16px 22px; }
  .content h1 { font-size: 26px; }
  .content h2 { font-size: 21px; }
  .infobox { float: none; width: 100%; margin: 0 0 14px; }
  .wikitable.wide { min-width: 520px; }
  .navbox th { white-space: normal; min-width: 5.5em; }
}
@media (max-width: 460px) {
  .brand strong { font-size: 15px; }
  .search-box { flex-basis: 150px; }
}
@media print {
  body { background: #fff; }
  .site-header, .sidebar, .skip-link { display: none; }
  .layout { display: block; padding: 0; }
  .content { border: 0; padding: 0; }
}
