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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: #020408;
    min-height: 100vh;
    color: #c8dce8;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* ══════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════ */

@keyframes ship-float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

@keyframes engine-flicker {
    0%, 100% { opacity: 0.7; }
    30% { opacity: 0.9; }
    50% { opacity: 0.6; }
    80% { opacity: 0.85; }
}

@keyframes blink-red {
    0%, 48%, 52%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes blink-green {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes prompt-pulse {
    0%, 100% { opacity: 0.7; text-shadow: 0 0 15px rgba(255,255,255,0.2); }
    50% { opacity: 1; text-shadow: 0 0 25px rgba(255,255,255,0.35); }
}

@keyframes ship-zoom {
    0% { transform: translate(-50%, -50%) scale(1) translateZ(0); opacity: 1; }
    60% { transform: translate(-50%, -50%) scale(8) translateZ(0); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(18) translateZ(0); opacity: 0; }
}

@keyframes flash {
    0% { opacity: 0; }
    20% { opacity: 0.85; }
    100% { opacity: 0; }
}

@keyframes cockpit-in {
    0% { opacity: 0; transform: translateZ(0); }
    100% { opacity: 1; transform: translateZ(0); }
}

@keyframes hud-flicker {
    0%, 100% { opacity: 1; }
    93% { opacity: 0.7; }
    94% { opacity: 1; }
    96% { opacity: 0.85; }
    97% { opacity: 1; }
}

@keyframes scanline { 0% { top: -2px; } 100% { top: 100%; } }

@keyframes status-blink {
    0%, 100% { background: rgba(0,255,140,0.7); box-shadow: 0 0 4px rgba(0,255,140,0.5); }
    50% { background: rgba(0,255,140,0.2); box-shadow: none; }
}

@keyframes term-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes needle-sweep {
    0%, 100% { transform: rotate(-45deg); }
    30% { transform: rotate(35deg); }
    60% { transform: rotate(15deg); }
    80% { transform: rotate(25deg); }
}

@keyframes needle-sweep-2 {
    0%, 100% { transform: rotate(-30deg); }
    40% { transform: rotate(40deg); }
    70% { transform: rotate(20deg); }
}

@keyframes warn-pulse {
    0%, 70%, 100% { opacity: 0.3; box-shadow: none; }
    75%, 95% { opacity: 1; }
}

@keyframes crt-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes meter-needle {
    0%, 100% { transform: rotate(-50deg); }
    25% { transform: rotate(20deg); }
    50% { transform: rotate(35deg); }
    75% { transform: rotate(10deg); }
}

@keyframes radar-sweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes radar-blip {
    0%, 80%, 100% { opacity: 0; }
    85%, 95% { opacity: 0.8; }
}

@keyframes mission-scan {
    0% { top: -2px; }
    100% { top: calc(100% + 2px); }
}

@keyframes mission-fade {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

@keyframes bracket-pulse {
    0%, 100% { border-color: rgba(0,220,255,0.25); }
    50% { border-color: rgba(0,220,255,0.5); }
}

@keyframes ctrl-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0,180,255,0.06), inset 0 0 4px rgba(0,180,255,0.02); }
    50% { box-shadow: 0 0 14px rgba(0,180,255,0.18), inset 0 0 8px rgba(0,180,255,0.06); }
}

/* ══════════════════════════════════
   SHIP EXTERIOR
   ══════════════════════════════════ */

#ship-scene { position: fixed; inset: 0; z-index: 20; }
#ship-scene.zooming { pointer-events: none; }

#ship-wrapper {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    cursor: pointer;
    animation: ship-float 5s ease-in-out infinite;
    will-change: transform, opacity;
}

#ship-wrapper.zoom-out { animation: ship-zoom 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

#ship-label {
    position: absolute;
    top: -45px; left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 14px; font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(180,190,200,0.6);
    opacity: 0;
    transition: opacity 0.4s;
    text-shadow: 0 0 10px rgba(180,190,200,0.2);
    pointer-events: none;
}

#ship-wrapper:hover #ship-label { opacity: 1; }

#board-prompt {
    position: absolute;
    bottom: -60px; left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.prompt-bg {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(120,130,140,0.15);
    border-radius: 8px;
    padding: 12px 32px;
    backdrop-filter: blur(4px);
}

.prompt-text {
    font-size: 18px; font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #fff;
    animation: prompt-pulse 2.5s ease-in-out infinite;
}

/* ── Ship container ── */

#ship {
    position: relative;
    width: 800px;
    height: 240px;
    overflow: visible;
}

.ship-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 5;
}

/* ── SVG element animations ── */

.engine-ports { animation: engine-flicker 1.2s ease-in-out infinite; }
.rl-blink-r   { animation: blink-red 2s infinite; }
.rl-blink-r2  { animation: blink-red 1.8s infinite; }
.rl-blink-r3  { animation: blink-red 2.5s infinite; }
.rl-blink-r4  { animation: blink-red 2.2s infinite; }
.rl-blink-r5  { animation: blink-red 1.6s infinite; }
.rl-blink-g   { animation: blink-green 1.5s infinite; }
.rl-blink-g2  { animation: blink-green 2.2s infinite; }
.rl-blink-g3  { animation: blink-green 1.8s infinite; }

/* ── Engine exhaust — tiny hint only ── */

.exhaust-hint {
    position: absolute;
    right: -8%;
    top: 33%;
    width: 10%;
    height: 34%;
    background: radial-gradient(ellipse at 0% 50%,
        rgba(0,80,160,0.04) 0%,
        transparent 70%);
    filter: blur(6px);
    pointer-events: none;
    z-index: 2;
}

/* ── Hover — subtle brightening ── */

#ship-wrapper:hover .hull {
    filter: brightness(1.08);
    transition: filter 0.3s;
}

#ship-wrapper:hover .engine-ports { filter: brightness(1.15); }

/* Particle container */
#particle-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 6;
}

/* ══════════════════════════════════
   FLASH OVERLAY
   ══════════════════════════════════ */

#flash-overlay {
    position: fixed; inset: 0;
    background: rgba(200,210,220,0.9);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    transform: translateZ(0);
}

#flash-overlay.active { animation: flash 0.6s cubic-bezier(0.25, 0, 0.3, 1) forwards; }

/* ══════════════════════════════════
   COCKPIT — FIRST PERSON
   ══════════════════════════════════ */

#cockpit {
    position: fixed; inset: 0;
    z-index: 10;
    transform: translateZ(0);
    will-change: opacity;
}

#cockpit.hidden { visibility: hidden; opacity: 0; pointer-events: none; }
#cockpit.entering { visibility: visible; pointer-events: auto; animation: cockpit-in 0.5s cubic-bezier(0.25, 0, 0.3, 1) forwards; }
#cockpit.active { visibility: visible; opacity: 1; pointer-events: auto; }

/* ══════════════════════════════════
   VIEWPORT FRAME (top 36%)
   ══════════════════════════════════ */

.vp-frame {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36%;
    pointer-events: none;
    z-index: 15;
}

.vp-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 38px;
    background: linear-gradient(180deg, #060a10 0%, #0a0e18 70%, rgba(10,14,24,0.85) 100%);
    border-bottom: 1px solid rgba(40,55,75,0.2);
    box-shadow: 0 2px 16px rgba(0,0,0,0.6);
}

.vp-left, .vp-right {
    position: absolute;
    top: 0; bottom: 0;
    width: 50px;
}

