﻿@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Share Tech Mono';
    src: url('../fonts/ShareTechMono-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.page-wrapper {
    position: relative;
    min-height: 100vh;
    background: #ffffff;
}

.page-wrapper.timeout-halted,
.page-wrapper.timeout-halted * {
    animation-play-state: paused !important;
}

:root {
    --top-nav-height: clamp(52px, 7.5vh, 72px);
    --top-nav-side-pad: clamp(10px, 2.2vw, 24px);
    --top-nav-icon-size: clamp(38px, 5vw, 48px);
    --console-btn-border: 2px;
    --console-btn-text: #ffffff;
    --console-btn-bg: rgba(0, 0, 0, 0.66);
    --console-btn-bg-hover: rgba(0, 0, 0, 0.72);
    --console-btn-glow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 18px rgba(255, 255, 255, 0.18);
    --console-btn-letter: 0.14em;
}


.intro {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
}

.intro-1 {
    animation: introSequence 2.5s ease-in-out forwards;
}


.intro-2 {
    transition: opacity 0.75s ease-in-out;
}

.intro-2.is-visible {
    opacity: 1;
}

.intro-2.is-hidden {
    opacity: 0;
}

.intro-2 .intro-logo {
    width: 50vmin;
    min-width: 200px;
    max-height: 50vh;
    transform: translateY(clamp(-28px, -2.2vh, -12px));
}

.intro-gate {
    position: fixed;
    left: 50%;
    top: calc(50% + clamp(170px, 26vmin, 260px));
    transform: translateX(-50%);
    z-index: 2050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.intro-gate.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.intro-gate .ui-console-btn--hero {
    width: min(78vw, 420px);
}

.intro-logo {
    width: 20vmin;
    min-width: 120px;
    height: auto;
    max-height: 20vh;
    object-fit: contain;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.65));
}

.intro-text {
    font-size: 0.9rem;
    color: #555555;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

@keyframes introSequence {
    
    0%   { opacity: 0; }
    30%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}


.transition-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #000000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: none;
}

.page-wrapper.flow-started .transition-overlay {
    animation: expandOverlay 1.5s ease-out forwards;
}

@keyframes expandOverlay {
    0% {
        width: 0;
        height: 0;
        border-radius: 50%;
    }
    100% {
        width: 300vmax;
        height: 300vmax;
        border-radius: 50%;
        
    }
}


.main-content {
    opacity: 0;
    position: relative;
    z-index: 1100;
    min-height: 100vh;
    background: #000000;
    padding: clamp(20px, 4vh, 48px) 0;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(320px, 33vw) minmax(120px, 1fr);
    align-items: center;
    column-gap: clamp(24px, 3vw, 58px);
    overflow: hidden;
    animation: none;
    pointer-events: none;
}

.page-wrapper.flow-started .main-content {
    animation: fadeInContent 0.3s ease-out 0.75s forwards;
    pointer-events: auto;
}

@keyframes fadeInContent {
    to {
        opacity: 1;
    }
}

.hud-boot {
    position: fixed;
    inset: clamp(14px, 2.6vw, 36px);
    display: grid;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease-out, visibility 0.45s ease-out;
    z-index: 1;
    visibility: hidden;
}

.hud-boot.is-visible {
    opacity: 1;
    visibility: visible;
}

.hud-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hud-wrap svg,
.hud-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
}

.hud {
    opacity: 0;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.18))
            drop-shadow(0 0 14px rgba(255, 255, 255, 0.08));
    transition: opacity 0.3s ease-out;
}

.hud-boot.is-visible .hud {
    opacity: 1;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-nav-height);
    padding: 0 var(--top-nav-side-pad);
    display: grid;
    grid-template-columns: var(--top-nav-icon-size) 1fr var(--top-nav-icon-size);
    align-items: center;
    z-index: 3;
    color: #ffffff;
    background: transparent;
    pointer-events: none;
}

.top-nav-btn {
    width: var(--top-nav-icon-size);
    height: var(--top-nav-icon-size);
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    padding: 0;
}

.top-nav-btn svg {
    width: 72%;
    height: 72%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.top-nav-center {
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.top-nav-timer {
    color: #ffffff;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(1.08rem, 2.2vw, 1.62rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.22);
}

.top-nav-timer.is-warning {
    color: #ff9f1a;
    text-shadow: 0 0 8px rgba(255, 159, 26, 0.34);
}

.top-nav-timer.is-danger {
    color: #ff3b30;
    text-shadow: 0 0 8px rgba(255, 59, 48, 0.38);
}

body.cam-popup-open,
body.terminal-popup-open,
body.stabilizer-popup-open,
body.energy-popup-open,
body.launch-route-popup-open,
body.launch-surveillance-popup-open {
    overflow: hidden;
}

.cam-popup {
    position: fixed;
    inset: 0;
    z-index: 3850;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cam-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cam-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(1px);
}

.cam-popup-panel {
    position: relative;
    width: min(94vw, 960px);
    padding: clamp(10px, 1.8vh, 20px);
    display: grid;
    justify-items: center;
    gap: clamp(8px, 1.1vh, 14px);
    transform: translateY(8px) scale(0.985);
    opacity: 0.98;
    transition: transform 0.24s ease;
}

.cam-popup.is-open .cam-popup-panel {
    transform: translateY(0) scale(1);
}

.cam-popup-close {
    position: absolute;
    top: 15px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.66);
    color: #ffffff;
    font-family: "Share Tech Mono", "Consolas", "Courier New", monospace;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.cam-popup-close:hover,
.cam-popup-close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.cam-feed-frame {
    width: min(88vw, 860px);
    aspect-ratio: 16 / 10;
    border: 3px solid #ffffff;
    padding: clamp(6px, 1vw, 10px);
    background: #000000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26), 0 0 28px rgba(255, 255, 255, 0.12);
}

.cam-feed {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000000;
}

.cam-feed::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 90, 90, 0.16), transparent 40%, rgba(90, 120, 255, 0.16));
    opacity: 0;
    mix-blend-mode: screen;
}

.cam-feed img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

.cam-main {
    filter: contrast(1.12) saturate(0.82) brightness(0.95);
    animation: camFrameJitter 10s linear infinite;
}

.cam-ghost {
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
}

.cam-ghost-a {
    filter: hue-rotate(-15deg) saturate(1.45);
    animation: camGhostA 8.2s steps(2, end) infinite;
}

.cam-ghost-b {
    filter: hue-rotate(15deg) saturate(1.45);
    animation: camGhostB 9.4s steps(2, end) infinite;
}

.cam-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.07) 0 1px,
            rgba(0, 0, 0, 0.16) 1px 3px
        );
    mix-blend-mode: soft-light;
    opacity: 0.46;
}

.cam-noise {
    position: absolute;
    inset: -10%;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.22) 0.7px, transparent 0.7px);
    background-size: 3px 3px;
    mix-blend-mode: screen;
    opacity: 0.07;
    animation: camNoise 0.28s steps(4, end) infinite;
}

.cam-interference {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            transparent 0 28%,
            rgba(255, 255, 255, 0.16) 28% 42%,
            transparent 42% 100%
        );
    opacity: 0;
    transform: translateY(-125%);
    animation: camInterference 10s linear infinite;
}

.cam-popup.is-switching .cam-feed::after {
    animation: camSwitchFlash 0.58s steps(3, end) 1;
}

.cam-popup.is-switching .cam-main {
    filter: contrast(1.2) saturate(0.78) brightness(0.9);
}

.cam-popup.is-switching .cam-interference {
    opacity: 0.32;
    transform: translateY(16%);
}

@keyframes camNoise {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2%, 1%); }
    50% { transform: translate(1%, -1%); }
    75% { transform: translate(2%, 0); }
    100% { transform: translate(0, 0); }
}

@keyframes camFrameJitter {
    0%, 56%, 74%, 100% { transform: translate(0, 0) scale(1.005); }
    60% { transform: translate(-1px, 0) scale(1.008); }
    62% { transform: translate(1px, 0) scale(1.006); }
    78% { transform: translate(0, -1px) scale(1.01); }
    80% { transform: translate(-1px, 1px) scale(1.004); }
}

@keyframes camGhostA {
    0%, 58% { opacity: 0; transform: translate(0, 0); }
    59%, 64% { opacity: 0.22; transform: translate(-4px, 0); }
    66% { opacity: 0.08; transform: translate(3px, -2px); }
    68%, 100% { opacity: 0; transform: translate(0, 0); }
}

@keyframes camGhostB {
    0%, 75% { opacity: 0; transform: translate(0, 0); }
    77%, 83% { opacity: 0.2; transform: translate(4px, 1px); }
    85% { opacity: 0.06; transform: translate(-2px, -2px); }
    87%, 100% { opacity: 0; transform: translate(0, 0); }
}

@keyframes camInterference {
    0%, 55% { opacity: 0; transform: translateY(-125%); }
    58%, 63% { opacity: 0.22; transform: translateY(18%); }
    66% { opacity: 0.14; transform: translateY(58%); }
    69% { opacity: 0; transform: translateY(130%); }
    79%, 85% { opacity: 0.28; transform: translateY(-8%); }
    88% { opacity: 0.18; transform: translateY(88%); }
    92%, 100% { opacity: 0; transform: translateY(140%); }
}

@keyframes camSwitchFlash {
    0% { opacity: 0; }
    22% { opacity: 0.34; }
    42% { opacity: 0.05; }
    64% { opacity: 0.28; }
    100% { opacity: 0; }
}

.terminal-popup {
    position: fixed;
    inset: 0;
    z-index: 3870;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.terminal-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.terminal-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 6, 2, 0.84);
    backdrop-filter: blur(1.2px);
}

.terminal-popup-panel {
    position: relative;
    width: min(94vw, 900px);
    border: 2px solid rgba(56, 255, 138, 0.76);
    background: #031108;
    box-shadow: 0 0 0 1px rgba(56, 255, 138, 0.22), 0 0 24px rgba(56, 255, 138, 0.2);
    transform: translateY(8px);
    transition: transform 0.22s ease;
}

.terminal-popup.is-open .terminal-popup-panel {
    transform: translateY(0);
}

.terminal-popup-bar {
    min-height: 38px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(56, 255, 138, 0.5);
    background: linear-gradient(180deg, rgba(29, 120, 62, 0.46), rgba(8, 34, 18, 0.84));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.terminal-popup-title {
    color: #98ffbe;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.78rem, 1.2vw, 1rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(98, 255, 160, 0.34);
}

.terminal-popup-close {
    width: 28px;
    height: 28px;
    position: relative;
    top: 15px;
    margin-left: 10px;
    border: 1px solid rgba(56, 255, 138, 0.7);
    background: rgba(6, 20, 11, 0.82);
    color: #98ffbe;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.94rem;
    line-height: 1;
    cursor: pointer;
}

.terminal-popup-close:hover,
.terminal-popup-close:focus-visible {
    background: rgba(56, 255, 138, 0.14);
    outline: none;
}

.terminal-popup-screen {
    margin: 0;
    min-height: clamp(220px, 40vh, 360px);
    padding: clamp(12px, 2.2vh, 20px);
    color: #79ffaf;
    background:
        linear-gradient(180deg, rgba(40, 255, 123, 0.08), transparent 18%),
        #031108;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.82rem, 1.35vw, 1.03rem);
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-shadow: 0 0 8px rgba(56, 255, 138, 0.22);
    white-space: pre-wrap;
    overflow: auto;
}

.terminal-popup-input-wrap {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    padding: 0 clamp(12px, 2.2vh, 20px);
    transition: max-height 0.2s ease, opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease;
}

.terminal-popup-input-wrap.is-visible {
    max-height: 56px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    padding: 0 clamp(12px, 2.2vh, 20px) 10px;
}

.terminal-popup-prompt {
    color: #98ffbe;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.82rem, 1.3vw, 1rem);
    letter-spacing: 0.02em;
    line-height: 1;
}

.terminal-popup-input {
    flex: 1 1 auto;
    min-width: 0;
    height: clamp(34px, 5vh, 40px);
    border: 1px solid rgba(56, 255, 138, 0.7);
    background: rgba(3, 17, 8, 0.92);
    color: #b9ffd4;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.76rem, 1.15vw, 0.94rem);
    letter-spacing: 0.04em;
    padding: 0 10px;
}

.terminal-popup-input::placeholder {
    color: rgba(152, 255, 190, 0.62);
}

.terminal-popup-input:focus-visible {
    outline: none;
    border-color: rgba(138, 255, 184, 0.9);
    box-shadow: 0 0 0 1px rgba(138, 255, 184, 0.28);
}

.ui-console-btn.terminal-popup-send-btn {
    min-height: 0;
    height: clamp(34px, 5vh, 40px);
    padding: 0.42em 0.9em;
    font-size: clamp(0.72rem, 1.02vw, 0.86rem);
    letter-spacing: 0.08em;
    border-color: rgba(56, 255, 138, 0.78);
    background:
        linear-gradient(180deg, rgba(56, 255, 138, 0.2), rgba(56, 255, 138, 0.06)),
        rgba(3, 17, 8, 0.95);
    color: #b9ffd4;
    box-shadow: inset 0 0 0 1px rgba(56, 255, 138, 0.14), 0 0 12px rgba(56, 255, 138, 0.2);
    text-shadow: 0 0 8px rgba(56, 255, 138, 0.28);
}

.ui-console-btn.terminal-popup-send-btn:hover,
.ui-console-btn.terminal-popup-send-btn:focus-visible {
    border-color: rgba(138, 255, 184, 0.95);
    background:
        linear-gradient(180deg, rgba(56, 255, 138, 0.3), rgba(56, 255, 138, 0.1)),
        rgba(5, 26, 12, 0.98);
    box-shadow: inset 0 0 0 1px rgba(56, 255, 138, 0.22), 0 0 16px rgba(56, 255, 138, 0.3);
}

.ui-console-btn.terminal-popup-send-btn:disabled {
    border-color: rgba(56, 255, 138, 0.42);
    background:
        linear-gradient(180deg, rgba(56, 255, 138, 0.1), rgba(56, 255, 138, 0.03)),
        rgba(3, 17, 8, 0.78);
    color: rgba(152, 255, 190, 0.52);
    box-shadow: none;
    text-shadow: none;
}

.terminal-popup-footer {
    opacity: 0;
    transform: translateY(-2px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 0 clamp(12px, 2.2vh, 20px) clamp(12px, 2vh, 18px);
}

.terminal-popup-footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal-popup-divider {
    border: 0;
    border-top: 1px solid rgba(56, 255, 138, 0.45);
    margin: 0 0 10px;
}

.terminal-popup-note {
    margin: 0;
    color: #98ffbe;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.92rem);
    line-height: 1.35;
    text-shadow: 0 0 8px rgba(56, 255, 138, 0.2);
}

.terminal-popup-screen.is-typing::after,
.terminal-popup-screen.is-thinking::after {
    content: '';
    display: inline-block;
    width: 0.5ch;
    height: 1em;
    margin-left: 0.3ch;
    vertical-align: -0.08em;
    background: rgba(185, 255, 212, 0.9);
    box-shadow: 0 0 8px rgba(185, 255, 212, 0.45);
    animation: terminalCursorBlink 0.84s steps(1, end) infinite;
}

@keyframes terminalCursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.stabilizer-popup {
    position: fixed;
    inset: 0;
    z-index: 3880;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.stabilizer-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.stabilizer-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 3, 2, 0.88);
    backdrop-filter: blur(2px);
}

.stabilizer-popup-panel {
    --stabilizer-progress: 0;
    position: relative;
    width: min(94vw, 980px);
    border: 2px solid rgba(136, 255, 194, 0.72);
    background:
        radial-gradient(circle at 18% 12%, rgba(81, 255, 165, 0.12), transparent 60%),
        linear-gradient(180deg, rgba(8, 24, 16, 0.96), rgba(2, 8, 5, 0.98));
    box-shadow:
        0 0 0 1px rgba(106, 255, 180, 0.22),
        0 0 26px rgba(42, 255, 138, 0.2),
        inset 0 0 24px rgba(39, 232, 128, 0.08);
    padding: clamp(12px, 2.2vh, 22px);
    display: grid;
    gap: clamp(10px, 1.8vh, 16px);
    transform: translateY(10px) scale(0.985);
    transition: transform 0.2s ease, box-shadow 0.24s ease, filter 0.24s ease;
    overflow: hidden;
    filter: saturate(calc(0.88 + var(--stabilizer-progress) * 0.24));
}

.stabilizer-popup.is-open .stabilizer-popup-panel {
    transform: translateY(0) scale(1);
}

.stabilizer-popup-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(160, 255, 208, 0.28) 0.7px, transparent 0.7px);
    background-size: 3px 3px;
    opacity: calc(0.22 - var(--stabilizer-progress) * 0.16);
    mix-blend-mode: screen;
}

.stabilizer-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(167, 255, 214, 0.08) 0 1px,
            rgba(0, 0, 0, 0.16) 1px 3px
        );
    opacity: calc(0.34 - var(--stabilizer-progress) * 0.25);
    mix-blend-mode: screen;
    animation: stabilizerScanShift 9.8s linear infinite;
}

.stabilizer-popup.is-solved .stabilizer-popup-panel {
    box-shadow:
        0 0 0 1px rgba(116, 255, 190, 0.4),
        0 0 30px rgba(87, 255, 164, 0.32),
        inset 0 0 30px rgba(71, 255, 154, 0.12);
}

.stabilizer-popup-head {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
}

.stabilizer-popup-title {
    margin: 0;
    color: #d9ffe9;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(1rem, 1.8vw, 1.34rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(116, 255, 187, 0.3);
}

.stabilizer-popup-subtitle {
    margin: 0;
    color: rgba(198, 255, 223, 0.8);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.66rem, 1.05vw, 0.86rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stabilizer-controls-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 14px);
}

.stabilizer-band {
    display: grid;
    gap: clamp(6px, 0.9vh, 10px);
    padding: clamp(8px, 1.3vh, 12px);
    border: 1px solid rgba(132, 255, 193, 0.42);
    background: rgba(10, 27, 18, 0.58);
}

.stabilizer-band-label {
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    color: rgba(208, 255, 229, 0.92);
    font-size: clamp(0.62rem, 0.92vw, 0.78rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stabilizer-slider {
    appearance: none;
    width: 100%;
    height: 34px;
    background: transparent;
}

.stabilizer-slider:focus-visible {
    outline: none;
}

.stabilizer-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    border: 1px solid rgba(154, 255, 205, 0.75);
    background: linear-gradient(90deg, rgba(39, 168, 102, 0.56), rgba(18, 88, 55, 0.42));
}

.stabilizer-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(202, 255, 227, 0.9);
    background: #ccffe2;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(129, 255, 192, 0.3);
    cursor: pointer;
}

.stabilizer-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    border: 1px solid rgba(154, 255, 205, 0.75);
    background: linear-gradient(90deg, rgba(39, 168, 102, 0.56), rgba(18, 88, 55, 0.42));
}

.stabilizer-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(202, 255, 227, 0.9);
    background: #ccffe2;
    box-shadow: 0 0 10px rgba(129, 255, 192, 0.3);
    cursor: pointer;
}

.stabilizer-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stabilizer-led-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 14px);
}

.stabilizer-led-item {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 10px);
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid rgba(136, 255, 194, 0.36);
    background: rgba(8, 24, 16, 0.52);
}

.stabilizer-led-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 67, 58, 0.4);
    background: #ff433a;
}

.stabilizer-led-dot.is-mid {
    background: #ffb343;
    box-shadow: 0 0 8px rgba(255, 179, 67, 0.46);
}

.stabilizer-led-dot.is-good {
    background: #52ff7a;
    box-shadow: 0 0 9px rgba(82, 255, 122, 0.5);
}

.stabilizer-led-dot.is-bad {
    background: #ff433a;
}

.stabilizer-led-label {
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    color: rgba(214, 255, 233, 0.86);
    font-size: clamp(0.58rem, 0.86vw, 0.74rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stabilizer-result {
    position: relative;
    z-index: 1;
    margin: 0;
    min-height: 1.3em;
    color: #cbffe4;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.72rem, 1.05vw, 0.92rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(101, 255, 178, 0.3);
}

.stabilizer-result.is-error {
    color: #ff8d86;
    text-shadow: 0 0 8px rgba(255, 77, 66, 0.36);
}

.stabilizer-result.is-success {
    color: #7cffad;
    text-shadow: 0 0 10px rgba(82, 255, 122, 0.4);
    animation: stabilizerResultPulse 1.1s ease-in-out infinite;
}

.stabilizer-popup-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 12px);
}

