/* ═══════════════════════════════════════════════════════════════════════
   NH3 — MARS PROTOCOL · STYLES
   Identité : terminal YoRHa — même langage visuel que le thème NieR
   des pages du site (index.html, guide.html, shell.html, holygraph.html
   → nier-theme.css) : ténèbres chaudes #161513, rouge YoRHa #C4362B,
   kintsugi #C9A227, parchemin #F4EFE6, filets chauds #4A463F,
   angles vifs, ombres portées dures, prompt █ rouge.
   Typo : IBM Plex Mono / JetBrains Mono (code) + Cinzel (titres),
   toutes deux chargées par la page hôte.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --nh3-gold: #D8C08A;
    --nh3-gold-dim: rgba(216, 192, 138, 0.25);
    --nh3-ivory: #EFE9DC;
    --nh3-oxide: #C4362B;
    --nh3-cyan: #59E0D8;
    --nh3-bg: #05070a;
    --nh3-panel: rgba(22, 21, 19, 0.94);
    --nh3-line: #4A463F;
    --nh3-text: #C2BBB0;
    --nh3-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;

    /* ═══ GR-33 — TOKENS YORHA (miroir de nier-theme.css) ═══
       Parchemin pour la connaissance, ténèbres pour la machine,
       rouge pour l'alerte, or pour ce qui compte. */
    --nh3-red: #C4362B;
    --nh3-red-bright: #E0473B;
    --nh3-red-dark: #8B2519;
    --nh3-red-glow: rgba(196, 54, 43, 0.25);
    --nh3-red-tint: rgba(196, 54, 43, 0.08);
    --nh3-black: #161513;
    --nh3-black-soft: #22201D;
    --nh3-black-surface: #2C2A26;
    --nh3-black-line: #383530;
    --nh3-warm-line: #4A463F;
    --nh3-paper: #F4EFE6;
    --nh3-paper-dim: #E2DDD5;
    --nh3-dim: #9E988E;
    --nh3-kintsugi: #C9A227;
    --nh3-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
    --nh3-hard-shadow: 4px 4px 0 rgba(13, 12, 11, 0.45);
}

/* ── stage ── */
#nh3-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #05070a;
    border: 1px solid var(--nh3-line);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), inset 0 0 80px rgba(0, 0, 0, 0.4);
}
#nh3-stage canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    cursor: crosshair;
}

#nh3-root {
    position: absolute;
    inset: 0;
    font-family: var(--nh3-mono);
    z-index: 5;
    pointer-events: none;
}
#nh3-root * { box-sizing: border-box; }
.hidden { display: none !important; }

/* ═══════════ BLINDAGE CURSEUR (GR-31) ═══════════
   La page hôte masque le curseur OS (cursor:none) hors thèmes nier/ame
   et le remplace par un réticule cockpit… qui était du code mort (voir
   GR-31 index.html). Si le jeu tourne hors thème nier (rechargement
   sans ?theme=, thème perdu en session), les fenêtres de saisie —
   terminal de palier, atelier, éditeur de figures — et leurs boutons
   de validation devenaient impossibles à viser à la souris. On impose
   un curseur visible sur tout élément interactif NH3, quel que soit
   le thème de la page hôte. */
#nh3-screen,
#nh3-root [id*="holo"],
#nh3-root [id*="dossier"] { cursor: auto !important; }
#nh3-root button:not(:disabled),
#nh3-root a,
#nh3-root select,
#nh3-root label,
#nh3-root summary { cursor: pointer !important; }
#nh3-root button:disabled,
#nh3-root .nh3-sector-row.locked { cursor: default !important; }
#nh3-root textarea,
#nh3-root input[type="text"],
#nh3-root input[type="number"],
#nh3-root input[type="search"] { cursor: text !important; }
#nh3-root input[type="checkbox"],
#nh3-root input[type="radio"],
#nh3-root input[type="file"] { cursor: pointer !important; }
/* caret toujours visible dans les zones de saisie, même sur fond sombre
   (en thème nier, nier-theme.css impose caret rouge YoRHa — visible aussi) */
#nh3-root textarea,
#nh3-root input[type="text"],
#nh3-root input[type="number"] { caret-color: var(--nh3-cyan); }

/* ═══════════ HUD ═══════════ */
#nh3-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: var(--nh3-text);
    font-size: 12px;
    letter-spacing: 0.06em;
}

.nh3-hud-tl { position: absolute; top: 14px; left: 16px; display: flex; flex-direction: column; gap: 7px; }
.nh3-bar { display: flex; align-items: center; gap: 8px; }
.nh3-bar-label { width: 42px; font-size: 10px; color: var(--nh3-gold); letter-spacing: 0.18em; }
.nh3-bar-track {
    width: 170px; height: 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(216, 192, 138, 0.25);
    position: relative;
}
.nh3-bar-fill {
    height: 100%;
    background: var(--nh3-gold);
    transition: width 0.15s ease-out;
}
.nh3-hp .nh3-bar-fill { background: var(--nh3-ivory); }
.nh3-hp .nh3-bar-fill.low { background: var(--nh3-oxide); }
.nh3-integrity .nh3-bar-fill { background: var(--nh3-cyan); }
.nh3-integrity .nh3-bar-fill.low { background: var(--nh3-oxide); }
.nh3-energy .nh3-bar-fill { background: #8866dd; }
.nh3-energy .nh3-bar-fill.full { background: var(--nh3-gold); box-shadow: 0 0 10px var(--nh3-gold); }
.nh3-bar-value { min-width: 44px; font-size: 11px; color: var(--nh3-ivory); }

.nh3-chiprow { display: flex; gap: 5px; margin-top: 2px; }
.nh3-chipdot {
    width: 9px; height: 9px;
    background: var(--c, var(--nh3-gold));
    box-shadow: 0 0 6px var(--c, var(--nh3-gold));
    transform: rotate(45deg);
}

.nh3-hud-tc { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); text-align: center; }
.nh3-objective { color: var(--nh3-gold); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; }
.nh3-timer { font-size: 20px; color: var(--nh3-ivory); letter-spacing: 0.14em; margin-top: 2px; }
.nh3-enemies { font-size: 10px; color: var(--nh3-oxide); letter-spacing: 0.2em; margin-top: 3px; min-height: 12px; }
.nh3-enemies.none { color: var(--nh3-gold); }

.nh3-hud-tr { position: absolute; top: 14px; right: 18px; text-align: right; }
.nh3-score-label { font-size: 9px; letter-spacing: 0.3em; color: var(--nh3-gold); }
.nh3-score { font-size: 22px; color: var(--nh3-ivory); }
.nh3-combo { margin-top: 6px; opacity: 0; transition: opacity 0.2s; }
.nh3-combo.on { opacity: 1; }
#nh3-combo-x { font-size: 17px; color: var(--nh3-gold); text-shadow: 0 0 12px var(--nh3-gold); }
.nh3-combo-track { width: 70px; height: 2px; background: rgba(255, 255, 255, 0.1); margin: 3px 0 0 auto; }
#nh3-combo-fill { height: 100%; background: var(--nh3-oxide); }

.nh3-hud-bl { position: absolute; bottom: 16px; left: 16px; }
.nh3-weapons { display: flex; gap: 6px; }
.nh3-wslot {
    font-family: var(--nh3-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.4);
}
.nh3-wslot.active {
    color: var(--c, var(--nh3-ivory));
    border-color: var(--c, var(--nh3-gold));
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.05), 0 0 10px -2px var(--c, var(--nh3-gold));
}
.nh3-charge-wrap { margin-top: 8px; width: 160px; height: 3px; background: rgba(255, 255, 255, 0.08); opacity: 0; transition: opacity 0.15s; }
.nh3-charge { height: 100%; width: 0; background: var(--nh3-cyan); box-shadow: 0 0 8px var(--nh3-cyan); }

.nh3-hud-br { position: absolute; bottom: 16px; right: 16px; text-align: right; }
.nh3-mars-ticker {
    font-size: 11px;
    color: var(--nh3-gold);
    margin-bottom: 6px;
    letter-spacing: 0.1em;
}
.nh3-mars-ip {
    display: inline-block;
    font-size: 9px;
    color: #05070a;
    background: var(--nh3-gold);
    padding: 1px 5px;
    margin-right: 6px;
    letter-spacing: 0.1em;
}
#nh3-ticker.pulse { animation: nh3-ticker-pulse 0.5s ease-out; }
@keyframes nh3-ticker-pulse {
    0% { color: #fff; text-shadow: 0 0 14px var(--nh3-gold); }
    100% { color: var(--nh3-gold); }
}
#nh3-minimap {
    border: 1px solid var(--nh3-line);
    background: rgba(4, 6, 10, 0.8);
    image-rendering: pixelated;
}

.nh3-interact {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 56%;
    text-align: center;
    font-size: 12px;
    color: var(--nh3-cyan);
    letter-spacing: 0.12em;
    opacity: 0;
    transition: opacity 0.15s;
}
.nh3-interact.on { opacity: 1; animation: nh3-breathe 1.6s infinite; }
@keyframes nh3-breathe { 50% { opacity: 0.55; } }

