@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #071821;
  --ink-2: #0b2430;
  --panel: rgba(12, 37, 47, .92);
  --line: rgba(157, 199, 195, .18);
  --text: #edf4ef;
  --muted: #91aaa9;
  --teal: #6ce1cb;
  --teal-dark: #153e40;
  --gold: #d8b976;
  --copper: #bf8055;
  --paper: #e6dbc0;
  --danger: #f19a87;
  --success: #80e1b3;
  --radius: 20px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); font-family: var(--sans); background: #071821; }
button, input, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:not(:disabled) { cursor: pointer; }
input, select { min-width: 0; color: var(--text); }
input::placeholder { color: #627d7e; }
[hidden] { display: none !important; }
.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font: 700 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: pulse 2s infinite; }

.primary-button, .secondary-button, .danger-button, .small-button, .text-button, .icon-button, .chart-button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 12px; font-weight: 700; transition: transform .18s, background .18s, border-color .18s;
}
.primary-button { padding: 12px 20px; color: #082728; background: linear-gradient(135deg, #83ead4, #55bfae); box-shadow: 0 8px 25px rgba(66, 199, 174, .16); }
.primary-button:not(:disabled):hover { transform: translateY(-2px); }
.primary-button--large { min-height: 52px; padding: 15px 24px; }
.secondary-button { padding: 11px 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.danger-button { padding: 11px 18px; color: #24100c; background: var(--danger); }
.small-button, .text-button, .chart-button { padding: 8px 11px; color: var(--muted); background: transparent; }
.small-button { border: 1px solid var(--line); font-size: 12px; }
.text-button { font-size: 12px; }
.chart-button { color: var(--teal); font-size: 12px; }
.icon-button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: rgba(255, 255, 255, .035); }
.full-button { width: 100%; }

/* 首页 */
.home-page { width: min(1160px, 100%); margin: 0 auto; padding: 22px 24px 38px; background: radial-gradient(circle at 90% 4%, rgba(55, 148, 139, .12), transparent 25%), radial-gradient(circle at 4% 48%, rgba(189, 128, 85, .07), transparent 24%); }
.home-topbar, .game-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-topbar { margin-bottom: 22px; }
.archive-brand { display: flex; align-items: center; gap: 12px; }
.archive-brand__mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--gold); color: var(--gold); font: 800 15px var(--mono); transform: rotate(-4deg); }
.archive-brand strong, .archive-brand small { display: block; }
.archive-brand strong { font-size: 14px; letter-spacing: .06em; }
.archive-brand small { margin-top: 3px; color: var(--muted); font: 9px var(--mono); letter-spacing: .12em; }
.hero-console { position: relative; display: grid; min-height: 430px; grid-template-columns: 1.15fr .85fr; overflow: hidden; border: 1px solid rgba(108, 225, 203, .25); border-radius: 28px; background: linear-gradient(120deg, #0a2833 0%, #0a202c 52%, #0a3035 100%); box-shadow: 0 28px 70px rgba(0, 0, 0, .28); }
.hero-console::before { position: absolute; inset: 0; content: ""; background: linear-gradient(105deg, transparent 65%, rgba(108, 225, 203, .04)); pointer-events: none; }
.hero-console__grid { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(108, 225, 203, .15) 1px, transparent 1px), linear-gradient(90deg, rgba(108, 225, 203, .15) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent, #000); }
.hero-console__content { position: relative; z-index: 2; padding: 52px 0 44px 48px; }
.hero-console h1 { margin: 20px 0 22px; font-size: clamp(58px, 7vw, 82px); line-height: .98; letter-spacing: .05em; }
.hero-console h1 span { color: var(--gold); }
.hero-console__lead { color: #b4c7c4; font-size: 16px; line-height: 1.9; }
.hero-console__actions { display: flex; margin-top: 32px; align-items: center; gap: 18px; }
.hero-console__actions > span { max-width: 110px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.hero-visual { position: relative; min-height: 350px; }
.hero-ship { position: absolute; z-index: 2; top: 50%; left: 50%; width: 112%; max-width: 430px; transform: translate(-52%, -43%); }
.hero-ship__hull { fill: rgba(108, 225, 203, .1); stroke: #74d7c7; stroke-width: 2; }
.hero-ship__deck, .hero-ship__detail { fill: none; stroke: #74d7c7; stroke-width: 2; }
.hero-ship__detail { opacity: .5; }
.hero-ship__wake { fill: none; stroke: #74d7c7; stroke-width: 1.5; opacity: .4; }
.hero-ship__pulse { fill: var(--gold); filter: drop-shadow(0 0 8px var(--gold)); animation: pulse 2s infinite; }
.radar-orbit { position: absolute; top: 48%; left: 52%; border: 1px solid rgba(108, 225, 203, .17); border-radius: 50%; transform: translate(-50%, -50%); }
.radar-orbit::before, .radar-orbit::after { position: absolute; content: ""; background: rgba(108, 225, 203, .15); }
.radar-orbit::before { top: 50%; left: 0; width: 100%; height: 1px; }
.radar-orbit::after { top: 0; left: 50%; width: 1px; height: 100%; }
.radar-orbit--one { width: 350px; height: 350px; }
.radar-orbit--two { width: 250px; height: 250px; }
.hero-coordinate { position: absolute; right: 25px; bottom: 24px; color: var(--teal); font: 10px var(--mono); letter-spacing: .12em; }
.restoration-status, .console-panel { margin-top: 22px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 15px 40px rgba(0, 0, 0, .12); }
.section-heading, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading { align-items: center; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 21px; letter-spacing: .03em; }
.section-heading > strong { color: var(--gold); font: 700 30px var(--mono); }
.section-heading > strong span { color: var(--muted); font-size: 15px; }
.section-heading__note { color: var(--muted); font-size: 12px; }
.progress-track { height: 4px; margin: 20px 0; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .5s; }
.fragment-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fragment-strip > div { padding: 13px 15px; border: 1px dashed rgba(216, 185, 118, .24); border-radius: 10px; background: rgba(0, 0, 0, .13); }
.fragment-strip span, .fragment-strip strong { display: block; }
.fragment-strip span { margin-bottom: 5px; color: var(--muted); font: 10px var(--mono); }
.fragment-strip strong { color: var(--gold); font: 700 16px var(--mono); letter-spacing: .1em; }
.mission-section { margin-top: 32px; }
.mission-list { display: grid; margin-top: 18px; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mission-card { position: relative; display: grid; min-height: 138px; padding: 22px; overflow: hidden; grid-template-columns: auto 1fr; gap: 15px; text-align: left; border: 1px solid var(--line); border-radius: 17px; background: rgba(12, 35, 45, .8); transition: transform .2s, border-color .2s, background .2s; }
.mission-card:hover { transform: translateY(-3px); border-color: rgba(108, 225, 203, .45); }
.mission-card.is-current { border-color: rgba(108, 225, 203, .55); background: linear-gradient(120deg, rgba(18, 63, 65, .9), rgba(12, 35, 45, .9)); }
.mission-card.is-complete { border-color: rgba(128, 225, 179, .3); }
.mission-card__number { position: absolute; top: 5px; right: 14px; color: rgba(255, 255, 255, .045); font: 800 64px var(--mono); }
.mission-card__icon { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid currentColor; border-radius: 14px; color: var(--teal); background: rgba(108, 225, 203, .06); }
.mission-card__icon .icon { width: 26px; height: 26px; }
.mission-card--amber .mission-card__icon { color: var(--gold); }
.mission-card--blue .mission-card__icon { color: #8db9ed; }
.mission-card--copper .mission-card__icon { color: var(--copper); }
.mission-card__copy { position: relative; z-index: 1; }
.mission-card__copy small, .mission-card__copy strong, .mission-card__copy em { display: block; }
.mission-card__copy small { color: var(--muted); font: 9px var(--mono); letter-spacing: .1em; }
.mission-card__copy strong { margin-top: 7px; font-size: 20px; }
.mission-card__copy em { margin-top: 5px; color: var(--muted); font-size: 12px; font-style: normal; }
.mission-card__state { position: absolute; right: 18px; bottom: 16px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.is-complete .mission-card__state { color: var(--success); }
.mission-card__state .icon { width: 14px; }
.archive-brief { position: relative; display: grid; margin-top: 30px; padding: 30px; grid-template-columns: 1fr 1.2fr; gap: 25px; border: 1px solid rgba(216, 185, 118, .2); border-radius: var(--radius); background: linear-gradient(115deg, rgba(77, 63, 41, .24), rgba(16, 37, 44, .85)); }
.archive-brief h2 { margin: 0 0 12px; }
.archive-brief p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.archive-brief__stamp { position: absolute; top: 22px; right: 25px; width: 55px; height: 55px; padding-top: 8px; border: 2px solid rgba(191, 128, 85, .4); border-radius: 50%; color: rgba(191, 128, 85, .55); text-align: center; font-weight: 800; line-height: 1.2; transform: rotate(12deg); }
.archive-brief ol { margin: 0; padding: 0; list-style: none; }
.archive-brief li { display: flex; padding: 9px 0; align-items: center; gap: 12px; color: #b9c7c2; font-size: 12px; border-bottom: 1px solid var(--line); }
.archive-brief li span { color: var(--gold); font: 11px var(--mono); }
.home-footer { display: flex; margin-top: 28px; justify-content: space-between; color: #5e7778; font: 10px var(--mono); }

/* 游戏通用 */
.game-page { min-height: 100vh; background: radial-gradient(circle at 100% 0%, rgba(59, 139, 134, .12), transparent 26%), #071821; }
.game-header { width: min(1160px, 100%); margin: 0 auto; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.game-header__brand { flex: 1; }
.game-header__brand span, .game-header__brand strong { display: block; }
.game-header__brand span { color: var(--muted); font: 9px var(--mono); letter-spacing: .14em; }
.game-header__brand strong { margin-top: 3px; font-size: 13px; }
.game-header__status { display: flex; align-items: center; gap: 7px; color: var(--teal); font: 10px var(--mono); }
.game-header__status i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.mission-heading { display: flex; width: min(900px, 100%); margin: 0 auto; padding: 32px 24px 12px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.mission-heading h1 { margin: 0 0 10px; font-size: clamp(32px, 6vw, 46px); letter-spacing: .05em; }
.mission-heading p:not(.eyebrow) { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.mission-heading__code { padding: 8px 10px; border: 1px solid var(--line); color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.game-content { width: min(900px, 100%); margin: 0 auto; padding: 14px 24px 42px; }
.story-transmission { display: flex; margin: 10px 0 18px; padding: 15px 17px; align-items: center; gap: 13px; border: 1px solid rgba(108, 225, 203, .17); border-radius: 15px; background: linear-gradient(90deg, rgba(29, 75, 75, .5), rgba(13, 38, 46, .65)); }
.story-transmission__avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal); font-weight: 800; }
.story-transmission small { color: var(--teal); font: 9px var(--mono); letter-spacing: .08em; }
.story-transmission p { margin: 5px 0 0; color: #bfd0ca; font-size: 12px; line-height: 1.65; }
.transmission-bars { display: flex; height: 25px; align-items: flex-end; gap: 3px; }
.transmission-bars i { width: 3px; background: var(--teal); animation: bars 1s infinite alternate; }
.transmission-bars i:nth-child(1) { height: 8px; }
.transmission-bars i:nth-child(2) { height: 20px; animation-delay: .2s; }
.transmission-bars i:nth-child(3) { height: 13px; animation-delay: .4s; }
.transmission-bars i:nth-child(4) { height: 24px; animation-delay: .6s; }
.panel-tag { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.panel-hint { margin: 12px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.field-label { display: block; margin: 16px 0 8px; color: var(--muted); font-size: 11px; }
.code-input, .text-input, select { min-height: 48px; padding: 11px 14px; border: 1px solid rgba(142, 178, 175, .26); border-radius: 10px; outline: 0; background: rgba(2, 15, 20, .55); }
.code-input { font: 700 17px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.text-input { font-size: 16px; }
.code-input:focus, .text-input:focus, select:focus { border-color: var(--teal); }
.answer-row { display: flex; gap: 10px; }
.answer-row input { flex: 1; }
.manual-slots { display: grid; margin: 16px 0; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.manual-slots span { display: grid; height: 46px; place-items: center; border: 1px dashed rgba(108, 225, 203, .25); border-radius: 8px; color: #496d6c; font: 20px var(--mono); background: rgba(0, 0, 0, .12); }
.success-card { position: relative; margin-top: 35px; padding: 42px 32px; overflow: hidden; text-align: center; border: 1px solid rgba(128, 225, 179, .35); border-radius: 24px; background: radial-gradient(circle at 50% 0, rgba(128, 225, 179, .12), transparent 45%), var(--panel); }
.success-card__seal { display: grid; width: 68px; height: 68px; margin: 0 auto 22px; place-items: center; border: 1px solid var(--success); border-radius: 50%; color: var(--success); box-shadow: 0 0 30px rgba(128, 225, 179, .12); }
.success-card__seal .icon { width: 34px; height: 34px; }
.success-card h2 { margin: 8px 0 20px; }
.success-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.8; }
.fragment-display { display: inline-flex; margin: 6px 0 15px; padding: 14px 20px; align-items: center; gap: 16px; border: 1px dashed var(--gold); border-radius: 12px; background: rgba(0, 0, 0, .16); }
.fragment-display span { color: var(--muted); font: 10px var(--mono); }
.fragment-display strong { color: var(--gold); font: 800 26px var(--mono); letter-spacing: .12em; }
.success-card .primary-button { margin-top: 15px; }

/* 旗语通信台 */
.activation-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.activation-grid label { position: relative; }
.activation-grid label > span { position: absolute; z-index: 1; top: 5px; left: 8px; color: var(--muted); font: 8px var(--mono); }
.activation-input { width: 100%; height: 56px; padding: 14px 5px 4px; text-align: center; border: 1px solid var(--line); border-radius: 9px; color: var(--teal); background: rgba(0, 0, 0, .18); font: 700 19px var(--mono); }
.signal-scope { margin-top: 17px; padding: 13px; border: 1px solid rgba(108, 225, 203, .14); border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(52, 123, 117, .12), transparent 50%), rgba(2, 16, 22, .5); }
.signal-scope__status { display: flex; margin-bottom: 12px; align-items: center; justify-content: space-between; gap: 8px; }
.signal-scope__status > span { color: var(--muted); font-size: 10px; }
.signal-scope__status b { font-weight: 500; }
.operator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.operator-card { position: relative; min-width: 0; padding: 6px 5px 8px; overflow: hidden; border: 1px solid rgba(129, 173, 170, .16); border-radius: 10px; background: linear-gradient(160deg, rgba(25, 58, 64, .75), rgba(7, 27, 35, .9)); }
.operator-card.is-broadcasting { border-color: rgba(108, 225, 203, .32); }
.operator-card__id { position: absolute; z-index: 2; top: 7px; left: 8px; color: var(--gold); font: 700 12px var(--mono); }
.operator-card__signal { position: absolute; z-index: 2; top: 7px; right: 7px; color: var(--teal); font: 8px var(--mono); }
.operator-card .semaphore-figure { display: block; width: 100%; height: 112px; margin-top: 9px; }
.operator-card__footer { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 9px; }
.operator-card__footer i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.is-broadcasting .operator-card__footer { color: var(--teal); }
.is-broadcasting .operator-card__footer i { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.signal-head { fill: #d2aa82; }
.signal-cap, .signal-body { fill: #31545c; stroke: #8bb4ae; stroke-width: 1; }
.signal-belt, .signal-leg { fill: none; stroke: #8bb4ae; stroke-width: 3; }
.signal-arm { stroke: #d2aa82; stroke-width: 6; stroke-linecap: round; }
.signal-flag { fill: #d65443; stroke: #f3d27b; stroke-width: 1; }
.signal-flag__diagonal { fill: #f0cc55; }
.signal-freeze { text-align: center; }
.signal-freeze__scope { position: relative; width: 250px; max-width: 100%; margin: 0 auto; border: 1px solid rgba(108, 225, 203, .3); border-radius: 50%; background: radial-gradient(circle, rgba(50, 113, 104, .2), transparent 65%); }
.signal-freeze__scope > span { position: absolute; z-index: 2; top: 15px; left: 20px; color: var(--teal); font: 11px var(--mono); }
.signal-freeze__scope .semaphore-figure { width: 100%; height: 260px; }
.signal-freeze p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.signal-freeze p strong { display: block; color: var(--text); font-size: 17px; }
.signal-freeze__warning { color: var(--gold); font: 10px var(--mono); }
.chart-note { color: var(--muted); font-size: 12px; line-height: 1.7; }
.semaphore-chart__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.semaphore-chart__item { padding: 5px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .025); }
.semaphore-chart__item .semaphore-figure { width: 100%; height: 88px; }
.semaphore-chart__item strong { color: var(--gold); font: 700 16px var(--mono); }

/* 历史档案工作台 */
.game-page--archive { --teal: #d8b976; background: radial-gradient(circle at 0 0, rgba(165, 123, 69, .12), transparent 30%), #171b1b; }
.game-page--archive .console-panel, .archive-workbench, .overlay-output { border-color: rgba(216, 185, 118, .19); background: rgba(40, 40, 34, .92); }
.story-transmission--paper { border-color: rgba(216, 185, 118, .2); background: linear-gradient(90deg, rgba(88, 68, 39, .28), rgba(37, 39, 34, .8)); }
.story-transmission--paper .story-transmission__avatar, .story-transmission--paper small { color: var(--gold); border-color: var(--gold); }
.paper-stamp { margin-left: auto; padding: 7px; border: 1px solid rgba(191, 128, 85, .5); color: var(--copper); font-size: 11px; transform: rotate(8deg); }
.archive-workbench, .overlay-output { margin-top: 22px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); }
.overlay-card-pool { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.overlay-card { position: relative; min-width: 0; padding: 0; border: 0; border-radius: 9px; background: transparent; cursor: grab; transition: transform .18s, opacity .18s; }
.overlay-card__num { position: absolute; top: 3px; left: 5px; z-index: 2; color: var(--gold); font: 800 13px/1 var(--mono); text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.overlay-card:not(:disabled):hover { transform: translateY(-4px); }
.overlay-card:active { cursor: grabbing; }
.overlay-card.is-used { opacity: .25; }
.workbench-actions { display: flex; margin-top: 20px; justify-content: space-between; gap: 10px; }
.overlay-result { position: relative; width: min(600px, 100%); margin: 15px auto 0; overflow: hidden; aspect-ratio: 600 / 630; border: 7px solid #514a3b; border-radius: 4px; background: var(--paper); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); animation: develop .65s ease-out; }
.archive-document { position: absolute; inset: 0; padding: 5% 6%; color: #2c322e; background: linear-gradient(90deg, rgba(93, 78, 45, .05) 1px, transparent 1px), #e5dcc4; background-size: 24px 100%; font-family: "Songti SC", "STSong", serif; }
.archive-document header { display: flex; padding-bottom: 2%; justify-content: space-between; border-bottom: 2px solid #5a6358; font-size: clamp(8px, 2.2vw, 13px); }
.archive-document h3 { margin: 4% 0 3%; text-align: center; font-size: clamp(15px, 4.2vw, 26px); letter-spacing: .1em; }
.archive-document p { margin: 2.5% 0; font-size: clamp(8px, 2.25vw, 14px); line-height: 1.7; }
.archive-document__columns { display: flex; margin: 3% 0; justify-content: space-around; border-top: 1px solid #899080; border-bottom: 1px solid #899080; font-size: clamp(7px, 2vw, 12px); }
.archive-document__columns span { padding: 2% 0; }
.archive-phrase { position: absolute; top: 54.3%; left: 13.7%; display: grid; width: 72.8%; height: 13.2%; grid-template-columns: repeat(4, 1fr); align-items: center; text-align: center; }
.archive-phrase span { color: #192923; font-size: clamp(27px, 9vw, 57px); font-weight: 900; }
.archive-document footer { position: absolute; right: 6%; bottom: 4%; left: 6%; display: flex; justify-content: space-between; border-top: 1px solid #899080; font: clamp(6px, 1.7vw, 10px) var(--mono); }
.archive-mask { position: absolute; inset: 0; width: 100%; height: 100%; }
.archive-unlock { margin-bottom: 20px; }

/* 星轨控制台 */
.game-page--orbit { --teal: #83d8e8; position: relative; background: #071526; }
.starfield { position: fixed; inset: 0; opacity: .55; pointer-events: none; background-image: radial-gradient(circle at 10% 20%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 70% 12%, #83d8e8 0 1px, transparent 1.5px), radial-gradient(circle at 80% 65%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 30% 80%, #83d8e8 0 1px, transparent 1.5px), radial-gradient(circle at 45% 40%, #fff 0 1px, transparent 1.5px); background-size: 170px 190px, 230px 250px, 190px 210px, 270px 230px, 310px 290px; }
.game-page--orbit .game-header, .game-page--orbit .mission-heading, .game-page--orbit .game-content { position: relative; }
.story-transmission--orbit { background: linear-gradient(90deg, rgba(33, 72, 109, .4), rgba(10, 26, 50, .8)); }
.orbit-pulse { width: 35px; height: 35px; margin-left: auto; border: 1px solid var(--teal); border-radius: 50%; box-shadow: 0 0 20px rgba(131, 216, 232, .2); animation: pulse 2s infinite; }
.orbit-console { margin-top: 20px; padding: 25px; border: 1px solid rgba(131, 216, 232, .24); border-radius: var(--radius); background: rgba(7, 25, 47, .88); box-shadow: inset 0 0 45px rgba(46, 94, 140, .1); }
.orbit-grid-wrap { margin-top: 18px; padding: 14px; border: 1px solid rgba(131, 216, 232, .16); border-radius: 14px; background: radial-gradient(circle, rgba(45, 95, 132, .14), transparent 70%), rgba(2, 12, 28, .7); }
.orbit-grid { display: grid; grid-template-columns: .7fr repeat(5, 1fr); gap: 6px; }
.orbit-grid__axis, .orbit-grid__header { display: grid; min-height: 26px; place-items: center; color: #7194ad; font: 10px var(--mono); }
.orbit-cell { position: relative; display: grid; aspect-ratio: 1; place-items: center; border: 1px solid rgba(131, 216, 232, .19); border-radius: 7px; color: #b9d8e5; background: rgba(35, 73, 105, .15); font: 700 clamp(16px, 4vw, 22px) var(--mono); transition: background .2s, color .2s; }
.orbit-cell.is-active { color: #fff4c5; border-color: var(--gold); background: rgba(131, 216, 232, .2); box-shadow: 0 0 18px rgba(131, 216, 232, .18); }
.cell-satellite { position: absolute; top: -8px; right: -7px; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--gold); background: #102b43; filter: drop-shadow(0 0 5px var(--gold)); }
.cell-satellite .icon { width: 19px; height: 19px; }
.orbit-readout { display: flex; margin-top: 15px; align-items: center; gap: 12px; color: var(--muted); font: 10px var(--mono); }
.orbit-readout strong { color: var(--teal); font-size: 12px; }
.orbit-readout i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--teal), transparent); }
.coordinate-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.coordinate-inputs label > span { display: block; margin-bottom: 7px; color: var(--muted); font: 10px var(--mono); }
.coordinate-inputs select { width: 100%; }
.coordinate-comma { padding-bottom: 14px; color: var(--gold); font-size: 25px; }
.coordinate-inputs .primary-button { grid-column: 1 / -1; margin-top: 5px; }
.coordinate-history { display: flex; min-height: 35px; margin-top: 15px; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 10px; }
.coordinate-history span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.task-sequence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.task-sequence span { padding: 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 10px; }
.task-sequence b { margin-right: 5px; color: var(--gold); font: 9px var(--mono); }

/* 终局修复 */
.game-page--final { --teal: #dbc080; background: radial-gradient(circle at 50% 0, rgba(171, 128, 67, .14), transparent 30%), #111e24; }
.story-transmission--final { background: linear-gradient(90deg, rgba(95, 71, 37, .32), rgba(18, 37, 43, .8)); }
.final-lock { margin-left: auto; color: var(--gold); }
.final-lock .icon { width: 28px; height: 28px; }
.final-step { position: relative; }
.step-marker { position: absolute; top: 16px; right: 20px; color: rgba(216, 185, 118, .09); font: 800 58px var(--mono); }
.final-fragment-inputs { display: flex; margin: 20px 0; align-items: end; gap: 10px; }
.final-fragment-inputs label { flex: 1; }
.final-fragment-inputs label > span, .pinyin-inputs label > span { display: block; margin-bottom: 7px; color: var(--muted); font: 10px var(--mono); }
.final-fragment-inputs input { width: 100%; }
.final-fragment-inputs > i { padding-bottom: 14px; color: var(--gold); font-style: normal; }
.combined-cipher { margin-top: 18px; padding: 15px; text-align: center; border: 1px dashed var(--gold); border-radius: 10px; background: rgba(0, 0, 0, .15); }
.combined-cipher span, .combined-cipher strong { display: block; }
.combined-cipher span { margin-bottom: 8px; color: var(--muted); font: 9px var(--mono); }
.combined-cipher strong { color: var(--gold); font: 700 16px var(--mono); letter-spacing: .05em; }
.key-riddle { display: flex; margin: 22px 0; align-items: center; justify-content: center; gap: 15px; font-size: 27px; font-weight: 800; }
.key-riddle label { text-align: center; }
.key-riddle input { width: 70px; height: 67px; text-align: center; border: 1px solid var(--gold); border-radius: 9px; color: var(--gold); background: rgba(0, 0, 0, .18); font: 800 32px var(--mono); }
.key-riddle small { display: block; margin-top: 5px; color: var(--muted); font: 9px var(--sans); }
.cipher-wheel { position: relative; width: 330px; max-width: 100%; margin: 20px auto; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 36%, #33484f, #1a2b30 58%, #0d181b); box-shadow: 0 20px 48px rgba(0, 0, 0, .55), inset 0 2px 5px rgba(255, 255, 255, .07), inset 0 -10px 22px rgba(0, 0, 0, .5); }
/* 保险箱外缘滚花 */
.cipher-wheel::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(220, 235, 228, .5) 0deg 1.6deg, rgba(0, 0, 0, .55) 1.6deg 3.2deg); -webkit-mask: radial-gradient(circle, transparent 93%, #000 94%); mask: radial-gradient(circle, transparent 93%, #000 94%); }
/* 外盘固定刻度环：26格刻线 */
.cipher-wheel__rings { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(216, 185, 118, .85) 0deg 1deg, transparent 1deg 13.846deg), radial-gradient(circle, transparent 74%, rgba(216, 185, 118, .1) 76%, rgba(216, 185, 118, .1) 92%, transparent 93%); -webkit-mask: radial-gradient(circle, transparent 74.5%, #000 75%, #000 92.5%, transparent 93%); mask: radial-gradient(circle, transparent 74.5%, #000 75%, #000 92.5%, transparent 93%); }
/* 顶部对准刻线 */
.safe-index { position: absolute; top: 2%; left: 50%; z-index: 8; width: 0; height: 0; border-right: 7px solid transparent; border-left: 7px solid transparent; border-top: 13px solid var(--gold); transform: translateX(-50%); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.cipher-wheel.is-aligned .safe-index { border-top-color: #6ce1cb; filter: drop-shadow(0 0 7px rgba(108, 225, 203, .85)); }
/* 可扭动的内盘 */
.safe-inner-disc { position: absolute; inset: 16.5%; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #2f4f4a, #1d3532 60%, #122321); box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 1px 3px rgba(255, 255, 255, .09); }
.safe-inner-disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(131, 216, 232, .55) 0deg 2deg, rgba(0, 0, 0, .4) 2deg 4.5deg); -webkit-mask: radial-gradient(circle, transparent 90%, #000 91%); mask: radial-gradient(circle, transparent 90%, #000 91%); }
/* 内盘抓握标记：随盘转动，便于看见扭动 */
.safe-inner-disc::after { content: ""; position: absolute; top: 6%; left: 50%; width: 6px; height: 14px; border-radius: 3px; background: rgba(131, 216, 232, .8); box-shadow: 0 0 6px rgba(131, 216, 232, .5); transform: translateX(-50%); }
.wheel-letter { position: absolute; top: 50%; left: 50%; display: grid; width: 22px; height: 22px; margin: -11px; place-items: center; font: 700 12px var(--mono); }
.wheel-letter--outer { color: var(--gold); transform: rotate(var(--angle)) translateY(-145px) rotate(calc(var(--angle) * -1)); }
.wheel-letter--inner { color: #6ce1cb; transform: rotate(var(--angle)) translateY(-99px) rotate(calc(var(--angle) * -1)); }
.cipher-wheel__center { position: absolute; top: 50%; left: 50%; z-index: 7; display: grid; width: 82px; height: 82px; place-items: center; border: 1px solid rgba(216, 185, 118, .35); border-radius: 50%; background: radial-gradient(circle at 50% 32%, #3a4c52, #101d21 72%); box-shadow: 0 5px 12px rgba(0, 0, 0, .6), inset 0 1px 3px rgba(255, 255, 255, .12); transform: translate(-50%, -50%); }
.cipher-wheel__center strong { margin-top: 12px; color: var(--gold); font: 800 28px var(--mono); }
.cipher-wheel__center span { margin-top: -15px; color: var(--muted); font: 8px var(--mono); }
.pinyin-inputs { display: grid; margin-top: 20px; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinyin-inputs input { width: 100%; }
.archive-blanks { margin: 18px 0; }
.archive-blanks > label { display: grid; margin: 10px 0; padding: 13px; grid-template-columns: 75px 1fr; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, .1); }
.archive-blanks > label > span { color: var(--gold); font-size: 12px; }
.archive-blanks p { margin: 0; color: #c5cfca; font-size: 12px; line-height: 2; }
.archive-blanks input { width: 80px; min-height: 38px; padding: 4px 7px; text-align: center; border: 0; border-bottom: 1px solid var(--gold); background: transparent; }
.restored-archive { position: relative; margin-top: 30px; padding: 38px 30px; overflow: hidden; text-align: center; border: 1px solid rgba(216, 185, 118, .45); border-radius: 24px; background: linear-gradient(145deg, rgba(89, 68, 37, .2), transparent 40%), #13282d; box-shadow: 0 25px 70px rgba(0, 0, 0, .25); }
.restored-archive__seal { display: inline-flex; margin-bottom: 22px; padding: 10px 15px; align-items: center; gap: 8px; border: 2px solid var(--gold); border-radius: 5px; color: var(--gold); font-weight: 800; transform: rotate(-3deg); }
.restored-archive h2 { margin: 10px 0; font-size: 35px; letter-spacing: .1em; }
.restored-archive__subtitle { color: var(--muted); font-size: 12px; }
.restored-volumes { display: grid; margin: 28px 0; grid-template-columns: repeat(3, 1fr); gap: 11px; text-align: left; }
.restored-volumes article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .14); }
.restored-volumes article > span { color: var(--muted); font: 9px var(--mono); }
.restored-volumes h3 { margin: 9px 0; color: var(--gold); font-size: 27px; }
.restored-volumes p { min-height: 58px; color: #bdcbc5; font-size: 11px; line-height: 1.7; }
.restored-volumes code { color: var(--teal); font-size: 12px; letter-spacing: .12em; }
.restored-cipher { padding: 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.restored-cipher span, .restored-cipher strong, .restored-cipher small { display: block; }
.restored-cipher span, .restored-cipher small { color: var(--muted); font: 9px var(--mono); }
.restored-cipher strong { margin: 8px 0; color: var(--gold); font: 700 16px var(--mono); }
.restored-archive__note { color: var(--muted); font-size: 12px; }

/* 弹层与反馈 */
.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; left: 20px; width: min(520px, calc(100% - 40px)); margin: auto; padding: 14px 17px; border: 1px solid rgba(108, 225, 203, .35); border-radius: 12px; color: var(--text); background: rgba(10, 34, 42, .97); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); font-size: 13px; line-height: 1.6; opacity: 0; transform: translateY(20px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast--error { border-color: rgba(241, 154, 135, .6); }
.toast--warning { border-color: rgba(216, 185, 118, .6); }
.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; padding: 20px; overflow-y: auto; place-items: center; background: rgba(2, 12, 17, .82); backdrop-filter: blur(7px); }
.modal-dialog { width: min(650px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid rgba(108, 225, 203, .3); border-radius: 20px; background: #0b242d; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.modal-header { position: sticky; z-index: 3; top: 0; display: flex; padding: 16px 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #0b242d; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; }
.chart-modal { width: min(850px, 100%); }
.confirm-dialog p { margin-top: 0; color: var(--muted); line-height: 1.8; }
.confirm-dialog__actions { display: flex; margin-top: 22px; justify-content: flex-end; gap: 10px; }

@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes bars { from { transform: scaleY(.4); } to { transform: scaleY(1); } }
@keyframes develop { from { opacity: .2; transform: translateY(12px) rotateX(8deg); } to { opacity: 1; transform: translateY(0) rotateX(0); } }

@media (min-width: 900px) {
  .game-content { padding-bottom: 60px; }
  .console-panel, .archive-workbench, .overlay-output, .orbit-console { padding: 28px 30px; }
}

@media (max-width: 720px) {
  .home-page { padding: 16px 15px 30px; }
  .home-topbar { margin-bottom: 15px; }
  .hero-console { min-height: 570px; grid-template-columns: 1fr; }
  .hero-console__content { padding: 32px 27px 0; }
  .hero-console h1 { font-size: 55px; }
  .hero-console__lead { font-size: 14px; }
  .hero-visual { min-height: 230px; }
  .hero-ship { width: 85%; max-width: 320px; transform: translate(-50%, -50%); }
  .radar-orbit--one { width: 270px; height: 270px; }
  .radar-orbit--two { width: 190px; height: 190px; }
  .hero-coordinate { right: 18px; bottom: 15px; }
  .mission-list { grid-template-columns: 1fr; }
  .archive-brief { grid-template-columns: 1fr; padding: 25px; }
  .archive-brief__stamp { top: 18px; right: 18px; }
  .game-header { padding: 13px 15px; }
  .game-header__status { display: none; }
  .mission-heading { padding: 25px 18px 8px; }
  .mission-heading__code { display: none; }
  .game-content { padding: 12px 15px 35px; }
  .operator-grid { grid-template-columns: repeat(3, 1fr); }
  .overlay-card-pool { grid-template-columns: repeat(5, 1fr); }
  .semaphore-chart__grid { grid-template-columns: repeat(4, 1fr); }
  .restored-volumes { grid-template-columns: 1fr; }
  .restored-volumes p { min-height: 0; }
}

@media (max-width: 480px) {
  .archive-brand small { display: none; }
  .hero-console__content { padding: 28px 22px 0; }
  .hero-console h1 { margin-top: 16px; font-size: 49px; }
  .hero-console__actions { margin-top: 23px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero-console__actions > span { max-width: none; }
  .hero-console { min-height: 610px; }
  .restoration-status, .console-panel, .archive-workbench, .overlay-output, .orbit-console { padding: 19px 16px; }
  .section-heading h2, .panel-heading h2 { font-size: 18px; }
  .fragment-strip { gap: 6px; }
  .fragment-strip > div { padding: 10px 8px; }
  .fragment-strip strong { font-size: 13px; letter-spacing: .04em; }
  .section-heading__note { display: none; }
  .mission-card { min-height: 128px; padding: 18px; }
  .home-footer { align-items: center; flex-direction: column; gap: 7px; }
  .story-transmission { padding: 12px; }
  .story-transmission__avatar { width: 35px; height: 35px; }
  .transmission-bars { display: none; }
  .activation-grid { grid-template-columns: repeat(3, 1fr); }
  .operator-card .semaphore-figure { height: 96px; }
  .signal-scope { padding: 8px; }
  .signal-scope__status { align-items: flex-start; }
  .chart-button { padding-right: 3px; font-size: 10px; }
  .answer-row { flex-direction: column; }
  .answer-row .primary-button { width: 100%; }
  .workbench-actions { flex-direction: column-reverse; }
  .workbench-actions button { width: 100%; }
  .archive-document p { line-height: 1.5; }
  .task-sequence { grid-template-columns: repeat(2, 1fr); }
  .final-fragment-inputs { display: grid; grid-template-columns: 1fr; }
  .final-fragment-inputs > i { display: none; }
  .pinyin-inputs { grid-template-columns: 1fr; }
  .cipher-wheel { width: 285px; }
  .wheel-letter--outer { transform: rotate(var(--angle)) translateY(-125px) rotate(calc(var(--angle) * -1)); }
  .wheel-letter--inner { transform: rotate(var(--angle)) translateY(-85px) rotate(calc(var(--angle) * -1)); }
  .cipher-wheel__rings { box-shadow: inset 0 0 0 30px rgba(216, 185, 118, .025), inset 0 0 0 31px rgba(216, 185, 118, .16), inset 0 0 0 70px rgba(108, 225, 203, .02), inset 0 0 0 71px rgba(108, 225, 203, .15); }
  .archive-blanks > label { grid-template-columns: 1fr; gap: 6px; }
  .restored-archive { padding: 28px 18px; }
  .restored-archive h2 { font-size: 29px; }
  .modal-backdrop { padding: 10px; }
  .modal-dialog { max-height: calc(100vh - 20px); }
  .modal-body { padding: 15px; }
}

/* 第二轮：有效交互、真实叠图与成就反馈 */
.home-topbar__status { display: flex; align-items: center; color: var(--muted); font: 10px var(--mono); }
.reset-button { display: inline-flex; min-height: 52px; padding: 13px 18px; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(216, 185, 118, .55); border-radius: 12px; color: var(--gold); background: rgba(216, 185, 118, .07); font-weight: 700; white-space: nowrap; }
.reset-button:hover { border-color: var(--gold); background: rgba(216, 185, 118, .14); }
.hero-console__actions, .hero-console__actions > span { flex-direction: row; }
.static-call-signs { display: flex; margin-top: 18px; align-items: center; justify-content: space-between; gap: 8px; }
.static-call-signs > span { display: grid; min-width: 66px; height: 58px; place-items: center; border: 1px solid rgba(108, 225, 203, .28); border-radius: 9px; background: rgba(0, 0, 0, .16); }
.static-call-signs small { color: var(--muted); font: 8px var(--mono); }
.static-call-signs strong { color: var(--teal); font: 800 20px var(--mono); }
.static-call-signs > i { color: var(--gold); font-style: normal; }

.manuscript-panel { margin-top: 22px; padding: 25px; border: 1px solid rgba(216, 185, 118, .2); border-radius: var(--radius); background: rgba(40, 40, 34, .92); }
.manuscript-board { position: relative; width: min(600px, 100%); margin: 18px auto 0; overflow: hidden; aspect-ratio: 1; border: 8px solid #514a3b; border-radius: 5px; background: #e5dcc4; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.manuscript-grid { display: grid; height: 100%; grid-template-columns: repeat(4, 1fr); }
.manuscript-grid > span { position: relative; display: grid; place-items: center; border-right: 1px solid #a9a58e; border-bottom: 1px solid #a9a58e; color: #303a32; background: linear-gradient(135deg, rgba(100, 86, 53, .035), transparent); }
.manuscript-grid > span:nth-child(4n) { border-right: 0; }
.manuscript-grid > span:nth-last-child(-n+4) { border-bottom: 0; }
.manuscript-grid small { position: absolute; top: 7px; left: 8px; color: #8c8c78; font: clamp(7px, 1.8vw, 11px) var(--mono); }
.manuscript-grid strong { font-family: "Songti SC", "STSong", serif; font-size: clamp(32px, 9vw, 62px); }
.manuscript-grid > span.is-answer { color: #8e5d25; background: rgba(216, 185, 118, .22); }
.manuscript-board.is-stacked .manuscript-grid > span:not(.is-visible-hole) { border-color: rgba(169, 165, 142, .22); background: transparent; }
.manuscript-board.is-stacked .manuscript-grid > span:not(.is-visible-hole) strong,
.manuscript-board.is-stacked .manuscript-grid > span:not(.is-visible-hole) small { opacity: 0; }
.manuscript-board.is-stacked .manuscript-grid > span.is-visible-hole { box-shadow: inset 0 0 0 2px rgba(142, 93, 37, .5); }
.manuscript-grid { position: relative; z-index: 0; }
.manuscript-layers, .manuscript-mask { position: absolute; inset: 0; pointer-events: none; }
.manuscript-layers { z-index: 5; }
.manuscript-mask { z-index: calc(5 + var(--layer)); animation: develop .45s ease-out; }
.board-drop-hint { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; gap: 6px; border: 2px dashed rgba(142, 93, 37, .45); border-radius: 4px; color: #8e5d25; text-align: center; pointer-events: none; }
.board-drop-hint strong { font-size: 15px; }
.board-drop-hint span { font-size: 11px; color: #8c8c78; }
.board-drop-hint[hidden] { display: none; }
.manuscript-board.is-drop-target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 185, 118, .35), 0 18px 40px rgba(0, 0, 0, .3); }
.layer-chips { display: flex; min-height: 34px; margin-top: 10px; align-items: center; gap: 8px; flex-wrap: wrap; }
.layer-chip { display: inline-flex; padding: 5px 6px 5px 10px; align-items: center; gap: 7px; border: 1px solid rgba(216, 185, 118, .35); border-radius: 999px; color: var(--gold); background: rgba(216, 185, 118, .08); font: 700 12px var(--mono); }
.layer-chip b { color: var(--muted); font-size: 10px; font-weight: 400; }
.layer-chip button { display: grid; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 50%; color: var(--ink); background: rgba(216, 185, 118, .3); cursor: pointer; font-size: 14px; line-height: 1; }
.layer-chip button:hover { background: rgba(216, 185, 118, .55); }
.drag-ghost { position: fixed; z-index: 99; width: 96px; height: 96px; transform: translate(-50%, -50%) rotate(-4deg); pointer-events: none; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); }
.overlay-card { touch-action: none; }
.hole-card { display: block; width: 100%; height: 100%; }
.overlay-card .hole-card { aspect-ratio: 1; border-radius: 7px; }
.intersection-report { display: flex; margin-top: 12px; padding: 10px 12px; align-items: center; justify-content: space-between; gap: 12px; border: 1px dashed rgba(216, 185, 118, .28); border-radius: 8px; color: var(--muted); font-size: 11px; }
.intersection-report strong { color: var(--gold); font: 700 13px var(--mono); }

.selected-letter-sequence { display: grid; min-height: 68px; margin: 16px 0 10px; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.selected-letter-sequence > span { display: grid; min-height: 56px; place-items: center; border: 1px solid rgba(131, 216, 232, .22); border-radius: 9px; color: var(--muted); background: rgba(0, 0, 0, .15); }
.selected-letter-sequence > span:only-child { grid-column: 1 / -1; padding: 12px; text-align: center; font-size: 11px; }
.selected-letter-sequence small { color: var(--muted); font: 8px var(--mono); }
.selected-letter-sequence strong { color: var(--gold); font: 800 23px var(--mono); }
.sequence-actions { display: flex; margin-bottom: 16px; justify-content: flex-end; gap: 8px; }
.orbit-cell:not(:disabled):hover { border-color: var(--teal); background: rgba(131, 216, 232, .13); }

.fragment-day1 { --fragment: #6ce1cb; --fragment-bg: rgba(108, 225, 203, .09); }
.fragment-day2 { --fragment: #d8b976; --fragment-bg: rgba(216, 185, 118, .09); }
.fragment-day3 { --fragment: #91b9f0; --fragment-bg: rgba(145, 185, 240, .09); }
.final-fragment-inputs label[class*="fragment"] input { border-color: var(--fragment); color: var(--fragment); background: var(--fragment-bg); box-shadow: inset 0 -3px 0 var(--fragment-bg); }
.final-fragment-inputs label[class*="fragment"] > span { color: var(--fragment); }
.combined-cipher > div { display: flex; align-items: center; justify-content: center; gap: 12px; }
.combined-cipher strong { color: var(--fragment); font: 800 18px var(--mono); }
.combined-cipher i { color: var(--muted); font-style: normal; }
.wheel-labels { display: flex; margin: 18px 0 5px; justify-content: center; gap: 10px; }
.wheel-label { padding: 7px 12px; border: 1px solid currentColor; border-radius: 7px; font-size: 11px; font-weight: 800; }
.wheel-label--outer { color: var(--gold); background: rgba(216, 185, 118, .08); }
.wheel-label--inner { color: #6ce1cb; background: rgba(108, 225, 203, .07); }
.cipher-wheel { touch-action: none; cursor: grab; user-select: none; }
.cipher-wheel.is-dragging { cursor: grabbing; }
.cipher-wheel.is-aligned { filter: drop-shadow(0 0 18px rgba(108, 225, 203, .14)); }
.wheel-controls { display: grid; margin: 10px 0 15px; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: center; }
.wheel-controls > div { text-align: center; }
.wheel-controls > div span, .wheel-controls > div strong { display: block; }
.wheel-controls > div span { color: var(--muted); font-size: 9px; }
.wheel-controls > div strong { margin-top: 5px; color: var(--muted); font-size: 11px; }
.wheel-controls > div strong.is-aligned { color: var(--success); }
.decoded-output { display: grid; margin-top: 20px; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.decoded-output__lead { margin: 0 0 2px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.decoded-row { display: flex; min-width: 0; padding: 12px; align-items: center; flex-wrap: wrap; gap: 10px; border: 1px solid var(--fragment); border-radius: 11px; background: var(--fragment-bg); animation: decodedGlow .55s ease-out; }
.decoded-row code { color: var(--fragment); font: 800 16px var(--mono); letter-spacing: .06em; }
.decoded-row > i { color: var(--muted); font-style: normal; }
.decoded-row__input { flex: 1; min-width: 0; border-color: var(--fragment) !important; color: var(--fragment); background: rgba(0, 0, 0, .25); }
.decoded-row__input.is-solved { box-shadow: inset 0 0 0 2px var(--fragment); }
.decoded-row__keyword { margin-left: auto; color: var(--fragment); font-size: 21px; font-weight: 800; animation: decodedGlow .4s ease-out; }
.final-restore-action { margin-top: 20px; padding: 20px; border: 1px solid var(--gold); border-radius: 16px; background: linear-gradient(110deg, rgba(216, 185, 118, .13), rgba(108, 225, 203, .06)); text-align: center; }
.final-restore-action p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.final-restore-action p strong { display: block; margin-bottom: 4px; color: var(--gold); font-size: 16px; }

.restoration-cinema { display: flex; min-height: 70vh; padding: 40px 25px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.restoration-scanner { position: relative; width: min(360px, 90%); height: 240px; margin-bottom: 35px; overflow: hidden; border: 1px solid rgba(216, 185, 118, .35); border-radius: 18px; background: radial-gradient(circle, rgba(108, 225, 203, .08), transparent 65%), rgba(5, 23, 28, .8); }
.restoration-scanner > i { position: absolute; z-index: 3; top: 0; right: 0; left: 0; height: 2px; background: var(--teal); box-shadow: 0 0 18px var(--teal); animation: scan 1.8s ease-in-out infinite; }
.restoration-scanner__files { position: absolute; inset: 0; }
.restoration-scanner__files span { position: absolute; top: 70px; left: calc(50% - 45px); display: grid; width: 90px; height: 105px; place-items: center; border: 1px solid var(--fragment); border-radius: 8px; color: var(--fragment); background: #163038; font-size: 24px; font-weight: 800; animation: gather 2.4s ease-in-out forwards; }
.restoration-scanner__files span:nth-child(1) { transform: translateX(-105px) rotate(-12deg); }
.restoration-scanner__files span:nth-child(2) { transform: translateY(-35px); }
.restoration-scanner__files span:nth-child(3) { transform: translateX(105px) rotate(12deg); }
.restoration-cinema h2 { margin: 10px 0 24px; font-size: 25px; }
.restoration-progress { width: min(460px, 100%); height: 5px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.restoration-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .5s; }
.restoration-steps { display: grid; width: min(460px, 100%); margin-top: 15px; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.restoration-steps span { padding: 8px 4px; color: var(--muted); font-size: 10px; }
.restoration-steps span.is-complete { color: var(--success); }

.victory-archive { border-color: rgba(216, 185, 118, .65); }
.detective-badge { position: relative; width: 210px; margin: 0 auto 28px; padding-top: 5px; }
.detective-badge__medal { position: relative; z-index: 2; display: grid; width: 135px; height: 135px; margin: 0 auto; place-items: center; border: 5px solid #f0d491; border-radius: 50%; color: #fff1bd; background: radial-gradient(circle at 35% 25%, #c69b50, #72502c); box-shadow: 0 0 0 8px rgba(216, 185, 118, .12), 0 12px 35px rgba(0, 0, 0, .3); }
.detective-badge__medal > span { position: absolute; top: 15px; font: 800 13px var(--mono); letter-spacing: .15em; }
.detective-badge__medal .icon { width: 49px; height: 49px; }
.detective-badge__medal small { position: absolute; bottom: 15px; font-size: 10px; }
.detective-badge__title { position: relative; z-index: 3; margin: -5px auto 0; padding: 9px 15px; border: 2px solid #f0d491; border-radius: 7px; color: #5b3b20; background: linear-gradient(135deg, #f2d98e, #c99c4f); font-size: 24px; font-weight: 900; letter-spacing: .08em; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.detective-badge__ribbon { position: absolute; z-index: 1; top: 100px; width: 50px; height: 80px; background: #326e70; }
.detective-badge__ribbon--left { left: 38px; transform: rotate(18deg); }
.detective-badge__ribbon--right { right: 38px; transform: rotate(-18deg); }
.victory-stats { display: grid; margin: 24px 0; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.victory-stats > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .12); }
.victory-stats strong, .victory-stats span { display: block; }
.victory-stats strong { color: var(--gold); font: 800 23px var(--mono); }
.victory-stats span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.restored-volumes article[class*="fragment"] { border-color: var(--fragment); background: var(--fragment-bg); }
.restored-volumes article[class*="fragment"] h3, .restored-volumes article[class*="fragment"] code { color: var(--fragment); }
.victory-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.victory-confetti i { position: absolute; top: -20px; width: 7px; height: 13px; background: var(--gold); animation: confetti 3s ease-in 2; }
.victory-confetti i:nth-child(4n+1) { left: 12%; background: var(--teal); animation-delay: .1s; }
.victory-confetti i:nth-child(4n+2) { left: 35%; background: var(--gold); animation-delay: .4s; }
.victory-confetti i:nth-child(4n+3) { left: 68%; background: #91b9f0; animation-delay: .7s; }
.victory-confetti i:nth-child(4n+4) { left: 88%; background: var(--copper); animation-delay: 1s; }
.victory-confetti i:nth-child(3n) { animation-delay: 1.3s; }

@keyframes scan { 0%, 100% { top: 5%; opacity: .5; } 50% { top: 95%; opacity: 1; } }
@keyframes gather { 0%, 45% { opacity: 1; } 100% { transform: translate(0) rotate(0) scale(.72); opacity: .75; } }
@keyframes decodedGlow { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes confetti { from { transform: translateY(-15px) rotate(0); opacity: 1; } to { transform: translateY(1050px) rotate(560deg); opacity: 0; } }

@media (max-width: 720px) {
  .static-call-signs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .static-call-signs > span { min-width: 0; }
  .static-call-signs > i { display: none; }
  .manuscript-panel { margin-top: 12px; padding: 12px; }
  .manuscript-board { width: min(238px, 100%); margin-top: 8px; }
  .manuscript-grid strong { font-size: clamp(22px, 7vw, 32px); }
  .manuscript-grid small { top: 4px; left: 5px; }
  .intersection-report { margin-top: 6px; padding: 6px 10px; }
  .layer-chips { margin-top: 6px; }
  .archive-workbench { margin-top: 12px; padding: 12px; }
  .archive-workbench .panel-hint { margin: 4px 0 8px; font-size: 11px; line-height: 1.5; }
  .archive-workbench .panel-heading { margin-bottom: 2px; }
  .workbench-actions { margin-top: 8px; }
  .archive-unlock { margin-top: 12px; }
  .game-page--archive .mission-heading { padding: 10px 18px 4px; }
  .game-page--archive .mission-heading h1 { margin-bottom: 4px; font-size: 26px; }
  .game-page--archive .mission-heading p:not(.eyebrow) { font-size: 12px; line-height: 1.5; }
  .game-page--archive .story-transmission { padding: 8px 12px; }
  .game-page--archive .story-transmission p { font-size: 12px; line-height: 1.5; }
  .game-page--archive .panel-heading { margin-bottom: 4px; }
  .game-page--archive .intersection-report { padding: 5px 8px; font-size: 10px; }
  .game-page--archive .layer-chips { min-height: 24px; }
  .game-page--archive .archive-workbench .panel-hint { font-size: 10px; margin: 2px 0 6px; }
  .game-page--archive .overlay-card-pool { grid-template-columns: repeat(9, 1fr); gap: 5px; }
}

@media (max-width: 480px) {
  .hero-console__actions { display: flex; align-items: center; flex-direction: row; gap: 9px; }
  .hero-console__actions .primary-button, .hero-console__actions .reset-button { min-height: 49px; padding: 11px 12px; flex: 1; font-size: 12px; }
  .home-topbar__status { font-size: 9px; }
  .static-call-signs strong { font-size: 17px; }
  .manuscript-board { border-width: 5px; }
  .intersection-report { align-items: flex-start; flex-direction: column; gap: 4px; }
  .selected-letter-sequence { gap: 5px; }
  .selected-letter-sequence strong { font-size: 20px; }
  .combined-cipher > div { gap: 7px; }
  .combined-cipher strong { font-size: 15px; }
  .wheel-controls { gap: 6px; }
  .wheel-controls button { padding: 9px 6px; font-size: 11px; }
  .wheel-label { font-size: 10px; }
  .detective-badge__title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
