/* ==========================================================
   НИИ «СФЕРА» · Досье
   v3 · статические страницы + разговор по клику
   ========================================================== */

:root {
    --bg:      #000000;
    --ink:     #e8dfcc;
    --ink-dim: #8a8070;
    --ink-mid: #b8ab90;
    --red:     #a01818;
    --red-hi:  #e02020;
    --amber:   #d8a850;
    --paper:   #0a0a0a;
    --font-px: 'Handjet', 'VT323', monospace;
    --font-tx: 'VT323', monospace;
    --font-mn: 'JetBrains Mono', monospace;

    --pad:     clamp(10px, 2vw, 16px);
    --gap:     clamp(12px, 1.8vw, 20px);
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background: #000;
    overflow-x: clip;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overscroll-behavior-y: none;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-tx);
    font-size: clamp(15px, 1.3vw + 11px, 19px);
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: crosshair;
    animation: breathe 12s ease-in-out infinite;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

html.is-locked, body.is-locked {
    overflow: hidden !important;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    inset: 0;
    width: 100%;
}

@keyframes breathe {
    0%, 100% { filter: brightness(1.06) contrast(1.03); }
    50%      { filter: brightness(1) contrast(1.06); }
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select {
    font: inherit; color: inherit;
    background: none; border: none;
    -webkit-appearance: none; appearance: none;
    border-radius: 0; font-family: inherit;
}
button { cursor: pointer; touch-action: manipulation; }
input[type="range"] { -webkit-appearance: none; appearance: none; }

img, svg, canvas, video { max-width: 100%; height: auto; display: block; }

/* ==========================================================
   ЭФФЕКТЫ
   ========================================================== */
.fx { position: fixed; inset: 0; pointer-events: none; contain: strict; }

.fx--scanlines {
    z-index: 990;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0, transparent 2px,
        rgba(0,0,0,0.42) 3px, rgba(0,0,0,0.42) 4px
    );
    mix-blend-mode: multiply;
}

.fx--noise {
    z-index: 991;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.04) 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.035) 1px, transparent 1.5px),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.03) 1px, transparent 1.5px);
    background-size: 3px 3px, 4px 4px, 5px 5px;
    opacity: 0.5;
    animation: noiseMove 0.24s steps(3) infinite;
}
@keyframes noiseMove {
    0%   { background-position: 0 0, 0 0, 0 0; }
    33%  { background-position: -4px 2px, 3px -3px, -2px 4px; }
    66%  { background-position: 3px -3px, -2px 4px, 4px -1px; }
    100% { background-position: 0 0, 0 0, 0 0; }
}

.fx--vignette {
    z-index: 993;
    background:
        radial-gradient(ellipse 80% 70% at center,
            transparent 0%, transparent 25%,
            rgba(0,0,0,0.18) 45%,
            rgba(0,0,0,0.55) 68%,
            rgba(0,0,0,0.88) 90%,
            rgba(0,0,0,1) 100%),
        radial-gradient(ellipse 100% 100% at center,
            transparent 35%,
            rgba(40,0,0,0.3) 80%,
            rgba(70,0,0,0.55) 100%);
}

.fx--grain {
    z-index: 992;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 240px 240px;
    opacity: 0.5;
    animation: grain 0.5s steps(4) infinite;
    mix-blend-mode: overlay;
}
@keyframes grain {
    0%   { background-position: 0 0; }
    25%  { background-position: -20px 15px; }
    50%  { background-position: 15px -20px; }
    75%  { background-position: -15px -15px; }
    100% { background-position: 20px 10px; }
}

.fx--edge {
    z-index: 994;
    box-shadow:
        inset 0 0 110px 20px rgba(0,0,0,0.85),
        inset 0 0 260px 50px rgba(0,0,0,0.6);
}

.fx--glitch {
    z-index: 996;
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 0.06s;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0, transparent 32px,
            rgba(120,10,10,0.55) 32px, rgba(120,10,10,0.55) 34px,
            transparent 34px, transparent 80px
        );
}
.fx--glitch.on { opacity: 1; animation: glitchSlice 0.18s steps(2) infinite; }
@keyframes glitchSlice {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-4px); }
    100% { transform: translateY(3px); }
}