.ui-console-btn.stabilizer-action-btn {
    min-height: 0;
    min-width: 0;
    padding: 0.48em 0.86em;
    font-size: clamp(0.68rem, 0.96vw, 0.84rem);
    letter-spacing: 0.08em;
    border-color: rgba(136, 255, 194, 0.72);
    background:
        linear-gradient(180deg, rgba(93, 255, 171, 0.2), rgba(93, 255, 171, 0.05)),
        rgba(8, 24, 16, 0.82);
    color: #ccffe2;
    box-shadow: inset 0 0 0 1px rgba(131, 255, 188, 0.16), 0 0 12px rgba(72, 255, 157, 0.16);
}

.ui-console-btn.stabilizer-action-btn:hover,
.ui-console-btn.stabilizer-action-btn:focus-visible {
    border-color: rgba(180, 255, 217, 0.9);
    background:
        linear-gradient(180deg, rgba(93, 255, 171, 0.3), rgba(93, 255, 171, 0.09)),
        rgba(11, 33, 22, 0.92);
}

.ui-console-btn.stabilizer-action-btn:disabled {
    opacity: 0.66;
    cursor: default;
}

.ui-console-btn.stabilizer-action-btn.is-off {
    border-color: rgba(255, 161, 124, 0.68);
    color: #ffd2be;
}

.ui-console-btn.stabilizer-connect-btn.is-error {
    border-color: rgba(255, 108, 97, 0.72);
    color: #ffc6c2;
}

.ui-console-btn.stabilizer-connect-btn.is-linked {
    border-color: rgba(82, 255, 122, 0.72);
    color: #d4ffe3;
    box-shadow: inset 0 0 0 1px rgba(82, 255, 122, 0.24), 0 0 14px rgba(82, 255, 122, 0.28);
}

@keyframes stabilizerResultPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

@keyframes stabilizerScanShift {
    0% { transform: translateY(0); }
    100% { transform: translateY(12px); }
}

.energy-popup {
    position: fixed;
    inset: 0;
    z-index: 3890;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.energy-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.energy-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 2, 3, 0.9);
    backdrop-filter: blur(1.8px);
}

.energy-popup-panel {
    --energy-glow: rgba(92, 255, 185, 0.3);
    position: relative;
    width: min(95vw, 1120px);
    border: 2px solid rgba(148, 255, 214, 0.72);
    background:
        radial-gradient(circle at 18% 15%, rgba(105, 255, 188, 0.1), transparent 60%),
        linear-gradient(180deg, rgba(8, 16, 20, 0.95), rgba(3, 9, 11, 0.98));
    box-shadow:
        0 0 0 1px rgba(164, 255, 222, 0.2),
        0 0 26px var(--energy-glow),
        inset 0 0 24px rgba(100, 225, 255, 0.07);
    padding: clamp(12px, 2.2vh, 22px);
    display: grid;
    gap: clamp(10px, 1.8vh, 16px);
    transform: translateY(10px) scale(0.985);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.energy-popup.is-open .energy-popup-panel {
    transform: translateY(0) scale(1);
}

.energy-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.05) 0 1px,
            rgba(0, 0, 0, 0.14) 1px 3px
        );
    opacity: 0.28;
    mix-blend-mode: screen;
    animation: energyScanDrift 10s linear infinite;
}

.energy-popup-head {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
}

.energy-popup-title {
    margin: 0;
    color: #ddfff2;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.95rem, 1.68vw, 1.3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(106, 255, 205, 0.3);
}

.energy-popup-subtitle {
    margin: 0;
    color: rgba(190, 255, 230, 0.78);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.95vw, 0.82rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.energy-popup-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    gap: clamp(12px, 1.8vw, 20px);
    align-items: stretch;
}

.energy-map-column {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(44px, 4.8vw, 62px);
    gap: clamp(8px, 1.1vw, 12px);
    align-items: stretch;
}

.energy-map-stage {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: clamp(280px, 45vh, 500px);
    border: 1px solid rgba(146, 255, 214, 0.45);
    background: rgba(6, 16, 20, 0.52);
    overflow: hidden;
}

.energy-map-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    filter: grayscale(0.45) contrast(1.16) brightness(1.08);
}

.energy-map-svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.energy-map-frame,
.energy-map-link {
    fill: none;
    stroke: rgba(171, 255, 224, 0.3);
    stroke-width: 2;
}

.energy-map-link {
    stroke-dasharray: none;
}

.energy-map-room rect {
    fill: rgba(10, 20, 24, 0.82);
    stroke: rgba(160, 255, 221, 0.45);
    stroke-width: 2;
    transition: fill 0.22s ease, stroke 0.22s ease, filter 0.22s ease;
}

.energy-map-room {
    cursor: pointer;
}

.energy-map-room text {
    fill: rgba(211, 255, 239, 0.82);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: 15px;
    text-anchor: middle;
    letter-spacing: 0.03em;
    transition: fill 0.22s ease, text-shadow 0.22s ease;
}

.energy-map-room:hover rect,
.energy-map-room:focus-visible rect {
    stroke: rgba(183, 255, 230, 0.86);
    filter: drop-shadow(0 0 6px rgba(116, 255, 195, 0.24));
}

.energy-map-room:hover text,
.energy-map-room:focus-visible text {
    fill: rgba(230, 255, 246, 0.94);
}

.energy-map-room.is-locked {
    cursor: default;
}

.energy-map-room .energy-map-room-id {
    fill: rgba(199, 255, 236, 0.68);
    font-size: 14px;
    font-weight: 700;
    text-anchor: start;
    letter-spacing: 0.08em;
}

.energy-map-room.is-on rect {
    fill: rgba(66, 255, 166, 0.38);
    stroke: rgba(111, 255, 191, 0.92);
    filter: drop-shadow(0 0 8px rgba(91, 255, 182, 0.5));
}

.energy-map-room.is-on text {
    fill: #d6ffee;
    text-shadow: 0 0 6px rgba(111, 255, 191, 0.42);
}

.energy-control-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "stability"
        "zones"
        "result"
        "actions";
    gap: clamp(8px, 1vh, 12px);
    padding: clamp(8px, 1.4vh, 12px);
    border: 1px solid rgba(156, 255, 218, 0.42);
    background: rgba(5, 14, 18, 0.74);
    align-items: start;
}

.energy-level-section {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-content: start;
    justify-items: center;
    align-self: stretch;
}

.energy-level-bar {
    position: relative;
    width: 40px;
    height: clamp(170px, 30vh, 270px);
    border: 1px solid rgba(165, 255, 220, 0.68);
    background: rgba(7, 18, 22, 0.92);
    overflow: hidden;
}

.energy-level-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12%;
    background: linear-gradient(180deg, rgba(119, 255, 197, 0.88), rgba(65, 222, 156, 0.88));
    box-shadow: 0 0 12px rgba(80, 255, 177, 0.38);
    transition: height 0.26s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.energy-level-copy {
    display: grid;
    gap: 5px;
    justify-items: center;
    text-align: center;
}

.energy-level-title,
.energy-level-read,
.energy-state-read {
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    text-transform: uppercase;
}

.energy-level-title {
    color: rgba(198, 255, 232, 0.76);
    font-size: clamp(0.54rem, 0.74vw, 0.64rem);
    letter-spacing: 0.09em;
}

.energy-level-read {
    color: #defff3;
    font-size: clamp(0.6rem, 0.82vw, 0.74rem);
    letter-spacing: 0.08em;
}

.energy-state-read {
    color: #b7ffe2;
    font-size: clamp(0.58rem, 0.8vw, 0.72rem);
    letter-spacing: 0.08em;
}

.energy-stability-row {
    grid-area: stability;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    padding: 4px 6px;
    border: 1px solid rgba(160, 255, 221, 0.3);
}

.energy-stability-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4c44;
    box-shadow: 0 0 8px rgba(255, 76, 68, 0.34);
}

.energy-stability-led.is-on {
    background: #52ff7a;
    box-shadow: 0 0 10px rgba(82, 255, 122, 0.48);
}

.energy-stability-led.is-overload {
    background: #ff9348;
    box-shadow: 0 0 10px rgba(255, 147, 72, 0.48);
}

.energy-stability-label {
    color: rgba(213, 255, 239, 0.84);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.9vw, 0.76rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.energy-zone-list {
    grid-area: zones;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
    align-content: start;
}

.energy-zone-btn {
    width: 100%;
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(164, 255, 222, 0.32);
    background: rgba(5, 14, 18, 0.86);
    color: rgba(220, 255, 242, 0.9);
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.energy-zone-btn:hover,
.energy-zone-btn:focus-visible {
    border-color: rgba(164, 255, 222, 0.66);
    box-shadow: 0 0 12px rgba(84, 255, 177, 0.22);
    outline: none;
}

.energy-zone-btn:disabled {
    cursor: default;
}

.energy-zone-btn.is-required {
    border-color: rgba(130, 210, 255, 0.45);
}

.energy-zone-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 79, 79, 0.58);
    box-shadow: 0 0 8px rgba(255, 79, 79, 0.24);
}

.energy-zone-btn.is-on .energy-zone-led {
    background: rgba(82, 255, 122, 0.95);
    box-shadow: 0 0 10px rgba(82, 255, 122, 0.45);
}

.energy-zone-label {
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.64rem, 0.88vw, 0.78rem);
    letter-spacing: 0.03em;
    line-height: 1.25;
}

.energy-result-text {
    grid-area: result;
    margin: 0;
    min-height: 1.3em;
    color: #d8fff0;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.74rem, 1vw, 0.88rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.energy-popup-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ui-console-btn.energy-action-btn {
    min-height: 0;
    min-width: 0;
    padding: 0.42em 0.72em;
    font-size: clamp(0.62rem, 0.86vw, 0.76rem);
    letter-spacing: 0.08em;
}

.ui-console-btn.energy-action-btn.is-verified,
.ui-console-btn.energy-action-btn:disabled {
    border-color: rgba(82, 255, 122, 0.72);
    color: rgba(182, 255, 207, 0.96);
    background: rgba(22, 74, 44, 0.48);
    box-shadow:
        inset 0 0 0 1px rgba(82, 255, 122, 0.28),
        0 0 14px rgba(82, 255, 122, 0.2);
    cursor: default;
}

.energy-popup-panel.is-rest .energy-level-fill {
    background: linear-gradient(180deg, rgba(111, 255, 194, 0.88), rgba(64, 219, 152, 0.88));
}

.energy-popup-panel.is-incomplete .energy-level-fill {
    background: linear-gradient(180deg, rgba(255, 201, 104, 0.9), rgba(238, 161, 54, 0.9));
}

.energy-popup-panel.is-overload .energy-level-fill {
    background: linear-gradient(180deg, rgba(255, 124, 104, 0.92), rgba(255, 67, 67, 0.92));
    animation: energyFillShake 0.35s steps(2, end) infinite;
}

.energy-popup-panel.is-overload {
    box-shadow:
        0 0 0 1px rgba(255, 166, 122, 0.24),
        0 0 26px rgba(255, 104, 84, 0.34),
        inset 0 0 24px rgba(255, 79, 79, 0.08);
}

.energy-popup-panel.is-overload .energy-result-text {
    color: #ffb7ab;
    text-shadow: 0 0 8px rgba(255, 93, 84, 0.26);
}

.energy-popup-panel.is-stable .energy-level-fill {
    background: linear-gradient(180deg, rgba(94, 255, 173, 0.96), rgba(54, 234, 143, 0.96));
    animation: energyStablePulse 1.2s ease-in-out infinite;
}

.energy-popup-panel.is-stable .energy-result-text {
    color: #89ffc0;
    text-shadow: 0 0 10px rgba(82, 255, 122, 0.44);
}

@keyframes energyScanDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(12px); }
}

@keyframes energyFillShake {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(1px); }
}

@keyframes energyStablePulse {
    0%, 100% { box-shadow: 0 0 11px rgba(82, 255, 122, 0.44); }
    50% { box-shadow: 0 0 18px rgba(82, 255, 122, 0.62); }
}

.launch-route-popup {
    position: fixed;
    inset: 0;
    z-index: 3905;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.launch-route-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.launch-route-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 3, 4, 0.9);
    backdrop-filter: blur(2px);
}

.launch-route-panel {
    position: relative;
    width: min(95vw, 1220px);
    border: 2px solid rgba(135, 255, 212, 0.68);
    background:
        radial-gradient(circle at 14% 10%, rgba(86, 255, 199, 0.11), transparent 60%),
        linear-gradient(180deg, rgba(5, 14, 18, 0.96), rgba(3, 8, 11, 0.99));
    box-shadow:
        0 0 0 1px rgba(141, 255, 216, 0.18),
        0 0 22px rgba(82, 255, 192, 0.24),
        inset 0 0 22px rgba(98, 221, 255, 0.06);
    padding: clamp(12px, 2.2vh, 22px);
    display: grid;
    gap: clamp(10px, 1.6vh, 16px);
    transform: translateY(10px) scale(0.986);
    transition: transform 0.2s ease, box-shadow 0.24s ease;
    overflow: hidden;
}

.launch-route-popup.is-open .launch-route-panel {
    transform: translateY(0) scale(1);
}

.launch-route-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.045) 0 1px,
            rgba(0, 0, 0, 0.16) 1px 3px
        );
    mix-blend-mode: screen;
    opacity: 0.26;
    animation: launchRouteScanDrift 10s linear infinite;
}

.launch-route-head {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
}

.launch-route-title {
    margin: 0;
    color: #dcfff3;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.96rem, 1.7vw, 1.28rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(107, 255, 206, 0.28);
}

.launch-route-subtitle {
    margin: 0;
    color: rgba(195, 255, 236, 0.82);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.6rem, 0.92vw, 0.78rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.launch-route-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.34fr) minmax(280px, 1fr);
    gap: clamp(10px, 1.4vw, 16px);
    min-height: min(74vh, 680px);
}

.launch-sim-panel {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    border: 1px solid rgba(146, 255, 220, 0.42);
    background:
        radial-gradient(circle at 18% 22%, rgba(108, 255, 200, 0.08), transparent 62%),
        rgba(3, 12, 16, 0.82);
    box-shadow: inset 0 0 0 1px rgba(138, 255, 214, 0.08);
    padding: clamp(8px, 1.3vh, 12px);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.launch-sim-panel.is-running {
    border-color: rgba(122, 255, 206, 0.6);
}

.launch-sim-panel.is-error {
    border-color: rgba(255, 121, 112, 0.75);
    box-shadow:
        inset 0 0 0 1px rgba(255, 118, 110, 0.12),
        0 0 14px rgba(255, 98, 84, 0.22);
}

.launch-sim-panel.is-success {
    border-color: rgba(107, 255, 167, 0.74);
    box-shadow:
        inset 0 0 0 1px rgba(96, 255, 159, 0.14),
        0 0 16px rgba(96, 255, 159, 0.24);
}

.launch-sim-panel.is-glitch {
    animation: launchSimPanelGlitch 0.36s steps(2, end);
}

.launch-sim-hud {
    display: grid;
    gap: 5px;
    min-height: 44px;
}

.launch-status-primary,
.launch-status-secondary {
    margin: 0;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    text-transform: uppercase;
}

.launch-status-primary {
    color: #d7fff0;
    font-size: clamp(0.68rem, 0.98vw, 0.84rem);
    letter-spacing: 0.09em;
}

.launch-status-secondary {
    color: rgba(205, 255, 236, 0.76);
    font-size: clamp(0.58rem, 0.86vw, 0.72rem);
    letter-spacing: 0.07em;
}

.launch-sim-panel.is-error .launch-status-primary,
.launch-sim-panel.is-error .launch-status-secondary {
    color: #ffb5ad;
    text-shadow: 0 0 8px rgba(255, 86, 72, 0.26);
}

.launch-sim-panel.is-success .launch-status-primary,
.launch-sim-panel.is-success .launch-status-secondary {
    color: #9dffbf;
    text-shadow: 0 0 8px rgba(95, 255, 148, 0.24);
}

.launch-sim-svg {
    width: 100%;
    height: 100%;
    min-height: clamp(240px, 42vh, 470px);
    border: 1px solid rgba(144, 255, 219, 0.3);
    background: rgba(2, 9, 12, 0.82);
}

.launch-sim-grid-bg {
    fill: rgba(3, 10, 14, 0.86);
}

.launch-phase-lines line {
    stroke: rgba(138, 255, 214, 0.23);
    stroke-width: 1;
}

.launch-earth-aura {
    fill: url(#launchEarthGlow);
}

.launch-earth-core {
    fill: rgba(44, 198, 145, 0.26);
    stroke: rgba(114, 255, 208, 0.84);
    stroke-width: 2;
}

.launch-earth-detail {
    fill: rgba(144, 255, 215, 0.36);
}

.launch-earth-label,
.launch-origin-label {
    fill: rgba(210, 255, 240, 0.9);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.launch-trajectory-path {
    fill: none;
    stroke: rgba(154, 255, 224, 0.72);
    stroke-width: 2.2;
    stroke-dasharray: 5 6;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(96, 255, 187, 0.26));
}

.launch-capsule-point {
    fill: #9effc2;
    stroke: rgba(180, 255, 223, 0.84);
    stroke-width: 1.2;
    opacity: 1;
    filter: drop-shadow(0 0 9px rgba(95, 255, 161, 0.5));
    transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.launch-capsule-point.is-error {
    fill: #ff6b62;
    stroke: rgba(255, 167, 160, 0.9);
    filter: drop-shadow(0 0 8px rgba(255, 84, 72, 0.46));
}

.launch-select-panel {
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
}

.launch-phase-list {
    min-height: 0;
    display: grid;
    gap: 8px;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}

.launch-phase-list::-webkit-scrollbar {
    width: 8px;
}

.launch-phase-list::-webkit-scrollbar-track {
    background: rgba(5, 16, 20, 0.62);
}

.launch-phase-list::-webkit-scrollbar-thumb {
    background: rgba(124, 255, 205, 0.36);
}

.launch-phase-block {
    border: 1px solid rgba(141, 255, 216, 0.34);
    background: rgba(5, 14, 18, 0.76);
    padding: clamp(8px, 1.2vh, 10px);
    display: grid;
    gap: 7px;
}

.launch-phase-title {
    margin: 0;
    color: rgba(210, 255, 240, 0.92);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.58rem, 0.84vw, 0.72rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.launch-phase-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.launch-option-card {
    position: relative;
    min-height: 36px;
    border: 1px solid rgba(149, 255, 220, 0.34);
    background: rgba(6, 15, 20, 0.9);
    color: rgba(216, 255, 242, 0.9);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.56rem, 0.76vw, 0.68rem);
    letter-spacing: 0.06em;
    text-align: left;
    padding: 7px 9px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.launch-option-card:hover,
.launch-option-card:focus-visible {
    border-color: rgba(168, 255, 228, 0.74);
    box-shadow: 0 0 10px rgba(99, 255, 191, 0.18);
    outline: none;
}

.launch-option-card:disabled {
    cursor: default;
    opacity: 0.78;
}

.launch-option-card.is-selected {
    border-color: rgba(118, 255, 191, 0.84);
    background: rgba(22, 74, 52, 0.44);
    color: rgba(214, 255, 236, 0.96);
    box-shadow: inset 0 0 0 1px rgba(107, 255, 183, 0.28), 0 0 12px rgba(95, 255, 170, 0.2);
}

.launch-option-card.is-failed-selected {
    border-color: rgba(255, 124, 114, 0.86);
    background: rgba(77, 14, 14, 0.46);
    color: rgba(255, 210, 205, 0.96);
    box-shadow: inset 0 0 0 1px rgba(255, 118, 111, 0.32), 0 0 12px rgba(255, 93, 84, 0.22);
}

.launch-option-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 97, 85, 0.94);
    font-size: 13px;
    opacity: 0;
    text-shadow: 0 0 8px rgba(255, 77, 66, 0.34);
}

.launch-option-card.is-failed-selected .launch-option-badge {
    opacity: 1;
}

.launch-route-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ui-console-btn.launch-action-btn {
    min-height: 0;
    min-width: 0;
    padding: 0.48em 0.76em;
    font-size: clamp(0.62rem, 0.84vw, 0.74rem);
    letter-spacing: 0.08em;
}

.ui-console-btn.launch-action-btn.is-off {
    border-color: rgba(255, 163, 128, 0.7);
    color: #ffd4c2;
}

@keyframes launchRouteScanDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(12px); }
}

