/* ════════════════════════════════════════════════════════════
   GENPATSU.QUEST — control-room brutalism × educational calm
   Palette  : #0b120f (graphite)  #f6f3e8 (paper)  #7df9a3 (fission green)
              #e9c36a (amber caution)  #d94b4b (scram red)  #2a3a33 (ring)
   Type     : Space Grotesk (body)  JetBrains Mono (readouts)  Noto Serif JP (accents)
   ════════════════════════════════════════════════════════════ */

:root {
    --c-bg:        #0b120f;
    --c-bg-2:      #0d1a14;
    --c-bg-3:      #12241b;
    --c-paper:     #f6f3e8;
    --c-paper-2:   #cbe4c9;
    --c-green:     #7df9a3;
    --c-green-dim: #4ecb75;
    --c-amber:     #e9c36a;
    --c-red:       #d94b4b;
    --c-ring:      #2a3a33;
    --c-ring-2:    #1a2a23;

    --f-sans: 'Space Grotesk', system-ui, sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, monospace;
    --f-jp:   'Noto Serif JP', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--c-bg);
    color: var(--c-paper);
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(125,249,163,0.020) 0 2px, transparent 2px 4px),
        radial-gradient(ellipse at 20% 10%, rgba(125,249,163,0.06), transparent 45%),
        radial-gradient(ellipse at 80% 90%, rgba(233,195,106,0.05), transparent 50%);
    z-index: 1;
    mix-blend-mode: screen;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

em { font-style: italic; color: var(--c-amber); }
u  { text-decoration: underline; text-decoration-color: var(--c-green); text-underline-offset: 3px; }

/* ═══════════════════════════════════════════════════
   BOOT OVERLAY
   ═══════════════════════════════════════════════════ */
.boot-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: radial-gradient(ellipse at center, var(--c-bg-2) 0%, var(--c-bg) 70%);
    display: flex; align-items: center; justify-content: center;
    padding: 4vh 4vw;
    transition: opacity 0.7s ease, visibility 0.7s;
}
.boot-overlay.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-frame {
    width: min(800px, 100%);
    border: 1px solid var(--c-ring);
    background: rgba(11,18,15,0.85);
    padding: 36px 42px 30px;
    position: relative;
}
.boot-frame::before, .boot-frame::after {
    content: ""; position: absolute;
    width: 22px; height: 22px;
    border: 1px solid var(--c-green);
}
.boot-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.boot-frame::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.boot-header {
    display: flex; justify-content: space-between;
    font-family: var(--f-mono); font-size: 10px;
    color: var(--c-green-dim); letter-spacing: 2px;
    margin-bottom: 28px;
}
.boot-stamp {
    border: 1px solid var(--c-ring);
    padding: 3px 8px;
}

.boot-title { margin-bottom: 24px; }
.boot-jp {
    font-family: var(--f-jp);
    font-size: clamp(26px, 4vw, 40px);
    color: var(--c-paper);
    letter-spacing: 0.15em;
}
.boot-en {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-green);
    letter-spacing: 0.4em;
    margin-top: 4px;
}

.boot-log {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-paper-2);
    min-height: 140px;
    max-height: 140px;
    overflow: hidden;
    padding: 12px 14px;
    background: rgba(0,0,0,0.35);
    border-left: 2px solid var(--c-green);
    white-space: pre-wrap;
    line-height: 1.7;
    margin-bottom: 20px;
}
.boot-log .logline { display: block; }
.boot-log .logline .ok   { color: var(--c-green); }
.boot-log .logline .warn { color: var(--c-amber); }

.boot-footer { display: flex; flex-direction: column; gap: 10px; }
.boot-bar {
    height: 4px; background: var(--c-ring); position: relative;
}
.boot-fill {
    position: absolute; inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg, var(--c-green-dim), var(--c-green));
    transition: width 0.18s linear;
}
.boot-prompt {
    font-family: var(--f-mono); font-size: 11px;
    color: var(--c-green); letter-spacing: 1.5px;
}