/* ==========================================================
   BOOT
   ========================================================== */
.boot {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 30px);
    transition: opacity 0.8s;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot.hidden { display: none; }
.boot__scan {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(200,200,200,0.65), transparent);
    animation: scanLine 2.2s ease-in-out infinite;
}
@keyframes scanLine {
    0%   { top: 0; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.boot__inner { max-width: 640px; width: 100%; }
.boot__log {
    font-family: var(--font-mn);
    font-size: clamp(10px, 1.1vw + 6px, 13px);
    color: #6ac06a;
    letter-spacing: 1px;
    white-space: pre-wrap;
    max-width: 100%;
    line-height: 1.75;
    text-shadow: 0 0 10px rgba(106,192,106,0.5);
    overflow-wrap: anywhere;
}

/* ==========================================================
   КАРКАС
   ========================================================== */
.shell {
    position: relative;
    z-index: 10;
    max-width: 840px;
    margin: 0 auto;
    padding: 0 var(--pad) calc(90px + var(--safe-bottom));
    animation: shellIn 1s ease-out;
}
@keyframes shellIn {
    from { opacity: 0; filter: blur(6px); }
    to   { opacity: 1; filter: none; }
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--gap);
    padding: 22px 0 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
    flex-wrap: wrap;
}
.head__left { flex: 1 1 200px; min-width: 0; }
.head__mark {
    display: block;
    font-family: var(--font-px);
    font-weight: 800;
    font-size: clamp(18px, 2.6vw, 24px);
    letter-spacing: clamp(2px, 0.5vw, 4px);
    color: #ffffff;
    text-shadow:
        2px 2px 0 rgba(224,32,32,0.85),
        0 0 30px rgba(224,32,32,0.25);
    transition: text-shadow 0.3s;
    word-break: break-word;
}
.head__mark:hover {
    text-shadow:
        3px 3px 0 rgba(255,50,50,1),
        0 0 45px rgba(255,50,50,0.6);
}
.head__sub {
    display: block;
    font-family: var(--font-mn);
    font-size: clamp(10px, 0.85vw + 7px, 12px);
    color: #c8bda6;
    letter-spacing: clamp(1px, 0.35vw, 2px);
    margin-top: 6px;
}
.head__right { display: flex; align-items: center; flex: 0 0 auto; }

.vol {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.4vw, 12px);
    padding: 6px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid #222;
}
.vol__label {
    font-family: var(--font-mn);
    font-size: clamp(10px, 0.85vw + 7px, 11px);
    letter-spacing: 2px;
    color: var(--ink-mid);
}
.vol__slider {
    -webkit-appearance: none;
    appearance: none;
    width: clamp(110px, 14vw, 140px);
    height: 44px;
    background: transparent;
    cursor: pointer;
    outline: none;
    touch-action: manipulation;
    margin: 0;
}
.vol__slider::-webkit-slider-runnable-track {
    width: 100%; height: 6px;
    background: linear-gradient(to right, var(--red-hi) 0%, var(--red-hi) var(--vol-pct, 50%), #333 var(--vol-pct, 50%), #333 100%);
    border: 1px solid #2a2a2a;
}
.vol__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px; height: 32px;
    background: var(--red-hi);
    cursor: pointer;
    box-shadow: 0 0 14px var(--red-hi), 0 0 2px #000;
    margin-top: -14px;
    border: 2px solid #f0e8d8;
}
.vol__slider::-moz-range-track {
    width: 100%; height: 6px;
    background: #333; border: 1px solid #2a2a2a;
}
.vol__slider::-moz-range-progress { height: 6px; background: var(--red-hi); }
.vol__slider::-moz-range-thumb {
    width: 22px; height: 32px;
    background: var(--red-hi);
    border: 2px solid #f0e8d8;
    cursor: pointer;
    box-shadow: 0 0 14px var(--red-hi);
}
.vol__mute {
    font-family: var(--font-mn);
    font-size: clamp(10px, 0.85vw + 7px, 11px);
    letter-spacing: 2px;
    color: var(--ink-mid);
    padding: 8px 12px;
    border: 1px solid #333;
    transition: all 0.2s;
    min-height: 40px;
    min-width: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
}
.vol__mute:hover, .vol__mute:active {
    color: var(--red-hi);
    border-color: var(--red-hi);
    background: rgba(180,30,30,0.08);
}