@keyframes launchSimPanelGlitch {
    0% { transform: translateX(0); }
    30% { transform: translateX(-1px); }
    60% { transform: translateX(1px); }
    100% { transform: translateX(0); }
}

.launch-surveillance-popup {
    position: fixed;
    inset: 0;
    z-index: 3925;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.launch-surveillance-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.launch-surveillance-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(2px);
}

.launch-surveillance-panel {
    position: relative;
    width: min(94vw, 1120px);
    border: 1px solid rgba(152, 255, 218, 0.72);
    background:
        radial-gradient(circle at 18% 12%, rgba(104, 255, 206, 0.11), transparent 60%),
        linear-gradient(180deg, rgba(5, 12, 16, 0.98), rgba(3, 8, 12, 0.99));
    box-shadow:
        0 0 0 1px rgba(148, 255, 218, 0.2),
        0 0 24px rgba(95, 255, 196, 0.24),
        inset 0 0 20px rgba(112, 228, 255, 0.07);
    padding: clamp(10px, 1.8vh, 20px);
    display: grid;
    gap: clamp(9px, 1.3vh, 14px);
    transform: translateY(8px) scale(0.985);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.launch-surveillance-popup.is-open .launch-surveillance-panel {
    transform: translateY(0) scale(1);
}

.launch-surveillance-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0 1px,
        rgba(0, 0, 0, 0.2) 1px 3px
    );
    opacity: 0.24;
    mix-blend-mode: screen;
    animation: launchSurveillanceScanDrift 9s linear infinite;
}

.launch-surveillance-head {
    position: relative;
    z-index: 1;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.launch-surveillance-title {
    margin: 0;
    color: #dcfff3;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.78rem, 1.24vw, 1rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(95, 255, 198, 0.25);
}

.launch-surveillance-close {
    width: 34px;
    height: 34px;
    position: relative;
    top: 15px;
    margin-left: 10px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-family: "Share Tech Mono", "Consolas", "Courier New", monospace;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.launch-surveillance-close:hover,
.launch-surveillance-close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.launch-surveillance-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.34fr) minmax(230px, 0.9fr);
    gap: clamp(10px, 1.2vw, 16px);
    min-height: clamp(280px, 56vh, 560px);
}

.launch-surveillance-feed {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(146, 255, 220, 0.42);
    background:
        radial-gradient(circle at 22% 18%, rgba(108, 255, 200, 0.08), transparent 62%),
        rgba(2, 8, 12, 0.92);
    box-shadow:
        inset 0 0 0 1px rgba(138, 255, 214, 0.08),
        0 0 16px rgba(84, 255, 184, 0.12);
}

.launch-surveillance-feed::before,
.launch-surveillance-feed::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.launch-surveillance-feed::before {
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05) 0 1px,
        rgba(0, 0, 0, 0.2) 1px 4px
    );
    mix-blend-mode: screen;
    opacity: 0.38;
}

.launch-surveillance-feed::after {
    background:
        radial-gradient(circle at 18% 21%, rgba(255, 255, 255, 0.08), transparent 34%),
        radial-gradient(circle at 82% 74%, rgba(255, 255, 255, 0.07), transparent 38%);
    mix-blend-mode: soft-light;
    opacity: 0.44;
}

.launch-surveillance-preview,
.launch-surveillance-transition-frame,
.launch-surveillance-gif {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    will-change: transform, opacity, filter;
}

.launch-surveillance-preview {
    opacity: 1;
    transition: opacity 0.2s ease;
    filter: grayscale(1) contrast(1.1) brightness(0.92);
}

.launch-surveillance-preview.is-hidden {
    opacity: 0;
}

.launch-surveillance-transition-frame {
    object-fit: fill;
    opacity: 0;
    transition: opacity 0.16s linear;
    filter: grayscale(1) contrast(1.12) brightness(0.92) blur(3px);
}

.launch-surveillance-transition-frame.is-visible {
    opacity: 1;
}

.launch-surveillance-gif {
    object-fit: fill;
    opacity: 0;
    transition: opacity 0.24s ease;
    filter: grayscale(1) contrast(1.07) brightness(0.9);
}

.launch-surveillance-gif.is-visible {
    opacity: 1;
}

.launch-surveillance-feed.is-signal-lost {
    background: #000000;
    animation: launchSurveillanceDataLoss 0.2s ease-out forwards;
}

.launch-surveillance-feed.is-loss-transition {
    background: #000000;
    animation: launchSurveillanceInterferenceBurst 0.5s steps(2, end) 1 forwards;
}

.launch-surveillance-feed.is-loss-transition::before {
    opacity: 0.7;
    animation: launchSurveillanceNoiseDrift 0.5s steps(2, end) 1 forwards;
}

.launch-surveillance-feed.is-loss-transition::after {
    background: linear-gradient(
        to bottom,
        transparent 0,
        transparent 46%,
        rgba(255, 255, 255, 0.96) 49%,
        rgba(255, 255, 255, 0.96) 51%,
        transparent 54%,
        transparent 100%
    );
    opacity: 0.9;
    mix-blend-mode: screen;
    animation: launchSurveillanceCrtFlash 0.5s ease-out 1 forwards;
}

.launch-surveillance-feed.is-loss-transition .launch-surveillance-preview {
    opacity: 0;
    filter: none;
    animation: none;
}

.launch-surveillance-feed.is-loss-transition .launch-surveillance-transition-frame {
    opacity: 1;
    animation: launchSurveillanceCrtShutdown 0.5s cubic-bezier(0.2, 0.7, 0.28, 1) 1 forwards;
}

.launch-surveillance-feed.is-loss-transition .launch-surveillance-gif {
    opacity: 0;
    filter: grayscale(1) contrast(1.24) brightness(1.1);
    animation: none;
}

.launch-surveillance-feed.is-signal-lost .launch-surveillance-preview,
.launch-surveillance-feed.is-signal-lost .launch-surveillance-transition-frame,
.launch-surveillance-feed.is-signal-lost .launch-surveillance-gif {
    opacity: 0;
}

.launch-surveillance-lost {
    position: absolute;
    inset: auto 0 16%;
    margin: 0;
    color: #ff3b30;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.82rem, 1.36vw, 1.2rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 68, 56, 0.55);
    opacity: 0;
    pointer-events: none;
}

.launch-surveillance-lost.is-visible {
    opacity: 1;
    animation: launchSurveillanceLostBlink 1s linear infinite;
}

.launch-surveillance-side {
    min-width: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: clamp(8px, 1.3vh, 14px);
    border: 1px solid rgba(141, 255, 216, 0.34);
    background: rgba(5, 14, 18, 0.8);
    padding: clamp(10px, 1.6vh, 16px);
}

.launch-surveillance-console {
    width: 100%;
    border: 1px solid rgba(141, 255, 216, 0.34);
    background:
        linear-gradient(180deg, rgba(4, 13, 18, 0.92), rgba(2, 8, 12, 0.96));
    box-shadow: inset 0 0 0 1px rgba(96, 255, 189, 0.08);
    padding: clamp(7px, 1.1vh, 10px);
}

.launch-surveillance-note {
    margin: 0;
    width: 100%;
    display: none;
    color: rgba(223, 255, 245, 0.98);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.96vw, 0.78rem);
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    line-height: 1.35;
    text-transform: uppercase;
    text-align: center;
}

.launch-surveillance-note.is-visible {
    display: block;
}

.launch-surveillance-countdown-label {
    margin: 0;
    color: rgba(200, 255, 236, 0.75);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.58rem, 0.9vw, 0.74rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.launch-surveillance-countdown {
    margin: 0;
    color: #dcfff3;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(2rem, 5.4vw, 4rem);
    line-height: 0.9;
    letter-spacing: 0.06em;
    text-shadow: 0 0 12px rgba(95, 255, 198, 0.32);
}

.launch-surveillance-countdown.is-done {
    color: #52ff7a;
    text-shadow: 0 0 12px rgba(82, 255, 122, 0.42);
}

.launch-surveillance-countdown.is-lost {
    color: #ff3b30;
    text-shadow: 0 0 12px rgba(255, 59, 48, 0.44);
}

.launch-surveillance-status {
    margin: 0;
    width: 100%;
    min-height: clamp(88px, 14vh, 146px);
    max-height: clamp(88px, 16vh, 170px);
    overflow-y: auto;
    color: rgba(215, 255, 241, 0.92);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.58rem, 0.88vw, 0.72rem);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.4;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 255, 214, 0.42) rgba(3, 9, 12, 0.55);
}

.launch-surveillance-status::-webkit-scrollbar {
    width: 8px;
}

.launch-surveillance-status::-webkit-scrollbar-track {
    background: rgba(3, 9, 12, 0.55);
}

.launch-surveillance-status::-webkit-scrollbar-thumb {
    background: rgba(138, 255, 214, 0.42);
}

.launch-surveillance-confirm {
    width: 100%;
    display: none;
    gap: 8px;
    padding: clamp(6px, 1vh, 10px);
    border: 1px solid rgba(141, 255, 216, 0.28);
    background: rgba(4, 11, 14, 0.82);
}

.launch-surveillance-confirm.is-active {
    display: grid;
}

.launch-surveillance-confirm-text {
    margin: 0;
    color: rgba(216, 255, 242, 0.95);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.58rem, 0.92vw, 0.72rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.launch-surveillance-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ui-console-btn.launch-surveillance-confirm-btn {
    min-width: 0;
    min-height: 0;
    padding: 0.4em 0.58em;
    font-size: clamp(0.58rem, 0.9vw, 0.72rem);
    letter-spacing: 0.08em;
}

.ui-console-btn.launch-surveillance-done-close {
    display: none;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0.42em 0.58em;
    font-size: clamp(0.56rem, 0.88vw, 0.72rem);
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

.ui-console-btn.launch-surveillance-done-close.is-visible {
    display: block;
}

@keyframes launchSurveillanceScanDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(12px); }
}

@keyframes launchSurveillanceDataLoss {
    0% { filter: brightness(1.06) contrast(1.18); }
    35% { filter: brightness(1.4) contrast(1.36); }
    100% { filter: brightness(0.9) contrast(1); }
}

@keyframes launchSurveillanceInterferenceBurst {
    0% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
    100% { transform: translateX(0); }
}

@keyframes launchSurveillanceFrameJitter {
    0% { transform: translate(0, 0); }
    30% { transform: translate(-2px, 1px); }
    65% { transform: translate(2px, -1px); }
    100% { transform: translate(0, 0); }
}

@keyframes launchSurveillanceNoiseFlash {
    0%, 100% { filter: contrast(1.12); }
    35% { filter: contrast(1.38); }
    70% { filter: contrast(1.24); }
}

@keyframes launchSurveillanceNoiseDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(16px); }
}

@keyframes launchSurveillanceCrtFlash {
    0% {
        opacity: 0.92;
        transform: scaleX(1.06);
        filter: blur(0.2px) brightness(1.22);
    }
    70% {
        opacity: 0.55;
        transform: scaleX(0.42);
        filter: blur(0.6px) brightness(1.08);
    }
    100% {
        opacity: 0;
        transform: scaleX(0.08);
        filter: blur(0.9px) brightness(0.94);
    }
}

@keyframes launchSurveillanceCrtShutdown {
    0% {
        transform: scale(1, 1);
        opacity: 1;
        filter: grayscale(1) contrast(1.24) brightness(1.1);
    }
    60% {
        transform: scale(1.01, 0.92);
        opacity: 1;
        filter: grayscale(1) contrast(1.36) brightness(1.2);
    }
    86% {
        transform: scale(1.06, 0.12);
        opacity: 0.96;
        filter: grayscale(1) contrast(1.6) brightness(1.42);
    }
    100% {
        transform: scale(0.02, 0.02);
        opacity: 0;
        filter: grayscale(1) contrast(1.2) brightness(0.7);
    }
}

@keyframes launchSurveillanceLostBlink {
    0%, 49.99% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-panel {
    position: relative;
    width: min(94vw, 920px);
    min-height: clamp(260px, 56vh, 620px);
    padding: clamp(16px, 2.6vh, 26px);
    border: 1px solid rgba(138, 255, 214, 0.66);
    background:
        radial-gradient(circle at 16% 14%, rgba(106, 255, 204, 0.1), transparent 58%),
        linear-gradient(180deg, rgba(5, 12, 16, 0.98), rgba(3, 9, 12, 0.99));
    box-shadow:
        0 0 0 1px rgba(156, 255, 222, 0.18),
        0 0 18px rgba(96, 255, 196, 0.2),
        inset 0 0 18px rgba(109, 227, 255, 0.05);
    overflow: hidden;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-frame {
    display: none;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.045) 0 1px,
            rgba(0, 0, 0, 0.14) 1px 3px
        );
    mix-blend-mode: screen;
    opacity: 0.22;
    animation: remoteAccessScanDrift 10s linear infinite;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-panel::after {
    content: '';
    position: absolute;
    inset: -14%;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(90, 255, 169, 0.24) 44%, transparent 100%);
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-content {
    max-height: min(78vh, 640px);
    gap: clamp(10px, 1.6vh, 14px);
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-message {
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(10px, 1.6vh, 14px);
    width: 100%;
    min-width: 0;
    padding-top: clamp(16px, 2.2vh, 24px);
    text-transform: none;
    letter-spacing: 0.04em;
    font-size: clamp(0.66rem, 0.98vw, 0.84rem);
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-actions {
    position: relative;
    z-index: 1;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-close {
    top: 23px;
    left: auto;
    right: 18px;
    width: 30px;
    height: 30px;
    border-color: rgba(150, 255, 221, 0.7);
    color: rgba(224, 255, 245, 0.96);
    background: rgba(4, 12, 16, 0.86);
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-close:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-accept,
.demo-popup-overlay.demo-popup--remote-access .demo-popup-secondary {
    min-width: clamp(146px, 24vw, 200px);
    font-size: clamp(0.64rem, 1vw, 0.84rem);
    letter-spacing: 0.08em;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-accept:disabled {
    opacity: 0.58;
    cursor: default;
}

.demo-popup-overlay.demo-popup--remote-access .demo-popup-secondary:disabled {
    opacity: 0.58;
    cursor: default;
}

.demo-popup-overlay.demo-popup--access-sequence .demo-popup-panel,
.demo-popup-overlay.demo-popup--access-intro .demo-popup-panel {
    width: min(92vw, 760px);
    min-height: clamp(240px, 48vh, 420px);
    padding: clamp(16px, 2.8vh, 26px);
    border: 1px solid rgba(150, 255, 218, 0.62);
    background:
        radial-gradient(circle at 22% 16%, rgba(88, 255, 196, 0.08), transparent 58%),
        linear-gradient(180deg, rgba(4, 10, 14, 0.98), rgba(2, 6, 10, 0.99));
    box-shadow:
        0 0 0 1px rgba(150, 255, 218, 0.16),
        0 0 14px rgba(92, 255, 184, 0.2),
        inset 0 0 18px rgba(96, 233, 255, 0.04);
    overflow: hidden;
}

.demo-popup-overlay.demo-popup--access-sequence .demo-popup-frame,
.demo-popup-overlay.demo-popup--access-sequence .demo-popup-close,
.demo-popup-overlay.demo-popup--access-sequence .demo-popup-actions,
.demo-popup-overlay.demo-popup--access-intro .demo-popup-frame,
.demo-popup-overlay.demo-popup--access-intro .demo-popup-close,
.demo-popup-overlay.demo-popup--access-intro .demo-popup-actions {
    display: none;
}

.demo-popup-overlay.demo-popup--access-sequence .demo-popup-content,
.demo-popup-overlay.demo-popup--access-intro .demo-popup-content {
    min-height: 0;
    max-height: min(76vh, 560px);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
}

.demo-popup-overlay.demo-popup--access-sequence .demo-popup-message,
.demo-popup-overlay.demo-popup--access-intro .demo-popup-message {
    display: grid;
    min-height: 0;
    max-height: none;
    padding: 0;
    text-transform: none;
    text-align: left;
    letter-spacing: 0.04em;
    font-size: clamp(0.66rem, 0.94vw, 0.82rem);
    line-height: 1.2;
    overflow: hidden;
}

.remote-access-boot {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(8px, 1.2vh, 12px);
}

.remote-access-boot-title {
    margin: 0;
    color: rgba(196, 255, 231, 0.9);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.66rem, 0.98vw, 0.84rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(92, 255, 184, 0.24);
}

.remote-access-boot-log {
    position: relative;
    min-height: clamp(132px, 28vh, 220px);
    border: 1px solid rgba(147, 255, 217, 0.36);
    background: rgba(2, 8, 11, 0.74);
    box-shadow: inset 0 0 0 1px rgba(120, 255, 205, 0.08);
    padding: clamp(8px, 1.5vh, 12px);
    display: grid;
    align-content: start;
    gap: 5px;
    overflow-y: auto;
    overflow-x: hidden;
}

.remote-access-boot-log::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.035) 0 1px,
            rgba(0, 0, 0, 0.12) 1px 3px
        );
    opacity: 0.24;
}

.remote-access-boot-line {
    position: relative;
    z-index: 1;
    color: rgba(182, 255, 224, 0.92);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.64rem, 0.9vw, 0.8rem);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    animation: remoteAccessBootLineIn 0.16s ease-out forwards;
}

.remote-access-boot-progress {
    height: 8px;
    border: 1px solid rgba(148, 255, 218, 0.38);
    background: rgba(4, 12, 16, 0.9);
    box-shadow: inset 0 0 0 1px rgba(120, 255, 205, 0.08);
    overflow: hidden;
}

.remote-access-boot-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(73, 238, 147, 0.9), rgba(102, 255, 199, 0.95));
    box-shadow: 0 0 10px rgba(90, 255, 169, 0.4);
    transition: width 70ms linear;
}

.remote-access-boot-finish {
    margin: 0;
    min-height: 1.2em;
    opacity: 0;
    visibility: hidden;
    color: rgba(195, 255, 229, 0.88);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.86vw, 0.76rem);
    letter-spacing: 0.06em;
    text-transform: none;
}

.remote-access-boot-finish.is-visible {
    opacity: 1;
    visibility: visible;
    animation: remoteAccessBootPromptBlink 1.1s step-end infinite;
}

.demo-popup-panel.remote-access-demo-panel--incompleto .remote-access-status-led {
    background: #f3b557;
    box-shadow: 0 0 10px rgba(243, 181, 87, 0.42);
}

.demo-popup-panel.remote-access-demo-panel--error .remote-access-status-led {
    background: #ff6862;
    box-shadow: 0 0 11px rgba(255, 104, 98, 0.48);
}

.demo-popup-panel.remote-access-demo-panel--error .remote-access-status-text,
.demo-popup-panel.remote-access-demo-panel--error .remote-access-result-text {
    color: #ffbcb8;
}

.demo-popup-panel.remote-access-demo-panel--progreso .remote-access-status-led {
    background: #ffd073;
    box-shadow: 0 0 11px rgba(255, 208, 115, 0.46);
}

.demo-popup-panel.remote-access-demo-panel--progreso .remote-access-status-text,
.demo-popup-panel.remote-access-demo-panel--progreso .remote-access-result-text {
    color: #ffe1a8;
}

.demo-popup-panel.remote-access-demo-panel--hackeado {
    box-shadow:
        0 0 0 1px rgba(132, 255, 186, 0.28),
        0 0 30px rgba(94, 255, 173, 0.36),
        inset 0 0 26px rgba(94, 255, 173, 0.12);
}

.demo-popup-panel.remote-access-demo-panel--hackeado::after {
    opacity: 0.9;
    animation: remoteAccessHackSweep 1.4s linear infinite;
}