.vp-left {
    left: 0;
    background: linear-gradient(90deg, #060a10 0%, rgba(6,10,16,0.6) 50%, transparent 100%);
}

.vp-right {
    right: 0;
    background: linear-gradient(-90deg, #060a10 0%, rgba(6,10,16,0.6) 50%, transparent 100%);
}

.vp-strut {
    position: absolute;
    top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #1a2535 0%, rgba(18,26,40,0.3) 50%, #151e2c 100%);
    box-shadow: -1px 0 3px rgba(0,0,0,0.4), 1px 0 3px rgba(0,0,0,0.4);
    z-index: 2;
}

.vp-s1 { left: 33%; }
.vp-s2 { left: 66%; }

/* ══════════════════════════════════
   HUD OVERLAY
   ══════════════════════════════════ */

.hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36%;
    z-index: 20;
    pointer-events: none;
    animation: hud-flicker 12s infinite;
}

/* ── Mission Display (HUD) ── */

.mission-display {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 36px;
    text-align: center;
    animation: mission-fade 4s ease-in-out infinite;
}

.mission-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    animation: bracket-pulse 3s ease-in-out infinite;
}

.mb-tl {
    top: 0; left: 0;
    border-top: 2px solid rgba(0,220,255,0.35);
    border-left: 2px solid rgba(0,220,255,0.35);
}

.mb-tr {
    top: 0; right: 0;
    border-top: 2px solid rgba(0,220,255,0.35);
    border-right: 2px solid rgba(0,220,255,0.35);
}

.mb-bl {
    bottom: 0; left: 0;
    border-bottom: 2px solid rgba(0,220,255,0.35);
    border-left: 2px solid rgba(0,220,255,0.35);
}

.mb-br {
    bottom: 0; right: 0;
    border-bottom: 2px solid rgba(0,220,255,0.35);
    border-right: 2px solid rgba(0,220,255,0.35);
}

.mission-scanline {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.4), transparent);
    box-shadow: 0 0 8px rgba(0,220,255,0.3);
    animation: mission-scan 3.5s linear infinite;
    will-change: top;
}

.mission-label {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(0,255,255,1),
        0 0 20px rgba(0,220,255,0.7),
        0 0 40px rgba(0,200,255,0.3);
    margin-bottom: 12px;
}

.mission-text {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(0,255,255,1),
        0 0 20px rgba(0,255,255,0.9),
        0 0 40px rgba(0,220,255,0.7),
        0 0 70px rgba(0,200,255,0.4),
        0 0 120px rgba(0,180,255,0.2);
    white-space: nowrap;
}

.mission-divider {
    width: 60%;
    height: 1px;
    margin: 12px auto;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.4), transparent);
}

.mission-obj {
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(0,255,200,1),
        0 0 20px rgba(0,255,200,0.8),
        0 0 40px rgba(0,255,180,0.4),
        0 0 70px rgba(0,220,255,0.2);
}

.mission-status {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(0,255,200,1),
        0 0 20px rgba(0,255,180,0.6),
        0 0 40px rgba(0,220,255,0.25);
}

.ms-led {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ff8c;
    box-shadow: 0 0 6px rgba(0,255,140,0.8), 0 0 12px rgba(0,255,140,0.4);
    animation: status-blink 3s infinite;
}

/* ══════════════════════════════════
   CONSOLE (bottom 64%)
   ══════════════════════════════════ */

.console {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 64%;
    z-index: 25;
    display: flex;
    flex-direction: column;
}

.console-glow {
    position: absolute;
    top: -60px; left: 10%; right: 10%;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,120,180,0.03) 60%, rgba(0,100,160,0.06) 100%);
    pointer-events: none;
    z-index: 24;
}

.console-edge {
    height: 3px; flex-shrink: 0;
    background: linear-gradient(90deg, rgba(0,150,220,0.05), rgba(0,180,255,0.15) 30%, rgba(0,200,255,0.2) 50%, rgba(0,180,255,0.15) 70%, rgba(0,150,220,0.05));
    box-shadow: 0 0 12px rgba(0,160,220,0.08), 0 -4px 20px rgba(0,0,0,0.5);
}

.console-surface {
    flex: 1;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.006) 0px,
            rgba(255,255,255,0.006) 1px,
            transparent 1px,
            transparent 4px
        ),
        linear-gradient(180deg, #0e1420 0%, #0a0f18 30%, #080b14 60%, #060910 100%);
    display: flex;
    align-items: stretch;
    padding: 10px 0 8px;
    gap: 0;
    overflow: hidden;
}

/* ══════════════════════════════════
   PANEL LAYOUT
   ══════════════════════════════════ */

.cpanel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cpanel-left {
    flex: 0 0 260px;
    min-width: 160px;
}

.cpanel-center {
    flex: 1;
    min-width: 0;
    gap: 6px;
}

.cpanel-right {
    flex: 0 0 250px;
    min-width: 150px;
    align-items: stretch;
}

.panel-div {
    width: 2px;
    align-self: stretch;
    margin: 4px 8px;
    background: linear-gradient(180deg,
        rgba(0,180,255,0.04) 0%,
        rgba(40,50,65,0.35) 20%,
        rgba(40,50,65,0.45) 50%,
        rgba(40,50,65,0.35) 80%,
        rgba(0,180,255,0.04) 100%);
    flex-shrink: 0;
}

.ctrl-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
}

/* ══════════════════════════════════
   SHARED CONTROL STYLES
   ══════════════════════════════════ */

.ctrl {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    padding: 6px 10px;
    min-width: 0;
    position: relative;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
    border-radius: 4px;
    border: 1px solid rgba(0,180,255,0.08);
    animation: ctrl-pulse 2.5s ease-in-out infinite;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.ctrl:focus {
    outline: none;
}

.ctrl:hover {
    background: rgba(0,180,255,0.06);
    border-color: rgba(0,200,255,0.25);
    box-shadow: 0 0 20px rgba(0,200,255,0.2), 0 0 40px rgba(0,180,255,0.06), inset 0 0 12px rgba(0,200,255,0.06);
    animation: none;
}

.plate {
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0,200,230,0.5);
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0,200,255,0.2);
}

.ctrl:hover .plate {
    color: rgba(0,220,255,0.8);
    text-shadow: 0 0 10px rgba(0,200,255,0.5);
}

.ctrl-name {
    font-size: 11px; font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 0 8px rgba(0,200,255,0.25);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
}

.ctrl:hover .ctrl-name {
    color: #fff;
    text-shadow: 0 0 14px rgba(0,220,255,0.5), 0 0 30px rgba(0,200,255,0.15);
}

.ctrl-sub {
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(140,170,200,0.45);
    margin-top: 2px;
    text-align: center;
}

/* ══════════════════════════════════
   DIAGNOSTIC TERMINAL (decorative)
   ══════════════════════════════════ */

.term-bezel {
    flex: 1;
    min-height: 120px;
    background: linear-gradient(135deg, #1a1e24 0%, #12161c 50%, #0e1218 100%);
    border: 2px solid #2a2e36;
    border-top-color: #32363e;
    border-bottom-color: #1a1e24;
    border-radius: 4px;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(80,85,95,0.06);
}

.term-glass {
    width: 100%;
    height: 100%;
    background: #041208;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,40,20,0.4), inset 0 0 4px rgba(0,0,0,0.8);
}

.term-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0,0,0,0.12) 2px,
        rgba(0,0,0,0.12) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.term-scanlines::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: rgba(0,255,100,0.05);
    animation: scanline 4s linear infinite;
    z-index: 3;
}

