        /* CORE BRUTALIST & TERMINAL AESTHETICS */
        :root {
            --term-green: #D2185B;
            --term-bg: #ffffff;
            --term-border: #d9d9de;
            --term-ruby: #D2185B;
        }

        body {
            font-family: 'Space Mono', monospace;
            background-color: var(--term-bg);
            color: #34343a;
            margin: 0;
            overflow-x: hidden;
        }

        .font-syncopate { font-family: 'Syncopate', sans-serif; }
        .font-impact { font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; }

        /* CRT SCANLINE OVERLAY */
        .scanlines {
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(210,24,91, 0.02), rgba(0, 0, 255, 0.06));
            background-size: 100% 2px, 3px 100%;
            z-index: 50;
            pointer-events: none;
        }

        /* BRUTALIST PANELS & BORDERS */
        .brutal-panel {
            border: 1px solid var(--term-border);
            background: #ffffff;
            transition: all 0.2s ease;
        }

        /* TITLE STYLING */
        .brutal-title {
            background-color: #D2185B;
            color: #ffffff;
            display: inline-block;
            padding: 0.5rem 1rem;
            font-family: 'Syncopate', sans-serif;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 1.5rem;
        }

        /* AUDIO VISUALIZER ANIMATION */
        .bar {
            width: 4px;
            background-color: var(--term-green);
            animation: pulse 1s infinite ease-in-out alternate;
        }
        .bar:nth-child(1) { animation-delay: 0.1s; }
        .bar:nth-child(2) { animation-delay: 0.3s; }
        .bar:nth-child(3) { animation-delay: 0.5s; }
        .bar:nth-child(4) { animation-delay: 0.2s; }
        .bar:nth-child(5) { animation-delay: 0.4s; }
        .bar:nth-child(6) { animation-delay: 0.6s; }

        @keyframes pulse 
            0% { height: 4px; }
            100% { height: 20px; }
        

        /* TAB LOGIC */
        .tab-content { display: none; }
        .tab-content.active { display: block; animation: fadeIn 0.3s ease-out forwards; }
        
        /* SUB-TAB LOGIC */
        .subtab-content { display: none; }
        .subtab-content.active { display: block; animation: fadeIn 0.3s ease-out forwards; }
        
        @keyframes fadeIn 
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        

        /* FORCE FULL COLOR THUMBNAILS */
        .video-container {
            position: relative;
            z-index: 60; 
        }
        
        .video-container video {
            background-color: #ffffff;
        }

        /* CUSTOM SCROLLBAR */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--term-bg); border-left: 1px solid var(--term-border); }
        ::-webkit-scrollbar-thumb { background: var(--term-border); }
        ::-webkit-scrollbar-thumb:hover { background: var(--term-green); }

        /* RANGE SLIDER STYLING */
        input[type=range] {
            -webkit-appearance: none;
            background: transparent; 
        }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none;
            height: 14px;
            width: 8px;
            background: var(--term-green);
            cursor: ew-resize;
            box-shadow: 0 0 5px rgba(210,24,91, 0.5);
        }
        input[type=range]::-moz-range-thumb {
            height: 14px;
            width: 8px;
            background: var(--term-green);
            cursor: ew-resize;
            border: none;
            box-shadow: 0 0 5px rgba(210,24,91, 0.5);
        }
        input[type=range]::-webkit-slider-runnable-track {
            width: 100%;
            height: 2px;
            background: var(--term-border);
        }
        input[type=range]::-moz-range-track {
            width: 100%;
            height: 2px;
            background: var(--term-border);
        }

        /* FLOATING PiP VIDEO */
        .floating-pip {
            position: fixed !important;
            bottom: 160px !important; 
            right: 20px !important;
            width: 320px !important;
            height: 180px !important;
            z-index: 90 !important;
            border: 2px solid var(--term-green) !important;
            box-shadow: 0 10px 30px rgba(0,0,0,0.9), 0 0 20px rgba(210,24,91,0.2) !important;
        }

        @media (max-width: 768px) 
            .floating-pip {
                width: 200px !important;
                height: 112px !important;
                bottom: 140px !important;
                right: 10px !important;
            }
        
        
        /* ANTI-CAPTURE SHIELD */
        #security-blackout {
            display: none;
            position: fixed;
            inset: 0;
            background-color: #ffffff;
            z-index: 9999;
        }
        
        /* MODAL BACKDROP BLUR */
        .modal-blur {
            backdrop-filter: blur(10px);
            background-color: rgba(255,255,255,0.8);
        }

        /* 333 QUARANTINE OVERLAY */
        #quarantine-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background-color: #ffffff;
            z-index: 9000;
        }

        /* SECRET SEQUENCE NODE PULSE */
        .seq-node-active {
            border-color: #D2185B !important;
            background-color: rgba(210,24,91, 0.15) !important;
            color: #D2185B !important;
            box-shadow: 0 0 15px rgba(210,24,91, 0.4);
        }
        .seq-node-error {
            border-color: #D2185B !important;
            background-color: rgba(210,24,91, 0.25) !important;
            color: #D2185B !important;
            box-shadow: 0 0 15px rgba(210,24,91, 0.5);
        }