.boot-enter {
    margin-top: 22px;
    display: none;
    align-self: flex-start;
    font-family: var(--f-mono); font-size: 12px; letter-spacing: 3px;
    padding: 14px 26px;
    border: 1px solid var(--c-green);
    color: var(--c-green);
    background: rgba(125,249,163,0.05);
    transition: background 0.25s, color 0.25s, letter-spacing 0.25s;
}
.boot-enter.ready { display: inline-block; animation: pulse 1.6s infinite; }
.boot-enter:hover { background: var(--c-green); color: var(--c-bg); letter-spacing: 5px; }

@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(125,249,163,0.5); }
    50%     { box-shadow: 0 0 0 12px rgba(125,249,163,0.0); }
}

/* ═══════════════════════════════════════════════════
   STATUS BAR
   ═══════════════════════════════════════════════════ */
.statusbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 46px;
    background: rgba(11,18,15,0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--c-ring);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--c-paper-2);
    transform: translateY(-100%);
    transition: transform 0.5s ease 0.2s;
}
.statusbar.shown { transform: translateY(0); }
.sb-left { display: flex; align-items: center; gap: 14px; }
.sb-center { display: flex; gap: 14px; justify-self: center; }
.sb-right { justify-self: end; }

.sb-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--c-green); box-shadow: 0 0 10px var(--c-green);
    animation: blink 2s infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }

.sb-brand { color: var(--c-paper); font-weight: 700; letter-spacing: 3px; }
.sb-sep { color: var(--c-green); }
.sb-divider { width: 1px; height: 16px; background: var(--c-ring); }
.sb-small { color: var(--c-paper-2); opacity: 0.7; }
.sb-readout { color: var(--c-green-dim); }

.sb-chip {
    padding: 4px 12px;
    border: 1px solid currentColor;
    letter-spacing: 2px;
    font-size: 10px;
}
.sb-chip--ok   { color: var(--c-green); }
.sb-chip--warn { color: var(--c-amber); }
.sb-chip--crit { color: var(--c-red); background: rgba(217,75,75,0.1); animation: blink 0.8s infinite; }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 90px 48px 60px;
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "left  core right"
        "cap   cap  cap";
    gap: 40px;
    z-index: 2;
}
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--c-ring-2) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-ring-2) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse at 50% 35%, black 30%, transparent 70%);
    z-index: -1;
}

.hero-sidebar {
    display: flex; flex-direction: column; gap: 22px;
    padding-top: 20px;
}
.hero-sidebar--left  { grid-area: left; }
.hero-sidebar--right { grid-area: right; }

.reading { display: flex; flex-direction: column; gap: 4px; }
.reading--right { text-align: right; }

.reading-label {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--c-paper-2);
    opacity: 0.75;
}
.reading-value {
    font-family: var(--f-mono);
    font-size: 26px;
    color: var(--c-green);
    letter-spacing: 1px;
    line-height: 1;
}
.reading-unit {
    font-size: 11px;
    color: var(--c-paper-2);
    margin-left: 4px;
}
.reading-bar {
    height: 2px; background: var(--c-ring);
    margin-top: 6px; position: relative;
}
.reading-fill {
    position: absolute; inset: 0 auto 0 0;
    width: 60%;
    background: var(--c-green);
    transition: width 0.6s cubic-bezier(.2,.8,.2,1);
}

/* Core */
.hero-core {
    grid-area: core;
    position: relative;
    aspect-ratio: 1/1;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
    display: flex; align-items: center; justify-content: center;
}
.core-ring {
    position: absolute; inset: 0;
    border: 1px dashed var(--c-ring);
    border-radius: 50%;
    animation: spinR 40s linear infinite;
}
.core-ring--outer { inset: 0;     border-style: dashed; }
.core-ring--mid   { inset: 8%;    border-style: dotted; animation-duration: 28s; animation-direction: reverse; }
.core-ring--inner { inset: 18%;   border-color: var(--c-green-dim); opacity: 0.4; animation-duration: 18s; }