/* Табы */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--gap);
    border-bottom: 1px solid #2a2a2a;
    padding-left: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-track { background: #0a0a0a; }
.tabs::-webkit-scrollbar-thumb { background: #400000; }

.tab {
    position: relative;
    flex-shrink: 0;
    padding: clamp(11px, 1.4vw, 13px) clamp(13px, 1.6vw, 17px) clamp(10px, 1.3vw, 12px);
    font-family: var(--font-mn);
    font-size: clamp(10px, 0.9vw + 7px, 12px);
    letter-spacing: clamp(1px, 0.35vw, 2px);
    text-transform: uppercase;
    color: #a89c84;
    border-top: 1px solid #2a2a2a;
    border-left: 1px solid #2a2a2a;
    border-right: 1px solid #2a2a2a;
    margin-right: -1px;
    margin-bottom: -1px;
    background: #060606;
    transition: all 0.22s;
    cursor: pointer;
    white-space: nowrap;
    scroll-snap-align: start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.tab:hover, .tab:active {
    color: #f0e8d8;
    background: #100b08;
    border-color: #3a2a1a;
}
.tab.is-on {
    color: #ffffff;
    background: var(--paper);
    border-bottom-color: var(--paper);
    font-weight: 600;
}
.tab.is-on::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--red-hi);
    box-shadow: 0 0 16px rgba(224,32,32,0.9);
}

.content { min-height: 40vh; }

/* ==========================================================
   ОБЩИЙ ДОК
   ========================================================== */
.doc {
    animation: docIn 0.5s ease-out;
    padding: clamp(18px, 2.6vw, 28px) clamp(18px, 2.8vw, 32px) clamp(24px, 3.2vw, 36px);
    background: var(--paper);
    border: 1px solid #1a1a1a;
    position: relative;
    box-shadow:
        inset 0 0 60px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.02);
}
.doc::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(180,30,30,0.7), transparent);
}
@keyframes docIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.doc__title {
    font-family: var(--font-px);
    font-weight: 800;
    font-size: clamp(20px, 3.2vw, 34px);
    letter-spacing: clamp(2px, 0.6vw, 5px);
    color: #f8f0dc;
    margin-bottom: clamp(18px, 2.6vw, 26px);
    padding-bottom: clamp(12px, 1.8vw, 16px);
    border-bottom: 1px dashed #2a2a2a;
    word-break: break-word;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(180,30,30,0.2);
}
.doc__title::before {
    content: '§';
    color: var(--red-hi);
    margin-right: clamp(8px, 1.2vw, 14px);
    font-size: 0.7em;
    opacity: 0.9;
}

/* ==========================================================
   1. ЛИЧНОЕ ДЕЛО — статичное
   ========================================================== */
