:root {
  color-scheme: dark;
  --ink: #0b0e0f;
  --ink-soft: #121819;
  --paper: #e9e0ca;
  --paper-dim: #bdb39c;
  --chalk: #f2ecd9;
  --mist: #9aaeb4;
  --line: rgba(226, 217, 194, .34);
  --line-strong: rgba(240, 230, 205, .68);
  --ochre: #bf7a34;
  --ember: #dc9b42;
  --blue: #72909b;
  --danger: #c15e49;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --topbar-h: 58px;
  --display: "FZKai-Z03", "STKaiti", "KaiTi", serif;
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--ink); }
body { color: var(--chalk); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.app-shell { position: relative; width: 100vw; height: 100dvh; min-height: 100%; background: #101617; isolation: isolate; }
.topbar {
  position: relative; z-index: 40; height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) max(12px, var(--safe-right)) 0 max(12px, var(--safe-left));
  display: grid; grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr); align-items: center;
  background: rgba(9, 12, 13, .97); border-bottom: 1px solid rgba(232, 220, 190, .25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
.topbar-button {
  min-height: 38px; padding: 0 15px; border: 1px solid rgba(238, 228, 204, .28); border-radius: 0;
  background: rgba(255,255,255,.025); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.topbar-button:hover { background: rgba(220,155,66,.12); border-color: rgba(220,155,66,.7); }
.topbar-button:active { transform: translateY(1px); }
.topbar-back { justify-self: start; display: inline-flex; gap: 9px; align-items: center; }
.topbar-back span:first-child { font-size: 18px; color: var(--ember); }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.button-rune { color: var(--ember); margin-right: 7px; font-family: var(--display); }
.chapter-stamp { text-align: center; line-height: 1.02; }
.chapter-stamp span { display: block; color: #8f9da0; font: 9px/1 var(--body); letter-spacing: .35em; text-indent: .35em; }
.chapter-stamp strong { display: block; margin-top: 5px; font: 700 17px/1 var(--display); letter-spacing: .18em; text-indent: .18em; }
.night-clock { position: absolute; left: calc(50% + 112px); top: calc(var(--safe-top) + 10px); min-width: 84px; text-align: left; }
.night-clock small { display: block; color: #77878b; font-size: 8px; letter-spacing: .18em; }
.night-clock strong { display: block; margin-top: 2px; color: var(--paper); font: 700 13px/1 var(--display); letter-spacing: .12em; }
.night-clock .clock-compact { display: none; }

.game-canvas { position: relative; height: calc(100dvh - var(--topbar-h) - var(--safe-top)); min-height: 0; overflow: hidden; background: #192225; }
.scene-art { position: absolute; inset: 0; background-color: #1d2729; background-position: center; background-size: cover; transition: opacity .3s ease, transform .7s ease; }
.app-shell[data-ending="all_saved"] .scene-art { filter: saturate(1.08) brightness(1.05); }
.app-shell[data-ending="partial"] .scene-art { filter: saturate(.82) brightness(.98); }
.app-shell[data-ending="lost"] .scene-art { filter: saturate(.48) brightness(.76); }
.app-shell[data-ending="lost"] .scene-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, rgba(24,38,48,.16), transparent 55%, rgba(6,12,16,.2)); }
.scene-art::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,11,12,.08), rgba(7,11,12,.02) 45%, rgba(7,10,11,.42) 79%, rgba(7,10,11,.78));
}
.paper-wash { position: absolute; inset: 0; pointer-events: none; opacity: .26; mix-blend-mode: screen; background-image: repeating-linear-gradient(103deg, transparent 0 5px, rgba(240,229,199,.022) 6px 7px); }
.edge-ink { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 110px rgba(0,0,0,.52); }
.character-art { position: absolute; z-index: 4; right: 4%; bottom: clamp(160px, 30vh, 290px); max-height: min(67vh, 690px); max-width: 38vw; object-fit: contain; object-position: bottom; filter: drop-shadow(0 18px 26px rgba(0,0,0,.38)); animation: character-in .26s ease both; }
/* 立绘是等图就绪后才显示的，落位时轻轻淡入，像是人物自己走上场，而不是"啪"地弹出来 */
@keyframes character-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.scene-label { position: absolute; z-index: 5; top: 27px; left: max(24px, 3vw); padding-left: 12px; border-left: 2px solid var(--ember); color: rgba(242,236,217,.83); font-size: 11px; letter-spacing: .18em; text-shadow: 0 2px 9px #000; }

.home-screen { position: absolute; z-index: 15; inset: 0; display: flex; align-items: center; padding: clamp(26px, 5vw, 84px); }
.home-screen::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,11,12,.93) 0, rgba(7,11,12,.76) 34%, rgba(7,11,12,.16) 67%, rgba(7,11,12,.25) 100%); }
.home-copy { position: relative; width: min(620px, 51vw); padding-left: clamp(18px, 2.4vw, 34px); border-left: 1px solid rgba(224,205,163,.6); }
.home-kicker { margin: 0 0 14px; color: var(--ember); font-size: 11px; font-weight: 700; letter-spacing: .38em; }
.home-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(44px, 6.7vw, 108px); line-height: .86; letter-spacing: .03em; text-shadow: 0 4px 28px #000; }
.home-title small { display: block; margin: 17px 0 0 5px; color: #d6c8a9; font: 500 clamp(18px, 2.2vw, 34px)/1 var(--display); letter-spacing: .42em; }
.home-deck { width: min(560px, 100%); margin: 25px 0 0; color: rgba(238,230,211,.76); font-size: clamp(13px, 1.25vw, 18px); line-height: 1.85; }
.home-meta { display: flex; gap: 21px; margin-top: 21px; color: #95a4a6; font-size: 10px; letter-spacing: .14em; }
.home-meta span + span { position: relative; }
.home-meta span + span::before { content: ""; position: absolute; left: -11px; top: 4px; width: 1px; height: 10px; background: #566266; }
.save-warning { max-width: 460px; margin: 13px 0 0; color: #e4ad61; font-size: 12px; line-height: 1.6; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 31px; }
.ink-button {
  position: relative; min-width: 168px; min-height: 48px; padding: 12px 20px; border: 1px solid rgba(229,216,185,.58); border-radius: 0;
  background: rgba(9,13,14,.76); color: var(--chalk); font-weight: 700; letter-spacing: .12em; cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.ink-button::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 5px; height: 1px; background: rgba(229,216,185,.12); }
.ink-button.primary { background: #c68238; border-color: #e3b56d; color: #14100b; }
.ink-button:hover { background: #e0a351; border-color: #f3ca84; color: #15110c; transform: translateY(-1px); }
.ink-button.subtle { min-width: auto; background: rgba(9,13,14,.35); color: #c7bea9; }
.home-foot { position: absolute; left: clamp(26px,5vw,84px); bottom: max(18px, calc(11px + var(--safe-bottom))); display: flex; gap: 16px; align-items: center; color: #89989a; font-size: 10px; letter-spacing: .08em; }
.home-disclaimer { color: #c0b9a8; letter-spacing: 0; }
.text-link { padding: 3px 0; border: 0; border-bottom: 1px solid rgba(231,218,186,.35); background: transparent; color: #d3c8af; cursor: pointer; }

.dialogue-panel {
  position: absolute; z-index: 20; left: max(18px, calc(18px + var(--safe-left))); right: max(18px, calc(18px + var(--safe-right))); bottom: max(13px, calc(8px + var(--safe-bottom)));
  height: min(42vh, 360px); min-height: 180px; max-height: min(42vh, 360px); display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 12px clamp(18px, 3vw, 52px); overflow: hidden;
  padding: clamp(20px, 2.5vw, 34px); border: 1px solid rgba(238,229,207,.76); background: rgba(7,10,10,.94);
  box-shadow: 0 20px 70px rgba(0,0,0,.52), inset 0 0 50px rgba(255,255,255,.015);
}
.dialogue-panel::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(230,218,189,.09); pointer-events: none; }
.state-hud { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.state-hud[hidden] { display: none; }
.state-cell { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 9px; border: 1px solid rgba(229,218,191,.2); background: rgba(255,255,255,.025); }
.state-cell span { overflow: hidden; color: #98a4a3; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.state-cell strong { flex: 0 0 auto; color: #e7d5ae; font: 700 11px/1.15 var(--display); white-space: nowrap; }
.dialogue-copy { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #7e6845 transparent; }
.dialogue-copy.has-more::after { content: "↓ 对白可滚动"; position: sticky; z-index: 3; bottom: 0; display: block; width: max-content; margin: -18px 0 0 auto; padding: 3px 6px; background: linear-gradient(90deg, transparent, rgba(7,10,10,.96) 32%); color: #c49b62; font-size: 8px; line-height: 12px; text-align: right; pointer-events: none; }
.dialogue-eyebrow { margin: 0 0 8px; color: #8ea0a3; font-size: 9px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.dialogue-speaker { margin: 0; color: var(--ember); font: 700 clamp(15px,1.4vw,21px)/1.2 var(--display); letter-spacing: .12em; }
.dialogue-text { margin-top: 12px; color: rgba(242,236,218,.89); font-size: clamp(13px,1.22vw,18px); line-height: 1.78; }
.dialogue-text p { margin: 0 0 10px; }
.dialogue-text strong { color: #fff2cb; font-weight: 700; }
.dialogue-text .insight-note { padding: 8px 10px; border-left: 2px solid rgba(220,155,66,.72); background: rgba(220,155,66,.07); color: rgba(242,236,218,.8); }
.dialogue-text .risk-note { padding: 8px 10px; border-left: 2px solid rgba(196,92,74,.72); background: rgba(196,92,74,.08); color: rgba(242,228,214,.86); }
.dialogue-text .forecast-note { padding: 7px 9px; border-left: 2px solid rgba(114,144,155,.72); background: rgba(114,144,155,.08); color: rgba(242,236,218,.84); }
.choice-area { min-width: 0; min-height: 0; height: 100%; align-self: stretch; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: minmax(0, auto); align-content: start; gap: 9px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #7e6845 transparent; }
.choice-area.one { grid-template-columns: minmax(210px, 340px); justify-content: end; }
.choice-area.has-more::before { content: "↓ 可上下滚动查看全部操作"; position: sticky; z-index: 3; top: 0; grid-column: 1 / -1; align-self: start; height: 15px; padding: 1px 5px; background: rgba(7,10,10,.9); color: #c49b62; font-size: 8px; line-height: 13px; text-align: right; pointer-events: none; }
.dialogue-panel.hotspot-mode { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.dialogue-panel.hotspot-mode .dialogue-copy { grid-column: 1; grid-row: 1; }
.dialogue-panel.hotspot-mode #choice-area { display: none; }
.choice-card {
  position: relative; min-height: 78px; padding: 13px 34px 12px 14px; border: 1px solid rgba(233,222,196,.34); border-radius: 0; background: rgba(255,255,255,.035); text-align: left; cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.choice-card::after { content: "›"; position: absolute; right: 13px; top: 50%; translate: 0 -50%; color: var(--ember); font: 26px/1 var(--display); }
.choice-card:hover { background: rgba(191,122,52,.16); border-color: #bd8a50; transform: translateY(-1px); }
.choice-card:disabled { opacity: 1; cursor: not-allowed; border-color: rgba(142,107,75,.45); background: rgba(97,59,42,.15); }
.choice-card:disabled .choice-name { color: #b9a182; }
.choice-card:disabled .choice-meta { color: #a88764; }
.choice-card:disabled::after { content: "·"; color: #99734c; }
.choice-card:disabled:hover { transform: none; background: rgba(97,59,42,.15); border-color: rgba(142,107,75,.45); }
.choice-card.selected { border-color: rgba(111,143,153,.8); background: rgba(74,101,108,.22); }
.choice-name { display: block; color: #f0ead8; font-weight: 700; font-size: 14px; letter-spacing: .05em; }
.choice-meta { display: block; margin-top: 6px; color: #9ca7a4; font-size: 10px; line-height: 1.45; white-space: pre-line; }
.choice-hotkey { position: absolute; top: 9px; right: 10px; color: #6f7d7e; font: 9px/1 sans-serif; }
.continue-button { min-height: 54px; padding: 0 25px; border: 1px solid #d29a54; background: #bd7832; color: #15100a; font-weight: 900; letter-spacing: .12em; cursor: pointer; }
.continue-button:hover { background: #e2a653; }
.phase-progress { display: flex; gap: 5px; margin-top: 13px; }
.phase-progress i { width: 28px; height: 3px; background: #354044; }
.phase-progress i.done { background: var(--ember); }

.hotspots { position: absolute; z-index: 10; inset: 0; pointer-events: none; }
.hotspot { position: absolute; pointer-events: auto; min-width: 112px; padding: 10px 13px 9px; border: 1px solid rgba(243,232,205,.7); background: rgba(8,12,13,.78); color: #f0e9d8; text-align: left; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.hotspot::before { content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--ember); border-radius: 50%; left: -6px; top: -6px; background: #151b1c; box-shadow: 0 0 0 4px rgba(220,155,66,.14); }
.hotspot:hover { border-color: var(--ember); background: rgba(28,22,14,.9); }
.hotspot:disabled { opacity: .94; cursor: default; border-color: rgba(191,122,52,.8); background: rgba(58,41,24,.86); }
.hotspot:disabled::before { background: #c68238; box-shadow: 0 0 0 4px rgba(220,155,66,.2); }
.hotspot strong { display: block; font: 700 14px/1.1 var(--display); letter-spacing: .1em; }
.hotspot small { display: block; margin-top: 5px; color: #a7b3b2; font-size: 9px; }
.hotspot.cave { left: 11%; top: 24%; }
.hotspot.shed { right: 18%; top: 31%; }
.hotspot.material { left: 46%; top: 36%; }

.drawer-scrim { position: fixed; z-index: 70; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.side-drawer { position: fixed; z-index: 80; top: 0; right: 0; width: min(440px, 88vw); height: 100dvh; padding-top: var(--safe-top); background: #111718; border-left: 1px solid #75674f; box-shadow: -20px 0 80px rgba(0,0,0,.55); transform: translateX(102%); transition: transform .22s ease; }
.side-drawer.open { transform: translateX(0); }
.drawer-heading { height: 83px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #3a3e39; }
.drawer-heading p { margin: 0; color: #859396; font-size: 9px; letter-spacing: .28em; }
.drawer-heading h2 { margin: 5px 0 0; font: 700 21px/1 var(--display); letter-spacing: .12em; }
.drawer-close { width: 40px; height: 40px; border: 1px solid #4a4f49; background: transparent; color: #cfc5ae; font: 25px/1 serif; cursor: pointer; }
.drawer-scroll { height: calc(100dvh - 83px - var(--safe-top)); overflow: auto; padding: 20px 20px calc(24px + var(--safe-bottom)); }
.status-block { margin-bottom: 23px; }
.status-block h3 { margin: 0 0 9px; color: #9ba8a8; font-size: 10px; letter-spacing: .2em; }
.status-night { margin: 0; color: #d8c9a6; font-size: 13px; line-height: 1.7; }
.status-missed { list-style: none; margin: 0; padding: 0; }
.status-missed li { padding: 9px 11px; border-left: 2px solid #7a4a3a; background: #1a1614; color: #b9ab92; font-size: 11px; line-height: 1.65; }
.status-missed li + li { margin-top: 7px; }
.status-missed strong { color: #d8a35f; }
.status-row { padding: 13px 0; border-top: 1px solid #2e3737; }
.status-row-head { display: flex; justify-content: space-between; align-items: baseline; }
.status-row-head span { font-size: 13px; color: #c8c2b2; }
.status-row-head strong { color: var(--ember); font: 700 17px/1 var(--display); }
.state-scale { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; margin-top: 10px; }
.state-scale i { height: 4px; background: #303a3c; }
.state-scale i.on { background: #bd843f; }
.status-reason { margin: 8px 0 0; color: #889697; font-size: 11px; line-height: 1.65; }
.resource-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.resource-tile { padding: 13px; border: 1px solid #343d3c; background: #151c1d; }
.resource-tile span { display: block; color: #899697; font-size: 10px; }
.resource-tile strong { display: block; margin-top: 8px; font: 700 22px/1 var(--display); color: #e7ddc5; }
.journal-list { list-style: none; margin: 0; padding: 0 0 0 13px; border-left: 1px solid #4a4b40; }
.journal-entry { position: relative; padding: 0 0 21px 18px; }
.journal-entry::before { content: ""; position: absolute; left: -18px; top: 5px; width: 8px; height: 8px; border: 1px solid #a57942; background: #111718; transform: rotate(45deg); }
.journal-entry.loss::before { border-color: var(--danger); background: #5c2a25; }
.journal-entry.hidden::before { border-color: #c08f45; background: #4a3418; }
.journal-entry h3 { margin: 0; color: #ddcfaf; font: 700 14px/1.35 var(--display); letter-spacing: .06em; }
.journal-entry p { margin: 7px 0 0; color: #8f9b9b; font-size: 11px; line-height: 1.7; }
.empty-note { color: #8a9696; font-size: 12px; line-height: 1.8; }

.modal { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: max(18px,var(--safe-top)) max(18px,var(--safe-right)) max(18px,var(--safe-bottom)) max(18px,var(--safe-left)); background: rgba(4,7,8,.88); backdrop-filter: blur(8px); }
.modal.open { display: grid; }
.modal-card { position: relative; width: min(920px, 96vw); max-height: min(860px, 94dvh); overflow: auto; border: 1px solid #9f8a63; background: #151b1b; box-shadow: 0 30px 100px #000; }
.modal-close { position: sticky; z-index: 2; float: right; top: 14px; margin: 14px; width: 40px; height: 40px; border: 1px solid #857657; background: #111; cursor: pointer; }
.archive-card { padding: clamp(26px,5vw,68px); }
.archive-card .archive-no { color: #b18149; font-size: 10px; letter-spacing: .25em; }
.archive-card h2 { margin: 12px 0 22px; font: 800 clamp(27px,4vw,54px)/1.1 var(--display); letter-spacing: .05em; }
.archive-card p { max-width: 720px; color: #c6bfac; font-size: 14px; line-height: 2; }
.archive-card a { display: inline-block; margin-top: 18px; color: #e4ad61; text-underline-offset: 5px; }
.archive-image { min-height: 240px; background: center/cover no-repeat; border-top: 1px solid #6c604a; filter: saturate(.8); }
.legacy-card { padding: 35px; max-width: 620px; }
.legacy-card h2 { margin: 0 0 13px; font: 700 28px/1.2 var(--display); }
.legacy-card p { color: #aaa693; line-height: 1.8; }
.legacy-card .ink-button { margin-top: 12px; }

.result-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 13px; }
.result-stat { padding: 9px 10px; border: 1px solid rgba(229,218,191,.25); }
.result-stat span { display: block; color: #8d9a99; font-size: 8px; letter-spacing: .15em; }
.result-stat strong { display: block; margin-top: 5px; color: #e8d9b7; font: 700 16px/1 var(--display); }
.memorial-wrap { padding: 18px; background: #0d1112; }
.memorial { position: relative; width: min(100%, 820px); aspect-ratio: 16 / 9; margin: 0 auto; overflow: hidden; color: #201a12; background: #d9ceb2 center/cover no-repeat; box-shadow: 0 18px 50px #000; }
.memorial::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(232,222,194,.97) 0 48%, rgba(219,206,173,.78) 69%, rgba(16,21,21,.24)); }
.memorial.ending-all_saved::before { background: linear-gradient(90deg, rgba(239,226,190,.97) 0 48%, rgba(226,207,159,.78) 69%, rgba(44,45,30,.16)); }
.memorial.ending-partial::before { background: linear-gradient(90deg, rgba(224,220,201,.98) 0 48%, rgba(197,202,193,.8) 69%, rgba(26,35,38,.24)); }
.memorial.ending-lost::before { background: linear-gradient(90deg, rgba(207,213,210,.98) 0 48%, rgba(167,180,184,.82) 69%, rgba(16,25,31,.32)); }
.memorial-copy { position: relative; width: 58%; height: 100%; padding: clamp(20px,4vw,48px); display: flex; flex-direction: column; }
.memorial-kicker { color: #805728; font-size: 9px; font-weight: 700; letter-spacing: .28em; }
.memorial h2 { margin: 12px 0 4px; font: 900 clamp(28px,4vw,48px)/1.08 var(--display); }
.memorial h3 { margin: 0; font: 600 clamp(15px,2vw,24px)/1.3 var(--display); color: #60492e; }
.memorial-line { width: 74px; height: 2px; margin: 18px 0; background: #9e6e35; }
.memorial-details { color: #3c3327; font-size: clamp(9px,1.2vw,13px); line-height: 1.8; }
.memorial-details p { margin: 0 0 6px; }
.memorial-seal { margin-top: auto; align-self: flex-start; padding: 7px 9px; border: 2px solid #9a4f3d; color: #8e4033; font: 800 12px/1 var(--display); letter-spacing: .15em; transform: rotate(-3deg); }
.memorial-disclaimer { margin-top: 8px; color: #594e3b; font-size: 9px; line-height: 1.4; }
.modal-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; padding: 15px 18px 18px; }
.longpress-save { padding: 0 18px 14px; text-align: center; }
.longpress-save img { width: min(100%, 640px); border: 1px solid #2a3233; box-shadow: 0 12px 30px #000; }
.longpress-save p { margin: 10px 0 0; color: #8d9a99; font-size: 12px; }
.share-link-fallback { padding: 0 18px 14px; }
.share-link-fallback p { margin: 0 0 8px; color: #c8bea6; font-size: 11px; line-height: 1.6; }
.share-link-fallback textarea { display: block; width: 100%; min-height: 58px; padding: 8px; border: 1px solid #665b45; border-radius: 0; background: #0c1112; color: #e7ddc5; font: 10px/1.5 ui-monospace, monospace; overflow-wrap: anywhere; }
.share-link-fallback .ink-button { min-height: 38px; margin-top: 8px; }
.toast { position: fixed; z-index: 130; left: 50%; bottom: calc(22px + var(--safe-bottom)); translate: -50% 16px; padding: 10px 16px; background: #dbc08c; color: #17120d; font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .18s, translate .18s; }
.toast.show { opacity: 1; translate: -50% 0; }

#rotate-guide { display: none; }
.app-shell.is-home .topbar-back, .app-shell.is-home .night-clock, .app-shell.is-home .topbar-actions { visibility: hidden; }
.app-shell.is-home .chapter-stamp { opacity: .76; }


/* V3 双视角故事与后记活动 */
.topbar-actions { gap: 6px; }
.topbar-actions .topbar-button { min-width: 66px; padding-inline: 9px; letter-spacing: .04em; }
.topbar-actions .button-rune { margin-right: 4px; }
.app-shell.is-home .topbar-actions, .app-shell.is-home .topbar-back, .app-shell.is-home .night-clock { visibility: hidden; }
.app-shell.is-home .topbar-actions #rotate-exit { visibility: visible; }
.home-screen { display: block; overflow: auto; padding: clamp(20px, 3vw, 48px); }
.landing-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(255px, .62fr) minmax(0, 1.5fr); grid-template-rows: minmax(0, 1fr) auto; gap: 18px clamp(22px, 3.3vw, 52px); width: min(1740px, 100%); min-height: 100%; margin: 0 auto; align-items: center; }
.landing-heading { align-self: center; max-width: 560px; }
.landing-heading .home-kicker { max-width: 460px; line-height: 1.8; letter-spacing: .2em; }
.landing-heading .home-title { font-size: clamp(48px, 6.2vw, 104px); }
.landing-heading .home-deck { max-width: 510px; }
.landing-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 19px; color: #c2b89f; font-size: 10px; letter-spacing: .12em; }
.landing-meta span + span { position: relative; }
.landing-meta span + span::before { position: absolute; top: 2px; left: -10px; width: 1px; height: 12px; background: rgba(238,225,195,.36); content: ""; }
.perspective-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-self: center; }
.perspective-card { position: relative; display: grid; grid-template-columns: minmax(145px, 50%) minmax(0,1fr); grid-template-rows: minmax(0,1fr); height: clamp(280px, 40vh, 520px); min-height: 0; overflow: hidden; border: 1px solid rgba(232,218,184,.48); background: rgba(8,12,13,.82); box-shadow: 0 20px 55px rgba(0,0,0,.3); }
.perspective-card::after { position: absolute; inset: 0; z-index: 0; border: 5px solid rgba(231,213,174,.035); content: ""; pointer-events: none; }
.perspective-card img { align-self: end; width: 100%; height: 94%; object-fit: contain; object-position: center bottom; filter: drop-shadow(7px 9px 14px rgba(0,0,0,.4)); }
.perspective-copy { z-index: 1; display: flex; flex-direction: column; align-items: flex-start; padding: clamp(15px, 2vw, 27px) clamp(11px, 1.55vw, 22px); }
.perspective-kicker { color: #d3aa6d; font-size: 9px; letter-spacing: .15em; }
.perspective-copy h2 { margin: 9px 0 0; font: 800 clamp(22px, 2.2vw, 34px)/1.2 var(--display); letter-spacing: .08em; }
.perspective-copy p { margin: 10px 0 0; color: #bcb6a5; font-size: clamp(10px, .88vw, 13px); line-height: 1.9; }
.perspective-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 13px; }
.perspective-actions .ink-button { min-width: 0; min-height: 42px; padding-inline: 12px; font-size: 10px; letter-spacing: .06em; }
.save-caption { margin-top: 9px; color: #a9a38f; font-size: 9px; }
.landing-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; color: #a29d8c; font-size: 9px; line-height: 1.6; }
.landing-foot .text-link { color: #decda9; font-size: 10px; }
.completion-screen, .activity-screen { position: absolute; z-index: 25; inset: 0; overflow: auto; background: rgba(8,12,12,.84); scrollbar-width: thin; scrollbar-color: #87724f transparent; }
.completion-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); gap: clamp(15px, 3vw, 48px); min-height: 100%; padding: clamp(18px, 4vw, 58px); align-items: center; }
.completion-copy { max-width: 820px; padding: clamp(14px, 2.5vw, 34px); border: 1px solid rgba(230,216,188,.34); background: rgba(11,15,15,.78); box-shadow: 0 18px 70px rgba(0,0,0,.3); }
.completion-kicker, .relay-kicker { margin: 0; color: #d1a363; font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.completion-copy h1 { margin: 10px 0 4px; color: #f1e8d2; font: 900 clamp(32px, 4.2vw, 66px)/1.1 var(--display); }
.completion-copy h2 { margin: 0; color: #c2ad84; font: 500 clamp(15px, 1.65vw, 23px)/1.5 var(--display); }
.completion-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 20px; }
.completion-stats div { padding: 10px; border: 1px solid rgba(232,221,196,.2); background: rgba(255,255,255,.025); }
.completion-stats small { display: block; color: #9ca7a1; font-size: 9px; }
.completion-stats strong { display: block; margin-top: 6px; color: #eadbb9; font: 700 clamp(12px,1.2vw,17px)/1.35 var(--display); }
.completion-summary { max-width: 670px; margin: 17px 0 0; color: #ddd4c0; font-size: 13px; line-height: 1.85; }
.completion-ledger, .completion-decisions { margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(229,216,187,.22); color: #d6c5a1; font-size: 11px; }
.completion-ledger p, .completion-decisions p { margin: 6px 0 0; color: #aeb4aa; line-height: 1.7; }
.completion-decisions ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 7px 0 0; padding-left: 18px; color: #c9c0ad; line-height: 1.6; }
.completion-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.completion-actions .ink-button { min-width: auto; min-height: 42px; padding: 9px 14px; font-size: 10px; letter-spacing: .06em; }
.completion-replay { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 13px; }
.completion-replay .text-link { color: #bbb39f; font-size: 10px; }
.completion-visual { position: relative; min-height: min(66vh, 620px); border: 1px solid rgba(238,223,190,.7); background: var(--result-art) center/cover no-repeat; box-shadow: 0 25px 80px rgba(0,0,0,.45); }
.completion-visual::after { position: absolute; inset: 0; border: 6px solid rgba(8,12,12,.18); content: ""; }
.completion-seal { position: absolute; z-index: 1; right: 17px; bottom: 17px; padding: 9px 12px; border: 1px solid rgba(240,225,196,.75); background: rgba(8,13,13,.72); color: #f0dfbc; font-size: 11px; letter-spacing: .16em; }
.hotspots.explore-area { z-index: 18; }
.hotspot-marker { position: absolute; left: var(--x); top: var(--y); z-index: 1; display: grid; justify-items: center; gap: 4px; min-width: 56px; min-height: 58px; padding: 0; border: 0; background: transparent; color: #f4ead4; cursor: pointer; pointer-events: auto; transform: translate(-50%,-50%); filter: drop-shadow(0 3px 8px rgba(0,0,0,.84)); }
.hotspot-marker::before { position: absolute; inset: 1px 4px 18px; border: 1px solid rgba(244,230,197,.62); border-radius: 50%; background: rgba(10,15,14,.68); box-shadow: 0 0 0 5px rgba(206,154,80,.12); content: ""; transition: transform .15s ease, background .15s ease; }
.hotspot-marker:hover::before, .hotspot-marker:focus-visible::before { transform: scale(1.14); background: rgba(134,83,38,.9); }
.hotspot-rune { position: relative; z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; color: #f0d29b; font: 700 17px/1 var(--display); }
.hotspot-caption { position: relative; z-index: 1; max-width: 130px; padding: 2px 6px; border: 1px solid rgba(232,222,197,.3); background: rgba(8,12,12,.78); color: #eee5d0; font-size: 10px; line-height: 1.25; text-align: center; white-space: nowrap; }
.hotspot-marker.is-found::before { border-color: #c88c4a; background: rgba(70,51,28,.84); }
.hotspot-marker.is-found .hotspot-rune { color: #f2c579; }
.hotspot-marker.operational { min-width: 66px; min-height: 70px; }
.hotspot-marker:disabled { cursor: default; opacity: .82; }
.assist-mode .hotspot-marker:not(.is-found)::before { border-color: #f0bd6e; box-shadow: 0 0 0 5px rgba(230,173,82,.26), 0 0 26px rgba(240,189,110,.62); animation: clue-pulse 1.8s ease-in-out infinite; }
@keyframes clue-pulse { 50% { box-shadow: 0 0 0 9px rgba(230,173,82,.08), 0 0 38px rgba(240,189,110,.68); } }
.dialogue-panel.explore-mode { height: min(25vh, 245px); max-height: min(25vh, 245px); min-height: 142px; padding: 13px 18px; gap: 8px 24px; }
.dialogue-panel.dialogue-only { grid-template-columns: minmax(0,1fr) auto; grid-template-rows: minmax(0,1fr); height: min(32vh,280px); max-height: min(32vh,280px); min-height: 150px; padding: clamp(12px,2vw,24px); gap: 18px; }
.dialogue-panel.dialogue-only .dialogue-copy { grid-column: 1; grid-row: 1; }
.dialogue-panel.dialogue-only .choice-area { grid-column: 2; grid-row: 1; align-self: end; width: clamp(140px,18vw,220px); }
.dialogue-panel.dialogue-only .continue-button { width: 100%; min-height: 46px; }
.dialogue-panel.explore-mode .dialogue-text { margin-top: 7px; font-size: clamp(11px,1.02vw,14px); line-height: 1.55; }
.dialogue-panel.explore-mode .dialogue-text p { margin-bottom: 5px; }
.explore-progress { color: #d2aa6c; font-size: 10px; letter-spacing: .04em; }
.explore-nudge { align-self: center; grid-column: 1 / -1; margin: 0; color: #b7ad96; font-size: 11px; line-height: 1.6; }
.dialogue-panel.task-mode, .dialogue-panel.night-mode { height: min(49vh, 410px); max-height: min(49vh, 410px); min-height: 210px; padding: clamp(10px, 1.5vw, 19px); gap: 8px clamp(12px,2vw,28px); }
.dialogue-panel.task-mode .dialogue-text, .dialogue-panel.night-mode .dialogue-text { margin-top: 6px; font-size: clamp(11px,1.04vw,15px); line-height: 1.55; }
.dialogue-panel.night-mode .choice-area { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(62px, auto); }
.dialogue-panel.night-mode .choice-name { font-size: clamp(11px,1.04vw,14px); }
.dialogue-panel.night-mode .choice-meta { font-size: clamp(8px,.8vw,10px); }
.dialogue-panel .choice-area.choice-list { grid-auto-rows: minmax(58px, auto); }
.choice-index { position: absolute; top: 8px; left: 9px; color: #be955c; font: 700 9px/1 var(--display); }
.choice-card { padding-left: 30px; }
.choice-card.is-locked { border-style: dashed; }
.weather-note { color: #ded3bc; }
.round-dots { display: flex; gap: 6px; margin-top: 9px !important; }
.round-dots i { width: 26px; height: 3px; background: #424747; }
.round-dots i.done { background: #a97941; }
.round-dots i.current { background: #f0bc6b; box-shadow: 0 0 10px rgba(240,188,107,.42); }
.reason-note { padding-left: 10px; border-left: 2px solid #78949b; color: #b3c0bd; }
.loss-note { padding-left: 10px; border-left: 2px solid #bd6551; color: #e6b8a6; }
.safe-note { padding-left: 10px; border-left: 2px solid #aa985c; color: #cbd2b2; }
.record-workbench { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 8px; align-content: start; min-height: 0; }
.record-cards, .record-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; gap: 6px; }
.record-card, .record-slot { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 58px; padding: 7px 9px; border: 1px solid rgba(225,213,187,.32); background: rgba(231,221,200,.06); color: #e8dfcb; text-align: left; cursor: pointer; }
.record-card small { color: #c69b5f; font-size: 8px; }
.record-card strong { font: 600 10px/1.45 var(--body); }
.record-card span, .record-slot small { color: #9fa9a3; font-size: 8px; line-height: 1.35; }
.record-card.is-selected { border-color: #e8ba73; background: rgba(195,132,57,.18); }
.record-card.is-matched { border-color: rgba(142,169,128,.55); background: rgba(94,130,95,.13); cursor: default; }
.record-slot { min-height: 49px; border-style: dashed; }
.record-slot strong { color: #dec99f; font: 700 10px/1.3 var(--display); }
.record-slot.is-filled { border-style: solid; border-color: rgba(142,169,128,.55); }
.record-slot .slot-no { position: absolute; right: 7px; top: 6px; color: #c99755; }
.task-mode .continue-button, .night-mode .continue-button { min-height: 42px; padding: 0 14px; font-size: 11px; }
.continue-button.is-ready { border-color: #d7b779; background: #ceb47b; }
.relay-page { width: min(1420px, 100%); min-height: 100%; margin: 0 auto; padding: clamp(14px,3vw,42px); color: #ece3cf; }
.relay-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: clamp(12px,2vw,26px); align-items: center; padding-bottom: 15px; border-bottom: 1px solid rgba(231,218,186,.26); }
.relay-header > div { grid-column: 2; grid-row: 1; }
.relay-header > button { grid-column: 1; grid-row: 1; }
.relay-header h1 { margin: 5px 0; font: 900 clamp(25px,3vw,44px)/1.2 var(--display); }
.relay-header p:not(.home-kicker) { margin: 0; color: #a8afa4; font-size: 12px; line-height: 1.6; }
.relay-seal { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #b89258; border-radius: 50%; color: #d4b780; font: 700 16px var(--display); }
.relay-region-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 15px; }
.relay-region { padding: clamp(12px,1.6vw,22px); border: 1px solid rgba(230,215,180,.25); background: rgba(8,13,13,.64); }
.relay-region h2 { margin: 4px 0 0; font: 800 clamp(21px,2vw,29px)/1.2 var(--display); }
.relay-intro { margin: 5px 0 12px; color: #aaa996; font-size: 11px; line-height: 1.6; }
.culture-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.culture-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 9px; border: 1px solid rgba(231,218,186,.22); background: rgba(255,255,255,.025); }
.culture-card.is-read { border-color: rgba(158,180,137,.58); background: rgba(91,129,87,.1); }
.culture-mark { color: #d0a967; font: 700 24px/1 var(--display); }
.culture-card h3 { margin: 7px 0 5px; color: #e7d9bb; font: 700 12px/1.3 var(--display); }
.culture-card p { margin: 0; color: #aeb3a8; font-size: 9px; line-height: 1.6; }
.culture-card .text-link { margin-top: auto; padding-top: 9px; color: #d2b17a; font-size: 9px; text-align: left; }
.relay-picks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.relay-choice { padding: 12px; border: 1px solid rgba(230,215,180,.2); background: rgba(8,13,13,.55); }
.relay-element-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.relay-element { position: relative; min-width: 0; min-height: 104px; padding: 0; overflow: hidden; border: 1px solid rgba(230,215,180,.25); background: #17201e; text-align: left; cursor: pointer; }
.relay-element img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .56; }
.relay-element::after { position: absolute; inset: 32% 0 0; background: linear-gradient(transparent,rgba(5,10,9,.92)); content: ""; }
.relay-element.is-selected { border-color: #e3bd75; box-shadow: 0 0 0 2px rgba(213,172,102,.22); }
.element-mark, .relay-element strong, .relay-element small { position: relative; z-index: 1; display: block; margin-left: 8px; }
.element-mark { margin-top: 7px; color: #f2d497; font: 700 20px/1 var(--display); }
.relay-element strong { margin-top: 14px; color: #f4ead6; font: 700 11px/1.2 var(--display); }
.relay-element small { margin-top: 4px; margin-right: 5px; margin-bottom: 7px; color: #ddd4c1; font-size: 8px; line-height: 1.4; }
.relay-locked { grid-column: 1 / -1; padding: 20px; border: 1px dashed rgba(228,207,168,.35); color: #e1d3b5; }
.relay-locked p { margin: 7px 0 0; color: #aeb2a7; font-size: 11px; line-height: 1.6; }
.relay-footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(231,218,186,.24); }
.relay-footer strong { color: #d8c395; font-size: 11px; }
.relay-footer p { margin: 5px 0 0; color: #949d96; font-size: 9px; line-height: 1.5; }
.relay-footer .ink-button { min-width: 190px; min-height: 42px; font-size: 10px; }
.relay-footer .ink-button:disabled { border-color: #50483b; background: #222621; color: #797c70; cursor: not-allowed; }
.relay-result { margin: 18px auto 5px; padding: 14px; border: 1px solid rgba(231,218,186,.3); background: rgba(8,13,13,.8); text-align: center; }
.relay-result h2 { margin: 0; font: 700 19px var(--display); }
.relay-result p { color: #aeb3a8; font-size: 11px; }
#relay-canvas { display: block; width: min(100%, 500px); margin: 12px auto 0; border: 1px solid rgba(231,218,186,.35); }
.sound-settings, .guide-card { padding: clamp(24px,4vw,48px); }
.sound-settings h2, .guide-card h2 { margin: 7px 0 10px; font: 800 29px/1.2 var(--display); }
.sound-settings p, .guide-card p, .guide-card li { color: #b5b6a8; font-size: 12px; line-height: 1.8; }
.sound-settings .sound-credit { margin: 8px 0 0; color: #95978d; font-size: 10px; }
.sound-credit a { color: var(--ember); text-underline-offset: 3px; }
.sound-slider { display: flex; gap: 12px; align-items: center; margin-top: 20px; color: #ded3bb; font-size: 12px; }
.sound-slider input { flex: 1; accent-color: #c88e4c; }
.sound-slider strong { width: 42px; color: #ddbd7c; }
.sound-mute { display: flex; gap: 8px; align-items: center; margin-top: 13px; color: #c4baa2; font-size: 12px; }
.sound-mute input { accent-color: #bc8547; }
.guide-card ul { padding-left: 18px; }
.guide-card kbd { padding: 2px 6px; border: 1px solid #6a604e; color: #ebd8b0; }
.share-preview { position: relative; min-height: 320px; padding: clamp(30px,5vw,58px); overflow: hidden; background: linear-gradient(90deg,rgba(8,13,13,.95),rgba(8,13,13,.65)),var(--share-art) center/cover; }
.share-preview h2 { margin: 14px 0 8px; font: 800 clamp(26px,4vw,45px)/1.2 var(--display); }
.share-preview p, .share-preview li { color: #d2c6ae; font-size: 12px; line-height: 1.75; }
.share-preview ul { margin: 20px 0; padding-left: 18px; }
.share-link { width: 100%; min-height: 68px; margin: 10px 0; padding: 8px; border: 1px solid #76674c; background: #0b0f0f; color: #ded3bb; font-size: 10px; overflow-wrap: anywhere; }
.fatal-state { position: relative; z-index: 1; max-width: 620px; margin: 10vh auto; padding: 28px; border: 1px solid #897957; background: rgba(8,13,13,.87); }
.fatal-state h1 { font: 800 32px var(--display); }
.fatal-state p { color: #c1bcad; line-height: 1.8; }


/* Responsive corrections are intentionally last so they win over legacy breakpoint rules above. */


.dialogue-copy.has-more::after { font-size: 10px; line-height: 16px; }
.choice-area.has-more::before { height: 22px; padding: 3px 6px; font-size: 10px; line-height: 16px; }
.dialogue-copy.has-more:focus-visible,
.choice-area.has-more:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.completion-copy.has-more::before {
  content: "↓ 下滑查看重玩与返回"; position: sticky; z-index: 4; top: 0; display: block; width: max-content; max-width: 100%;
  margin: -8px 0 -16px auto; padding: 2px 5px; background: rgba(7,10,10,.94); color: #c49b62; font-size: 8px; line-height: 12px; pointer-events: none;
}
.completion-copy.has-more:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.record-card[draggable="true"] { cursor: grab; }
.record-card[draggable="true"]:active { cursor: grabbing; }
.record-card.is-dragging { opacity: .48; }
.record-slot.is-drop-target { border-color: var(--ember); border-style: solid; background: rgba(191,122,52,.18); }

/* Exploration controls stay reachable even when a scene marker lands behind the lower dialogue panel. */
.choice-area.explore-control-list {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  align-items: stretch;
  gap: 8px;
  padding: 1px 4px 5px 0;
}
.explore-section { display: grid; min-width: 0; gap: 5px; }
.explore-section-title { margin: 0; color: #c9a66f; font-size: 9px; font-weight: 700; letter-spacing: .08em; line-height: 1.35; }
.explore-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 5px; min-width: 0; }
.clue-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 6px 22px 6px 9px;
  border: 1px solid rgba(231,218,186,.36);
  background: rgba(255,255,255,.045);
  color: #eee5d0;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .16s ease, background .16s ease;
}
.clue-card::after { content: "›"; position: absolute; right: 8px; top: 50%; translate: 0 -50%; color: var(--ember); font: 22px/1 var(--display); }
.clue-card:hover, .clue-card:focus-visible { border-color: #bd8a50; background: rgba(191,122,52,.16); }
.clue-index { color: #b58a53; font-size: 8px; font-weight: 700; letter-spacing: .06em; }
.clue-name { overflow: hidden; width: 100%; color: #f2ead7; font-size: 11px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; }
.clue-meta { display: -webkit-box; overflow: hidden; width: 100%; color: #9ea7a2; font-size: 8px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.choice-area.explore-control-list .choice-card { min-height: 52px; padding: 7px 25px 7px 27px; }
.choice-area.explore-control-list .choice-meta { margin-top: 3px; font-size: 8px; line-height: 1.35; }
.choice-area.explore-control-list .choice-index { top: 7px; left: 7px; }
.dialogue-panel.explore-mode .explore-progress { line-height: 1.5; }


/* 说不准的刻度：用问号而不是给一个玩家当时并不知道的数 */
.state-cell strong.is-unknown { color: #8fa0a0; font-style: italic; }
.weather-note .unknown-note { color: #d8a35f; }

/* Forced landscape keeps the logical layout horizontal even while the physical viewport remains portrait. */
body.force-landscape #app { width: var(--forced-w); height: var(--forced-h); min-height: 0; }
body.force-landscape .game-canvas { height: calc(100% - var(--topbar-h) - var(--safe-top)); }
body.force-landscape .landing-layout { grid-template-columns: minmax(255px,.62fr) minmax(0,1.5fr); grid-template-rows: minmax(0,1fr) auto; }
body.force-landscape .perspective-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.force-landscape .completion-layout { grid-template-columns: minmax(0,1.2fr) minmax(240px,.8fr); }
body.force-landscape .completion-visual { display: block; }
body.force-landscape .relay-region-grid,
body.force-landscape .relay-picks { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.force-landscape .culture-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.force-landscape .dialogue-panel { height: 54%; max-height: 54%; }
body.force-landscape .dialogue-panel.task-mode,
body.force-landscape .dialogue-panel.night-mode { height: 58%; max-height: 58%; }
body.force-landscape .dialogue-panel.explore-mode { height: 33%; max-height: 33%; }

/* Player experience: legible field notes over a cinematic landscape. */
.topbar-button { min-height: 44px; font-size: 13px; }
.chapter-stamp span, .night-clock small { font-size: 10px; color: #a5aca4; }
.scene-label { font-size: 12px; color: #f1e6cd; }
.app-shell.is-home .topbar { position: absolute; inset: 0 0 auto; background: transparent; border: 0; pointer-events: none; }
.app-shell.is-home .chapter-stamp { padding: 10px 18px; background: rgba(9,16,16,.55); border-bottom: 1px solid rgba(237,215,170,.35); }
.app-shell.is-home .game-canvas { height: 100dvh; }
.app-shell.is-home #rotate-exit { pointer-events: auto; }
.app-shell.is-home .scene-label { display: none; }
.home-screen { padding: clamp(24px,4vw,64px); }
.home-screen::before { background: linear-gradient(90deg,rgba(7,17,18,.91),rgba(7,17,18,.62) 36%,rgba(10,15,16,.14) 72%),linear-gradient(0deg,rgba(7,14,15,.8),transparent 36%); }
.landing-layout { grid-template-columns: minmax(300px,.9fr) minmax(0,1.4fr); gap: 24px 4vw; }
.landing-heading .home-kicker { font-size: 12px; letter-spacing: .2em; color: #e1b674; }
.landing-heading .home-title { font-size: clamp(52px,6.8vw,108px); line-height: 1.1; letter-spacing: .04em; }
.home-title small { margin: 10px 0 0; font-size: clamp(22px,2.4vw,34px); color: #ddcda8; }
.home-hook { margin: 30px 0 0; font: 500 clamp(19px,1.7vw,26px)/1.65 var(--display); color: #f5e7c9; }
.landing-heading .home-deck { margin-top: 16px; font-size: 14px; line-height: 1.8; color: #c7c9bb; }
.landing-meta { margin-top: 23px; gap: 8px 16px; font-size: 11px; letter-spacing: .03em; color: #b4bcb3; }
.perspective-grid { gap: 16px; }
.perspective-card { grid-template-columns: 43% minmax(0,1fr); height: clamp(340px,46vh,470px); background: linear-gradient(145deg,rgba(29,35,31,.82),rgba(10,18,18,.92)); border-color: rgba(222,206,163,.45); box-shadow: 0 16px 38px rgba(0,0,0,.2); transition: border-color .2s,transform .2s; }
.perspective-card.ma { border-top: 2px solid #c49962; }
.perspective-card.lin { border-top: 2px solid #8ca8a4; }
.perspective-card:hover, .perspective-card:focus-within { transform: translateY(-4px); border-color: #e1b674; }
.perspective-card img { height: 92%; }
.perspective-copy { justify-content: center; padding: 26px 15px; }
.perspective-kicker { color: #d2b687; font-size: 11px; letter-spacing: .06em; }
.perspective-copy h2 { margin-top: 12px; font-size: clamp(25px,2.5vw,36px); }
.perspective-copy p { margin-top: 16px; color: #d0d0bf; font-size: 13px; line-height: 1.9; }
.perspective-actions { width: 100%; margin-top: auto; padding-top: 24px; }
.perspective-actions .ink-button { width: 100%; min-height: 48px; font-size: 12px; padding: 10px 8px; line-height: 1.45; letter-spacing: .02em; }
.save-caption { font-size: 11px; color: #d0ba93; line-height: 1.5; }
.landing-foot { color: #b4beb4; font-size: 11px; gap: 8px 18px; }
.landing-foot .text-link { display: inline-flex; align-items: center; min-height: 36px; font-size: 12px; }
.ink-button.primary, .continue-button { background: #d4a05a; border-color: #e5be7c; color: #20170e; }
.ink-button.primary:hover, .continue-button:hover { background: #eac282; }
.dialogue-panel { border-color: rgba(225,207,167,.5); background: linear-gradient(125deg,rgba(14,23,23,.97),rgba(15,19,17,.95)); box-shadow: 0 10px 45px rgba(0,0,0,.3); }
.dialogue-panel::before { border-color: rgba(225,207,167,.08); }
.dialogue-eyebrow { font-size: 11px; color: #acb8b4; letter-spacing: .14em; }
.dialogue-speaker { font-size: 23px; color: #e5b671; }
.dialogue-text { font-size: 17px; line-height: 1.85; color: #ece9dc; }
.dialogue-panel.dialogue-only { height: min(26vh,235px); min-height: 174px; max-height: min(26vh,235px); }
.dialogue-panel.dialogue-only .dialogue-text { font-size: 17px; line-height: 1.85; }
.continue-button { min-height: 48px; font-size: 14px; line-height: 1.45; padding: 10px 18px; }
.dialogue-panel.explore-mode { height: min(28vh,255px); max-height: min(28vh,255px); min-height: 176px; padding: 18px 22px; }
.dialogue-panel.explore-mode .dialogue-text { font-size: 14px; line-height: 1.7; }
.explore-progress, .explore-section-title { font-size: 12px; color: #d9b77e; }
.clue-card { min-height: 74px; padding: 10px 26px 10px 12px; gap: 4px; }
.clue-index, .choice-index { font-size: 11px; color: #d5ae72; }
.clue-name { font-size: 14px; line-height: 1.45; white-space: normal; overflow: visible; }
.clue-meta { font-size: 12px; line-height: 1.45; color: #b5c0b6; -webkit-line-clamp: unset; }
.choice-area.explore-control-list .choice-card { min-height: 74px; padding: 12px 24px 12px 34px; }
.choice-area.explore-control-list .choice-meta { font-size: 12px; line-height: 1.5; }
.choice-card { padding: 12px 24px 10px 32px; }
.choice-name { font-size: 15px; line-height: 1.45; }
.choice-meta { font-size: 12px; color: #bbc4ba; line-height: 1.5; }
.choice-cost { display: block; margin-top: 7px; color: #d9b77e; font-size: 11px; line-height: 1.4; }
.choice-card.selected { border-color: #e0b16d; background: rgba(196,151,79,.19); box-shadow: inset 3px 0 #e0b16d; }
.choice-card:disabled .choice-meta { color: #baa98b; }
.hotspot-caption { font-size: 12px; line-height: 1.4; }
.dialogue-panel.task-mode, .dialogue-panel.night-mode { height: min(50vh,430px); max-height: min(50vh,430px); min-height: 250px; padding: 18px; grid-template-columns: minmax(0,.85fr) minmax(0,1.35fr); }
.dialogue-panel.task-mode .dialogue-text, .dialogue-panel.night-mode .dialogue-text { font-size: 14px; line-height: 1.7; }
.dialogue-panel.night-mode .choice-name { font-size: 15px; }
.dialogue-panel.night-mode .choice-meta { font-size: 12px; line-height: 1.45; }
.dialogue-panel.night-mode .choice-area { grid-auto-rows: minmax(88px,auto); gap: 8px; }
.state-cell { padding: 8px 10px; border-color: rgba(230,218,186,.17); background: rgba(221,203,162,.04); }
.state-cell span { font-size: 11px; color: #b5c0b8; }
.state-cell strong { font: 600 14px/1.4 var(--body); color: #ecd9b4; }
.dialogue-copy.has-night-plan { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 5px; overflow: hidden; }
.has-night-plan .dialogue-eyebrow { margin-bottom: 0; }
.has-night-plan .dialogue-text { min-height: 0; overflow: auto; margin-top: 3px; scrollbar-width: thin; }
.plan-caption { font-size: 12px; color: #b5c0b8; }
.plan-path { display: grid; gap: 5px; }
.plan-axis { display: grid; grid-template-columns: .8fr 1fr 22px 1fr; align-items: center; gap: 4px; padding: 7px 9px; background: rgba(221,203,162,.06); border-left: 2px solid #a48c64; font-size: 13px; }
.plan-axis > span:first-child { color: #b5c0b8; }
.plan-axis > strong { color: #e6bc7c; }
.plan-risk, .plan-unknown { font-size: 12px; line-height: 1.65; margin-top: 10px !important; }
.plan-risk.is-risk { border-left: 2px solid #d48868; padding-left: 8px; color: #f0b29b; }
.plan-unknown { color: #b5c0b8; }
.night-plan-actions { display: flex; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(221,203,162,.2); }
.night-plan-actions .continue-button { flex: 1; min-width: 0; font-size: 13px; padding-inline: 10px; }
.night-plan-actions .text-link { flex: none; min-width: 44px; min-height: 44px; font-size: 12px; }
.choice-area.record-mode { display: flex; flex-direction: column; gap: 12px; }
.record-workbench { flex: none; width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.record-cards, .record-slots { grid-template-columns: minmax(0,1fr); grid-auto-rows: minmax(88px,auto); gap: 8px; }
.record-card, .record-slot { min-height: 88px; padding: 12px; gap: 6px; }
.record-card strong, .record-slot strong { font-size: 14px; line-height: 1.55; }
.record-card small, .record-card span, .record-slot small { font-size: 12px; line-height: 1.5; }
.choice-area.record-mode > .continue-button { flex: none; align-self: end; width: auto; min-width: 180px; min-height: 48px; }
.record-card.is-selected { border-color: #e5b671; box-shadow: inset 3px 0 #e5b671; }
.record-card.is-matched { opacity: .68; }
.drawer-heading p { font-size: 11px; }
.drawer-heading h2 { font-size: 25px; }
.status-reason, .journal-entry p, .empty-note { font-size: 13px; line-height: 1.8; color: #bdc6ba; }
.drawer-close, .modal-close { width: 44px; height: 44px; }
.completion-kicker, .completion-stats small { font-size: 12px; }
.completion-summary { font-size: 15px; }
.completion-ledger, .completion-decisions { font-size: 13px; }
.completion-actions .ink-button, .completion-replay .text-link { font-size: 12px; min-height: 44px; }
.sound-settings p, .archive-card p, .legacy-card p, .guide-card p { font-size: 14px; line-height: 1.8; }
.toast { font-size: 14px; }
.choice-area.has-more.choice-list:not(.explore-control-list) { grid-template-rows: 22px; }
.dialogue-copy.has-night-plan::after { display: none; }
.dialogue-panel.night-mode .night-plan-actions .continue-button { min-height: 48px; padding: 8px 10px; font-size: 13px; }
.landing-foot .text-link { min-height: 44px; }
.game-canvas:has(#activity-screen:not([hidden])) .scene-label { visibility: hidden; }
.relay-header p:not(.home-kicker) { font-size: 13px; line-height: 1.7; color: #c2c9bc; }
.relay-intro, .culture-card p, .relay-element small, .relay-footer p, .relay-locked p { font-size: 13px; line-height: 1.75; color: #c2c9bc; }
.culture-card h3 { font-size: 17px; }
.culture-card .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
.relay-kicker { font-size: 11px; }
.relay-footer .ink-button { min-height: 48px; font-size: 13px; }

body.force-landscape .landing-layout { grid-template-columns: minmax(190px,.72fr) minmax(0,1.65fr); }
body.force-landscape .app-shell.is-home .game-canvas { height: var(--forced-h); }
body.force-landscape .dialogue-panel.dialogue-only { height: calc(var(--forced-h) * .39); max-height: calc(var(--forced-h) * .39); }
body.force-landscape .dialogue-panel.explore-mode { height: calc(var(--forced-h) * .47); max-height: calc(var(--forced-h) * .47); }
body.force-landscape .dialogue-panel.task-mode, body.force-landscape .dialogue-panel.night-mode { height: calc(var(--forced-h) * .69); max-height: calc(var(--forced-h) * .69); }