.demo-popup-panel.remote-access-demo-panel--hackeado .remote-access-status-led {
    background: #58ff9c;
    box-shadow: 0 0 12px rgba(88, 255, 156, 0.58);
}

.demo-popup-panel.remote-access-demo-panel--hackeado .remote-access-status-text,
.demo-popup-panel.remote-access-demo-panel--hackeado .remote-access-result-text {
    color: #aaffcb;
    text-shadow: 0 0 10px rgba(88, 255, 156, 0.38);
}

.remote-access-popup-head,
.remote-access-status-row,
.remote-access-result-text,
.remote-access-slots {
    position: relative;
    z-index: 1;
}

body.radar-system-popup-open {
    overflow: hidden;
}

.radar-system-popup {
    position: fixed;
    inset: 0;
    z-index: 7400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 2.4vh, 24px);
    width: 100%;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.radar-system-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.radar-system-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(3px);
}

.radar-system-panel {
    position: relative;
    width: min(1160px, 95vw);
    max-height: calc(100dvh - 20px);
    border: 1px solid rgba(93, 202, 255, 0.36);
    border-radius: 14px;
    overflow: auto;
    background:
        radial-gradient(120% 85% at 8% 0%, rgba(16, 60, 84, 0.2), rgba(0, 0, 0, 0) 58%),
        linear-gradient(160deg, rgba(6, 14, 22, 0.97), rgba(3, 8, 14, 0.97));
    box-shadow:
        0 20px 54px rgba(0, 0, 0, 0.52),
        inset 0 0 0 1px rgba(148, 229, 255, 0.08);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.radar-system-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: clamp(10px, 2vh, 16px) clamp(12px, 2.2vw, 20px);
    border-bottom: 1px solid rgba(116, 205, 255, 0.28);
    background: linear-gradient(180deg, rgba(14, 42, 59, 0.45), rgba(8, 19, 31, 0.14));
}

.radar-system-title {
    margin: 0;
    color: #d7f4ff;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.radar-system-channel {
    padding: 0.34em 0.72em;
    border: 1px solid rgba(255, 118, 118, 0.62);
    border-radius: 999px;
    color: #ffd7d7;
    background: rgba(128, 16, 16, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 144, 144, 0.18);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.56rem, 0.84vw, 0.7rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.radar-system-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: clamp(12px, 2vw, 20px);
    padding: clamp(10px, 2vh, 18px) clamp(12px, 2.2vw, 20px) clamp(14px, 2.2vh, 18px);
}

.radar-system-visual {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(131, 223, 255, 0.36);
    border-radius: 10px;
    min-height: clamp(260px, 46vh, 520px);
    background: #050d14;
    isolation: isolate;
}

.radar-system-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.82) contrast(1.1) saturate(0.95);
}

.radar-system-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.62) 100%),
        linear-gradient(180deg, rgba(3, 8, 12, 0.28), rgba(2, 6, 10, 0.6));
}

.radar-system-static {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(224, 236, 245, 0.08) 0 1px,
            rgba(12, 14, 15, 0.12) 1px 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(180, 194, 204, 0.05) 0 2px,
            rgba(14, 15, 17, 0.12) 2px 5px
        );
    mix-blend-mode: screen;
    animation: radarSystemStaticFlicker 0.2s steps(2, end) infinite;
}

.radar-system-pulse {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
}

.radar-system-no-signal {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    z-index: 5;
    padding: 0.26em 0.64em;
    border-radius: 4px;
    background: rgba(18, 0, 0, 0.58);
    color: #ff6a6a;
    text-shadow: 0 0 14px rgba(255, 86, 86, 0.72);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.86rem, 1.42vw, 1.22rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: radarSystemNoSignalBlink 0.92s ease-in-out infinite;
}

.radar-system-controls {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 12px;
}

.radar-system-knob-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.radar-system-knob {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: none;
    background: radial-gradient(circle at 32% 22%, rgba(80, 90, 100, 0.28), rgba(11, 15, 19, 0.96) 68%);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 2px rgba(154, 180, 198, 0.2),
        inset 0 0 0 8px rgba(6, 11, 16, 0.9),
        0 8px 14px rgba(0, 0, 0, 0.44);
    cursor: not-allowed;
}

.radar-system-knob-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62%;
    height: 62%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        linear-gradient(140deg, rgba(102, 124, 140, 0.34), rgba(22, 34, 42, 0.92));
    box-shadow: inset 0 0 0 2px rgba(201, 224, 240, 0.12);
}

.radar-system-knob-core::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 12%;
    width: 18%;
    height: 28%;
    transform: translateX(-50%);
    border-radius: 8px;
    background: rgba(255, 103, 103, 0.92);
    box-shadow: 0 0 10px rgba(255, 88, 88, 0.52);
}

.radar-system-knob-lock {
    position: absolute;
    left: 50%;
    top: 8%;
    transform: translate(-50%, -50%);
    width: 1.36em;
    height: 1.36em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(120, 0, 0, 0.74);
    color: #ffd5d5;
    box-shadow:
        0 0 0 1px rgba(255, 124, 124, 0.52),
        0 0 12px rgba(255, 72, 72, 0.44);
}

.radar-system-knob-lock svg {
    width: 68%;
    height: 68%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.radar-system-terminal {
    min-height: 86px;
    padding: 0.62rem 0.7rem;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(177, 255, 231, 0.06) 0 1px,
            rgba(0, 0, 0, 0.14) 1px 3px
        ),
        rgba(5, 12, 17, 0.9);
}

.radar-system-terminal p {
    margin: 0;
    color: #d9fff2;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.66rem, 0.92vw, 0.82rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.5;
}

.radar-system-terminal .is-critical {
    color: #ff8888;
    text-shadow: 0 0 9px rgba(255, 100, 100, 0.44);
    animation: radarSystemTerminalAlert 1s ease-in-out infinite;
}

.radar-system-switch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.radar-system-switch-card {
    border: none;
    background: rgba(4, 11, 17, 0.76);
    border-radius: 8px;
    padding: 0.45rem 0.34rem 0.42rem;
    min-height: 130px;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 6px;
    cursor: not-allowed;
    color: #d5f1ff;
}

.radar-system-switch-label,
.radar-system-switch-state {
    margin: 0;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.54rem, 0.74vw, 0.64rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}

.radar-system-switch-label {
    color: rgba(202, 231, 246, 0.92);
}

.radar-system-switch-state {
    color: #ff9a9a;
}

.radar-system-switch-card.is-on .radar-system-switch-state {
    color: #80ffc0;
}

.radar-system-rocker {
    position: relative;
    width: min(100%, 88px);
    height: 58px;
    overflow: hidden;
    border-bottom: 7px solid #d3d7db;
}

.radar-system-rocker::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #7a858f;
    border: 7px solid #d3d7db;
    border-bottom: 0;
}

.radar-system-rocker .switch-left,
.radar-system-rocker .switch-right {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    width: 40px;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.radar-system-rocker .switch-left {
    left: 12px;
    bottom: 7px;
    background: #d7dde3;
    color: #55606a;
    transform: rotate(14deg) skewX(14deg);
}

.radar-system-rocker .switch-right {
    right: 7px;
    bottom: 0;
    background: #b84c4c;
    color: #fff2f2;
}

.radar-system-rocker .switch-left::before,
.radar-system-rocker .switch-right::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 35px;
    bottom: -7px;
    background: #c8ced4;
}

.radar-system-rocker .switch-left::before {
    left: -6px;
    transform: skewY(-65deg);
}

.radar-system-rocker .switch-right::before {
    right: -6px;
    transform: skewY(65deg);
    background: transparent;
}

.radar-system-switch-card.is-on .radar-system-rocker .switch-left {
    background: #1f8f56;
    color: #f0fff7;
    bottom: 0;
    left: 7px;
    height: 36px;
    width: 43px;
    transform: none;
}

.radar-system-switch-card.is-on .radar-system-rocker .switch-left::before {
    width: 44px;
    transform: none;
    left: 0;
    bottom: 0;
    height: 6px;
    background: transparent;
}

.radar-system-switch-card.is-on .radar-system-rocker .switch-right {
    right: 12px;
    bottom: 7px;
    height: 34px;
    width: 40px;
    background: #d7dde3;
    color: #55606a;
    transform: rotate(-14deg) skewX(-14deg);
}

.radar-system-switch-card.is-on .radar-system-rocker .switch-right::before {
    width: 6px;
    height: 35px;
    background: #c8ced4;
}

.radar-system-close-btn {
    width: 100%;
    margin-top: 4px;
}

@keyframes radarSystemStaticFlicker {
    0%,
    100% {
        opacity: 0.38;
        filter: contrast(1.03);
    }
    18% {
        opacity: 0.54;
        filter: contrast(1.18);
    }
    44% {
        opacity: 0.42;
        filter: contrast(1.08);
    }
    66% {
        opacity: 0.6;
        filter: contrast(1.2);
    }
}

@keyframes radarSystemNoSignalBlink {
    0%,
    100% {
        opacity: 0.4;
    }
    25%,
    68% {
        opacity: 1;
    }
}

@keyframes radarSystemTerminalAlert {
    0%,
    100% {
        opacity: 0.45;
    }
    30%,
    72% {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .radar-system-popup {
        align-items: flex-start;
        padding: 8px;
    }

    .radar-system-panel {
        width: 100%;
        max-height: none;
        margin: 0 auto;
    }

    .radar-system-layout {
        grid-template-columns: 1fr;
    }

    .radar-system-visual {
        min-height: clamp(220px, 42vh, 380px);
    }

    .radar-system-switch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .radar-system-static,
    .radar-system-no-signal,
    .radar-system-terminal .is-critical {
        animation: none !important;
    }
}

.remote-access-inline {
    --ra-ok: rgba(88, 255, 156, 0.94);
    --ra-ok-bg: rgba(88, 255, 156, 0.14);
    --ra-error: rgba(255, 104, 98, 0.96);
    --ra-error-bg: rgba(255, 104, 98, 0.14);
    --ra-progress: rgba(255, 198, 98, 0.92);
    --ra-progress-bg: rgba(255, 198, 98, 0.12);
    display: grid;
    gap: clamp(9px, 1.5vh, 13px);
    width: 100%;
    min-width: 0;
}

.remote-access-popup-head {
    display: grid;
    gap: 4px;
}

.remote-access-popup-title {
    margin: 0;
    color: #dcfff1;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.96rem, 1.76vw, 1.32rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(102, 255, 205, 0.28);
}

.remote-access-popup-subtitle {
    margin: 0;
    color: rgba(199, 255, 235, 0.8);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.95vw, 0.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.remote-access-status-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(161, 255, 223, 0.34);
    width: fit-content;
    background: rgba(5, 14, 18, 0.58);
}

.remote-access-status-led {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #f3b557;
    box-shadow: 0 0 10px rgba(243, 181, 87, 0.42);
    animation: remoteAccessLedPulse 1.3s ease-in-out infinite;
}

.remote-access-status-text {
    color: #e7fff4;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.84rem, 1.26vw, 1.08rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.remote-access-result-text {
    margin: 0;
    min-height: 1.2em;
    color: rgba(214, 255, 240, 0.92);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.7rem, 1.02vw, 0.88rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.remote-access-slots {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 12px);
}

.remote-access-slot {
    border: 1px solid rgba(154, 255, 220, 0.36);
    background: rgba(6, 14, 18, 0.78);
    padding: 8px 6px;
    display: grid;
    grid-template-rows: auto minmax(52px, 1fr) auto;
    justify-items: center;
    gap: 7px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.remote-access-slot.is-correct {
    border-color: var(--ra-ok);
    background: var(--ra-ok-bg);
    box-shadow: inset 0 0 0 1px rgba(88, 255, 156, 0.24), 0 0 14px rgba(88, 255, 156, 0.24);
}

.remote-access-slot.is-wrong {
    border-color: var(--ra-error);
    background: var(--ra-error-bg);
    box-shadow: inset 0 0 0 1px rgba(255, 104, 98, 0.24), 0 0 14px rgba(255, 104, 98, 0.22);
}

.remote-slot-arrow {
    width: min(100%, 44px);
    min-height: 26px;
    border: 1px solid rgba(168, 255, 226, 0.42);
    background: rgba(5, 14, 18, 0.88);
    color: rgba(226, 255, 244, 0.94);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.74rem, 1vw, 0.9rem);
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.remote-slot-arrow:hover,
.remote-slot-arrow:focus-visible {
    border-color: rgba(188, 255, 233, 0.82);
    box-shadow: 0 0 10px rgba(120, 255, 204, 0.24);
    outline: none;
}

.remote-slot-arrow:disabled {
    opacity: 0.45;
    cursor: default;
}

.remote-slot-glyph {
    min-height: 56px;
    width: 100%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(165, 255, 222, 0.26);
    background: rgba(3, 9, 12, 0.84);
    color: #e7fff4;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(1.36rem, 2.1vw, 2rem);
    letter-spacing: 0.08em;
    line-height: 1;
    text-shadow: 0 0 10px rgba(111, 255, 191, 0.24);
}

@keyframes remoteAccessScanDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(12px); }
}

@keyframes remoteAccessLedPulse {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}

@keyframes remoteAccessHackSweep {
    0% { transform: translateY(-110%); }
    100% { transform: translateY(110%); }
}

@keyframes remoteAccessBootLineIn {
    0% {
        opacity: 0;
        transform: translateY(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes remoteAccessBootPromptBlink {
    0%, 45% {
        opacity: 0.3;
    }
    46%, 100% {
        opacity: 1;
    }
}

.audio-controls {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(8px, 2.2vh, 20px));
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 14px);
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.page-wrapper.flow-started .audio-controls {
    opacity: 1;
    pointer-events: auto;
}

.bg-volume-slider {
    appearance: none;
    width: clamp(130px, 16vw, 220px);
    height: 36px;
    margin: 0;
    background: transparent;
}

.bg-volume-slider:focus-visible {
    outline: none;
}

.bg-volume-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.18);
}

.bg-volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #ffffff;
    margin-top: -6px;
    cursor: pointer;
}

.bg-volume-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.18);
}

.bg-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #ffffff;
    cursor: pointer;
}

.mute-toggle {
    width: clamp(34px, 3.6vw, 42px);
    height: clamp(34px, 3.6vw, 42px);
    border: none;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transform: translateY(-16%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mute-toggle:hover,
.mute-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    transform: translateY(calc(-16% - 1px));
}

.mute-toggle:active {
    transform: translateY(-16%);
}

.mute-toggle svg {
    width: 82%;
    height: 82%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mute-toggle .icon-muted {
    display: none;
}

.mute-toggle.is-muted .icon-sound {
    display: none;
}

.mute-toggle.is-muted .icon-muted {
    display: block;
}


.container {
    grid-column: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.55rem, 1.6vh, 2rem);
    max-height: calc(100dvh - clamp(40px, 8vh, 96px));
}

.side-box {
    grid-row: 1;
    width: min(15vw, 230px);
    min-width: 120px;
    min-height: clamp(180px, 32vh, 340px);
    max-height: clamp(220px, 40vh, 420px);
    align-self: center;
    text-align: center;
    padding: clamp(0.8rem, 1.8vh, 1.6rem);
}

.side-box-left {
    grid-column: 1;
    justify-self: end;
    margin-right: clamp(18px, 2.8vw, 52px);
}

.side-box-right {
    grid-column: 3;
    justify-self: start;
    margin-left: clamp(18px, 2.8vw, 52px);
}

.box {
    border: 5px solid #ffffff;
    padding: clamp(0.7rem, 1.6vh, 2rem);
    color: #ffffff;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    min-height: clamp(64px, 10.5vh, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
}

.box-start {
    padding: clamp(0.45rem, 1.1vh, 0.95rem);
    border-color: transparent;
}

.box-start-split .box-square-cam {
    flex-direction: column;
    gap: clamp(0.38rem, 0.9vh, 0.72rem);
    padding: clamp(0.36rem, 0.8vh, 0.66rem);
}

.box-start-split .box-square-signal {
    flex-direction: column;
    gap: clamp(0.38rem, 0.9vh, 0.72rem);
    padding: clamp(0.36rem, 0.8vh, 0.66rem);
}

.box-start-split .box-square-hints {
    flex-direction: column;
    gap: clamp(0.34rem, 0.8vh, 0.64rem);
    padding: clamp(0.3rem, 0.7vh, 0.58rem);
}

.box-start-split .box-square {
    border-right-color: transparent;
}

.box-start-split .box-square-signal > span {
    line-height: 1;
}

.box-hint-btn {
    min-height: 0;
    min-width: clamp(74px, 7vw, 110px);
    padding: 0.4em 0.85em;
    font-size: clamp(0.7rem, 0.98vw, 0.88rem);
    letter-spacing: 0.09em;
}

.hint-counter {
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.6rem, 0.82vw, 0.78rem);
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.2;
    text-align: center;
}

.hint-popup-counter-hidden {
    display: none !important;
}

.hint-access-code {
    display: inline-block;
    font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'Noto Sans Symbols', 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.92em, 1.18em, 1.2em);
    letter-spacing: 0.12em;
    text-shadow: 0 0 8px rgba(143, 255, 200, 0.3);
}

.signal-level-icon {
    display: block;
    width: 80px;
    height: 80px;
    background-image: url('../../../assets/signal.svg');
    background-repeat: no-repeat;
    background-size: auto;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.16));
}

.signal-level-icon.is-stable-primary {
    background-position: -2px 0;
}

.signal-level-icon.is-stable-secondary {
    background-position: -2px -96px;
}

.signal-level-icon.is-weak {
    background-position: -2px -288px;
}

.signal-level-icon.is-weak-prev {
    background-position: -2px -192px;
}

.signal-level-icon.is-critical {
    background-position: -2px -384px;
}

.signal-level-icon.is-critical-max {
    background-position: -2px -480px;
}

.box-console-btn {
    min-height: 0;
    min-width: clamp(66px, 6.8vw, 104px);
    padding: 0.38em 0.82em;
    font-size: clamp(0.7rem, 0.98vw, 0.88rem);
    letter-spacing: 0.09em;
}

.weak-signal-label {
    letter-spacing: 0.08em;
    font-weight: 600;
    transition: color 0.24s ease, text-shadow 0.24s ease;
}

.weak-signal-label.is-weak {
    color: #ff9f1a;
    text-shadow: 0 0 8px rgba(255, 159, 26, 0.28);
}

.weak-signal-label.is-medium {
    color: #ffe066;
    text-shadow: 0 0 9px rgba(255, 224, 102, 0.34);
}

.weak-signal-label.is-stable {
    color: #7dffb5;
    text-shadow: 0 0 10px rgba(82, 255, 122, 0.38);
}

.weak-signal-label.is-critical {
    color: #ff3b30;
    text-shadow: 0 0 9px rgba(255, 59, 48, 0.34);
}

.box-cam-btn {
    min-height: 0;
    min-width: clamp(56px, 6.2vw, 92px);
    padding: 0.38em 0.78em;
    font-size: clamp(0.72rem, 1.04vw, 0.9rem);
    letter-spacing: 0.1em;
}

.mendsaje-btn {
    min-height: 0;
    min-width: clamp(90px, 10vw, 170px);
    padding: 0.45em 0.92em;
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    letter-spacing: 0.12em;
}