.term-scroll {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.term-lines {
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
    animation: term-scroll 55s linear infinite;
    will-change: transform;
}

.term-lines span {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    line-height: 1.7;
    color: #00d850;
    text-shadow: 0 0 4px rgba(0,200,70,0.35);
    white-space: nowrap;
}

.term-user {
    color: #40ffb0;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0,255,140,0.5);
}

.term-role {
    color: rgba(0,200,120,0.6);
    font-size: 8px;
}

.term-sep {
    color: rgba(0,180,80,0.2);
    font-size: 7px;
    line-height: 1.2;
}

/* ══════════════════════════════════
   1. ROCKER SWITCH — Archerline
   ══════════════════════════════════ */

.ctrl-rocker { min-width: 80px; }

.rkr-housing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.rkr-body {
    width: 36px; height: 52px;
    background: linear-gradient(180deg, #3a3f48 0%, #2a2e36 40%, #1e2228 100%);
    border: 1px solid rgba(60,65,75,0.5);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(100,105,115,0.06);
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

.rkr-top, .rkr-bot {
    font-size: 10px; font-weight: 700;
    color: rgba(180,190,200,0.35);
    font-family: 'Courier New', monospace;
}

.ctrl-rocker:hover .rkr-body {
    transform: perspective(100px) rotateX(-8deg);
    background: linear-gradient(180deg, #444a54 0%, #32373f 40%, #242830 100%);
}

.ctrl-rocker:hover .rkr-top {
    color: rgba(0,230,255,0.8);
    text-shadow: 0 0 6px rgba(0,200,255,0.4);
}

.ctrl-rocker:active .rkr-body {
    transform: perspective(100px) rotateX(-12deg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.5), inset 0 2px 4px rgba(0,0,0,0.3);
}

.rkr-led {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(0,255,140,0.6);
    box-shadow: 0 0 4px rgba(0,255,140,0.4);
    animation: status-blink 3s infinite;
}

.ctrl-rocker:hover .rkr-led {
    background: rgba(0,255,140,0.95);
    box-shadow: 0 0 8px rgba(0,255,140,0.7), 0 0 16px rgba(0,255,140,0.3);
}

/* ══════════════════════════════════
   2. TOGGLE SWITCH — Gridd
   ══════════════════════════════════ */

.ctrl-toggle { min-width: 80px; }

.tog-housing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tog-cover-wrap {
    perspective: 200px;
    width: 40px; height: 20px;
}

.tog-cover {
    width: 100%; height: 100%;
    background: linear-gradient(180deg, #c83020 0%, #a02518 60%, #801810 100%);
    border-radius: 3px 3px 0 0;
    border: 1px solid rgba(200,50,30,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,120,80,0.15);
    transform-origin: bottom center;
    transform: rotateX(0deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ctrl-toggle:hover .tog-cover {
    transform: rotateX(-110deg);
}

.tog-base {
    width: 30px; height: 36px;
    background: linear-gradient(180deg, #2a2e36 0%, #1e2228 50%, #16191f 100%);
    border: 1px solid rgba(60,65,75,0.5);
    border-radius: 3px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(90,95,105,0.06);
}

.tog-slot {
    position: absolute;
    top: 4px; left: 50%; transform: translateX(-50%);
    width: 8px; height: 28px;
    background: #0a0c10;
    border-radius: 4px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.6);
}

.tog-handle {
    position: absolute;
    top: 2px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 18px;
    background: linear-gradient(180deg, #555d66 0%, #3a3f48 50%, #2a2e36 100%);
    border-radius: 2px;
    border: 1px solid rgba(80,85,95,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(130,135,145,0.1);
    transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tog-handle::after {
    content: '';
    position: absolute;
    top: 5px; left: 3px; right: 3px;
    height: 1px;
    background: rgba(120,130,140,0.15);
    box-shadow: 0 3px 0 rgba(120,130,140,0.15), 0 6px 0 rgba(120,130,140,0.15);
}

.ctrl-toggle:hover .tog-handle {
    top: 16px;
    background: linear-gradient(180deg, #666e78 0%, #4a5058 50%, #3a3f48 100%);
}

.tog-labels {
    display: flex;
    justify-content: space-between;
    width: 50px;
    font-size: 7px;
    letter-spacing: 1px;
    color: rgba(180,190,200,0.35);
    text-transform: uppercase;
}

.ctrl-toggle:hover .tog-labels span:last-child {
    color: rgba(0,230,255,0.8);
    text-shadow: 0 0 6px rgba(0,200,255,0.4);
}

/* ══════════════════════════════════
   3. ROTARY DIAL — THR Report
   ══════════════════════════════════ */

.ctrl-dial { min-width: 90px; }

.dial-housing {
    position: relative;
    width: 72px; height: 72px;
    margin: 0 auto;
}

.dial-marks {
    position: absolute; inset: 0;
}

.dm {
    position: absolute;
    top: 0; left: 50%;
    width: 1px; height: 7px;
    background: rgba(180,190,200,0.25);
    transform-origin: 0.5px 36px;
    transform: translateX(-0.5px) rotate(var(--a));
}

.dial-knob {
    position: absolute;
    top: 9px; left: 9px; right: 9px; bottom: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3a3f48 0%, #2a2e36 40%, #1a1e24 80%, #12151a 100%);
    border: 2px solid rgba(60,65,75,0.5);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(100,110,120,0.08),
        inset 0 -1px 3px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dial-grip {
    position: absolute; inset: 6px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        rgba(80,85,95,0.12) 0deg,
        rgba(80,85,95,0.12) 10deg,
        transparent 10deg,
        transparent 20deg
    );
}

.dial-ptr {
    position: absolute;
    top: 4px; left: 50%;
    width: 2px; height: 12px;
    background: rgba(0,200,255,0.6);
    border-radius: 1px;
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(0,200,255,0.3);
}

.ctrl-dial:hover .dial-knob {
    transform: rotate(45deg);
    border-color: rgba(0,180,220,0.2);
}

.ctrl-dial:hover .dial-ptr {
    background: rgba(0,220,255,0.85);
    box-shadow: 0 0 8px rgba(0,200,255,0.5);
}

/* ══════════════════════════════════
   4. PUSH BUTTON — JH Art
   ══════════════════════════════════ */

.ctrl-push { min-width: 80px; }

.push-housing {
    position: relative;
    width: 58px; height: 58px;
    margin: 0 auto;
}

.push-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(0,180,220,0.15);
    box-shadow: 0 0 8px rgba(0,160,220,0.06), inset 0 0 8px rgba(0,160,220,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.push-cap {
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 38%, #2a2e38 0%, #1e2228 50%, #14171e 100%);
    border: 1px solid rgba(60,65,80,0.5);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(100,110,125,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s, box-shadow 0.12s;
}

.push-cap span {
    font-size: 11px; font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 0 6px rgba(0,200,255,0.2);
}

.ctrl-push:hover .push-ring {
    border-color: rgba(0,200,255,0.45);
    box-shadow: 0 0 16px rgba(0,180,220,0.18), inset 0 0 14px rgba(0,180,220,0.12);
}

.ctrl-push:hover .push-cap {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 2px 6px rgba(0,0,0,0.3);
}

.ctrl-push:hover .push-cap span {
    color: #fff;
    text-shadow: 0 0 10px rgba(0,200,255,0.5);
}

.ctrl-push:active .push-cap {
    transform: translateY(3px);
    box-shadow: 0 0 1px rgba(0,0,0,0.4), inset 0 3px 8px rgba(0,0,0,0.5);
}

/* ══════════════════════════════════
   5. SLIDER — Scribe's Quill
   ══════════════════════════════════ */

.ctrl-slider { min-width: 100px; }

.sld-housing {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.sld-track {
    width: 100%; height: 10px;
    background: #0a0c12;
    border: 1px solid rgba(50,55,65,0.4);
    border-radius: 5px;
    position: relative;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
    overflow: visible;
}

.sld-fill {
    position: absolute;
    top: 1px; left: 1px; bottom: 1px;
    width: 35%;
    background: linear-gradient(90deg, rgba(0,180,255,0.15), rgba(0,200,255,0.3));
    border-radius: 4px 0 0 4px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sld-thumb {
    position: absolute;
    top: -4px; left: 33%;
    width: 8px; height: 18px;
    background: linear-gradient(180deg, #555d66 0%, #3a3f48 50%, #2a2e36 100%);
    border: 1px solid rgba(80,85,95,0.4);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(130,135,145,0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sld-thumb::after {
    content: '';
    position: absolute;
    top: 5px; left: 2px; right: 2px;
    height: 1px;
    background: rgba(120,130,140,0.2);
    box-shadow: 0 2px 0 rgba(120,130,140,0.2), 0 4px 0 rgba(120,130,140,0.2);
}

.ctrl-slider:hover .sld-fill {
    width: 72%;
    background: linear-gradient(90deg, rgba(0,180,255,0.25), rgba(0,220,255,0.5));
}

.ctrl-slider:hover .sld-thumb {
    left: 70%;
    background: linear-gradient(180deg, #666e78 0%, #4a5058 50%, #3a3f48 100%);
}

.sld-ticks {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 7px;
    letter-spacing: 1px;
    color: rgba(180,190,200,0.3);
    font-family: 'Courier New', monospace;
}

/* ══════════════════════════════════
   6. SWITCH PANEL — StrongHands
   ══════════════════════════════════ */

.ctrl-switchpanel { min-width: 90px; }

.sp-housing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.sp-row {
    display: flex;
    gap: 6px;
}

.sp-sw {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.sp-handle {
    width: 10px; height: 20px;
    background: linear-gradient(180deg, #555d66 0%, #3a3f48 50%, #2a2e36 100%);
    border: 1px solid rgba(70,75,85,0.4);
    border-radius: 2px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.4);
    transition: transform 0.2s, background 0.2s;
}

.sp-sw span {
    font-size: 7px;
    color: rgba(180,190,200,0.35);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.ctrl-switchpanel:hover .sp-handle {
    transform: translateY(-4px);
    background: linear-gradient(180deg, #666e78 0%, #4a5058 50%, #3a3f48 100%);
}

.sp-arm {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sp-led {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,60,40,0.3);
    border: 1px solid rgba(255,60,40,0.15);
    transition: background 0.2s, box-shadow 0.2s;
}

.sp-arm span {
    font-size: 8px; font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255,60,40,0.4);
    font-family: 'Courier New', monospace;
}

.ctrl-switchpanel:hover .sp-led {
    background: rgba(255,60,40,0.9);
    box-shadow: 0 0 8px rgba(255,60,40,0.6), 0 0 16px rgba(255,40,20,0.2);
}

.ctrl-switchpanel:hover .sp-arm span {
    color: rgba(255,80,50,0.9);
    text-shadow: 0 0 6px rgba(255,60,40,0.3);
}

/* ══════════════════════════════════
   DECORATIVE ELEMENTS
   ══════════════════════════════════ */

/* ── Deco Row (below terminal) ── */

.deco-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 6px;
}

/* ── Mini Dial Gauges ── */

.mini-dial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.md-face {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle, #080c14 30%, #101822 100%);
    border: 1.5px solid rgba(0,150,220,0.1);
    position: relative;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.4);
}

.md-needle {
    position: absolute;
    top: 50%; left: 50%;
    width: 1px; height: 12px;
    background: rgba(0,220,255,0.5);
    transform-origin: 0.5px 0px;
    border-radius: 1px;
}

.nd-1 { animation: needle-sweep 3.5s ease-in-out infinite; will-change: transform; }
.nd-2 { animation: needle-sweep-2 5s ease-in-out infinite; will-change: transform; }

.mini-dial span {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: rgba(0,210,255,0.45);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── LED Indicators ── */

.led-cluster {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 2px 0;
}

.led-cluster-h {
    flex-direction: row;
    padding: 0 2px;
}

.led {
    width: 5px; height: 5px;
    border-radius: 50%;
}

.led-g {
    background: rgba(0,255,140,0.7);
    box-shadow: 0 0 4px rgba(0,255,140,0.4);
    animation: blink-green 3s infinite;
}

.led-a {
    background: rgba(255,180,40,0.7);
    box-shadow: 0 0 4px rgba(255,160,20,0.4);
    animation: warn-pulse 2.5s infinite;
}

.led-r {
    background: rgba(255,50,40,0.4);
    box-shadow: 0 0 3px rgba(255,40,30,0.2);
    animation: blink-red 2s infinite;
}

/* ── Warning Light ── */

.dw-light {
    width: 14px; height: 14px;
    border-radius: 2px;
}

.dw-amber {
    background: rgba(255,160,30,0.4);
    border: 1px solid rgba(255,140,20,0.2);
    box-shadow: 0 0 4px rgba(255,140,20,0.15);
    animation: warn-pulse 2s infinite;
}

.dw-amber.active {
    background: rgba(255,180,40,0.9);
    box-shadow: 0 0 10px rgba(255,160,30,0.5), 0 0 20px rgba(255,140,20,0.2);
}

/* ── Decorative Knob ── */

.deco-knob {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    flex-shrink: 0;
}

.dk-body {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3a3f48 0%, #2a2e36 50%, #1a1e24 100%);
    border: 1.5px solid rgba(55,60,70,0.5);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(100,105,115,0.06);
    position: relative;
}

.dk-body::after {
    content: '';
    position: absolute;
    top: 3px; left: 50%;
    width: 1.5px; height: 8px;
    background: rgba(200,210,220,0.2);
    transform: translateX(-50%);
    border-radius: 1px;
}

.deco-knob span {
    font-size: 6px;
    letter-spacing: 1.5px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Analog Meter (right panel) ── */

.deco-meter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dmtr-face {
    width: 70px; height: 42px;
    background: radial-gradient(ellipse at 50% 80%, #0a0e14 30%, #101822 100%);
    border: 2px solid rgba(50,55,65,0.5);
    border-radius: 4px 4px 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.4);
}

.dmtr-scale {
    position: absolute;
    top: 6px; left: 8px; right: 8px;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(0,200,255,0.3),
        rgba(0,255,140,0.3) 40%,
        rgba(255,200,50,0.3) 70%,
        rgba(255,60,40,0.3));
}

.dmtr-scale::before {
    content: '';
    position: absolute;
    top: -3px; left: 0; right: 0;
    height: 7px;
    background: repeating-linear-gradient(
        90deg,
        rgba(200,210,220,0.15) 0px,
        rgba(200,210,220,0.15) 1px,
        transparent 1px,
        transparent 6px
    );
}

.dmtr-needle {
    position: absolute;
    bottom: 2px; left: 50%;
    width: 1.5px; height: 28px;
    background: linear-gradient(180deg, rgba(255,80,50,0.8), rgba(255,60,40,0.4));
    transform-origin: 0.75px 26px;
    animation: meter-needle 8s ease-in-out infinite;
    will-change: transform;
    border-radius: 1px;
}

.dmtr-hub {
    position: absolute;
    bottom: -2px; left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #2a2e36;
    border: 1px solid rgba(60,65,75,0.4);
}

.deco-meter span {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: rgba(0,210,255,0.4);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ══════════════════════════════════
   INSTRUMENT STRIPS
   ══════════════════════════════════ */

.deco-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 8px;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.15) 100%);
    border-top: 1px solid rgba(40,50,65,0.2);
    border-bottom: 1px solid rgba(40,50,65,0.2);
    flex-shrink: 0;
    min-height: 52px;
}

.strip-div {
    width: 1px;
    height: 32px;
    background: rgba(40,50,65,0.3);
    flex-shrink: 0;
}

/* ── Toggle Switch Row ── */

.deco-toggle-row {
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.dtr-sm { gap: 4px; }

.dtog-sm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.dts-handle {
    width: 7px; height: 14px;
    background: linear-gradient(180deg, #444a54 0%, #2a2e36 100%);
    border: 1px solid rgba(55,60,70,0.4);
    border-radius: 1.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.dts-on {
    background: linear-gradient(180deg, #555d66 0%, #3a3f48 100%);
    transform: translateY(-3px);
}

.dtog-sm span {
    font-size: 5.5px;
    letter-spacing: 0.5px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Radar / Scope ── */

.deco-radar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, #020a04 0%, #041208 60%, #081810 100%);
    border: 2px solid rgba(40,50,60,0.5);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0,200,80,0.08);
}

.radar-ring.r1 {
    top: 25%; left: 25%; right: 25%; bottom: 25%;
}

.radar-ring.r2 {
    top: 8%; left: 8%; right: 8%; bottom: 8%;
}

.radar-sweep {
    position: absolute;
    top: 50%; left: 50%;
    width: 50%; height: 2px;
    background: linear-gradient(90deg, rgba(0,255,100,0.5), rgba(0,200,80,0));
    transform-origin: 0 50%;
    animation: radar-sweep 3s linear infinite;
    will-change: transform;
}

.radar-blip {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(0,255,100,0.7);
    box-shadow: 0 0 3px rgba(0,255,100,0.4);
    animation: radar-blip 3s linear infinite;
}

.rb1 { top: 28%; left: 62%; animation-delay: 0.3s; }
.rb2 { top: 55%; left: 35%; animation-delay: 1.2s; }
.rb3 { top: 38%; left: 72%; animation-delay: 2.1s; width: 2px; height: 2px; }

.radar-cross-h, .radar-cross-v {
    position: absolute;
    background: rgba(0,200,80,0.06);
}

.radar-cross-h {
    top: 50%; left: 0; right: 0; height: 1px;
    transform: translateY(-0.5px);
}

.radar-cross-v {
    left: 50%; top: 0; bottom: 0; width: 1px;
    transform: translateX(-0.5px);
}

/* ── LED Bank ── */

.deco-led-bank {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dlb-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.dlb-row span {
    font-size: 6px;
    letter-spacing: 1px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    margin-left: 3px;
}

/* ── Button Cluster ── */

.deco-btn-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    flex-shrink: 0;
}

.deco-btn-cluster.dbc-sm {
    grid-template-columns: repeat(2, 1fr);
}

.dbc-btn {
    width: 12px; height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(50,55,65,0.4);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(100,105,115,0.04);
}

.dbc-g {
    background: linear-gradient(180deg, #1a2a20 0%, #142218 100%);
    border-color: rgba(0,140,80,0.15);
}

.dbc-a {
    background: linear-gradient(180deg, #2a2418 0%, #221c12 100%);
    border-color: rgba(180,120,20,0.15);
}

.dbc-r {
    background: linear-gradient(180deg, #2a1a18 0%, #221412 100%);
    border-color: rgba(180,40,30,0.15);
}

/* ── Decorative Sliders ── */

.deco-sld {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.dsl-track {
    width: 60px; height: 6px;
    background: #0a0c12;
    border: 1px solid rgba(45,50,60,0.35);
    border-radius: 3px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

.dsl-fill {
    position: absolute;
    top: 1px; left: 1px; bottom: 1px;
    background: linear-gradient(90deg, rgba(0,180,255,0.12), rgba(0,200,255,0.22));
    border-radius: 2px 0 0 2px;
}

.dsl-thumb {
    position: absolute;
    top: -2px;
    width: 5px; height: 10px;
    background: linear-gradient(180deg, #4a5058 0%, #2a2e36 100%);
    border: 1px solid rgba(65,70,80,0.4);
    border-radius: 1px;
}

.deco-sld span {
    font-size: 6px;
    letter-spacing: 1px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Warning Panel ── */

.deco-warn-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 8px;
    flex-shrink: 0;
}

.dwp-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dwp-row span {
    font-size: 6px;
    letter-spacing: 1px;
    color: rgba(180,190,200,0.35);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

.dw-red-warn {
    width: 14px; height: 14px;
    border-radius: 2px;
    background: rgba(255,50,40,0.25);
    border: 1px solid rgba(255,40,30,0.15);
    animation: blink-red 2.5s infinite;
}

.dw-green-warn {
    width: 14px; height: 14px;
    border-radius: 2px;
    background: rgba(0,255,140,0.4);
    border: 1px solid rgba(0,200,100,0.2);
    box-shadow: 0 0 4px rgba(0,255,140,0.15);
}

/* ══════════════════════════════════
   COCKPIT EDGE FRAMES
   ══════════════════════════════════ */

.ck-edge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    width: 22px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0c1018 0%, #101620 30%, #0e1420 70%, #0a0e16 100%);
    border-left: 1px solid rgba(40,50,65,0.25);
    border-right: 1px solid rgba(40,50,65,0.25);
    padding: 8px 0;
    position: relative;
}

.ck-edge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 18px,
        rgba(40,50,65,0.08) 18px,
        rgba(40,50,65,0.08) 19px
    );
    pointer-events: none;
}

.ck-left {
    border-left: 2px solid rgba(30,40,55,0.5);
    border-right: 1px solid rgba(50,60,75,0.15);
    box-shadow: inset 2px 0 8px rgba(0,0,0,0.3);
}

.ck-right {
    border-right: 2px solid rgba(30,40,55,0.5);
    border-left: 1px solid rgba(50,60,75,0.15);
    box-shadow: inset -2px 0 8px rgba(0,0,0,0.3);
}

.ck-rivet {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3a3f48 0%, #22262c 60%, #181b20 100%);
    border: 1px solid rgba(50,55,65,0.4);
    box-shadow: inset 0 1px 0 rgba(100,105,115,0.08), 0 1px 2px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.ck-vent {
    width: 14px; height: 10px;
    background: repeating-linear-gradient(
        0deg,
        #0a0c12 0px,
        #0a0c12 2px,
        rgba(30,35,45,0.5) 2px,
        rgba(30,35,45,0.5) 3px
    );
    border-radius: 1px;
    border: 1px solid rgba(40,45,55,0.3);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.ck-light {
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ck-lg {
    background: rgba(0,255,140,0.6);
    box-shadow: 0 0 4px rgba(0,255,140,0.4), 0 0 8px rgba(0,255,140,0.15);
    animation: blink-green 3.5s infinite;
}

.ck-la {
    background: rgba(255,180,40,0.5);
    box-shadow: 0 0 4px rgba(255,160,20,0.3);
    animation: warn-pulse 2.5s infinite;
}

.ck-lr {
    background: rgba(255,50,40,0.4);
    box-shadow: 0 0 3px rgba(255,40,30,0.2);
    animation: blink-red 2s infinite;
}

/* ══════════════════════════════════
   LEFT PANEL — EXPANDED LAYOUT
   ══════════════════════════════════ */

.left-main {
    display: flex;
    gap: 6px;
    flex: 1;
    min-height: 0;
}

.cpanel-left > .left-main:first-child {
    flex: 3;
}

.left-side-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    width: 48px;
}

/* ── Left Toggle Column ── */

.lt-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 2px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(40,50,65,0.15);
    border-radius: 3px;
}

.lt-sw {
    display: flex;
    align-items: center;
    gap: 3px;
}

.lt-h {
    width: 7px; height: 14px;
    background: linear-gradient(180deg, #3a3f48 0%, #22262c 100%);
    border: 1px solid rgba(50,55,65,0.4);
    border-radius: 1.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.lt-on {
    background: linear-gradient(180deg, #555d66 0%, #3a3f48 100%);
    transform: translateY(-2px);
}

.lt-sw span {
    font-size: 6px;
    letter-spacing: 0.5px;
    color: rgba(160,170,180,0.35);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Left Warning Lights ── */

.left-warns {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 3px 2px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(40,50,65,0.15);
    border-radius: 3px;
}

.lw-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.lw-light {
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lw-lg {
    background: rgba(0,255,140,0.6);
    box-shadow: 0 0 3px rgba(0,255,140,0.3);
    animation: blink-green 4s infinite;
}

.lw-la {
    background: rgba(255,180,40,0.5);
    box-shadow: 0 0 3px rgba(255,160,20,0.25);
    animation: warn-pulse 3s infinite;
}

.lw-lr {
    background: rgba(255,50,40,0.4);
    box-shadow: 0 0 3px rgba(255,40,30,0.2);
    animation: blink-red 2.5s infinite;
}

.lw-row span {
    font-size: 5.5px;
    letter-spacing: 0.5px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Left Micro Display ── */

.left-micro {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 6px;
    background: rgba(0,20,10,0.4);
    border: 1px solid rgba(0,100,60,0.15);
    border-radius: 2px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}

.lm-line {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    color: rgba(0,220,140,0.7);
    text-shadow: 0 0 4px rgba(0,200,100,0.3);
    letter-spacing: 1px;
}

.lm-dim {
    color: rgba(0,200,120,0.4);
    text-shadow: none;
}

/* ══════════════════════════════════
   RIGHT PANEL — EXPANDED LAYOUT
   ══════════════════════════════════ */

.right-main {
    display: flex;
    gap: 6px;
    flex: 1;
    min-height: 0;
}

.right-side-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    width: 48px;
}

/* ── Right Toggle Column ── */

.rt-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 2px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(40,50,65,0.15);
    border-radius: 3px;
}

.rt-sw {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rt-h {
    width: 7px; height: 14px;
    background: linear-gradient(180deg, #3a3f48 0%, #22262c 100%);
    border: 1px solid rgba(50,55,65,0.4);
    border-radius: 1.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.rt-on {
    background: linear-gradient(180deg, #555d66 0%, #3a3f48 100%);
    transform: translateY(-2px);
}

.rt-sw span {
    font-size: 6px;
    letter-spacing: 0.5px;
    color: rgba(160,170,180,0.35);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Right Warning Lights ── */

.right-warns {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 3px 2px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(40,50,65,0.15);
    border-radius: 3px;
}

.rw-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rw-light {
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rw-lg { background: rgba(0,255,140,0.6); box-shadow: 0 0 3px rgba(0,255,140,0.3); animation: blink-green 4.5s infinite; }
.rw-la { background: rgba(255,180,40,0.5); box-shadow: 0 0 3px rgba(255,160,20,0.25); animation: warn-pulse 3.2s infinite; }
.rw-lr { background: rgba(255,50,40,0.4); box-shadow: 0 0 3px rgba(255,40,30,0.2); animation: blink-red 2.8s infinite; }

.rw-row span {
    font-size: 5.5px;
    letter-spacing: 0.5px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Communication Panel ── */

.comm-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.comm-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 5px 8px;
    background: rgba(0,15,8,0.5);
    border: 1px solid rgba(0,100,60,0.15);
    border-radius: 2px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
}

.comm-freq {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: rgba(0,220,140,0.8);
    text-shadow: 0 0 6px rgba(0,200,100,0.4);
    letter-spacing: 2px;
}

.comm-label {
    font-family: 'Courier New', monospace;
    font-size: 7px;
    color: rgba(0,200,120,0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.comm-knobs {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* ── Right Mid Row (meter + buttons) ── */

.right-mid {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.right-btn-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.rbp-btn {
    width: 14px; height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(50,55,65,0.4);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(100,105,115,0.04);
}

.rbp-g { background: linear-gradient(180deg, #1a2a20 0%, #142218 100%); border-color: rgba(0,140,80,0.15); }
.rbp-a { background: linear-gradient(180deg, #2a2418 0%, #221c12 100%); border-color: rgba(180,120,20,0.15); }
.rbp-r { background: linear-gradient(180deg, #2a1a18 0%, #221412 100%); border-color: rgba(180,40,30,0.15); }

/* ── Right Micro Display ── */

.right-micro {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 6px;
    background: rgba(0,20,10,0.4);
    border: 1px solid rgba(0,100,60,0.15);
    border-radius: 2px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}

.rm-line {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    color: rgba(0,220,140,0.7);
    text-shadow: 0 0 4px rgba(0,200,100,0.3);
    letter-spacing: 1px;
}

.rm-dim {
    color: rgba(0,200,120,0.4);
    text-shadow: none;
}

/* ── Right Bottom Row ── */

.right-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 4px;
}

.right-sliders {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Bar Graph Display ── */

.bar-graph {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 6px 8px 4px;
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(40,50,65,0.15);
    border-radius: 3px;
    height: 48px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
}

.bar-fill {
    width: 100%;
    max-width: 12px;
    background: linear-gradient(180deg, rgba(0,220,255,0.5), rgba(0,180,255,0.15));
    border-radius: 1px 1px 0 0;
    border: 1px solid rgba(0,180,255,0.12);
    box-shadow: 0 0 4px rgba(0,180,255,0.08);
}

.bar-col span {
    font-size: 5px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* ── System Status Panel ── */

.sys-status-panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 6px;
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(40,50,65,0.15);
    border-radius: 3px;
}

.ssp-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ssp-light {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ssp-g {
    background: rgba(0,255,140,0.6);
    box-shadow: 0 0 3px rgba(0,255,140,0.3);
    animation: blink-green 5s infinite;
}

.ssp-a {
    background: rgba(255,180,40,0.5);
    box-shadow: 0 0 3px rgba(255,160,20,0.25);
    animation: warn-pulse 3.5s infinite;
}

.ssp-row span {
    font-size: 5.5px;
    letter-spacing: 0.5px;
    color: rgba(160,170,180,0.3);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ══════════════════════════════════
   CONSOLE LABEL
   ══════════════════════════════════ */

/* ── Console Metal Plate Label ── */

.console-plate {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 12px;
    text-transform: uppercase;
    color: #e8f4ff;
    text-shadow:
        0 0 8px rgba(0,220,255,0.9),
        0 0 20px rgba(0,200,255,0.5),
        0 0 40px rgba(0,180,255,0.25),
        0 1px 0 rgba(0,0,0,0.8);
    padding: 10px 50px;
    flex-shrink: 0;
    font-family: 'Courier New', monospace;
    background: linear-gradient(180deg, #161c26 0%, #0f141c 40%, #121820 60%, #0e1318 100%);
    border-top: 1px solid rgba(60,70,85,0.3);
    border-bottom: 1px solid rgba(30,38,50,0.6);
    box-shadow:
        inset 0 1px 0 rgba(80,90,110,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.4),
        0 2px 8px rgba(0,0,0,0.4);
    position: relative;
}

.console-plate::before,
.console-plate::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3a3f48 0%, #22262c 60%, #181b20 100%);
    border: 1px solid rgba(50,55,65,0.4);
    box-shadow: inset 0 1px 0 rgba(100,105,115,0.08), 0 1px 2px rgba(0,0,0,0.3);
}

.console-plate::before { left: 14px; }
.console-plate::after { right: 14px; }

/* ══════════════════════════════════
   FOOTER
   ══════════════════════════════════ */

.cockpit-footer {
    position: absolute;
    bottom: 6px; left: 50%;
    transform: translateX(-50%);
    font-size: 8px; letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0,180,255,0.15);
    z-index: 30;
}

/* ══════════════════════════════════
   DESTINATION MODAL
   ══════════════════════════════════ */

.dest-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.dest-modal.active {
    visibility: visible;
    opacity: 1;
}

.dest-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.dest-panel {
    position: relative;
    width: 680px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px 48px 36px;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.005) 0px,
            rgba(255,255,255,0.005) 1px,
            transparent 1px,
            transparent 4px
        ),
        linear-gradient(135deg, #0c1220 0%, #0a0f1a 40%, #080c16 100%);
    border: 1px solid rgba(0,180,255,0.18);
    border-radius: 10px;
    box-shadow:
        0 0 40px rgba(0,140,220,0.12),
        0 0 80px rgba(0,100,180,0.06),
        0 20px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(0,180,255,0.08);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.25, 0, 0.3, 1);
}

.dest-modal.active .dest-panel {
    transform: translateY(0) scale(1);
}

/* ── Scanline effect ── */
.dest-scanline {
    position: absolute;
    top: 0; left: 12px; right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.25), transparent);
    animation: mission-scan 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

/* ── Close button ── */
.dest-close {
    position: absolute;
    top: 14px; right: 16px;
    width: 36px; height: 36px;
    background: rgba(0,180,255,0.04);
    border: 1px solid rgba(0,180,255,0.15);
    border-radius: 6px;
    color: rgba(180,200,220,0.6);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.dest-close:hover {
    background: rgba(0,180,255,0.1);
    border-color: rgba(0,200,255,0.35);
    color: #fff;
}

/* ── Header ── */
.dest-header {
    margin-bottom: 16px;
}

.dest-header-label {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(0,220,255,0.6);
    text-shadow: 0 0 8px rgba(0,200,255,0.3);
}

/* ── Plate badge ── */
.dest-plate-row {
    margin-bottom: 10px;
}

.dest-plate {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0,200,230,0.7);
    padding: 4px 12px;
    background: rgba(0,180,255,0.06);
    border: 1px solid rgba(0,180,255,0.18);
    border-radius: 4px;
    text-shadow: 0 0 6px rgba(0,200,255,0.2);
}

/* ── Project name ── */
.dest-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(0,255,255,0.7),
        0 0 20px rgba(0,220,255,0.4),
        0 0 40px rgba(0,200,255,0.15);
    margin: 0 0 16px;
    line-height: 1.3;
}

/* ── Divider ── */
.dest-divider {
    width: 80%;
    height: 1px;
    margin: 0 0 20px;
    background: linear-gradient(90deg, rgba(0,180,255,0.3), rgba(0,255,255,0.15), transparent);
}

/* ── Description ── */
.dest-desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(180,200,220,0.85);
    letter-spacing: 0.3px;
    margin: 0 0 32px;
    max-width: 560px;
}

/* ── Explore button ── */
.dest-go {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(180deg, rgba(0,180,255,0.12) 0%, rgba(0,140,220,0.08) 100%);
    border: 1px solid rgba(0,200,255,0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-shadow: 0 0 8px rgba(0,200,255,0.3);
}

.dest-go:hover {
    background: linear-gradient(180deg, rgba(0,200,255,0.2) 0%, rgba(0,160,240,0.14) 100%);
    border-color: rgba(0,220,255,0.5);
    box-shadow: 0 0 24px rgba(0,180,255,0.2), 0 0 50px rgba(0,140,220,0.08), inset 0 0 12px rgba(0,200,255,0.06);
    transform: translateY(-1px);
}

.dest-go:active {
    transform: translateY(1px);
    box-shadow: 0 0 12px rgba(0,180,255,0.15), inset 0 2px 4px rgba(0,0,0,0.2);
}

.dest-go-icon {
    font-size: 10px;
    color: rgba(0,220,255,0.8);
}

/* ── Modal responsive ── */
@media (max-width: 1150px) {
    .dest-panel {
        padding: 32px 24px 28px;
        max-width: 92vw;
        border-radius: 8px;
    }
    .dest-name {
        font-size: 22px;
        letter-spacing: 3px;
    }
    .dest-desc {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    .dest-go {
        padding: 14px 28px;
        font-size: 12px;
        letter-spacing: 2px;
        min-height: 50px;
        width: 100%;
        justify-content: center;
    }
    .dest-header-label {
        font-size: 10px;
        letter-spacing: 3px;
    }
    .dest-close {
        top: 10px;
        right: 12px;
    }
}

@media (max-width: 479px) {
    .dest-panel {
        padding: 28px 18px 24px;
    }
    .dest-name {
        font-size: 18px;
        letter-spacing: 2px;
    }
    .dest-desc {
        font-size: 13px;
        margin-bottom: 20px;
    }
    .dest-header-label {
        font-size: 9px;
        letter-spacing: 2px;
    }
    .dest-plate {
        font-size: 9px;
        padding: 3px 10px;
    }
    .dest-go {
        padding: 12px 20px;
        font-size: 11px;
    }
}

/* ══════════════════════════════════
   TOUCH SUPPORT
   ══════════════════════════════════ */

@media (hover: none) and (pointer: coarse) {
    /* Show board prompt always on touch devices (no hover) */
    #board-prompt { opacity: 1 !important; }
    #ship-label { opacity: 0.6 !important; }

    /* Disable hover effects on touch — only respond to :active */
    .ctrl:hover {
        background: transparent;
        border-color: rgba(0,180,255,0.08);
        box-shadow: none;
    }
    .ctrl:hover .plate {
        color: rgba(0,200,230,0.5);
        text-shadow: 0 0 6px rgba(0,200,255,0.2);
    }
    .ctrl:hover .ctrl-name {
        color: rgba(255,255,255,0.9);
        text-shadow: 0 0 8px rgba(0,200,255,0.25);
    }

    /* Active states instead of hover */
    .ctrl:active {
        background: rgba(0,180,255,0.08);
        border-color: rgba(0,200,255,0.3);
        box-shadow: 0 0 20px rgba(0,200,255,0.2), inset 0 0 12px rgba(0,200,255,0.06);
    }
    .ctrl:active .plate {
        color: rgba(0,220,255,0.8);
        text-shadow: 0 0 10px rgba(0,200,255,0.5);
    }
    .ctrl:active .ctrl-name {
        color: #fff;
        text-shadow: 0 0 14px rgba(0,220,255,0.5), 0 0 30px rgba(0,200,255,0.15);
    }

    /* Ensure tap targets are large enough */
    .ctrl { min-height: 44px; min-width: 44px; }
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */

/* ── Simplified layout: under 1150px ── */
@media (max-width: 1150px) {

    /* ═══ SHIP EXTERIOR ═══ */
    #ship {
        transform: scale(0.5);
        transform-origin: center center;
    }
    #board-prompt { bottom: -45px; }
    .prompt-text { font-size: 14px; letter-spacing: 4px; }
    .prompt-bg { padding: 10px 24px; }
    #ship-label { font-size: 11px; letter-spacing: 3px; top: -40px; }

    /* ═══ VIEWPORT / HUD ═══ */
    .vp-frame { height: 40%; }
    .hud { height: 40%; }
    .vp-strut { display: none; }
    .vp-left, .vp-right { width: 18px; }
    .vp-top { height: 22px; }

    /* ═══ MISSION DISPLAY ═══ */
    .mission-display {
        padding: 16px 28px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 80px);
        max-width: 500px;
    }
    .mission-label {
        font-size: 10px;
        letter-spacing: 3px;
        margin-bottom: 8px;
    }
    .mission-text {
        font-size: 20px;
        letter-spacing: 3px;
        white-space: normal;
        line-height: 1.4;
        text-shadow:
            0 0 8px rgba(0,255,255,0.8),
            0 0 16px rgba(0,220,255,0.5),
            0 0 30px rgba(0,200,255,0.25);
    }
    .mission-divider { margin: 10px auto; }
    .mission-obj {
        font-size: 14px;
        letter-spacing: 3px;
    }
    .mission-status {
        font-size: 10px;
        letter-spacing: 2px;
        margin-top: 10px;
    }
    .mission-bracket { width: 12px; height: 12px; }
    .ms-led { width: 6px; height: 6px; }
    .mission-scanline { display: none; }

    /* ═══ CONSOLE — 60% of screen ═══ */
    .console { height: 60%; }
    .console-glow { display: none; }
    .console-edge { height: 2px; }
    .console-plate { display: none; }
    .console-surface {
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        align-items: stretch;
    }

    /* ═══ HIDE EVERYTHING DECORATIVE ═══ */
    .cpanel-left { display: none; }
    .cpanel-right { display: none; }
    .panel-div { display: none; }
    .ck-edge { display: none; }
    .deco-strip { display: none; }

    /* Hide ALL non-control elements inside ctrl-rows */
    .ctrl-row > .led-cluster,
    .ctrl-row > .mini-dial,
    .ctrl-row > .deco-knob,
    .ctrl-row > .deco-warn-panel,
    .ctrl-row > .deco-btn-cluster {
        display: none;
    }

    /* ═══ CENTER PANEL — full-width card list ═══ */
    .cpanel-center {
        flex: 1;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px 24px 24px;
    }

    /* ═══ CONTROL ROWS — single-column stack ═══ */
    .ctrl-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: none;
        align-items: stretch;
    }

    /* ═══ CONTROLS — clean card style with CSS Grid ═══ */
    .ctrl {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 2px;
        align-items: center;
        padding: 16px 20px;
        min-height: 68px;
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
        border-radius: 8px;
        border: 1px solid rgba(0,180,255,0.12);
        background: rgba(10,16,28,0.6);
        animation: none;
        box-shadow: none;
    }

    .ctrl:focus,
    .ctrl:focus-visible {
        outline: none;
        background: rgba(10,16,28,0.6);
        border-color: rgba(0,180,255,0.12);
        box-shadow: none;
    }

    .ctrl:active {
        background: rgba(0,180,255,0.08);
        border-color: rgba(0,200,255,0.35);
    }

    /* ═══ HIDE all complex control internals ═══ */
    .rkr-housing,
    .tog-housing,
    .dial-housing,
    .push-housing,
    .sld-housing,
    .sp-housing {
        display: none;
    }

    /* ═══ PLATE — left badge spanning both rows ═══ */
    .plate {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 9px;
        letter-spacing: 2px;
        margin-bottom: 0;
        min-width: 54px;
        padding: 5px 10px;
        background: rgba(0,180,255,0.06);
        border: 1px solid rgba(0,180,255,0.15);
        border-radius: 4px;
        text-align: center;
    }

    /* ═══ Name — right column, top row ═══ */
    .ctrl-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 2px;
        white-space: normal;
        text-align: left;
        margin-top: 0;
        line-height: 1.3;
        align-self: end;
    }

    /* ═══ Subtitle — right column, bottom row ═══ */
    .ctrl-sub {
        grid-column: 2;
        grid-row: 2;
        font-size: 12px;
        letter-spacing: 1px;
        text-align: left;
        margin-top: 0;
        color: rgba(140,170,200,0.6);
        align-self: start;
    }

    /* ═══ Spacing between the two ctrl-rows ═══ */
    .cpanel-center > .ctrl-row + .ctrl-row {
        margin-top: 10px;
    }

    /* ═══ Footer ═══ */
    .cockpit-footer {
        font-size: 7px;
        letter-spacing: 1.5px;
        bottom: 4px;
    }
}

/* ── Narrow screens: under 768px ── */
@media (max-width: 767px) {
    #ship { transform: scale(0.35); }
    #ship-label { font-size: 10px; top: -38px; }
    #board-prompt { bottom: -40px; }
    .prompt-text { font-size: 13px; letter-spacing: 3px; }
    .prompt-bg { padding: 8px 20px; }

    .vp-left, .vp-right { width: 15px; }
    .vp-top { height: 20px; }

    .mission-display { padding: 12px 20px; width: calc(100% - 60px); max-width: 400px; }
    .mission-label { font-size: 9px; letter-spacing: 2px; margin-bottom: 6px; }
    .mission-text { font-size: 16px; letter-spacing: 2px; }
    .mission-obj { font-size: 12px; letter-spacing: 2px; }
    .mission-status { font-size: 9px; margin-top: 8px; }
    .mission-bracket { width: 10px; height: 10px; }
    .ms-led { width: 5px; height: 5px; }

    .cpanel-center { padding: 12px 16px 20px; }
    .ctrl { padding: 14px 18px; column-gap: 14px; }
    .ctrl-name { font-size: 15px; }
    .ctrl-sub { font-size: 11px; }
    .plate { font-size: 9px; min-width: 52px; padding: 4px 8px; }
}

/* ── Small mobile: under 480px ── */
@media (max-width: 479px) {
    #ship { transform: scale(0.28); }
    #board-prompt { bottom: -32px; }
    .prompt-text { font-size: 11px; letter-spacing: 2px; }
    .prompt-bg { padding: 6px 16px; border-radius: 6px; }
    #ship-label { font-size: 8px; letter-spacing: 2px; top: -32px; }

    .vp-frame { height: 35%; }
    .hud { height: 35%; }
    .console { height: 65%; }
    .vp-left, .vp-right { width: 10px; }
    .vp-top { height: 16px; }

    .mission-display { padding: 10px 16px; width: calc(100% - 40px); }
    .mission-text { font-size: 14px; letter-spacing: 1.5px; }
    .mission-obj { font-size: 10px; letter-spacing: 1.5px; }
    .mission-status { font-size: 8px; letter-spacing: 1.5px; }
    .mission-label { font-size: 8px; }

    .cpanel-center { padding: 10px 12px 16px; }
    .ctrl { padding: 12px 14px; min-height: 60px; column-gap: 12px; }
    .ctrl-name { font-size: 14px; letter-spacing: 1.5px; }
    .ctrl-sub { font-size: 10px; }
    .plate { font-size: 8px; letter-spacing: 1.5px; min-width: 46px; padding: 3px 6px; }
    .ctrl-row { gap: 8px; }

    .cockpit-footer { font-size: 6px; }
}

/* ── Tiny screens: under 360px ── */
@media (max-width: 359px) {
    #ship { transform: scale(0.22); }

    .vp-frame { height: 30%; }
    .hud { height: 30%; }
    .console { height: 70%; }

    .mission-display { width: calc(100% - 30px); padding: 8px 12px; }
    .mission-text { font-size: 12px; letter-spacing: 1px; }
    .mission-obj { font-size: 9px; letter-spacing: 1px; }
    .mission-label { font-size: 7px; letter-spacing: 1px; }
    .mission-status { font-size: 7px; }

    .cpanel-center { padding: 8px 10px 14px; }
    .ctrl { padding: 10px 12px; min-height: 56px; column-gap: 10px; }
    .ctrl-name { font-size: 13px; letter-spacing: 1px; }
    .ctrl-sub { font-size: 9px; }
    .plate { font-size: 7px; min-width: 40px; }
    .ctrl-row { gap: 6px; }
}

/* ── Landscape mobile ── */
@media (max-height: 500px) and (max-width: 1150px) {
    .vp-frame { height: 20%; }
    .hud { height: 20%; }
    .console { height: 80%; }
    .mission-display { padding: 6px 14px; }
    .mission-text { font-size: 12px; }
    .mission-obj { font-size: 9px; }
    .mission-status { display: none; }
    .mission-divider { margin: 4px auto; }
    .mission-label { margin-bottom: 3px; }
    .vp-top { height: 10px; }

    .cpanel-center { padding: 8px 16px 12px; }
    .ctrl-row { gap: 6px; }
    .ctrl { min-height: 52px; padding: 10px 14px; }
}