.doc--dossier {
    background: linear-gradient(180deg, #0c0a08 0%, #080606 100%);
    border-color: #2a1a1a;
}

.dossier__name {
    font-family: var(--font-px);
    font-weight: 800;
    font-size: clamp(22px, 3.4vw, 36px);
    line-height: 1.15;
    letter-spacing: clamp(1px, 0.4vw, 3px);
    color: #ffffff;
    text-shadow:
        2px 2px 0 rgba(180,30,30,0.85),
        0 0 30px rgba(180,30,30,0.3);
    margin-bottom: clamp(22px, 3vw, 32px);
    padding-bottom: clamp(16px, 2.2vw, 22px);
    border-bottom: 2px solid rgba(180,30,30,0.45);
}

.dossier__meta {
    display: grid;
    gap: clamp(10px, 1.6vw, 14px);
    margin-bottom: clamp(28px, 4vw, 38px);
}

.field {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: clamp(10px, 1.8vw, 20px);
    align-items: baseline;
    padding-bottom: clamp(8px, 1.2vw, 12px);
    border-bottom: 1px dashed #1c1c1c;
}
.field--wide {
    grid-template-columns: 1fr;
    gap: 6px;
}

.field__label {
    font-family: var(--font-mn);
    font-size: clamp(10px, 0.85vw + 7px, 12px);
    letter-spacing: 2px;
    color: var(--ink-dim);
    text-transform: uppercase;
    line-height: 1.3;
}
.field__value {
    font-family: var(--font-tx);
    font-size: clamp(15px, 1.3vw + 11px, 18px);
    color: #e0d8c6;
    line-height: 1.55;
}

.dossier__section {
    font-family: var(--font-px);
    font-weight: 600;
    font-size: clamp(14px, 1.8vw, 20px);
    letter-spacing: clamp(2px, 0.5vw, 4px);
    color: var(--amber);
    text-transform: uppercase;
    padding: clamp(6px, 1vw, 8px) 0 clamp(6px, 1vw, 8px) clamp(12px, 1.8vw, 16px);
    margin-bottom: clamp(20px, 3vw, 28px);
    border-left: 3px solid var(--amber);
    background: rgba(216,168,80,0.04);
}

.dossier__body {
    display: grid;
    gap: clamp(18px, 2.6vw, 26px);
}

.dossier__body p {
    font-family: var(--font-tx);
    font-size: clamp(15px, 1.3vw + 11px, 18px);
    line-height: 1.75;
    color: #d0c8b8;
    padding-left: clamp(0px, 1.5vw, 14px);
    border-left: 1px solid transparent;
    transition: border-left-color 0.3s;
}
.dossier__body p:hover {
    border-left-color: rgba(180,30,30,0.4);
}

.dossier__final {
    color: #f0b8b8 !important;
    border-left: 2px solid var(--red-hi) !important;
    padding-left: clamp(10px, 1.8vw, 18px) !important;
    background: rgba(180,30,30,0.04);
    padding-top: clamp(10px, 1.4vw, 14px);
    padding-bottom: clamp(10px, 1.4vw, 14px);
    padding-right: clamp(10px, 1.6vw, 16px);
}

/* ==========================================================
   2. ПЕРЕПИСКА — по клику
   ========================================================== */
.doc--dialog {
    background: linear-gradient(180deg, #080808 0%, #060404 100%);
    border-color: #2a1a1a;
}

.doc--dialog .doc__title {
    color: #f0e8d8;
    text-shadow: 0 0 24px rgba(224,32,32,0.35);
}

.scene {
    font-style: italic;
    color: var(--ink-mid);
    font-family: var(--font-tx);
    font-size: clamp(14px, 1.2vw + 10px, 17px);
    line-height: 1.7;
    padding: clamp(14px, 2vw, 18px) clamp(16px, 2.2vw, 20px);
    margin: clamp(22px, 3.2vw, 30px) 0;
    background: rgba(255,255,255,0.02);
    border-left: 2px solid #3a3a3a;
    position: relative;
}
.scene::before {
    content: '◈';
    position: absolute;
    left: -1px;
    top: clamp(14px, 2vw, 18px);
    transform: translateX(-50%);
    color: var(--amber);
    background: var(--paper);
    font-size: 11px;
    width: 16px;
    text-align: center;
    font-style: normal;
}

.scene--final {
    border-left-color: var(--red-hi);
    background: rgba(180,30,30,0.04);
    color: #e8d8c0;
}
.scene--final::before { color: var(--red-hi); }

.chat {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.4vw, 14px);
    margin: clamp(22px, 3.2vw, 30px) 0;
    padding: clamp(14px, 2vw, 18px) clamp(16px, 2.2vw, 22px);
    border-left: 3px solid var(--red-hi);
    background: rgba(180,30,30,0.035);
    position: relative;
}
.chat::before {
    content: 'стенограмма';
    position: absolute;
    top: -9px;
    left: 16px;
    font-family: var(--font-mn);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--red-hi);
    background: var(--paper);
    padding: 0 6px;
    text-transform: uppercase;
    opacity: 0.85;
}

.chat__line {
    font-family: var(--font-tx);
    font-size: clamp(15px, 1.3vw + 11px, 18px);
    line-height: 1.6;
    color: #f0e8d8;
    padding: 3px 0;
}

/* ==========================================================
   3. МОТИВАЦИЯ — статичная
   ========================================================== */
