:root {
    --bg-dark: #04070c;
    --border-subtle: rgba(56, 139, 253, 0.16);
    --border-bright: rgba(88, 166, 255, 0.42);
    --accent-blue: #58a6ff;
    --accent-amber: #e3b341;
    --accent-red: #f85149;
    --accent-green: #3fb950;
    --accent-purple: #bc8cff;
    --accent-teal: #39d353;
    --text-main: #e6edf3;
    --text-muted: #8b949e;

    --vignette-intensity: 0.25;
    --blur-amount: 0px;
    --saturation: 100%;
    --brightness: 100%;
    --contrast: 100%;
    --red-tint: 0;
    --cold-tint: 0;
    --dawn-tint: 0;
    --tunnel-radius: 95%;
    --shake-x: 0px;
    --shake-y: 0px;
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    overflow: hidden;
}

#viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    transform: translate(var(--shake-x), var(--shake-y));
}

/* ==================== ВЕРХНИЙ HUD ==================== */
#hud-top {
    height: 74px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(9, 14, 21, 0.98) 0%, rgba(9, 14, 21, 0.92) 100%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 14px;
    z-index: 30;
}

.hud-left, .hud-center, .hud-right { display: flex; align-items: center; gap: 12px; }

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    background: rgba(63, 185, 80, 0.08);
    border: 1px solid rgba(63, 185, 80, 0.35);
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--accent-green);
    min-width: 145px;
    transition: all 0.25s ease;
}
.status-badge.warn { background: rgba(227, 179, 65, 0.12); border-color: rgba(227, 179, 65, 0.55); color: var(--accent-amber); }
.status-badge.alert { background: rgba(248, 81, 73, 0.14); border-color: rgba(248, 81, 73, 0.7); color: var(--accent-red); box-shadow: 0 0 18px rgba(248, 81, 73, 0.25); }
.status-badge.purple { background: rgba(188, 140, 255, 0.14); border-color: rgba(188, 140, 255, 0.6); color: var(--accent-purple); }
.status-badge.cold { background: rgba(88, 166, 255, 0.14); border-color: rgba(88, 166, 255, 0.6); color: var(--accent-blue); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: blink 1.4s infinite ease-in-out; }

.resilience-module {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 145px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.ecg-module {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(5, 9, 14, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 5px 10px;
    height: 52px;
}

.bpm-box { display: flex; flex-direction: column; min-width: 70px; }
#ecg-canvas { width: 155px; height: 40px; display: block; }

.metric-group { display: flex; flex-direction: column; gap: 4px; width: 92px; }
.metric-header { display: flex; justify-content: space-between; align-items: baseline; }
.metric-label { font-size: 8.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; }
.metric-mini { font-size: 10.5px; font-weight: bold; color: var(--text-main); }

.metric-value { font-size: 19px; font-weight: 800; color: var(--accent-green); line-height: 1.1; }
.metric-value small { font-size: 9.5px; font-weight: normal; opacity: 0.7; }

.bar-container {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill { height: 100%; width: 15%; background: var(--accent-green); transition: width 0.12s linear, background-color 0.2s ease; }
.bar-fill.resilience { width: 100%; background: linear-gradient(90deg, #2ea043, #58a6ff); }
.bar-fill.tension { background: var(--accent-amber); }
.bar-fill.grounding { width: 92%; background: var(--accent-blue); }
.bar-fill.stamina { width: 100%; background: #3fb950; }

.timer-box { display: flex; flex-direction: column; align-items: flex-end; min-width: 75px; }
.metric-value.timer { color: #fff; font-size: 21px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }

.utility-btns { display: flex; gap: 5px; }
.util-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 10.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.util-btn:hover, .util-btn.active-pause { color: #fff; border-color: var(--accent-blue); background: rgba(88, 166, 255, 0.16); }
.util-btn.large-util { padding: 13px 24px; font-size: 13px; }

/* ==================== СЦЕНА (Строго 1:1 с курсором!) ==================== */
#scene-container {
    position: relative;
    flex: 1;
    background: #030508;
    overflow: hidden;
}

canvas#view-canvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: saturate(var(--saturation)) blur(var(--blur-amount)) brightness(var(--brightness)) contrast(var(--contrast));
}

#fx-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent calc(var(--tunnel-radius) * 0.4), rgba(0, 0, 0, var(--vignette-intensity)) var(--tunnel-radius)),
        radial-gradient(ellipse at center, transparent 52%, rgba(120, 195, 255, var(--cold-tint)) 100%),
        radial-gradient(ellipse at top right, rgba(255, 200, 110, var(--dawn-tint)) 0%, transparent 65%),
        rgba(220, 38, 38, var(--red-tint));
    z-index: 3;
}

#freeze-strips {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    z-index: 4;
}
.freeze-strip {
    flex: 1;
    width: 100%;
    backdrop-filter: grayscale(100%) contrast(108%);
    -webkit-backdrop-filter: grayscale(100%) contrast(108%);
    background: rgba(12, 15, 20, 0.18);
    transition: opacity 0.65s ease;
}
.freeze-strip.cleared { opacity: 0; }

#tears-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: radial-gradient(circle at 50% 60%, rgba(120, 180, 255, 0.08), rgba(40, 80, 130, 0.22));
    z-index: 4;
    transition: opacity 0.5s ease;
}

#blackout-flash {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 40;
    transition: opacity 0.15s ease;
}

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.11) 0px, rgba(0,0,0,0.11) 1px, transparent 1px, transparent 3px);
    opacity: 0.22;
    z-index: 5;
}