@keyframes spinR { to { transform: rotate(360deg); } }

.core-haze {
    position: absolute; inset: 22%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125,249,163,0.25), transparent 70%);
    filter: blur(12px);
    animation: haze 4s ease-in-out infinite alternate;
}
@keyframes haze { to { transform: scale(1.12); opacity: 0.7; } }

.core-center {
    position: relative; z-index: 2;
    width: 64%; aspect-ratio: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.core-vessel { width: 100%; height: auto; }
#rodGroup rect { transform-origin: center top; transition: transform 0.8s cubic-bezier(.2,.9,.2,1); }

.core-label {
    margin-top: -6px; text-align: center;
}
.core-label-jp {
    display: block;
    font-family: var(--f-jp);
    font-size: 18px;
    letter-spacing: 0.3em;
    color: var(--c-paper);
}
.core-label-en {
    display: block;
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--c-green-dim);
    margin-top: 4px;
}

/* Caption */
.hero-caption { grid-area: cap; max-width: 820px; }
.hero-caption-top {
    display: flex; gap: 14px; align-items: center;
    font-family: var(--f-mono); font-size: 10px;
    color: var(--c-paper-2); letter-spacing: 2.5px;
    margin-bottom: 22px;
}
.caption-stamp {
    border: 1px solid var(--c-ring);
    padding: 3px 8px;
    color: var(--c-green);
}
.caption-text { flex: 1; opacity: 0.8; }

.hero-title {
    font-family: var(--f-sans);
    font-weight: 300;
    font-size: clamp(34px, 5.5vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--c-paper);
    margin-bottom: 28px;
}
.hero-title-line { display: block; }
.hero-title-jp {
    font-family: var(--f-jp);
    font-weight: 700;
    color: var(--c-green);
    margin-right: 0.2em;
}