.nh3-toast {
    position: absolute;
    top: 66px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    font-size: 12px;
    color: var(--nh3-ivory);
    background: rgba(8, 11, 16, 0.88);
    border: 1px solid var(--nh3-line);
    border-left: 3px solid var(--nh3-gold);
    padding: 7px 16px;
    opacity: 0;
    transition: all 0.25s;
    max-width: 70%;
    text-align: center;
}
.nh3-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.nh3-stylepop {
    position: absolute;
    top: 34%;
    left: 50%;
    transform: translateX(-50%) scale(1.6);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--nh3-gold);
    text-shadow: 0 0 22px currentColor;
    opacity: 0;
    pointer-events: none;
}
.nh3-stylepop.go { animation: nh3-stylepop 0.9s ease-out; }
@keyframes nh3-stylepop {
    0% { opacity: 0; transform: translateX(-50%) scale(1.7); }
    12% { opacity: 1; transform: translateX(-50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* barre de boss */
.nh3-bossbar {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    width: 62%;
    text-align: center;
}
.nh3-boss-name { font-size: 11px; color: var(--nh3-oxide); letter-spacing: 0.26em; margin-bottom: 4px; text-transform: uppercase; }
.nh3-boss-track { height: 6px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(196, 54, 43, 0.4); }
.nh3-boss-fill { height: 100%; background: linear-gradient(90deg, var(--nh3-oxide), #e8664b); transition: width 0.2s; }
.nh3-boss-phase { font-size: 9px; color: var(--nh3-gold); letter-spacing: 0.3em; margin-top: 3px; }

/* ═══════════ ÉCRANS ═══════════ */
.nh3-screen {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, 0.12) 2px 4px),
        rgba(4, 6, 10, 0.82);
    backdrop-filter: blur(2px);
    color: var(--nh3-text);
    font-family: var(--nh3-mono);
    overflow: auto;
    animation: nh3-screen-in 0.35s ease-out;
}
@keyframes nh3-screen-in {
    0% { opacity: 0; transform: scale(1.015); filter: hue-rotate(40deg); }
    100% { opacity: 1; transform: scale(1); filter: none; }
}

.nh3-panel {
    width: min(680px, 88%);
    padding: 34px 40px;
    background: var(--nh3-panel);
    border: 1px solid var(--nh3-line);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(216, 192, 138, 0.03);
    position: relative;
}
.nh3-panel::before, .nh3-panel::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    border: 1px solid var(--nh3-gold);
}
.nh3-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.nh3-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* GR-34 — panneaux bornés à l'écran de jeu.
   Le PROTOCOL (table de 14 lignes + 3 colonnes) mesurait 1137 px de haut
   pour une zone de jeu de ~585 px : centré dans .nh3-screen, il débordait
   de ~276 px AU-DESSUS de la zone de jeu et se peignait SOUS le contenu de
   la page hôte (span d'intro, .sr-only) — les premières lignes du tableau
   (ZQSD, MAJ) étaient carrément invisibles. Tout panneau plus haut que
   l'écran est désormais borné et défile en interne. */
.nh3-screen .nh3-panel { max-height: calc(100% - 40px); overflow-y: auto; }

.nh3-panel-kicker { font-size: 10px; letter-spacing: 0.34em; color: var(--nh3-gold); margin-bottom: 8px; }
.nh3-panel-title { font-size: 26px; color: var(--nh3-ivory); letter-spacing: 0.12em; margin: 0 0 6px; font-weight: 500; }
.nh3-panel-sub { font-size: 12px; color: #7d8894; line-height: 1.7; margin-bottom: 18px; }

/* boutons */
.nh3-btn {
    font-family: var(--nh3-mono);
    font-size: 13px;
    letter-spacing: 0.18em;
    padding: 11px 26px;
    background: transparent;
    border: 1px solid rgba(216, 192, 138, 0.4);
    color: var(--nh3-ivory);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.nh3-btn:hover:not(:disabled) {
    background: rgba(216, 192, 138, 0.12);
    border-color: var(--nh3-gold);
    box-shadow: 0 0 18px -4px var(--nh3-gold);
}
.nh3-btn:active:not(:disabled) { transform: scale(0.98); }
.nh3-btn:disabled { opacity: 0.35; cursor: default; }
.nh3-btn.primary { border-color: var(--nh3-gold); background: rgba(216, 192, 138, 0.1); }
.nh3-btn.primary:hover:not(:disabled) { background: var(--nh3-gold); color: #05070a; }

/* ── titre ── */
.nh3-title-wrap { text-align: center; width: min(600px, 90%); }
.nh3-title-kicker { font-size: 11px; letter-spacing: 0.4em; color: var(--nh3-gold); margin-bottom: 14px; }
.nh3-title {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 300;
    color: var(--nh3-ivory);
    letter-spacing: 0.18em;
    line-height: 1;
    margin: 0 0 10px;
    text-shadow: 0 0 34px rgba(216, 192, 138, 0.35);
}
.nh3-title span { color: var(--nh3-gold); }
.nh3-title-sub { font-size: 12px; color: #7d8894; letter-spacing: 0.14em; margin-bottom: 30px; }
.nh3-menu { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: 26px; }
.nh3-menu .nh3-btn { min-width: 300px; }
/* GR-36 (clarif. menu) — boutons du titre en deux lignes :
   libellé + sous-titre descriptif, pour que chaque entrée
   explique son rôle sans ouvrir l'écran. */
.nh3-menu .nh3-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    padding: 10px 26px;
    line-height: 1.4;
}
.nh3-menu .nh3-btn .nh3-btn-main { font-size: 13px; letter-spacing: 0.18em; }
.nh3-menu .nh3-btn .nh3-btn-main > span { margin-right: 6px; }
.nh3-menu .nh3-btn .nh3-btn-sub {
    font-size: 9px;
    letter-spacing: 0.1em;
    color: #5a6570;
    transition: color 0.15s;
}
.nh3-menu .nh3-btn:hover:not(:disabled) .nh3-btn-sub { color: #9aa5b1; }
.nh3-menu .nh3-btn.primary .nh3-btn-sub { color: #8a7a54; }
.nh3-menu .nh3-btn.primary:hover:not(:disabled) .nh3-btn-sub { color: #3d3423; }
/* GR-37 (ordre des modes) — étiquettes de section du menu titre :
   MODES DE JEU (du principal au moins important) puis SYSTÈME,
   pour que la hiérarchie se lise d'un coup d'œil. Filets latéraux
   à la grammaire NieR du site. */
.nh3-menu-label {
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    margin: 6px 26px 0;
    font-size: 9px;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--nh3-dim);
    opacity: 0.9;
}
.nh3-menu-label::before,
.nh3-menu-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
}
/* GR-37 : le mode principal (primary = rouge plein YoRHa depuis GR-33)
   garde un sous-titre lisible sur fond rouge. */
.nh3-menu .nh3-btn.primary .nh3-btn-sub { color: rgba(255, 255, 255, 0.8); }
.nh3-menu .nh3-btn.primary:hover:not(:disabled) .nh3-btn-sub { color: #fff; }
/* GR-37 (compactage) — 8 entrées + 2 étiquettes : le titre doit tenir
   dans un stage 16:9 bas (~585 px) sans couper le bas du menu. Le grand
   titre Cinzel passait sur DEUX lignes (72 px > largeur du wrap, 146 px
   de haut) : ramené sur une ligne ; le groupe SYSTÈME devient une grille
   2×2 compacte — les modes pleine largeur dominent, les outils suivent. */
.nh3-title { font-size: clamp(34px, 5.4vw, 52px); }
.nh3-title-wrap .nh3-title { margin-bottom: 8px; }
.nh3-title-wrap .nh3-title-sub { margin-bottom: 12px; }
.nh3-menu { width: 100%; gap: 6px; margin-bottom: 14px; }
.nh3-menu .nh3-btn { padding: 7px 26px 8px; line-height: 1.25; gap: 3px; }
.nh3-menu-label { margin-top: 5px; }
.nh3-menu-sys {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    margin-top: 2px;
}
.nh3-menu .nh3-menu-sys .nh3-btn { min-width: 0; width: 100%; padding: 6px 10px 7px; }
.nh3-menu-sys .nh3-btn .nh3-btn-main { font-size: 12px; letter-spacing: 0.14em; }
.nh3-menu-sys .nh3-btn .nh3-btn-sub { font-size: 8.5px; }
.nh3-title-wrap .nh3-marquee-wrap { margin-top: 8px; }
/* GR-37 (correctif flexbox) — align-items:center + overflow:auto coupe le
   HAUT d'un contenu plus grand que l'écran et le rend inaccessible au
   défilement. « safe center » centre quand ça tient, aligne en tête et
   défile sinon ; sans support, retombe sur center (aucune régression). */
.nh3-screen { align-items: safe center; }
.nh3-title-foot { font-size: 10px; color: #5a6570; letter-spacing: 0.12em; }

/* ── secteurs ── */
.nh3-sectors { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; }
.nh3-sector-row {
    display: grid;
    grid-template-columns: 110px 110px 1fr 50px;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(216, 192, 138, 0.16);
    border-left: 3px solid var(--nh3-gold);
    color: var(--nh3-text);
    font-family: var(--nh3-mono);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.13s;
}
.nh3-sector-row:hover:not(.locked) { background: rgba(216, 192, 138, 0.08); border-color: var(--nh3-gold); }
.nh3-sector-row.locked { opacity: 0.38; cursor: default; border-left-color: #4a5560; }
.nh3-sector-row.boss { border-left-color: var(--nh3-oxide); }
.nh3-sector-row.boss .nh3-sec-name { color: var(--nh3-oxide); }
.nh3-sec-stage { color: var(--nh3-gold); letter-spacing: 0.08em; font-size: 11px; }
.nh3-sec-name { color: var(--nh3-ivory); letter-spacing: 0.14em; }
.nh3-sec-rec { color: #7d8894; font-size: 11px; text-align: right; }
.nh3-sec-frag { color: var(--nh3-cyan); font-size: 11px; text-align: right; }
/* GR-36 (clarif. menu) — la mission que « INSÉRTION » lancerait est
   marquée d'un tag SUIVANT doré dans le sélecteur : les deux écrans
   se répondent, plus d'ambiguïté sur le rôle de chaque bouton. */
.nh3-sector-row.next { box-shadow: inset 0 0 0 1px rgba(216, 192, 138, 0.45); background: rgba(216, 192, 138, 0.06); }
.nh3-sector-row.next .nh3-sec-name::after {
    content: '→ SUIVANT';
    margin-left: 10px;
    font-size: 9px;
    letter-spacing: 0.22em;
    color: #05070a;
    background: var(--nh3-gold);
    padding: 2px 7px;
    vertical-align: 1px;
}

/* ── briefing ── */
/* GR-30 — le panneau de lignes est cliquable (déroulement complet) et
   borné en hauteur : un briefing long (monitor, horde +4 lignes) ne
   pousse plus le bouton COMPILER hors écran sur petit viewport. */
.nh3-brief-lines { min-height: 110px; max-height: 40vh; overflow-y: auto; margin: 14px 0; cursor: pointer; }
.nh3-brief-lines:hover p { color: #fff; }
.nh3-brief-hint {
    font-size: 10px;
    color: #7d8894;
    letter-spacing: 0.08em;
    text-align: center;
    margin-top: 10px;
}
.nh3-brief-lines p {
    font-size: 13px;
    line-height: 1.85;
    color: var(--nh3-ivory);
    margin: 0 0 8px;
}
.nh3-brief-lines p::before { content: '▸ '; color: var(--nh3-gold); }
.nh3-brief-mech {
    font-size: 11px;
    color: var(--nh3-cyan);
    border: 1px dashed rgba(89, 224, 216, 0.35);
    padding: 9px 14px;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
}

/* ── compile ── */
.nh3-compile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0 20px; }
.nh3-palette { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; padding-right: 6px; }
.nh3-op {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--c);
    cursor: pointer;
    font-family: var(--nh3-mono);
    text-align: left;
    transition: all 0.12s;
}
.nh3-op:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--c); }
.nh3-op-name { color: var(--c); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; }
.nh3-op-desc { color: #8a95a0; font-size: 10px; line-height: 1.45; }

.nh3-prog-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nh3-slot {
    aspect-ratio: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-family: var(--nh3-mono);
    transition: all 0.12s;
}
.nh3-slot:hover { border-color: var(--c); background: rgba(255, 255, 255, 0.05); }
.nh3-slot.filled { border-style: solid; border-color: var(--c); box-shadow: inset 0 0 14px -4px var(--c); }
.nh3-slot-idx { font-size: 8px; color: #5a6570; letter-spacing: 0.14em; }
.nh3-slot-name { font-size: 14px; font-weight: 600; color: var(--c); letter-spacing: 0.1em; }
.nh3-prog-info { margin-top: 10px; font-size: 10px; color: #7d8894; letter-spacing: 0.08em; }
.nh3-compile-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ── chips ── */
.nh3-chips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin: 16px 0 20px; }
.nh3-chip {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--c);
    cursor: pointer;
    font-family: var(--nh3-mono);
    text-align: left;
    transition: all 0.12s;
}
.nh3-chip:hover:not(.missing) { background: rgba(255, 255, 255, 0.05); }
.nh3-chip.eq { border-color: var(--c); box-shadow: inset 0 0 18px -6px var(--c); }
.nh3-chip.missing { opacity: 0.35; cursor: default; }
.nh3-chip-name { color: var(--c); font-size: 12px; letter-spacing: 0.1em; }
.nh3-chip-state { color: var(--c); font-size: 9px; letter-spacing: 0.2em; align-self: center; }
.nh3-chip-desc { grid-column: 1 / -1; color: #8a95a0; font-size: 10px; line-height: 1.5; }

/* ── aide ── */
.nh3-help-cols { display: grid; grid-template-columns: 0.9fr 1fr 1.1fr; gap: 26px; margin: 14px 0 20px; }
.nh3-help-cols h3 { color: var(--nh3-gold); font-size: 12px; letter-spacing: 0.24em; margin-bottom: 10px; font-weight: 500; }
.nh3-help-cols p { font-size: 11px; line-height: 1.8; color: var(--nh3-text); margin-bottom: 8px; }
.nh3-keys { width: 100%; border-collapse: collapse; font-size: 11px; }
.nh3-keys td { padding: 5px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.nh3-keys td:first-child { color: var(--nh3-gold); white-space: nowrap; width: 40%; }

/* ── pause / gameover / victory ── */
.nh3-pause-menu { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.nh3-panel.pause, .nh3-panel.gameover, .nh3-panel.victory { text-align: center; }
.nh3-pause-menu .nh3-btn { min-width: 280px; }

/* ── résultats ── */
.nh3-rank {
    font-size: 88px;
    font-weight: 200;
    color: var(--c, var(--nh3-gold));
    text-shadow: 0 0 40px var(--c, var(--nh3-gold));
    text-align: center;
    margin: 8px 0 16px;
    animation: nh3-rank-in 0.7s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes nh3-rank-in {
    0% { transform: scale(2.4); opacity: 0; filter: blur(6px); }
    100% { transform: scale(1); opacity: 1; filter: none; }
}
.nh3-results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 20px; }
.nh3-results-grid div {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
    text-align: center;
}
.nh3-results-grid span { display: block; font-size: 9px; letter-spacing: 0.24em; color: #7d8894; margin-bottom: 4px; }
.nh3-results-grid b { font-size: 17px; color: var(--nh3-ivory); font-weight: 500; }
.nh3-unlock {
    border: 1px solid var(--nh3-gold);
    background: rgba(216, 192, 138, 0.08);
    color: var(--nh3-gold);
    padding: 10px 16px;
    font-size: 11px;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
    text-align: center;
}
.nh3-panel.results { text-align: center; }

/* ═══════════ GD-4 — TABLE DES VERTUS (GENESIS) ═══════════ */
.nh3-virtues {
    margin: 4px auto 18px;
    max-width: 420px;
    text-align: left;
}
.virtues-kicker {
    font-size: 9px;
    letter-spacing: 0.26em;
    color: var(--nh3-gold);
    margin-bottom: 8px;
}
.virtues-kicker em { color: #7d8894; font-style: normal; letter-spacing: 0.12em; }
.virtue-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 5px 10px;
    border-bottom: 1px solid rgba(142, 166, 184, 0.12);
    font-size: 11px;
}
.virtue-row:last-child { border-bottom: none; }
.virtue-name { color: #aebccb; letter-spacing: 0.06em; }
.virtue-val { font-weight: 500; white-space: nowrap; }
.virtue-val i { font-style: normal; color: #7d8894; font-size: 10px; }
.virtue-row.ok .virtue-name::before { content: '◆ '; color: #66FF88; }

/* ═══════════ GP-10 — MODE DÉFI ═══════════ */
.nh3-sector-wrap { display: block; position: relative; }
.nh3-chal-btn {
    position: absolute;
    right: 10px;
    bottom: -14px;
    z-index: 2;
    background: rgba(42, 26, 26, 0.92);
    border: 1px solid #FF8833;
    color: #FF8833;
    font-family: inherit;
    font-size: 9px;
    letter-spacing: 0.12em;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.nh3-chal-btn:hover { background: #FF8833; color: #0a0a0a; }
.nh3-challenge-banner {
    border: 1px solid #FF8833;
    background: rgba(255, 136, 51, 0.08);
    color: #FF8833;
    padding: 9px 14px;
    font-size: 11px;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}
.nh3-challenge-banner.intact { border-color: #66FF88; color: #66FF88; background: rgba(102, 255, 136, 0.08); }

/* ═══════════ BOOT ═══════════ */
.nh3-boot {
    position: absolute;
    inset: 0;
    background: #020304;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.4s;
}
.nh3-boot-out { opacity: 0; }
.nh3-boot-inner { width: min(560px, 84%); }
.nh3-boot-log {
    font-family: var(--nh3-mono);
    font-size: 12px;
    line-height: 1.75;
    color: #9db8a4;
    min-height: 266px;
    white-space: pre-wrap;
}
.nh3-boot-bar { height: 3px; background: rgba(255, 255, 255, 0.07); margin-top: 14px; }
.nh3-boot-fill { height: 100%; width: 0; background: #9db8a4; box-shadow: 0 0 8px #9db8a4; transition: width 0.05s; }

/* ═══════════ OVERLAYS D'EFFET ═══════════ */
.nh3-flash-red, .nh3-flash-parry {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}
.nh3-flash-red { background: radial-gradient(ellipse at center, transparent 40%, rgba(196, 54, 43, 0.55) 100%); }
.nh3-flash-parry { background: radial-gradient(ellipse at center, transparent 30%, rgba(89, 224, 216, 0.4) 100%); }
.nh3-flash-red.go { animation: nh3-flash 0.5s ease-out; }
.nh3-flash-parry.go { animation: nh3-flash 0.55s ease-out; }
@keyframes nh3-flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.nh3-glitch {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
        repeating-linear-gradient(0deg, rgba(216, 192, 138, 0.12) 0 2px, transparent 2px 5px),
        rgba(5, 7, 10, 0.35);
    mix-blend-mode: screen;
}
.nh3-glitch.go { animation: nh3-glitch-anim 0.42s steps(6); }
@keyframes nh3-glitch-anim {
    0% { opacity: 1; transform: translateX(0); }
    20% { transform: translateX(-9px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
    100% { opacity: 0; transform: none; }
}

/* ═══════════ SECTION PAGE (mission strip, controls, scanlines) ═══════════ */

#nier-hack-wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 18px 40px;
}
#nier-hack-wrapper .section-label { color: var(--nh3-gold); }
#nier-hack-wrapper h2 {
    font-size: 1.5rem;
    color: var(--nh3-ivory);
    margin-bottom: 18px;
    letter-spacing: 0.05em;
    font-weight: 500;
}
#nier-hack-wrapper h2 .accent { color: var(--nh3-oxide); }

.nh-mission-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin: 0 0 16px;
    padding: 16px 20px;
    color: var(--nh3-text);
    text-align: left;
    background: linear-gradient(105deg, rgba(10, 13, 18, 0.92), rgba(18, 15, 12, 0.94));
    border: 1px solid var(--nh3-line);
    border-left: 3px solid var(--nh3-oxide);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.05);
    font-family: var(--nh3-mono);
}
.nh-mission-copy { display: grid; gap: 4px; min-width: 0; }
.nh-mission-kicker { color: var(--nh3-gold); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.26em; }
.nh-mission-copy strong { color: var(--nh3-ivory); font-size: 1rem; font-weight: 500; letter-spacing: 0.04em; }
.nh-mission-copy > span:last-child { color: #8a95a0; font-size: 0.72rem; font-weight: 300; line-height: 1.6; }

.nh-mission-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.nh-mission-meta > span { display: grid; gap: 2px; min-width: 96px; }
.nh-mission-meta b { color: var(--nh3-cyan); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.12em; white-space: nowrap; }
.nh-mission-meta small { color: #6d6a63; font-size: 0.5rem; letter-spacing: 0.2em; }

#nier-hack-section #nh-quick-start {
    font-family: var(--nh3-mono);
    background: var(--nh3-gold);
    color: #05070a;
    border: 1px solid var(--nh3-gold);
    padding: 10px 22px;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}
#nier-hack-section #nh-quick-start:hover {
    box-shadow: 0 0 22px -2px var(--nh3-gold);
    transform: translateY(-1px);
}

/* scanlines sur le stage */
#nier-hack-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: repeating-linear-gradient(
        0deg,
        transparent 0 2px,
        rgba(0, 0, 0, 0.14) 2px 4px
    );
    mix-blend-mode: multiply;
    opacity: 0.55;
}

#nh3-pod-say {
    position: absolute;
    left: 50%;
    top: 22%;
    transform: translateX(-50%) translateY(-6px);
    max-width: 520px;
    padding: 9px 16px;
    background: rgba(8, 11, 16, 0.92);
    border: 1px solid var(--nh3-line);
    font-family: var(--nh3-mono);
    font-size: 11px;
    color: var(--nh3-ivory);
    letter-spacing: 0.03em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 8;
}
#nh3-pod-say.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#nh3-pod-say .nh3-pod-name {
    display: block;
    font-size: 8.5px;
    color: var(--nh3-gold);
    letter-spacing: 0.24em;
    margin-bottom: 3px;
}

/* ═══════════ INSPECTEUR DE CELLULE (V31-04) ═══════════ */

.nh3-inspect {
    position: absolute;
    left: 50%;
    bottom: 12.5%;
    transform: translateX(-50%) translateY(6px);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    padding: 8px 14px;
    background: rgba(8, 11, 16, 0.88);
    border: 1px solid var(--nh3-line);
    font-family: var(--nh3-mono);
    pointer-events: none;
    z-index: 6;
    opacity: 1;
    transition: opacity 0.16s ease, transform 0.16s ease;
}
.nh3-inspect.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); }
.nh3-inspect-cellpos {
    font-size: 9px;
    color: #6d7680;
    letter-spacing: 0.14em;
    white-space: nowrap;
}
.nh3-inspect-glyph {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border: 1px solid currentColor;
    white-space: nowrap;
}
.nh3-inspect-txt { min-width: 0; }
.nh3-inspect-read {
    font-size: 11px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nh3-inspect-desc {
    font-size: 9.5px;
    color: var(--nh3-text);
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════ CARTE GLYPHE — LECTURE FLASH (V31-09) ═══════════
   Pendant le bullet-time pédagogique : la cellule exécutée est encadrée,
   nommée, et sa lecture française s affiche sous la carte. */

#nh3-flash-card {
    position: absolute;
    left: 50%;
    top: 13%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 18px 7px;
    background: rgba(8, 11, 16, 0.92);
    border: 1px solid var(--nh3-gold-dim);
    font-family: var(--nh3-mono);
    pointer-events: none;
    z-index: 7;
    opacity: 0;
    transition: opacity 0.14s ease;
}
#nh3-flash-card.on { opacity: 1; }
#nh3-flash-card .fc-kicker {
    font-size: 8.5px;
    color: var(--nh3-gold);
    letter-spacing: 0.22em;
}
#nh3-flash-card .fc-glyph {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
}
#nh3-flash-card .fc-read {
    font-size: 10.5px;
    color: var(--nh3-text);
    max-width: 420px;
    text-align: center;
}

.nh3-pause-hint {
    margin-top: 14px;
    font-size: 9.5px;
    color: #6d7680;
    letter-spacing: 0.08em;
    text-align: center;
}

/* ═══════════ ÉCRANS PÉDAGOGIQUES (Codex/Profil/Révision) ═══════════ */

.codex-list { margin: 14px 0; max-height: 46vh; overflow-y: auto; }
.codex-row {
    display: grid;
    grid-template-columns: 84px 1fr 110px;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(216, 192, 138, 0.12);
    cursor: pointer;
}
.codex-row:hover { background: rgba(216, 192, 138, 0.06); }
.codex-glyph {
    font-weight: 700; font-size: 12px; letter-spacing: 0.08em;
    padding: 2px 6px; border: 1px solid; text-align: center;
}
.codex-name { font-size: 10px; color: var(--nh3-text); }
.codex-status { font-size: 9.5px; letter-spacing: 0.14em; text-align: right; }

.entry-read { font-size: 13px; margin: 12px 0 8px; }
.entry-true { font-size: 11px; color: var(--nh3-text); line-height: 1.55; }
.entry-usage { font-size: 11px; color: #8ea0ae; line-height: 1.5; }
.entry-meta { font-size: 9px; color: #6d7680; letter-spacing: 0.14em; margin-top: 12px; }

.profile-badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }

/* ═══════════ SC-5 — COLLECTION DES 42 FRAGMENTS ═══════════ */
.profile-collection {
    display: flex; align-items: center; gap: 12px;
    font-size: 11px; letter-spacing: 0.08em;
    color: #aebccb; margin: 10px 0 4px;
}
.profile-collection b { color: var(--nh3-gold); }
.collection-panel { max-height: 82vh; overflow-y: auto; }
.collection-hint {
    font-size: 10.5px; color: #7d8894;
    line-height: 1.55; margin: 6px 0 14px;
}
.strate-block { margin-bottom: 18px; }
.strate-kicker {
    font-size: 9px; letter-spacing: 0.24em;
    color: var(--nh3-gold); margin-bottom: 8px;
}
.strate-kicker em { color: #7d8894; font-style: normal; letter-spacing: 0.1em; }
.frag-row {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(142, 166, 184, 0.09);
}
.frag-row.hidden .frag-name { color: #4a5561; letter-spacing: 0.14em; font-size: 10px; }
.frag-row:not(.on) .frag-name { color: #6b7887; }
.frag-name { font-size: 11.5px; color: var(--nh3-ivory); letter-spacing: 0.05em; }
.frag-row.on .frag-name { color: #d8c08a; }
.frag-text {
    display: block;
    font-size: 11px; color: #aebccb;
    line-height: 1.6; margin-top: 4px;
}
.badge-chip {
    font-family: var(--nh3-mono);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border: 1px solid #39424e;
    color: #39424e;
}
.badge-chip.on { border-color: var(--nh3-gold); color: var(--nh3-gold); }
.profile-weak { font-size: 11px; color: #b8c2cc; line-height: 1.7; }
.nh3-btn.small { min-width: auto; padding: 5px 14px; font-size: 10px; margin-top: 8px; }

.review-prompt { font-size: 12px; line-height: 1.6; color: var(--nh3-ivory); margin: 12px 0; }
.review-choices { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.review-choice { text-align: left; font-size: 11px; }
.review-feedback { min-height: 34px; font-size: 11px; letter-spacing: 0.04em; }

/* ═══════════ DUELS MARS (couche C) ═══════════ */

.duel-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}
.duel-pick select {
    font-family: var(--nh3-mono);
    font-size: 12px;
    background: rgba(8, 11, 16, 0.95);
    color: var(--nh3-ivory);
    border: 1px solid var(--nh3-line);
    padding: 7px 10px;
}
.duel-vs { color: var(--nh3-oxide); letter-spacing: 0.2em; font-weight: 700; }

#nh3-duel-canvas {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(78vh, 90vw);
    height: min(78vh, 90vw);
    image-rendering: pixelated;
    border: 1px solid var(--nh3-line);
    z-index: 9;
    background: #0a0a0a;
}
#nh3-duel-hud {
    position: absolute;
    top: 6%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--nh3-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--nh3-text);
    background: rgba(8, 11, 16, 0.88);
    border: 1px solid var(--nh3-line);
    padding: 6px 14px;
    z-index: 10;
}
#nh3-duel-hud .duel-speed { color: var(--nh3-gold); margin-left: 10px; }

.hill-standings { margin: 10px 0; max-height: 30vh; overflow-y: auto; }
.hill-row {
    display: grid;
    grid-template-columns: 26px 1fr 60px;
    gap: 8px;
    padding: 3px 6px;
    font-family: var(--nh3-mono);
    font-size: 11px;
    color: var(--nh3-text);
    border-bottom: 1px solid rgba(216, 192, 138, 0.1);
}
.hill-row b { color: var(--nh3-gold); text-align: right; }

/* ═══════════ ATELIER DE CHAMPIONS ═══════════ */

.ws-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    margin: 14px 0;
}
#ws-src {
    width: 100%;
    min-height: 300px;
    background: rgba(4, 6, 9, 0.95);
    color: #cfe3d8;
    border: 1px solid var(--nh3-line);
    font-family: var(--nh3-mono);
    font-size: 12px;
    line-height: 1.55;
    padding: 12px;
    resize: vertical;
    tab-size: 4;
}
#ws-src:focus { outline: 1px solid var(--nh3-gold-dim); }
.ws-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ws-import {
    font-family: var(--nh3-mono);
    font-size: 10px;
    color: #6d7680;
    letter-spacing: 0.14em;
    border: 1px dashed #39424e;
    padding: 8px;
    text-align: center;
    cursor: pointer;
}
.ws-import:hover { border-color: var(--nh3-line); color: var(--nh3-text); }

/* barre de contrôles */
#nier-hack-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 20px;
    margin-top: 10px;
    background: rgba(8, 11, 16, 0.9);
    border: 1px solid var(--nh3-line);
    border-top: none;
    font-family: var(--nh3-mono);
    font-size: 0.72rem;
    color: #94a3b8;
    letter-spacing: 0.08em;
}
#nier-hack-controls kbd {
    display: inline-block;
    padding: 2px 7px;
    background: rgba(216, 192, 138, 0.1);
    border: 1px solid rgba(216, 192, 138, 0.45);
    border-radius: 2px;
    color: var(--nh3-gold);
    font-size: 0.68rem;
    font-weight: 600;
    margin: 0 3px;
    box-shadow: inset 0 0 6px rgba(216, 192, 138, 0.15);
}
#nier-hack-controls .nh-hint { color: #6d7680; font-size: 0.66rem; }

@media (max-width: 760px) {
    .nh-mission-strip { grid-template-columns: 1fr; gap: 13px; }
    .nh-mission-meta { justify-content: flex-start; gap: 10px 14px; }
    #nier-hack-controls { font-size: 0.6rem; gap: 8px; }
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 760px) {
    .nh3-compile-grid { grid-template-columns: 1fr; }
    .nh3-help-cols { grid-template-columns: 1fr; }
    .nh3-sector-row { grid-template-columns: 90px 1fr; }
    .nh3-sec-rec, .nh3-sec-frag { display: none; }
    .nh3-results-grid { grid-template-columns: repeat(2, 1fr); }
    #nh3-minimap { width: 100px; height: 74px; }
    .nh3-bar-track { width: 110px; }
    .nh3-menu .nh3-btn { min-width: 240px; }
}

/* ═══════════ PARCOURS A à Z — hub des 5 actes ═══════════ */
.a2z-panel { max-width: 720px; }
.a2z-intro { font-size: 12px; color: #8a95a0; line-height: 1.7; margin-bottom: 14px; }
.a2z-intro.dim { color: #59E0D8; opacity: 0.85; font-size: 11px; border-left: 2px solid rgba(89,224,216,0.4); padding-left: 10px; }
.a2z-acts { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.acte-card {
    display: grid; grid-template-columns: 46px 1fr 96px; gap: 12px; align-items: center;
    padding: 12px 14px; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(216,192,138,0.16); border-left: 3px solid var(--nh3-gold);
    color: var(--nh3-text); font-family: var(--nh3-mono); text-align: left; cursor: pointer;
    transition: all 0.13s; font-size: 12px;
}
.acte-card:hover:not(.locked) { background: rgba(216,192,138,0.08); border-color: var(--nh3-gold); }
.acte-card.locked { opacity: 0.38; cursor: default; border-left-color: #4a5560; }
.acte-card.complete { border-left-color: #66FF88; }
.acte-num { font-size: 22px; font-weight: 200; color: var(--nh3-gold); }
.acte-card.complete .acte-num { color: #66FF88; }
.acte-body { display: flex; flex-direction: column; gap: 2px; }
.acte-title { font-size: 13px; color: var(--nh3-ivory); letter-spacing: 0.14em; }
.acte-tag { font-size: 10px; color: #8a95a0; }
.acte-sujet { font-size: 9px; color: #5a6570; }
.acte-prog { text-align: right; }
.acte-prog b { color: var(--nh3-gold); font-size: 13px; }
.acte-bar { height: 3px; background: rgba(255,255,255,0.08); margin-top: 4px; }
.acte-bar div { height: 100%; background: var(--nh3-gold); transition: width 0.3s; }
.a2z-footer { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.a2z-dossier { font-size: 10px; color: var(--nh3-cyan); letter-spacing: 0.1em; }
.a2z-paliers { display: flex; flex-direction: column; gap: 5px; margin: 12px 0; }
.palier-row {
    display: grid; grid-template-columns: 30px 90px 1fr; gap: 10px; align-items: center;
    padding: 8px 12px; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08); font-size: 11px;
}
.palier-row.done { border-color: rgba(102,255,136,0.4); }
.palier-n { color: var(--nh3-gold); font-weight: bold; text-align: center; }
.palier-row.done .palier-n { color: #66FF88; }
.palier-nom { color: var(--nh3-ivory); letter-spacing: 0.08em; }
.palier-test { color: #8a95a0; }

/* ═══════════ OBSERVATOIRE / ENCODER / MACHINE — séances & énigmes ═══════════ */
.obs-panel { max-width: 760px; }
.obs-quote-full {
    font-size: 11px; color: var(--nh3-cyan); line-height: 1.6;
    border-left: 2px solid rgba(89,224,216,0.4); padding-left: 10px; margin-bottom: 12px;
}
.obs-list { display: flex; flex-direction: column; gap: 5px; max-height: 330px; overflow: auto; margin-bottom: 10px; }
.obs-row {
    display: grid; grid-template-columns: 30px 170px 1fr; gap: 10px; align-items: center;
    padding: 9px 12px; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08); font-family: var(--nh3-mono);
    color: var(--nh3-text); text-align: left; cursor: pointer; font-size: 11px; transition: all 0.12s;
}
.obs-row:hover { background: rgba(216,192,138,0.07); border-color: var(--nh3-gold); }
.obs-row.done { border-color: rgba(102,255,136,0.35); }
.obs-n { color: var(--nh3-gold); font-weight: bold; text-align: center; }
.obs-row.done .obs-n { color: #66FF88; }
.obs-titre { color: var(--nh3-ivory); letter-spacing: 0.06em; }
.obs-quote { color: #6d7680; font-size: 10px; }
.obs-carnet { font-size: 10px; color: var(--nh3-cyan); margin: 8px 0; letter-spacing: 0.1em; }
.obs-question { font-size: 14px; color: var(--nh3-ivory); margin: 10px 0 14px; line-height: 1.6; }
.obs-choix { display: flex; flex-direction: column; gap: 7px; }
.obs-choice { text-align: left !important; }
.obs-choice.good { border-color: #66FF88 !important; background: rgba(102,255,136,0.12) !important; }
.obs-choice.bad { border-color: #C4362B !important; background: rgba(196, 54, 43,0.12) !important; }
.obs-verdict { min-height: 20px; margin-top: 12px; }
.obs-ok { color: #66FF88; font-size: 13px; letter-spacing: 0.14em; margin-bottom: 6px; }
.obs-ko { color: #C4362B; font-size: 13px; letter-spacing: 0.14em; margin-bottom: 6px; }
.obs-exp { font-size: 11px; color: #b8c2cc; line-height: 1.7; }
.obs-match { margin-top: 10px; font-size: 10px; color: var(--nh3-gold); }

/* ═══════════ GR-39 — L'ÉCOLE D'ABORD, LE QCM À LA FIN ═══════════
   Blocs d'enseignement des séances (CE QUE TU VAS OBSERVER,
   LE MÉCANISME, ANALYSE GUIDÉE, LA LEÇON) + évasion d'observation. */
.obs-focus {
    background: rgba(89,224,216,0.045);
    border: 1px solid rgba(89,224,216,0.22);
    border-left: 3px solid var(--nh3-cyan);
    padding: 12px 14px; margin: 6px 0 14px;
    font-size: 12px; color: #c6cfd8; line-height: 1.8;
}
.obs-focus.ok {
    background: rgba(102,255,136,0.05);
    border-color: rgba(102,255,136,0.25);
    border-left-color: #66FF88;
}
.obs-focus.dim {
    background: none; border: none; border-left: 2px solid rgba(255,255,255,0.14);
    font-size: 10px; color: #8a95a0; padding: 4px 0 4px 10px;
}
.obs-focus-t {
    display: block; font-size: 10px; letter-spacing: 0.18em;
    color: var(--nh3-cyan); margin-bottom: 8px;
}
.obs-focus.ok .obs-focus-t { color: #66FF88; }
.analyse-line { margin-bottom: 7px; }
.analyse-line b { color: var(--nh3-gold); }
#nh3-obs-skip {
    position: absolute; right: 26px; bottom: 22px; z-index: 60;
    opacity: 0.82;
}
#nh3-obs-skip:hover { opacity: 1; }
.enc-piste { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.enc-slot {
    width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--nh3-mono); font-size: 12px; border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.02); color: #6d7680;
}
.enc-slot.ok { border-color: #66FF88; color: #66FF88; }
.enc-slot.bad { border-color: #C4362B; color: #C4362B; }
.enc-controls { margin: 8px 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.enc-ask { font-size: 11px; color: var(--nh3-gold); margin-right: 6px; }
.enc-byte { min-width: 64px; }

/* ═══════════ ACTE II — verrous de compilation ═══════════ */
.gate-panel { max-width: 800px; }
.gate-editor-wrap { display: grid; grid-template-columns: 1fr 220px; gap: 14px; margin: 12px 0; }
.gate-editor {
    width: 100%; min-height: 200px; font-family: 'Courier New', monospace;
    font-size: 12px; line-height: 1.6; color: var(--nh3-ivory);
    background: #06080c; border: 1px solid var(--nh3-line);
    padding: 10px 12px; resize: vertical; outline: none;
}
.gate-editor:focus { border-color: var(--nh3-gold); box-shadow: 0 0 12px -4px var(--nh3-gold); }
.gate-side { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.gate-feedback { font-size: 11px; color: #b8c2cc; line-height: 1.6; margin-top: 6px; min-height: 40px; }
.gate-feedback code { font-family: 'Courier New', monospace; color: #FF8A7A; font-size: 11px; }
.gate-feedback b { color: #66FF88; }
.gate-criteres { font-size: 10px; color: var(--nh3-gold); letter-spacing: 0.06em; margin: 8px 0; }

/* ═══════════ OBSERVATOIRE — match en direct ═══════════ */
.obs-live-hint {
    font-size: 11px; color: var(--nh3-gold); margin-top: 8px;
    letter-spacing: 0.04em; border-top: 1px dashed rgba(216,192,138,0.3); padding-top: 6px;
}
.obs-quote { color: #6d7680; font-size: 10px; }

/* ═══════════════════════════════════════════════════════════════════════
   L'ARCHIVISTE · console holographique d'antichambre (plan unifié)
   Panneau diégétique superposé à l'arène : le joueur reste DANS le
   monde pendant la leçon. Pointer-events actifs sur le panneau seul.
   ═══════════════════════════════════════════════════════════════════════ */

#nh3-holo, #nh3-gate-holo, #nh3-vm-holo, #nh3-dossier {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) translateX(12px);
    width: min(420px, 38%);
    max-height: 84%;
    display: none;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(10, 15, 20, 0.94), rgba(6, 9, 13, 0.96));
    border: 1px solid var(--nh3-line);
    box-shadow: 0 0 34px rgba(0, 0, 0, 0.55), inset 0 0 46px rgba(89, 224, 216, 0.04);
    pointer-events: auto;
    z-index: 8;
    opacity: 0;
    transition: opacity .35s ease, transform .35s ease;
}
#nh3-holo.on, #nh3-gate-holo.on, #nh3-vm-holo.on, #nh3-dossier.on {
    display: flex;
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
#nh3-holo::before, #nh3-gate-holo::before, #nh3-vm-holo::before, #nh3-dossier::before {
    /* ligne de scan holographique */
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--nh3-cyan), transparent);
    opacity: 0.5;
    animation: holo-scan 3.2s linear infinite;
}
@keyframes holo-scan {
    0% { top: 0; opacity: 0; }
    8% { opacity: 0.55; }
    92% { opacity: 0.55; }
    100% { top: 100%; opacity: 0; }
}

.holo-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--nh3-line);
}
.holo-kicker {
    color: var(--nh3-gold);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.holo-phase {
    color: var(--nh3-cyan);
    font-size: 10px;
    letter-spacing: 0.14em;
    white-space: nowrap;
}
.holo-body {
    padding: 10px 14px;
    overflow-y: auto;
    min-height: 0;          /* flex : autorise le rétrécissement + scroll */
    flex: 1 1 auto;
    font-size: 12px;
    color: var(--nh3-text);
    line-height: 1.55;
}
.holo-instr {
    font-size: 15px;
    color: var(--nh3-ivory);
    background: rgba(89, 224, 216, 0.07);
    border-left: 3px solid var(--nh3-cyan);
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}
.holo-cycles {
    color: var(--nh3-gold);
    font-size: 11px;
    white-space: nowrap;
}
.holo-note { margin-top: 10px; color: var(--nh3-ivory); }
.holo-note.dim { color: var(--nh3-text); opacity: 0.75; }
.holo-quote {
    margin-top: 8px;
    font-size: 11px;
    color: var(--nh3-gold);
    opacity: 0.85;
    border-top: 1px dashed var(--nh3-line);
    padding-top: 8px;
}
.holo-goal {
    color: var(--nh3-ivory);
    background: rgba(216, 192, 138, 0.08);
    border-left: 3px solid var(--nh3-gold);
    padding: 8px 10px;
    margin-bottom: 10px;
}

/* — panneaux d'état (registres / mémoire / processus / purge) — */
.holo-pane { margin-bottom: 10px; }
.holo-pane-t {
    display: block;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--nh3-gold);
    opacity: 0.8;
    margin-bottom: 5px;
}
.holo-regs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.holo-reg {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    background: rgba(89, 224, 216, 0.05);
    border: 1px solid var(--nh3-line);
    padding: 5px 8px;
    transition: background .3s;
}
.holo-reg-n { font-size: 10px; color: var(--nh3-cyan); letter-spacing: 0.1em; }
.holo-reg-v { font-size: 16px; color: var(--nh3-ivory); }
.holo-carry {
    margin-top: 6px;
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.16em;
    padding: 3px 10px;
    border: 1px solid var(--nh3-line);
    color: var(--nh3-text);
}
.holo-carry.on {
    color: #05070a;
    background: var(--nh3-cyan);
    border-color: var(--nh3-cyan);
    box-shadow: 0 0 12px rgba(89, 224, 216, 0.5);
}
.holo-mem {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.holo-cell {
    min-width: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(216, 192, 138, 0.05);
    border: 1px solid var(--nh3-line);
    padding: 4px 6px;
    position: relative;
    transition: background .3s, border-color .3s;
}
.holo-cell.wrote {
    background: rgba(102, 255, 136, 0.14);
    border-color: #66FF88;
    box-shadow: 0 0 10px rgba(102, 255, 136, 0.25);
}
.holo-cell.ip { border-color: var(--nh3-gold); }
.holo-cell-a { font-size: 9px; color: var(--nh3-gold); opacity: 0.8; }
.holo-cell-v { font-size: 13px; color: var(--nh3-ivory); }
.holo-cell-ip {
    position: absolute;
    top: -9px;
    font-size: 8px;
    color: var(--nh3-gold);
    letter-spacing: 0.1em;
}
.holo-procs { display: flex; flex-direction: column; gap: 5px; }
.holo-proc {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 9px;
    border: 1px solid var(--nh3-line);
    background: rgba(89, 224, 216, 0.05);
}
.holo-proc.dead {
    border-color: var(--nh3-oxide);
    background: rgba(196, 54, 43, 0.12);
    text-decoration: line-through;
    opacity: 0.8;
}
.holo-proc-n { color: var(--nh3-cyan); font-size: 11px; }
.holo-proc-note { color: var(--nh3-text); font-size: 11px; text-align: right; }
.holo-purge {
    position: relative;
    height: 20px;
    background: rgba(196, 54, 43, 0.12);
    border: 1px solid var(--nh3-oxide);
    overflow: hidden;
}
.holo-purge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nh3-oxide), #ff7a5a);
    transition: width .4s;
}
.holo-purge-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--nh3-ivory);
    letter-spacing: 0.12em;
}

/* — composeur de maquette — */
.holo-compose { display: flex; flex-direction: column; gap: 9px; }
.holo-compose-row { display: flex; flex-direction: column; gap: 4px; }
.holo-compose-t {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--nh3-gold);
    opacity: 0.8;
}
.holo-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.holo-chip {
    pointer-events: auto;
    font-family: var(--nh3-mono);
    font-size: 12px;
    color: var(--nh3-ivory);
    background: rgba(216, 192, 138, 0.08);
    border: 1px solid var(--nh3-line);
    padding: 5px 12px;
    cursor: pointer;
    transition: all .15s;
}
.holo-chip:hover { border-color: var(--nh3-gold); background: rgba(216, 192, 138, 0.16); }
.holo-chip.sel {
    background: var(--nh3-cyan);
    color: #05070a;
    border-color: var(--nh3-cyan);
    box-shadow: 0 0 10px rgba(89, 224, 216, 0.4);
}
.holo-chip.small { font-size: 11px; padding: 4px 9px; }
.holo-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.holo-slot {
    pointer-events: auto;
    font-family: var(--nh3-mono);
    font-size: 13px;
    min-width: 54px;
    color: var(--nh3-cyan);
    background: rgba(89, 224, 216, 0.06);
    border: 1px dashed var(--nh3-cyan);
    padding: 6px 10px;
    cursor: pointer;
}
.holo-slot:hover { background: rgba(89, 224, 216, 0.16); }
.holo-src {
    font-size: 14px;
    color: var(--nh3-gold);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--nh3-line);
    padding: 7px 10px;
    letter-spacing: 0.05em;
}
.holo-feedback {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid var(--nh3-line);
}
.holo-feedback.good { border-color: #66FF88; color: #a8ffc0; background: rgba(102, 255, 136, 0.08); }
.holo-feedback.bad { border-color: #FF8A7A; color: #ffc4bc; background: rgba(255, 138, 122, 0.07); }
.holo-feedback.hint { border-color: var(--nh3-cyan); color: var(--nh3-cyan); background: rgba(89, 224, 216, 0.06); }
.holo-feedback code { color: var(--nh3-ivory); }
.holo-feedback-hint { color: var(--nh3-gold); }

.holo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px 14px;
    border-top: 1px solid var(--nh3-line);
}
.holo-btn {
    pointer-events: auto;
    font-family: var(--nh3-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--nh3-ivory);
    background: transparent;
    border: 1px solid var(--nh3-line);
    padding: 7px 14px;
    cursor: pointer;
    transition: all .15s;
}
.holo-btn.primary {
    color: #05070a;
    background: var(--nh3-gold);
    border-color: var(--nh3-gold);
    font-weight: 600;
}
.holo-btn.primary:hover { box-shadow: 0 0 14px rgba(216, 192, 138, 0.5); }
.holo-btn.ghost:hover { border-color: var(--nh3-cyan); color: var(--nh3-cyan); }
.holo-btn:disabled { opacity: 0.4; cursor: default; }
.holo-arch {
    padding: 8px 14px 10px;
    font-size: 10.5px;
    font-style: italic;
    color: var(--nh3-gold);
    opacity: 0.85;
    border-top: 1px dashed var(--nh3-line);
    line-height: 1.5;
}

/* ═══════════ CODEX RAPIDE EN COMBAT (touche C) ═══════════ */
#nh3-codex-quick {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3, 5, 8, 0.82);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    z-index: 9;
}
#nh3-codex-quick.on { display: flex; }
.cxq-panel {
    width: min(860px, 92%);
    max-height: 88%;
    display: flex;
    flex-direction: column;
    background: var(--nh3-panel);
    border: 1px solid var(--nh3-line);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(89, 224, 216, 0.03);
    padding: 18px 22px;
}
.cxq-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--nh3-line);
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.cxq-kicker { color: var(--nh3-gold); font-size: 12px; letter-spacing: 0.2em; }
.cxq-hint { color: var(--nh3-text); font-size: 10px; opacity: 0.8; }
.cxq-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    overflow-y: auto;
    min-height: 0;
}
.cxq-col-t {
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--nh3-cyan);
    margin-bottom: 8px;
}
.cxq-row {
    display: grid;
    grid-template-columns: 52px 1fr 74px;
    gap: 8px;
    align-items: baseline;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(216, 192, 138, 0.1);
    font-size: 11px;
}
.cxq-row.unseen { opacity: 0.45; }
.cxq-code { color: var(--nh3-gold); font-weight: 600; }
.cxq-desc { color: var(--nh3-text); line-height: 1.45; }
.cxq-st { text-align: right; font-size: 9px; letter-spacing: 0.08em; }
.st-vu { color: var(--nh3-text); }
.st-jouee { color: var(--nh3-gold); }
.st-comp { color: var(--nh3-cyan); }
.st-mait { color: #66FF88; text-shadow: 0 0 6px rgba(102, 255, 136, 0.5); }
.cxq-panel .nh3-btn { margin-top: 14px; align-self: center; }

@media (max-width: 760px) {
    #nh3-holo, #nh3-gate-holo, #nh3-vm-holo, #nh3-dossier { width: 92%; right: 4%; max-height: 60%; top: auto; bottom: 14px; transform: none; }
    .cxq-cols { grid-template-columns: 1fr; }
}

/* ── cohabitation Pod 042 / console Archiviste : la bulle glisse
   à gauche quand le panneau holo occupe le flanc droit ── */
#nh3-root.holo-shift #nh3-pod-say { left: 31%; max-width: 420px; }
#nh3-root.holo-shift .nh3-interact { bottom: 130px; }

/* ═══════════ ÉDITEUR DU TERMINAL DE COMPILATION (verrou Acte II) ═══════════ */
.gate-ta {
    width: 100%;
    min-height: 190px;
    resize: vertical;
    font-family: var(--nh3-mono);
    font-size: 13px;
    line-height: 1.65;
    color: var(--nh3-ivory);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--nh3-line);
    border-left: 3px solid var(--nh3-gold);
    padding: 10px 12px;
    outline: none;
    letter-spacing: 0.03em;
    caret-color: var(--nh3-cyan);
}
.gate-ta:focus {
    border-color: var(--nh3-gold);
    box-shadow: 0 0 14px rgba(216, 192, 138, 0.18);
}
.gate-ta::placeholder { color: rgba(184, 194, 204, 0.35); }
.gate-criteres {
    margin-top: 8px;
    font-size: 10.5px;
    color: var(--nh3-gold);
    letter-spacing: 0.06em;
    border-top: 1px dashed var(--nh3-line);
    padding-top: 7px;
}

/* ═══════════ PHASE ENCODAGE .COR — piste d'octets (miroir holo du décor) ═══════════ */
.enc-track {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}
.enc-slot {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    padding: 6px 7px;
    background: rgba(89, 224, 216, 0.05);
    border: 1px solid var(--nh3-line);
    color: var(--nh3-text);
    transition: all .25s;
}
.enc-slot.vide { color: rgba(184, 194, 204, 0.4); }
.enc-slot.posed {
    color: var(--nh3-gold);
    border-color: var(--nh3-gold);
    background: rgba(216, 192, 138, 0.1);
}
.enc-slot.ok {
    color: #66FF88;
    border-color: #66FF88;
    background: rgba(102, 255, 136, 0.1);
    box-shadow: 0 0 8px rgba(102, 255, 136, 0.25);
}
.enc-slot.bad {
    color: #FF5A4A;
    border-color: #FF5A4A;
    background: rgba(255, 90, 74, 0.12);
}
.enc-controls { margin-top: 4px; }
.enc-ask {
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--nh3-cyan);
    margin-bottom: 6px;
}
#enc-feedback { margin-top: 8px; }


/* ── panneau de la machine (boss) : teinte oxyde, la machine ennemie ── */
#nh3-vm-holo {
    border-color: rgba(196, 54, 43, 0.45);
    box-shadow: 0 0 34px rgba(0, 0, 0, 0.55), inset 0 0 46px rgba(196, 54, 43, 0.07);
}
#nh3-vm-holo .holo-kicker { color: #FF8A7A; }
#nh3-vm-holo .holo-phase { color: #FFD633; }
#nh3-vm-holo::before {
    background: linear-gradient(90deg, transparent, #C4362B, transparent);
}
.holo-quote {
    font-size: 11px;
    color: var(--nh3-gold);
    opacity: 0.85;
    border-left: 2px solid rgba(216, 192, 138, 0.35);
    padding-left: 9px;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* titre du panneau machine : longs titres → retour à la ligne, aligné droite */
#nh3-vm-holo .holo-phase {
    white-space: normal;
    text-align: right;
    max-width: 58%;
    line-height: 1.4;
}


/* ═══════════ DOSSIER DE CHAMPION (Acte V — rounds du championnat) ═══════════ */
#nh3-dossier {
    border-color: rgba(89, 224, 216, 0.4);
}
#nh3-dossier::before {
    background: linear-gradient(90deg, transparent, #59E0D8, transparent);
}
.dos-nom {
    font-size: 17px;
    color: var(--nh3-ivory);
    border-left: 3px solid var(--nh3-cyan);
    background: rgba(89, 224, 216, 0.07);
    padding: 8px 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    letter-spacing: 0.06em;
}
.dos-size {
    font-size: 11px;
    color: var(--nh3-gold);
    white-space: nowrap;
}
.dos-note {
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--nh3-text);
    margin-bottom: 10px;
}
.dos-bloc {
    border: 1px solid var(--nh3-line);
    background: rgba(0, 0, 0, 0.35);
    padding: 9px 11px;
}
.dos-compte {
    font-size: 11.5px;
    color: var(--nh3-cyan);
    letter-spacing: 0.04em;
    margin-bottom: 7px;
}
.dos-lecture { display: flex; flex-direction: column; gap: 3px; }
.dos-op {
    font-size: 11px;
    color: var(--nh3-ivory);
}
.dos-op b { color: var(--nh3-gold); }
.dos-op i { color: #8ea6b8; font-style: normal; }

/* ── TON CHAMPION : bloc miroir vert dans le dossier de finale ── */
.dos-mine {
    border-color: rgba(102, 255, 136, 0.45);
    background: rgba(102, 255, 136, 0.04);
    box-shadow: inset 0 0 18px rgba(102, 255, 136, 0.05);
}
.dos-mine .holo-pane-t { color: #66FF88; }

/* ═══════════ POLISH — flash plein cadre teinté ═══════════ */
#nh3-flash-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 12;
    mix-blend-mode: screen;
}
#nh3-flash-tint.go {
    animation: nh3-tint var(--fdur, 380ms) ease-out forwards;
}
@keyframes nh3-tint {
    0%   { opacity: var(--fint, 0.16); }
    100% { opacity: 0; }
}

/* ═══════════ POLISH — entrée des panneaux holo (slide + fade) ═══════════ */
@keyframes holo-in {
    0%   { opacity: 0; transform: translateY(-50%) translateX(26px); }
    100% { opacity: 1; transform: translateY(-50%) translateX(0); }
}
#nh3-holo.on, #nh3-gate-holo.on, #nh3-vm-holo.on, #nh3-dossier.on {
    animation: holo-in .38s cubic-bezier(.2,.9,.3,1.0);
}
/* sur mobile le panneau est ancré en bas : slide vertical */
@media (max-width: 760px) {
    @keyframes holo-in {
        0%   { opacity: 0; transform: translateY(18px); }
        100% { opacity: 1; transform: translateY(0); }
    }
}

/* ── pop des octets/briques à la pose (miroir DOM de la piste 3D) ── */
@keyframes enc-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.28); box-shadow: 0 0 14px currentColor; }
    100% { transform: scale(1); }
}
.enc-slot.posed { animation: enc-pop .3s ease-out; }
.enc-slot.ok    { animation: enc-pop .45s ease-out .05s; }

/* ── pulse de la question dans les panneaux (hypothèse/régulation) ── */
@keyframes holo-goal-pulse {
    0%, 100% { border-left-color: rgba(216, 192, 138, 0.9); }
    50%      { border-left-color: rgba(216, 192, 138, 0.35); }
}
.holo-goal { animation: holo-goal-pulse 2.2s ease-in-out infinite; }
#nh3-vm-holo .holo-goal { border-left-color: rgba(196, 54, 43, 0.9); animation: none; }

/* ── jauge de purge critique (miroir DOM de l'organe 3D) ── */
.holo-purge-fill { transition: width .4s, background .3s; }
.holo-purge-fill.critical {
    background: linear-gradient(90deg, #ff3b28, #ff8a5a);
    animation: nh3-breathe 0.7s infinite;
}

/* ═══════════════════════════════════════════════════════════════════════
   ═══ GR-33 — PASSE YORHA ═══
   Fenêtres de code + menus du jeu alignés sur le thème NieR des pages
   du site (nier-theme.css) : ténèbres chaudes, rouge YoRHa en filet
   structurel, kintsugi pour ce qui compte, angles vifs, ombre portée
   dure, prompt █ clignotant. Le jeu porte cette identité quel que soit
   le thème de la page hôte (nier, rayon, ame…).
   Sémantique conservée : or = précieux (joueur, code), rouge YoRHa =
   structure & action, cyan = mémoire brute (registres, cellules, ticker).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1 · FENÊTRES DE CODE — le terminal NieR (fenêtre noire, filet
      rouge à gauche, ombre portée dure — cf. .terminal-window des pages) ── */
#nh3-root textarea {
    background: #0D0D0C;
    color: var(--nh3-paper-dim);
    border: 1px solid var(--nh3-black-line);
    border-left: 3px solid var(--nh3-red);
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(13, 12, 11, 0.35);
    caret-color: var(--nh3-red-bright);
    transition: border-color .15s ease, box-shadow .15s ease;
}
#nh3-root textarea:focus {
    outline: none;
    border-color: var(--nh3-red);
    box-shadow: 4px 4px 0 rgba(13, 12, 11, 0.35), 0 0 0 2px var(--nh3-red-glow);
}
#nh3-root textarea::selection { background: rgba(196, 54, 43, 0.30); color: var(--nh3-paper); }
#nh3-root textarea::placeholder { color: rgba(158, 152, 142, 0.42); }

/* terminal de palier — l'entrée de code centrale du jeu */
.gate-ta:focus {
    border-color: var(--nh3-red);
    box-shadow: 4px 4px 0 rgba(13, 12, 11, 0.35), 0 0 0 2px var(--nh3-red-glow), 0 0 18px rgba(196, 54, 43, 0.18);
}
.gate-criteres { border-top: 1px solid var(--nh3-black-line); }

/* contre-règle thème nier : la page hôte force TOUS les textarea en
   parchemin (!important — nier-theme.css l.279). Le jeu est un terminal
   d'arène : ses fenêtres de code restent des .terminal-window noirs à
   filet rouge, comme les fenêtres de code des pages elles-mêmes. */
html[data-theme="nier"] #nh3-root textarea {
    background: #0D0D0C !important;
    color: var(--nh3-paper-dim) !important;
    border: 1px solid var(--nh3-black-line) !important;
    border-left: 3px solid var(--nh3-red) !important;
    border-radius: 0 !important;
    caret-color: var(--nh3-red-bright) !important;
    font-family: var(--nh3-mono) !important;
}
html[data-theme="nier"] #nh3-root textarea::placeholder {
    color: rgba(158, 152, 142, 0.42) !important;
    font-style: normal !important;
}
html[data-theme="nier"] #nh3-root textarea:focus {
    border-color: var(--nh3-red) !important;
    box-shadow: 4px 4px 0 rgba(13, 12, 11, 0.35), 0 0 0 2px var(--nh3-red-glow) !important;
    outline: none !important;
}

/* atelier FORGE REDCODE — même langage terminal */
#ws-src { color: var(--nh3-paper-dim); background: #0D0D0C; }
#ws-src:focus { outline: none; border-color: var(--nh3-red); box-shadow: 4px 4px 0 rgba(13, 12, 11, 0.35), 0 0 0 2px var(--nh3-red-glow); }
#ws-import { border: 1px dashed var(--nh3-warm-line); color: var(--nh3-dim); }
#ws-import:hover { border-color: var(--nh3-red); color: var(--nh3-red-bright); }

/* ── 2 · CONSOLES HOLO — chrome chaud, tête de panneau type
      en-tête de table NieR (fond noir doux + filet rouge 2px) ── */
#nh3-holo, #nh3-gate-holo, #nh3-vm-holo, #nh3-dossier {
    background: linear-gradient(165deg, rgba(34, 32, 29, 0.96), rgba(13, 12, 11, 0.97));
    border: 1px solid var(--nh3-warm-line);
    border-left: 3px solid var(--nh3-red);
    box-shadow: var(--nh3-hard-shadow), 0 0 34px rgba(0, 0, 0, 0.5), inset 0 0 46px rgba(196, 54, 43, 0.045);
    border-radius: 0;
}
.holo-head {
    background: var(--nh3-black-soft);
    border-bottom: 2px solid var(--nh3-red);
}
.holo-kicker { color: var(--nh3-red-bright); }
.holo-phase { color: var(--nh3-dim); }
/* prompt YoRHa : le █ rouge clignote dans la tête de chaque console */
.holo-kicker::after {
    content: '█';
    color: var(--nh3-red);
    margin-left: 7px;
    animation: nh3-prompt-blink 1s step-end infinite;
}
@keyframes nh3-prompt-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.holo-body { color: var(--nh3-paper-dim); }
.holo-instr {
    background: rgba(196, 54, 43, 0.07);
    border-left: 3px solid var(--nh3-red);
}
.holo-goal {
    background: rgba(201, 162, 39, 0.07);
    border-left: 3px solid var(--nh3-kintsugi);
}
.holo-note { color: var(--nh3-paper); }
.holo-reg { background: rgba(89, 224, 216, 0.05); border-color: var(--nh3-black-line); }
.holo-cell { background: rgba(201, 162, 39, 0.05); border-color: var(--nh3-black-line); }
.holo-proc { border-color: var(--nh3-black-line); background: rgba(89, 224, 216, 0.05); }
.holo-carry { border-color: var(--nh3-warm-line); }
.holo-feedback { border-color: var(--nh3-black-line); }
.holo-feedback.hint { border-color: var(--nh3-kintsugi); color: var(--nh3-gold); background: rgba(201, 162, 39, 0.06); }
.holo-arch { border-top: 1px dashed var(--nh3-warm-line); }
.holo-actions { border-top: 1px solid var(--nh3-black-line); }

/* console de la machine (boss) : déjà rouge — on garde sa teinte,
   le filet structurel YoRHa la renforce naturellement */
#nh3-vm-holo .holo-kicker::after { color: var(--nh3-red-bright); }

/* ── 3 · BOUTONS — CTA NieR : primaire rouge plein à ombre dure
      + balayage lumineux, fantômes à filet chaud qui rougeoient ── */
.holo-btn {
    border: 1px solid var(--nh3-warm-line);
    border-radius: 0;
    color: var(--nh3-paper-dim);
    position: relative;
    overflow: hidden;
}
.holo-btn:hover:not(:disabled) { border-color: var(--nh3-red); color: var(--nh3-red-bright); }
.holo-btn.primary {
    background: var(--nh3-red);
    border-color: var(--nh3-red);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 3px 3px 0 rgba(139, 37, 25, 0.4);
}
.holo-btn.primary::after {
    content: '';
    position: absolute;
    top: -100%; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transition: top 0.4s ease;
    pointer-events: none;
}
.holo-btn.primary:hover:not(:disabled) {
    background: var(--nh3-red-dark);
    border-color: var(--nh3-red-dark);
    box-shadow: 4px 4px 0 rgba(139, 37, 25, 0.5);
    transform: translateY(-2px);
}
.holo-btn.primary:hover:not(:disabled)::after { top: 100%; }
.holo-btn.primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.holo-chip { border-radius: 0; }
.holo-chip.sel {
    background: var(--nh3-kintsugi);
    border-color: var(--nh3-kintsugi);
    color: #161513;
    box-shadow: 3px 3px 0 rgba(139, 37, 25, 0.25);
}
.holo-slot { border: 1px dashed var(--nh3-kintsugi); color: var(--nh3-gold); background: rgba(201, 162, 39, 0.06); }
.holo-slot:hover { background: rgba(201, 162, 39, 0.14); }

/* ── 4 · MENUS & PANNEAUX D'ÉCRANS — ténèbres chaudes, filet rouge
      de structure en tête, équerres YoRHa, ombre portée dure ── */
.nh3-screen {
    background:
        repeating-linear-gradient(0deg, transparent 0 2px, rgba(13, 12, 11, 0.14) 2px 4px),
        rgba(13, 12, 11, 0.86);
}
.nh3-panel {
    background: linear-gradient(170deg, rgba(34, 32, 29, 0.97), rgba(18, 17, 16, 0.98));
    border: 1px solid var(--nh3-warm-line);
    border-top: 3px solid var(--nh3-red);
    box-shadow: 6px 6px 0 rgba(13, 12, 11, 0.5), 0 0 60px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(196, 54, 43, 0.03);
    border-radius: 0;
}
.nh3-panel::before, .nh3-panel::after { border-color: var(--nh3-red); width: 12px; height: 12px; }
.nh3-panel-kicker { color: var(--nh3-red-bright); }
.nh3-panel-title {
    font-family: var(--nh3-serif);
    font-weight: 600;
    color: var(--nh3-paper);
    letter-spacing: 0.14em;
}
.nh3-panel-sub { color: var(--nh3-dim); }

/* boutons de menu — même grammaire CTA que les pages */
.nh3-btn {
    border: 1px solid var(--nh3-warm-line);
    border-radius: 0;
    color: var(--nh3-paper-dim);
    position: relative;
    overflow: hidden;
}
.nh3-btn:hover:not(:disabled) {
    background: var(--nh3-red-tint);
    border-color: var(--nh3-red);
    color: var(--nh3-red-bright);
    box-shadow: 0 0 18px -4px var(--nh3-red);
}
.nh3-btn.primary {
    border-color: var(--nh3-red);
    background: var(--nh3-red);
    color: #FFFFFF;
    box-shadow: 3px 3px 0 rgba(139, 37, 25, 0.4);
}
.nh3-btn.primary::after {
    content: '';
    position: absolute;
    top: -100%; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transition: top 0.4s ease;
    pointer-events: none;
}
.nh3-btn.primary:hover:not(:disabled) {
    background: var(--nh3-red-dark);
    border-color: var(--nh3-red-dark);
    color: #FFFFFF;
    box-shadow: 4px 4px 0 rgba(139, 37, 25, 0.5);
    transform: translateY(-2px);
}
.nh3-btn.primary:hover:not(:disabled)::after { top: 100%; }

/* ── écran titre : Cinzel, PROTOCOL en rouge YoRHa, marquee ── */
.nh3-title-kicker { color: var(--nh3-red-bright); }
.nh3-title {
    font-family: var(--nh3-serif);
    font-weight: 500;
    color: var(--nh3-paper);
    text-shadow: 0 0 34px rgba(196, 54, 43, 0.28), 0 0 90px rgba(196, 54, 43, 0.12);
}
.nh3-title span { color: var(--nh3-red-bright); }
.nh3-title-sub { color: var(--nh3-dim); }
.nh3-title-foot { color: var(--nh3-dim); opacity: 0.85; }
/* marquee YoRHa — la signature du pied de page NieR du site,
   déclinée aux unités du jeu */
.nh3-marquee-wrap {
    margin-top: 16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.nh3-marquee {
    display: inline-block;
    white-space: nowrap;
    font-size: 10px;
    font-family: var(--nh3-mono);
    color: rgba(196, 54, 43, 0.42);
    letter-spacing: 0.18em;
    animation: nh3-marquee 52s linear infinite;
}
@keyframes nh3-marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ── secteurs : filet rouge standard, kintsugi pour les boss ── */
.nh3-sector-row {
    background: rgba(244, 239, 230, 0.025);
    border: 1px solid var(--nh3-black-line);
    border-left: 3px solid var(--nh3-red);
}
.nh3-sector-row:hover:not(.locked) {
    background: var(--nh3-red-tint);
    border-color: var(--nh3-red);
}
.nh3-sector-row.locked { border-left-color: var(--nh3-black-line); }
.nh3-sector-row.boss { border-left-color: var(--nh3-kintsugi); }
.nh3-sector-row.boss .nh3-sec-name { color: var(--nh3-gold); }
.nh3-sec-rec { color: var(--nh3-dim); }

/* ── briefing : la mécanique passe au kintsugi (détail précieux) ── */
.nh3-brief-mech {
    color: var(--nh3-gold);
    border: 1px dashed rgba(201, 162, 39, 0.4);
}
.nh3-brief-hint { color: var(--nh3-dim); }

/* ── compile : palette & slots réchauffés (les accents --c restent) ── */
.nh3-op { background: rgba(244, 239, 230, 0.03); border-color: var(--nh3-black-line); }
.nh3-op:hover { background: rgba(244, 239, 230, 0.07); }
.nh3-op-desc { color: var(--nh3-dim); }
.nh3-slot { background: rgba(244, 239, 230, 0.03); border-color: var(--nh3-black-line); }
.nh3-slot-idx { color: var(--nh3-dim); }
.nh3-prog-info { color: var(--nh3-dim); }
.nh3-chip { border-radius: 0; }
.nh3-chip-desc { color: var(--nh3-dim); }
.nh3-chip.missing { border-left-color: var(--nh3-black-line); }

/* ── aide & divers : titres de colonnes en rouge, textes chauds ── */
.nh3-help-cols h3 { color: var(--nh3-red-bright); font-weight: 600; }
.nh3-keys td { border-bottom-color: rgba(74, 70, 63, 0.5); }
.nh3-results-grid span { color: var(--nh3-dim); }
.virtues-kicker em { color: var(--nh3-dim); }
.virtue-name { color: var(--nh3-paper-dim); }
.virtue-val i { color: var(--nh3-dim); }
.duel-pick select { background: rgba(22, 21, 19, 0.95); }
.hill-row { border-bottom-color: rgba(74, 70, 63, 0.45); }
.review-feedback { color: var(--nh3-paper-dim); }

/* ── 5 · FOCUS & SCROLLBARS — anneaux rouges YoRHa ── */
#nh3-root :focus-visible {
    outline: 2px solid var(--nh3-red);
    outline-offset: 2px;
}
#nh3-root ::-webkit-scrollbar { width: 6px; height: 6px; }
#nh3-root ::-webkit-scrollbar-track { background: var(--nh3-black-soft) !important; }
#nh3-root ::-webkit-scrollbar-thumb { background: var(--nh3-red-dark) !important; border-radius: 0 !important; }
#nh3-root ::-webkit-scrollbar-thumb:hover { background: var(--nh3-red) !important; }
#nh3-root { scrollbar-color: var(--nh3-red-dark) var(--nh3-black-soft); scrollbar-width: thin; }

/* ── 6 · CONTRE-RÈGLES THÈME NIER (fuites hôte → jeu) ──
   nier-theme.css force h1/h2 en encre foncée et h3/h4 en encre douce
   (!important, l.229-238) : lisibles sur les pages parchemin, INVISIBLES
   sur les écrans sombres du jeu. Le jeu réimpose sa parchemin à lui. */
html[data-theme="nier"] #nh3-root h1,
html[data-theme="nier"] #nh3-root h2 {
    color: var(--nh3-paper) !important;
    text-shadow: none !important;
}
html[data-theme="nier"] #nh3-root h3,
html[data-theme="nier"] #nh3-root h4 {
    color: var(--nh3-red-bright) !important;
    font-family: var(--nh3-mono) !important;
}
html[data-theme="nier"] #nh3-root .nh3-title {
    text-shadow: 0 0 34px rgba(196, 54, 43, 0.28), 0 0 90px rgba(196, 54, 43, 0.12) !important;
}

/* ═══════════════════════════════════════════════════════════════
   GR-38 — LA CAMPAGNE NARRATIVE (le récit des 5 actes)
   Carte d'acte cinématique · écran narratif (dialogue tapé) ·
   écran du dernier cycle · choix « secteur déjà timbré ».
   Le flux remplace le hub : aucune liste entre les parties.
   ═══════════════════════════════════════════════════════════════ */

/* ── La grande carte d'acte : noir intégral, titre Cinzel, filet or ── */
.nh3-screen.actcard {
    background: #030405;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
}
.nh3-actcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 26px;
    animation: actcard-fade 0.9s ease-out both;
}
.actcard-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 0 24px;
}
.actcard-kicker {
    font-size: 10px;
    letter-spacing: 0.5em;
    color: var(--nh3-dim);
    animation: actcard-rise 0.7s 0.15s ease-out both;
}
.actcard-num {
    font-family: var(--nh3-serif);
    font-size: 15px;
    letter-spacing: 0.6em;
    color: var(--nh3-red-bright);
    padding-left: 0.6em;   /* compense le letter-spacing pour un vrai centrage */
    animation: actcard-rise 0.7s 0.3s ease-out both;
}
.actcard-title {
    font-family: var(--nh3-serif);
    font-weight: 500;
    font-size: clamp(30px, 5.2vw, 54px);
    color: var(--nh3-paper);
    letter-spacing: 0.18em;
    margin: 0;
    animation: actcard-title-in 1.1s 0.35s ease-out both;
}
.actcard-title.sm {
    font-size: clamp(16px, 2.6vw, 26px);
    letter-spacing: 0.14em;
}
.actcard-rule {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--nh3-kintsugi), transparent);
    animation: actcard-rule 0.9s 0.7s ease-out forwards;
}
.actcard-tag {
    font-size: 12px;
    color: var(--nh3-gold);
    letter-spacing: 0.22em;
    max-width: 520px;
    animation: actcard-rise 0.7s 0.95s ease-out both;
}
.actcard-hint {
    position: absolute;
    bottom: 26px;
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--nh3-dim);
    opacity: 0;
    animation: actcard-rise 0.6s 1.5s ease-out both;
}
@keyframes actcard-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes actcard-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes actcard-title-in {
    from { opacity: 0; letter-spacing: 0.42em; filter: blur(6px); }
    to { opacity: 1; letter-spacing: 0.18em; filter: none; }
}
@keyframes actcard-rule { from { width: 0; } to { width: min(420px, 60%); } }