.ui-console-btn {
    position: relative;
    border: var(--console-btn-border) solid var(--console-btn-text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
        var(--console-btn-bg);
    color: var(--console-btn-text);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.94rem, 1.5vw, 1.28rem);
    letter-spacing: var(--console-btn-letter);
    text-transform: uppercase;
    line-height: 1;
    padding: 0.9em 1.25em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.52em;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.ui-console-btn__icon {
    width: 1.08em;
    height: 1.08em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.ui-console-btn--hero {
    width: min(100%, 440px);
    min-height: clamp(52px, 7.6vh, 84px);
}

.ui-console-btn:hover,
.ui-console-btn:focus-visible {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
        var(--console-btn-bg-hover);
    box-shadow: var(--console-btn-glow);
    transform: translateY(-1px);
    outline: none;
}

.ui-console-btn:active {
    transform: translateY(0);
}

.ui-console-btn.is-locked {
    opacity: 0.68;
    border-color: rgba(255, 177, 110, 0.52);
    box-shadow: inset 0 0 0 1px rgba(255, 182, 117, 0.18), 0 0 0 transparent;
}

.ui-console-btn.is-locked:hover,
.ui-console-btn.is-locked:focus-visible {
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(255, 182, 117, 0.2), 0 0 10px rgba(255, 154, 82, 0.18);
}

.box-console-btn.is-solved:not(.is-locked) {
    border-color: #52ff7a;
    box-shadow: inset 0 0 0 1px rgba(82, 255, 122, 0.24), 0 0 12px rgba(82, 255, 122, 0.2);
}

.box-console-btn.is-solved:not(.is-locked):hover,
.box-console-btn.is-solved:not(.is-locked):focus-visible {
    box-shadow: inset 0 0 0 1px rgba(82, 255, 122, 0.36), 0 0 18px rgba(82, 255, 122, 0.3);
}

.ui-console-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}


.box-split {
    padding: 0;
    display: flex;
    gap: 0;
    min-height: clamp(64px, 10.5vh, 120px);
}

.box-split-3 {
    min-height: clamp(88px, 14vh, 170px);
}

.box-split-3 .box-square {
    flex-direction: column;
    gap: clamp(0.36rem, 0.85vh, 0.64rem);
    padding: clamp(0.38rem, 0.9vh, 0.7rem);
    min-height: clamp(88px, 14vh, 170px);
}

.box-square-title {
    display: block;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.64rem, 0.92vw, 0.84rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.15;
}

.box-square-instruments {
    justify-content: center;
}

.box-square-instruments .box-square-title {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.box-container-2 {
    --instrument-alert-color: #ff3b30;
    --instrument-ok-color: #52ff7a;
    border-color: transparent;
    position: relative;
}

.box-container-2 .box-square {
    border-right-color: transparent;
}

.box-processes-title {
    position: absolute;
    top: clamp(0.22rem, 0.62vh, 0.5rem);
    left: 66.6667%;
    transform: translateX(-50%);
    width: calc(100% * (2 / 3));
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.16em;
    visibility: hidden;
    pointer-events: none;
}

.box-container-2 .box-square-console-panel,
.box-container-2 .box-square-panel-empty {
    padding-top: clamp(1.28rem, 2.8vh, 2rem);
}

.instrument-grid {
    width: min(100%, 230px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(4px, 0.65vw, 8px);
}

.instrument-item {
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    place-items: center;
}

.instrument-item svg {
    width: 68%;
    height: 68%;
    fill: none;
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.instrument-item-secure,
.instrument-item-antenna {
    color: var(--instrument-alert-color);
    border-color: rgba(255, 59, 48, 0.72);
    background: rgba(255, 59, 48, 0.08);
}

.box-container-2.is-secure .instrument-item-antenna {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
}

.instrument-item-antenna.is-secure {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
}

.instrument-item-secure.is-linked {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
}

.instrument-item-access {
    color: var(--instrument-alert-color);
    border-color: rgba(255, 59, 48, 0.72);
    background: rgba(255, 59, 48, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.18);
}

.instrument-item-access.is-hacked {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
    box-shadow:
        inset 0 0 0 1px rgba(82, 255, 122, 0.22),
        0 0 10px rgba(82, 255, 122, 0.26);
}

.instrument-item-access svg {
    width: 74%;
    height: 74%;
    stroke: currentColor;
}

.instrument-item-launch {
    color: var(--instrument-alert-color);
    border-color: rgba(255, 59, 48, 0.72);
    background: rgba(255, 59, 48, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.18);
}

.instrument-item-launch.is-validated {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
    box-shadow:
        inset 0 0 0 1px rgba(82, 255, 122, 0.22),
        0 0 10px rgba(82, 255, 122, 0.26);
}

.instrument-item-launch svg {
    width: 74%;
    height: 74%;
    stroke: currentColor;
    fill: none;
}

.instrument-item-launch-final {
    color: var(--instrument-alert-color);
    border-color: rgba(255, 59, 48, 0.72);
    background: rgba(255, 59, 48, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.18);
}

.instrument-item-launch-final svg {
    width: 72%;
    height: 72%;
    stroke: currentColor;
    fill: none;
}

.instrument-item-launch-final.is-launched {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
    box-shadow:
        inset 0 0 0 1px rgba(82, 255, 122, 0.22),
        0 0 10px rgba(82, 255, 122, 0.26);
}

.instrument-item-power {
    color: var(--instrument-alert-color);
    border-color: rgba(255, 59, 48, 0.72);
    background: rgba(255, 59, 48, 0.08);
}

.instrument-item-power.is-on {
    box-shadow:
        inset 0 0 0 1px rgba(255, 59, 48, 0.26),
        0 0 11px rgba(255, 59, 48, 0.34);
    animation: instrumentPowerPulse 1.8s ease-in-out infinite;
}

.instrument-item-power svg {
    width: 70%;
    height: 70%;
    fill: currentColor;
    stroke: none;
    filter: drop-shadow(0 0 6px rgba(255, 59, 48, 0.36));
}

.instrument-item-power.is-verified {
    color: var(--instrument-ok-color);
    border-color: rgba(82, 255, 122, 0.72);
    background: rgba(82, 255, 122, 0.1);
}

.instrument-item-power.is-on.is-verified {
    animation: none;
    box-shadow:
        inset 0 0 0 1px rgba(82, 255, 122, 0.26),
        0 0 11px rgba(82, 255, 122, 0.34);
}

.instrument-item-power.is-verified svg {
    filter: drop-shadow(0 0 6px rgba(82, 255, 122, 0.36));
}

.instrument-item-power svg path {
    fill: currentColor;
    stroke: none;
}

.instrument-item-secure svg,
.instrument-item-antenna svg {
    width: 84%;
    height: 84%;
    stroke: currentColor;
}

.instrument-item-secure svg *,
.instrument-item-antenna svg * {
    stroke: currentColor;
}

.instrument-item-secure text {
    fill: currentColor;
    stroke: none;
}

@keyframes instrumentPowerPulse {
    0%, 100% {
        box-shadow:
            inset 0 0 0 1px rgba(255, 59, 48, 0.2),
            0 0 9px rgba(255, 59, 48, 0.3);
    }
    50% {
        box-shadow:
            inset 0 0 0 1px rgba(255, 59, 48, 0.32),
            0 0 14px rgba(255, 59, 48, 0.5);
    }
}

.box-square-console-panel {
    flex-direction: column;
    gap: clamp(0.28rem, 0.7vh, 0.56rem);
    justify-content: center;
    align-items: center;
    min-height: clamp(88px, 14vh, 170px);
    overflow: visible;
}

.box-launch-row {
    position: relative;
    overflow: hidden;
    border-color: transparent;
}

.box-launch-row .box-square {
    transition: opacity 1s ease;
    border-right-color: transparent;
}

.box-launch-row:not(.is-unlocked) .box-square {
    opacity: 0;
    pointer-events: none;
}

.box-launch-row.is-unlocked .box-square {
    opacity: 1;
    pointer-events: auto;
}

.box-launch-row .box-square-secondary-split .box-subcell-top {
    border-right-color: transparent;
}

.launch-row-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1s ease;
}

.box-launch-row.is-unlocked .launch-row-overlay {
    opacity: 0;
}

.launch-row-overlay .box-container-3-art {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.box-container-3-art-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.box-container-3-art-frame {
    opacity: 0.98;
}

.box-container-3-art-frame [data-lock-stroke] {
    vector-effect: non-scaling-stroke;
}

.box-container-3-lock-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.55rem, 1.8vw, 1.4rem);
    padding: clamp(10px, 2.5vh, 24px) clamp(14px, 2.8vw, 30px);
    pointer-events: none;
    overflow: visible;
}

.box-container-3-lock-icon {
    width: clamp(34px, 4.6vw, 74px) !important;
    height: auto !important;
    flex: 0 0 auto;
    min-width: 30px;
    min-height: 26px;
    display: block;
    opacity: 1;
    z-index: 2;
    filter:
        drop-shadow(0 0 4px rgba(255, 255, 255, 0.42))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.24));
}

.box-container-3-lock-text {
    color: #ffffff;
    font-family: 'Orbitron', 'Rajdhani', 'Share Tech Mono', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: clamp(0.86rem, 2.4vw, 2rem);
    letter-spacing: clamp(0.04em, 0.18vw, 0.13em);
    line-height: 1;
    white-space: normal;
    text-wrap: balance;
    max-width: min(74%, 640px);
    text-transform: uppercase;
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.36),
        0 0 12px rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    .box-launch-row:not(.is-unlocked) .launch-row-overlay .box-container-3-lock-center {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .box-container-3-lock-center {
        gap: clamp(0.34rem, 1.2vw, 0.76rem);
        padding: clamp(8px, 2.2vh, 14px) clamp(10px, 2.4vw, 16px);
    }

    .box-container-3-lock-text {
        font-size: clamp(0.66rem, 2.1vw, 1.1rem);
        letter-spacing: clamp(0.035em, 0.16vw, 0.1em);
        max-width: min(70%, 520px);
        text-align: center;
    }

    .box-container-3-lock-icon {
        width: clamp(30px, 5vw, 52px) !important;
    }
}

.box-square-launch {
    padding: 0;
    display: grid;
    place-items: stretch;
}

.launch-prep-btn {
    --console-btn-text: #ffffff;
    width: 100%;
    max-width: none;
    height: 125%;
    min-height: 125%;
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.02;
    padding: clamp(0.3em, 0.5vh, 0.52em) clamp(0.46em, 0.82vw, 0.86em);
    letter-spacing: clamp(0.06em, 0.15vh, 0.11em);
    font-size: clamp(0.56rem, calc(0.52vw + 0.9vh), 1.08rem);
}

.launch-prep-btn.ui-console-btn {
    min-width: 0;
    max-width: none;
}

.launch-prep-btn.ui-console-btn:not(.is-locked):hover,
.launch-prep-btn.ui-console-btn:not(.is-locked):focus-visible {
    transform: translateY(-1px);
}

.launch-prep-btn-label {
    display: block;
    color: currentColor;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    white-space: normal;
}

.launch-prep-btn.is-locked {
    --console-btn-text: #8e96a3;
    --console-btn-bg: rgba(0, 0, 0, 0.62);
    --console-btn-bg-hover: rgba(0, 0, 0, 0.62);
    opacity: 0.74;
    box-shadow: inset 0 0 0 1px rgba(140, 148, 162, 0.18);
    cursor: default;
}

.launch-prep-btn.ui-console-btn.is-locked {
    border-color: rgba(142, 150, 163, 0.56);
    box-shadow: inset 0 0 0 1px rgba(140, 148, 162, 0.18), 0 0 0 transparent;
}

.launch-prep-btn.ui-console-btn.is-locked:hover,
.launch-prep-btn.ui-console-btn.is-locked:focus-visible {
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(140, 148, 162, 0.2), 0 0 0 transparent;
}

.launch-prep-btn.is-ready:not(.is-locked):not(.is-completed),
.launch-prep-btn:not(.is-locked):not(.is-completed) {
    --console-btn-text: #ffffff;
    --console-btn-bg: rgba(6, 14, 20, 0.78);
    --console-btn-bg-hover: rgba(9, 18, 26, 0.86);
    box-shadow: inset 0 0 0 1px rgba(200, 244, 255, 0.16), 0 0 14px rgba(193, 247, 255, 0.14);
}

.launch-prep-btn.is-completed:not(.is-locked) {
    --console-btn-text: #52ff7a;
    --console-btn-bg: rgba(11, 40, 24, 0.9);
    --console-btn-bg-hover: rgba(14, 56, 30, 0.96);
    box-shadow: inset 0 0 0 1px rgba(88, 255, 128, 0.3), 0 0 20px rgba(82, 255, 122, 0.24);
}

.launch-prep-btn.is-completed:not(.is-locked):hover,
.launch-prep-btn.is-completed:not(.is-locked):focus-visible {
    box-shadow: inset 0 0 0 1px rgba(88, 255, 128, 0.4), 0 0 24px rgba(82, 255, 122, 0.32);
}

.box-square-secondary-split {
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.box-square-secondary-split .box-subcell {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(0.26rem, 0.62vh, 0.54rem);
}

.box-square-secondary-split .box-subcell-top {
    grid-template-rows: minmax(0, 1fr);
    align-content: center;
    gap: 0;
    border-right: 3px solid rgba(255, 255, 255, 0.56);
}

.box-square-secondary-split .box-subcell-bottom {
    align-content: center;
}

.box-subcell-title {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.52rem, calc(0.34vw + 0.38vh), 0.72rem);
    letter-spacing: 0.08em;
    line-height: 1.08;
}

.box-square-secondary-split .box-subcell-bottom.box-subcell-bottom--ascii {
    align-content: stretch;
    padding: clamp(0.18rem, 0.5vh, 0.42rem);
}

.launch-terminal-modal {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 243, 186, 0.56);
    background:
        linear-gradient(180deg, rgba(20, 18, 8, 0.94), rgba(6, 6, 6, 0.97)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 225, 110, 0.08) 0 1px,
            rgba(0, 0, 0, 0.02) 1px 3px
        );
    box-shadow:
        inset 0 0 0 1px rgba(255, 247, 210, 0.15),
        0 0 16px rgba(255, 208, 72, 0.18);
    overflow: hidden;
}

.launch-terminal-modal[role="button"] {
    cursor: pointer;
}

.launch-terminal-modal[role="button"]:focus-visible {
    outline: 1px solid rgba(255, 235, 164, 0.8);
    outline-offset: 1px;
}

.launch-terminal-modal__screen {
    margin: 0;
    flex: 0 0 42%;
    min-height: 0;
    padding: clamp(0.22rem, 0.52vh, 0.48rem) clamp(0.26rem, 0.68vw, 0.56rem);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff6cf;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.34rem;
    line-height: 1;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: wrap;
    overflow: hidden;
    text-align: left;
    text-shadow: 0 0 8px rgba(255, 227, 129, 0.38);
}

.launch-terminal-ascii-block {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1;
}

.launch-terminal-ascii-line {
    display: block;
    line-height: 1;
}

.launch-terminal-ascii-char {
    visibility: visible;
}

.launch-terminal-ascii-char.is-hidden {
    visibility: hidden;
}

.launch-terminal-modal__svg-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(5px);
    overflow: hidden;
    background: #000000;
    border-top: 1px solid rgba(255, 221, 116, 0);
    transition:
        opacity 0.26s ease,
        transform 0.26s ease,
        border-color 0.26s ease;
}

.launch-terminal-modal.is-svg-visible .launch-terminal-modal__svg-wrap {
    opacity: 1;
    transform: translateY(0);
    border-top-color: rgba(255, 221, 116, 0.38);
}

.launch-terminal-modal__svg {
    display: block;
    position: relative;
    top: -10px;
    width: 100%;
    height: 100%;
    transform: scale(1.25);
    transform-origin: center center;
}

.launch-terminal-modal.is-sim-complete .launch-terminal-modal__svg [stroke]:not([stroke="#FF2A2A" i]) {
    stroke: #52ff7a !important;
}

.launch-terminal-modal.is-sim-complete .launch-terminal-modal__svg [fill]:not([fill="none" i]):not([fill="#FF2A2A" i]) {
    fill: #52ff7a !important;
}

.launch-run-btn {
    --launch-run-neon: #ff3b30;
    --launch-run-text: #ff3b30;
    width: min(100%, clamp(102px, 10.4vw, 156px));
    height: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    place-self: center;
    padding: 0;
    border: none;
    min-width: 0;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    transform: translateZ(0);
    transition:
        transform 0.16s ease,
        filter 0.2s ease;
}

.launch-run-btn.ui-console-btn {
    border: none;
    background: transparent;
    box-shadow: none;
    min-width: 0;
    text-transform: none;
    letter-spacing: 0;
    padding: 0;
}

.launch-run-btn.ui-console-btn:hover,
.launch-run-btn.ui-console-btn:focus-visible {
    background: transparent;
    box-shadow: none;
    outline: none;
}

.launch-run-btn:disabled {
    opacity: 1;
    cursor: default;
    box-shadow: none;
}

.launch-run-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.launch-run-shell {
    fill: #1a1a20;
    stroke: #2c2c36;
    stroke-width: 8;
}

.launch-run-ring {
    fill: none;
    stroke: var(--launch-run-neon);
    stroke-width: 16;
}

.launch-run-core {
    fill: #121218;
}

.launch-run-text {
    fill: var(--launch-run-text);
    font-family: 'Orbitron', 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: 48px;
    letter-spacing: 2px;
    transition: letter-spacing 0.16s ease, fill 0.2s ease;
}

.launch-run-btn.is-locked {
    --launch-run-neon: #737984;
    --launch-run-text: #808793;
    pointer-events: none;
    cursor: default;
}

.launch-run-btn.is-locked,
.launch-run-btn.is-locked:hover,
.launch-run-btn.is-locked:focus-visible,
.launch-run-btn.is-locked:active {
    transform: none;
    box-shadow: none;
}

.launch-run-btn.is-ready {
    --launch-run-neon: #ff3b30;
    --launch-run-text: #ff3b30;
    cursor: pointer;
}

.launch-run-btn.is-ready:hover,
.launch-run-btn.is-ready:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.launch-run-btn.is-ready:active {
    transform: scale(0.982);
}

.launch-run-btn.is-validated {
    --launch-run-neon: #00ff40;
    --launch-run-text: #00ff40;
    cursor: pointer;
}

.launch-run-btn.is-validated:hover,
.launch-run-btn.is-validated:focus-visible {
    transform: translateY(-1px) scale(1.026);
    filter: brightness(1.12);
}

.launch-run-btn.is-validated:hover .launch-run-ring,
.launch-run-btn.is-validated:focus-visible .launch-run-ring {
    animation: launchRunRingHoverPulse 1.28s ease-in-out infinite;
}

.launch-run-btn.is-validated:hover .launch-run-text,
.launch-run-btn.is-validated:focus-visible .launch-run-text {
    letter-spacing: 2.6px;
}

.launch-run-btn.is-validated:active {
    transform: scale(0.976);
}

.launch-run-btn.is-launched {
    --launch-run-neon: #ff3b30;
    --launch-run-text: #ff3b30;
    cursor: default;
    pointer-events: none;
}

.launch-run-btn.is-launched,
.launch-run-btn.is-launched:hover,
.launch-run-btn.is-launched:focus-visible,
.launch-run-btn.is-launched:active {
    transform: none;
    filter: none;
}

.launch-run-btn.is-feedback-error {
    animation: launchRunErrorHit 0.34s steps(2, end);
}

.launch-run-btn.is-feedback-launch {
    animation: launchRunLaunchHit 0.46s ease-out;
}

@keyframes launchRunErrorHit {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-1px); }
    60% { transform: translateX(1px); }
}

@keyframes launchRunLaunchHit {
    0% { transform: scale(1); filter: brightness(1); }
    35% { transform: scale(1.05); filter: brightness(1.24); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes launchRunRingHoverPulse {
    0%, 100% { stroke-width: 16; }
    50% { stroke-width: 18; }
}

.box-square-console-panel .ui-console-btn,
.box-square-panel-empty .ui-console-btn {
    width: min(100%, 230px);
}

.box-square-panel-empty {
    flex-direction: column;
    gap: clamp(0.34rem, 0.8vh, 0.68rem);
    align-items: center;
    justify-content: center;
}

.box-square {
    flex: 1;
    border-right: 5px solid #ffffff;
    min-height: clamp(64px, 10.5vh, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
}

.box-square:last-child {
    border-right: none;
}


.retro-alert-trigger {
    position: relative;
    border: 2px solid rgba(255, 129, 88, 0.94);
    padding: 0.72rem 1.26rem;
    background:
        linear-gradient(180deg, rgba(19, 24, 31, 0.96), rgba(8, 12, 18, 0.96)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.05) 0 2px,
            rgba(0, 0, 0, 0) 2px 4px
        );
    color: #ffd28a;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: clamp(0.75rem, 1.14vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(255, 154, 110, 0.55);
    cursor: pointer;
    transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
    box-shadow:
        0 0 0 1px rgba(12, 16, 22, 0.85) inset,
        0 0 12px rgba(255, 126, 92, 0.32);
}

.retro-alert-trigger::before {
    content: '';
    position: absolute;
    inset: 1px;
    border: 1px dashed rgba(255, 208, 148, 0.35);
    pointer-events: none;
}

.retro-alert-trigger:hover,
.retro-alert-trigger:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow:
        0 0 0 1px rgba(12, 16, 22, 0.85) inset,
        0 0 20px rgba(255, 126, 92, 0.58);
}

.retro-alert-trigger:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.alert-sequence-layer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    pointer-events: none;
}

