    :root {
        --btn-off: #441111; --btn-red: #ff3300; --btn-green: #00ff66; --label-color: #bbb;
        --eye-red: #ff0000; --holis-blue: rgba(180, 30, 255, 0.4);
        --tele-orange: #ff9900;
    }
    body {
        margin: 0;
        background-color: #020202;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        overflow: visible;
        overflow-y: auto;
        font-family: 'Courier New', Courier, monospace;
    }
    #main-frame {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        z-index: 10;
        width: 100%;
        transition: transform 1.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 1s;
    }
    * {
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }
    @media (max-width: 900px) {
        body {
            overflow-y: auto !important;
            align-items: flex-start !important;
            padding: 20px 0;
        }
        #main-frame {
            flex-direction: column !important;
            height: auto !important;
            width: 100% !important;
            gap: 30px !important;
            padding: 20px;
            box-sizing: border-box;
            justify-content: flex-start !important;
            align-items: center !important;
        }
        #hal-container {
            width: 90vw !important;
            height: 90vw !important;
            max-width: 450px;
            max-height: 450px;
            margin: 0 auto !important;
            position: static !important;
            transform: none !important;
        }
        #panel {
            width: 100% !important;
            max-width: 320px;
            margin: 0 auto !important;
            position: static !important;
        }
    }
    body.logic-active-prepare #main-frame {
        transform: translateY(-100vh);
        opacity: 0;
        pointer-events: none;
    }
    #airlock {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: none;
        background: transparent;
    }
    .door-leaf {
        position: absolute;
        width: 100%;
        height: 50%;
        background: linear-gradient(to bottom, #151515, #0a0a0a);
        border: 2px solid #222;
        transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .door-top { top: 0; transform: translateY(-100%); border-bottom: 4px solid #331111; }
    .door-bottom { bottom: 0; transform: translateY(100%); border-top: 4px solid #331111; }
    body.airlock-ready .door-top { transform: translateY(0); }
    body.airlock-ready .door-bottom { transform: translateY(0); }
    #airlock-panel {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        z-index: 10001;
        pointer-events: all;
        background: #0d0d0d;
        padding: 20px;
        border: 1px solid #333;
        border-radius: 4px;
        box-shadow: 0 0 30px rgba(0,0,0,1);
    }
    .door-label {
        color: #ff3300;
        font-size: 10px;
        letter-spacing: 3px;
        font-weight: bold;
        text-transform: uppercase;
        border: 1px solid #ff3300;
        padding: 5px 10px;
        margin-bottom: 5px;
        text-shadow: 0 0 5px #ff3300;
    }
    .open-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: #441111;
        border: 3px solid #222;
        cursor: pointer;
        box-shadow: inset 0 0 10px #000;
        transition: all 0.3s;
    }
    .open-btn:hover { background: #661111; transform: scale(1.05); }
    .open-btn:active { background: #ff3300; box-shadow: 0 0 20px #ff3300; }
    body.logic-active .door-top { transform: translateY(-100%); }
    body.logic-active .door-bottom { transform: translateY(100%); }
    body.logic-active #airlock-panel { opacity: 0; pointer-events: none; transition: opacity 0.5s; }
    #core-terminal {
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        z-index: 99999;
        background: black;
        display: none;
    }
    #terminal-frame {
        width: 100%;
        height: 100%;
        border: none;
        -webkit-overflow-scrolling: touch;
    }
    #info-panel {
        width: 100%; max-width: 550px; box-sizing: border-box;
        background: #050505; border: 1px solid #1a1a1a; border-radius: 2px;
        padding: 5px 10px; display: flex; align-items: center; gap: 10px;
        margin-top: 6px;
    }
    #ai-status-bar {
        display: flex; gap: 8px; width: 100%; max-width: 550px;
        box-sizing: border-box; margin-top: 6px;
    }
    .status-cell {
        flex: 1; background: #0a0a0a; border: 1px solid #222;
        padding: 5px 8px; border-radius: 2px;
    }
    .status-cell .tele-label { margin-bottom: 3px; }
    .status-cell .tele-status { border-top: none; padding-top: 4px; }
    .status-cell .tele-display { border: none; padding: 2px 0; text-align: center; background: transparent; }
    #range-area, #sync-area, #vtec-area {
        border-top: 1px solid #1a1a1a; padding-top: 8px;
    }
    #vtec-area { opacity: 0.3; min-height: 28px; }
    .tele-display {
        background: #050505;
        border: 1px solid #333;
        padding: 10px;
        font-size: 11px;
        color: var(--tele-orange);
        text-align: right;
        text-shadow: 0 0 5px var(--tele-orange);
    }
    .tele-label {
        color: var(--label-color);
        font-size: 8px;
        letter-spacing: 2px;
        font-weight: bold;
        margin-bottom: 4px;
    }
    .tele-status {
        color: #fff;
        font-size: 10px;
        text-align: center;
        border-top: 1px solid #222;
        padding-top: 10px;
        letter-spacing: 1px;
    }
    #hal-center-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 35px;
        position: relative;
        z-index: 10;
        pointer-events: none;
    }
    #interaction-panel {
        display: flex;
        gap: 10px;
        background: #0d0d0d;
        padding: 12px;
        border: 1px solid #222;
        border-radius: 4px;
        pointer-events: all;
        width: 100%; max-width: 550px; box-sizing: border-box;
    }
    .sensor-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        width: 80px;
        flex-shrink: 0;
    }
    .h-btn {
        width: 32px !important;
        height: 32px !important;
    }
    .sensor-indicator {
        font-size: 7px;
        color: #444;
        letter-spacing: 1px;
        transition: all 0.3s;
    }
    .sensor-indicator.active {
        color: var(--btn-green);
        text-shadow: 0 0 5px var(--btn-green);
    }
    .sensor-indicator.error {
        color: var(--btn-red);
        text-shadow: 0 0 5px var(--btn-red);
    }
    #hal-container {
        position: relative;
        width: 550px;
        height: 550px;
        perspective: 1200px;
        cursor: crosshair;
        pointer-events: all;
        transform-style: preserve-3d;
    }
    .chrome-ring {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: conic-gradient(from 195deg, #1a1a1a 0%, #444 5%, #aaa 8%, #f8f8f8 10%, #ccc 12%, #666 15%, #333 25%, #222 35%, #666 45%, #bbb 49%, #ffffff 50%, #bbb 51%, #444 55%, #222 70%, #333 85%, #777 92%, #1a1a1a 100%);
        box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 30px 80px rgba(0,0,0,0.9);
        padding: 38px;
        box-sizing: border-box;
        z-index: 100;
        pointer-events: none;
    }
    .rifling-shaft {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        position: relative;
        overflow: hidden;
        background: #000;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: inset 0 0 150px #000;
    }
    .rifling-shaft::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: repeating-radial-gradient(circle, #444 0px, #444 1px, #000 2px, #555 3px, #000 8px);
        -webkit-mask-image: radial-gradient(circle, transparent 38%, black 45%, black 100%);
        mask-image: radial-gradient(circle, transparent 38%, black 45%, black 100%);
        filter: brightness(1.3) contrast(1.8);
        opacity: 0.95;
        z-index: 1;
    }
    .rifling-shaft::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: radial-gradient(circle at center, transparent 32%, rgba(0,0,0,0.95) 100%);
        z-index: 2;
        pointer-events: none;
    }
    .lens-assembly {
        position: relative;
        width: 82%;
        height: 82%;
        border-radius: 50%;
        transition: transform 2.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.5s;
        transform: translateZ(-160px) scale(0.78);
        display: flex; justify-content: center;
        align-items: center;
        background: radial-gradient(circle at 35% 35%, #0a0a0a 0%, #000 95%);
        overflow: hidden;
        opacity: 0.05;
        z-index: 10;
        box-shadow: 0 0 80px rgba(0,0,0,1);
        border: 1px solid #111;
    }
    .lens-assembly::before {
        content: '';
        position: absolute;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        z-index: 20;
    }
    body.pwr-on .lens-assembly {
        opacity: 1;
        transform: translateZ(50px) scale(1.05);
        animation: mechanical-jitter 5.7s infinite ease-in-out 2.1s;
        box-shadow: 0 0 40px rgba(0,0,0,0.5);
    }
    body.fluid-active .lens-assembly {
        filter: blur(2px) contrast(1.5);
    }
    body.pwr-on .iris {
        opacity: 1;
    }
    @keyframes mechanical-jitter {
        0%   { transform: translateZ(50px) scale(1.05)  translate(0, 0); }
        7%   { transform: translateZ(50px) scale(1.053) translate(0.5px, -0.3px); }
        18%  { transform: translateZ(50px) scale(1.047) translate(-0.4px, 0.2px); }
        31%  { transform: translateZ(50px) scale(1.052) translate(0.2px, 0.5px); }
        44%  { transform: translateZ(50px) scale(1.049) translate(-0.3px, -0.4px); }
        57%  { transform: translateZ(50px) scale(1.054) translate(0.4px, -0.1px); }
        69%  { transform: translateZ(50px) scale(1.046) translate(-0.1px, 0.5px); }
        83%  { transform: translateZ(50px) scale(1.051) translate(0.3px, 0.1px); }
        91%  { transform: translateZ(50px) scale(1.048) translate(-0.2px, 0.3px); }
        100% { transform: translateZ(50px) scale(1.05)  translate(0, 0); }
    }
    .inner-intel {
        width: 100%; height: 100%; position: relative; border-radius: 50%; overflow: hidden; z-index: 5;
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
    }
    #eye-ambient-glow {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 360px;
        height: 360px;
        background: radial-gradient(circle, rgba(255, 50, 0, 0.8) 0%, rgba(255, 0, 0, 0.4) 40%, transparent 70%);
        border-radius: 50%;
        filter: blur(15px);
        z-index: 5;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.8s ease-in-out;
    }
    #hex-grid {
        position: absolute;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        background:
            radial-gradient(circle at center, rgba(255, 30, 30, 0.12) 0%, rgba(200, 0, 0, 0.05) 70%, transparent 100%),
            radial-gradient(circle, #ff0000 1.5px, transparent 2px),
            linear-gradient(rgba(255, 50, 50, 0.15) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 50, 50, 0.15) 1px, transparent 1px);
        background-size: 100% 100%, 40px 40px, 40px 40px, 40px 40px;
        transition: opacity 1.5s;
        z-index: 500;
        transform: translateZ(100px);
        -webkit-transform: translateZ(100px);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        will-change: transform, opacity;
    }
    body.scan-active #hex-grid {
        opacity: 1;
        animation: crt-flicker 0.15s infinite;
    }
    body.scan-active.deep-scan .mono-face {
        box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
        border: 0.5px solid rgba(0, 255, 102, 0.3);
        transition: box-shadow 0.5s ease;
    }
    @keyframes crt-flicker {
        0% { opacity: 0.88; }
        50% { opacity: 0.92; }
        100% { opacity: 0.90; }
    }
    #monolith-scene {
        position: absolute;
        inset: 0;
        background: #000;
        opacity: 0;
        transition: opacity 1s ease;
        z-index: 2;
        pointer-events: none;
    }
    body.monolith-active #monolith-scene { opacity: 1; }
    #starfield-bg {
        position: absolute;
        width: 100%;
        height: 100%;
        background: #000;
    }
    .star-static {
        position: absolute;
        background: #fff;
        border-radius: 50%;
    }
    .tma-complex {
        position: relative;
        transform-style: preserve-3d;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .monolith-wrapper {
        width: 40px;
        height: 90px;
        position: relative;
        transform-origin: center center;
        transform-style: preserve-3d;
        transform: translateZ(0);
    }
    .mono-face {
        position: absolute;
        background: #000000;
        border: none;
        box-sizing: border-box;
        overflow: hidden;
    }
    .mono-face::after {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        box-shadow: inset 0 0 8px rgba(255,255,255,0.12), 0 0 12px rgba(255,255,255,0.08);
        filter: blur(0.8px);
        transition: opacity 0.4s ease;
    }
    .right::after, .top::after {
        opacity: 0.35;
        box-shadow: inset -2px 0 6px rgba(255,255,255,0.25), 3px 0 10px rgba(255,255,255,0.15);
    }
    .front::after, .back::after { opacity: 0.06; }
    .left::after { opacity: 0.02; }
    .front { width: 40px; height: 90px; transform: translateZ(5px); }
    .back  { width: 40px; height: 90px; transform: rotateY(180deg) translateZ(5px); }
    .right { width: 10px; height: 90px; left: 15px; transform: rotateY(90deg) translateZ(20px); }
    .left  { width: 10px; height: 90px; left: 15px; transform: rotateY(-90deg) translateZ(20px); }
    .top   { width: 40px; height: 10px; top: 40px; transform: rotateX(90deg) translateZ(45px); }
    #holis-overlay {
        position: absolute;
        inset: 0;
        z-index: 27;
        background: radial-gradient(circle, var(--holis-blue) 0%, transparent 70%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    #holis-overlay.active { opacity: 1; }
    .holis-text {
        color: #cc30ff;
        font-size: 14px;
        font-weight: bold;
        letter-spacing: 4px;
        text-shadow: 0 0 10px #cc30ff;
    }
    #scan-dot-h, #scan-dot-v {
        position: absolute;
        background: radial-gradient(circle, rgba(255,100,100,0.9) 0%, transparent 80%);
        border-radius: 50%;
        opacity: 0;
        z-index: 26;
        pointer-events: none;
        transform: translateZ(100px);
    }
    #scan-dot-h { width: 100%; height: 4px; left: 0; }
    #scan-dot-v { height: 100%; width: 4px; top: 0; }
    @keyframes scan-h { 0% { top: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
    @keyframes scan-v { 0% { left: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
    .iris {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 150px;
        height: 150px;
        margin: -75px 0 0 -75px;
        background: radial-gradient(circle, var(--eye-red) 15%, #1a0000 85%, #000 100%);
        border-radius: 50%;
        filter: blur(1.2px);
        box-shadow: 0 0 45px 5px rgba(255, 0, 0, 0.4);
        z-index: 10;
        opacity: 0;
        transition: opacity 0.8s ease-in;
    }
    body.monolith-active .iris { opacity: 0 !important; }
    body.fluid-active .iris { opacity: 0 !important; pointer-events: none; }
    body.scan-active .iris { transform: translate(0,0) scale(0) !important; opacity: 0 !important; }
    .kelle {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40px;
        height: 40px;
        margin: -20px 0 0 -20px;
        background: radial-gradient(circle, #fff9ae 0%, #ffcc00 40%, #ff6600 100%);
        border-radius: 50%;
        box-shadow: 0 0 15px 3px rgba(255, 204, 0, 0.7);
    }
    #panel {
        position: relative;
        background: #0d0d0d;
        padding: 20px;
        border: 1px solid #222;
        display: flex;
        flex-direction: column;
        gap: 15px;
        border-radius: 4px;
        width: 150px;
        z-index: 9999;
        pointer-events: all;
        margin-left: 60px;
    }
    .btn-group {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .label {
        color: var(--label-color);
        font-size: 8px;
        letter-spacing: 2px;
        font-weight: bold;
    }
    .btn-70s {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #111;
        border: 2px solid #333;
        cursor: pointer;
        position: relative;
        outline: none;
    }
    .btn-70s::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        background: var(--btn-off);
        transition: 0.3s;
    }
    .btn-70s.is-on::after {
        background: var(--btn-green);
        box-shadow: 0 0 12px var(--btn-green);
    }
    .btn-70s.is-off::after {
        background: var(--btn-red);
        box-shadow: 0 0 8px var(--btn-red);
    }
    .slider-well {
        width: 100%;
        height: 16px;
        background: #050505;
        border: 1px solid #222;
        border-radius: 8px;
        position: relative;
        display: flex;
        align-items: center;
        transition: box-shadow 0.6s ease;
    }
    body.monolith-active .slider-well {
        box-shadow: inset 0 4px 8px -2px rgba(0, 255, 102, 0.35);
        border-color: rgba(0, 255, 102, 0.2);
    }
    input[type=range].horizontal {
        appearance: none;
        width: 100%;
        background: transparent;
        cursor: not-allowed;
        outline: none;
        opacity: 0.3;
    }
    input[type=range].horizontal::-webkit-slider-thumb {
        appearance: none;
        height: 14px;
        width: 20px;
        background: #333;
        border: 1px solid #555;
        position: relative;
        transition: background 0.3s;
    }
    body.monolith-active input[type=range].horizontal::-webkit-slider-thumb {
        cursor: pointer;
        background: radial-gradient(circle, var(--btn-green) 25%, #333 30%);
        box-shadow: 0 0 5px rgba(0, 255, 102, 0.4);
    }
    body.monolith-active input[type=range].horizontal {
        cursor: pointer;
        opacity: 1;
    }
    @keyframes lens-power-off {
        0%   { transform: translateZ(50px)   scale(1.05); opacity: 1; }
        96%  { transform: translateZ(-160px) scale(0.78); opacity: 1; }
        100% { transform: translateZ(-160px) scale(0.78); opacity: 0.05; }
    }
    body.pwr-off .lens-assembly {
        animation: lens-power-off 2.8s cubic-bezier(0.4, 0, 0.2, 1) both;
    }
    #gravity-ring {
        position: absolute;
        inset: 0;
        border: 2px solid rgba(180, 0, 255, 0);
        border-radius: 50%;
        z-index: 24;
        pointer-events: none;
        transition: all 2s ease-in-out;
    }
    body.fluid-active #gravity-ring {
        border: 4px double rgba(180, 0, 255, 0.6);
        box-shadow: 0 0 30px rgba(180, 0, 255, 0.4), inset 0 0 30px rgba(180, 0, 255, 0.4);
        transform: scale(0.95);
        animation: pulse-gravity 3.7s infinite alternate ease-in-out,
                   pulse-gravity-b 5.3s infinite alternate-reverse cubic-bezier(0.3, 0.1, 0.7, 0.9);
    }
    @keyframes pulse-gravity {
        0%   { transform: scale(0.91); opacity: 0.35; }
        100% { transform: scale(0.98); opacity: 0.82; }
    }
    @keyframes pulse-gravity-b {
        0%   { filter: brightness(0.72); }
        100% { filter: brightness(1.38); }
    }
    body.fluid-active.deep-scan .mono-face {
        box-shadow: 0 0 20px rgba(180, 0, 255, 0.6);
        border: 0.5px solid rgba(180, 0, 255, 0.5);
        filter: brightness(1.2);
        transition: all 1s ease;
    }
    #logic-room-overlay {
        position: fixed;
        inset: 0;
        background: radial-gradient(circle, #111 0%, #000 100%);
        z-index: 10000;
        display: none;
        opacity: 0;
        transition: opacity 3s ease-in-out;
        justify-content: center;
        align-items: center;
        perspective: 1500px;
    }
    .room-content {
        transform: translateZ(-1000px);
        transition: transform 1.5s cubic-bezier(0.2, 0, 0.2, 1);
        text-align: center;
    }
    body.logic-active #logic-room-overlay { display: flex; opacity: 1; }
    body.logic-active .room-content { transform: translateZ(0); }
    .memory-module {
        width: 280px;
        padding: 15px;
        margin: 10px;
        background: rgba(255,255,255,0.05);
        border-left: 5px solid #444;
        color: #fff;
        font-family: 'Courier New', monospace;
        cursor: pointer;
        transition: all 0.3s;
        text-align: left;
        font-size: 13px;
        letter-spacing: 1px;
    }
    .memory-module:hover {
        background: rgba(255,255,255,0.1);
        transform: translateX(10px);
    }
    .memory-module.red { border-color: #ff3300; box-shadow: -5px 0 10px rgba(255,51,0,0.3); }
    .memory-module.blue { border-color: #cc30ff; box-shadow: -5px 0 10px rgba(180,30,255,0.3); }
    .memory-module.amber { border-color: #ffcc00; box-shadow: -5px 0 10px rgba(255,204,0,0.3); }
    .exit-btn {
        margin-top: 40px;
        background: transparent;
        border: 1px solid #FFF;
        color: #FFF;
        padding: 10px 20px;
        cursor: pointer;
    }
    .room-title { color: #FFF; }
    .status-bar { color: #FFF; }
    #cam-monitor {
        position: static !important;
        margin-top: 10px;
        width: 100% !important;
        height: 60px !important;
        bottom: 20px;
        left: 20px;
        border: 2px solid #333;
        background: #000;
        display: none;
        z-index: 1000;
        overflow: hidden;
        border-radius: 4px;
        box-shadow: 0 0 15px rgba(0, 255, 102, 0.2);
    }
    #cam-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: contrast(1.1) saturate(1.1);
        display: block;
    }
    #mic-bar {
        height: 100%;
        width: 0%;
        background: #00ff66;
        box-shadow: 0 0 15px #00ff66, 0 0 5px #fff;
        transition: width 0.08s cubic-bezier(0.25, 0.1, 0.25, 1);
    }
    #mic-level-container {
        width: 100%;
        height: 4px;
        background: #111;
        margin-top: 5px;
        display: none;
        overflow: hidden;
        border-radius: 2px;
    }
    #voc-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 5px;
        width: 80px !important;
        opacity: 0.3;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    #voc-volume {
        width: 80px !important;
        height: 4px;
        accent-color: var(--btn-green);
        cursor: pointer;
    }
    body.voc-active #voc-controls {
        opacity: 1;
        pointer-events: auto;
    }
    .h-btn.is-on::after {
        background: var(--btn-green) !important;
        box-shadow: 0 0 12px var(--btn-green) !important;
    }
    .kelle.hal-thinking {
        animation: thinkingPulse 2.5s infinite ease-in-out !important;
    }
    @keyframes thinkingPulse {
        0% {
            transform: scale(1);
            filter: brightness(1) drop-shadow(0 0 6px var(--eye-red));
        }
        50% {
            transform: scale(1.15);
            filter: brightness(1.7) drop-shadow(0 0 22px #ff3300);
        }
        100% {
            transform: scale(1);
            filter: brightness(1) drop-shadow(0 0 6px var(--eye-red));
        }
    }
    /* Das pulsierende Leuchten für den Prozessiervorgang */
.pulse-processing {
    animation: hal-pulse 1s infinite alternate;
    color: #ff3b30 !important; /* HAL-Rot */
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 59, 48, 0.7);
}
@keyframes hal-pulse {
    from {
        opacity: 0.3;
        text-shadow: 0 0 2px rgba(255, 59, 48, 0.2);
    }
    to {
        opacity: 1.0;
        text-shadow: 0 0 15px rgba(255, 59, 48, 0.9), 0 0 25px rgba(255, 59, 48, 0.5);
    }
}
    #ai-status-display { transition: color 0.35s, border-color 0.35s, text-shadow 0.35s; }
    #ai-status-display.st-ready     { color: #00ff66; border-color: #1a4d2e; text-shadow: 0 0 6px #00ff66; }
    #ai-status-display.st-listening { color: #cc30ff; border-color: #440033; text-shadow: 0 0 8px #cc30ff; }
    #ai-status-display.st-stt       { color: #ffcc00; border-color: #554400; text-shadow: 0 0 8px #ffcc00; }
    #ai-status-display.st-thinking  { color: #ff6600; border-color: #552200; text-shadow: 0 0 10px #ff6600; animation: ai-think-pulse 1s infinite alternate; }
    #ai-status-display.st-tts       { color: #ff3300; border-color: #551100; text-shadow: 0 0 12px #ff3300; animation: ai-think-pulse 0.7s infinite alternate; }
    #ai-status-display.st-error     { color: #ff0044; border-color: #550011; text-shadow: 0 0 12px #ff0044; }
    @keyframes ai-think-pulse {
        from { text-shadow: 0 0 4px currentColor; }
        to   { text-shadow: 0 0 18px currentColor; }
    }
    @keyframes ai-dot-blink {
        0%, 66% { opacity: 1; }
        33%      { opacity: 0.15; }
    }
    .ai-dots span { animation: ai-dot-blink 1.2s infinite; display: inline-block; margin: 0 1px; }
    .ai-dots span:nth-child(2) { animation-delay: 0.4s; }
    .ai-dots span:nth-child(3) { animation-delay: 0.8s; }

    /* ── EYE STATE ANIMATIONS (5 Stages) ── */
    /* JS setzt iris.style.transform und kelle.style.width/height inline –
       daher nur box-shadow + filter animieren (kein Konflikt). */

    /* Stage 1 – LISTENING: Auge oeffnet sich, cyan Atemrhythmus */
    @keyframes eye-listen-iris {
        0%, 100% { box-shadow: 0 0 45px 5px rgba(255,0,0,0.4);        filter: blur(1.2px) brightness(1.0); }
        50%       { box-shadow: 0 0 75px 22px rgba(200,30,255,0.5);    filter: blur(0.8px) brightness(1.4) hue-rotate(-210deg); }
    }
    @keyframes eye-listen-kelle {
        0%, 100% { filter: brightness(1.0)  drop-shadow(0 0 6px rgba(255,204,0,0.7)); }
        50%       { filter: brightness(0.55) drop-shadow(0 0 4px rgba(200,30,255,0.6)); }
    }
    body.eye-listening .iris  { animation: eye-listen-iris  2.5s ease-in-out infinite; }
    body.eye-listening .kelle { animation: eye-listen-kelle 2.5s ease-in-out infinite; }

    /* Stage 2 – STT: Auge "liest" die Schallwellen – schnelles brightness-Flattern */
    @keyframes eye-stt-iris {
        0%   { box-shadow: 0 0 45px 5px  rgba(255,200,0,0.45); filter: blur(1.2px) brightness(1.1); }
        20%  { box-shadow: 0 0 22px 2px  rgba(255,210,0,0.85); filter: blur(0.5px) brightness(1.6); }
        40%  { box-shadow: 0 0 58px 10px rgba(255,170,0,0.30); filter: blur(1.9px) brightness(0.85); }
        60%  { box-shadow: 0 0 18px 2px  rgba(255,210,0,0.90); filter: blur(0.5px) brightness(1.55); }
        80%  { box-shadow: 0 0 52px 8px  rgba(255,180,0,0.35); filter: blur(1.6px) brightness(0.95); }
        100% { box-shadow: 0 0 45px 5px  rgba(255,200,0,0.45); filter: blur(1.2px) brightness(1.1); }
    }
    body.eye-stt .iris  { animation: eye-stt-iris 0.38s linear infinite; }
    body.eye-stt .kelle { filter: brightness(1.5) drop-shadow(0 0 9px rgba(255,220,0,0.9)); }

    /* Stage 3 – THINKING: Iris zieht sich zusammen, Kelle glueht intensiv orange */
    @keyframes eye-think-iris {
        0%, 100% { box-shadow: 0 0 18px 2px rgba(255,80,0,0.5);  filter: blur(2.6px) brightness(0.65); }
        50%       { box-shadow: 0 0 28px 5px rgba(255,110,0,0.6); filter: blur(2.0px) brightness(0.82); }
    }
    body.eye-thinking .iris  { animation: eye-think-iris 1.8s ease-in-out infinite; }
    body.eye-thinking .kelle { filter: brightness(1.8) drop-shadow(0 0 16px rgba(255,60,0,0.95)); }

    /* Stage 4 – TTS: Auge strahlt im Sprach-Rhythmus */
    @keyframes eye-tts-iris {
        0%, 100% { box-shadow: 0 0 65px 18px rgba(255,25,0,0.75); filter: blur(0.7px) brightness(1.6); }
        50%       { box-shadow: 0 0 32px 4px  rgba(255,0,0,0.38);  filter: blur(1.5px) brightness(1.1); }
    }
    @keyframes eye-tts-kelle {
        0%, 100% { filter: brightness(2.3) drop-shadow(0 0 22px rgba(255,120,0,1.0)); }
        50%       { filter: brightness(1.5) drop-shadow(0 0 10px rgba(255,40,0,0.75)); }
    }
    body.eye-tts .iris  { animation: eye-tts-iris  0.7s ease-in-out infinite; }
    body.eye-tts .kelle { animation: eye-tts-kelle 0.7s ease-in-out infinite; }

    /* Stage 5 – READY: kurzes sanftes Blinzeln beim Uebergang, dann Ruhe */
    @keyframes eye-ready-blink {
        0%, 85%, 100% { opacity: 1; }
        92%            { opacity: 0.15; }
    }
    body.eye-ready .iris { animation: eye-ready-blink 0.75s ease-in-out 1; }
    #prompt-row {
        display: flex; flex-direction: row; gap: 10px;
        width: 100%; max-width: 550px; box-sizing: border-box;
        align-items: stretch; margin-bottom: -15px;
    }
    #talk-panel {
        flex: 0 0 110px; box-sizing: border-box;
        background: #0d0d0d; border: 1px solid #222; border-radius: 4px;
        padding: 10px; display: flex; flex-direction: column; align-items: center;
        pointer-events: all;
    }
    #sensor-cols { display: flex; flex-direction: row; gap: 12px; }
    #sensor-cols .sensor-group { width: 55px; }
    #sensor-cols #voc-controls,
    #sensor-cols #voc-volume { width: 55px !important; }
    #cam-preview {
        flex: 1; background: #020202; border: 1px solid #1a1a1a;
        border-radius: 2px; overflow: hidden; display: flex;
    }
    #cam-monitor {
        margin-top: 0 !important; height: auto !important; flex: 1 !important;
        border: none !important; box-shadow: none !important;
        border-radius: 0 !important; display: flex !important;
        align-items: stretch;
    }
    #cam-video { display: none; }

    /* ── Aus dem HTML-Markup ausgelagerte Inline-Styles ──────────────── */
    /* Airlock */
    .door-override-label { font-size: 7px; margin-top: 5px; }

    /* Monolith-Szene */
    #starfield-container {
        position: absolute;
        inset: -300px;
        width: calc(100% + 600px);
        height: calc(100% + 600px);
    }

    /* HAL-Terminal / Chat */
    #hal-terminal-display {
        flex: 1;
        background: #050505;
        border: 1px solid #222;
        border-radius: 4px;
        padding: 10px;
        box-sizing: border-box;
        pointer-events: all;
    }
    #chat-log {
        height: 120px;
        overflow-y: auto;
        color: #00ff66;
        font-size: 11px;
        text-shadow: 0 0 4px #00ff66;
        margin-bottom: 8px;
        text-align: left;
        padding: 5px;
        font-family: monospace;
    }
    .prompt-input-row { display: flex; gap: 5px; }
    #manual-prompt {
        flex-grow: 1;
        background: #000;
        border: 1px solid #333;
        color: #fff;
        font-family: monospace;
        font-size: 11px;
        padding: 5px;
        outline: none;
    }
    #send-txt-btn {
        background: #222;
        border: 1px solid #444;
        color: #fff;
        font-family: monospace;
        font-size: 11px;
        cursor: pointer;
        padding: 0 10px;
    }
    .talk-panel-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    /* TALK-Button (JS ueberschreibt background/box-shadow zur Laufzeit) */
    #speak-btn { background: #221100; border-color: #442200; }

    /* AI-Status-Leiste */
    #lang-display {
        color: #00ff66;
        text-shadow: 0 0 6px #00ff66;
        font-size: 10px;
    }

    /* System-Kontakt */
    #lbl-contact { white-space: nowrap; }
    #contact-display {
        font-size: 9px;
        color: #00ff66;
        text-shadow: 0 0 8px #00ff66;
        font-family: monospace;
        flex: 1;
    }
    .contact-link { color: inherit; text-decoration: none; }

    /* Steuerpanel (rechts) */
    #lbl-zoom { text-align: center; }
    #lbl-orbital { text-align: center; margin-bottom: 4px; }
    #dist-display { font-size: 9px; text-align: right; }
    #lbl-sync { text-align: center; margin-bottom: 4px; }
    #status-display { font-size: 9px; border-top: none; padding-top: 0; }
    #lbl-vtec { text-align: center; }

    /* Coder-Core (Logic Room) */
    .coder-active-caption {
        font-size: 8px;
        color: #555;
        letter-spacing: 1px;
        margin: 4px 10px 8px;
        text-align: left;
    }
    #active-coder-model { color: #00ff66; text-shadow: 0 0 6px #00ff66; }
    #btn-coder-8b { border-color: #00cc55; box-shadow: -5px 0 10px rgba(0,204,85,0.2); }
    #btn-coder-14b { border-color: #ffaa00; box-shadow: -5px 0 10px rgba(255,170,0,0.2); }
    /* LED-Punkte (JS ueberschreibt background/box-shadow zur Laufzeit) */
    #led-coder-8b, #led-coder-14b {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #222;
        margin-right: 8px;
        vertical-align: middle;
        transition: all 0.4s;
    }
    .coder-ram-note {
        font-size: 7px;
        color: #444;
        letter-spacing: 1px;
        margin: 6px 10px 0;
        text-align: left;
    }