.visor-corner { position: absolute; width: 20px; height: 20px; border-color: rgba(88, 166, 255, 0.22); border-style: solid; pointer-events: none; z-index: 6; }
.visor-corner.tl { top: 12px; left: 12px; border-width: 2px 0 0 2px; }
.visor-corner.tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.visor-corner.bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; }
.visor-corner.br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }

#hover-prompt {
    position: absolute;
    pointer-events: none;
    background: rgba(9, 14, 22, 0.94);
    border: 1px solid rgba(121, 192, 255, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    z-index: 26;
    transform: translate(-50%, -135%);
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.75);
}

#sector-alerts {
    position: absolute;
    top: 16px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 15;
    pointer-events: none;
}

.sector-chip {
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(248, 81, 73, 0.16);
    border: 1px solid rgba(248, 81, 73, 0.55);
    color: #ffdcd7;
    font-size: 10.5px;
    font-weight: bold;
    backdrop-filter: blur(6px);
}
.sector-chip.bunker { background: rgba(88, 166, 255, 0.14); border-color: rgba(88, 166, 255, 0.5); color: #cfe8ff; }
.sector-chip.confronted { background: rgba(63, 185, 80, 0.14); border-color: rgba(63, 185, 80, 0.5); color: #aff5b4; }

.glass-panel {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(9, 13, 19, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 11px 22px;
    border-radius: 8px;
    text-align: center;
    pointer-events: none;
    z-index: 17;
    max-width: min(600px, 56vw);
    line-height: 1.45;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

#dilemma-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(490px, 86vw);
    background: rgba(10, 15, 24, 0.96);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    padding: 20px 24px;
    z-index: 32;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    text-align: center;
}
.dilemma-tag { font-size: 9.5px; letter-spacing: 2px; color: var(--accent-amber); font-weight: bold; margin-bottom: 6px; }
#dilemma-card h2 { font-size: 18px; color: #fff; margin-bottom: 8px; }
#dilemma-desc { font-size: 12.5px; color: #c9d1d9; line-height: 1.5; margin-bottom: 16px; }
.dilemma-choices { display: flex; flex-direction: column; gap: 8px; }
.dilemma-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.12s ease;
}
.dilemma-btn:hover { background: rgba(88, 166, 255, 0.18); border-color: var(--accent-blue); }
.dilemma-btn.risk { border-left: 3px solid var(--accent-amber); }
.dilemma-btn.safe { border-left: 3px solid var(--accent-blue); }

#trap-banner {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 22, 10, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(227, 179, 65, 0.55);
    color: #ffe8a3;
    padding: 8px 20px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: bold;
    display: none;
    z-index: 16;
    text-align: center;
    max-width: 68vw;
}

#falling-thoughts-layer { position: absolute; inset: 0; pointer-events: none; z-index: 12; overflow: hidden; }
.falling-thought {
    position: absolute;
    font-size: 13.5px;
    font-weight: bold;
    color: rgba(255, 165, 165, 0.85);
    background: rgba(20, 8, 10, 0.72);
    border: 1px solid rgba(248, 81, 73, 0.45);
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

#popup-layer { position: absolute; inset: 0; pointer-events: none; z-index: 22; }
.paranoia-popup {
    position: absolute;
    pointer-events: auto;
    width: 240px;
    background: rgba(14, 19, 28, 0.95);
    border: 1px solid rgba(248, 81, 73, 0.75);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    animation: popIn 0.18s ease-out;
}
.popup-bar { background: rgba(248, 81, 73, 0.25); padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; font-weight: bold; color: #ffdcd7; }
.popup-close { background: none; border: none; color: #fff; font-weight: bold; cursor: pointer; padding: 0 4px; font-size: 13px; }
.popup-body { padding: 8px 10px; font-size: 11px; color: #e6edf3; line-height: 1.35; }
.popup-ms { font-size: 10px; color: var(--accent-amber); margin-top: 4px; font-variant-numeric: tabular-nums; }

#dynamic-traps-layer { position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; z-index: 24; }
.trap-btn-giant {
    background: linear-gradient(135deg, rgba(218, 54, 51, 0.94), rgba(140, 22, 22, 0.96));
    border: 2px solid #ff9b95;
    color: #fff;
    padding: 13px 28px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(248, 81, 73, 0.65);
    animation: pulse-red 0.65s infinite alternate;
}
.trap-btn-memory {
    background: rgba(25, 35, 52, 0.94);
    border: 1.5px solid #79c0ff;
    color: #cfe8ff;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}
.trap-btn-memory:hover { background: rgba(248, 81, 73, 0.45); border-color: #ff7b72; }

.interactive-widget {
    position: absolute;
    bottom: 66px;
    left: 50%;
    transform: translateX(-50%);
    width: 460px;
    background: rgba(9, 14, 22, 0.96);
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    padding: 14px 18px;
    z-index: 25;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.interactive-widget.breathing-active {
    border-color: #7ee787;
    box-shadow: 0 0 28px rgba(63, 185, 80, 0.45);
}
.widget-title { font-size: 10px; letter-spacing: 1.4px; color: var(--accent-blue); font-weight: bold; margin-bottom: 5px; }
.breath-phase { font-size: 13px; font-weight: bold; color: #fff; margin-bottom: 9px; }
.breath-track { position: relative; width: 100%; height: 16px; background: rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.breath-zone { position: absolute; top: 0; bottom: 0; left: 62%; width: 30%; background: rgba(63,185,80,0.38); border-left: 2px solid #3fb950; border-right: 2px solid #3fb950; z-index: 2; }
.breath-bar { position: relative; z-index: 1; height: 100%; width: 0%; background: linear-gradient(90deg, #388bfd, #79c0ff); }
.lag-widget { border-color: var(--accent-purple); width: 340px; cursor: default; }
.lag-bar { background: linear-gradient(90deg, #8957e5, #bc8cff); }
.stillness-widget { border-color: var(--accent-green); width: 380px; cursor: default; }
.stillness-bar { background: linear-gradient(90deg, #238636, #3fb950); }
.widget-sub { font-size: 10.5px; color: var(--text-muted); margin-bottom: 8px; }
.breath-touch-btn { background: rgba(88,166,255,0.2); border: 1px solid var(--accent-blue); color: #fff; padding: 8px 18px; border-radius: 5px; font-family: inherit; font-size: 11px; font-weight: bold; cursor: pointer; }
.interactive-widget.breathing-active .breath-touch-btn { background: rgba(63, 185, 80, 0.35); border-color: #3fb950; }

#pause-overlay { position: absolute; inset: 0; background: rgba(4,7,12,0.45); z-index: 28; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.pause-pill { background: rgba(13,18,26,0.95); border: 1px solid var(--accent-blue); color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 13px; font-weight: bold; }

/* ==================== НИЖНЯЯ ПАНЕЛЬ ДЕЙСТВИЙ ==================== */
#hud-bottom {
    flex-shrink: 0;
    background: linear-gradient(0deg, rgba(7, 11, 16, 0.99) 0%, rgba(12, 17, 25, 0.95) 100%);
    border-top: 1px solid var(--border-subtle);
    padding: 12px 18px 16px;
    z-index: 30;
}

.deck-grid { display: grid; grid-template-columns: 5fr 3fr 4fr; gap: 10px; max-width: 1680px; margin: 0 auto; }
.deck-section { display: flex; flex-direction: column; gap: 6px; }
.section-title { font-size: 9.5px; font-weight: bold; text-transform: uppercase; letter-spacing: 1.2px; padding-left: 4px; }
.somatics-section .section-title { color: var(--accent-blue); }
.behavior-section .section-title { color: var(--accent-teal); }
.cognition-section .section-title { color: var(--accent-amber); }

.btn-row { display: flex; gap: 6px; height: 64px; }

button.action-btn {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.12s ease;
    overflow: hidden;
}
button.action-btn:hover:not(.on-cooldown):not(.disabled-sleep) { background: rgba(255,255,255,0.085); border-color: rgba(255,255,255,0.28); transform: translateY(-2px); }
button.action-btn.on-cooldown, button.action-btn.disabled-sleep { opacity: 0.35; cursor: not-allowed; }
button.action-btn.mind-scrambled .btn-title { filter: blur(1.4px); letter-spacing: 2px; color: #8b949e; }

.stack-dots { position: absolute; bottom: 4px; right: 6px; font-size: 8px; letter-spacing: 2px; color: var(--accent-blue); z-index: 2; }
.cd-overlay { position: absolute; bottom: 0; left: 0; height: 100%; width: 0%; background: rgba(88,166,255,0.13); pointer-events: none; }
.btn-title { font-size: 11px; font-weight: 700; line-height: 1.15; padding-right: 16px; z-index: 1; transition: filter 0.2s; }
.btn-sub { font-size: 8.5px; color: var(--text-muted); margin-top: 3px; z-index: 1; }
button.action-btn .keybind {
    position: absolute; top: 5px; right: 5px; font-size: 9.5px; font-weight: bold;
    padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,0.45);
    color: var(--text-muted); border: 1px solid rgba(255,255,255,0.08); z-index: 1;
}

.somatics-btn { border-left: 3px solid var(--accent-blue) !important; }
.behavior-btn { border-left: 3px solid var(--accent-teal) !important; }
.cognition-btn { border-left: 3px solid var(--accent-amber) !important; }
.impulse-btn { border-left: 3px solid var(--accent-red) !important; background: rgba(248, 81, 73, 0.07) !important; }
.impulse-btn.tempting { animation: pulse-red 0.75s infinite alternate; }

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.overlay-screen { position: absolute; inset: 0; background: rgba(4,7,12,0.92); backdrop-filter: blur(14px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { max-width: 880px; width: 100%; background: rgba(13,18,26,0.96); border: 1px solid var(--border-bright); border-radius: 12px; padding: 26px 34px; text-align: center; box-shadow: 0 25px 70px rgba(0,0,0,0.85); }
.modal-tag { font-size: 11px; letter-spacing: 2.5px; color: var(--accent-blue); margin-bottom: 8px; font-weight: bold; }
.modal-card h1 { font-size: 28px; letter-spacing: 3px; color: #fff; margin-bottom: 10px; }
.modal-lead { font-size: 13px; line-height: 1.55; color: var(--text-muted); margin-bottom: 16px; }

.mode-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.mode-card { text-align: left; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 13px 15px; cursor: pointer; transition: all 0.15s ease; }
.mode-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(88,166,255,0.45); }
.mode-card.active { background: rgba(88,166,255,0.1); border-color: var(--accent-blue); box-shadow: 0 0 20px rgba(88,166,255,0.18); }
.mode-badge { display: inline-block; font-size: 9.5px; font-weight: bold; padding: 2px 7px; border-radius: 3px; background: rgba(88,166,255,0.2); color: var(--accent-blue); margin-bottom: 5px; }
.mode-badge.acute { background: rgba(248,81,73,0.2); color: #ff7b72; }
.mode-title { font-size: 14px; font-weight: bold; color: #fff; margin-bottom: 4px; }
.mode-desc { font-size: 11px; line-height: 1.4; color: var(--text-muted); }

.theory-box { text-align: left; background: rgba(6,9,15,0.85); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; font-size: 12px; line-height: 1.5; color: #c9d1d9; }
.theory-box li { margin-bottom: 7px; margin-left: 16px; }
.theory-box li:last-child { margin-bottom: 0; }
.theory-box b { color: var(--accent-blue); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.stat-tile { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 12px; }
.stat-tile-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.stat-tile-val { font-size: 20px; font-weight: bold; color: #fff; margin-top: 4px; }
.end-actions { display: flex; gap: 12px; justify-content: center; }

.start-btn { background: linear-gradient(135deg, #238636 0%, #2ea043 100%); color: #fff; border: none; padding: 13px 34px; font-size: 13.5px; font-weight: bold; letter-spacing: 1.5px; border-radius: 6px; cursor: pointer; font-family: inherit; box-shadow: 0 6px 20px rgba(35,134,54,0.4); }
.start-btn:hover { transform: translateY(-2px); }

@keyframes popIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse-red { from { box-shadow: 0 0 8px rgba(248,81,73,0.35); } to { box-shadow: 0 0 26px rgba(248,81,73,0.9); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

@media (max-width: 1260px) {
    .metric-group { width: 76px; }
    .resilience-module { width: 115px; }
    #ecg-canvas { width: 105px; }
    .deck-grid { grid-template-columns: 1fr; gap: 6px; }
    .btn-row { height: 48px; }
}