/* 元火场务手册 · 与元火游乐场共用纸底、朱红、松绿。 */
:root {
  color-scheme: light;
  --paper: #f8f1e5;
  --surface: #fffcf6;
  --ink: #352f31;
  --muted: #756a64;
  --red: #df5142;
  --red-dark: #b73930;
  --mint: #d6e8dc;
  --green: #486f61;
  --gold: #956a32;
  /* 中控专用：冷调板岩色，与暖纸底形成对照，同时暗示「技术岗」 */
  --slate: #4c5c78;
  --line: #dfd4c5;
  --font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
::selection { color: var(--ink); background: #f3c3a8; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.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; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--green); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 30; background: #f8f1e5f5; border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { max-width: 1240px; padding: 0 28px; min-height: 84px; margin: auto; display: flex; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 800; letter-spacing: .05em; flex-shrink: 0; }
.brand small { display: block; margin-top: 5px; font-family: Arial, sans-serif; font-size: 8px; letter-spacing: .15em; font-weight: 600; }
.brand-mark { width: 37px; height: 42px; background: var(--red); color: var(--paper); border-radius: 10px 10px 16px 16px; display: grid; place-items: center; }
.brand-mark .icon { width: 25px; height: 25px; }
.top-nav { display: flex; gap: 32px; align-items: center; margin-left: auto; font-size: 13px; }
.top-nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.top-nav a.active, .top-nav a:hover { color: var(--red-dark); }
.top-nav .icon { width: 17px; height: 17px; }
.top-nav .game-link { color: var(--muted); }
.top-nav .game-link:hover { color: var(--green); }
.game-link .icon { width: 13px; height: 13px; }
.edition-tag { border: 1px solid #cebba5; color: var(--muted); border-radius: 5px; padding: 5px 9px; font-size: 10px; white-space: nowrap; }
.home-main { max-width: 1184px; margin: 0 auto; padding: 0 28px 38px; }
.hero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; padding: 50px 32px 48px; min-height: 392px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 650; letter-spacing: .16em; color: var(--muted); }
.small-flame { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.hero h1 { position: relative; width: fit-content; margin: 19px 0 19px; font-size: clamp(42px, 4.9vw, 65px); font-weight: 900; letter-spacing: -.065em; line-height: 1.25; }
.hero h1 > span:first-of-type { color: var(--red); }
.hero .title-spark { position: absolute; right: -38px; bottom: 17px; color: var(--green); font-size: 31px; transform: rotate(12deg); }
.hero-description { font-size: 14px; line-height: 1.9; letter-spacing: .025em; color: var(--muted); margin: 0; }
.hero-link { display: inline-flex; gap: 18px; align-items: center; margin-top: 21px; color: var(--red-dark); font-size: 13px; font-weight: 700; min-height: 36px; }
.hero-link .icon { width: 19px; height: 19px; transition: transform .18s; }
.hero-link:hover .icon { transform: translateX(5px); }
.crew-art { position: relative; width: 340px; height: 302px; margin: 0 auto; }
.art-orbit { position: absolute; width: 290px; height: 290px; border: 1px dashed #cebda7; border-radius: 50%; top: 2px; left: 25px; background-image: radial-gradient(#d6c7b466 .8px, transparent .8px); background-size: 10px 10px; }
.crew-badge { position: absolute; left: 65px; top: 12px; width: 215px; height: 266px; padding: 28px 23px 17px; border: 1px solid #d3c1aa; border-radius: 17px; background: var(--surface); box-shadow: 5px 7px 0 #e8d9c5; transform: rotate(8deg); }
.badge-hole { position: absolute; top: 12px; left: calc(50% - 21px); width: 42px; height: 5px; border-radius: 9px; background: var(--paper); border: 1px solid var(--line); }
.badge-top { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); padding: 8px 0 11px; }
.badge-top .icon { width: 18px; height: 18px; color: var(--red); }
.badge-word { color: var(--red); font: italic 800 45px/1.1 Georgia, serif; padding-top: 18px; text-align: center; letter-spacing: -.06em; }
.badge-word span { display: block; margin-top: 9px; font: 800 25px/1.4 var(--font); letter-spacing: .12em; color: var(--ink); padding-left: 4px; }
.badge-bottom { display: flex; justify-content: space-between; align-items: end; margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 11px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.badge-barcode { width: 58px; height: 25px; opacity: .6; background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 3px, var(--ink) 3px 5px, transparent 5px 7px, var(--ink) 7px 8px, transparent 8px 11px); }
.art-note { position: absolute; left: 14px; bottom: 12px; transform: rotate(-7deg); background: var(--mint); border: 1px solid #afc3ad; color: #345747; box-shadow: 2px 3px 0 #b9cbb8; padding: 10px 16px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.art-note .icon { width: 16px; height: 16px; }
.art-spark { position: absolute; color: var(--green); font-size: 37px; }
.art-spark-one { top: 11px; left: 5px; transform: rotate(-15deg); }
.art-spark-two { right: 0; bottom: 35px; color: var(--red); font-size: 29px; }
.manuals-section { padding-top: 29px; border-top: 1px solid var(--line); scroll-margin-top: 106px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.section-heading h2 { font-size: 25px; font-weight: 800; letter-spacing: -.035em; margin: 9px 0 0; display: flex; align-items: center; gap: 13px; }
.role-total { font-size: 11px; font-weight: 500; letter-spacing: 0; padding: 4px 9px; border: 1px solid var(--line); color: var(--muted); border-radius: 5px; white-space: nowrap; }
.collection-note { font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.search-toolbar { margin-bottom: 24px; }
.search-box { position: relative; display: flex; align-items: center; min-height: 53px; border: 1px solid #d7c9b8; background: #fffaf2; border-radius: 11px; padding: 0 15px; gap: 11px; margin: 0; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px #486f6110; }
.search-box > .icon { color: var(--muted); width: 20px; height: 20px; }
.search-box input { flex: 1; min-width: 0; font-size: 14px; border: 0; background: transparent; height: 51px; outline: none; padding: 0; }
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: #897d73; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-key { font: 12px var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 7px; color: var(--muted); }
.clear-search { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; border-radius: 6px; color: var(--muted); }
.clear-search:hover { color: var(--red-dark); background: #f5e8da; }
.clear-search .icon { width: 17px; height: 17px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.filter { border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; padding: 8px 15px; border-radius: 7px; min-height: 38px; transition: color .15s, background .15s; }
.filter:hover { color: var(--ink); background: #ece2d5; }
.filter.active { color: #fffaf1; border-color: var(--green); background: var(--green); }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.role-card { --accent: var(--red-dark); --tint: #f8e6dc; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 23px 23px 17px; display: flex; flex-direction: column; min-height: 217px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.tone-red { --accent: var(--red-dark); --tint: #f8e6dc; }
.tone-green { --accent: var(--green); --tint: #e2ecdf; }
.tone-gold { --accent: var(--gold); --tint: #f1e7ce; }
.tone-slate { --accent: var(--slate); --tint: #e4e9f1; }
.role-card:hover { border-color: #bdab96; transform: translateY(-3px); box-shadow: 0 5px 0 #e7dac8; }
.card-top { display: flex; align-items: center; gap: 10px; }
.role-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; color: var(--accent, var(--red-dark)); background: var(--tint, #f8e6dc); flex: 0 0 auto; }
.role-icon .icon { width: 23px; height: 23px; }
.category-label { font-size: 10px; letter-spacing: .04em; color: var(--muted); margin-left: auto; }
.incomplete-tag { display: inline-block; font-size: 10px; padding: 3px 6px; border-radius: 4px; background: #f2e7cf; color: #805b26; white-space: nowrap; font-weight: 500; }
.role-card h3 { margin: 18px 0 8px; font-size: 23px; font-weight: 800; letter-spacing: -.035em; }
.role-card p { margin: 0 0 19px; font-size: 13px; line-height: 1.85; color: var(--muted); flex: 1; }
.card-bottom { border-top: 1px solid #e8dfd3; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 13px; color: var(--muted); font-size: 10px; }
.card-action { display: inline-flex; gap: 9px; align-items: center; color: var(--accent); font-size: 11px; font-weight: 600; }
.card-action .icon { width: 16px; height: 16px; transition: transform .18s; }
.role-card:hover .card-action .icon { transform: translateX(3px); }
.home-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; padding: 16px 19px; border: 1px dashed #d1c3af; border-radius: 9px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.home-note > .icon { color: var(--green); width: 18px; height: 18px; margin-top: 2px; }
.home-note p { margin: 0; }
.home-note strong { font-weight: 650; color: var(--ink); margin-right: 5px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1184px; margin: 0 auto; padding: 22px 28px 30px; color: var(--muted); font-size: 10px; }
.site-footer > div { display: flex; align-items: center; gap: 22px; }
.footer-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; }
.footer-brand .icon { width: 16px; height: 16px; color: var(--red); }
.search-status { margin: 0 0 15px; font-size: 13px; color: var(--muted); }
.search-results { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.search-result { display: block; padding: 22px 25px; border-bottom: 1px solid var(--line); }
.search-result:last-child { border: 0; }
.search-result:hover { background: #f7f3e8; }
.result-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.result-heading strong { font-size: 17px; font-weight: 750; }
.result-heading > span { color: var(--muted); font-size: 11px; }
.result-heading .result-arrow { margin-left: auto; color: var(--green); font-size: 20px; }
.result-section { color: var(--red-dark); font-size: 12px; margin: 7px 0; }
.search-result p { font-size: 13px; color: var(--muted); line-height: 1.9; margin: 0; overflow-wrap: anywhere; }
mark { background: #f6dba7; color: var(--ink); border-radius: 2px; padding: 0 1px; }
.empty-state { text-align: center; border: 1px dashed var(--line); border-radius: 12px; padding: 48px 20px; }
.empty-state > .icon { color: var(--green); width: 33px; height: 33px; }
.empty-state h3 { font-size: 19px; margin: 16px 0 8px; }
.empty-state p { font-size: 13px; color: var(--muted); margin: 0 0 19px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 17px; min-height: 43px; font-size: 13px; background: var(--surface); }
.button:hover { border-color: var(--green); }
.button .icon { width: 17px; height: 17px; }
.notice { font-size: 13px; color: var(--muted); padding: 12px 0; }

/* 手册正文 */
body[data-page="manual"] { background: #faf6ee; }
.reading-progress { position: fixed; z-index: 35; top: 84px; left: 0; right: 0; height: 2px; pointer-events: none; }
.reading-progress span { width: 100%; display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }
.manual-shell { display: grid; grid-template-columns: 174px minmax(0, 704px) 172px; max-width: 1240px; margin: 0 auto; padding: 35px 28px 50px; gap: 40px; align-items: start; }
.left-sidebar { position: sticky; top: 117px; max-height: calc(100dvh - 140px); overflow-y: auto; scrollbar-width: thin; }
.back-home { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); min-height: 34px; margin-bottom: 25px; padding-left: 9px; }
.back-home:hover { color: var(--red-dark); }
.back-home .icon { width: 16px; height: 16px; }
.nav-group { margin-bottom: 23px; }
.nav-group h2 { color: var(--muted); font-size: 10px; font-weight: 500; padding: 0 12px; margin: 0 0 8px; letter-spacing: .075em; }
.nav-group a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; min-height: 41px; border-radius: 7px; margin: 3px 0; }
.nav-group a > .icon { width: 18px; height: 18px; color: #8d8074; }
.nav-group a:hover { background: #f0e9de; }
.nav-group a[aria-current] { color: var(--red-dark); background: #f5e5db; font-weight: 700; }
.nav-group a[aria-current] > .icon { color: var(--red-dark); }
.nav-status { font-size: 9px; color: var(--muted); margin-left: auto; white-space: nowrap; font-weight: 400; }
.nav-foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); margin: 25px 10px 0; padding-top: 17px; color: var(--muted); font-size: 10px; }
.nav-foot .icon { width: 15px; height: 15px; }
.manual-main { min-width: 0; }
.breadcrumb { display: flex; gap: 10px; font-size: 11px; color: var(--muted); margin: 6px 0 30px; }
.breadcrumb a:hover { color: var(--red-dark); }
.manual-heading { padding-bottom: 22px; position: relative; }
.manual-title-row { display: flex; align-items: center; gap: 17px; }
.manual-title-row > .role-icon { width: 59px; height: 66px; border-radius: 13px; }
.manual-title-row .role-icon .icon { width: 32px; height: 32px; }
.manual-title-row .eyebrow { font-size: 9px; color: var(--accent); letter-spacing: .13em; }
.manual-heading h1 { margin: 5px 0 0; font-size: 38px; font-weight: 850; letter-spacing: -.045em; line-height: 1.3; }
.manual-summary { margin: 21px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.manual-meta { display: flex; align-items: center; gap: 17px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.manual-meta > span { display: flex; align-items: center; gap: 5px; }
.manual-meta .icon { width: 13px; height: 13px; }
.manual-actions { display: flex; gap: 20px; margin-top: 11px; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 0; min-height: 36px; background: none; border: 0; font-size: 11px; color: var(--muted); }
.text-button:hover { color: var(--red-dark); }
.text-button .icon { width: 15px; height: 15px; }
.key-reminder { background: #e4ecdf; border: 1px solid #c4d1bb; border-radius: 10px; padding: 17px 21px; }
.key-label { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 10px; font-weight: 600; }
.key-label .icon { width: 14px; height: 14px; }
.key-reminder p { margin: 8px 0 0; font-size: 15px; font-weight: 650; line-height: 1.85; color: #345344; }
.duty-meta { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; margin: 0 0 27px; padding: 24px 2px; border-bottom: 1px solid var(--line); }
.duty-meta > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.duty-meta dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; margin-bottom: 9px; }
.duty-meta dt .icon { width: 14px; height: 14px; }
.duty-meta dd { margin: 0; font-size: 12px; line-height: 1.85; }
.right-sidebar { position: sticky; top: 122px; align-self: start; max-height: calc(100dvh - 142px); overflow-y: auto; scrollbar-width: thin; padding-left: 3px; }
.toc-heading { font-size: 11px; font-weight: 700; margin: 8px 0 15px; }
.toc-links { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.toc-links a { padding: 7px 12px; font-size: 11px; line-height: 1.7; color: var(--muted); margin-left: -1px; border-left: 2px solid transparent; }
.toc-links a:hover { color: var(--red-dark); }
.toc-links a.is-active { color: var(--red-dark); border-left-color: var(--red); font-weight: 650; background: #f5e9dc77; }
.partner-note { margin-top: 27px; padding-top: 18px; border-top: 1px solid var(--line); }
.partner-note > span { font-size: 10px; color: var(--muted); }
.partner-note p { margin: 8px 0 0; font-size: 11px; line-height: 1.95; }
.to-top { display: block; margin-top: 21px; font-size: 10px; color: var(--muted); padding: 8px 0; }
.to-top:hover { color: var(--green); }
.prose { font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.prose h2 { position: relative; font-size: 22px; font-weight: 800; line-height: 1.6; margin: 35px 0 15px; padding-top: 2px; letter-spacing: -.025em; scroll-margin-top: 106px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin-top: 26px; scroll-margin-top: 106px; }
.heading-anchor { display: inline-block; color: #bfa88c; opacity: 0; font-size: 16px; font-weight: 400; padding: 0 8px; vertical-align: middle; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
.prose p { margin: 12px 0 17px; }
.prose strong { font-weight: 700; color: #332d2b; }
.prose ul, .prose ol { margin: 14px 0 24px; padding-left: 24px; }
.prose li { margin: 8px 0; padding-left: 4px; }
.prose li::marker { color: var(--green); font-size: 13px; font-weight: 600; }
.prose blockquote { border: 1px solid #e1d6c5; border-left: 3px solid #bf9c71; border-radius: 0 7px 7px 0; background: #f2ebde; color: #73624f; font-size: 12px; margin: 23px 0 27px; padding: 13px 17px; line-height: 1.9; }
.prose blockquote p { margin: 0; }
.prose a:not(.heading-anchor) { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; }
.prose code { background: #eee5d8; border-radius: 4px; font-size: .88em; padding: .1em .3em; }
.prose pre { overflow-x: auto; padding: 14px; background: #eee5d8; border-radius: 6px; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 20px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.prose th { background: #eee7d9; font-weight: 650; }
.prose th, .prose td { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { white-space: nowrap; color: var(--green); }
.incomplete-notice { background: #f7eacf; border: 1px solid #ddc591; border-radius: 9px; padding: 16px 20px; margin: 0 0 20px; }
.incomplete-notice strong { font-size: 14px; color: #77521f; }
.incomplete-notice p { font-size: 12px; line-height: 1.9; color: #785e39; margin: 6px 0 0; }
.checklist-section { scroll-margin-top: 106px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 23px; margin: 37px 0 24px; }
.checklist-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.checklist-heading h2 { font-size: 18px; font-weight: 750; display: flex; align-items: center; gap: 9px; margin: 0; }
.checklist-heading h2 .icon { width: 21px; height: 21px; color: var(--green); }
#checklist-count { font-size: 11px; color: var(--green); font-variant-numeric: tabular-nums; border: 1px solid #bdcebd; border-radius: 5px; padding: 4px 8px; }
.checklist-hint { color: var(--muted); font-size: 10px; margin: 10px 0 17px; line-height: 1.8; }
.checklist-items { margin-top: 15px; }
.checklist-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-top: 1px dashed var(--line); font-size: 13px; line-height: 1.75; cursor: pointer; }
.checklist-item input { accent-color: var(--green); width: 17px; height: 17px; margin: 3px 0 0; flex: 0 0 auto; cursor: pointer; }
.checklist-item input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: #b6b4a2; }
.reset-checklist { font-size: 10px; padding-bottom: 0; min-height: 30px; }
.source-note { color: var(--muted); display: flex; align-items: flex-start; gap: 10px; font-size: 10px; line-height: 1.8; }
.source-note > .icon { width: 15px; height: 15px; margin-top: 2px; }
.source-note p { margin: 7px 0 0; }
.related-section { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 26px; }
.related-section h2 { font-size: 14px; font-weight: 650; margin: 0 0 14px; }
.related-links { display: flex; flex-wrap: wrap; gap: 9px; }
.related-links a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; font-size: 11px; }
.related-links a:hover { color: var(--red-dark); border-color: #c1ad98; background: var(--surface); }
.related-links .icon { width: 15px; height: 15px; }
.related-links .icon:last-child { margin-left: 12px; width: 14px; }
.bottom-back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 28px; padding: 8px 0; }
.bottom-back .icon { width: 16px; height: 16px; }
.mobile-toc, .mobile-role-switch { display: none; }
.toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translate(-50%, 10px); opacity: 0; pointer-events: none; z-index: 60; padding: 11px 20px; border-radius: 9px; background: var(--green); color: #fffaf1; font-size: 12px; max-width: calc(100% - 40px); width: max-content; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1450px) {
  .home-main { padding-top: 12px; }
  .hero { padding-top: 60px; padding-bottom: 59px; }
}
@media (max-width: 1100px) {
  .manual-shell { grid-template-columns: 162px minmax(0, 1fr); gap: 34px; max-width: 1000px; }
  .right-sidebar { display: none; }
  .mobile-toc { display: block; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 8px; }
  .mobile-toc summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; min-height: 47px; padding: 11px 14px; font-size: 12px; font-weight: 600; }
  .mobile-toc summary::-webkit-details-marker { display: none; }
  .mobile-toc summary .icon { width: 16px; height: 16px; }
  .mobile-toc summary > span { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 400; }
  .mobile-toc summary .icon:last-child { width: 13px; height: 13px; transition: transform .15s; }
  .mobile-toc[open] summary .icon:last-child { transform: rotate(180deg); }
  .mobile-toc .toc-links { margin: 0 15px 15px; }
  .mobile-toc .toc-links a { padding: 9px 12px; font-size: 12px; }
  .role-card { padding: 20px 19px 16px; }
  .crew-art { transform: scale(.9); }
}
@media (max-width: 820px) {
  .header-inner { min-height: 74px; gap: 18px; padding: 0 23px; }
  .brand { font-size: 15px; }
  .brand small { font-size: 7px; }
  .brand-mark { width: 32px; height: 37px; border-radius: 9px 9px 13px 13px; }
  .brand-mark .icon { width: 23px; height: 23px; }
  .top-nav { gap: 19px; }
  .top-nav a { font-size: 11px; }
  .edition-tag { font-size: 9px; padding: 4px 6px; }
  .home-main { padding-left: 23px; padding-right: 23px; }
  .hero { padding: 35px 5px; min-height: 340px; grid-template-columns: 1fr 270px; }
  .hero h1 { font-size: 49px; }
  .crew-art { transform: scale(.8); width: 310px; transform-origin: 40% 50%; }
  .hero .title-spark { right: -29px; bottom: 11px; font-size: 24px; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .role-card { min-height: 216px; }
  .section-heading h2 { font-size: 23px; }
  .manual-shell { grid-template-columns: 145px minmax(0, 1fr); gap: 26px; padding: 27px 23px 40px; }
  .nav-group a { font-size: 12px; gap: 8px; padding: 10px 8px; }
  .nav-group h2 { padding-left: 8px; }
  .nav-foot { font-size: 9px; margin-left: 8px; margin-right: 0; }
  .nav-status { font-size: 8px; }
  .left-sidebar { top: 100px; }
  .reading-progress { top: 74px; }
  .manual-heading h1 { font-size: 33px; }
  .manual-meta { gap: 10px; }
  .duty-meta { grid-template-columns: 1fr; gap: 15px; }
  .duty-meta > div + div { border: 0; padding: 0; }
  .duty-meta > div { display: grid; grid-template-columns: 85px 1fr; gap: 7px; align-items: baseline; }
  .duty-meta dt { margin-bottom: 0; }
}
@media (max-width: 600px) {
  :root { scroll-padding-top: 87px; }
  .header-inner { min-height: 66px; padding: 0 18px; gap: 12px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand small { font-size: 6px; letter-spacing: .11em; margin-top: 4px; }
  .brand-mark { width: 29px; height: 33px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .top-nav { gap: 0; }
  .top-nav > a:first-child { display: none; }
  .top-nav .game-link { font-size: 10px; gap: 5px; }
  .top-nav .game-link .icon { width: 11px; height: 11px; }
  .edition-tag { display: none; }
  .home-main { padding: 0 18px 18px; }
  .hero { display: block; padding: 29px 0 28px; min-height: 0; }
  .hero-copy { position: relative; z-index: 1; }
  .hero .eyebrow { font-size: 9px; letter-spacing: .06em; gap: 6px; }
  .hero h1 { font-size: 40px; margin-top: 18px; margin-bottom: 18px; letter-spacing: -.055em; line-height: 1.28; }
  .hero .title-spark { font-size: 18px; right: -23px; bottom: 10px; }
  .hero-description { font-size: 12px; line-height: 1.9; max-width: 270px; }
  .hero-link { font-size: 12px; margin-top: 11px; gap: 11px; }
  .crew-art { position: absolute; top: 14px; right: -13px; width: 340px; height: 302px; transform: scale(.44); transform-origin: 100% 0; }
  .art-note { bottom: 4px; left: 15px; }
  .art-orbit { opacity: .75; }
  .art-spark-one { display: none; }
  .manuals-section { padding-top: 23px; scroll-margin-top: 86px; }
  .section-heading { align-items: start; margin-bottom: 18px; }
  .section-heading .eyebrow { font-size: 8px; }
  .section-heading h2 { font-size: 21px; gap: 9px; margin-top: 7px; }
  .role-total { font-size: 9px; padding: 3px 6px; }
  .collection-note { display: none; }
  .search-toolbar { margin-bottom: 17px; }
  .search-box { padding: 0 12px; gap: 9px; min-height: 48px; border-radius: 9px; }
  .search-box > .icon { width: 18px; height: 18px; }
  .search-box input { font-size: 16px; height: 48px; }
  .search-box input::placeholder { font-size: 11px; }
  .search-key { display: none; }
  .filters { gap: 3px; margin-top: 12px; justify-content: space-between; flex-wrap: nowrap; }
  .filter { font-size: 11px; padding: 8px 10px; min-height: 38px; white-space: nowrap; }
  .role-grid { gap: 11px; }
  .role-card { padding: 17px 15px 13px; border-radius: 10px; min-height: 222px; }
  .role-card .card-top { flex-wrap: wrap; gap: 7px; min-height: 36px; }
  .role-card .role-icon { width: 34px; height: 34px; border-radius: 8px; }
  .role-card .role-icon .icon { width: 21px; height: 21px; }
  .category-label { font-size: 8px; }
  .card-top .incomplete-tag { position: absolute; top: 61px; right: 13px; font-size: 8px; padding: 3px 5px; }
  .role-card h3 { margin: 16px 0 8px; font-size: 21px; }
  .role-card p { font-size: 12px; line-height: 1.85; margin-bottom: 15px; }
  .card-bottom { font-size: 8px; padding-top: 11px; gap: 4px; }
  .card-action { font-size: 10px; gap: 4px; }
  .card-action .icon { width: 12px; height: 12px; }
  .home-note { padding: 13px; font-size: 10px; margin-top: 20px; gap: 8px; }
  .home-note .icon { width: 15px; height: 15px; margin-top: 2px; }
  .site-footer { flex-direction: column; align-items: start; gap: 13px; padding: 22px 18px 30px; font-size: 9px; }
  .site-footer > div { width: 100%; justify-content: space-between; gap: 12px; }
  .footer-brand .icon { width: 14px; height: 14px; }
  .manual-shell { display: block; padding: 0 20px 20px; }
  .left-sidebar { display: none; }
  .reading-progress { top: 66px; }
  .mobile-role-switch { display: flex; justify-content: space-between; align-items: center; margin: 0 -2px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); gap: 12px; }
  .mobile-back { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; min-height: 36px; color: var(--muted); }
  .mobile-back .icon { width: 15px; height: 15px; }
  .select-wrap { position: relative; max-width: 210px; }
  .select-wrap select { appearance: none; background: #fffbf3; width: 100%; min-width: 146px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 33px 9px 12px; font-size: 12px; }
  .select-wrap > .icon { pointer-events: none; position: absolute; right: 10px; top: 13px; width: 13px; height: 13px; color: var(--muted); }
  .breadcrumb { margin: 24px 0; font-size: 10px; }
  .mobile-role-switch:not([hidden]) + .breadcrumb { display: none; }
  .manual-title-row { gap: 13px; }
  .manual-title-row > .role-icon { width: 48px; height: 54px; border-radius: 11px; }
  .manual-title-row > .role-icon .icon { width: 27px; height: 27px; }
  .manual-title-row .eyebrow { font-size: 8px; }
  .manual-heading h1 { font-size: 31px; margin-top: 5px; }
  .manual-summary { margin: 18px 0 13px; font-size: 13px; }
  .manual-meta { font-size: 9px; gap: 11px; }
  .manual-meta .icon { width: 12px; height: 12px; }
  .manual-actions { gap: 22px; margin-top: 8px; }
  .manual-heading { padding-bottom: 17px; }
  .text-button { min-height: 38px; }
  .key-reminder { padding: 15px 17px; }
  .key-reminder p { font-size: 14px; margin-top: 8px; }
  .duty-meta { padding: 21px 0; margin-bottom: 22px; gap: 11px; }
  .duty-meta dt { font-size: 10px; }
  .duty-meta dd { font-size: 11px; }
  .duty-meta > div { grid-template-columns: 81px 1fr; }
  .mobile-toc { margin-bottom: 26px; }
  .prose { font-size: 15px; line-height: 1.95; }
  .prose h2 { font-size: 21px; margin: 31px 0 14px; scroll-margin-top: 87px; }
  .prose h3 { scroll-margin-top: 87px; }
  .prose ul, .prose ol { padding-left: 21px; }
  .prose li { margin: 11px 0; padding-left: 3px; }
  .prose blockquote { padding: 12px 14px; font-size: 12px; margin: 22px 0; }
  .heading-anchor { opacity: .65; padding-left: 6px; }
  .prose table { font-size: 12px; }
  .prose th, .prose td { padding: 10px 12px; }
  .checklist-section { padding: 19px 17px; scroll-margin-top: 87px; }
  .checklist-heading h2 { font-size: 17px; }
  .checklist-item { padding: 13px 0; font-size: 12px; }
  .checklist-item input { width: 18px; height: 18px; }
  .related-links { gap: 8px; }
  .related-links a { padding: 11px; font-size: 10px; }
  .related-links .icon:last-child { margin-left: 2px; }
  .search-result { padding: 19px 17px; }
  .result-heading { flex-wrap: wrap; gap: 8px; }
  .result-heading strong { font-size: 16px; }
  .search-result p { font-size: 12px; }
  .result-heading > span { font-size: 10px; }
}
@media (max-width: 370px) {
  .header-inner { padding: 0 15px; }
  .brand { font-size: 13px; }
  .brand small { font-size: 5.5px; }
  .game-link { font-size: 9px !important; }
  .home-main { padding-left: 15px; padding-right: 15px; }
  .hero h1 { font-size: 34px; }
  .crew-art { top: 23px; transform: scale(.36); right: -7px; }
  .hero .eyebrow { font-size: 8px; }
  .hero-description { font-size: 11px; }
  .section-heading h2 { font-size: 19px; }
  .filter { font-size: 10px; padding: 8px 7px; }
  .role-card { padding: 15px 12px 12px; min-height: 225px; }
  .card-action { font-size: 9px; gap: 2px; }
  .role-card .category-label { font-size: 7px; }
  .card-top .incomplete-tag { right: 11px; top: 59px; }
  .card-bottom > span:first-child { font-size: 7px; }
  .manual-shell { padding-left: 17px; padding-right: 17px; }
  .manual-heading h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  :root { color: #111; background: white; font-size: 11pt; }
  body, body[data-page="manual"] { background: white; }
  .site-header, .left-sidebar, .right-sidebar, .site-footer, .manual-actions, .mobile-role-switch, .mobile-toc, .breadcrumb, .related-section, .bottom-back, .toast, .reading-progress, .skip-link, .reset-checklist, .checklist-hint, #checklist-count, .heading-anchor { display: none !important; }
  .manual-shell { display: block; max-width: none; padding: 0; margin: 0; }
  .manual-heading h1 { font-size: 25pt; }
  .manual-summary { font-size: 11pt; }
  .manual-meta { font-size: 9pt; }
  .manual-heading { padding-bottom: 12pt; }
  .key-reminder, .incomplete-notice { background: none; border: 1px solid #aaa; border-radius: 0; padding: 10pt; break-inside: avoid; }
  .key-reminder p { color: #111; font-size: 11pt; }
  .duty-meta { padding: 12pt 0; margin: 0 0 12pt; grid-template-columns: 1fr 1fr; }
  .prose { font-size: 10.5pt; line-height: 1.8; }
  .prose h2 { font-size: 14pt; margin: 17pt 0 8pt; break-after: avoid; }
  .prose p, .prose li { orphans: 3; widows: 3; }
  .prose li { margin: 4pt 0; }
  .prose blockquote { font-size: 9pt; background: none; border-color: #aaa; break-inside: avoid; }
  .checklist-section { background: none; border-radius: 0; break-inside: avoid; padding: 12pt; margin-top: 18pt; }
  .checklist-item { font-size: 10pt; padding: 7pt 0; }
  .checklist-item input:checked + span { color: #111; text-decoration: none; }
  .source-note { font-size: 8pt; margin-top: 12pt; }
  .home-main { max-width: none; padding: 0; }
  .hero { min-height: 0; padding: 12pt 0; }
  .crew-art, .hero-link, .search-toolbar, .home-note { display: none !important; }
  .hero h1 { font-size: 26pt; }
  .role-grid { grid-template-columns: repeat(3, 1fr); gap: 8pt; }
  .role-card { break-inside: avoid; background: none; min-height: 0; padding: 10pt; }
  .role-card h3 { font-size: 15pt; }
  .role-card p { font-size: 9pt; }
  @page { margin: 16mm; }
}