.hero-lede {
    max-width: 640px;
    font-size: 17px;
    color: var(--c-paper-2);
    line-height: 1.65;
    margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.cta {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 3px;
    padding: 16px 28px;
    border: 1px solid;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.cta--primary { background: var(--c-green); border-color: var(--c-green); color: var(--c-bg); }
.cta--primary:hover { background: var(--c-paper); border-color: var(--c-paper); letter-spacing: 5px; }
.cta--ghost { border-color: var(--c-ring); color: var(--c-paper-2); }
.cta--ghost:hover { border-color: var(--c-green); color: var(--c-green); }

/* ═══════════════════════════════════════════════════
   SECTION HEAD (shared)
   ═══════════════════════════════════════════════════ */
.section-head {
    max-width: 760px;
    margin: 0 auto 50px;
    text-align: center;
    padding: 0 24px;
}
.section-num {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--c-green);
    padding: 4px 10px;
    border: 1px solid var(--c-ring);
    margin-bottom: 20px;
}
.section-title {
    font-family: var(--f-sans);
    font-weight: 300;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.015em;
    color: var(--c-paper);
    margin-bottom: 12px;
}
.section-sub {
    font-size: 15px;
    color: var(--c-paper-2);
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════
   LAYERS
   ═══════════════════════════════════════════════════ */
.layers {
    padding: 120px 48px;
    position: relative; z-index: 2;
    border-top: 1px solid var(--c-ring);
    background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 100%);
}

.layers-stage {
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: 1;
    position: relative;
}

.layer {
    position: absolute; inset: 0;
    border: 1px solid var(--c-ring);
    border-radius: 50%;
    display: flex; align-items: center;
    padding: 0 32px;
    justify-content: flex-start;
    transition: all 0.5s cubic-bezier(.3,.9,.3,1);
    background: radial-gradient(circle, rgba(125,249,163,0.04), transparent 70%);
}
.layer-5 { inset: 0%;  }
.layer-4 { inset: 8%;  background: radial-gradient(circle, rgba(125,249,163,0.06), transparent 70%); }
.layer-3 { inset: 16%; background: radial-gradient(circle, rgba(125,249,163,0.09), transparent 70%); }
.layer-2 { inset: 24%; background: radial-gradient(circle, rgba(125,249,163,0.12), transparent 70%); }
.layer-1 { inset: 32%; background: radial-gradient(circle, rgba(125,249,163,0.16), transparent 70%); }
.layer-core {
    inset: 40%;
    background: radial-gradient(circle, rgba(217,75,75,0.5), rgba(233,195,106,0.2));
    border-color: var(--c-amber);
    animation: coreHum 3s ease-in-out infinite alternate;
}
@keyframes coreHum { to { box-shadow: 0 0 30px rgba(217,75,75,0.35); } }

.layer .layer-tag {
    font-family: var(--f-mono); font-size: 10px;
    padding: 3px 8px; border: 1px solid var(--c-green);
    color: var(--c-green); margin-right: 14px;
    letter-spacing: 2px;
    background: rgba(11,18,15,0.8);
}
.layer .layer-name {
    font-family: var(--f-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--c-paper);
    background: rgba(11,18,15,0.8);
    padding: 4px 8px;
}
.layer .layer-note {
    margin-left: 14px;
    font-size: 11px;
    color: var(--c-paper-2); opacity: 0.75;
    background: rgba(11,18,15,0.8);
    padding: 4px 8px;
}

.layer-core .layer-tag { border-color: var(--c-amber); color: var(--c-amber); }

.layer.faded { opacity: 0.15; transform: scale(1.03); }
.layer.active { border-color: var(--c-green); box-shadow: 0 0 30px rgba(125,249,163,0.15); z-index: 4; }

.layers-readout {
    max-width: 480px;
    margin: 40px auto 0;
    text-align: center;
    font-family: var(--f-mono);
    display: flex; flex-direction: column; gap: 6px;
}
.lr-label { font-size: 10px; letter-spacing: 4px; color: var(--c-paper-2); }
.lr-value { font-size: 16px; color: var(--c-green); letter-spacing: 2px; }
.lr-hint { font-size: 10px; color: var(--c-paper-2); opacity: 0.6; letter-spacing: 2px; }

/* ═══════════════════════════════════════════════════
   SCENARIOS
   ═══════════════════════════════════════════════════ */
.scenarios {
    padding: 120px 48px;
    background: var(--c-bg);
    border-top: 1px solid var(--c-ring);
    position: relative; z-index: 2;
}
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto;
}
.scen {
    background: var(--c-bg-2);
    border: 1px solid var(--c-ring);
    padding: 30px 30px 26px;
    display: flex; flex-direction: column; gap: 18px;
    transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
    position: relative;
}
.scen::before {
    content: ""; position: absolute;
    inset: 0; pointer-events: none;
    background: linear-gradient(120deg, transparent 60%, rgba(125,249,163,0.08));
    opacity: 0; transition: opacity 0.4s;
}
.scen:hover { transform: translateY(-4px); border-color: var(--c-green); box-shadow: 0 20px 40px -20px rgba(125,249,163,0.18); }
.scen:hover::before { opacity: 1; }

.scen--alt { background: var(--c-bg-3); }

.scen-head { display: flex; justify-content: space-between; align-items: center; }
.scen-code {
    font-family: var(--f-mono); font-size: 10px;
    letter-spacing: 3px; color: var(--c-green);
    padding: 3px 8px; border: 1px solid var(--c-ring);
}
.scen-stamp {
    font-family: var(--f-mono); font-size: 10px;
    letter-spacing: 3px; padding: 3px 10px;
    border: 1px solid var(--c-amber); color: var(--c-amber);
}
.scen-stamp--red { border-color: var(--c-red); color: var(--c-red); }

.scen-title {
    font-family: var(--f-sans); font-weight: 500;
    font-size: 22px; color: var(--c-paper);
    letter-spacing: -0.01em;
}
.scen-sub {
    font-family: var(--f-jp);
    font-size: 14px; color: var(--c-paper-2); font-style: italic;
}