/* PERFORMANCE: skip decorative pulsing for users who prefer less motion, and when tab is hidden */
@media (prefers-reduced-motion: reduce) .animate-pulse,.animate-ping{animation:none!important} 
.scanlines{will-change:auto}

/* KEYBOARD FOCUS: visible outline for people who navigate with a keyboard */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--term-green);
    outline-offset: 2px;
}
/* Tap targets: stop double-tap zoom delays on buttons */
button { touch-action: manipulation; }
/* Smoother paint: tell the browser the fixed overlay never changes */
.scanlines { contain: strict; }

/* TRACK C BOOST: the button glows while Track C is layered under Track A or B */
button.boost-on { background:#D2185B !important; color:#ffffff !important; border-color:#D2185B !important; box-shadow:0 0 12px rgba(210,24,91,.45); }

/* HERO INFO OVERLAY: the video box grows taller while the info is open so the text is never cut off */
#hero-container.info-open { aspect-ratio: auto; min-height: min(82vh, 760px); }

/* The Kumiko terminal window: tall enough that the mandala is never covered, on PC and on phones */
#kumiko-frame { height: calc(100vh - 160px); min-height: 560px; }
@media (max-width: 700px)  #kumiko-frame { height: max(calc(100vh - 120px), 760px); } 

/* pseudo full screen (phones that cannot full-screen a page element) */
.pseudo-fs{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;z-index:9998!important;background:#8a8a94!important;aspect-ratio:auto!important}
body.pseudo-fs-on{overflow:hidden!important}
body.pseudo-fs-on .tab-content,body.pseudo-fs-on .subtab-content{animation:none!important;transform:none!important}
#pseudo-fs-exit{position:fixed;top:max(10px,env(safe-area-inset-top));right:10px;z-index:9999;background:#D2185B;color:#fff;border:1px solid #D2185B;padding:.55rem .8rem;font:700 .65rem 'Space Mono',monospace;letter-spacing:.14em}

#voice-caption{display:none;position:fixed;left:50%;transform:translateX(-50%);bottom:calc(150px + env(safe-area-inset-bottom));width:min(92vw,40rem);z-index:60;background:rgba(255,255,255,.92);border:1px solid #d9d9de;border-left:3px solid #D2185B;padding:.8rem 1rem;font:.82rem/1.65 'Space Mono',monospace;color:#34343a;text-align:left;pointer-events:none}

/* uniform player controls (Spotify / Apple Music style): one play-pause button, icon buttons, nothing to explain */
.pl-hidden{display:none!important}
.pl-btn{width:40px;height:40px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:0!important;line-height:0;padding:0!important;border:0!important;background-color:transparent;background-repeat:no-repeat;background-position:center;background-size:22px 22px;cursor:pointer;transition:transform .12s,background-color .15s}
.pl-btn:hover{background-color:#ffffff!important}
.pl-btn:active{transform:scale(.94)}
.pl-main{width:44px;height:44px;background-color:#fff;background-size:24px 24px;margin-right:.25rem}
.pl-main:hover{background-color:#e6e6e6!important}
.pl-main[data-playing="0"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M8 5v14l11-7z'/></svg>")}
.pl-main[data-playing="1"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M7 5h4v14H7zM13 5h4v14h-4z'/></svg>")}
.pl-mute[data-muted="0"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%234a4a52' d='M3 9v6h4l5 4V5L7 9zM14 8.5v7a4.5 4.5 0 0 0 0-7zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/></svg>")}
.pl-mute[data-muted="1"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23D2185B' d='M3 9v6h4l5 4V5L7 9zM16.6 12l2.7-2.7-1.4-1.4-2.7 2.7-2.7-2.7-1.4 1.4 2.7 2.7-2.7 2.7 1.4 1.4 2.7-2.7 2.7 2.7 1.4-1.4z'/></svg>")}
.pl-full{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%234a4a52' d='M5 5h5v2H7v3H5zM14 5h5v5h-2V7h-3zM5 14h2v3h3v2H5zM17 14h2v5h-5v-2h3z'/></svg>")}
.pl-btn:focus-visible{outline:2px solid #D2185B;outline-offset:2px}

body.pseudo-fs-on main{z-index:auto!important}
body.pseudo-fs-on #hero-container.pseudo-fs{border-radius:0!important}

/* ===== shared control bar + video page (build r102) ===== */
/* Welcome page: the main video and its own controls */
/* ONE control bar look, used by every video / audio player in the app */
.vh-bar{display:flex!important;align-items:center;gap:.5rem;background:rgba(255,255,255,.94);border:1px solid #D2185B;border-radius:999px;padding:.3rem .7rem .3rem .35rem;box-shadow:0 6px 18px rgba(60,40,60,.18);font-family:'Space Mono',monospace;min-width:0}
.vh-bar.vh-overlay{position:absolute;left:.75rem;right:.75rem;bottom:.75rem;z-index:7}
.vh-bar.vh-static{position:relative;margin-top:.9rem}
.vh-btn{flex:0 0 auto;width:36px;height:36px;border-radius:999px;border:0;padding:0;cursor:pointer;background-color:transparent;background-repeat:no-repeat;background-position:center;background-size:20px 20px;transition:transform .12s,background-color .15s}
.vh-btn:hover{background-color:#f4f4f6}
.vh-btn:active{transform:scale(.94)}
.vh-btn:focus-visible{outline:2px solid #D2185B;outline-offset:2px}
.vh-play{background-color:#D2185B;background-size:22px 22px}
.vh-play:hover{background-color:#A8134A}
.vh-play[data-playing="0"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M8 5v14l11-7z'/></svg>")}
.vh-play[data-playing="1"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M7 5h4v14H7zM13 5h4v14h-4z'/></svg>")}
.vh-mute[data-muted="0"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%234a4a52' d='M3 9v6h4l5 4V5L7 9zM14 8.5v7a4.5 4.5 0 0 0 0-7zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/></svg>")}
.vh-mute[data-muted="1"]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23D2185B' d='M3 9v6h4l5 4V5L7 9zM16.6 12l2.7-2.7-1.4-1.4-2.7 2.7-2.7-2.7-1.4 1.4 2.7 2.7-2.7 2.7 1.4 1.4 2.7-2.7 2.7 2.7 1.4-1.4z'/></svg>")}
.vh-full{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%234a4a52' d='M5 5h5v2H7v3H5zM14 5h5v5h-2V7h-3zM5 14h2v3h3v2H5zM17 14h2v5h-5v-2h3z'/></svg>")}
.vh-time{flex:0 0 auto;font:400 .6rem 'Space Mono',monospace;color:#4a4a52;min-width:2.4rem;text-align:center}
.vh-cur{color:#D2185B}
.vh-seek{flex:1 1 auto;min-width:0;accent-color:#D2185B;cursor:pointer}
.vh-seek.vh-view{cursor:default;opacity:.85}
.vh-label{flex:1 1 auto;font:700 .6rem 'Syncopate',sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#D2185B;padding-left:.4rem}
.mu-pod-bad::after{content:attr(data-msg);display:block;margin-top:.5rem;font:400 .65rem 'Space Mono',monospace;color:#D2185B}
/* artifact videos: the bar appears once the video has started */
.video-container:not(.mu-started) > .vh-bar{display:none!important}
.video-container > .vh-bar{z-index:31}
/* Transmission captions sit above the bar */
.vd-stage .vd-cap{padding-bottom:4.4rem}
/* subtitles sit above the controls */
#hero-container #hero-subs{bottom:4rem}
#hero-container:fullscreen #hero-subs{bottom:5rem}
#hero-container.pseudo-fs #hero-subs{bottom:5rem}
#hero-container:fullscreen{width:100vw;height:100vh;aspect-ratio:auto}
#hero-video{cursor:pointer}
/* the session controls at the bottom belong to the Practice tab only */
#player-row{display:none!important}

#mandala-controls{border-top:1px solid #d9d9de}
#mandala-controls .vh-bar{position:static}

/* Full screen video: no controls on top of the picture, so the subtitles are never covered. Esc, the Exit button (phones) or rotating back leaves full screen; a tap on the video plays or pauses. */
#hero-container:fullscreen .vh-bar,#hero-container:fullscreen #hero-cc-btn,#hero-container:fullscreen #hero-info-btn,
#hero-container:-webkit-full-screen .vh-bar,#hero-container:-webkit-full-screen #hero-cc-btn,#hero-container:-webkit-full-screen #hero-info-btn,
#hero-container.pseudo-fs .vh-bar,#hero-container.pseudo-fs #hero-cc-btn,#hero-container.pseudo-fs #hero-info-btn{display:none!important}
#hero-container:fullscreen #hero-subs,#hero-container:-webkit-full-screen #hero-subs,#hero-container.pseudo-fs #hero-subs{bottom:max(1.5rem,env(safe-area-inset-bottom))!important}

/* ---- r118: phone and tablet app polish (safe areas, no rubber-band scrolling, no grey tap flash) ---- */
html,body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
body{padding-bottom:calc(6.5rem + env(safe-area-inset-bottom))!important}
main{padding-top:max(3rem,calc(env(safe-area-inset-top) + 1.25rem))!important}
#bottom-dock{padding-bottom:env(safe-area-inset-bottom)}
button,.nav-btn,.vh-btn{-webkit-touch-callout:none;touch-action:manipulation}
@media (pointer:coarse){button,.nav-btn{min-height:44px}}
#daily-resonance #dr-time{min-height:40px}