.doc--motivation {
    background: linear-gradient(180deg, #0a0806 0%, #060504 100%);
    border-color: #1c1a1a;
}

.doc--motivation .doc__title { color: #e8dfcc; }

.motivation {
    display: grid;
    gap: clamp(22px, 3.2vw, 32px);
    padding-left: clamp(0px, 2vw, 18px);
}

.motivation p {
    font-family: var(--font-tx);
    font-size: clamp(15px, 1.3vw + 11px, 19px);
    line-height: 1.8;
    color: #d0c8b8;
    padding-left: clamp(14px, 2vw, 20px);
    border-left: 1px solid #222;
    position: relative;
    transition: all 0.3s;
}
.motivation p::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 12px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #333;
    transition: all 0.3s;
}
.motivation p:hover {
    border-left-color: rgba(180,30,30,0.5);
}
.motivation p:hover::before {
    background: var(--red-hi);
    box-shadow: 0 0 8px var(--red-hi);
}

.motivation__lead {
    color: #f0e0d0;
    font-size: clamp(16px, 1.4vw + 11px, 20px) !important;
    border-left-color: rgba(216,168,80,0.5) !important;
}
.motivation__lead::before {
    background: var(--amber) !important;
    box-shadow: 0 0 8px rgba(216,168,80,0.6) !important;
}

.motivation__final {
    color: #ffffff;
    font-family: var(--font-px);
    font-weight: 600;
    font-size: clamp(15px, 1.4vw, 22px) !important;
    letter-spacing: 1px;
    line-height: 1.55 !important;
    padding-top: clamp(14px, 2vw, 20px) !important;
    padding-bottom: clamp(14px, 2vw, 20px) !important;
    padding-right: clamp(14px, 2vw, 18px) !important;
    border-left: 3px solid var(--red-hi) !important;
    background: rgba(180,30,30,0.05);
    text-shadow: 1px 1px 0 rgba(180,30,30,0.6);
    margin-top: clamp(6px, 1vw, 10px);
}
.motivation__final::before {
    background: var(--red-hi) !important;
    box-shadow: 0 0 12px var(--red-hi) !important;
    top: 22px !important;
}

/* ==========================================================
   4. ЛИЧНЫЕ ПОДЦЕЛИ — статичные
   ========================================================== */
.doc--goals {
    background: linear-gradient(180deg, #0a0a0a 0%, #070505 100%);
    border-color: #2a1a1a;
}

.goals {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: clamp(16px, 2.4vw, 22px);
}

.goal {
    display: grid;
    grid-template-columns: clamp(50px, 5.5vw, 68px) 1fr;
    gap: clamp(14px, 2vw, 22px);
    padding: clamp(16px, 2.2vw, 22px) clamp(16px, 2.2vw, 22px);
    border: 1px solid #1c1c1c;
    background: #060606;
    position: relative;
    transition: all 0.3s;
    align-items: center;
}
.goal::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #333;
    transition: all 0.3s;
}
.goal:hover {
    border-color: #2a1a1a;
    background: #080505;
    transform: translateX(2px);
}
.goal:hover::before {
    background: var(--red-hi);
    box-shadow: 0 0 12px var(--red-hi);
}

.goal__num {
    font-family: var(--font-mn);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--red-hi);
    line-height: 1;
    text-shadow: 0 0 12px rgba(224,32,32,0.5);
    transition: all 0.3s;
    text-align: center;
}
.goal:hover .goal__num {
    color: #fff;
    text-shadow: 0 0 16px var(--red-hi);
}

.goal__body {
    display: grid;
    gap: clamp(6px, 1vw, 10px);
    min-width: 0;
}

.goal__main {
    font-family: var(--font-tx);
    font-size: clamp(15px, 1.3vw + 11px, 18px);
    line-height: 1.6;
    color: #e0d8c6;
}

/* ==========================================================
   HINT BAR
   ========================================================== */
.hint-bar {
    position: fixed;
    bottom: calc(14px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.88);
    border: 1px solid #2a2a2a;
    font-family: var(--font-mn);
    font-size: clamp(9px, 0.8vw + 6px, 11px);
    letter-spacing: 2px;
    color: var(--ink-mid);
    text-transform: uppercase;
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.4s;
    opacity: 0;
}
.hint-bar.show { opacity: 1; }
.hint-bar__dot {
    width: 6px;
    height: 6px;
    background: var(--red-hi);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--red-hi);
    animation: blink 1.6s infinite;
    flex-shrink: 0;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}