.scen-timeline {
    position: relative;
    height: 14px;
    border-top: 1px solid var(--c-ring);
    border-bottom: 1px solid var(--c-ring);
    margin: 4px 0;
}
.tl-dot {
    position: absolute;
    left: calc(var(--t) * 100%);
    top: 50%; transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-green);
}
.tl-dot--warn { background: var(--c-amber); }
.tl-dot--crit { background: var(--c-red); box-shadow: 0 0 10px var(--c-red); }

.scen-points {
    list-style: none;
    font-family: var(--f-mono); font-size: 12px;
    color: var(--c-paper-2); line-height: 1.85;
}
.scen-points li { padding-left: 14px; position: relative; }
.scen-points li::before {
    content: "›"; position: absolute; left: 0; color: var(--c-green);
}
.scen-points b { color: var(--c-green); font-weight: 500; }

.scen-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--c-ring);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--c-paper);
}

/* ═══════════════════════════════════════════════════
   CONTROL PANEL
   ═══════════════════════════════════════════════════ */
.panel {
    padding: 120px 48px;
    background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 100%);
    border-top: 1px solid var(--c-ring);
    position: relative; z-index: 2;
}

.panel-shell {
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid var(--c-ring);
    background: rgba(11,18,15,0.6);
    padding: 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
        "screens screens"
        "controls dial";
    gap: 40px;
    position: relative;
}
.panel-shell::before, .panel-shell::after {
    content: ""; position: absolute;
    width: 14px; height: 14px; border: 2px solid var(--c-green);
}
.panel-shell::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.panel-shell::after  { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.panel-screens {
    grid-area: screens;
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr;
    gap: 14px;
}
.screen {
    padding: 16px 20px;
    background: #000;
    border: 1px solid var(--c-ring);
    display: flex; flex-direction: column; gap: 6px;
    position: relative; overflow: hidden;
}
.screen::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, rgba(125,249,163,0.04) 0 1px, transparent 1px 3px);
    pointer-events: none;
}
.screen-label {
    font-family: var(--f-mono); font-size: 10px;
    letter-spacing: 3px; color: var(--c-paper-2); opacity: 0.6;
}
.screen-value {
    font-family: var(--f-mono);
    font-size: 28px; color: var(--c-green);
    letter-spacing: 1px; line-height: 1;
    text-shadow: 0 0 8px rgba(125,249,163,0.35);
}
.screen--wide .screen-value { color: var(--c-green); }
.screen-value.warn { color: var(--c-amber); text-shadow: 0 0 8px rgba(233,195,106,0.4); }
.screen-value.crit { color: var(--c-red);   text-shadow: 0 0 12px rgba(217,75,75,0.6); animation: blink 0.6s infinite; }

.panel-controls {
    grid-area: controls;
    display: flex; flex-direction: column; gap: 24px;
}
.knob { display: flex; flex-direction: column; gap: 10px; }
.knob-label {
    font-family: var(--f-mono); font-size: 11px;
    letter-spacing: 2.5px;
    color: var(--c-paper);
    display: flex; justify-content: space-between;
}
.knob-note { color: var(--c-paper-2); opacity: 0.6; font-weight: 300; }

.slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px;
    background: var(--c-ring);
    outline: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px;
    background: var(--c-green);
    cursor: grab;
    border: 3px solid var(--c-bg);
    box-shadow: 0 0 10px rgba(125,249,163,0.5);
    transition: transform 0.15s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider::-moz-range-thumb {
    width: 22px; height: 22px;
    background: var(--c-green);
    border: 3px solid var(--c-bg);
    cursor: grab;
}

.knob-ticks {
    display: flex; justify-content: space-between;
    font-family: var(--f-mono); font-size: 9px;
    color: var(--c-paper-2); opacity: 0.4;
    letter-spacing: 1px;
}