.alert-sequence-layer.is-close-ready {
    pointer-events: auto;
}

.alert-sequence-window {
    position: fixed;
    width: min(540px, calc(100vw - 28px));
    padding: 0.9rem 1.08rem 1.12rem;
    border: 1px solid rgba(255, 154, 106, 0.86);
    background:
        linear-gradient(180deg, rgba(16, 12, 7, 0.9), rgba(10, 8, 6, 0.86)),
        repeating-linear-gradient(
            180deg,
            rgba(236, 248, 255, 0.06) 0 1px,
            rgba(0, 0, 0, 0.02) 1px 3px
        );
    color: #ffe1bb;
    text-transform: uppercase;
    font-family: 'Courier New', 'Lucida Console', monospace;
    letter-spacing: 0.07em;
    box-shadow:
        0 0 0 1px rgba(255, 201, 150, 0.2) inset,
        0 0 30px rgba(255, 165, 95, 0.32);
    pointer-events: none;
    animation:
        retroAlertWindowGlitchIn 0.4s steps(2, end),
        retroAlertWindowIdlePulse 2.7s ease-in-out infinite;
}

.alert-sequence-window.is-close-ready {
    pointer-events: auto;
    cursor: crosshair;
    border-color: rgba(255, 158, 118, 0.94);
}

.alert-sequence-window.is-warning {
    border-color: rgba(255, 212, 125, 0.92);
    background:
        linear-gradient(180deg, rgba(38, 27, 8, 0.94), rgba(19, 13, 5, 0.92)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 221, 132, 0.09) 0 1px,
            rgba(0, 0, 0, 0.04) 1px 3px
        );
    color: #ffeabb;
    box-shadow:
        0 0 0 1px rgba(255, 224, 165, 0.26) inset,
        0 0 34px rgba(255, 192, 84, 0.36);
}

.alert-sequence-window.is-warning .alert-sequence-window-title {
    color: #ffe19a;
    text-shadow: 0 0 10px rgba(255, 214, 132, 0.52);
}

.alert-sequence-window.is-warning .alert-sequence-window-message {
    text-shadow:
        0 0 7px rgba(255, 211, 118, 0.58),
        0 0 15px rgba(255, 173, 74, 0.28);
}

.alert-sequence-window.is-warning .alert-sequence-window-close-hint {
    color: rgba(255, 236, 185, 0.86);
}

.alert-sequence-window.is-error {
    border-color: rgba(255, 120, 120, 0.88);
    background:
        linear-gradient(180deg, rgba(24, 9, 12, 0.93), rgba(11, 5, 8, 0.9)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 132, 132, 0.09) 0 1px,
            rgba(0, 0, 0, 0.04) 1px 3px
        );
    color: #ffd2d2;
    box-shadow:
        0 0 0 1px rgba(255, 180, 180, 0.2) inset,
        0 0 30px rgba(255, 78, 78, 0.42);
}

.alert-sequence-window.is-error .alert-sequence-window-title {
    color: #ffb0b0;
    text-shadow: 0 0 10px rgba(255, 133, 133, 0.52);
}

.alert-sequence-window.is-error .alert-sequence-window-message {
    text-shadow:
        0 0 7px rgba(255, 122, 122, 0.58),
        0 0 15px rgba(255, 78, 78, 0.32);
}

.alert-sequence-window-head {
    display: flex;
    align-items: center;
    gap: 0.56rem;
}

.alert-sequence-window-icon {
    display: inline-flex;
    width: 1.85rem;
    height: 1.85rem;
    flex: 0 0 1.85rem;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 7px rgba(255, 120, 90, 0.58));
    animation: retroAlertIconFlicker 1.35s steps(2, end) infinite;
}

.alert-sequence-window-icon svg {
    width: 100%;
    height: 100%;
}

.alert-sequence-window-close-hint {
    margin: 0.6rem 0 0;
    opacity: 0;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: rgba(154, 255, 213, 0.82);
    transition: opacity 0.16s ease;
}

.alert-sequence-window.is-close-ready .alert-sequence-window-close-hint {
    opacity: 1;
}

.alert-sequence-window::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255, 187, 146, 0.24);
    pointer-events: none;
}

.alert-sequence-window::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 3%,
        rgba(0, 0, 0, 0) 24%
    );
    mix-blend-mode: screen;
    pointer-events: none;
}

.alert-sequence-window-title {
    margin: 0;
    color: #9fffd7;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-shadow: 0 0 10px rgba(108, 255, 210, 0.45);
}

.alert-sequence-window-message {
    margin: 0.58rem 0 0;
    font-size: clamp(0.82rem, 1.06vw, 1.08rem);
    line-height: 1.36;
    white-space: pre-line;
    text-shadow:
        0 0 6px rgba(255, 143, 90, 0.48),
        0 0 12px rgba(255, 143, 90, 0.3);
}

.alert-sequence-window.is-critical {
    width: min(680px, calc(100vw - 26px));
    min-height: clamp(188px, 26vh, 270px);
    border: 2px solid rgba(255, 106, 106, 0.96);
    background:
        linear-gradient(180deg, rgba(30, 8, 12, 0.94), rgba(14, 5, 10, 0.94)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 120, 120, 0.09) 0 2px,
            rgba(0, 0, 0, 0.06) 2px 5px
        );
    box-shadow:
        0 0 0 1px rgba(255, 185, 185, 0.24) inset,
        0 0 44px rgba(255, 48, 48, 0.58);
    animation:
        retroAlertWindowGlitchIn 0.44s steps(2, end),
        retroAlertCriticalPulse 1.06s steps(2, end) infinite;
}

.alert-sequence-window.is-critical .alert-sequence-window-title {
    color: #ff9f9f;
    font-size: 0.92rem;
    letter-spacing: 0.24em;
}

.alert-sequence-window.is-critical .alert-sequence-window-message {
    margin-top: 0.72rem;
    font-size: clamp(0.96rem, 1.24vw, 1.34rem);
    line-height: 1.42;
    text-shadow:
        0 0 8px rgba(255, 113, 113, 0.62),
        0 0 18px rgba(255, 70, 70, 0.34);
}

.alert-sequence-window.is-critical .alert-sequence-window-close-hint {
    color: rgba(255, 214, 214, 0.86);
    font-size: 0.74rem;
}

@keyframes retroAlertWindowGlitchIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 16px, 0) scale(0.96);
        clip-path: inset(0 0 100% 0);
    }
    18% {
        opacity: 0.92;
        transform: translate3d(-8px, -2px, 0) scale(1.01);
        clip-path: inset(0 0 56% 0);
    }
    33% {
        transform: translate3d(8px, 3px, 0);
        clip-path: inset(38% 0 32% 0);
    }
    52% {
        transform: translate3d(-6px, -3px, 0);
        clip-path: inset(62% 0 12% 0);
    }
    72% {
        transform: translate3d(3px, 1px, 0) scale(1.01);
        clip-path: inset(16% 0 42% 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
}

@keyframes retroAlertWindowIdlePulse {
    0%, 100% {
        filter: saturate(1) brightness(1);
    }
    50% {
        filter: saturate(1.12) brightness(1.06);
    }
}

@keyframes retroAlertIconFlicker {
    0%, 100% {
        opacity: 0.96;
        transform: translate3d(0, 0, 0);
    }
    30% {
        opacity: 0.72;
        transform: translate3d(-1px, 0, 0);
    }
    62% {
        opacity: 1;
        transform: translate3d(1px, 0, 0);
    }
}

@keyframes retroAlertCriticalPulse {
    0%, 100% {
        filter: brightness(1) saturate(1);
        transform: translate3d(0, 0, 0);
    }
    24% {
        filter: brightness(1.16) saturate(1.22);
        transform: translate3d(-1px, 0, 0);
    }
    46% {
        filter: brightness(0.92) saturate(1);
        transform: translate3d(1px, 0, 0);
    }
    68% {
        filter: brightness(1.12) saturate(1.18);
        transform: translate3d(-1px, 0, 0);
    }
}

body.defense-radar-open {
    overflow: hidden;
}

.defense-radar-overlay {
    position: fixed;
    inset: 0;
    z-index: 6200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.65rem, 1.8vh, 1.4rem);
    background: radial-gradient(circle at 50% 50%, rgba(0, 40, 23, 0.24), rgba(0, 0, 0, 0.94));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.defense-radar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.defense-radar-overlay.is-intro-playing {
    animation: defenseRadarOverlayPopupIn 0.22s ease-out both;
}

.defense-radar-overlay.is-intro-playing .defense-radar-shell {
    animation: defenseRadarShellPopupIn 0.24s ease-out both;
    will-change: transform, opacity, filter;
}

.defense-radar-shell {
    position: relative;
    width: min(1240px, 96vw);
    height: min(92vh, 860px);
    display: grid;
    grid-template-rows: auto 1fr;
    border: 1px solid rgba(104, 255, 169, 0.42);
    background:
        linear-gradient(180deg, rgba(3, 17, 11, 0.95), rgba(1, 9, 7, 0.95)),
        repeating-linear-gradient(
            180deg,
            rgba(58, 255, 137, 0.06) 0 1px,
            rgba(0, 0, 0, 0.02) 1px 3px
        );
    box-shadow:
        0 0 0 1px rgba(0, 255, 103, 0.2) inset,
        0 0 42px rgba(0, 255, 138, 0.2);
    transform: translateY(10px) scale(0.986);
    transition: transform 0.2s ease, box-shadow 0.24s ease, filter 0.24s ease;
    overflow: hidden;
}

.defense-radar-overlay.is-open .defense-radar-shell {
    transform: translateY(0) scale(1);
}

.defense-radar-head {
    padding: 0.72rem 1rem;
    border-bottom: 1px solid rgba(68, 255, 140, 0.38);
    background: linear-gradient(180deg, rgba(8, 40, 25, 0.7), rgba(3, 24, 16, 0.56));
}

.defense-radar-title {
    margin: 0;
    color: #b5ffd0;
    font-size: clamp(0.9rem, 1.2vw, 1.08rem);
    letter-spacing: 0.18em;
    font-family: 'Courier New', 'Lucida Console', monospace;
}

.defense-radar-subtitle {
    margin: 0.3rem 0 0;
    color: rgba(167, 255, 206, 0.8);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    font-family: 'Courier New', 'Lucida Console', monospace;
}

.defense-radar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 34%);
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.defense-radar-stage {
    position: relative;
    --radar-square-size: min(74vh, 74vw);
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    cursor: none;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(0, 40, 24, 0.44), #010e08 72%);
}

.defense-radar-stage::before,
.defense-radar-stage::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--radar-square-size);
    height: var(--radar-square-size);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.defense-radar-stage::before {
    border: 1px solid rgba(116, 255, 181, 0.52);
    box-shadow:
        0 0 0 1px rgba(91, 255, 162, 0.18) inset,
        0 0 26px rgba(62, 255, 160, 0.16);
    z-index: 1;
}

.defense-radar-stage::after {
    width: calc(var(--radar-square-size) - 16px);
    height: calc(var(--radar-square-size) - 16px);
    border: 1px solid rgba(124, 255, 182, 0.18);
    z-index: 1;
}

.defense-radar-canvas {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    z-index: 0;
    background: #010d08;
}

.defense-radar-activation-countdown {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    width: min(88%, calc(var(--radar-square-size) - 24px));
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    color: var(--defense-radar-activation-color, #ffffff);
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: clamp(2rem, 8vw, 5.2rem);
    letter-spacing: 0.16em;
    line-height: 1.14;
    text-align: center;
    word-break: normal;
    overflow-wrap: anywhere;
    white-space: normal;
    text-shadow: 0 0 18px rgba(123, 255, 177, 0.72);
    pointer-events: none;
    z-index: 8;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.defense-radar-activation-countdown.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.defense-radar-activation-countdown.is-approaching-alert {
    width: min(94%, calc(var(--radar-square-size) - 12px));
    font-size: clamp(1.25rem, 6.6vw, 3.8rem);
    letter-spacing: 0.1em;
    line-height: 1.08;
    color: #ff3f3f;
    text-shadow: 0 0 20px rgba(255, 72, 72, 0.78);
}

.defense-radar-hud {
    position: absolute;
    top: max(0.55rem, calc(50% - (var(--radar-square-size) / 2) - 2.2rem));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.52rem;
    pointer-events: none;
    font-family: 'Courier New', 'Lucida Console', monospace;
    z-index: 7;
}

.defense-radar-hud-item {
    margin: 0;
    padding: 0.24rem 0.52rem;
    color: #cbffe0;
    border: 1px solid rgba(90, 255, 160, 0.46);
    background: #061a11;
    font-size: clamp(0.66rem, 0.84vw, 0.84rem);
    letter-spacing: 0.09em;
    white-space: nowrap;
}

.defense-radar-side {
    border-left: 1px solid rgba(120, 255, 176, 0.32);
    background:
        linear-gradient(180deg, rgba(3, 18, 11, 0.96), rgba(1, 9, 6, 0.96)),
        repeating-linear-gradient(
            180deg,
            rgba(148, 255, 192, 0.07) 0 1px,
            rgba(0, 0, 0, 0) 1px 4px
        );
    display: grid;
    grid-template-rows: auto auto 1fr;
    box-shadow:
        inset 0 0 0 1px rgba(71, 255, 149, 0.14),
        inset 0 0 24px rgba(47, 255, 138, 0.08);
    min-height: 0;
}

.defense-radar-side-bar {
    min-height: 34px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(56, 255, 138, 0.44);
    background: linear-gradient(180deg, rgba(29, 120, 62, 0.44), rgba(8, 34, 18, 0.84));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.defense-radar-side-title {
    color: #98ffbe;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.72rem, 0.84vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(98, 255, 160, 0.34);
}

.defense-radar-side-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7fffba;
    box-shadow:
        0 0 0 1px rgba(111, 255, 174, 0.56),
        0 0 12px rgba(111, 255, 174, 0.8);
    animation: defenseRadarSideLedPulse 1.2s ease-in-out infinite;
}

.defense-radar-side-timer-wrap {
    padding: 0.68rem 0.86rem 0.64rem;
    border-bottom: 1px solid rgba(120, 255, 176, 0.28);
    background:
        linear-gradient(180deg, rgba(40, 255, 123, 0.08), transparent 56%),
        rgba(3, 17, 8, 0.92);
}

.defense-radar-side-timer-label {
    margin: 0;
    color: rgba(178, 255, 212, 0.8);
    font-size: 0.66rem;
    letter-spacing: 0.11em;
    line-height: 1.34;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(82, 255, 156, 0.24);
}

.defense-radar-side-timer-label strong {
    color: #eafff2;
    font-weight: 700;
}

.defense-radar-side-timer-value {
    margin: 0.22rem 0 0;
    color: #cbffe0;
    font-size: clamp(1.06rem, 1.6vw, 1.66rem);
    letter-spacing: 0.12em;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(123, 255, 177, 0.48);
}

.defense-radar-side-console {
    position: relative;
    min-height: 0;
    padding: 0.62rem 0.86rem;
    background:
        linear-gradient(180deg, rgba(40, 255, 123, 0.05), transparent 22%),
        rgba(3, 17, 8, 0.9);
    overflow: hidden;
}

.defense-radar-side-console::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(167, 255, 214, 0.08) 0 1px,
            rgba(0, 0, 0, 0.16) 1px 3px
        );
    opacity: 0.4;
    mix-blend-mode: screen;
}

.defense-radar-side-log {
    position: relative;
    z-index: 1;
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
    color: #d9ffe8;
    font-size: clamp(0.72rem, 0.92vw, 0.92rem);
    line-height: 1.55;
    letter-spacing: 0.08em;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
    text-transform: none;
    text-shadow: 0 0 7px rgba(56, 255, 138, 0.24);
}

.defense-radar-crosshair {
    position: absolute;
    width: 62px;
    height: 62px;
    left: 50%;
    top: 50%;
    opacity: 0;
    pointer-events: none;
    border: 1.4px solid rgba(137, 255, 186, 0.94);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(83, 255, 152, 0.52);
    transform: translate(-50%, -50%);
    z-index: 9;
    transition: opacity 0.09s linear;
}

.defense-radar-crosshair::before,
.defense-radar-crosshair::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: rgba(137, 255, 186, 0.94);
    transform: translate(-50%, -50%);
}

.defense-radar-crosshair::before {
    width: 1px;
    height: 76px;
}

.defense-radar-crosshair::after {
    width: 76px;
    height: 1px;
}

.defense-radar-crosshair.is-visible {
    opacity: 1;
}

.defense-radar-damage-flash {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(255, 0, 0, 0.84);
}

.defense-radar-damage-flash.is-active {
    animation: defenseRadarDamageFlash 0.34s ease-out;
}

.defense-radar-no-ammo {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    width: min(86%, calc(var(--radar-square-size) - 20px));
    opacity: 0;
    transform: translate(-50%, -50%);
    color: #ffd2d2;
    font-size: clamp(1.4rem, 4.2vw, 2.8rem);
    letter-spacing: 0.18em;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255, 98, 98, 0.7);
    pointer-events: none;
    z-index: 10;
}

.defense-radar-no-ammo.is-visible {
    animation: defenseRadarNoAmmoPulse 0.95s ease-in-out infinite;
}

.defense-radar-failure-text {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    color: #ff5f5f;
    font-size: clamp(2rem, 8vw, 6rem);
    letter-spacing: 0.16em;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-weight: 700;
    text-shadow: 0 0 18px rgba(255, 54, 54, 0.84);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.defense-radar-failure-text.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.defense-radar-modal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(0.8rem, 2.4vw, 2rem);
    background: rgba(0, 0, 0, 0.66);
}

.defense-radar-modal--gameover {
    z-index: 12;
}

.defense-radar-modal.is-open {
    display: flex;
}

.defense-radar-modal-panel,
.defense-radar-victory-panel {
    width: min(620px, 92vw);
    border: 1px solid rgba(160, 255, 198, 0.4);
    background:
        linear-gradient(180deg, rgba(4, 26, 17, 0.96), rgba(3, 17, 12, 0.94)),
        repeating-linear-gradient(
            180deg,
            rgba(158, 255, 198, 0.05) 0 1px,
            rgba(0, 0, 0, 0) 1px 4px
        );
    padding: 1rem 1.1rem 1.16rem;
    box-shadow:
        0 0 0 1px rgba(130, 255, 180, 0.16) inset,
        0 0 26px rgba(38, 255, 138, 0.18);
}

.defense-radar-modal-title {
    margin: 0;
    color: #ffb0b0;
    text-align: center;
    font-size: clamp(1rem, 1.7vw, 1.55rem);
    letter-spacing: 0.14em;
    font-family: 'Courier New', 'Lucida Console', monospace;
}

.defense-radar-modal-copy {
    margin: 0.86rem 0 0;
    color: #ffd2d2;
    text-align: center;
    font-size: clamp(0.8rem, 1vw, 1rem);
    letter-spacing: 0.08em;
    font-family: 'Courier New', 'Lucida Console', monospace;
}

.defense-radar-modal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.defense-radar-modal-btn {
    min-width: min(220px, 100%);
}

.defense-radar-modal--success {
    z-index: 13;
    flex-direction: column;
    gap: 0.84rem;
    align-items: center;
}

.defense-radar-modal--success.is-background-locked {
    background: rgba(0, 0, 0, 0.78);
}

.defense-radar-modal--success .defense-radar-success-panel {
    transition: opacity 0.2s ease, filter 0.24s ease;
}

.defense-radar-modal--success.is-background-locked .defense-radar-success-panel {
    opacity: 0.76;
    filter: saturate(0.62) brightness(0.72);
}

.defense-radar-modal--success.is-background-locked .defense-radar-success-continue {
    opacity: 0;
    pointer-events: none;
}

