/* === 系统/叙事界面/reader.css === */
:root {
  color-scheme: light;
  --ground: #e6e4d8;
  --paper: #fcfaf1;
  --ink: #262b23;
  --line: #a3a797;
  --wash: #e8ebe1;
  --stamp: #713923;
  --stamp-bg: #efdbcd;
  --quiet: #525b4e;
  --sans: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --serif: "Songti SC", SimSun, "Noto Serif CJK SC", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.65 var(--sans); }
button, input, textarea, select { font: inherit; color: inherit; }
button { min-height: 36px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; padding: 5px 10px; }
button:hover:not(:disabled) { background: var(--wash); border-color: var(--ink); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid #a1482b; outline-offset: 2px; }
input:not([type=file]), textarea, select { min-width: 0; width: 100%; border: 1px solid var(--line); background: #fffdf6; min-height: 38px; padding: 6px 9px; border-radius: 0; }
textarea { min-height: 76px; resize: vertical; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { font-family: var(--serif); }
label { display: block; font-size: 14px; }
.primary, .next { background: #384737; color: #fffdf3; border-color: #384737; font-weight: 700; }
.primary:hover:not(:disabled), .next:hover:not(:disabled) { background: #435640; }
.muted { color: var(--quiet); font-size: 13px; line-height: 1.6; }
.label { color: var(--stamp); font: 700 12px/1.5 var(--sans); letter-spacing: .08em; }
.device { position: relative; width: min(720px,100%); min-height: 100dvh; margin: auto; background: var(--ground); border-inline: 1px solid #bfc1b2; }
.screen { height: 100dvh; display: flex; flex-direction: column; }
.title-screen { overflow: auto; background: repeating-linear-gradient(0deg, transparent 0 28px,#d4d7ca 29px,var(--ground) 30px); padding: 26px 16px; }
.title-stack { width: min(392px,100%); margin: auto; display: grid; gap: 9px; }
.title-kicker { display: flex; justify-content: space-between; font-size: 13px; color: var(--quiet); }
.title-plaque { position: relative; border: 2px solid var(--ink); box-shadow: 5px 5px #b1b8a9; padding: 22px 18px 18px; background: var(--paper); }
.title-plaque p { font: 700 14px/1.6 var(--serif); letter-spacing: .16em; color: var(--stamp); }
.title-plaque h1 { font-size: clamp(42px,12vw,68px); line-height: 1.25; letter-spacing: .05em; }
.signal { position: absolute; right: 13px; top: 15px; display: flex; height: 14px; align-items: center; gap: 2px; }
.signal i { display: block; width: 2px; height: 5px; background: #727b67; }
.signal i:nth-child(2n) { height: 9px; }.signal i:nth-child(4) { height: 14px; background: var(--stamp); }
.title-hook { border-left: 4px solid var(--stamp); background: #eee8dd; padding: 10px 12px; margin: 8px 0 3px; font-family: var(--serif); font-size: 16px; }
.title-stack > button { min-height: 43px; }
.title-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bar { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 8px 10px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.bar > b { flex: 1; }
.setup-scroll { min-height: 0; overflow: auto; padding: 14px 12px 32px; }
.setup-card { max-width: 495px; margin: auto; border: 2px solid var(--ink); border-top: 7px solid #647562; box-shadow: 4px 4px #bfc3b4; background: var(--paper); padding: 16px; }
.setup-step { display: grid; gap: 8px; }
.setup-step h1 { font-size: 25px; border-bottom: 1px solid var(--line); margin-bottom: 5px; padding-bottom: 5px; }
.setup-step button { margin-top: 5px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; background: var(--wash); border: 1px solid var(--line); font: 700 19px var(--serif); color: #425140; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.identity { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.identity strong { display: block; max-width: min(27vw,200px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity small,.where small { display: block; color: var(--quiet); font-size: 12px; }
.where { text-align: right; line-height: 1.4; }
.where strong { font-size: 14px; }
.playerbar { padding-top: max(8px,env(safe-area-inset-top)); }
.playerbar > button { flex-shrink: 0; }
.page-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; border-bottom: 1px solid #c4c7b7; font-size: 13px; color: var(--quiet); }
.page-nav button { min-height: 30px; min-width: 36px; font-size: 18px; padding: 0; }
.reading-scroll { overflow: auto; flex: 1; min-height: 0; padding: 10px 12px 15px; overscroll-behavior: contain; }
.story-sheet { min-height: min(270px,100%); background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px #c3c7b9; padding: clamp(15px,4vw,26px); }
.story-sheet h1 { font-size: clamp(27px,5vw,34px); line-height: 1.35; margin-top: 4px; }
.story-place { color: var(--quiet); font-size: 12px; border-bottom: 1px solid #c6c9ba; margin: 8px 0 14px; padding-bottom: 8px; }
#story-text { font: 17px/1.95 var(--serif); overflow-wrap: anywhere; }
#story-text p + p { margin-top: .95em; }
#turn-effects { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 0 0; color: var(--quiet); font: 12px/1.5 var(--sans); }
#turn-effects:empty { display: none; }
#turn-effects span { border: 1px solid #c6c9ba; background: var(--wash); padding: 2px 6px; }
.foot { flex-shrink: 0; background: #ebebdf; border-top: 1px solid #b3b8a8; padding: 4px 10px 7px; }
.choice-head { min-height: 27px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.choice-head button { min-height: 25px; white-space: nowrap; padding: 1px 6px; font-size: 12px; }
#turn-status { color: var(--stamp); font-size: 12px; }
.story-choices { display: grid; gap: 4px; max-height: min(30dvh,235px); overflow: auto; padding: 3px 1px 5px; }
.choice { text-align: left; display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 5px; background: var(--paper); border-left: 3px solid #667a62; font-size: 14px; }
.choice span { color: #45614a; font-size: 12px; }
.free-action { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 4px; }
.free-action > button { padding-inline: 8px; }
.dock { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom); border-top: 2px solid var(--ink); background: var(--paper); }
.dock button { position: relative; min-height: 41px; padding: 5px 1px; font-size: 13px; border: 0; border-right: 1px solid #d6d7ca; }
.dock button:last-child { border-right: 0; }
.dock [aria-current="page"] { background: var(--wash); font-weight: 700; }
#msg-count:not(:empty) { position: absolute; top: 1px; right: 2px; background: var(--stamp); color: white; min-width: 14px; border-radius: 10px; font-size: 10px; }
#notice { position: absolute; z-index: 2; top: 62px; right: 10px; max-width: min(345px,calc(100% - 20px)); background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px #a8af9e; padding: 7px 11px; font-size: 13px; overflow-wrap: anywhere; }
dialog { width: min(718px,100%); height: min(100dvh,830px); max-width: 100%; max-height: 100dvh; margin: auto; border: 1px solid var(--ink); padding: 0; background: var(--ground); color: var(--ink); }
dialog::backdrop { background: #20271c73; }
#api-sheet { height: auto; max-width: 530px; }
.sheet-inner { display: flex; flex-direction: column; height: 100%; max-height: 100dvh; }
.sheet-top h2 { font-size: 20px; flex: 1; }
#sheet-content,.api-fields { min-height: 0; flex: 1; overflow: auto; padding: 14px 13px max(18px,env(safe-area-inset-bottom)); }
.api-fields { display: grid; gap: 7px; }
.api-fields .check { display: flex; align-items: center; gap: 5px; }
.api-fields .check input { width: auto; min-height: auto; }
.actions-row, .sheet-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.file-card { border: 1px solid var(--line); background: var(--paper); padding: 12px; margin-bottom: 8px; }
.file-card h3 { font-size: 19px; margin-bottom: 4px; }
.file-card p + p { margin-top: 7px; }
.file-card.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.people-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.person-card { text-align: left; padding: 10px; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 6px; box-shadow: 2px 2px #c1c6b7; }
.person-card strong,.person-card small { display: block; overflow-wrap: anywhere; }
.person-header { display: flex; align-items: center; gap: 12px; border: 2px solid var(--ink); }
.person-header .avatar { width: 56px; height: 56px; font-size: 27px; }
.person-header h3 { font-size: 24px; }
.sheet-actions { display: grid; gap: 5px; }
.sheet-action { display: grid; text-align: left; }
.sheet-action small { color: var(--quiet); white-space: normal; }
.bubble { background: var(--paper); border: 1px solid var(--line); max-width: 86%; width: fit-content; padding: 7px 9px; margin-bottom: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { margin-left: auto; background: var(--wash); }
.bubble small { display: block; color: var(--quiet); font-size: 11px; }
.chat-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px; }
.bag-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bag-summary > span:not(.label), .bag-status { color: var(--quiet); font-size: 13px; }
.bag-status { min-height: 1.2em; margin-top: 4px; color: var(--stamp); }
.bag-group { margin: 7px 0 12px; }
.bag-group h3 { margin-bottom: 5px; font: 700 13px var(--sans); color: var(--quiet); }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(99px,1fr)); gap: 6px; }
.bag-cell { display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; align-items: center; padding: 8px; text-align: left; min-width: 0; }
.bag-cell[aria-pressed=true] { background: var(--wash); border-color: #51654e; box-shadow: inset 0 -2px #51654e; }
.bag-mark { grid-row: span 2; min-width: 25px; height: 29px; display: grid; place-items: center; background: #eae8d9; border: 1px solid #b6b9aa; color: #465944; font: 700 13px var(--serif); }
.bag-cell strong { font-size: 13px; overflow-wrap: anywhere; }
.bag-cell small { color: var(--quiet); font-size: 12px; }
.bag-inspect { border-top: 3px solid #697861; }
.bag-inspect .actions-row { align-items: end; }
.bag-quantity { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.bag-quantity input { width: 66px; min-height: 36px; }
.bag-ground-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.bag-ground-row b { flex: 1; font-size: 14px; }
.ability-file { border-top: 3px solid #7c6247; }
.ability-file .rank-stamp { color: var(--stamp); background: var(--stamp-bg); padding: 1px 7px; border: 1px solid #b99780; }
.ability-file h3 { font-size: 26px; overflow-wrap: anywhere; }
.ability-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 9px; }
.ability-details p { margin: 0; padding: 7px; border: 1px solid #bebfb0; background: #f3f2e7; font-size: 13px; }
.ability-file .ability-details p + p { margin: 0; }
.ability-testimony { margin-top: 10px; font-size: 14px; overflow-wrap: anywhere; }
.ability-testimony summary { cursor: pointer; }
.ability-testimony p { margin-top: 5px; }
.log-row { border-top: 1px solid var(--line); padding: 8px 4px; }

.story-screen { position: relative; isolation: isolate; }
.live-strip { position: relative; min-height: 34px; padding: 4px 12px 5px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 13px; color: var(--stamp); background: #f1e9d9; border-bottom: 1px solid #c4b6a0; }
.live-strip::before { content: ""; position: absolute; bottom: -1px; left: 0; width: 30%; height: 2px; background: #a75b36; animation: trace 1.65s ease-in-out infinite; }
.live-strip.background { background: #e8ebe1; border-color: #bac2b1; color: #425140; }
.live-strip.background::before { background: #667a62; }
.live-strip button { min-height: 24px; margin-left: auto; padding: 0 9px; font-size: 12px; }
.live-indicator { width: 7px; height: 7px; background: currentColor; animation: blink 1.35s steps(2,end) infinite; }
@keyframes trace { from { transform: translateX(0) scaleX(.18); } 50% { transform: translateX(110%) scaleX(1); } to { transform: translateX(230%) scaleX(.18); } }
@keyframes blink { 50% { opacity: .3; } }
.story-wait,.typing-line { display: flex; align-items: center; gap: 9px; color: var(--quiet); font-size: 13px; }
.story-wait { min-height: 44px; }
.story-wait + #turn-effects { margin-top: 4px; }
.dots { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #746b56; animation: dot .95s ease-in-out infinite alternate; }
.dots i:nth-child(2) { animation-delay: .12s; }.dots i:nth-child(3) { animation-delay: .24s; }
@keyframes dot { from { opacity: .35; transform: translateY(0); } to { opacity: 1; transform: translateY(-3px); } }
.story-cursor { display: inline-block; width: .45em; height: .95em; vertical-align: -.06em; background: #a75b36; margin-left: 3px; animation: blink .85s steps(2,end) infinite; }
#story-text:empty { display: none; }
.story-choices.refreshed { animation: choices-arrive .26s ease-out; }
@keyframes choices-arrive { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.choice-head > div { display: flex; align-items: center; gap: 4px; }
.choice-head #retry-story { color: var(--stamp); }
.barrage-zone { position: absolute; top: 101px; right: 12px; z-index: 2; display: grid; justify-items: end; gap: 5px; pointer-events: none; max-width: min(67%,370px); }
#live-strip:not([hidden]) ~ .barrage-zone { top: 135px; }
.signal-tape { max-width: 100%; padding: 4px 8px; border: 1px solid #667263; border-left: 3px solid #667a62; box-shadow: 2px 2px #3c4a3338; background: #edf0e5fa; color: #354235; font-size: 12px; overflow-wrap: anywhere; animation: tape-arrive 4.8s ease both; }
.signal-tape.warn { color: #642c1b; border-color: #a96447; background: #f7e7dbfc; }
.signal-tape b { font-size: 11px; margin-right: .55em; }
@keyframes tape-arrive { 0% { opacity: 0; transform: translateX(11px); } 8%, 88% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateY(-3px); } }
.message-pop { position: absolute; z-index: 3; /* Anchored to the top of the action area by ResizeObserver. */ bottom: calc(var(--action-offset, 148px) + 7px); right: 11px; left: auto; width: min(420px,calc(100% - 22px)); display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px; border: 2px solid var(--ink); border-left: 5px solid #60755e; background: var(--paper); box-shadow: 4px 4px #52624847; animation: card-arrive .24s ease-out both; }
.message-pop strong { display: block; font-size: 14px; }
.message-pop p { color: var(--quiet); font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.pop-actions { display: grid; gap: 3px; }
.pop-actions button { min-height: 28px; font-size: 12px; padding: 2px 8px; }
.pop-actions button:first-child { background: var(--wash); }
@keyframes card-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
#sheet[open],#api-sheet[open],#event-pop[open] { animation: card-arrive .2s ease-out both; }
#event-pop { width: min(435px,calc(100% - 36px)); height: auto; max-height: calc(100dvh - 36px); border: 2px solid var(--ink); box-shadow: 5px 5px #1e281b55; background: var(--paper); }
#event-pop::backdrop { background: #20271c91; }
.event-card { border-top: 7px solid #a75b36; padding: 17px; }
.soul-section { margin-bottom: 14px; }
.soul-heading { font-size: 15px; color: var(--quiet); margin: 0 0 7px; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.soul-grid { display: grid; gap: 7px; }
.soul-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.soul-card header h3 { font-size: 17px; margin: 0; }
.soul-act { border-left: 4px solid var(--stamp); background: #f3eee3; }
.deduction-card { border-left: 4px solid #486246; background: #f3f5ec; }
.soul-tag { font-size: 12px; padding: 1px 7px; border: 1px solid var(--line); background: var(--wash); color: var(--ink); white-space: nowrap; }
.soul-tag.good { background: #e1ece0; border-color: #6b8868; color: #2b4529; }
.soul-tag.warn { background: var(--stamp-bg); border-color: #b47a5f; color: var(--stamp); }
.clock-pips { display: flex; gap: 4px; margin: 5px 0 6px; }
.clock-pips i { flex: 1; height: 6px; border: 1px solid #a3a797; background: #ecebe1; }
.clock-pips i.on { background: #a75b36; border-color: #7d3f22; }
.event-card h2 { font-size: clamp(24px,6vw,32px); line-height: 1.25; padding: 4px 0 11px; border-bottom: 1px solid var(--line); }
.event-card > p { margin: 12px 0; font-family: var(--serif); font-size: 16px; line-height: 1.8; }
#event-effects { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; }
#event-effects:empty { display: none; }
#event-effects span { border: 1px solid #c6c9ba; background: var(--wash); padding: 1px 6px; color: var(--quiet); font-size: 12px; }
.event-card button { width: 100%; }
.motion-settings { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.motion-settings label { display: flex; align-items: center; gap: 6px; }
.motion-settings input[type=checkbox] { width: 17px; min-height: 17px; accent-color: #50674c; }

.intake-scroll { flex: 1; padding: 14px 12px 32px; overscroll-behavior: contain; }
.intake-file { width: min(100%, 520px); margin: 0 auto; padding: clamp(13px, 4vw, 23px); background: var(--paper); border: 2px solid var(--ink); border-top: 6px solid #677361; box-shadow: 4px 4px #bfc3b4; }
.intake-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #b5b8a9; margin-bottom: 9px; padding-bottom: 9px; }
.intake-head h1 { font-size: 27px; line-height: 1.25; }
.recording { flex-shrink: 0; padding: 2px 6px; background: var(--stamp-bg); color: var(--stamp); font-size: 12px; }
.recording i { display: inline-block; width: 7px; height: 7px; margin-right: 2px; background: #9b4a35; border-radius: 50%; animation: blink 2s steps(2,end) infinite; }
.intake-history { margin-top: 13px; }
.intake-voice { margin-bottom: 7px; padding: 7px 9px; border-left: 2px solid #697763; background: #eff0e7; }
.intake-voice small { color: var(--quiet); font-size: 12px; font-weight: 650; }
.intake-voice p { overflow-wrap: anywhere; }
.intake-voice.answer { margin-left: 16px; border-left-color: #a96344; background: #f4e9df; }
.intake-beat { animation: card-arrive .2s ease-out both; }
#intake-answer-form { display: grid; gap: 6px; margin-top: 8px; }
#intake-mode { color: var(--stamp); margin-top: 4px; }

@media (max-width: 480px) {
  .device { border: none; }
  #sheet { height: 100dvh; }
  .reading-scroll { padding-inline: 8px; }
  .story-sheet { padding: 14px; }
  #story-text { font-size: 16px; }
  .foot { padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}

.free-action textarea { min-width: 0; max-height: 20vh; resize: vertical; font: inherit; padding: 7px; }
.encounter-status { border-left: 3px solid var(--stamp); padding: 6px 9px; background: var(--paper); }

#story-loot { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 6px; }
#story-loot button { margin-top: 6px; border-left: 3px solid var(--stamp); text-align: left; }
#story-loot small { display: block; color: var(--quiet); padding-top: 3px; }


/* === 系统/叙事界面/reader-art.css === */
:root {
  --art-reading: url("./assets/reading-paper.png");
  --art-archive: url("./assets/archive-cloth.png");
  --art-action: url("./assets/action-red.png");
  --art-dossier: url("./assets/dossier-paper.png");
  --art-cover: url("./assets/linchuan.webp");
  --ground: #dcd1bb;
  --paper: #f5ebd6;
  --ink: #26291f;
  --line: #a39881;
  --wash: #e4e5d6;
  --stamp: #7c3325;
  --stamp-bg: #ead5c5;
  --quiet: #525548;
  --art-dark: #222c24;
  --art-light: #f5e9ce;
}

.art-icon { display: inline-block; width: 1.1em; height: 1.1em; flex: 0 0 auto; vertical-align: -.18em; margin-inline-end: .32em; background: var(--art-symbol) center / contain no-repeat; border-radius: 2px; }
.art-medical { --art-symbol: url("./assets/medical.png"); }
.art-provisions { --art-symbol: url("./assets/provisions.png"); }
.art-access { --art-symbol: url("./assets/access.png"); }
.art-materials { --art-symbol: url("./assets/materials.png"); }
.art-equipment { --art-symbol: url("./assets/equipment.png"); }
.art-crystal { --art-symbol: url("./assets/crystal.png"); }
.art-clue { --art-symbol: url("./assets/clue.png"); }
.art-restore { --art-symbol: url("./assets/restore.png"); }
.art-misc { --art-symbol: url("./assets/misc.png"); }
.art-health { --art-symbol: url("./assets/health.png"); }
.art-stamina { --art-symbol: url("./assets/stamina.png"); }
.art-location { --art-symbol: url("./assets/location.png"); }
.art-radio { --art-symbol: url("./assets/radio.png"); }
.art-message { --art-symbol: url("./assets/message.png"); }
.art-success { --art-symbol: url("./assets/success.png"); }
.art-danger { --art-symbol: url("./assets/danger.png"); }
.art-random-power { --art-symbol: url("./assets/random-power.png"); }

body { background: #1a221b; }
.device { border-inline-color: #4a4b3d; }
.reading-scroll, .setup-scroll, .bar, .dock { background: var(--art-archive) center / 420px var(--art-dark); }
.bar, .dock { color: var(--art-light); border-color: #524e3e; }
.bar button, .dock button { background: transparent; border-color: #7a7662; }
.bar button:hover:not(:disabled), .dock button:hover:not(:disabled) { background: #4c5547; border-color: #9b927c; }
.identity small, .where small { color: #d0c4ab; }
.dock [aria-current="page"] { background: var(--art-action) center / 280px #7a3125; color: #fff6e2; }
.dock .art-icon { vertical-align: -.16em; }

.title-screen {
  padding: clamp(20px, 5vw, 38px);
  background: linear-gradient(180deg, #10151015 15%, #14191147 44%, #111710ed 92%), var(--art-cover) 58% center / cover, var(--art-dark);
}
.title-stack { width: min(100%, 430px); margin: auto auto clamp(12px, 6dvh, 68px); gap: 10px; color: var(--art-light); }
.title-kicker { color: #e5d9bf; }
.title-plaque { background: none; border: 0; border-bottom: 2px solid #ad614a; box-shadow: none; padding: 14px 0 11px; }
.title-plaque p { color: #d7b287; }
.title-plaque h1 { font-size: clamp(45px, 11vw, 76px); text-shadow: 0 3px 12px #101510; }
.title-hook { background: #172018d9; border-left-color: #ab5843; }
.title-tools button { color: var(--art-light); background: #20281fe8; border-color: #8a8069; }
.title-tools button:hover:not(:disabled) { background: #424b3b; border-color: #c1b397; }
.primary, .next { background: var(--art-action) center / 300px #7a3125; color: #fff6e2; border-color: #733225; }
.primary:hover:not(:disabled), .next:hover:not(:disabled) { color: #fff6e2; background: linear-gradient(#ffffff14, #ffffff14), var(--art-action) center / 300px #7a3125; border-color: #492116; }

.story-sheet { background: linear-gradient(#fffaf093,#fffaf093), var(--art-reading) center top / 480px var(--paper); border: 1px solid #766d56; box-shadow: 2px 3px #101710a0; }
.story-place { border-color: #b9ad95; }
.file-card, .intake-file, .message-pop, #event-pop { background: linear-gradient(#fff9eb99,#fff9eb99), var(--art-dossier) center / 520px var(--paper); }
.foot, .page-nav, #sheet, #api-sheet { background: linear-gradient(#fcf1da99,#fcf1da99), var(--art-dossier) center / 520px var(--ground); }
.encounter-status { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 13px; background: #ead8c4; border-left-color: #a44731; font-size: 13px; }
.bag-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); }
.bag-mark { width: 36px; height: 36px; border: 0; background: none; }
.bag-mark .art-icon { width: 100%; height: 100%; margin: 0; }
.bag-cell small { grid-column: 2; }
#story-loot button, .sheet-action.with-art { display: grid; grid-template-columns: 36px minmax(0,1fr); column-gap: 8px; align-items: center; }
#story-loot button > .art-icon, .sheet-action.with-art > .art-icon { width: 36px; height: 36px; grid-row: span 2; margin: 0; }
#story-loot button > small, .sheet-action.with-art > small { grid-column: 2; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .story-sheet { box-shadow: none; }
  .dock .art-icon { width: .95em; height: .95em; margin-inline-end: .16em; }
}


/* === 系统/叙事界面/reader-book.css === */
:root { --art-hospital: url("./assets/hospital.jpg"); }
.reading-scroll { padding: 0; scrollbar-width: thin; scrollbar-color: #887d67 #e8ddc8; background: var(--paper); }
.story-sheet { min-height: 100%; padding: 0; border: 0; box-shadow: none; }
.chapter-head {
  --scene-art: var(--art-cover);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(118px, 21dvh, 182px);
  padding: 15px clamp(20px, 6%, 43px) 17px;
  border-bottom: 4px double #9c8d70;
  color: #fff4dd;
  background: linear-gradient(90deg,#0c110fce,#0e15115c 62%,#0e151103), var(--scene-art) 79% center / cover no-repeat #17201a;
}
.chapter-head[data-scene="hospital"] { --scene-art: var(--art-hospital); }
.chapter-head[data-scene="hospital-encounter"] { --scene-art: url("./assets/hospital-encounter.jpg"); }
.chapter-head[data-scene="hospital-loot"] { --scene-art: url("./assets/hospital-loot.jpg"); }
.chapter-head .label { color: #e9dcc3; text-shadow: 0 1px 4px #131711; }
.chapter-head h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.18; text-shadow: 0 2px 8px #141911; overflow-wrap: anywhere; }
.chapter-head h1::after { content: ""; display: block; width: min(9rem,36%); height: 3px; margin-top: 7px; background: var(--art-action) center / cover #923d2a; }
.chapter-head .story-place { color: #f2e5cb; border: 0; margin: 8px 0 0; padding: 0; }
.book-page { max-width: 672px; min-width: 0; margin: auto; padding: clamp(19px, 4.5vw, 36px) clamp(19px, 5.2vw, 43px) 32px; }
#story-text { color: #2b291f; font: 18px/1.86 var(--serif); text-align: justify; text-justify: inter-ideograph; line-break: strict; overflow-wrap: anywhere; }
#story-text p { text-indent: 2em; }
#story-text p + p { margin-top: .62em; }
#story-text mark { color: inherit; padding-block: .045em; }
#story-text .key-clue { background: #ead49a; }
#story-text .key-dialogue { background: #d8e0c6; color: #283c2b; text-decoration: underline #698368; text-underline-offset: .17em; }
.book-page .encounter-status { margin-bottom: 14px; }
.page-nav { min-height: 33px; padding: 2px 12px; }
.page-nav button { min-height: 26px; }
.free-action { grid-template-columns: 1fr auto; }
.free-action textarea { grid-column: 1 / -1; min-height: 53px; }
#act-submit { min-width: 6.25em; justify-self: end; }
#continue-scene { min-width: 4em; }
@media (max-width: 480px) {
  .chapter-head { min-height: clamp(112px, 17dvh, 144px); }
  #story-text { font-size: 17px; }
}


/* === 系统/叙事界面/reader-layout.css === */
:root {
  --field-bg: #141d18;
  --field-panel: #202c24;
  --field-line: #405046;
  --field-text: #f2ead5;
  --field-muted: #bac7ba;
  --field-accent: #e2bf83;
  --field-danger: #e1957b;
}

.device { width: 100%; border: 0; background: var(--field-bg); }
.title-screen { background-position: center, 58% 64%; }
.title-stack { margin-inline: clamp(36px, 12vw, 215px) auto; }
.story-screen {
  display: grid;
  grid-template: auto minmax(0, 1fr) / 172px minmax(0, 1fr) 244px;
  grid-template-areas: "top top top" "nav stage status";
  background: var(--field-bg);
  color: var(--field-text);
}
.playerbar { grid-area: top; gap: 16px; padding: max(10px, env(safe-area-inset-top)) 18px 10px; border-width: 1px; border-color: var(--field-line); }
.station-brand { width: 137px; flex: 0 0 auto; color: var(--field-accent); font: bold 23px/1.3 var(--serif); letter-spacing: .12em; }
.playerbar > button { min-width: 44px; }
.story-stage, .workspace { grid-area: stage; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.story-stage > .page-nav { order: 1; }
.story-stage > .live-strip { order: 2; }
.story-stage > .reading-scroll { order: 3; }
.story-stage > .foot { order: 4; }
.page-nav, .foot, .live-strip { background: var(--field-panel); color: var(--field-muted); border-color: var(--field-line); }
.page-nav { padding-inline: 16px; justify-content: center; gap: 16px; }
.page-nav button, .foot button:not(.primary), .live-strip button {
  color: var(--field-text);
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 4px;
}
.page-nav button:hover:not(:disabled), .foot button:not(.primary):hover:not(:disabled), .live-strip button:hover:not(:disabled) {
  background: #344338;
  border-color: #728573;
}
.live-strip.background { background: var(--field-bg); color: var(--field-muted); border-color: var(--field-line); }
.chapter-head { min-height: clamp(114px, 17dvh, 160px); padding-inline: max(24px, calc((100% - 590px) / 2)); }
.book-page { max-width: 680px; }
.story-sheet { color: var(--ink); }
.foot { padding: 8px 16px 11px; }
.foot .choice-head, .foot .story-choices, .foot .free-action { max-width: 656px; margin-inline: auto; }
.foot .story-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: min(18dvh, 144px); }
.foot .choice { grid-template-columns: 18px minmax(0, 1fr); background: #29392e; padding: 5px 8px; }
.foot .choice span, #turn-status { color: var(--field-accent); }
.foot .free-action { grid-template-columns: minmax(0, 1fr) auto auto; }
.foot .free-action textarea { grid-column: auto; min-height: 42px; max-height: 110px; border-radius: 4px; background: #18231c; color: var(--field-text); border-color: #657365; }
.foot .free-action textarea::placeholder { color: var(--field-muted); }
#act-submit, #continue-scene { min-width: auto; align-self: stretch; padding-inline: 14px; }
.dock {
  grid-area: nav;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow: auto;
  padding: 14px 9px;
  border: 0;
  border-right: 1px solid var(--field-line);
  background: var(--field-bg);
}
.dock-primary, .dock-secondary { display: grid; align-content: start; gap: 4px; }
.dock button {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--field-muted);
  font-size: 14px;
}
.dock [aria-current="page"] { background: #313f32; border-color: #6f765d; color: var(--field-accent); }
.dock-label { margin: 9px 10px 2px; color: var(--field-muted); font-size: 11px; letter-spacing: .08em; }
.dock-label:first-child { margin-top: 0; }
.nav-symbol { display: inline-block; width: 14px; height: 14px; flex: 0 0 auto; position: relative; }
.nav-scene { border: 1px solid currentColor; border-radius: 2px; background: linear-gradient(currentColor,currentColor) center / 6px 1px no-repeat; }
.nav-map { background: var(--art-symbol) center / contain no-repeat; }
.nav-bag { border: 1px solid currentColor; border-radius: 4px 4px 2px 2px; background: linear-gradient(currentColor,currentColor) center 8px / 8px 1px no-repeat; }
.nav-more { background: radial-gradient(circle, currentColor 1.3px, transparent 2px) center / 5px 5px repeat-x; }
#dock-more { display: none; }
.unread-count:not(:empty) { background: #934c38; color: #fff4df; border-radius: 9px; min-width: 17px; padding: 0 3px; text-align: center; }
#msg-count:not(:empty) { position: static; margin-left: auto; }

.survival { grid-area: status; min-width: 0; overflow: auto; padding: 22px 18px; border-left: 1px solid var(--field-line); background: var(--field-panel); }
.survival h2 { color: var(--field-accent); font: 600 13px/1.4 var(--sans); letter-spacing: .08em; margin: 0 0 13px; }
.survival-vitals { display: grid; gap: 13px; }
.vital label { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.vital strong { font-variant-numeric: tabular-nums; }
.vital meter { display: block; width: 100%; height: 7px; margin-top: 4px; }
.vital meter::-webkit-meter-bar { height: 6px; border: 0; border-radius: 2px; background: #38463a; }
#vital-hp::-webkit-meter-optimum-value, #vital-hp::-webkit-meter-suboptimum-value { background: #c57f6b; }
#vital-energy::-webkit-meter-optimum-value, #vital-energy::-webkit-meter-suboptimum-value { background: #aeb780; }
.vital meter::-webkit-meter-even-less-good-value { background: var(--field-danger); }
.survival-vitals { margin-bottom: 16px; }
.survival-events { border-top: 1px solid var(--field-line); padding-top: 12px; }
#dock-events {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--field-accent);
  font-size: 13px;
  font-weight: 650;
}
#dock-events:hover, #dock-events[aria-current="page"] { background: #313f32; border-color: #6f765d; }
#survival-events { color: var(--field-muted); padding: 3px 6px; font-size: 13px; overflow-wrap: anywhere; }
#survival-events article + article { border-top: 1px solid var(--field-line); margin-top: 9px; padding-top: 9px; }
#survival-events strong { display: block; color: var(--field-text); font: bold 16px/1.4 var(--serif); margin-bottom: 3px; }
#skill-count:not(:empty) { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--field-accent); }
.skill-balance { padding: 0 0 14px; margin-bottom: 15px; border-bottom: 1px solid #b9ad95; }
.skill-balance b { margin-left: 6px; font-size: 21px; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.skill-grid .skill-card { display: flex; flex-direction: column; margin: 0; padding: 14px; overflow-wrap: anywhere; }
.skill-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.skill-card header span { color: var(--stamp); font-size: 13px; white-space: nowrap; }
.skill-card footer { margin-top: auto; padding-top: 9px; }
.skill-card footer button { border-radius: 4px; }

.workspace { background: #ece3ce; color: #282e25; }
.workspace-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px clamp(12px, 2.4vw, 30px); border-bottom: 1px solid #b9ad95; }
.workspace-head h1 { font-size: clamp(22px, 3vw, 31px); }
.workspace-head button { border-radius: 4px; }
.workspace-content { flex: 1; min-height: 0; overflow: auto; padding: 16px clamp(12px, 2.4vw, 30px) 24px; scrollbar-gutter: stable; }
.workspace .file-card { border-radius: 5px; background: #f5eedc; }
.bag-filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 13px; }
.bag-filters button { border-radius: 4px; }
.bag-filters [aria-pressed="true"] { background: #334537; color: #fff6e2; border-color: #334537; }
.bag-layout, .map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(195px, .72fr); align-items: start; gap: 14px; }
.bag-layout .bag-inspect { margin: 0; padding: 14px; min-height: 95px; }
.bag-layout .bag-grid { grid-template-columns: repeat(auto-fill, minmax(113px, 1fr)); }
.bag-layout .bag-cell { border-radius: 4px; }
.bag-layout .bag-cell strong { min-width: 0; }
.bag-ground { margin-top: 15px; }
.bag-status:empty { display: none; }
.map-board {
  --map-grid-line: #a6aa8a40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(78px, auto));
  gap: 6px;
  align-items: center;
  padding: 10px;
  border: 1px solid #a5a289;
  border-radius: 5px;
  background: repeating-linear-gradient(0deg, transparent 0 19px, var(--map-grid-line) 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, var(--map-grid-line) 19px 20px), #dedbc2;
}
.map-node { grid-area: var(--y) / var(--x); display: grid; justify-items: start; gap: 2px; min-width: 0; min-height: 63px; padding: 6px; border: 1px solid #9f9c7e; border-radius: 4px; text-align: left; background: #f4ecd8; }
.map-node small { color: #596254; font-size: 11px; }
.map-node strong { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.map-node[data-locked="true"] { background: #e4e1ce; }
.map-node[aria-pressed="true"] { box-shadow: 0 0 0 2px #475e49; border-color: #475e49; }
.map-node[data-current="true"] small { color: #843d2d; font-weight: bold; }
.map-detail { min-width: 0; border-top: 3px solid #647560; }
.map-detail .primary { margin-top: 8px; }
.map-detail .map-blocked { color: #783f2c; }

#notice {
  top: auto;
  bottom: 16px;
  right: 12px;
  width: 220px;
  color: var(--ink);
  pointer-events: none;
}
.message-pop { color: var(--ink); }
.barrage-zone { top: 110px; }
@media (min-width: 1200px) {
  .story-screen { grid-template-columns: 182px minmax(0, 1fr) 254px; }
}
@media (min-width: 768px) and (max-width: 1050px) {
  .story-screen { grid-template-columns: 128px minmax(0, 1fr) 165px; }
  .station-brand { width: 95px; font-size: 20px; }
  .survival { padding: 16px 10px; }
  #notice { width: 140px; }
  .map-layout, .bag-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .title-stack { margin-inline: auto; }
  .story-screen {
    grid-template: auto auto auto minmax(0, 1fr) auto / minmax(0, 1fr);
    grid-template-areas: "top" "status" "notice" "stage" "nav";
  }
  .station-brand, .survival-title { display: none; }
  .playerbar { padding-inline: 10px; gap: 8px; }
  .survival { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; border: 0; border-bottom: 1px solid var(--field-line); padding: 5px 10px; }
  .survival-vitals { grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 0; }
  .vital label { font-size: 11px; }
  .vital strong { white-space: nowrap; }
  .survival-events { display: flex; align-items: center; gap: 7px; padding-top: 0; }
  #dock-events { width: auto; flex-shrink: 0; font-size: 12px; }
  #survival-events { min-width: 0; padding: 0; font-size: 12px; }
  #survival-events article + article, #survival-events article p { display: none; }
  #survival-events strong { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .dock { display: block; position: relative; overflow: visible; padding: 0 0 env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--field-line); }
  .dock-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .dock button { justify-content: center; min-height: 44px; font-size: 12px; padding: 4px; }
  #dock-more { display: flex; }
  .dock-secondary { display: none; }
  .dock:has(#dock-more[aria-expanded="true"]) .dock-secondary { display: grid; position: absolute; z-index: 4; right: 5px; bottom: 100%; max-height: 64dvh; overflow: auto; background: var(--field-panel); border: 1px solid var(--field-line); padding: 8px; min-width: 170px; box-shadow: 0 8px 24px #0006; }
  .dock-secondary button { justify-content: flex-start; }
  .chapter-head { min-height: clamp(103px, 15dvh, 130px); padding-inline: 18px; }
  .foot { padding: 5px 8px 7px; }
  .foot .story-choices { max-height: min(15dvh, 113px); }
  .foot .choice { font-size: 12px; min-height: 44px; }
  .foot .free-action textarea { min-height: 44px; font-size: 16px; }
  #act-submit, #continue-scene { padding-inline: 7px; }
  .workspace-head button, .workspace-content button { min-height: 44px; }
  .map-layout, .bag-layout { grid-template-columns: minmax(0, 1fr); }
  .map-board { padding: 6px; gap: 4px; grid-template-rows: repeat(3, minmax(64px, auto)); }
  .map-node { min-height: 60px; padding: 4px; }
  .map-node strong { font-size: 11px; }
  .barrage-zone { top: 141px; }
  #notice {
    position: static;
    grid-area: notice;
    width: auto;
    max-width: none;
    border: 0;
    border-bottom: 1px solid var(--field-line);
    box-shadow: none;
    background: var(--field-panel);
    color: var(--field-accent);
    padding-block: 4px;
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  .dock button { gap: 4px; }
  .dock .nav-symbol { width: 11px; height: 11px; }
  .survival { gap: 3px 7px; }
}


/* === 系统/叙事界面/reader-creation.css === */
.setup-screen {
  color: var(--field-text);
  background: linear-gradient(#141d18b8, #141d18 82%), var(--art-cover) center 60% / cover, var(--field-bg);
}
.creation-top { justify-content: space-between; padding-inline: clamp(12px, 4vw, 48px); border-bottom: 1px solid var(--field-line); }
.creation-top b { font-size: 13px; letter-spacing: .07em; }
.creation-top b span { color: var(--field-accent); }
.setup-screen .intake-scroll { padding: clamp(16px, 3vw, 36px) clamp(12px, 4vw, 36px); background: transparent; }
.creation-shell {
  max-width: 1090px;
  margin: auto;
  border: 1px solid #526150;
  border-top: 3px solid #a58b62;
  background: #1c2820;
  box-shadow: 0 18px 55px #090e0a8c;
}
.creation-head { padding: clamp(16px, 3vw, 31px); border-bottom: 1px solid var(--field-line); }
.creation-head h1 { margin: 0 0 20px; color: var(--field-text); font-size: clamp(28px, 4vw, 46px); line-height: 1.18; letter-spacing: .05em; }
.creation-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.creation-steps button {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 6px 10px;
  color: var(--field-muted);
  background: transparent;
  border: 1px solid var(--field-line);
  border-radius: 3px;
  text-align: left;
}
.creation-steps button span { color: var(--field-accent); font: 13px ui-monospace, Consolas, monospace; }
.creation-steps button:hover:not(:disabled) { background: #324237; }
.creation-steps [aria-current="step"] { opacity: 1; color: var(--field-text); background: #394639; border-color: #ab9365; font-weight: 700; }
.creation-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 28%); }
.creation-stage { min-width: 0; padding: clamp(12px, 3vw, 31px); }
.creation-identity { display: grid; gap: 9px; max-width: 440px; }
.creation-identity label { font-weight: 650; }
.creation-identity :is(input, select) { min-height: 46px; border: 1px solid #697a68; border-radius: 4px; color: var(--field-text); background: #141e18; color-scheme: dark; }
.creation-identity input::placeholder { color: var(--field-muted); }
.creation-identity label:not(:first-child) { margin-top: 12px; }
.creation-summary { min-width: 0; border-left: 1px solid var(--field-line); background: #17221b; }
.creation-summary header {
  min-height: 114px;
  display: flex;
  align-items: end;
  padding: 16px 19px;
  border-bottom: 1px solid var(--field-line);
  background: linear-gradient(0deg,#121b15f0,#121b1542), var(--art-hospital) center / cover;
}
.creation-summary header h2 { color: var(--field-accent); font-size: 18px; letter-spacing: .1em; }
.creation-summary #creation-preview { padding: 14px 19px 20px; }
.preview-name { font: bold 24px/1.35 var(--serif); overflow-wrap: anywhere; }
.preview-talent { margin: 12px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--field-line); }
.preview-talent h3 { color: var(--field-accent); font: 650 12px var(--sans); margin-bottom: 5px; }
.preview-talent p { color: var(--field-muted); font-size: 13px; margin-top: 3px; }
.preview-stats { margin: 0; display: grid; gap: 4px; }
.preview-stats div { display: flex; justify-content: space-between; gap: 8px; }
.preview-stats dt, .preview-stats small { color: var(--field-muted); font-size: 12px; }
.preview-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.preview-stats small { color: var(--field-accent); font-weight: 400; }
#creation-talents fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
#creation-talents legend { color: var(--field-muted); margin-bottom: 12px; font-size: 13px; padding: 0; }
.talent-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.talent-tools p { color: var(--field-accent); font-weight: 700; }
.talent-tools p span { display: block; color: var(--field-muted); font-size: 12px; font-weight: 400; }
.talent-tools button { min-height: 44px; border: 1px solid #697a68; border-radius: 4px; background: #243129; color: var(--field-text); }
.talent-tools button:hover:not(:disabled) { background: #38493a; }
#talent-status { margin: 7px 0 12px; color: var(--field-muted); font-size: 12px; }
.talent-list { display: grid; gap: 9px; }
.talent-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: #243129;
}
.talent-option:hover { border-color: #84947d; }
.talent-option:has(:checked) { border-color: #b49968; background: #333f32; box-shadow: inset 3px 0 #b49968; }
.talent-option:has(:focus-visible) { outline: 2px solid var(--field-accent); outline-offset: 2px; }
.talent-option input { width: 17px; aspect-ratio: 1; min-height: 0; margin: 0; accent-color: var(--field-accent); }
.talent-option strong { display: block; font: bold 20px/1.3 var(--serif); }
.talent-grade {
  display: inline-grid;
  min-width: 26px;
  min-height: 24px;
  place-items: center;
  margin-right: 8px;
  color: #c2cec1;
  border: 1px solid currentColor;
  border-radius: 3px;
  font: 700 14px/1 ui-monospace, Consolas, monospace;
  vertical-align: 2px;
}
.talent-grade[data-rank="D"] { color: #b1c891; }
.talent-grade[data-rank="E"] { color: #aebfdb; }
.talent-grade[data-rank="C"] { color: #8ed1ba; }
.talent-grade[data-rank="B"] { color: #96c5e2; }
.talent-grade[data-rank="A"] { color: #e2b6eb; }
.talent-grade[data-rank="S"] { color: #f4c87c; }
.loadout-shop { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 10px 0 13px; margin-bottom: 12px; border-bottom: 1px solid var(--field-line); }
.loadout-shop select:not([type]) { width: auto; min-height: 40px; background: #243129; color: var(--field-text); border: 1px solid #697a68; color-scheme: dark; }
.loadout-shop button { min-height: 40px; background: #243129; color: var(--field-text); border: 1px solid #697a68; }
.loadout-shop button:hover:not(:disabled) { background: #38493a; }
.loadout-shop p, #gear-status, .loadout-empty { color: var(--field-muted); font-size: 13px; }
.loadout-shop p { width: 100%; }
#gear-status { margin: 8px 0; }
.loadout-talent { min-width: 0; border: 1px solid var(--field-line); border-radius: 4px; background: #243129; }
.loadout-talent .talent-option { border-color: transparent; }
.loadout-talent details { padding: 0 12px 6px; font-size: 13px; color: var(--field-muted); }
.loadout-talent summary { cursor: pointer; }
.loadout-fields { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.loadout-fields div { display: grid; grid-template-columns: minmax(0, 5.5em) minmax(0, 1fr); gap: 7px; margin-top: 4px; }
.loadout-fields dt { font-weight: 650; }
.loadout-fields dd { margin: 0; }
.preview-talent .loadout-fields div { grid-template-columns: minmax(0, 1fr); gap: 0; }
.preview-talent .loadout-fields dt, .stat-card .loadout-numbers { color: var(--field-accent); }
#creation-budget { color: var(--field-accent); font-size: 13px; font-weight: 650; white-space: nowrap; }
.talent-option small { display: block; margin-top: 2px; color: var(--field-muted); font-size: 13px; }
.talent-option b { padding: 2px 7px; color: var(--field-accent); border: 1px solid #6f694e; font-size: 12px; white-space: nowrap; }
.allocation-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.allocation-tools p { color: var(--field-muted); font-size: 13px; }
.allocation-tools > div { display: flex; gap: 5px; flex-wrap: wrap; }
.allocation-tools button, .stat-stepper button, .creation-footer button:not(.primary) {
  background: #243129;
  color: var(--field-text);
  border: 1px solid #5a6a59;
  border-radius: 4px;
}
.allocation-tools button:hover:not(:disabled), .stat-stepper button:hover:not(:disabled), .creation-footer button:not(.primary):hover:not(:disabled) { background: #38493a; border-color: #a18f6c; }
#creation-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.stat-card { padding: 12px; min-width: 0; border: 1px solid var(--field-line); border-radius: 4px; background: #233028; }
.stat-card-head { display: flex; align-items: center; gap: 8px; }
.stat-card-head h2 { font: bold 18px/1.2 var(--serif); white-space: nowrap; }
.stat-sign { display: grid; place-content: center; flex: 0 0 25px; height: 25px; background: #394639; color: var(--field-accent); font: 14px var(--serif); }
.stat-stepper { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.stat-stepper button { width: 33px; min-height: 34px; padding: 0; font-size: 17px; }
.stat-stepper output { min-width: 22px; text-align: center; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-pips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-block: 10px 7px; }
.stat-pips i { height: 4px; background: #445346; }
.stat-pips i.filled { background: #c7a16a; }
.stat-card p { color: var(--field-muted); font-size: 12px; }
.creation-footer {
  flex-shrink: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px max(12px, calc((100% - 1090px)/2)) max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--field-line);
  background: #162019;
}
.creation-footer button { min-height: 44px; min-width: 76px; border-radius: 4px; }
#creation-next { margin-left: auto; }
#stat-left { margin-left: auto; color: var(--field-accent); font-size: 13px; white-space: nowrap; }
#stat-left strong { margin-left: 8px; font-size: 24px; }
#stat-left:not([hidden]) + #creation-next { margin-left: 0; }
.creation-stage .intake-file { width: 100%; border: 1px solid #a2a48d; border-top: 3px solid #b49968; box-shadow: none; color: var(--ink); border-radius: 3px; }
.creation-stage .intake-head { align-items: center; }
.creation-stage #intake-mode { font-size: 12px; margin-top: 0; }
.creation-stage #intake-answer-form textarea { min-height: 95px; }

.survival-attributes { border-top: 1px solid var(--field-line); padding: 15px 0; }
.survival-attributes dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.survival-attributes dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 4px 6px; border: 1px solid var(--field-line); border-radius: 3px; }
.survival-attributes dt { color: var(--field-muted); font-size: 12px; white-space: nowrap; }
.survival-attributes dd { display: flex; align-items: baseline; gap: 4px; margin: 0; color: var(--field-text); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.survival-attributes dd small { color: var(--field-accent); font-size: 10px; font-weight: 400; white-space: nowrap; }
#survival-talent { margin-top: 7px; font-size: 12px; color: var(--field-accent); }
#survival-talent:empty { display: none; }
@media (max-width: 1050px) {
  .survival-attributes dl { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .survival-attributes { grid-column: 1 / -1; border: 0; padding: 2px 0; }
  .survival-attributes h2, #survival-talent { display: none; }
  .survival-attributes dl { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .survival-attributes dl > div { padding: 1px 4px; }
  .survival-attributes dt { font-size: 10px; }
  .survival-attributes dd { font-size: 12px; }
  .survival-attributes dd small { display: none; }
  .creation-body { grid-template-columns: minmax(0, 1fr); }
  .creation-summary { border-left: 0; border-top: 1px solid var(--field-line); }
  .creation-summary header { min-height: 42px; padding: 9px 14px; }
  .creation-summary #creation-preview { padding: 10px 14px; }
  .creation-steps button { padding: 5px 7px; gap: 5px; font-size: 12px; }
  .creation-top button, .allocation-tools button, .stat-stepper button, .creation-stage .actions-row button { min-height: 44px; }
  .creation-identity :is(input, select) { font-size: 16px; }
  .loadout-shop :is(button, select) { min-height: 44px; }
  .creation-footer { flex-wrap: wrap; gap: 6px; }
  #creation-budget, #stat-left { font-size: 12px; }
  #stat-left strong { font-size: 17px; margin-left: 4px; }
}
@media (max-width: 480px) {
  #creation-stats { grid-template-columns: minmax(0, 1fr); }
  .stat-stepper button { width: 44px; }
  .talent-option { gap: 7px; padding: 8px; }
  .talent-option strong { font-size: 18px; }
}


/* === 系统/叙事界面/reader-theme.css === */
/* ==========================================================================
   余烬之城 · Ember Noir 视觉主题
   在既有样式之后加载，统一覆盖全部界面的视觉语言。
   设计语言：深炭底色 + 余烬橙主色 + 源能青辅色；阅读页为悬浮的暖白手稿。
   ========================================================================== */

:root {
  color-scheme: dark;
  /* 底色层级 */
  --bg-0: #090b0a;
  --bg-1: #0f1211;
  --bg-2: #151917;
  --bg-3: #1c211e;
  --bg-4: #252b27;
  --glass: rgba(18, 22, 20, .78);
  /* 线条 */
  --hair: rgba(240, 226, 200, .07);
  --hair-2: rgba(240, 226, 200, .13);
  --hair-3: rgba(240, 226, 200, .22);
  /* 文字 */
  --tx-1: #efe7d6;
  --tx-2: #b3ad9d;
  --tx-3: #7c7a6f;
  /* 品牌色 */
  --ember: #ee7a3e;
  --ember-2: #f6a865;
  --ember-deep: #c9472e;
  --ember-soft: rgba(238, 122, 62, .14);
  --ember-glow: rgba(238, 122, 62, .38);
  --blood: #e0583f;
  --jade: #7cbf9e;
  --jade-soft: rgba(124, 191, 158, .14);
  --crystal: #82c1d4;
  --gold: #f1c67a;
  /* 阅读纸张 */
  --sheet: #f3ecdf;
  --sheet-2: #ebe2d1;
  --sheet-ink: #2a2620;
  --sheet-muted: #7a705f;
  --sheet-line: #ddd1bb;
  /* 字体 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, "SimSun", serif;
  --sans: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  /* 形状与动效 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .03);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .88 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* 兼容旧变量：让旧组件自动进入深色体系 */
  --ground: var(--bg-1);
  --paper: var(--bg-2);
  --ink: var(--tx-1);
  --line: var(--hair-2);
  --wash: var(--bg-3);
  --stamp: var(--ember-2);
  --stamp-bg: var(--ember-soft);
  --quiet: var(--tx-2);
  --field-bg: var(--bg-0);
  --field-panel: var(--bg-1);
  --field-line: var(--hair-2);
  --field-text: var(--tx-1);
  --field-muted: var(--tx-2);
  --field-accent: var(--ember-2);
  --field-danger: var(--blood);

  /* 线性图标 */
  --i-story: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5.5C5.5 4 8.5 4 12 6c3.5-2 6.5-2 9-.5V19c-2.5-1.5-5.5-1.5-9 .5-3.5-2-6.5-2-9-.5z'/%3E%3Cpath d='M12 6v13.5'/%3E%3C/svg%3E");
  --i-map: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6.5v13L9 17l6 2.5 6-2.5v-13L15 6.5z'/%3E%3Cpath d='M9 4v13M15 6.5v13'/%3E%3C/svg%3E");
  --i-bag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1.2 12H6.2z'/%3E%3Cpath d='M9 8V6.5a3 3 0 0 1 6 0V8'/%3E%3C/svg%3E");
  --i-more: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='1.8'/%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Ccircle cx='19' cy='12' r='1.8'/%3E%3C/svg%3E");
  --i-dossier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M12 12l6-6'/%3E%3C/svg%3E");
  --i-people: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 20c.6-3.4 3-5.2 6-5.2s5.4 1.8 6 5.2'/%3E%3Cpath d='M16 4.8a3.2 3.2 0 0 1 0 6.4M18 14.8c1.7.6 2.8 2.3 3 5.2'/%3E%3C/svg%3E");
  --i-message: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3Cpath d='M8 9.5h8M8 12.5h5'/%3E%3C/svg%3E");
  --i-radio: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='16' height='11' rx='2'/%3E%3Cpath d='M7 9l9-5'/%3E%3Ccircle cx='9.5' cy='14.5' r='2'/%3E%3Cpath d='M14 13h3M14 16h3'/%3E%3C/svg%3E");
  --i-me: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='11' r='2.2'/%3E%3Cpath d='M6 16c.5-1.6 1.7-2.4 3-2.4s2.5.8 3 2.4M14 10h4M14 13.5h3'/%3E%3C/svg%3E");
  --i-equip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 5 6v5.5c0 4.6 3 8 7 9.5 4-1.5 7-4.9 7-9.5V6z'/%3E%3Cpath d='M12 8v8M9 11h6'/%3E%3C/svg%3E");
  --i-skills: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3 5 13.5h6L10 21l8-10.5h-6z'/%3E%3C/svg%3E");
  --i-camp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18M4.5 20 12 5l7.5 15'/%3E%3Cpath d='M9.5 20 12 15l2.5 5'/%3E%3C/svg%3E");
  --i-market: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 19 9l-7 12L5 9z'/%3E%3Cpath d='M5 9h14M9.5 9 12 21l2.5-12'/%3E%3C/svg%3E");
  --i-save: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11l3 3v13H5z'/%3E%3Cpath d='M8 4v5h7V4M8 20v-6h8v6'/%3E%3C/svg%3E");
  --i-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.3'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* ---------- 基础 ---------- */
html, body { background: var(--bg-0); }
body {
  color: var(--tx-1);
  font: 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: var(--grain);
  opacity: .55;
  mix-blend-mode: overlay;
}
.device { background: var(--bg-0); border: 0; }
::selection { background: rgba(238, 122, 62, .35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #3a413c transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #353c37; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #4a524c; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: .02em; }

/* 通用按钮 */
button {
  min-height: 38px;
  padding: 6px 14px;
  color: var(--tx-1);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-sm);
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
button:hover:not(:disabled) { background: rgba(255, 255, 255, .07); border-color: var(--hair-3); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .42; cursor: not-allowed; }

.primary, .next,
.primary:hover:not(:disabled), .next:hover:not(:disabled) {
  color: #fff8f1;
  border: 1px solid rgba(255, 190, 140, .28);
  background: linear-gradient(135deg, #f58b4a 0%, #e1603b 55%, #c7432c 100%);
  box-shadow: 0 10px 26px -10px var(--ember-glow), inset 0 1px 0 rgba(255, 255, 255, .22);
  font-weight: 700;
  letter-spacing: .06em;
}
.primary:hover:not(:disabled), .next:hover:not(:disabled) {
  filter: brightness(1.08) saturate(1.05);
  box-shadow: 0 14px 34px -10px rgba(238, 122, 62, .55), inset 0 1px 0 rgba(255, 255, 255, .28);
}

input:not([type=file]):not([type=checkbox]):not([type=radio]), textarea, select {
  color: var(--tx-1);
  background: #0c0f0e;
  border: 1px solid var(--hair-2);
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 12px;
  transition: border-color .18s, box-shadow .18s;
}
input:not([type=file]):not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(238, 122, 62, .65);
  box-shadow: 0 0 0 3px rgba(238, 122, 62, .16);
}
::placeholder { color: var(--tx-3); }
input[type=checkbox], input[type=radio] { accent-color: var(--ember); }
label { color: var(--tx-2); }
.muted { color: var(--tx-2); }
.label {
  color: var(--ember-2);
  font: 600 11px/1.5 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* 图标（细线描边） */
.art-icon { filter: saturate(.85) brightness(1.05); }

/* ==========================================================================
   封面
   ========================================================================== */
.title-screen {
  position: relative;
  padding: clamp(24px, 5vw, 64px);
  background:
    radial-gradient(120% 80% at 70% 30%, transparent 0%, rgba(9, 11, 10, .35) 55%, rgba(9, 11, 10, .92) 100%),
    linear-gradient(90deg, rgba(9, 11, 10, .92) 0%, rgba(9, 11, 10, .55) 38%, rgba(9, 11, 10, .05) 70%),
    linear-gradient(0deg, rgba(9, 11, 10, .95) 0%, transparent 45%),
    var(--art-cover) 62% center / cover no-repeat,
    var(--bg-0);
}
.title-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
.title-stack {
  position: relative;
  width: min(100%, 460px);
  margin: auto auto clamp(20px, 8dvh, 90px) clamp(0px, 6vw, 120px);
  gap: 14px;
  color: var(--tx-1);
  animation: rise .9s var(--ease) both;
}
.title-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: rgba(10, 12, 11, .55);
  backdrop-filter: blur(8px);
  color: var(--tx-2);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .14em;
}
.title-kicker span:first-child::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blood);
  box-shadow: 0 0 10px var(--blood);
  vertical-align: 1px;
  animation: pulse 1.6s ease-in-out infinite;
}
.title-kicker span:last-child { color: var(--ember-2); }
.title-plaque { padding: 4px 0 18px; border: 0; background: none; box-shadow: none; position: relative; }
.title-plaque::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), transparent);
  box-shadow: 0 0 14px var(--ember-glow);
}
.title-plaque p {
  color: var(--ember-2);
  font: 600 13px/1.6 var(--mono);
  letter-spacing: .5em;
}
.title-plaque h1 {
  margin-top: 2px;
  font-size: clamp(56px, 9vw, 104px);
  line-height: 1.08;
  letter-spacing: .08em;
  background: linear-gradient(180deg, #fff6e6 0%, #f2d9b6 55%, #e79a62 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 6px 30px rgba(238, 122, 62, .28));
}
.signal { top: 14px; right: 0; gap: 3px; height: 18px; }
.signal i { width: 2px; background: var(--tx-3); border-radius: 2px; animation: eq 1.2s ease-in-out infinite; }
.signal i:nth-child(2) { animation-delay: .1s; } .signal i:nth-child(3) { animation-delay: .3s; }
.signal i:nth-child(4) { background: var(--ember); animation-delay: .2s; } .signal i:nth-child(5) { animation-delay: .5s; }
.signal i:nth-child(6) { animation-delay: .15s; } .signal i:nth-child(7) { animation-delay: .4s; }
.title-hook {
  margin: 4px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-left: 2px solid var(--ember);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: linear-gradient(90deg, rgba(238, 122, 62, .1), rgba(10, 12, 11, .55) 40%);
  backdrop-filter: blur(10px);
  color: #e7dfcd;
  font: 16px/1.85 var(--serif);
}
.title-stack > button { min-height: 50px; font-size: 16px; border-radius: var(--r-md); }
#continue-run:not(.primary), #new-run:not(.primary) { background: rgba(255, 255, 255, .05); }
.title-stack > #new-run:not([hidden]) + * {}
.title-stack:has(#continue-run:not([hidden])) #new-run {
  color: var(--tx-1);
  background: rgba(14, 17, 15, .6);
  border: 1px solid var(--hair-3);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.title-stack:has(#continue-run:not([hidden])) #new-run:hover:not(:disabled) { filter: none; background: rgba(255, 255, 255, .08); }
.title-tools { gap: 10px; }
.title-tools button {
  min-height: 42px;
  color: var(--tx-2);
  background: rgba(14, 17, 15, .5);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
}
.title-tools button:hover:not(:disabled) { color: var(--tx-1); background: rgba(255, 255, 255, .08); border-color: var(--hair-3); }

/* ==========================================================================
   主框架
   ========================================================================== */
.story-screen {
  grid-template-columns: 208px minmax(0, 1fr) 288px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(238, 122, 62, .07), transparent 70%),
    var(--bg-0);
  color: var(--tx-1);
}

/* 顶栏 */
.story-screen .playerbar, .bar {
  gap: 16px;
  min-height: 62px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  color: var(--tx-1);
  background: linear-gradient(180deg, rgba(20, 24, 22, .96), rgba(14, 17, 15, .96));
  border: 0;
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}
.station-brand {
  width: 168px;
  display: flex;
  align-items: center;
  gap: 11px;
  font: 700 21px/1.2 var(--serif);
  letter-spacing: .22em;
  background: linear-gradient(180deg, #fff1dc, #eaa36c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.station-brand::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--ember-2), var(--ember-deep));
  box-shadow: 0 0 12px var(--ember-glow);
}
.identity { gap: 12px; }
.avatar {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #3a2e25, #1a1512);
  border: 1px solid rgba(238, 122, 62, .45);
  box-shadow: 0 0 0 3px rgba(238, 122, 62, .08);
  color: var(--ember-2);
  font: 700 17px var(--serif);
}
.playerbar .avatar { width: 40px; height: 40px; }
.identity strong { font-size: 15px; letter-spacing: .03em; color: var(--tx-1); }
.identity small, #player-rank {
  display: inline-block;
  margin-top: 2px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font-size: 11px;
  line-height: 18px;
  letter-spacing: .06em;
  white-space: nowrap;
}
.where { line-height: 1.35; flex-shrink: 0; white-space: nowrap; }
.where strong { font-size: 15px; color: var(--tx-1); }
.where small, #where-time { color: var(--tx-3); font: 500 12px var(--mono); letter-spacing: .06em; }
.playerbar > button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
  font-size: 0;
  position: relative;
  color: var(--tx-2);
}
.playerbar > button::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--i-more) center / contain no-repeat;
  mask: var(--i-more) center / contain no-repeat;
}
.playerbar > button:hover:not(:disabled) { color: var(--tx-1); }

/* 左侧导航 */
.story-screen .dock {
  gap: 18px;
  padding: 18px 12px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border: 0;
  border-right: 1px solid var(--hair);
}
.dock-primary, .dock-secondary { gap: 3px; }
.story-screen .dock button {
  position: relative;
  min-height: 40px;
  gap: 11px;
  padding: 8px 12px;
  color: var(--tx-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  letter-spacing: .02em;
}
.story-screen .dock button:hover:not(:disabled) { color: var(--tx-1); background: rgba(255, 255, 255, .045); border-color: transparent; }
.story-screen .dock [aria-current="page"],
.story-screen .dock [aria-current="page"]:hover:not(:disabled) {
  color: #fff3e6;
  background: linear-gradient(90deg, rgba(238, 122, 62, .2), rgba(238, 122, 62, .04));
  border-color: rgba(238, 122, 62, .25);
  font-weight: 600;
}
.story-screen .dock [aria-current="page"]::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember-glow);
}
.dock .nav-symbol, .dock .art-icon { display: none !important; }
.dock button::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: currentColor;
  opacity: .9;
  -webkit-mask: var(--ico, var(--i-story)) center / contain no-repeat;
  mask: var(--ico, var(--i-story)) center / contain no-repeat;
}
#dock-story { --ico: var(--i-story); }
.dock [data-panel="map"] { --ico: var(--i-map); }
.dock [data-panel="supplies"] { --ico: var(--i-bag); }
#dock-more { --ico: var(--i-more); }
.dock [data-panel="dossier"] { --ico: var(--i-dossier); }
.dock [data-panel="people"] { --ico: var(--i-people); }
.dock [data-panel="message"] { --ico: var(--i-message); }
.dock [data-panel="radio"] { --ico: var(--i-radio); }
.dock [data-panel="equip"] { --ico: var(--i-equip); }
.dock [data-panel="me"] { --ico: var(--i-me); }
.dock [data-panel="skills"] { --ico: var(--i-skills); }
.dock [data-panel="camp"] { --ico: var(--i-camp); }
.dock [data-panel="market"] { --ico: var(--i-market); }
.dock [data-panel="save"] { --ico: var(--i-save); }
.dock-label {
  margin: 14px 12px 6px;
  color: var(--tx-3);
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .22em;
}
.unread-count:not(:empty), #skill-count:not(:empty) {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ember);
  color: #fff;
  font: 700 11px/18px var(--mono);
  text-align: center;
  box-shadow: 0 0 10px var(--ember-glow);
}

/* 右侧生存面板 */
.survival {
  padding: 20px 18px 28px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-left: 1px solid var(--hair);
}
.survival h2, .survival-title {
  margin: 0 0 14px;
  color: var(--tx-3);
  font: 600 10.5px/1.4 var(--mono);
  letter-spacing: .22em;
}
.survival-vitals {
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
}
.vital label { color: var(--tx-2); font-size: 12.5px; align-items: baseline; }
.vital label span { display: inline-flex; align-items: center; gap: 6px; }
.vital label span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blood); box-shadow: 0 0 8px var(--blood); }
.vital:nth-child(2) label span::before { background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.vital strong { color: var(--tx-1); font: 600 13px var(--mono); }
.vital meter { height: 8px; margin-top: 7px; border-radius: 99px; overflow: hidden; background: #0a0c0b; }
.vital meter::-webkit-meter-bar { height: 8px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
#vital-hp::-webkit-meter-optimum-value, #vital-hp::-webkit-meter-suboptimum-value, #vital-hp::-webkit-meter-even-less-good-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #9e2f22, #e0583f 60%, #f58a64);
  box-shadow: 0 0 12px rgba(224, 88, 63, .55);
}
#vital-energy::-webkit-meter-optimum-value, #vital-energy::-webkit-meter-suboptimum-value, #vital-energy::-webkit-meter-even-less-good-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #3e7a5d, #7cbf9e 60%, #b6e2c6);
  box-shadow: 0 0 12px rgba(124, 191, 158, .45);
}
#vital-hp::-moz-meter-bar { background: linear-gradient(90deg, #9e2f22, #e0583f, #f58a64); border-radius: 99px; }
#vital-energy::-moz-meter-bar { background: linear-gradient(90deg, #3e7a5d, #7cbf9e, #b6e2c6); border-radius: 99px; }
.survival-attributes { padding: 4px 0 18px; border-top: 0; }
.survival-attributes dl { gap: 6px; }
.survival-attributes dl > div {
  padding: 8px 10px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .2s;
}
.survival-attributes dl > div:hover { border-color: var(--hair-3); }
.survival-attributes dt { color: var(--tx-3); font-size: 12px; }
.survival-attributes dd { color: var(--tx-1); font: 700 17px var(--mono); }
.survival-attributes dd small { color: var(--ember-2); font: 500 10px var(--mono); }
#survival-talent {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(241, 198, 122, .22);
  background: linear-gradient(90deg, rgba(241, 198, 122, .12), rgba(241, 198, 122, .02));
  color: var(--gold);
  font-size: 12.5px;
  letter-spacing: .03em;
}
.survival-events { border-top: 1px solid var(--hair); padding-top: 16px; }
#dock-events {
  min-height: 30px;
  padding: 4px 2px;
  color: var(--tx-3);
  font: 600 10.5px/1.4 var(--mono);
  letter-spacing: .22em;
  border: 0;
  background: transparent;
}
#dock-events span { font-size: 15px; color: var(--tx-2); }
#dock-events:hover, #dock-events[aria-current="page"] { color: var(--ember-2); background: transparent; border: 0; }
#survival-events { padding: 6px 0 0; color: var(--tx-2); }
#survival-events article {
  position: relative;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}
#survival-events article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember-glow);
}
#survival-events article + article { margin-top: 8px; padding-top: 11px; border-top: 1px solid var(--hair); }
#survival-events article + article::before { background: var(--tx-3); box-shadow: none; }
#survival-events strong { color: var(--tx-1); font: 600 15px/1.45 var(--serif); margin-bottom: 4px; }
#survival-events p { font-size: 12.5px; line-height: 1.65; }

/* ==========================================================================
   阅读舞台
   ========================================================================== */
.story-stage { position: relative; }
.story-screen .page-nav {
  min-height: 42px;
  gap: 14px;
  padding: 6px 16px;
  color: var(--tx-3);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  font: 500 12px var(--mono);
  letter-spacing: .1em;
}
.story-screen .page-nav button {
  width: 30px;
  min-width: 30px;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
  color: var(--tx-2);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--hair);
}
.story-screen .page-nav button:hover:not(:disabled) { color: var(--tx-1); background: rgba(255, 255, 255, .07); border-color: var(--hair-3); }
.story-screen .live-strip {
  min-height: 36px;
  padding: 5px 16px;
  color: var(--ember-2);
  background: linear-gradient(90deg, rgba(238, 122, 62, .14), rgba(238, 122, 62, .03));
  border: 0;
  border-bottom: 1px solid rgba(238, 122, 62, .2);
  font-size: 13px;
}
.story-screen .live-strip::before { background: linear-gradient(90deg, transparent, var(--ember), transparent); height: 1px; box-shadow: 0 0 10px var(--ember); }
.story-screen .live-strip.background { color: var(--crystal); background: linear-gradient(90deg, rgba(130, 193, 212, .1), transparent); border-color: rgba(130, 193, 212, .15); }
.story-screen .live-strip.background::before { background: linear-gradient(90deg, transparent, var(--crystal), transparent); }
.live-indicator { border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.story-screen .live-strip button { min-height: 26px; padding: 0 12px; border-radius: 999px; color: var(--tx-1); border-color: var(--hair-2); background: rgba(0, 0, 0, .25); }

.story-screen .reading-scroll {
  padding: clamp(14px, 2.4vw, 30px) clamp(12px, 3vw, 40px) 36px;
  background:
    radial-gradient(800px 420px at 50% 0%, rgba(238, 122, 62, .05), transparent 70%),
    var(--bg-0);
  scrollbar-color: #3a413c transparent;
}
.story-screen .story-sheet {
  max-width: 800px;
  min-height: auto;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  color: var(--sheet-ink);
  border: 0;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 220px),
    radial-gradient(140% 90% at 50% 0%, var(--sheet) 0%, var(--sheet-2) 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 240, 210, .06);
  animation: rise .5s var(--ease) both;
}
.story-screen .chapter-head {
  position: relative;
  min-height: clamp(168px, 26dvh, 250px);
  padding: 22px clamp(24px, 6%, 56px) 24px;
  border: 0;
  color: #fff4e3;
  background:
    linear-gradient(0deg, rgba(10, 12, 11, .92) 0%, rgba(10, 12, 11, .35) 55%, rgba(10, 12, 11, .1) 100%),
    linear-gradient(90deg, rgba(10, 12, 11, .55), transparent 70%),
    var(--scene-art) 70% center / cover no-repeat #141815;
}
.story-screen .chapter-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(238, 122, 62, .7), transparent);
}
.chapter-head .label, #chapter-label {
  display: inline-block;
  width: fit-content;
  padding: 3px 10px;
  border: 1px solid rgba(246, 168, 101, .35);
  border-radius: 999px;
  background: rgba(10, 12, 11, .45);
  backdrop-filter: blur(6px);
  color: var(--ember-2);
  text-shadow: none;
  font: 600 11px/1.5 var(--mono);
  letter-spacing: .18em;
}
.story-screen .chapter-head h1 {
  margin-top: 10px;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.2;
  letter-spacing: .06em;
  color: #fff6e8;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .6);
}
.story-screen .chapter-head h1::after {
  width: 56px;
  height: 2px;
  margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), transparent);
  box-shadow: 0 0 10px var(--ember-glow);
}
.story-screen .chapter-head .story-place {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  color: rgba(255, 240, 220, .72);
  font: 500 12.5px var(--mono);
  letter-spacing: .06em;
}
.story-screen .book-page { max-width: 700px; padding: clamp(24px, 4.5vw, 44px) clamp(22px, 5.5vw, 56px) 36px; }
.story-screen #story-text {
  color: var(--sheet-ink);
  font: 18.5px/2 var(--serif);
  letter-spacing: .015em;
}
.story-screen #story-text p { text-indent: 2em; }
.story-screen #story-text p + p { margin-top: .8em; }
.story-screen #story-text p:first-child::first-letter {
  font-size: 1.15em;
  color: #8a3a22;
  font-weight: 700;
}
.story-screen #story-text mark { border-radius: 3px; padding: .05em .12em; }
.story-screen #story-text .key-clue {
  background: linear-gradient(180deg, transparent 52%, rgba(238, 160, 70, .42) 52%);
  color: #5b2a14;
}
.story-screen #story-text .key-dialogue {
  background: linear-gradient(180deg, transparent 55%, rgba(110, 160, 130, .32) 55%);
  color: #23412f;
  text-decoration: none;
}
.story-cursor { background: var(--ember); border-radius: 1px; box-shadow: 0 0 8px var(--ember-glow); }
.story-wait { color: var(--sheet-muted); }
.dots i { background: var(--ember); }
.story-screen #turn-effects {
  gap: 6px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--sheet-line);
  color: var(--sheet-muted);
  font: 500 12px/1.5 var(--mono);
}
.story-screen #turn-effects span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--sheet-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: #4d463a;
}
.story-screen #turn-effects span:has(.art-success) { border-color: rgba(70, 140, 100, .35); background: rgba(124, 191, 158, .16); color: #24533a; }
.story-screen #turn-effects span:has(.art-danger) { border-color: rgba(200, 80, 55, .35); background: rgba(224, 88, 63, .1); color: #8a2e1c; }
.story-screen #turn-effects .art-icon { margin: 0; width: 14px; height: 14px; }
.story-screen #story-loot { gap: 10px; margin-top: 14px; }
.story-screen #story-loot button {
  margin: 0;
  padding: 10px 12px;
  color: var(--sheet-ink);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--sheet-line);
  border-left: 3px solid var(--ember);
  border-radius: 10px;
  box-shadow: 0 6px 16px -10px rgba(60, 40, 20, .35);
}
.story-screen #story-loot button:hover:not(:disabled) { background: #fff; border-color: #cdbd9f; border-left-color: var(--ember-deep); transform: translateY(-1px); }
.story-screen #story-loot small { color: var(--sheet-muted); }
.story-screen .encounter-status, .book-page .encounter-status {
  margin-bottom: 20px;
  padding: 10px 14px;
  gap: 6px 16px;
  color: #ffe2d4;
  border: 1px solid rgba(224, 88, 63, .5);
  border-left: 3px solid var(--blood);
  border-radius: 10px;
  background: linear-gradient(90deg, #3d1710, #23110c);
  box-shadow: 0 10px 24px -12px rgba(160, 40, 20, .6);
  font: 500 13px var(--sans);
}
.encounter-status b { color: #fff; }

/* 行动栏 */
.story-screen .foot {
  position: relative;
  padding: 12px clamp(12px, 3vw, 40px) 14px;
  color: var(--tx-2);
  background: linear-gradient(180deg, rgba(15, 18, 16, .92), rgba(11, 13, 12, .98));
  border: 0;
  border-top: 1px solid var(--hair);
  box-shadow: 0 -18px 40px -20px rgba(0, 0, 0, .8);
}
.story-screen .foot .choice-head, .story-screen .foot .story-choices, .story-screen .foot .free-action { max-width: 800px; }
.choice-head { min-height: 30px; margin-bottom: 4px; }
#turn-status, .story-screen .foot #turn-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--tx-3);
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .2em;
}
#turn-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.story-screen .foot .choice-head button {
  min-height: 28px;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--tx-2);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--hair-2);
}
.story-screen .foot .choice-head button:hover:not(:disabled) { color: var(--tx-1); border-color: var(--hair-3); }
.story-screen .foot #enable-host { color: var(--ember-2); border-color: rgba(238, 122, 62, .35); background: var(--ember-soft); }
.story-screen .foot #retry-story { color: var(--ember-2); }
.story-screen .foot .story-choices { gap: 8px; max-height: min(22dvh, 176px); padding: 4px 1px 10px; }
.story-screen .foot .story-choices .choice:last-child:nth-child(odd) { grid-column: 1 / -1; }
.story-screen .foot .choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px 10px 12px;
  color: var(--tx-1);
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
}
.story-screen .foot .choice span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font: 700 11px var(--mono);
}
.story-screen .foot .choice:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(238, 122, 62, .14), rgba(238, 122, 62, .05));
  border-color: rgba(238, 122, 62, .45);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -14px var(--ember-glow);
}
.story-screen .foot .free-action { gap: 8px; align-items: stretch; }
.story-screen .foot .free-action textarea {
  min-height: 50px;
  max-height: 120px;
  padding: 13px 16px;
  color: var(--tx-1);
  background: #0a0c0b;
  border: 1px solid var(--hair-2);
  border-radius: 14px;
  font: 15px/1.6 var(--sans);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5);
  resize: none;
}
.story-screen .foot .free-action textarea:focus { border-color: rgba(238, 122, 62, .6); box-shadow: 0 0 0 3px rgba(238, 122, 62, .14), inset 0 1px 3px rgba(0, 0, 0, .5); }
.story-screen #act-submit, .story-screen #continue-scene { min-width: 84px; border-radius: 14px; padding-inline: 18px; font-size: 15px; }
.story-screen .foot #continue-scene { color: var(--tx-2); background: rgba(255, 255, 255, .03); border-color: var(--hair-2); }
.story-screen .foot #continue-scene:hover:not(:disabled) { color: var(--tx-1); background: rgba(255, 255, 255, .07); }

/* ==========================================================================
   工作区（地图 / 背包 / 技能 / 事件 / 局势）
   ========================================================================== */
.story-screen .workspace {
  color: var(--tx-1);
  background:
    radial-gradient(900px 420px at 30% -10%, rgba(238, 122, 62, .06), transparent 70%),
    var(--bg-0);
}
.workspace-head {
  padding: 20px clamp(16px, 3vw, 40px) 16px;
  border-bottom: 1px solid var(--hair);
}
.workspace-head h1 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: .08em; color: var(--tx-1); }
.workspace-head h1::before {
  content: "LINCHUAN · FIELD FILE";
  display: block;
  margin-bottom: 4px;
  color: var(--ember-2);
  font: 600 10.5px/1.4 var(--mono);
  letter-spacing: .26em;
}
.workspace-head button { border-radius: 999px; padding: 6px 16px; color: var(--tx-2); }
.workspace-content { padding: 22px clamp(16px, 3vw, 40px) 40px; }

.file-card, .workspace .file-card, #sheet .file-card {
  position: relative;
  margin-bottom: 10px;
  padding: 16px 18px;
  color: var(--tx-1);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .8);
}
.file-card h3 { margin-bottom: 6px; color: var(--tx-1); font-size: 18px; display: flex; align-items: center; gap: 6px; }
.file-card p { color: var(--tx-2); line-height: 1.75; }
.file-card p + p { margin-top: 8px; }
.file-card.text { color: var(--tx-1); font: 15.5px/1.9 var(--serif); }
.actions-row, .sheet-tabs { gap: 8px; margin: 12px 0; }
.sheet-tabs button, .actions-row button:not(.primary) { border-radius: 999px; padding: 5px 14px; font-size: 13px; color: var(--tx-2); }
.sheet-tabs button:hover:not(:disabled), .actions-row button:not(.primary):hover:not(:disabled) { color: var(--tx-1); }

/* 地图 */
.map-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid rgba(238, 122, 62, .28);
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font-size: 12.5px;
}
.map-location::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--i-pin) center / contain no-repeat; mask: var(--i-pin) center / contain no-repeat; }
.map-layout, .bag-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, .62fr); gap: 18px; }
.map-board {
  position: relative;
  grid-template-rows: repeat(3, minmax(104px, auto));
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 300px at 50% 50%, rgba(130, 193, 212, .06), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(130, 193, 212, .055) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(130, 193, 212, .055) 23px 24px),
    #0b0f0e;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .6);
}
.map-board::before {
  content: "N ↑";
  position: absolute;
  top: 8px;
  right: 12px;
  color: rgba(130, 193, 212, .45);
  font: 600 10px var(--mono);
  letter-spacing: .2em;
}
.map-node {
  position: relative;
  min-height: 86px;
  gap: 6px;
  align-content: space-between;
  padding: 10px 10px;
  color: var(--tx-1);
  background: linear-gradient(180deg, rgba(22, 27, 25, .95), rgba(15, 19, 17, .95));
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .9);
}
.map-node small { color: var(--tx-3); font: 500 10.5px/1.3 var(--mono); letter-spacing: .04em; }
.map-node strong { color: var(--tx-1); font: 600 13.5px/1.35 var(--serif); }
.map-node:hover:not(:disabled) { border-color: rgba(130, 193, 212, .45); background: linear-gradient(180deg, rgba(28, 36, 34, .98), rgba(17, 22, 20, .98)); transform: translateY(-2px); }
.map-node[data-locked="true"]:not([data-current="true"]) {
  color: var(--tx-3);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .02) 0 6px, transparent 6px 12px), rgba(12, 15, 14, .9);
  border-style: dashed;
}
.map-node[data-locked="true"]:not([data-current="true"]) strong { color: var(--tx-3); }
.map-node[aria-pressed="true"] { border-color: var(--crystal); box-shadow: 0 0 0 1px var(--crystal), 0 12px 28px -14px rgba(130, 193, 212, .5); }
.map-node[data-current="true"] { border-color: rgba(238, 122, 62, .75); background: linear-gradient(180deg, rgba(64, 32, 18, .96), rgba(28, 18, 13, .96)); }
.map-node[data-current="true"] strong { color: #fff6e8; }
.map-node[data-current="true"] small { color: var(--ember-2); font-weight: 700; padding-right: 16px; }
.map-node[data-current="true"]::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 var(--ember-glow);
  animation: beacon 1.8s ease-out infinite;
}
.map-detail { border-top: 1px solid var(--hair); position: sticky; top: 0; overflow: hidden; }
.map-detail::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--crystal), transparent);
}
.map-detail h3 { font-size: 22px; margin: 4px 0 8px; }
.map-detail .primary { width: 100%; min-height: 46px; margin-top: 14px; border-radius: var(--r-md); }
.map-detail .map-blocked { color: var(--ember-2); }

/* 背包 */
.bag-summary { align-items: center; }
.bag-summary b { font: 600 18px var(--serif); }
.bag-summary > span:not(.label) { color: var(--tx-3); font: 500 12px var(--mono); display: inline-flex; align-items: center; gap: 4px; }
.bag-filters { gap: 6px; margin: 14px 0 18px; }
.bag-filters button { min-height: 32px; padding: 3px 14px; border-radius: 999px; font-size: 13px; color: var(--tx-2); }
.bag-filters [aria-pressed="true"], .bag-filters [aria-pressed="true"]:hover:not(:disabled) {
  color: #fff3e6;
  background: linear-gradient(135deg, rgba(238, 122, 62, .32), rgba(238, 122, 62, .14));
  border-color: rgba(238, 122, 62, .55);
}
.bag-group h3 { margin-bottom: 10px; color: var(--tx-3); font: 600 10.5px var(--mono); letter-spacing: .22em; }
.bag-layout .bag-grid, .bag-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.bag-layout .bag-cell, .bag-cell {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.bag-cell:hover:not(:disabled) { border-color: var(--hair-3); transform: translateY(-1px); }
.bag-cell[aria-pressed=true] { border-color: rgba(238, 122, 62, .6); background: linear-gradient(180deg, rgba(238, 122, 62, .16), rgba(238, 122, 62, .05)); box-shadow: 0 10px 26px -16px var(--ember-glow); }
.bag-mark { width: 38px; height: 38px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--hair); padding: 5px; }
.bag-cell strong { color: var(--tx-1); font-size: 13.5px; }
.bag-cell small { color: var(--ember-2); font: 600 12px var(--mono); }
.bag-inspect { position: sticky; top: 0; border-top: 1px solid var(--hair); overflow: hidden; }
.bag-inspect::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--ember), transparent); }
.bag-inspect h3 .art-icon { width: 28px; height: 28px; }
.bag-status { color: var(--ember-2); }
.bag-quantity { color: var(--tx-2); }
.bag-ground-row { border-color: var(--hair); }

/* 技能 */
.skill-balance { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--hair); }
.skill-balance strong { color: var(--tx-2); font-size: 14px; }
.skill-balance b {
  margin-left: 10px;
  font: 700 30px var(--mono);
  background: linear-gradient(180deg, #fff1dc, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skill-grid { gap: 12px; }
.skill-grid .skill-card { padding: 18px; }
.skill-card header span {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font: 700 12px var(--mono);
}
.skill-card .label { margin-top: 10px; color: var(--crystal); }

/* 局势与情报 */
.soul-section { margin-bottom: 26px; }
.soul-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--tx-2);
  font: 600 13px/1.4 var(--sans);
  letter-spacing: .14em;
}
.soul-heading::before { content: ""; width: 14px; height: 2px; background: var(--ember); box-shadow: 0 0 8px var(--ember-glow); }
.soul-heading::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair-2), transparent); }
.soul-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.soul-card { margin: 0; transition: border-color .2s, transform .2s var(--ease); }
.soul-card:hover { border-color: var(--hair-3); transform: translateY(-1px); }
.soul-card header { align-items: center; margin-bottom: 8px; }
.soul-card header h3 { font-size: 17px; margin: 0; }
.workspace .file-card.soul-act, .soul-act {
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(238, 122, 62, .32);
  background:
    linear-gradient(110deg, rgba(238, 122, 62, .22) 0%, rgba(238, 122, 62, .05) 48%, rgba(10, 12, 11, .75) 100%),
    linear-gradient(0deg, rgba(9, 11, 10, .78), rgba(9, 11, 10, .48)),
    var(--art-cover) 60% 40% / cover;
}
.soul-act h3 { font-size: 26px; letter-spacing: .1em; margin: 6px 0 6px; }
.soul-act .muted { color: #dfd4be; }
.workspace .file-card.deduction-card, .deduction-card {
  border-color: rgba(124, 191, 158, .32);
  background: linear-gradient(180deg, rgba(124, 191, 158, .12), rgba(124, 191, 158, .025));
}
.deduction-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--jade); box-shadow: 0 0 10px rgba(124, 191, 158, .5); }
.deduction-card p { color: #d6dccf; }
.soul-tag {
  flex: 0 0 auto;
  padding: 2px 10px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--tx-2);
  font: 600 11px/1.6 var(--mono);
  letter-spacing: .04em;
}
.soul-tag.good { color: #a9e0c4; border-color: rgba(124, 191, 158, .4); background: var(--jade-soft); }
.soul-tag.warn { color: #ffb59c; border-color: rgba(224, 88, 63, .45); background: rgba(224, 88, 63, .12); }
.soul-tag.mid { color: var(--gold); border-color: rgba(241, 198, 122, .3); background: rgba(241, 198, 122, .08); }
.clock-pips { gap: 5px; margin: 6px 0 10px; }
.clock-pips i { height: 6px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.clock-pips i.on { background: linear-gradient(90deg, var(--ember-deep), var(--ember-2)); box-shadow: 0 0 10px var(--ember-glow); }

/* ==========================================================================
   弹窗 / 抽屉
   ========================================================================== */
dialog { color: var(--tx-1); }
dialog::backdrop, #event-pop::backdrop { background: rgba(4, 6, 5, .62); backdrop-filter: blur(6px); }
#sheet, #api-sheet {
  width: min(780px, calc(100% - 32px));
  height: min(88dvh, 880px);
  border: 1px solid var(--hair-2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(22, 26, 24, .97), rgba(13, 16, 14, .98));
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03);
  overflow: hidden;
}
#api-sheet { height: auto; max-width: 560px; }
.sheet-top, #sheet .bar, #api-sheet .bar {
  min-height: 64px;
  padding: 14px 20px;
  background: transparent;
  border-bottom: 1px solid var(--hair);
  box-shadow: none;
}
.sheet-top h2 { font-size: 21px; letter-spacing: .08em; color: var(--tx-1); }
.sheet-top button { border-radius: 999px; padding: 5px 14px; color: var(--tx-2); font-size: 13px; }
#sheet-content, .api-fields { padding: 20px 22px max(24px, env(safe-area-inset-bottom)); }
.api-fields { gap: 9px; }
.api-fields label { color: var(--tx-2); font-size: 13px; margin-top: 4px; }
#api-result { color: var(--ember-2); font-size: 13px; }

.people-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.person-card {
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  box-shadow: none;
}
.person-card:hover:not(:disabled) { border-color: rgba(238, 122, 62, .4); transform: translateY(-2px); box-shadow: 0 14px 30px -18px var(--ember-glow); }
.person-card .avatar { width: 46px; height: 46px; font-size: 19px; }
.person-card strong { font: 600 16px var(--serif); color: var(--tx-1); }
.person-card small { color: var(--tx-3); font-size: 12px; margin-top: 2px; }
.person-header { gap: 16px; padding: 20px; border: 1px solid rgba(238, 122, 62, .25); background: linear-gradient(110deg, rgba(238, 122, 62, .14), rgba(255, 255, 255, .02) 60%); }
.person-header .avatar { width: 64px; height: 64px; font-size: 28px; }
.person-header h3 { font-size: 26px; }
.sheet-actions { gap: 8px; }
.sheet-action {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.sheet-action strong { color: var(--tx-1); font-size: 14.5px; }
.sheet-action small { color: var(--tx-3); font-size: 12.5px; margin-top: 2px; }
.sheet-action:hover:not(:disabled) { border-color: rgba(238, 122, 62, .45); background: linear-gradient(180deg, rgba(238, 122, 62, .12), rgba(238, 122, 62, .03)); }
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border: 1px solid var(--hair);
  border-radius: 16px 16px 16px 4px;
  background: var(--bg-3);
  color: var(--tx-1);
  line-height: 1.7;
}
.bubble.mine { border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, rgba(238, 122, 62, .26), rgba(238, 122, 62, .12)); border-color: rgba(238, 122, 62, .35); }
.bubble small { color: var(--tx-3); font: 500 10.5px var(--mono); margin-bottom: 3px; }
.chat-form { gap: 8px; position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(0deg, rgba(13, 16, 14, 1) 70%, transparent); }
.chat-form button { border-radius: 10px; }
.ability-file { border-color: rgba(130, 193, 212, .25); background: linear-gradient(180deg, rgba(130, 193, 212, .08), rgba(255, 255, 255, .015)); }
.ability-file::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 12px 12px 0 0; background: linear-gradient(90deg, var(--crystal), transparent); }
.ability-file h3 { font-size: 26px; }
.ability-file .rank-stamp { padding: 2px 10px; border: 1px solid rgba(130, 193, 212, .4); border-radius: 999px; background: rgba(130, 193, 212, .1); color: var(--crystal); font: 600 11px var(--mono); }
.ability-details { gap: 8px; margin-top: 12px; }
.ability-details p { padding: 10px 12px; border: 1px solid var(--hair); border-radius: 10px; background: rgba(0, 0, 0, .25); color: var(--tx-2); }
.ability-details b { color: var(--tx-1); }
.loadout-fields div { grid-template-columns: minmax(0, 6em) minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px dashed var(--hair); }
.loadout-fields div:first-child { border-top: 0; }
.loadout-fields dt { color: var(--ember-2); font-weight: 600; font-size: 12.5px; }
.loadout-fields dd { color: var(--tx-1); }
.log-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-color: var(--hair); }
.log-row button { min-height: 30px; padding: 2px 10px; border-radius: 8px; font-size: 13px; }
.motion-settings label { color: var(--tx-1); }

/* 事件卡 */
#event-pop {
  width: min(480px, calc(100% - 36px));
  height: fit-content;
  max-height: calc(100dvh - 48px);
  border: 1px solid rgba(238, 122, 62, .35);
  border-radius: 22px;
  background: linear-gradient(180deg, #1c1714, #110f0d);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 80px -20px var(--ember-glow);
  overflow: auto;
}
.event-card { position: relative; padding: 30px 28px 26px; border: 0; }
.event-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 160px;
  background: radial-gradient(400px 160px at 50% 0%, rgba(238, 122, 62, .3), transparent 70%);
  pointer-events: none;
}
.event-card header { position: relative; }
.event-card .label, #event-channel {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid rgba(238, 122, 62, .45);
  border-radius: 999px;
  background: rgba(238, 122, 62, .12);
}
.event-card h2 {
  margin-top: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--hair);
  font-size: clamp(26px, 5vw, 34px);
  background: linear-gradient(180deg, #fff3e2, #f0b27c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.event-card > p { position: relative; color: #ddd3c1; font: 16px/1.9 var(--serif); margin: 16px 0; }
#event-effects span { padding: 3px 10px; border: 1px solid var(--hair-2); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--tx-2); font: 500 11.5px var(--mono); }
.event-card button { min-height: 48px; border-radius: 14px; }

/* 来信 / 提示 / 弹幕 */
.message-pop {
  gap: 12px;
  padding: 12px 14px;
  color: var(--tx-1);
  border: 1px solid var(--hair-2);
  border-left: 3px solid var(--ember);
  border-radius: 16px;
  background: rgba(20, 24, 22, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9);
}
.message-pop strong { color: var(--tx-1); }
.message-pop p { color: var(--tx-2); }
.pop-actions button { border-radius: 8px; }
.pop-actions button:first-child { color: var(--ember-2); border-color: rgba(238, 122, 62, .4); background: var(--ember-soft); }
#notice {
  color: var(--tx-1);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  background: rgba(20, 24, 22, .94);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .85);
  font-size: 13px;
  padding: 10px 14px;
}
.signal-tape {
  padding: 6px 12px;
  color: var(--tx-1);
  border: 1px solid var(--hair-2);
  border-left: 2px solid var(--crystal);
  border-radius: 10px;
  background: rgba(16, 20, 18, .9);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9);
  font-size: 12.5px;
}
.signal-tape b { color: var(--crystal); font: 600 10.5px var(--mono); letter-spacing: .12em; }
.signal-tape.warn { color: #ffe3d6; border-color: rgba(224, 88, 63, .4); border-left-color: var(--blood); background: rgba(40, 18, 13, .92); }
.signal-tape.warn b { color: #ff9f86; }

/* ==========================================================================
   建卡
   ========================================================================== */
.setup-screen {
  color: var(--tx-1);
  background:
    linear-gradient(180deg, rgba(9, 11, 10, .82), rgba(9, 11, 10, .97) 70%),
    var(--art-cover) center 60% / cover,
    var(--bg-0);
}
.creation-top { min-height: 58px; }
.creation-top b { color: var(--tx-2); font: 600 12px var(--mono); letter-spacing: .2em; }
.creation-top b span { color: var(--ember); }
.creation-top button { border-radius: 999px; font-size: 13px; color: var(--tx-2); }
.creation-shell {
  border: 1px solid var(--hair-2);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 24, 22, .92), rgba(13, 16, 14, .95));
  backdrop-filter: blur(16px);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .95);
}
.creation-head { padding: clamp(20px, 3vw, 34px); border-bottom: 1px solid var(--hair); }
.creation-head h1 {
  margin-bottom: 22px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: .1em;
  background: linear-gradient(180deg, #fff3e2, #eeb27e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.creation-steps { gap: 8px; }
.creation-steps button {
  position: relative;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .02);
  color: var(--tx-3);
}
.creation-steps button span { color: var(--tx-3); font: 700 12px var(--mono); }
.creation-steps [aria-current="step"] {
  color: var(--tx-1);
  border-color: rgba(238, 122, 62, .55);
  background: linear-gradient(135deg, rgba(238, 122, 62, .22), rgba(238, 122, 62, .05));
  box-shadow: 0 10px 26px -16px var(--ember-glow);
}
.creation-steps [aria-current="step"] span { color: var(--ember-2); }
.creation-summary { border-left: 1px solid var(--hair); background: rgba(0, 0, 0, .2); }
.creation-summary header { min-height: 130px; border-bottom: 1px solid var(--hair); background: linear-gradient(0deg, rgba(13, 16, 14, .96), rgba(13, 16, 14, .2)), var(--art-hospital) center / cover; }
.creation-summary header h2 { color: var(--ember-2); font: 600 12px var(--mono); letter-spacing: .26em; }
.preview-name { font: 700 26px/1.35 var(--serif); }
.preview-talent { border-color: var(--hair); }
.preview-talent h3 { color: var(--tx-3); font: 600 10.5px var(--mono); letter-spacing: .2em; }
.creation-identity { max-width: 620px; gap: 12px; }
.creation-identity label { color: var(--tx-2); font-weight: 600; font-size: 13px; margin: 0 0 6px; }
.creation-identity label:not(:first-child) { margin-top: 0; }
.creation-identity :is(input, select, textarea) { border-radius: var(--r-md); background: #0a0c0b; border-color: var(--hair-2); color: var(--tx-1); }
.creation-identity :is(input, select) { min-height: 46px; font-size: 15px; }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.identity-bg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.identity-bg-head label { margin: 0; }
#bg-random {
  min-height: 32px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ember-2);
  border-color: rgba(238, 122, 62, .35);
  background: var(--ember-soft);
}
#bg-random:hover:not(:disabled) { background: rgba(238, 122, 62, .22); border-color: rgba(238, 122, 62, .55); }
#intake-bg { min-height: 92px; line-height: 1.7; font-size: 14.5px; }
.identity-note { font-size: 12px; line-height: 1.6; color: var(--tx-3); }
#bg-eval-status { font-size: 12.5px; color: var(--ember-2); }
.preview-meta { margin-top: 4px; color: var(--ember-2); font: 500 12.5px var(--mono); letter-spacing: .04em; }
.preview-verdict {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(124, 191, 158, .25);
  background: rgba(124, 191, 158, .08);
  color: #cbe2d4;
  font-size: 12px;
  line-height: 1.55;
}
.preview-verdict.warn { border-color: rgba(224, 88, 63, .38); background: rgba(224, 88, 63, .1); color: #ffc5b0; }
.bg-bonus-tag {
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--jade-soft);
  border: 1px solid rgba(124, 191, 158, .35);
  color: #a9e0c4;
  font: 600 10.5px var(--mono);
  vertical-align: 2px;
}
.gear-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gear-head h2 { margin: 0; font-size: 18px; }
.gear-kind-pill {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .04);
  color: var(--tx-2);
  font: 500 11px var(--mono);
}
.gear-compact { padding: 13px 16px; }
.gear-compact .loadout-numbers { margin: 7px 0 3px; font: 600 13px var(--mono); color: var(--ember-2); }
.gear-brief { margin: 4px 0 0; font-size: 13px; line-height: 1.6; color: var(--tx-2); }
.gear-high { border-color: rgba(241, 198, 122, .35); background: linear-gradient(115deg, rgba(241, 198, 122, .08), rgba(255, 255, 255, .015) 55%); }
.gear-high .loadout-numbers { margin: 8px 0 6px; font: 600 13px var(--mono); color: var(--gold); }
.talent-tools p { color: var(--ember-2); }
.talent-tools button, .loadout-shop button, .loadout-shop select:not([type]), .allocation-tools button, .stat-stepper button, .creation-footer button:not(.primary) {
  border-radius: 10px;
  color: var(--tx-1);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hair-2);
}
.talent-tools button:hover:not(:disabled), .loadout-shop button:hover:not(:disabled), .allocation-tools button:hover:not(:disabled), .stat-stepper button:hover:not(:disabled), .creation-footer button:not(.primary):hover:not(:disabled) {
  background: rgba(255, 255, 255, .08);
  border-color: var(--hair-3);
}
.loadout-shop { border-color: var(--hair); }
.custom-talent-box {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(130, 193, 212, .26);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(130, 193, 212, .08), rgba(255, 255, 255, .015) 60%);
}
.custom-talent-head { display: flex; flex-direction: column; gap: 2px; }
.custom-talent-head strong { font: 700 14px var(--serif); color: var(--crystal); letter-spacing: .04em; }
.custom-talent-head small { font-size: 12px; }
.custom-talent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.custom-talent-row input, .custom-talent-box textarea { background: #0a0c0b; border-color: var(--hair-2); border-radius: 10px; font-size: 14px; }
.custom-talent-box textarea { min-height: 62px; }
#custom-talent-submit {
  padding-inline: 16px;
  border-radius: 10px;
  color: var(--crystal);
  border-color: rgba(130, 193, 212, .4);
  background: rgba(130, 193, 212, .12);
  font-weight: 600;
}
#custom-talent-submit:hover:not(:disabled) { background: rgba(130, 193, 212, .22); border-color: rgba(130, 193, 212, .65); }
.loadout-talent.unaffordable { opacity: .48; }
.talent-price-pill { padding: 3px 10px; border-radius: 999px; font: 700 12px var(--mono); }
.talent-price-pill.custom { color: var(--crystal); border-color: rgba(130, 193, 212, .45); background: rgba(130, 193, 212, .14); }
#stat-buy { color: var(--ember-2); border-color: rgba(238, 122, 62, .38); background: var(--ember-soft); }
#stat-buy:hover:not(:disabled) { background: rgba(238, 122, 62, .22); }
.stat-pips { grid-template-columns: repeat(7, 1fr); }
.talent-list { gap: 10px; }
.loadout-talent { border: 1px solid var(--hair); border-radius: var(--r-md); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.loadout-talent:hover { border-color: var(--hair-3); }
.loadout-talent:has(:checked) { border-color: rgba(238, 122, 62, .6); box-shadow: 0 14px 34px -18px var(--ember-glow), inset 3px 0 0 var(--ember); }
.talent-option, .loadout-talent .talent-option { padding: 12px 16px; background: transparent; border: 0; border-radius: 0; }
.talent-option:has(:checked) { background: linear-gradient(90deg, rgba(238, 122, 62, .1), transparent 70%); box-shadow: none; }
.talent-option strong { font: 700 19px/1.35 var(--serif); }
.talent-option small { color: var(--tx-2); }
.talent-option b { border-radius: 999px; border-color: rgba(238, 122, 62, .35); background: var(--ember-soft); color: var(--ember-2); font: 600 11px var(--mono); }
.talent-grade {
  min-width: 28px;
  min-height: 26px;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
  box-shadow: 0 0 14px -4px currentColor;
  font: 800 13px/1 var(--mono);
}
.talent-grade[data-rank="F"] { color: #9b9d93; }
.talent-grade[data-rank="E"] { color: #9fb6d9; }
.talent-grade[data-rank="D"] { color: #a9cf86; }
.talent-grade[data-rank="C"] { color: #74d4b5; }
.talent-grade[data-rank="B"] { color: #78bff0; }
.talent-grade[data-rank="A"] { color: #d79bf2; }
.talent-grade[data-rank="S"] {
  color: #ffd27c;
  background: linear-gradient(135deg, rgba(255, 210, 124, .35), rgba(238, 122, 62, .25));
  animation: shimmer 2.4s ease-in-out infinite;
}
.loadout-talent:has(.talent-grade[data-rank="S"]) { border-color: rgba(255, 210, 124, .45); background: linear-gradient(110deg, rgba(255, 210, 124, .1), transparent 60%); }
.loadout-talent:has(.talent-grade[data-rank="A"]) { border-color: rgba(215, 155, 242, .3); }
.loadout-talent details { color: var(--tx-2); padding: 0 16px 12px; }
.loadout-talent summary { color: var(--tx-3); font-size: 12.5px; }
#creation-stats { gap: 12px; }
.stat-card { padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-md); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)); }
.stat-sign { flex-basis: 30px; height: 30px; border-radius: 8px; background: var(--ember-soft); color: var(--ember-2); font: 700 14px var(--serif); }
.stat-stepper output { font: 700 22px var(--mono); }
.stat-stepper button { border-radius: 8px; }
.stat-pips { gap: 5px; }
.stat-pips i { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.stat-pips i.filled { background: linear-gradient(90deg, var(--ember-deep), var(--ember-2)); box-shadow: 0 0 8px var(--ember-glow); }
.creation-footer { min-height: 70px; gap: 12px; background: rgba(10, 12, 11, .92); backdrop-filter: blur(14px); border-top: 1px solid var(--hair); }
.creation-footer button { min-height: 46px; border-radius: 12px; }
#creation-budget, #stat-left { color: var(--ember-2); font: 600 13px var(--mono); }
#stat-left strong { font-size: 24px; }
.creation-stage .intake-file, .intake-file { color: var(--tx-1); border: 1px solid var(--hair-2); border-radius: var(--r-md); box-shadow: none; }

/* ==========================================================================
   动效
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(238, 122, 62, .6); } 100% { box-shadow: 0 0 0 12px rgba(238, 122, 62, 0); } }
@keyframes shimmer { 0%, 100% { box-shadow: 0 0 12px -4px #ffd27c; } 50% { box-shadow: 0 0 20px 0 #ffd27c; } }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (min-width: 1440px) {
  .story-screen { grid-template-columns: 228px minmax(0, 1fr) 310px; }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .story-screen { grid-template-columns: 172px minmax(0, 1fr) 220px; }
  .station-brand { width: 130px; font-size: 18px; letter-spacing: .14em; }
  .survival { padding: 16px 12px; }
  .survival-attributes dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  body::after { opacity: .35; }
  .station-brand { display: none; }
  .title-stack { margin: auto auto 20px; }
  .title-plaque h1 { font-size: clamp(52px, 17vw, 76px); }
  .story-screen { grid-template-columns: minmax(0, 1fr); }
  .story-screen .playerbar { min-height: 54px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; gap: 10px; }
  .playerbar .avatar { width: 34px; height: 34px; font-size: 15px; }
  .identity { gap: 9px; }
  .identity strong { font-size: 14px; }
  .where strong { font-size: 13.5px; }
  .where small, #where-time { font-size: 11px; }
  .survival { padding: 7px 12px; gap: 5px; border: 0; border-bottom: 1px solid var(--hair); background: var(--bg-1); }
  .survival-vitals { padding: 0; border: 0; background: none; gap: 10px; margin: 0; }
  .vital meter { height: 5px; margin-top: 3px; }
  .survival-attributes { padding: 0; }
  .survival-attributes dl { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
  .survival-attributes dl > div { padding: 3px 4px; border-radius: 7px; }
  .survival-attributes dd { font-size: 12px; }
  .survival-events { padding-top: 4px; }
  #survival-events article { padding: 0; border: 0; background: none; }
  #survival-events article::before { display: none; }
  #survival-events strong { font-size: 12.5px; }
  .story-screen .page-nav { min-height: 32px; padding: 3px 12px; }
  .story-screen .reading-scroll { padding: 0; }
  .story-screen .story-sheet { border-radius: 0; box-shadow: none; min-height: 100%; }
  .story-screen .chapter-head { min-height: 98px; padding: 12px 18px 14px; }
  .story-screen .chapter-head h1 { font-size: 26px; margin-top: 6px; }
  .story-screen .chapter-head h1::after { margin-top: 7px; }
  .story-screen .chapter-head .story-place { margin-top: 6px; font-size: 11.5px; }
  .story-screen .book-page { padding: 18px 18px 24px; }
  .story-screen #story-text { font-size: 16.5px; line-height: 1.9; }
  .story-screen .foot { padding: 7px 10px 8px; }
  .story-screen .foot .story-choices { grid-template-columns: 1fr; max-height: 108px; gap: 5px; padding: 2px 1px 7px; }
  .story-screen .foot .choice { min-height: 36px; padding: 6px 10px 6px 8px; font-size: 13px; align-items: center; }
  .story-screen .foot .free-action textarea { height: 42px; min-height: 42px; font-size: 16px; line-height: 1.35; padding: 9px 12px; }
  .story-screen #act-submit, .story-screen #continue-scene { min-width: 58px; min-height: 42px; padding-inline: 12px; font-size: 14px; }
  .story-screen .dock { padding: 4px 6px max(4px, env(safe-area-inset-bottom)); background: rgba(12, 15, 13, .97); backdrop-filter: blur(14px); border: 0; border-top: 1px solid var(--hair); }
  .story-screen .dock button { flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 4px; font-size: 11px; border-radius: 10px; }
  .story-screen .dock button::before { width: 20px; height: 20px; }
  .story-screen .dock [aria-current="page"] { background: transparent; border-color: transparent; color: var(--ember-2); }
  .story-screen .dock [aria-current="page"]::after { left: 30%; right: 30%; top: 0; bottom: auto; width: auto; height: 2px; border-radius: 0 0 3px 3px; }
  .dock-primary button > span:not(.nav-symbol):not(.unread-count) { display: inline; }
  #dock-more .unread-count:not(:empty) { position: absolute; top: 4px; right: calc(50% - 22px); margin: 0; }
  .story-screen .dock:has(#dock-more[aria-expanded="true"]) .dock-secondary {
    right: 8px;
    bottom: calc(100% + 8px);
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--hair-2);
    border-radius: 18px;
    background: rgba(18, 22, 20, .97);
    backdrop-filter: blur(16px);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .95);
    animation: rise .22s var(--ease) both;
  }
  .story-screen .dock-secondary button { flex-direction: row; justify-content: flex-start; gap: 11px; min-height: 44px; padding: 8px 12px; font-size: 14px; }
  .story-screen .dock-secondary button::before { width: 18px; height: 18px; }
  .dock-label { margin: 10px 10px 4px; }
  .workspace-head { padding: 14px 16px 12px; }
  .workspace-content { padding: 16px 14px 28px; }
  .map-layout, .bag-layout { grid-template-columns: minmax(0, 1fr); }
  .map-board { padding: 10px; gap: 6px; grid-template-rows: repeat(3, minmax(74px, auto)); }
  .map-node { min-height: 68px; padding: 7px 8px; }
  .map-node strong { font-size: 12px; }
  .map-node small { font-size: 9.5px; }
  .soul-grid { grid-template-columns: 1fr; }
  #sheet, #api-sheet { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  #notice { border-radius: 0; border: 0; border-bottom: 1px solid var(--hair); background: var(--bg-1); color: var(--ember-2); box-shadow: none; }
  .creation-shell { border-radius: 16px; }
}
/* ==========================================================================
   RPG 战力面板 · 战术战斗 HUD · 无限流源能终端（Ember Noir）
   ========================================================================== */
.survival-rpg { margin-bottom: 10px; }
.rpg-power-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 11px;
  margin-bottom: 6px;
  border: 1px solid rgba(238, 122, 62, .26);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(238, 122, 62, .14), rgba(238, 122, 62, .02));
}
.rpg-power-row span { color: var(--ember-2); font: 600 11px var(--mono); letter-spacing: .12em; }
.rpg-power-row strong {
  font: 700 20px/1 var(--mono);
  background: linear-gradient(180deg, #fff3e2, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rpg-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.rpg-mini-grid > div {
  display: flex;
  flex-direction: column;
  padding: 5px 7px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
}
.rpg-mini-grid span { color: var(--tx-3); font-size: 10.5px; line-height: 1.2; }
.rpg-mini-grid b { color: var(--tx-1); font: 700 13px/1.35 var(--mono); margin-top: 1px; }

/* 战斗 HUD（悬浮于手稿页首的暗黑战术终端） */
.story-screen .encounter-status:has(.rpg-hud),
.book-page .encounter-status:has(.rpg-hud) {
  display: block;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.rpg-hud {
  padding: 18px 18px 14px;
  color: var(--tx-1);
  border: 1px solid rgba(224, 88, 63, .36);
  border-radius: 16px;
  background:
    radial-gradient(480px 180px at 15% 0%, rgba(224, 88, 63, .18), transparent 70%),
    linear-gradient(180deg, #171413, #0e100f);
  box-shadow: 0 22px 54px -22px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.rpg-enemy-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rpg-enemy-head strong { font: 700 20px/1.2 var(--serif); color: #fff4e8; letter-spacing: .04em; }
.rpg-turn { color: var(--tx-3); font: 600 11px var(--mono); letter-spacing: .1em; }
.rpg-mode-btn {
  margin-left: auto;
  min-height: 28px;
  padding: 2px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ember-2);
  border: 1px solid rgba(238, 122, 62, .35);
  background: rgba(238, 122, 62, .1);
}
.rpg-mode-btn:hover:not(:disabled) { background: rgba(238, 122, 62, .2); border-color: rgba(238, 122, 62, .55); }
.rpg-hp-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rpg-hp-bar { flex: 1; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.rpg-hp-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a62b1f, #e0583f 65%, #f59469);
  box-shadow: 0 0 12px rgba(224, 88, 63, .6);
  transition: width .3s var(--ease);
}
.rpg-hp-row b { font: 700 13px var(--mono); color: #ffd4c6; white-space: nowrap; }
.rpg-enemy-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--tx-2); margin-bottom: 10px; }
.rpg-intent {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(246, 168, 101, .24);
  border-left: 3px solid var(--ember);
  background: rgba(238, 122, 62, .08);
  color: #ffe3cc;
  font-size: 12.5px;
  font-weight: 500;
}
.rpg-pills, .rpg-player-buffs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rpg-player-buffs { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hair); font-size: 12px; }
.rpg-pill {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .05);
  color: var(--tx-2);
  font: 600 11px/1.6 var(--mono);
}
.rpg-pill.good { color: #a9e0c4; border-color: rgba(124, 191, 158, .4); background: var(--jade-soft); }
.rpg-pill.warn { color: #ffb59c; border-color: rgba(224, 88, 63, .45); background: rgba(224, 88, 63, .14); }
.rpg-pill.gold { color: var(--gold); border-color: rgba(241, 198, 122, .4); background: rgba(241, 198, 122, .12); }
.rpg-pill.cyan { color: var(--crystal); border-color: rgba(130, 193, 212, .4); background: rgba(130, 193, 212, .12); }
.rpg-pill.mid { color: var(--gold); border-color: rgba(241, 198, 122, .3); background: rgba(241, 198, 122, .08); }
.rpg-last-log {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hair);
}
.rpg-last-log p { margin: 0; color: #f1e6d2; font: 13px/1.6 var(--sans); }
.rpg-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.rpg-skill {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
}
.rpg-skill:hover:not(:disabled) {
  border-color: rgba(238, 122, 62, .55);
  background: linear-gradient(180deg, rgba(238, 122, 62, .16), rgba(238, 122, 62, .04));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -16px var(--ember-glow);
}
.rpg-skill header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rpg-skill strong { font: 700 14px/1.3 var(--serif); color: var(--tx-1); }
.rpg-skill header span {
  padding: 1px 7px;
  border-radius: 999px;
  font: 600 10.5px/1.5 var(--mono);
  background: rgba(255, 255, 255, .06);
  color: var(--tx-2);
  white-space: nowrap;
}
.rpg-skill small { color: var(--tx-2); font-size: 11.5px; line-height: 1.45; }
.rpg-skill em { font-style: normal; color: var(--tx-3); font: 500 10.5px var(--mono); margin-top: auto; padding-top: 2px; }
.rpg-skill.magic { border-color: rgba(130, 193, 212, .35); background: linear-gradient(180deg, rgba(130, 193, 212, .11), rgba(130, 193, 212, .02)); }
.rpg-skill.magic header span { color: var(--crystal); background: rgba(130, 193, 212, .14); }
.rpg-skill.talent { border-color: rgba(241, 198, 122, .42); background: linear-gradient(180deg, rgba(241, 198, 122, .14), rgba(238, 122, 62, .03)); }
.rpg-skill.talent header span { color: var(--gold); background: rgba(241, 198, 122, .16); }
.rpg-skill.subtle { border-style: dashed; opacity: .82; }
.rpg-hud-tip { margin: 10px 0 0; color: var(--tx-3); font-size: 11.5px; }

/* 无限流主神源能终端 */
.term-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 14px 20px;
  align-items: center;
  padding: 20px 22px;
  border-color: rgba(130, 193, 212, .25);
  background:
    radial-gradient(500px 220px at 85% 0%, rgba(130, 193, 212, .14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.term-clearance h3 { font-size: 22px; margin: 4px 0 6px; letter-spacing: .06em; }
.term-wallet { display: flex; gap: 10px; }
.term-wallet > div {
  min-width: 82px;
  padding: 8px 12px;
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  background: rgba(0, 0, 0, .28);
  text-align: center;
}
.term-wallet span { display: block; color: var(--tx-3); font-size: 11px; }
.term-wallet b { display: block; margin-top: 2px; font: 700 20px/1.1 var(--mono); color: var(--crystal); }
.term-wallet b.gold { color: var(--gold); }
.term-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--hair); }
.term-actions button { border-radius: 999px; font-size: 13px; padding: 6px 16px; }
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.term-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.term-card:hover:not(:disabled) { border-color: var(--hair-3); transform: translateY(-2px); }
.term-card[aria-pressed="true"] {
  border-color: rgba(238, 122, 62, .65);
  background: linear-gradient(180deg, rgba(238, 122, 62, .14), rgba(238, 122, 62, .03));
  box-shadow: 0 12px 28px -18px var(--ember-glow);
}
.term-card.owned { opacity: .65; border-style: dashed; }
.term-card.locked { opacity: .55; }
.term-card header { display: flex; align-items: center; gap: 8px; }
.term-card header .talent-grade { margin: 0; min-width: 24px; min-height: 24px; font-size: 12px; }
.term-card header strong { flex: 1; min-width: 0; font: 700 15px/1.3 var(--serif); color: var(--tx-1); }
.term-badge { padding: 1px 7px; border-radius: 999px; font: 600 10.5px var(--mono); color: var(--ember-2); background: var(--ember-soft); white-space: nowrap; }
.term-card p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--tx-2); }
.term-card footer { margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--hair); font: 600 11.5px var(--mono); color: var(--crystal); }
.term-inspect-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.term-inspect-head h3 { margin: 0; font-size: 20px; }
.term-effect {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(241, 198, 122, .25);
  background: rgba(241, 198, 122, .07);
  color: var(--gold) !important;
  font-size: 13px;
}
.term-cost-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--hair);
}
.term-cost-box strong { color: var(--crystal); font: 700 13px var(--mono); }
.term-inspect .primary { width: 100%; min-height: 46px; border-radius: var(--r-md); }

@media (max-width: 767px) {
  .survival-rpg { display: none; }
  .rpg-hud { padding: 13px 12px 11px; border-radius: 12px; }
  .rpg-skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .rpg-skill { padding: 8px 9px; }
  .rpg-skill strong { font-size: 13px; }
  .term-header { grid-template-columns: 1fr; padding: 14px; }
  .term-wallet { display: grid; grid-template-columns: repeat(3, 1fr); }
  .term-wallet > div { min-width: 0; padding: 6px 8px; }
}
/* ==========================================================================
   独立人物装备栏（6 槽 + 6 奇物阵位）& 事件追踪/忽略控制
   ========================================================================== */
.equip-banner {
  padding: 20px 22px;
  border-color: rgba(238, 122, 62, .24);
  background:
    radial-gradient(540px 220px at 10% 0%, rgba(238, 122, 62, .14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.equip-banner-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; }
.equip-banner h3 { margin: 4px 0 0; font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.equip-banner h3 b {
  font: 700 28px/1 var(--mono);
  background: linear-gradient(180deg, #fff3e2, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.equip-kpi-strip { display: grid; grid-template-columns: repeat(5, minmax(64px, 1fr)); gap: 6px; flex: 1; min-width: min(100%, 360px); }
.equip-kpi-strip > div {
  padding: 6px 8px;
  border: 1px solid var(--hair);
  border-radius: 9px;
  background: rgba(0, 0, 0, .28);
  text-align: center;
}
.equip-kpi-strip span { display: block; color: var(--tx-3); font-size: 10.5px; }
.equip-kpi-strip b { display: block; margin-top: 1px; font: 700 13.5px var(--mono); color: var(--tx-1); }
.equip-synergies { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); font-size: 12px; }

.equip-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); gap: 16px; align-items: start; }
.equip-slots-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.equip-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 104px;
  padding: 13px 14px;
  text-align: left;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
}
.equip-slot.empty { border-style: dashed; opacity: .78; }
.equip-slot:hover:not(:disabled) { border-color: var(--hair-3); transform: translateY(-1px); }
.equip-slot[aria-pressed="true"] {
  border-color: rgba(238, 122, 62, .68);
  border-style: solid;
  opacity: 1;
  background: linear-gradient(180deg, rgba(238, 122, 62, .16), rgba(238, 122, 62, .03));
  box-shadow: 0 12px 28px -18px var(--ember-glow);
}
.equip-slot header { display: flex; align-items: center; gap: 7px; }
.equip-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font: 700 12px var(--serif);
}
.equip-slot header b { font-size: 12.5px; color: var(--tx-2); flex: 1; }
.equip-slot header .talent-grade { margin: 0; min-width: 22px; min-height: 22px; font-size: 11px; }
.equip-slot strong { font: 700 15.5px/1.3 var(--serif); color: var(--tx-1); }
.equip-eff { font-size: 11.5px; line-height: 1.45; color: var(--tx-3); }
.equip-slot.filled .equip-eff { color: var(--ember-2); }

.equip-inspect { position: sticky; top: 0; margin: 0; }
.equip-inspect-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.equip-inspect-head button { min-height: 28px; padding: 2px 12px; border-radius: 999px; font-size: 12px; color: var(--tx-2); }
.equip-inspect h3 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 8px; }
.equip-stash { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.equip-stash h4 { margin: 0 0 8px; font: 600 12px var(--mono); color: var(--tx-3); letter-spacing: .12em; }
.equip-stash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  margin-bottom: 6px;
}
.equip-stash-row > div { min-width: 0; }
.equip-stash-row strong { font-size: 14px; color: var(--tx-1); margin-right: 6px; }
.equip-stash-row small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--tx-2); }
.equip-stash-row button { min-height: 30px; padding: 3px 12px; border-radius: 999px; font-size: 12px; flex-shrink: 0; }

.relic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.relic-card { margin: 0; display: flex; flex-direction: column; gap: 6px; min-height: 124px; }
.relic-card.empty { border-style: dashed; align-items: center; justify-content: center; text-align: center; opacity: .55; }
.relic-idx { font: 700 11px var(--mono); color: var(--tx-3); letter-spacing: .18em; }
.relic-card.filled { border-color: rgba(241, 198, 122, .26); background: linear-gradient(135deg, rgba(241, 198, 122, .08), rgba(255, 255, 255, .015) 60%); }
.relic-card header { display: flex; align-items: center; gap: 8px; }
.relic-card header .talent-grade { margin: 0; min-width: 24px; min-height: 24px; font-size: 11.5px; }
.relic-card header strong { flex: 1; min-width: 0; font: 700 15px/1.3 var(--serif); color: var(--tx-1); }
.relic-drop-btn {
  min-height: 26px !important;
  height: auto;
  padding: 2px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #ffb59c;
  border-color: rgba(224, 88, 63, .38);
  background: rgba(224, 88, 63, .08);
}
.relic-drop-btn:hover:not(:disabled) { background: rgba(224, 88, 63, .22); border-color: rgba(224, 88, 63, .65); }
.relic-eff { font-size: 12px; color: var(--gold) !important; line-height: 1.5; }

/* 事件追踪 / 忽略控制 */
.event-item-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.event-item-head strong { margin: 0 !important; }
.event-card-row header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 6px; }
.event-card-row header h3 { margin: 0; }
.event-card-row header .event-focus-bar { margin-top: 0; flex-shrink: 0; }
.event-badge { padding: 0 6px; border-radius: 999px; font: 600 10px/17px var(--mono); flex-shrink: 0; }
.event-badge.track { background: var(--ember-soft); color: var(--ember-2); border: 1px solid rgba(238, 122, 62, .4); }
.event-badge.ignore { background: rgba(255, 255, 255, .06); color: var(--tx-3); border: 1px solid var(--hair); }
.event-focus-bar { display: flex; gap: 6px; margin-top: 7px; }
.event-focus-btn {
  min-height: 26px !important;
  height: auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--tx-3);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, .02);
}
.event-focus-btn:hover:not(:disabled) { color: var(--tx-1); border-color: var(--hair-3); }
.event-focus-btn.active-track { color: #fff3e6; border-color: rgba(238, 122, 62, .6); background: rgba(238, 122, 62, .22); }
.event-focus-btn.active-ignore { color: var(--tx-2); border-color: var(--hair-2); background: rgba(255, 255, 255, .1); }
.event-focus-btn.delete-btn:hover:not(:disabled) { color: #ffb59c; border-color: rgba(224, 88, 63, .55); background: rgba(224, 88, 63, .16); }
#survival-events article.is-track, .event-card-row.is-track { border-color: rgba(238, 122, 62, .38); background: linear-gradient(90deg, rgba(238, 122, 62, .11), rgba(255, 255, 255, .015)); }
#survival-events article.is-ignore, .event-card-row.is-ignore { opacity: .52; }
#survival-events article.is-ignore::before { background: var(--tx-3) !important; box-shadow: none !important; }

/* 三路行动灵感徽章 & 非阻塞后台同步提示 & 撤回按钮 */
.story-screen .foot .choice { grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; }
.story-screen .foot .choice .choice-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 40px;
  padding: 2px 8px;
  margin-right: 0;
  border-radius: 6px;
  font: 700 11px/17px var(--sans);
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.story-screen .foot .choice .choice-tag.steady { color: #b7e4f2; background: rgba(130, 193, 212, .14); border: 1px solid rgba(130, 193, 212, .34); }
.story-screen .foot .choice .choice-tag.bold { color: #ffc59e; background: rgba(238, 122, 62, .16); border: 1px solid rgba(238, 122, 62, .42); }
.story-screen .foot .choice .choice-tag.wild { color: #f6d591; background: rgba(241, 198, 122, .15); border: 1px solid rgba(241, 198, 122, .38); }
.choices-syncing {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  margin-bottom: 4px;
  border-radius: 9px;
  border: 1px dashed rgba(130, 193, 212, .26);
  background: rgba(130, 193, 212, .05);
  color: var(--tx-2);
  font-size: 12px;
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crystal);
  box-shadow: 0 0 8px rgba(130, 193, 212, .65);
  animation: beacon 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
#undo-turn { color: var(--tx-2); }
#undo-turn:hover:not(:disabled) { color: #fff3e6; border-color: rgba(238, 122, 62, .45); background: rgba(238, 122, 62, .1); }

@media (max-width: 767px) {
  .equip-layout { grid-template-columns: 1fr; }
  .equip-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .relic-grid { grid-template-columns: 1fr; }
  .event-focus-btn { min-height: 30px !important; padding: 3px 12px; font-size: 12px; }
  #survival-events .event-focus-bar, #survival-events .event-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::after { display: none; }
}