.panel-dial {
    grid-area: dial;
    display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.dial { width: 100%; max-width: 280px; }
#dialNeedle { transition: transform 0.35s cubic-bezier(.3,.9,.3,1); }

.scram {
    width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff8080, var(--c-red) 60%, #8a2222);
    border: 4px solid var(--c-bg);
    box-shadow:
        0 0 0 2px var(--c-red),
        0 10px 30px rgba(217,75,75,0.35),
        inset 0 6px 12px rgba(255,255,255,0.25),
        inset 0 -8px 14px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    transition: transform 0.1s, box-shadow 0.2s;
    cursor: pointer;
}
.scram:hover { transform: translateY(-2px); }
.scram:active, .scram.fired {
    transform: translateY(4px) scale(0.96);
    box-shadow:
        0 0 0 2px var(--c-red),
        inset 0 -2px 6px rgba(0,0,0,0.5),
        inset 0 6px 14px rgba(0,0,0,0.3);
}
.scram-inner {
    font-family: var(--f-mono); font-weight: 700;
    font-size: 22px; color: #fff; letter-spacing: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.scram-hint {
    font-family: var(--f-mono); font-size: 9px;
    color: rgba(255,255,255,0.85); letter-spacing: 2px;
}

.panel-foot {
    max-width: 900px;
    margin: 40px auto 0;
    text-align: center;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-paper-2);
    letter-spacing: 1px;
    min-height: 22px;
}
.panel-foot b { color: var(--c-green); font-weight: 500; }

/* ═══════════════════════════════════════════════════
   DECAY
   ═══════════════════════════════════════════════════ */
.decay {
    padding: 120px 48px;
    background: var(--c-bg);
    border-top: 1px solid var(--c-ring);
    position: relative; z-index: 2;
}

.decay-stage {
    max-width: 1100px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

.decay-pickers {
    display: flex; gap: 10px; flex-wrap: wrap;
    justify-content: center;
}
.iso {
    font-family: var(--f-mono); font-size: 11px;
    letter-spacing: 2.5px;
    padding: 10px 18px;
    border: 1px solid var(--c-ring);
    color: var(--c-paper-2);
    transition: all 0.3s;
}
.iso:hover { border-color: var(--c-green); color: var(--c-green); }
.iso.active { background: var(--c-green); color: var(--c-bg); border-color: var(--c-green); }

.decay-chart {
    position: relative;
    padding: 24px 40px 40px 60px;
    background: var(--c-bg-2);
    border: 1px solid var(--c-ring);
    height: 280px;
}
.curve {
    position: absolute; inset: 24px 40px 40px 60px;
    width: calc(100% - 100px);
    height: calc(100% - 64px);
}

.decay-axis {
    position: absolute;
    display: flex; font-family: var(--f-mono);
    font-size: 10px; color: var(--c-paper-2); opacity: 0.6;
}
.decay-axis--x {
    left: 60px; right: 40px;
    bottom: 12px;
    justify-content: space-between;
}
.decay-axis--y {
    top: 20px; bottom: 36px;
    left: 14px;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    width: 38px;
}

.decay-readout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--c-ring);
    background: var(--c-bg-2);
}
.dr-row {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 12px;
    border-left: 2px solid var(--c-ring);
}
.dr-row--emph { border-left-color: var(--c-amber); }
.dr-key {
    font-family: var(--f-mono); font-size: 10px;
    letter-spacing: 2px; color: var(--c-paper-2); opacity: 0.7;
}
.dr-val {
    font-family: var(--f-mono); font-size: 16px;
    color: var(--c-green); letter-spacing: 1px;
}
.dr-row--emph .dr-val { color: var(--c-amber); }

/* ═══════════════════════════════════════════════════
   GLOSSARY
   ═══════════════════════════════════════════════════ */
.glossary {
    padding: 120px 48px;
    background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 100%);
    border-top: 1px solid var(--c-ring);
    position: relative; z-index: 2;
}