.defense-radar-modal--victory {
    z-index: 14;
    background: transparent;
    align-items: center;
    justify-content: center;
    padding: clamp(0.7rem, 2vw, 1.35rem);
}

.defense-radar-modal--victory .defense-radar-victory-panel {
    width: min(520px, 46vw);
    transform: translateY(10vh);
}

.defense-radar-success-panel {
    width: min(950px, 94vw);
    display: grid;
    grid-template-columns: minmax(180px, 42%) minmax(220px, 58%);
    border: 1px solid rgba(164, 255, 198, 0.42);
    background: linear-gradient(180deg, rgba(3, 26, 16, 0.94), rgba(2, 17, 11, 0.94));
    box-shadow:
        0 0 0 1px rgba(138, 255, 188, 0.2) inset,
        0 0 32px rgba(36, 255, 145, 0.18);
    min-height: min(420px, 64vh);
}

.defense-radar-success-cam {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-right: 1px solid rgba(164, 255, 198, 0.34);
    isolation: isolate;
}

.defense-radar-success-cam::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #000000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s linear;
}

.defense-radar-success-cam.is-loss-transition::before {
    opacity: 0.86;
}

.defense-radar-success-cam.is-signal-lost::before {
    opacity: 1;
}

.defense-radar-success-gif,
.defense-radar-success-frame {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: none;
    pointer-events: none;
    background: #000000;
}

.defense-radar-success-cam.is-playing-gif .defense-radar-success-gif {
    opacity: 1;
}

.defense-radar-success-cam.is-frame-visible .defense-radar-success-frame,
.defense-radar-success-cam.is-loss-transition .defense-radar-success-frame {
    opacity: 1;
}

.defense-radar-success-cam.is-frame-visible .defense-radar-success-frame {
    animation: defenseRadarSuccessFrameTransition 0.28s ease-out 1;
}

.defense-radar-success-cam-grid {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05) 0 1px,
        rgba(0, 0, 0, 0.2) 1px 4px
    );
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.5s linear;
    animation:
        defenseRadarSuccessNoiseDrift 0.4s steps(3, end) infinite,
        defenseRadarSuccessNoiseFlash 0.62s steps(2, end) infinite;
}

.defense-radar-success-cam-scan {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: linear-gradient(
        to bottom,
        transparent 0,
        transparent 46%,
        rgba(255, 255, 255, 0.9) 49%,
        rgba(255, 255, 255, 0.9) 51%,
        transparent 54%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.5s linear;
    mix-blend-mode: screen;
    animation: defenseRadarSuccessInterferenceBand 0.42s steps(2, end) infinite;
}

.defense-radar-success-cam.is-loss-transition .defense-radar-success-cam-grid,
.defense-radar-success-cam.is-signal-lost .defense-radar-success-cam-grid {
    opacity: 0.24;
}

.defense-radar-success-cam.is-loss-transition .defense-radar-success-cam-scan,
.defense-radar-success-cam.is-signal-lost .defense-radar-success-cam-scan {
    opacity: 0.16;
}

.defense-radar-success-lost {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(88%, calc(100% - 14px));
    margin: 0;
    transform: translate(-50%, -50%);
    color: #ff3b30;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.86rem, 1.36vw, 1.24rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 12px rgba(255, 68, 56, 0.66);
    background: rgba(0, 0, 0, 0.18);
    padding: 0.24rem 0.4rem;
    opacity: 0;
    transition: opacity 0.22s linear;
    pointer-events: none;
    z-index: 5;
}

.defense-radar-success-cam.is-signal-lost .defense-radar-success-lost {
    opacity: 1;
    animation: defenseRadarSuccessLostBlink 1s linear 0.24s infinite both;
}

.defense-radar-success-terminal {
    padding: 0.96rem;
}

.defense-radar-success-log {
    margin: 0;
    color: #d6ffe6;
    font-size: clamp(0.83rem, 1vw, 1.06rem);
    line-height: 1.58;
    letter-spacing: 0.08em;
    font-family: 'Courier New', 'Lucida Console', monospace;
    text-transform: uppercase;
    white-space: pre-wrap;
}

.defense-radar-success-continue {
    min-width: min(280px, 90vw);
}

.defense-radar-victory-copy {
    margin: 0;
    text-align: center;
    color: #d6ffe5;
    font-family: 'Courier New', 'Lucida Console', monospace;
    letter-spacing: 0.06em;
    line-height: 1.7;
    font-size: clamp(0.84rem, 1.05vw, 1.08rem);
    text-transform: uppercase;
}

@keyframes defenseRadarDamageFlash {
    0% { opacity: 0; }
    35% { opacity: 0.95; }
    100% { opacity: 0; }
}

@keyframes defenseRadarCamSweep {
    0% { transform: translateY(-42%); }
    100% { transform: translateY(42%); }
}

@keyframes defenseRadarSuccessNoiseFlash {
    0%, 100% { filter: contrast(1.02); }
    40% { filter: contrast(1.14); }
    75% { filter: contrast(1.08); }
}

@keyframes defenseRadarSuccessNoiseDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(8px); }
}

@keyframes defenseRadarSuccessInterferenceBand {
    0% {
        opacity: 0.08;
        transform: translateY(-3px);
    }
    50% {
        opacity: 0.28;
        transform: translateY(2px);
    }
    100% {
        opacity: 0.1;
        transform: translateY(4px);
    }
}

@keyframes defenseRadarSuccessLostBlink {
    0%, 49.99% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes defenseRadarSuccessFrameTransition {
    0% {
        opacity: 0;
        filter: contrast(1.26) saturate(1.12) blur(1px);
        transform: scale(1.014);
    }
    100% {
        opacity: 1;
        filter: contrast(1) saturate(1) blur(0);
        transform: scale(1);
    }
}

@keyframes defenseRadarNoAmmoPulse {
    0%, 100% {
        opacity: 0.16;
    }
    50% {
        opacity: 1;
    }
}

@keyframes defenseRadarOverlayPopupIn {
    0% {
        opacity: 0;
        filter: saturate(1.08) brightness(1.04);
    }
    100% {
        opacity: 1;
        filter: saturate(1) brightness(1);
    }
}

@keyframes defenseRadarShellPopupIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.986);
        filter: saturate(1.08) brightness(1.06);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: saturate(1) brightness(1);
    }
}

@keyframes defenseRadarSideLedPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.68;
        transform: scale(0.92);
    }
}