/* ==========================================================
   FOOT
   ========================================================== */
.foot {
    margin-top: clamp(28px, 4vw, 40px);
    padding-top: 16px;
    border-top: 1px solid #222;
    text-align: center;
    font-family: var(--font-mn);
    font-size: clamp(10px, 0.85vw + 7px, 11px);
    letter-spacing: clamp(2px, 0.5vw, 3px);
    color: #5a544a;
    line-height: 1.5;
}

/* ==========================================================
   ПЕЧАТАЮЩИЙСЯ ТЕКСТ (только в разговоре)
   ========================================================== */
.print {
    white-space: pre-wrap;
    word-break: break-word;
    cursor: pointer;
    transition: color 0.2s;
}
.print:not(.started) {
    min-height: 1.6em;
}
.typing::after {
    content: '▌';
    color: var(--red-hi);
    animation: cursorBlink 0.7s infinite;
    margin-left: 2px;
    text-shadow: 0 0 8px var(--red-hi);
    font-family: var(--font-mn);
}
@keyframes cursorBlink {
    0%, 45%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.print.done { cursor: default; }

/* ==========================================================
   АДАПТИВ
   ========================================================== */
@media (max-width: 720px) {
    body { font-size: 16px; }

    .head { padding: 16px 0 12px; gap: 10px; }
    .head__left { flex: 1 1 100%; }
    .head__right { flex: 1 1 100%; }
    .head__mark { font-size: 18px; }
    .head__sub { font-size: 11px; }

    .vol {
        width: 100%;
        padding: 8px 12px;
        justify-content: space-between;
        gap: 12px;
    }
    .vol__label { font-size: 11px; }
    .vol__slider { flex: 1 1 auto; width: auto; min-width: 0; height: 48px; }
    .vol__slider::-webkit-slider-thumb { width: 24px; height: 34px; margin-top: -15px; }
    .vol__mute { min-height: 44px; padding: 10px 14px; }

    .tab { padding: 12px 14px 11px; min-height: 46px; }

    .field { grid-template-columns: 1fr; gap: 4px; }

    .goal {
        grid-template-columns: 44px 1fr;
        gap: 12px;
        padding: 14px 14px;
    }
    .goal__num { font-size: 22px; }

    .hint-bar {
        font-size: 10px;
        padding: 7px 12px;
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 480px) {
    :root { --pad: 10px; --gap: 12px; }
    body { font-size: 15px; }
    .tabs { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
    .tab { padding: 11px 11px 10px; font-size: 10px; letter-spacing: 1px; }

    .doc { padding: 16px 16px 22px; }
    .doc__title { letter-spacing: 3px; }
    .dossier__name { font-size: clamp(20px, 6vw, 26px); }

    .chat { padding: 12px 12px; }
    .scene { padding: 12px 14px; }

    .motivation p { padding-left: 12px; }
    .motivation__final { font-size: 15px; padding: 12px 12px; }
}

@media (min-width: 1800px) {
    :root { --pad: 24px; }
    .shell { max-width: 940px; }
}

@media (min-width: 2400px) {
    body { font-size: 21px; }
    .shell { max-width: 1080px; }
    .head__mark { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.05s !important;
    }
    .fx--noise, .fx--grain, .fx--scanlines { animation: none !important; opacity: 0.2 !important; }
    .fx--glitch { display: none; }
    body { animation: none; }
}

@media (max-width: 720px), (pointer: coarse) {
    .fx--grain { opacity: 0.3; animation-duration: 0.8s; }
    .fx--noise { opacity: 0.3; animation-duration: 0.4s; }
    .fx--edge {
        box-shadow:
            inset 0 0 60px 10px rgba(0,0,0,0.8),
            inset 0 0 160px 30px rgba(0,0,0,0.5);
    }
}

@media print {
    .fx, .boot, .tabs, .head__right, .vol, .hint-bar { display: none !important; }
    body { background: #fff; color: #000; }
}