/* ── GR-41 : la position dans le récit, sur la grande carte ── */
.actcard-meta {
    font-size: 10px;
    letter-spacing: 0.34em;
    padding-left: 0.34em;   /* compense le letter-spacing */
    color: var(--nh3-dim);
    margin-top: 4px;
    animation: actcard-rise 0.7s 1.1s ease-out both;
}

/* ── GR-41 : « PRÉCÉDEMMENT » sur la carte de reprise ── */
.actcard-recap {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-width: 560px;
    padding: 14px 20px;
    margin-top: 6px;
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-left: 2px solid var(--nh3-kintsugi);
    background: rgba(201, 162, 39, 0.05);
    text-align: left;
    animation: actcard-rise 0.7s 1s ease-out both;
}
.actcard-recap-k {
    font-size: 9px;
    letter-spacing: 0.4em;
    color: var(--nh3-kintsugi);
}
.actcard-recap-t {
    font-family: var(--nh3-serif);
    font-size: 15px;
    letter-spacing: 0.14em;
    color: var(--nh3-paper);
}
.actcard-recap-n {
    font-size: 11px;
    line-height: 1.65;
    color: var(--nh3-dim);
    font-style: italic;
}

/* ── GR-41 : le game-over narratif du récit (LA BOUCLE TE RENVOIE) ── */
.go-recit-chip {
    display: inline-block;
    margin: 14px auto 0;
    padding: 5px 14px;
    font-size: 10px;
    letter-spacing: 0.26em;
    color: var(--nh3-gold);
    border: 1px solid rgba(201, 162, 39, 0.4);
    background: rgba(201, 162, 39, 0.07);
}
.go-recit-voice {
    max-width: 520px;
    margin: 12px auto 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--nh3-paper);
    font-style: italic;
}
.go-recit-voice b {
    color: var(--nh3-kintsugi);
    font-style: normal;
    letter-spacing: 0.08em;
}
.go-recit-hint {
    max-width: 520px;
    margin: 12px auto 0;
    padding: 9px 14px;
    font-size: 11px;
    line-height: 1.6;
    color: #66FF88;
    border: 1px solid #2a4a38;
    background: rgba(102, 255, 136, 0.05);
}