@media (max-width: 760px) {
    .defense-radar-shell {
        width: 100vw;
        max-width: 100vw;
        height: min(95dvh, 860px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        border-left: none;
        border-right: none;
    }

    .defense-radar-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(240px, 1fr) minmax(180px, 36%);
    }

    .defense-radar-stage::before {
        width: calc(100% - 10px);
        height: calc(100% - 10px);
    }

    .defense-radar-stage::after {
        width: calc(100% - 26px);
        height: calc(100% - 26px);
    }

    .defense-radar-hud {
        top: 0.55rem;
        max-width: calc(100% - 12px);
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.32rem;
    }

    .defense-radar-activation-countdown {
        width: calc(100% - 16px);
    }

    .defense-radar-activation-countdown.is-approaching-alert {
        width: calc(100% - 10px);
    }

    .defense-radar-no-ammo {
        width: calc(100% - 18px);
    }

    .defense-radar-side {
        border-left: none;
        border-top: 1px solid rgba(120, 255, 176, 0.32);
    }

    .defense-radar-success-panel {
        width: min(950px, 96vw);
        grid-template-columns: 1fr;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .defense-radar-success-cam {
        min-height: 180px;
        border-right: none;
        border-bottom: 1px solid rgba(164, 255, 198, 0.34);
    }

    .defense-radar-modal--victory {
        align-items: flex-start;
        justify-content: center;
        background: rgba(0, 0, 0, 0.16);
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    .defense-radar-modal--victory .defense-radar-victory-panel {
        width: min(620px, 94vw);
        max-height: calc(100dvh - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overflow-x: hidden;
        transform: none;
    }

    .defense-radar-modal--success {
        align-items: flex-start;
        justify-content: flex-start;
        max-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        padding-bottom: max(44px, env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    .defense-radar-modal--success .defense-radar-success-continue {
        margin-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }
}

.box-container-3 {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.box-container-3.is-relocated {
    display: none;
}

.box-container-3-art {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    min-height: 100%;
}


.page-wrapper.boot-done .box {
    animation: fadeInBox 0.4s ease-out forwards;
}

.page-wrapper.boot-done .container > .box:nth-child(1) { animation-delay: 0s; }
.page-wrapper.boot-done .container > .box:nth-child(2) { animation-delay: 0.44s; }
.page-wrapper.boot-done .container > .box:nth-child(3) { animation-delay: 0.88s; }
.page-wrapper.boot-done .container > .box:nth-child(4) { animation-delay: 1.32s; }
.page-wrapper.boot-done .box.side-box.side-box-left { animation-delay: 1.88s; }
.page-wrapper.boot-done .box.side-box.side-box-right { animation-delay: 1.88s; }

@keyframes fadeInBox {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hud {
        transition: none !important;
    }
}

@media (min-width: 901px) {
    :root {
        
        --left-box-width-vw: 16;
        --left-box-height-vh: 34;
        --left-box-offset-x-vw: 4.2;
        --left-box-offset-y-vh: 1.2;
    }

    .hud-boot {
        inset: 0;
        width: 100vw;
        height: 100dvh;
        display: grid;
        place-items: center;
    }

    .hud-wrap {
        width: 100vw;
        height: 100dvh;
    }

    .hud-wrap svg {
        width: 100%;
        height: 100%;
    }

    .hud-wrap img {
        width: 100%;
        height: 100%;
        object-fit: fill !important;
        object-position: center center;
    }

    
    .box.side-box-left {
        border: 5px solid transparent;
        width: calc(var(--left-box-width-vw) * 1vw);
        min-width: 0;
        max-width: none;
        height: calc(var(--left-box-height-vh) * 1vh);
        min-height: 0;
        max-height: none;
        justify-self: end;
        position: relative;
        left: -10%;
        margin-left: 0;
        margin-right: calc(var(--left-box-offset-x-vw) * 1vw);
        margin-top: calc(var(--left-box-offset-y-vh) * 1vh);
        padding: 0;
    }

    
    .box.side-box-right {
        border: 5px solid transparent;
        width: calc(var(--left-box-width-vw) * 1vw);
        min-width: 0;
        max-width: none;
        height: calc(var(--left-box-height-vh) * 1vh);
        min-height: 0;
        max-height: none;
        justify-self: start;
        position: relative;
        right: -10%;
        margin-left: calc(var(--left-box-offset-x-vw) * 1vw);
        margin-right: 0;
        margin-top: calc(var(--left-box-offset-y-vh) * 1vh);
        padding: 0;
    }

    .top-nav-timer {
        font-size: clamp(1.28rem, 2.7vw, 2.06rem);
    }
}

@media (max-width: 900px) {
    .intro-gate {
        top: calc(50% + clamp(130px, 30vmin, 210px));
    }

    .intro-gate .ui-console-btn--hero {
        width: min(88vw, 390px);
    }

    .top-nav {
        height: calc(var(--top-nav-height) + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
        z-index: 1200;
        background: #000000;
        backdrop-filter: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }

    .top-nav-timer {
        font-size: clamp(1.12rem, 5vw, 1.38rem);
    }

    .ui-console-btn--hero {
        width: 100%;
        font-size: clamp(0.98rem, 4.2vw, 1.18rem);
        letter-spacing: 0.1em;
    }

    .weak-signal-label {
        font-size: clamp(0.58rem, 2.05vw, 0.74rem);
    }

    .box-console-btn {
        min-width: clamp(64px, 18vw, 90px);
        font-size: clamp(0.66rem, 2.1vw, 0.78rem);
        padding: 0.34em 0.7em;
    }

    .box-square-console-panel {
        min-height: clamp(88px, 14vh, 132px);
    }

    .box-split-3 {
        flex-direction: column;
        min-height: auto;
    }

    .box-split-3 .box-square {
        border-right: none;
        border-bottom: 3px solid rgba(255, 255, 255, 0.56);
        min-height: clamp(64px, 12vh, 104px);
    }

    .box-split-3 .box-square:last-child {
        border-bottom: none;
    }

    .box-launch-row.is-unlocked {
        flex-direction: column;
        min-height: auto;
    }

    .box-launch-row.is-unlocked .box-square {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid rgba(255, 255, 255, 0.56);
    }

    .box-launch-row.is-unlocked .box-square:last-child {
        border-bottom: none;
    }

    .box-launch-row.is-unlocked .box-square-secondary-split {
        flex-direction: column;
    }

    .box-launch-row.is-unlocked .box-square-secondary-split .box-subcell-top {
        border-right: none;
        border-bottom: 3px solid rgba(255, 255, 255, 0.56);
    }

    .box-container-2 .box-square {
        border-bottom-color: transparent;
    }

    .box-processes-title {
        position: static;
        transform: none;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .box-container-2 .box-square-console-panel,
    .box-container-2 .box-square-panel-empty {
        padding-top: clamp(0.38rem, 0.9vh, 0.7rem);
    }

    .box-square-title {
        font-size: clamp(0.58rem, 1.95vw, 0.74rem);
    }

    .instrument-grid {
        width: min(100%, 210px);
        gap: clamp(4px, 1.1vw, 7px);
    }

    .cam-popup,
    .terminal-popup,
    .stabilizer-popup,
    .energy-popup,
    .launch-route-popup,
    .launch-surveillance-popup {
        place-items: start center;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .cam-popup-panel,
    .terminal-popup-panel,
    .stabilizer-popup-panel,
    .energy-popup-panel,
    .launch-route-panel,
    .launch-surveillance-panel {
        margin: 0 auto;
        max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overflow-x: hidden;
    }

    .defense-radar-overlay {
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        padding-left: 0;
        padding-right: 0;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    .defense-radar-shell {
        margin: 0;
        width: 100vw;
        max-width: 100vw;
        max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .terminal-popup-panel {
        width: 96vw;
    }

    .terminal-popup-bar {
        min-height: 34px;
        padding: 0 8px;
    }

    .terminal-popup-title {
        font-size: clamp(0.68rem, 2.35vw, 0.86rem);
    }

    .terminal-popup-close {
        width: 26px;
        height: 26px;
    }

    .terminal-popup-screen {
        min-height: clamp(180px, 35vh, 300px);
        font-size: clamp(0.72rem, 2.35vw, 0.92rem);
        line-height: 1.42;
    }

    .terminal-popup-input-wrap.is-visible {
        max-height: 52px;
        padding: 0 12px 10px;
        gap: 8px;
    }

    .terminal-popup-prompt {
        font-size: clamp(0.74rem, 2.3vw, 0.9rem);
    }

    .terminal-popup-input {
        height: clamp(32px, 5.1vh, 38px);
        font-size: clamp(0.7rem, 2.1vw, 0.86rem);
        padding: 0 8px;
    }

    .ui-console-btn.terminal-popup-send-btn {
        height: clamp(32px, 5.1vh, 38px);
        font-size: clamp(0.66rem, 1.95vw, 0.78rem);
        padding: 0.38em 0.74em;
    }

    .terminal-popup-footer {
        padding: 0 12px 12px;
    }

    .terminal-popup-note {
        font-size: clamp(0.7rem, 2.15vw, 0.84rem);
    }

    .stabilizer-popup-panel {
        width: 96vw;
        padding: 12px;
        gap: 10px;
    }

    .stabilizer-popup-title {
        font-size: clamp(0.8rem, 2.8vw, 1.04rem);
    }

    .stabilizer-popup-subtitle {
        font-size: clamp(0.58rem, 1.9vw, 0.72rem);
    }

    .stabilizer-controls-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stabilizer-band {
        padding: 8px;
    }

    .stabilizer-led-panel {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .stabilizer-popup-actions {
        grid-template-columns: 1fr;
    }

    .ui-console-btn.stabilizer-action-btn {
        font-size: clamp(0.62rem, 1.95vw, 0.76rem);
    }

    .energy-popup-panel {
        width: 96vw;
        padding: 12px;
        gap: 10px;
    }

    .energy-popup-title {
        font-size: clamp(0.76rem, 2.5vw, 0.98rem);
    }

    .energy-popup-subtitle {
        font-size: clamp(0.56rem, 1.8vw, 0.7rem);
    }

    .energy-popup-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .energy-map-column {
        grid-template-columns: minmax(0, 1fr) 40px;
        gap: 8px;
    }

    .energy-map-stage {
        min-height: clamp(230px, 36vh, 320px);
    }

    .energy-map-room text {
        font-size: 14px;
    }

    .energy-control-column {
        grid-template-columns: 1fr;
        grid-template-areas:
            "stability"
            "zones"
            "actions";
    }

    .energy-level-section {
        grid-template-columns: 1fr;
        justify-items: center;
        align-items: start;
        gap: 6px;
    }

    .energy-level-bar {
        width: 34px;
        height: clamp(132px, 24vh, 190px);
    }

    .energy-level-copy {
        display: none;
    }

    .energy-result-text {
        display: none;
    }

    .energy-zone-list {
        max-height: clamp(128px, 23vh, 220px);
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 2px;
    }

    .energy-level-title {
        font-size: clamp(0.58rem, 1.7vw, 0.7rem);
    }

    .energy-level-read,
    .energy-state-read {
        font-size: clamp(0.66rem, 2vw, 0.82rem);
    }

    .energy-popup-actions {
        grid-template-columns: 1fr;
    }

    .ui-console-btn.energy-action-btn {
        font-size: clamp(0.6rem, 1.9vw, 0.74rem);
    }

    .launch-prep-btn {
        min-height: 125%;
    }

    .launch-prep-btn-label {
        font-size: clamp(0.5rem, calc(1.05vw + 0.62vh), 0.78rem);
        line-height: 1.02;
    }

    .box-subcell-title {
        font-size: clamp(0.48rem, calc(0.92vw + 0.24vh), 0.66rem);
    }

    .launch-terminal-modal__screen {
        line-height: 1;
    }

    .launch-run-btn {
        width: min(100%, clamp(192px, 44vw, 264px));
    }

    .launch-route-panel {
        width: 96vw;
        padding: 12px;
        gap: 10px;
    }

    .launch-route-title {
        font-size: clamp(0.78rem, 2.4vw, 0.98rem);
    }

    .launch-route-subtitle {
        font-size: clamp(0.54rem, 1.7vw, 0.68rem);
    }

    .launch-route-layout {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .launch-sim-panel {
        order: 1;
        z-index: 1;
    }

    .launch-sim-svg {
        height: auto;
        min-height: clamp(220px, 35vh, 300px);
    }

    .launch-select-panel {
        order: 2;
        grid-template-rows: auto auto;
        position: relative;
        z-index: 2;
    }

    .launch-phase-list {
        max-height: clamp(170px, 30vh, 280px);
    }

    .launch-phase-options {
        grid-template-columns: 1fr;
    }

    .launch-route-actions {
        grid-template-columns: 1fr;
    }

    .ui-console-btn.launch-action-btn {
        font-size: clamp(0.58rem, 1.85vw, 0.72rem);
    }

    .launch-surveillance-panel {
        width: 96vw;
        padding: 12px;
        gap: 10px;
    }

    .launch-surveillance-title {
        font-size: clamp(0.72rem, 2.2vw, 0.9rem);
    }

    .launch-surveillance-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .launch-surveillance-feed {
        min-height: clamp(220px, 34vh, 320px);
    }

    .launch-surveillance-side {
        gap: 8px;
        justify-items: center;
    }

    .launch-surveillance-countdown {
        font-size: clamp(1.78rem, 8.4vw, 2.8rem);
    }

    .launch-surveillance-status {
        min-height: clamp(78px, 14vh, 124px);
        max-height: clamp(78px, 17vh, 142px);
        font-size: clamp(0.56rem, 1.72vw, 0.7rem);
    }

    .launch-surveillance-confirm-actions {
        grid-template-columns: 1fr;
    }

    .demo-popup-overlay.demo-popup--remote-access .demo-popup-panel {
        width: 96vw;
        min-height: clamp(260px, 62vh, 640px);
        padding: 14px;
    }

    .demo-popup-overlay.demo-popup--remote-access .demo-popup-content {
        max-height: min(76vh, 600px);
        gap: 10px;
    }

    .demo-popup-overlay.demo-popup--remote-access .demo-popup-message {
        padding-top: 14px;
        gap: 10px;
    }

    .remote-access-popup-title {
        font-size: clamp(0.78rem, 2.5vw, 1rem);
    }

    .remote-access-popup-subtitle {
        font-size: clamp(0.56rem, 1.8vw, 0.72rem);
    }

    .remote-access-status-row {
        min-height: 30px;
        padding: 5px 8px;
    }

    .remote-access-status-text {
        font-size: clamp(0.72rem, 2.1vw, 0.9rem);
    }

    .remote-access-result-text {
        font-size: clamp(0.64rem, 1.9vw, 0.8rem);
    }

    .remote-access-slots {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .remote-access-slot {
        min-height: 118px;
    }

    .remote-slot-arrow {
        min-height: 24px;
    }

    .remote-slot-glyph {
        min-height: 44px;
        font-size: clamp(1.02rem, 4.4vw, 1.4rem);
    }

    .demo-popup-overlay.demo-popup--remote-access .demo-popup-actions {
        gap: 8px;
    }

    .demo-popup-overlay.demo-popup--remote-access .demo-popup-accept,
    .demo-popup-overlay.demo-popup--remote-access .demo-popup-secondary {
        min-width: clamp(124px, 40vw, 168px);
        font-size: clamp(0.6rem, 1.9vw, 0.74rem);
    }

    .demo-popup-overlay.demo-popup--access-sequence .demo-popup-panel,
    .demo-popup-overlay.demo-popup--access-intro .demo-popup-panel {
        width: 96vw;
        min-height: clamp(220px, 52vh, 360px);
        padding: 14px;
    }

    .demo-popup-overlay.demo-popup--access-sequence .demo-popup-content,
    .demo-popup-overlay.demo-popup--access-intro .demo-popup-content {
        max-height: min(72vh, 500px);
    }

    .demo-popup-overlay.demo-popup--access-sequence .demo-popup-message,
    .demo-popup-overlay.demo-popup--access-intro .demo-popup-message {
        font-size: clamp(0.6rem, 1.8vw, 0.74rem);
    }

    .remote-access-boot-log {
        min-height: clamp(124px, 30vh, 190px);
        padding: 9px;
    }

    .remote-access-boot-line {
        font-size: clamp(0.56rem, 1.7vw, 0.68rem);
    }

    .remote-access-boot-finish {
        font-size: clamp(0.54rem, 1.65vw, 0.66rem);
    }

    .cam-popup-panel {
        width: 96vw;
        padding: 10px;
    }

    .cam-popup-close {
        width: 32px;
        height: 32px;
    }

    .cam-feed-frame {
        width: 92vw;
        aspect-ratio: 4 / 3;
        border-width: 2px;
    }

    .audio-controls {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        grid-column: 1;
        justify-self: center;
        width: min(92vw, 320px);
        justify-content: center;
        margin: clamp(10px, 2.4vh, 20px) auto calc(env(safe-area-inset-bottom, 0px) + clamp(10px, 2.2vh, 18px));
        gap: 10px;
        z-index: 2;
    }

    .bg-volume-slider {
        width: clamp(112px, 36vw, 180px);
    }

    .mute-toggle {
        width: clamp(34px, 10vw, 40px);
        height: clamp(34px, 10vw, 40px);
    }

    .main-content {
        grid-template-columns: 1fr;
        align-items: flex-start;
        padding:
            calc(var(--top-nav-height) + env(safe-area-inset-top, 0px) + clamp(34px, 5vh, 52px))
            1rem
            calc(env(safe-area-inset-bottom, 0px) + clamp(78px, 12vh, 116px));
        row-gap: clamp(0.55rem, 1.6vh, 1.2rem);
        overflow: visible;
    }

    .container {
        grid-column: 1;
        width: min(92vw, 560px);
        max-width: min(92vw, 560px);
        min-width: 0;
        margin: 0 auto;
        justify-content: flex-start;
        padding-top: clamp(8px, 1.6vh, 16px);
        max-height: none;
    }

    .side-box-left,
    .side-box-right {
        grid-column: 1;
        grid-row: auto;
        width: min(92vw, 560px);
        min-width: 0;
        max-width: min(92vw, 560px);
        min-height: clamp(64px, 10.5vh, 120px);
        max-height: none;
        margin: 0 auto;
        justify-self: center;
    }

    .page-wrapper.boot-done .box.side-box.side-box-left { animation-delay: 1.88s; }
    .page-wrapper.boot-done .box.side-box.side-box-right { animation-delay: 1.88s; }

    body.initial-mobile .page-wrapper.boot-done .box.side-box.side-box-left { animation-delay: 1.88s; }
    body.initial-mobile .page-wrapper.boot-done .box.side-box.side-box-right { animation-delay: 1.88s; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .weak-signal-label {
        font-size: clamp(0.48rem, 1.25vw, 0.62rem);
    }

    .side-box-left {
        width: 42vw;
        max-width: none;
        min-width: 0;
        height: 18vh;
        min-height: 0;
        max-height: none;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    :root {
        --left-box-width-vw: 20;
        --left-box-height-vh: 30;
        --left-box-offset-x-vw: 3.2;
        --left-box-offset-y-vh: 1;
    }

    .weak-signal-label {
        font-size: clamp(0.5rem, 0.9vw, 0.64rem);
    }
}

@media (max-width: 900px) {
    .intro-logo {
        filter: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .hud-boot {
        opacity: 0 !important;
        visibility: hidden !important;
    }
}


.message-comms-trigger {
    width: min(100%, 460px);
    min-height: clamp(44px, 7vh, 66px);
    padding: 0.6em 0.9em;
    justify-content: space-between;
    border-color: rgba(99, 196, 255, 0.72);
    background:
        linear-gradient(180deg, rgba(38, 102, 146, 0.36), rgba(8, 19, 34, 0.9)),
        radial-gradient(120% 140% at 10% 0%, rgba(112, 205, 255, 0.2), rgba(0, 0, 0, 0));
    color: #e6f5ff;
    box-shadow:
        inset 0 0 0 1px rgba(126, 212, 255, 0.24),
        0 0 16px rgba(66, 166, 231, 0.24);
}

.message-comms-trigger-ghost {
    position: fixed;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip-path: inset(50%);
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

.message-comms-trigger:hover,
.message-comms-trigger:focus-visible {
    border-color: rgba(147, 220, 255, 0.95);
    box-shadow:
        inset 0 0 0 1px rgba(147, 220, 255, 0.34),
        0 0 22px rgba(91, 188, 250, 0.34);
}

.message-comms-trigger-tag {
    border: 1px solid rgba(174, 230, 255, 0.64);
    border-radius: 999px;
    padding: 0.28em 0.78em;
    font-size: clamp(0.56rem, 0.86vw, 0.72rem);
    letter-spacing: 0.11em;
    color: rgba(198, 236, 255, 0.98);
}

.message-comms-trigger-label {
    font-size: clamp(0.68rem, 1.05vw, 0.92rem);
    letter-spacing: 0.12em;
    color: #f3fbff;
}

body.message-popup-open {
    overflow: hidden;
}

.message-comms-popup {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vh, 28px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.message-comms-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.message-comms-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
}

.message-comms-panel {
    position: relative;
    width: min(960px, 96vw);
    border-radius: 20px;
    border: 1px solid rgba(101, 183, 245, 0.42);
    background:
        radial-gradient(130% 120% at 0% 0%, rgba(54, 141, 198, 0.14), rgba(0, 0, 0, 0) 45%),
        linear-gradient(160deg, rgba(7, 15, 27, 0.96), rgba(4, 10, 17, 0.96));
    box-shadow:
        0 22px 56px rgba(0, 0, 0, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transform: translateY(10px) scale(0.965);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.22s ease;
}

.message-comms-popup.is-open .message-comms-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.message-comms-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.03) 0 1px,
        rgba(255, 255, 255, 0) 1px 4px
    );
    mix-blend-mode: soft-light;
    opacity: 0.28;
}

.message-comms-header {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title status"
        "subtitle sender";
    column-gap: clamp(10px, 1.6vw, 18px);
    row-gap: 2px;
    align-items: end;
    padding: clamp(14px, 2.6vh, 20px) clamp(14px, 2.6vw, 24px) clamp(10px, 1.9vh, 14px);
    border-bottom: 1px solid rgba(118, 189, 242, 0.22);
}

.message-comms-head-main {
    display: contents;
}

.message-comms-title {
    grid-area: title;
    margin: 0;
    font-family: 'Orbitron', 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.86rem, 1.34vw, 1.2rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #eef7ff;
}

.message-comms-subtitle {
    grid-area: subtitle;
    margin: 0.44rem 0 0;
    color: rgba(184, 216, 241, 0.82);
    font-size: clamp(0.6rem, 0.9vw, 0.78rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.message-comms-sender {
    grid-area: sender;
    margin: 0;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
    color: rgba(211, 235, 255, 0.93);
    font-size: clamp(0.58rem, 0.86vw, 0.74rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.message-comms-status {
    grid-area: status;
    justify-self: end;
    align-self: start;
    border: 1px solid rgba(122, 205, 255, 0.64);
    border-radius: 999px;
    padding: 0.44em 0.84em;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.52rem, 0.82vw, 0.7rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(214, 240, 255, 0.96);
    background: rgba(65, 159, 223, 0.18);
    white-space: nowrap;
}

.message-comms-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(10px, 2vw, 16px);
    padding: clamp(12px, 2.2vh, 16px) clamp(14px, 2.6vw, 24px);
}

.message-comms-text-panel {
    position: relative;
    border: 1px solid rgba(119, 192, 243, 0.24);
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    min-height: clamp(170px, 28vh, 260px);
    background:
        radial-gradient(120% 95% at 50% 0%, rgba(74, 74, 74, 0.16), rgba(0, 0, 0, 0) 52%),
        linear-gradient(180deg, #050505, #000000);
}

.message-comms-text-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.045) 0 1px,
            rgba(255, 255, 255, 0) 1px 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.015) 0 2px,
            rgba(0, 0, 0, 0) 2px 6px
        );
    mix-blend-mode: screen;
    opacity: 0.3;
    animation: messageCommsNoiseShift 1.8s steps(2, end) infinite;
}

.message-comms-text-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.08) 62%),
        linear-gradient(180deg, rgba(9, 9, 9, 0), rgba(0, 0, 0, 0.7));
    opacity: 0.6;
    animation: messageCommsFlicker 0.3s steps(2, end) infinite;
}

.message-comms-text {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: clamp(14px, 2.2vh, 20px);
    min-height: clamp(170px, 28vh, 260px);
    white-space: pre-wrap;
    line-height: 1.6;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.82rem, 1.26vw, 1.1rem);
    letter-spacing: 0.03em;
    color: #d8ffe6;
    text-shadow: 0 0 5px rgba(127, 255, 178, 0.24);
}

.message-comms-text strong {
    font-weight: 700;
}

.message-comms-text u {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.12em;
}

.message-comms-info-icon-line {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 0.55em;
}

.message-comms-info-icon {
    width: clamp(20px, 2.2vw, 24px);
    height: clamp(20px, 2.2vw, 24px);
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(119, 192, 243, 0.24));
}

@keyframes messageCommsNoiseShift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    20% {
        transform: translate3d(-1%, 0.5%, 0);
    }
    40% {
        transform: translate3d(0.8%, -0.5%, 0);
    }
    60% {
        transform: translate3d(-0.6%, -0.2%, 0);
    }
    80% {
        transform: translate3d(0.5%, 0.4%, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes messageCommsFlicker {
    0%,
    100% {
        opacity: 0.58;
    }
    25% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.64;
    }
    75% {
        opacity: 0.44;
    }
}

.message-comms-photo-wrap {
    position: relative;
    margin: 0;
    border: 1px solid rgba(119, 192, 243, 0.24);
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    min-height: clamp(170px, 28vh, 260px);
    background: rgba(6, 11, 19, 0.95);
}

.message-comms-photo-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.12) 0 1px,
            rgba(0, 0, 0, 0.18) 1px 4px
        ),
        linear-gradient(90deg, rgba(255, 0, 0, 0.2), rgba(0, 160, 255, 0.16));
    mix-blend-mode: screen;
}

.message-comms-photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        radial-gradient(circle at 80% 18%, rgba(116, 201, 255, 0.24), rgba(0, 0, 0, 0) 54%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(4, 10, 17, 0.52));
}

.message-comms-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.08s ease;
}

.message-comms-photo.is-switching {
    opacity: 0;
}

.message-comms-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 clamp(14px, 2.6vw, 24px) clamp(14px, 2.6vh, 20px);
}

.message-comms-counter {
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.86vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(194, 223, 247, 0.8);
    font-variant-numeric: tabular-nums;
}

.message-comms-counter-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
}

.message-comms-counter-arrow {
    width: 1.85em;
    height: 1.85em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(126, 206, 255, 0.42);
    border-radius: 999px;
    background: rgba(6, 13, 24, 0.82);
    color: rgba(214, 236, 252, 0.95);
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.64rem, 0.9vw, 0.78rem);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.message-comms-counter-arrow:hover,
.message-comms-counter-arrow:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(164, 228, 255, 0.88);
    box-shadow: 0 0 12px rgba(84, 180, 238, 0.28);
    outline: none;
}

.message-comms-counter-arrow:active {
    transform: translateY(0);
}

.message-comms-counter-arrow:disabled,
.message-comms-counter-arrow:disabled:hover,
.message-comms-counter-arrow:disabled:focus-visible,
.message-comms-counter-arrow:disabled:active {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: rgba(137, 151, 164, 0.4);
}

.message-comms-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.message-comms-btn {
    flex: 0 0 auto;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(126, 206, 255, 0.46);
    border-radius: 10px;
    background: rgba(6, 13, 24, 0.88);
    color: #e6f6ff;
    padding: 0.72em 1.16em;
    font-family: 'Share Tech Mono', 'Consolas', 'Courier New', monospace;
    font-size: clamp(0.64rem, 0.92vw, 0.78rem);
    letter-spacing: 0.11em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, filter 0.14s ease;
}

.message-comms-btn:hover,
.message-comms-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(164, 228, 255, 0.9);
    box-shadow: 0 0 14px rgba(84, 180, 238, 0.34);
    filter: brightness(1.04);
    outline: none;
}

.message-comms-btn:active {
    transform: translateY(0);
}

.message-comms-btn:disabled,
.message-comms-btn:disabled:hover,
.message-comms-btn:disabled:focus-visible,
.message-comms-btn:disabled:active {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: saturate(0.58) brightness(0.9);
    border-color: rgba(137, 151, 164, 0.42);
}

.message-comms-btn-primary {
    inline-size: clamp(124px, 15vw, 156px);
    background:
        linear-gradient(180deg, rgba(64, 167, 222, 0.42), rgba(10, 24, 41, 0.92)),
        rgba(6, 14, 25, 0.92);
}

.message-comms-btn-secondary {
    border-color: rgba(164, 190, 210, 0.44);
    background: rgba(7, 14, 24, 0.86);
}

.message-comms-popup.is-insecure-channel .message-comms-panel {
    border-color: rgba(255, 98, 98, 0.54);
    background:
        radial-gradient(130% 120% at 0% 0%, rgba(190, 34, 34, 0.2), rgba(0, 0, 0, 0) 48%),
        linear-gradient(160deg, rgba(20, 6, 8, 0.97), rgba(10, 4, 7, 0.97));
    box-shadow:
        0 22px 58px rgba(0, 0, 0, 0.62),
        inset 0 1px 0 rgba(255, 180, 180, 0.08);
}

.message-comms-popup.is-insecure-channel .message-comms-header {
    border-bottom-color: rgba(255, 122, 122, 0.34);
}

.message-comms-popup.is-insecure-channel .message-comms-title {
    color: #ffeaea;
    text-shadow: 0 0 12px rgba(255, 104, 104, 0.36);
}

.message-comms-popup.is-insecure-channel .message-comms-subtitle {
    color: rgba(255, 179, 179, 0.9);
}

.message-comms-popup.is-insecure-channel .message-comms-sender {
    color: rgba(255, 209, 209, 0.95);
}

.message-comms-popup.is-insecure-channel .message-comms-status {
    border-color: rgba(255, 126, 126, 0.78);
    color: #ffd8d8;
    background: rgba(159, 16, 16, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 129, 129, 0.24);
}

.message-comms-status-alert-blink {
    font-weight: 700;
    animation: messageCommsAlertStatusBlink 1.2s ease-in-out infinite;
}

.message-comms-popup.is-insecure-channel .message-comms-text-panel {
    border-color: rgba(255, 116, 116, 0.35);
    background:
        radial-gradient(120% 95% at 50% 0%, rgba(126, 24, 24, 0.24), rgba(0, 0, 0, 0) 52%),
        linear-gradient(180deg, #090303, #020101);
}

.message-comms-popup.is-insecure-channel .message-comms-text {
    color: #ffd6d6;
    text-shadow: 0 0 7px rgba(255, 122, 122, 0.32);
}

.message-comms-popup.is-alert-transmission .message-comms-photo-wrap {
    border-color: rgba(255, 118, 118, 0.54);
}

.message-comms-popup.is-alert-transmission .message-comms-photo-wrap::before {
    opacity: 0.58;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(222, 222, 222, 0.17) 0 1px,
            rgba(30, 30, 30, 0.22) 1px 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(165, 165, 165, 0.16) 0 2px,
            rgba(24, 24, 24, 0.28) 2px 5px
        );
    animation: messageCommsPhotoInterferenceStatic 0.22s steps(2, end) infinite;
}

.message-comms-popup.is-alert-transmission .message-comms-photo-wrap::after {
    background:
        linear-gradient(180deg, rgba(255, 69, 69, 0.14), rgba(0, 0, 0, 0.42)),
        radial-gradient(circle at 18% 16%, rgba(255, 146, 146, 0.28), rgba(0, 0, 0, 0) 54%);
}

.message-comms-popup.is-alert-transmission .message-comms-photo {
    filter: grayscale(0.78) contrast(1.16) brightness(0.82);
}

@keyframes messageCommsAlertStatusBlink {
    0%,
    100% {
        opacity: 0.35;
    }
    18%,
    68% {
        opacity: 1;
    }
}

@keyframes messageCommsPhotoInterferenceStatic {
    0%,
    100% {
        opacity: 0.44;
        filter: contrast(1.06);
    }
    18% {
        opacity: 0.68;
        filter: contrast(1.18);
    }
    42% {
        opacity: 0.52;
        filter: contrast(1.08);
    }
    66% {
        opacity: 0.74;
        filter: contrast(1.2);
    }
}

@media (max-width: 900px) {
    .message-comms-body {
        grid-template-columns: clamp(104px, 30vw, 160px) minmax(0, 1fr);
        align-items: stretch;
    }

    .message-comms-photo-wrap {
        grid-column: 1;
        grid-row: 1;
        min-height: clamp(136px, 22vh, 188px);
    }

    .message-comms-photo {
        object-position: right center;
    }

    .message-comms-text-panel {
        grid-column: 2;
        grid-row: 1;
        min-height: clamp(136px, 22vh, 188px);
    }

    .message-comms-text {
        min-height: clamp(136px, 22vh, 188px);
    }

    .message-comms-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .message-comms-counter-nav {
        align-self: center;
    }

    .message-comms-actions {
        width: auto;
        justify-content: flex-end;
    }

    .message-comms-btn {
        flex: 0 0 auto;
    }
}

@media (max-width: 600px) {
    .message-comms-trigger {
        width: 100%;
        gap: 0.7em;
        flex-wrap: wrap;
        justify-content: center;
    }

    .message-comms-status {
        align-self: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .message-comms-popup,
    .message-comms-panel,
    .message-comms-btn,
    .message-comms-trigger {
        transition: none !important;
    }

    .message-comms-text-panel::before,
    .message-comms-text-panel::after,
    .message-comms-status-alert-blink,
    .message-comms-popup.is-alert-transmission .message-comms-photo-wrap::before,
    .message-comms-popup.is-alert-transmission .message-comms-photo {
        animation: none !important;
    }
}