.gloss-grid {
    max-width: 1100px; margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.gl {
    background: var(--c-bg-2);
    border: 1px solid var(--c-ring);
    padding: 4px 0;
    transition: border-color 0.3s;
}
.gl[open] { border-color: var(--c-green); }
.gl summary {
    list-style: none;
    padding: 18px 24px;
    cursor: pointer;
    display: flex; align-items: center; gap: 16px;
    font-family: var(--f-mono);
    transition: background 0.2s;
}
.gl summary::-webkit-details-marker { display: none; }
.gl summary::after {
    content: "+";
    margin-left: auto;
    font-size: 18px; color: var(--c-green);
    transition: transform 0.3s;
}
.gl[open] summary::after { transform: rotate(45deg); }
.gl summary:hover { background: rgba(125,249,163,0.04); }

.gl-jp {
    font-family: var(--f-jp); font-weight: 700;
    font-size: 18px; color: var(--c-paper);
    letter-spacing: 0.1em;
}
.gl-term {
    font-size: 11px; letter-spacing: 3px;
    color: var(--c-green); font-weight: 500;
}

.gl p {
    padding: 0 24px 22px 24px;
    font-family: var(--f-sans);
    font-size: 14px; color: var(--c-paper-2);
    line-height: 1.7;
}
.gl p em { color: var(--c-amber); font-style: italic; }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.footer {
    background: #060a08;
    border-top: 1px solid var(--c-ring);
    padding: 80px 48px 0;
    position: relative; z-index: 2;
}
.footer-grid {
    max-width: 1200px; margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
}
.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-brand {
    font-family: var(--f-sans);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 3px;
    color: var(--c-paper);
}
.footer-mission {
    font-size: 13px;
    color: var(--c-paper-2);
    opacity: 0.75;
    line-height: 1.7;
    max-width: 420px;
}
.footer-head {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--c-green);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-ring);
}
.footer-list {
    list-style: none;
    font-family: var(--f-mono); font-size: 12px;
    color: var(--c-paper-2); opacity: 0.8;
    line-height: 2;
}

.footer-strip {
    max-width: 1200px; margin: 0 auto;
    padding: 20px 0 26px;
    border-top: 1px solid var(--c-ring);
    display: flex; justify-content: space-between;
    font-family: var(--f-mono); font-size: 10px;
    letter-spacing: 2.5px; color: var(--c-paper-2); opacity: 0.6;
}
.footer-hash { color: var(--c-green); opacity: 0.8; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .hero {
        padding: 80px 22px 40px;
        grid-template-columns: 1fr;
        grid-template-areas: "core" "left" "right" "cap";
        gap: 24px;
    }
    .hero-sidebar { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
    .hero-sidebar .reading { flex: 1 1 42%; }
    .hero-sidebar--right .reading { text-align: left; }
    .statusbar {
        grid-template-columns: 1fr auto;
        font-size: 10px; padding: 0 14px;
    }
    .sb-center { display: none; }

    .panel-shell {
        grid-template-columns: 1fr;
        grid-template-areas: "screens" "dial" "controls";
        padding: 24px;
    }
    .panel-screens { grid-template-columns: 1fr 1fr; }
    .screen--wide { grid-column: 1 / -1; }

    .layers, .scenarios, .panel, .decay, .glossary { padding: 80px 22px; }
    .footer { padding: 60px 22px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
    .footer-strip { flex-direction: column; gap: 6px; text-align: center; justify-content: center; }

    .layer { padding: 0 12px; }
    .layer .layer-note { display: none; }
    .layer-5 { inset: 0; }
    .layer-4 { inset: 10%; }
    .layer-3 { inset: 20%; }
    .layer-2 { inset: 30%; }
    .layer-1 { inset: 40%; }
    .layer-core { inset: 50%; }
}

@media (max-width: 520px) {
    .hero-title { font-size: 30px; }
    .section-title { font-size: 26px; }
    .panel-screens { grid-template-columns: 1fr; }
    .screen--wide { grid-column: auto; }
    .layer { padding: 0 8px; }
    .layer .layer-name { font-size: 10px; letter-spacing: 1px; }
}
