/* 主题、可访问性和响应式框架。Tailwind 负责通用工具类。 */
:root {
  color-scheme: dark;
  --page: #111714;
  --panel: #171f1b;
  --panel-hover: #202b24;
  --line: #2b3730;
  --ink: #f0eee5;
  --muted: #a5b0a5;
  --subtle: #8f9e91;
  --gold: #e4b56f;
  --top-height: 65px;
  --font: 'Microsoft YaHei UI', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
  --serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

html { scroll-padding-top: calc(var(--top-height) + 20px); }
body { margin: 0; min-width: 0; background: var(--page); color: var(--ink); font: 400 1rem/1.65 var(--font); }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; flex-shrink: 0; }
.skip { position: fixed; z-index: 20; top: 5px; left: 12px; transform: translateY(-160%); background: var(--gold); color: #1e170b; padding: .5rem 1rem; }
.skip:focus { transform: none; }

/* 桌面为导航、正文、目录三栏，小屏把导航折叠到顶栏。 */
.topbar { position: sticky; z-index: 5; top: 0; height: var(--top-height); background: #131b17; border-bottom: 1px solid var(--line); }
.top-inner { height: 100%; max-width: 1536px; padding: 0 16px; gap: 9px; margin: auto; }
.brand { gap: 9px; margin-right: auto; min-width: 0; line-height: 1.25; letter-spacing: .06em; }
.brand > span:last-child { min-width: 0; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.03rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: var(--subtle); font-size: .75rem; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 39px; height: 39px; border-radius: 8px; color: var(--gold); background: #30291c; border: 1px solid #493a21; }
.brand-mark svg { width: 23px; height: 23px; }
.search-open, .mobile-nav > summary { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 9px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; min-height: 44px; min-width: 44px; padding: 0 11px; font-size: .875rem; }
.search-open:hover, .mobile-nav > summary:hover { color: var(--ink); background: var(--panel-hover); }
.search-open svg, .mobile-nav svg { width: 17px; height: 17px; }
.search-open kbd { display: none; }
.mobile-nav > summary { list-style: none; }
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav nav { position: absolute; top: calc(var(--top-height) - 4px); right: 12px; width: min(240px, 90vw); max-height: calc(100dvh - var(--top-height) - 8px); overflow: auto; padding: 8px; box-shadow: 0 16px 40px #0007; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; }
.mobile-nav a, .side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 11px; color: var(--muted); font-size: .9rem; border-radius: 6px; }
.mobile-nav a:hover, .side-nav a:hover { color: var(--ink); background: var(--panel-hover); }
.mobile-nav a[aria-current], .side-nav a[aria-current] { background: #29271c; color: #efbf76; }
.layout { max-width: 1536px; display: grid; }
main { min-width: 0; padding: 0 15px; }
.sidebar, .rightbar { display: none; }
.breadcrumb { color: var(--subtle); display: flex; align-items: center; gap: 7px; font-size: .8rem; min-height: 39px; }
.breadcrumb svg { width: 12px; height: 12px; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb > span:last-child { color: var(--muted); }

/* 首屏入口与原创插画。 */
.hero { display: flex; align-items: center; min-height: 119px; border: 1px solid #344238; border-radius: 10px; overflow: hidden; scroll-margin-top: 2rem;
  background: linear-gradient(90deg, #0b1815ef, #0b181535), url('camp.webp') 65% 63% / cover no-repeat, #142923; }
.hero-copy { padding: 17px 18px; }
.hero h1 { font: 800 clamp(1.9rem, 5.8vw, 3.65rem)/1.2 var(--serif); color: #f7f2e4; letter-spacing: .025em; margin: 0 0 6px; }
.hero-copy > p { color: #e0e5da; font-size: .92rem; }
.home-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 59px; margin-top: 12px; padding: 9px 12px; text-align: start; color: var(--ink); background: #202c24; border: 1px solid #5a704f; border-radius: 8px; }
.home-search:hover { background: #29372c; border-color: #829579; }
.home-search svg { width: 19px; height: 19px; color: var(--gold); }
.home-search strong, .home-search small, .home-lead strong, .home-lead small { display: block; }
.home-search strong, .home-lead strong { line-height: 1.3; }
.home-search small, .home-lead small { margin-top: 3px; color: var(--muted); font-size: .805rem; line-height: 1.4; }
.home-leads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.home-lead { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-height: 64px; padding: 9px 10px; border: 1px solid #554a35; border-radius: 8px; }
.home-lead svg { width: 18px; height: 18px; }
.home-route { color: #2e2518; background: #e5b66e; border-color: #e5b66e; }
.home-route small { color: #513519; }
.home-route:hover { background: #f2cb8e; }
.home-today { color: var(--gold); background: #24251c; }
.home-today:hover { background: #333023; border-color: #897047; }
.home-help-links { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 14px; margin-top: 4px; }
.home-help-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.home-help-links a:hover { color: var(--gold); }
.home-section { margin-top: 27px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; font-size: 1.34rem; font-weight: 750; letter-spacing: .025em; line-height: 1.3; }
.section-head svg { width: 19px; height: 19px; color: var(--gold); }
.section-head a { color: var(--gold); font-size: .875rem; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.starter-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.starter-help-grid a { display: flex; align-items: center; gap: 8px; min-height: 45px; padding: 6px 10px; border: 1px solid #3b4b40; border-radius: 6px; background: #1b241e; color: var(--ink); font-size: .92rem; font-weight: 650; }
.starter-help-grid a:hover { background: #24332a; border-color: #8b744c; }
.starter-help-grid svg { width: 16px; height: 16px; color: var(--gold); }
.quick-grid, .featured-grid, .entry-grid { gap: 9px; }
.quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.quick-card:hover, .featured-card:hover { border-color: #95815d; background-color: var(--panel-hover); }
.quick-card strong, .quick-card small { display: block; }
.quick-card strong { font-size: .92rem; font-weight: 700; line-height: 1.35; }
.quick-card small { color: var(--muted); font-size: .825rem; margin-top: 3px; line-height: 1.4; }
.tile-icon { width: 35px; height: 35px; border-radius: 7px; background: var(--tint); color: var(--accent); display: grid; place-items: center; }
.quick-card .tile-icon { width: 29px; height: 29px; }
.quick-card .tile-icon svg { width: 17px; height: 17px; }
.sage { --accent: #a8ca9e; --tint: #263b2c; }
.amber { --accent: #ebbd74; --tint: #3d3322; }
.rust { --accent: #e4a693; --tint: #3c2925; }
.blue { --accent: #9dc4d0; --tint: #24363c; }
.featured-card { position: relative; display: flex; align-items: flex-end; isolation: isolate; min-height: 190px; border-radius: 8px; border: 1px solid #334139; background: var(--panel); overflow: hidden; }
.featured-card::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #0a100ef5, #0b100e70 50%, #0b100e00 88%); }
.featured-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; }
.featured-copy { padding: 12px 14px; }
.featured-copy > span { color: var(--accent); font-size: .77rem; font-weight: 750; }
.featured-copy h3 { font-size: 1.23rem; font-weight: 750; }
.featured-copy p { color: #d6ded3; font-size: .84rem; margin-top: 2px; }

/* 攻略正文、筛选与引用。 */
.guide-section { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-lead { color: var(--muted); margin: 0 0 16px; }
.stack { display: grid; gap: 12px; }
.article { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: #d8dfd4; }
.article:target, .steps li:target, .ability-list > div:target, .cave-resources:target { outline: 1px solid #b78e55; outline-offset: 2px; }
.article h3 { color: var(--ink); font-size: 1.15rem; line-height: 1.35; font-weight: 750; }
.article-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.alias { color: var(--subtle); font-size: .85rem; margin-top: 4px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 4px; align-self: start; flex-shrink: 0; color: var(--accent); background: var(--tint); font-size: .76rem; font-weight: 700; }
.fact-status { display: inline-block; margin: 2px 0; padding: 2px 6px; border-radius: 4px; background: #3a3020; color: #ebc48d; font-size: .76rem; font-weight: 650; line-height: 1.4; vertical-align: baseline; }
.fact-official { background: #263b2c; color: #afd4a5; }
.ability-list { margin: 13px 0; display: grid; gap: 8px; }
.ability-list > div { padding: 8px 10px; background: #121a16; border-radius: 5px; }
.ability-list dt, .entry-facts dt, .opening strong { color: var(--ink); font-weight: 700; }
.ability-list dd, .entry-facts dd { color: var(--muted); }
.opening { padding: 9px 0 9px 11px; border-left: 1px solid #876837; }
.guide-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font-size: .875rem; }
.guide-links a, .provenance a, .source-list a { color: #e4b56f; text-decoration: underline; text-underline-offset: 3px; }
.guide-links a:hover, .provenance a:hover, .source-list a:hover { color: #f3c683; }
.provenance { margin-top: 6px; font-size: .875rem; color: var(--muted); }
.provenance summary { width: fit-content; padding: 5px 0; }
.provenance summary:hover { color: var(--ink); }
.provenance ul { display: grid; gap: 5px; border-left: 1px solid var(--line); margin: 3px 0 6px; padding-left: 12px; }
.section-lead + .provenance { margin-top: -10px; margin-bottom: 12px; }
.entry-facts { display: grid; gap: 6px; margin: 6px 0; }
.entry-facts > div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 4px; }
.entry > p { color: var(--muted); }
.boss-group { margin-top: 20px; }
.boss-group > h3, .boss-group .article-head h4 { color: var(--ink); font-weight: 750; }
.boss-group > h3 { margin-bottom: 8px; font-size: 1.125rem; }
.article.boss-card { padding: 0; }
.boss-card > details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 10px 14px; list-style: none; }
.boss-card > details > summary::-webkit-details-marker { display: none; }
.boss-card > details > summary:hover { background: var(--panel-hover); }
.boss-card summary h4 { color: var(--ink); font-weight: 750; }
.boss-card summary small { display: block; color: var(--muted); font-size: .875rem; font-weight: 500; }
.boss-card summary > span { flex-shrink: 0; color: var(--gold); }
.boss-card [open] > summary > span { transform: rotate(90deg); }
.boss-body { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.boss-quick { margin: 0 0 12px; padding: 9px 11px; border: 1px solid #594b32; border-radius: 6px; background: #28281e; }
.boss-quick dt { color: var(--gold); }
.boss-card--guide > details > summary { justify-content: flex-start; gap: 12px; padding-block: 12px; }
.boss-card--guide summary h4 { font-size: 1.16rem; }
.boss-card--guide summary > span { margin-left: auto; }
.boss-card--guide summary > .boss-portrait { width: 44px; flex-shrink: 0; }
.boss-card--guide .boss-quick { padding: 0 11px; gap: 0; background: #262a1f; border-color: #514a34; }
.boss-card--guide .boss-quick > div { padding-block: 9px; }
.boss-card--guide .boss-quick > div + div { border-top: 1px solid #4a4533; }
.boss-block-title { margin: 16px 0 5px; font-size: 1rem; color: var(--ink); font-weight: 750; }
.boss-card--guide .boss-overview { padding-top: 5px; border-top: 1px solid var(--line); }
.boss-overview { display: flex; align-items: start; flex-wrap: wrap; gap: 10px; margin-bottom: 9px; }
.boss-overview > dl { flex: 1 1 13em; min-width: 0; }
.boss-portrait { width: 76px; height: auto; border-radius: 5px; }
.filters { gap: 7px; }
.filters button { border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; min-height: 44px; color: var(--muted); background: var(--panel); font-size: .9rem; }
.filters button:hover { border-color: #96815d; }
.filters button[aria-pressed='true'] { background: #392e1c; color: #f2c683; border-color: #765a34; }
.result-count { margin: 10px 0; color: var(--subtle); font-size: .85rem; }
.cave { margin-top: 12px; }
.cave > h3 { margin-bottom: 13px; }
.cave > h4 { color: var(--ink); font-size: 1rem; font-weight: 750; margin-bottom: 7px; }
.cave-route { margin: 0 0 13px; padding: 9px 11px; border-left: 2px solid #725b39; background: #28281e; color: var(--muted); }
.cave-route strong, .cave-pack strong { color: var(--ink); }
.cave-pack { list-style: disc; padding-left: 1.25em; margin: 0 0 13px; color: var(--muted); }
.cave-pack li + li { margin-top: 4px; }
.cave > .steps { margin-bottom: 13px; }
.homestead { margin-top: 12px; }
.homestead > p, .homestead-section > p, .detail-list dd p, .help-guide > p { color: var(--muted); }
.homestead > p { margin-top: 5px; }
.home-star-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-block: 12px 18px; }
.home-star-picker a { display: grid; place-items: center; min-height: 44px; padding: 3px 2px; border: 1px solid #415045; border-radius: 5px; color: var(--ink); font-size: .875rem; font-variant-numeric: tabular-nums; }
.home-star-picker a:hover { border-color: var(--gold); }
.home-star-picker a[aria-current] { background: var(--gold); border-color: var(--gold); color: #2e2417; font-weight: 750; }
.home-layout-levels { margin-block-end: 22px; }
.home-level + .home-level { margin-top: 20px; }
.home-level > h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; color: var(--ink); font-size: 1.15rem; font-weight: 750; }
.home-level > h4 span { color: var(--gold); }
.home-plan { margin: 0 0 9px; border-radius: 10px; overflow: hidden; background: #e0cfaa; color: #352d20; }
.home-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px 14px;
  background-image: linear-gradient(#6d593016 1px, transparent 1px), linear-gradient(90deg, #6d593016 1px, transparent 1px); background-size: 16px 16px; }
.home-plan-plot { --plot-fill: #c7cab0; --plot-edge: #8a9475; display: grid; align-content: start; min-height: 88px; padding: 8px; border: 1px solid var(--plot-edge); border-radius: 5px; color: #302a1e; background: var(--plot-fill); }
.home-plan-plot[href="#layout-kitchen"] { --plot-fill: #dcb69b; --plot-edge: #aa795e; }
.home-plan-plot[href="#layout-workshop"] { --plot-fill: #c6c6b6; --plot-edge: #7e8476; }
.home-plan-plot[href="#layout-spare"] { --plot-fill: #e4d7b8; --plot-edge: #a59874; }
.home-plan-plot[data-changed] { border-style: double; border-width: 3px; border-color: #84531d; padding: 6px; }
.home-plan-plot:hover, .home-plan-plot:focus-visible { outline: 2px solid #503b24; outline-offset: 2px; }
.home-plan-grid svg { width: 18px; height: 18px; }
.home-plan-plot > span { display: block; margin-bottom: 3px; }
.home-plan-plot strong { font-size: .94rem; line-height: 1.35; }
.home-plan-plot small { margin-top: 4px; color: #483e2c; font-size: .8rem; line-height: 1.45; }
.home-plan-gate, .home-plan-aisle { display: flex; align-items: center; justify-content: center; gap: 6px; grid-column: 1 / -1; font-size: .825rem; font-weight: 700; }
.home-plan-aisle { padding: 2px 0; border-block: 1px dashed #927d57; background: #f1e4c8; }
.home-plan figcaption { padding: 6px 14px; background: #cbb78d; color: #3e331f; font-size: .8rem; }
.home-level-note { color: var(--muted); }
@media (min-width: 660px) { .home-star-picker { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
#home-layout .detail-list > div:target { outline: 1px solid var(--gold); outline-offset: 2px; }
.decor-map-key { margin-block: 12px 4px; font-size: .9rem; }
.decor-style { padding-block: 14px 18px; border-top: 1px solid var(--line); }
.decor-style > h4, .decor-finish { font-size: 1.13rem; font-weight: 750; }
.decor-style > p { margin: 2px 0 9px; color: var(--muted); }
.decor-layout { display: grid; gap: 12px; align-items: start; }
.decor-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 8px; border: 1px solid #a58e60; border-radius: 8px; background: #decca6; color: #352d20; }
.decor-plot, .decor-gate { display: grid; place-items: center; min-height: 38px; padding: 3px 2px; border: 1px solid #ad9470; border-radius: 3px; text-align: center; font-size: .78rem; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.decor-plot[data-tone="green"] { background: #bdc9a1; border-color: #849168; }
.decor-plot[data-tone="field"] { background: #cbc286; border-color: #978853; }
.decor-plot[data-tone="work"] { background: #d1ba9e; }
.decor-plot[data-tone="accent"] { background: #e1b18e; border-color: #b7835f; }
.decor-plot[data-tone="water"] { background: #b4cbd0; border-color: #829b9f; }
.decor-plot[data-tone="path"] { min-width: 0; background: #f3e9ce; border-color: transparent; }
.decor-gate { grid-column: 2 / 5; display: flex; justify-content: center; gap: 5px; min-height: 30px; background: #f3e9ce; color: #604920; }
.decor-gate svg { width: 16px; height: 16px; flex: none; }
.decor-directions { display: grid; gap: 6px; margin: 0; padding-inline-start: 1.45em; list-style: decimal; }
.decor-directions li::marker { color: var(--gold); font-weight: 700; }
.decor-finish { margin-top: 8px; }
@media (min-width: 750px) { .decor-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; } }
.homestead-section { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.homestead-section > h4 { font-weight: 750; }
.homestead-section > p { margin-top: 4px; }
.detail-list { margin-top: 7px; }
.detail-list > div { display: grid; grid-template-columns: minmax(0, 6em) minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--gold); font-size: .9rem; font-weight: 700; }
.detail-list dt a { text-decoration: underline; text-underline-offset: .16em; }
.detail-list dd { min-width: 0; overflow-wrap: anywhere; }
.detail-list dd strong { font-weight: 650; }
.detail-list dd p { font-size: .88rem; }
.help-guide { margin-top: 12px; }
.help-guide > h4 { color: var(--ink); font-weight: 750; margin: 12px 0 5px; }
.help-guide > h3 + p { margin-top: 5px; }
.help-guide > .steps, .help-guide > .duo-figures { margin-top: 9px; }
.team-joining, #revive { margin-bottom: 15px; }
#revive > h5 { margin-top: 16px; color: var(--ink); font-weight: 750; }
#revive > .duo-figures { max-width: 640px; }
.steps.join-steps { list-style: decimal; padding: 8px 12px 8px 35px; border: 1px solid var(--line); border-radius: 7px; background: #20281f; }
.join-steps li { padding-left: 0; border-left: 0; }
.join-steps li::marker { color: var(--gold); font-weight: 750; }
.chapter-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 17px; }
.chapter-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 7px 11px; border-radius: 6px; border: 1px solid #725b39; background: #29251b; color: var(--gold); font-weight: 650; }
.chapter-links a:hover { background: #3b3021; }
.chapter-links svg { width: 16px; height: 16px; }
.article-toc { padding: 9px 10px; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 7px; background: #1b241e; }
.article-toc > p { margin-bottom: 6px; color: var(--muted); font-size: .875rem; font-weight: 700; }
.article-toc > .chapter-links { margin-bottom: 0; gap: 6px; }
.article-toc > .chapter-links + .chapter-links { margin-top: 6px; }
.article-toc .chapter-links a { font-size: .875rem; }
.recipe-group { margin: 14px 0 18px; }
.recipe-group h4 { font-size: 1rem; font-weight: 750; }
.recipe-row { border-bottom: 1px solid var(--line); padding: 4px 0 10px; }
.recipe-title { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding-right: 10px; color: var(--gold); font-weight: 700; }
.recipe-title:hover { text-decoration: underline; }
.recipe-title svg { width: 14px; height: 14px; }
.recipe-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; list-style: none; }
.recipe-slots li { display: grid; place-items: center; min-height: 42px; padding: 5px 3px; border: 1px solid #39483d; border-radius: 5px; background: #202b23; color: var(--ink); font-size: .875rem; font-weight: 650; text-align: center; overflow-wrap: anywhere; }
.recipe-note { margin-top: 7px; color: var(--muted); font-size: .9rem; }
.recipe-source { color: var(--muted); font-size: .82rem; }
.recipe-source summary { width: fit-content; padding: 10px 4px 10px 0; min-height: 44px; line-height: 24px; }
.recipe-source a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.home-star-groups section + section { margin-top: 16px; }
.home-star-groups h5 { font-weight: 750; }
.home-star-groups .detail-list > div { grid-template-columns: 4.65em minmax(0, 1fr); }
.home-star-groups .detail-list > div:target { background: #30291c; }
.star-material-details summary { min-height: 44px; width: fit-content; padding: 10px 6px 10px 0; line-height: 24px; color: var(--gold); font-size: .9rem; }
.star-material-route { margin-bottom: 8px; }
.star-material-list { display: grid; gap: 6px; }
.star-material-list > div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #20251f; }
.star-material-list > div:target { border-color: var(--gold); }
.star-material-list dd { margin-top: 3px; }
.star-material-list dd p + p { margin-top: 4px; }
.star-material-list b { color: var(--ink); }
.star-material-details .guide-links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 540px) {
  .home-star-groups .detail-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.field-guide > p { margin-top: 5px; color: var(--muted); }
.field-guide > .steps { margin-top: 10px; }
.field-guide .guide-links a { display: inline-flex; align-items: center; min-height: 44px; }
.popular-guide { margin-top: 12px; }
#launch-checklist { margin-bottom: 12px; }
.popular-guide > .duo-figures { max-width: 610px; margin-top: 12px; }
.steps.popular-steps { list-style: decimal; padding-inline-start: 1.55em; }
.popular-steps > li { border-left: 0; padding: 3px 0 0 3px; }
.popular-steps > li::marker { color: var(--gold); font-weight: 750; }
.popular-steps .guide-links { margin-top: 0; }
.popular-links { margin-bottom: 0; }
.popular-links a { padding-inline: 9px; font-size: .875rem; }
.faq-entry { display: inline-flex; align-items: center; min-height: 44px; }
.player-faq { margin-top: 22px; }
.player-faq > h3 { font-size: 1.2rem; font-weight: 750; }
.player-faq > p { margin-top: 5px; color: var(--muted); }
.question-group + .question-group { margin-top: 16px; }
.question-group h4 { margin-bottom: 7px; font-weight: 750; }
.question-group-note { margin-bottom: 10px; color: var(--muted); font-size: .9rem; }
.question-answer { padding: 0; }
.question-answer summary { min-height: 44px; padding: 9px 14px; color: var(--gold); }
.question-answer summary:hover { background: var(--panel-hover); }
.question-answer summary:focus-visible { outline-offset: -3px; }
.question-answer h5 { display: inline; margin-left: 3px; color: var(--ink); font-weight: 700; }
.question-body { padding: 8px 14px 13px; border-top: 1px solid var(--line); color: var(--muted); }
.question-body .guide-links a, .activity-calendar .guide-links a { display: inline-flex; align-items: center; min-height: 44px; }
.question-answer:target { border-color: var(--gold); }
.activity-calendar > p, .activity-entry > p { color: var(--muted); }
.activity-group { margin-top: 13px; }
.activity-group h4 { margin-bottom: 5px; color: var(--gold); font-weight: 750; }
.activity-entry { padding: 9px 0; border-top: 1px solid var(--line); }
.activity-entry h5 { color: var(--ink); font-weight: 750; }
.activity-channel { color: var(--muted); margin-inline-start: 5px; font-size: .8rem; font-weight: 500; }
.activity-entry > .activity-date { margin: 2px 0 4px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.activity-entry:target h5 { color: var(--gold); }
.official-guides { margin-block: 16px 22px; }
.official-guides > h3 { color: var(--ink); font-size: 1.15rem; font-weight: 750; }
.official-guides > p { color: var(--muted); }
@media (max-width: 579px) {
  .player-faq .article-toc .chapter-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.roadmap-next { margin: 12px 0 0; }
.entry-subhead, .cave-resources h4 { color: var(--ink); font-weight: 750; margin-bottom: 7px; }
.cave-resources { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.steps { display: grid; gap: 10px; list-style: none; }
.steps li { padding: 5px 0 5px 12px; border-left: 1px solid #745c39; }
.steps li strong { color: var(--gold); }
.steps li p, .pitfall p { color: var(--muted); margin-top: 3px; }
.route-panel { padding: 15px; }
.field-route { position: relative; gap: 0; }
.field-route::before { content: ''; position: absolute; top: .65em; bottom: 1.05em; left: 5px; width: 1px; background: #735a37; }
.field-route li { position: relative; margin-left: 0; padding: 0 0 16px 20px; border-left: 0; }
.field-route li:last-child { padding-bottom: 0; }
.field-route li::before { content: ''; position: absolute; top: .6em; left: 2px; width: 7px; height: 7px; border: 1px solid var(--gold); border-radius: 50%; background: var(--panel); }
.field-route li:first-child::before { background: var(--gold); }
.field-route h3 { color: var(--gold); font-size: 1.05rem; }
.route-panel > .provenance { margin: 13px 0 0 20px; }
.roadmap-jumps a { font-size: .9rem; }
.team-play { margin-bottom: 15px; }
.team-lineups { display: grid; gap: 10px; margin: 11px 0 15px; }
.team-lineups > div { padding-left: 11px; border-left: 2px solid #725b39; }
.team-lineups dt { color: var(--gold); font-weight: 700; }
.team-lineups dd, .team-checks p { color: var(--muted); }
.team-checks { display: grid; gap: 8px; margin-top: 12px; }
.team-checks strong { color: var(--ink); }
.duo-intro { margin-bottom: 15px; }
.duo-intro > h3 { font-size: 1.12rem; font-weight: 750; }
.duo-intro > p { color: var(--muted); margin: 4px 0 10px; }
.duo-roles-grid { display: grid; gap: 9px; }
.duo-role { display: grid; grid-template-columns: 55px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.duo-role img { width: 55px; height: 66px; object-fit: cover; object-position: 50% 30%; border-radius: 6px; }
.duo-role h4 { font-weight: 700; color: var(--ink); line-height: 1.4; }
.duo-role a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.duo-role p { color: var(--muted); margin-top: 2px; font-size: .9rem; }
@media (max-width: 579px) {
  .roadmap-jumps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .roadmap-jumps a { justify-content: center; text-align: center; padding-inline: 3px; }
}
@media (min-width: 375px) and (max-width: 579px) {
  .roadmap-jumps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.roadmap-list { display: grid; gap: 12px; }
.roadmap-stage { padding: 15px; }
.roadmap-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.roadmap-number { display: grid; place-items: center; flex: 0 0 32px; min-height: 32px; border-radius: 7px; background: #372c1f; color: var(--gold); font-weight: 750; font-variant-numeric: tabular-nums; }
.roadmap-facts { display: grid; gap: 10px; }
.roadmap-facts dt { color: var(--ink); font-weight: 700; }
.roadmap-facts dd { color: var(--muted); }
.roadmap-facts dd ul { list-style: disc; padding-left: 1.15em; }
.roadmap-facts dd li + li { margin-top: 4px; }
.roadmap-done { padding-top: 9px; border-top: 1px solid var(--line); }
.roadmap-done dt { color: #afd4a5; }
.roadmap-branches { display: grid; gap: 8px 16px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.roadmap-branches a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.roadmap-branches p { color: var(--muted); }
.roadmap-stage > .guide-links { margin-top: 11px; }
.duo-details { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; }
.duo-details h4, .roadmap-table caption { color: var(--ink); font-size: 1rem; font-weight: 750; }
.duo-figures { display: grid; gap: 14px; max-width: 660px; margin-bottom: 13px; }
.duo-figure { min-width: 0; margin: 0; }
.duo-figure img { display: block; width: 100%; height: auto; border-radius: 7px; border: 1px solid var(--line); background: #263527; }
.duo-figure figcaption { color: var(--muted); font-size: .83rem; line-height: 1.55; margin-top: 5px; }
.duo-figure-credit { display: block; width: fit-content; color: var(--gold); font-size: .78rem; margin-top: 3px; text-decoration: underline; text-underline-offset: .16em; }
.duo-actions { display: grid; gap: 8px; list-style: decimal; padding-left: 1.25em; margin: 5px 0 12px; }
.duo-actions li::marker { color: var(--gold); font-weight: 750; }
.duo-actions strong { color: var(--ink); }
.duo-actions p, .duo-note { color: var(--muted); }
.roadmap-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .88rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.roadmap-table caption { text-align: left; margin-bottom: 5px; }
.roadmap-table thead { color: #e4c292; background: #28281e; }
.roadmap-table th, .roadmap-table td { padding: 7px; vertical-align: top; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.roadmap-table th:first-child { width: 24%; }
.roadmap-table th:nth-child(2) { width: 31%; }
.roadmap-table tbody th { color: var(--ink); font-weight: 650; }
.roadmap-table td { color: var(--muted); }
.team-supplies th:first-child { width: 40%; }
.team-supplies th:nth-child(2) { width: 20%; }
.team-supplies th:not(:first-child), .team-supplies td { text-align: center; }
.season-brief { display: grid; gap: 7px 12px; margin-top: 10px; }
.season-brief li { border-top: 1px solid var(--line); padding-top: 6px; }
.season-brief strong { color: #afd4a5; }
.season-brief p { color: var(--muted); }
.duo-note { margin-top: 6px; }
.pitfall { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.pitfall:last-child { border: 0; }
.pitfall summary { font-weight: 650; padding: 4px 0; }
.pitfall p { padding-left: 16px; }
.source-groups { display: grid; gap: 8px; }
.source-group { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.source-group summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 12px; list-style: none; }
.source-group summary::-webkit-details-marker { display: none; }
.source-group summary:hover { background: var(--panel-hover); }
.source-group summary small { margin-left: auto; color: var(--muted); }
.source-group summary svg { width: 16px; height: 16px; color: var(--gold); }
.source-group[open] summary svg { transform: rotate(90deg); }
.source-list { display: grid; gap: 3px; padding: 6px 9px 9px; border-top: 1px solid var(--line); }
.source-list li { position: relative; border-radius: 5px; padding: 6px 8px; overflow-wrap: anywhere; }
.source-list li:target, .source-list li:has(.source-alias:target) { background: #362c1e; }
.source-alias { position: absolute; inset-block-start: 0; inset-inline-start: 0; }
@media (pointer: coarse) { .source-list a { display: inline-flex; align-items: center; min-height: 44px; } }
.main-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 26px; border-top: 1px solid var(--line); padding: 17px 0 28px; color: var(--subtle); font-size: .875rem; }
.main-footer a { color: var(--gold); }

/* 原生 dialog 提供焦点限制和 Esc 关闭。 */
html.search-dialog-open, html.search-dialog-open body { overflow: hidden; overscroll-behavior: none; }
dialog { width: min(560px, calc(100% - 26px)); max-height: min(80vh, calc(100dvh - 16px)); margin: clamp(8px, 10vh, 78px) auto auto; padding: 0; color: var(--ink); background: var(--panel); border: 1px solid #4b5a4d; border-radius: 10px; box-shadow: 0 25px 95px #000a; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #050a08b9; }
.search-header { display: flex; flex-shrink: 0; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--gold); }
.search-header input { color: var(--ink); background: #121a16; padding: 8px; width: 100%; min-width: 0; border-radius: 4px; }
.search-header button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 5px; color: var(--muted); }
.search-header button:hover { background: var(--panel-hover); }
.search-status { flex-shrink: 0; color: var(--muted); padding: 6px 12px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.search-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; scrollbar-color: #647265 var(--panel); }
.search-results { padding: 6px; }
.search-results:empty { padding: 0; }
.search-results a { display: flex; justify-content: space-between; align-items: center; gap: 9px; min-height: 44px; padding: 8px 10px; border-radius: 5px; }
.search-results a:hover, .search-results a:focus-visible { background: var(--panel-hover); color: var(--gold); outline-offset: -2px; }
.search-results small { color: var(--muted); }
.search-result-copy { display: grid; gap: 2px; min-width: 0; }
.search-result-title { font-weight: 650; }
.search-result-snippet { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: .82rem; }
.search-results small { white-space: nowrap; }
.search-more { display: block; width: calc(100% - 16px); min-height: 44px; margin: 0 8px 8px; color: var(--gold); background: #29251b; border: 1px solid #725b39; border-radius: 6px; }
.search-more:hover { background: #3b3021; }

@media (min-width: 580px) {
  .duo-figures-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 0 21px; }
  .featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo-roles-grid, .season-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roadmap-facts > div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 8px; }
  .roadmap-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .starter-help-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-lead { padding-inline: 14px; }
  .hero-copy { padding-left: 31px; }
}

@media (min-width: 830px) {
  .top-inner { padding: 0 25px; gap: 18px; }
  .breadcrumb { min-height: 49px; }
  .mobile-nav { display: none; }
  .search-open { min-width: 169px; justify-content: start; }
  .search-open kbd { display: inline; margin-left: auto; padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--subtle); font: .72rem var(--font); }
  .layout { grid-template-columns: 182px minmax(0, 1fr); }
  .sidebar { display: block; position: sticky; align-self: start; top: var(--top-height); padding: 24px 13px; height: calc(100vh - var(--top-height)); border-right: 1px solid var(--line); overflow-y: auto; }
  .sidebar .small-label { padding-left: 10px; }
  .small-label { font-size: .82rem; color: var(--subtle); font-weight: 650; letter-spacing: .08em; margin-bottom: 11px; }
  .side-nav { display: grid; gap: 3px; }
  .side-nav svg { width: 17px; height: 17px; }
  .sidebar-foot { margin: 22px 2px 0; padding: 14px 7px; border-top: 1px solid var(--line); display: flex; gap: 7px; color: var(--subtle); }
  .sidebar-foot svg { width: 15px; height: 15px; margin-top: 3px; }
  .sidebar-foot strong, .sidebar-foot a { display: block; font-size: .81rem; }
  .sidebar-foot strong { color: var(--muted); }
  .sidebar-foot a:hover { color: var(--gold); }
  .hero { min-height: 218px; }
  .hero-copy { padding: 30px 35px; }
  .quick-card { padding: 12px; }
  .article { padding: 18px; }
  .question-answer { padding: 0; }
}

@media (min-width: 1130px) {
  .layout { grid-template-columns: 197px minmax(0, 1fr) 194px; }
  main { padding: 0 25px; }
  .search-open { min-width: 216px; }
  .rightbar { display: block; position: sticky; align-self: start; max-height: calc(100vh - var(--top-height)); overflow-y: auto; top: var(--top-height); padding: 25px 17px 20px 0; }
  .page-nav > div { display: grid; }
  .page-nav a { padding: 3px 0 3px 10px; border-left: 1px solid #39463d; color: var(--muted); font-size: .83rem; }
  .page-nav a:hover, .page-nav a[aria-current] { color: var(--gold); border-left-color: var(--gold); }
  .field-note { padding: 13px 12px; margin-top: 20px; background: #24251a; border: 1px solid #453d29; border-radius: 8px; }
  .note-title { display: flex; align-items: center; gap: 5px; color: #e6b776; }
  .note-title svg { width: 16px; height: 16px; }
  .note-title strong { font-size: .88rem; }
  .field-note p { color: #c7c6b4; font-size: .83rem; margin: 6px 0 8px; }
  .field-note a { color: #e6b776; font-size: .81rem; text-decoration: underline; text-underline-offset: 3px; }
  .featured-card { min-height: 201px; }
}

@media (min-width: 1400px) {
  .top-inner { padding: 0 30px; }
  .layout { grid-template-columns: 220px minmax(0, 1fr) 221px; }
  .sidebar { padding-inline: 18px; }
  main { padding-inline: 29px; }
  .rightbar { padding-right: 23px; }
  .hero { min-height: 242px; }
  .hero-copy { padding-left: 40px; }
}

@media (max-width: 370px) {
  .hero-copy { padding-left: 14px; padding-right: 14px; }
  .hero h1 { font-size: 1.9rem; }
  .entry-facts > div { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 430px) {
  .brand small { display: none; }
  #starter-help { margin-top: 17px; }
  #starter-help .section-head { margin-bottom: 8px; }
}

@media (pointer: coarse) {
  .detail-list dt a, .duo-figure-credit { display: inline-flex; align-items: center; min-height: 44px; }
}