/* ── L'écran narratif : noir profond, boîte de dialogue en bas ── */
.nh3-screen.narrative {
    background:
        radial-gradient(ellipse at 50% 30%, rgba(196, 54, 43, 0.045), transparent 60%),
        repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.18) 2px 4px),
        #040507;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    cursor: pointer;
}
.nh3-narrative {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 18px 22px 30px;
}
.narr-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.narr-chip {
    font-size: 10px;
    letter-spacing: 0.26em;
    color: var(--nh3-dim);
    border: 1px solid var(--nh3-black-line);
    padding: 5px 12px;
    background: rgba(22, 21, 19, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.narr-suspend {
    font-family: var(--nh3-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--nh3-dim);
    background: none;
    border: 1px solid transparent;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.narr-suspend:hover { color: var(--nh3-red-bright); border-color: var(--nh3-red-dark); }
.narr-box {
    margin-top: auto;
    max-width: 760px;
    width: 100%;
    align-self: center;
    background: rgba(10, 11, 13, 0.92);
    border: 1px solid var(--nh3-warm-line);
    border-left: 3px solid var(--nh3-gold);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    padding: 18px 24px 16px;
    animation: narr-box-in 0.45s ease-out both;
}
@keyframes narr-box-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.narr-speaker {
    font-size: 11px;
    letter-spacing: 0.34em;
    margin-bottom: 10px;
    color: var(--nh3-ivory);
}
.narr-speaker.pod { color: var(--nh3-cyan); }
.narr-speaker.arch { color: var(--nh3-gold); }
.narr-speaker.u2b { color: var(--nh3-paper); }
.narr-speaker.mur { color: var(--nh3-red-bright); }
.narr-speaker.yorha { color: var(--nh3-dim); }
.narr-speaker.notion {
    color: var(--nh3-kintsugi);
    border: 1px solid rgba(201, 162, 39, 0.4);
    display: inline-block;
    padding: 2px 10px;
}
.narr-text {
    font-size: 15px;
    line-height: 1.75;
    color: var(--nh3-paper-dim);
    min-height: 84px;
    text-shadow: 0 0 14px rgba(244, 239, 230, 0.08);
}
.narr-cue {
    text-align: right;
    color: var(--nh3-gold);
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s;
}
.narr-cue.on { opacity: 1; animation: narr-blink 1.1s infinite steps(2); }
@keyframes narr-blink { 50% { opacity: 0.15; } }

/* ── L'écran du dernier cycle (fin du récit) ── */
.camp-finale { max-width: 700px; text-align: center; }
.camp-finale .nh3-btn { margin: 6px auto; min-width: 340px; }
.camp-cert {
    margin: 14px 0 6px;
    padding: 12px 18px;
    border: 1px solid var(--nh3-kintsugi);
    color: var(--nh3-kintsugi);
    font-size: 12px;
    letter-spacing: 0.22em;
    background: rgba(201, 162, 39, 0.06);
    box-shadow: 0 0 26px rgba(201, 162, 39, 0.12);
}
.camp-cert.dim {
    border-color: var(--nh3-black-line);
    color: var(--nh3-dim);
    background: none;
    box-shadow: none;
}
.camp-reflet {
    margin: 10px 0;
    padding: 9px 14px;
    border: 1px solid #FFD633;
    color: #FFD633;
    font-size: 11px;
    letter-spacing: 0.18em;
}
.camp-skip { max-width: 620px; text-align: center; }

/* ── Petites largeurs : la boîte de dialogue reste lisible ── */
@media (max-width: 640px) {
    .narr-text { font-size: 13px; min-height: 110px; }
    .narr-chip { letter-spacing: 0.12em; }
    .camp-finale .nh3-btn { min-width: 0; width: 100%; }
}
