/* ===== VCR / VHS OSD — full screen static broadcast ===== */

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

:root {
    --osd-white: #ffffff;
    --osd-dim: rgba(255, 255, 255, 0.58);
    --osd-glow: #ffffff;
    --text-glow:
        0 0 2px #fff,
        0 0 8px rgba(255, 255, 255, 0.95),
        0 0 22px rgba(255, 255, 255, 0.7),
        0 0 42px rgba(255, 255, 255, 0.28);
    --screen-bg: #000000;
    --frame: #000000;
    --cabinet-bottom-h: 44px;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'VCR OSD Mono', 'Courier New', monospace;
    background: var(--frame);
    color: var(--osd-white);
    -webkit-font-smoothing: none;
    font-smooth: never;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ===== Room intro — dark room + story ===== */
.room-intro {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: #060608;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.intro-top-logo {
    position: absolute;
    top: clamp(14px, 3vh, 30px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(42px, 6.2vw, 74px);
    height: auto;
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
    image-rendering: auto;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

.room-intro.is-text-only {
    justify-content: center;
}

.room-intro.is-exiting {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.room-intro.is-entering {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

.intro-gif-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: clamp(200px, 38vh, 320px);
    background:
        radial-gradient(ellipse 70% 50% at 50% 40%, rgba(0, 80, 60, 0.12) 0%, transparent 50%),
        #060608;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.intro-gif-frame {
    position: relative;
    padding: 6px;
    background: #000;
    border: 3px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 0 0 2px #000,
        0 0 40px rgba(0, 180, 120, 0.2),
        0 0 80px rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.intro-gif-static {
    position: absolute;
    inset: 6px;
    pointer-events: none;
    z-index: 2;
}

.intro-gif-static[hidden] {
    display: none;
}

.intro-static-snow {
    position: absolute;
    inset: 0;
    background-color: #0a0a12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.95'/%3E%3C/svg%3E");
    background-size: 140px;
    animation: roomSnow 0.1s steps(4) infinite;
    mix-blend-mode: screen;
    opacity: 0.92;
    filter: contrast(1.45) brightness(1.05);
}

.intro-static-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.06) 0px,
        rgba(255, 255, 255, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.55;
}

.intro-static-roll {
    position: absolute;
    left: 0;
    right: 0;
    height: 22%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 255, 255, 0.08) 50%,
        transparent
    );
    animation: crtRollBand 7s linear infinite;
    opacity: 0.5;
}

/* Snow on the TV/monitor in the bedroom GIF */
.intro-gif-frame.is-tv-static .intro-static-snow,
.intro-gif-frame.is-tv-static .intro-static-scan {
    top: 26%;
    left: 50%;
    width: 34%;
    height: 32%;
    transform: translateX(-50%);
    right: auto;
    bottom: auto;
}

.intro-gif-frame.is-tv-static .intro-static-roll {
    top: 30%;
    left: 50%;
    width: 34%;
    height: 20%;
    transform: translateX(-50%);
    right: auto;
    bottom: auto;
}

.intro-gif {
    display: block;
    width: min(92vw, 520px);
    height: auto;
    max-height: min(50vh, 400px);
    object-fit: contain;
    image-rendering: auto;
    filter: grayscale(1) contrast(1.18) brightness(0.96);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.intro-gif-stage.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-gif.is-fading {
    opacity: 0;
}

.story-ui {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px) clamp(24px, 6vh, 48px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.room-intro.is-text-only .story-ui {
    max-width: 760px;
    padding: clamp(12px, 2vh, 24px) clamp(16px, 4vw, 32px);
}

.story-box {
    background: rgba(0, 0, 0, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.55);
    padding: 16px 18px 18px;
    box-shadow:
        0 0 0 1px #000,
        0 0 24px rgba(255, 255, 255, 0.12),
        inset 0 0 30px rgba(255, 255, 255, 0.03);
    min-height: 88px;
}

.story-tag {
    font-size: 10px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
}

.story-line {
    font-size: clamp(13px, 2.2vw, 17px);
    line-height: 1.55;
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: var(--text-glow);
    min-height: 1.5em;
}

.story-line.is-typing::after {
    content: '█';
    margin-left: 0.2em;
    animation: storyCursorBlink 1s step-end infinite;
}

@keyframes storyCursorBlink {
    50% { opacity: 0; }
}

.story-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.story-skip {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    font-family: inherit;
    font-size: clamp(10px, 1.8vw, 12px);
    letter-spacing: 0.12em;
    padding: 9px 12px;
    background: #000;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
    order: 99;
    flex-basis: 100%;
    max-width: 320px;
}

.story-skip-rgb {
    position: absolute;
    inset: -2px;
    z-index: 0;
    opacity: 0;
    background: linear-gradient(
        90deg,
        #ff0040 0%,
        #00ff88 33%,
        #0088ff 66%,
        #ff0040 100%
    );
    background-size: 300% 100%;
    mix-blend-mode: screen;
}

.story-skip-text {
    position: relative;
    z-index: 1;
}

.story-skip:hover,
.story-skip:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
    text-shadow:
        1.5px 0 #ff0040,
        -1.5px 0 #00d4ff,
        0 0 10px #fff;
    outline: none;
}

.story-skip:hover .story-skip-rgb,
.story-skip:focus-visible .story-skip-rgb {
    opacity: 0.75;
    animation: immerseRgbSlide 0.2s linear infinite;
}

.story-back {
    font-family: inherit;
    font-size: clamp(11px, 2vw, 13px);
    letter-spacing: 0.18em;
    padding: 10px 22px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    transition: opacity 0.3s ease, border-color 0.15s, color 0.15s;
}

.story-back.is-visible {
    opacity: 1;
}

.story-back:not([hidden]):hover,
.story-back:not([hidden]):focus-visible {
    color: #fff;
    border-color: #fff;
    outline: none;
}

.story-back[hidden] {
    display: none;
}

.room-intro.is-explore .story-back,
.room-intro.is-explore .story-skip {
    display: none;
}

.story-next {
    font-family: inherit;
    font-size: clamp(11px, 2vw, 13px);
    letter-spacing: 0.18em;
    padding: 10px 28px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    cursor: pointer;
    text-shadow: var(--text-glow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.15s;
}

.story-next.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.story-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-shadow: none;
}

.story-next:not(:disabled):hover,
.story-next:not(:disabled):focus-visible {
    border-color: #fff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
    outline: none;
}

.story-cta {
    position: relative;
    align-self: center;
    font-family: inherit;
    font-size: clamp(11px, 2vw, 13px);
    letter-spacing: 0.2em;
    padding: 14px 22px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    text-shadow: var(--text-glow);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.15s;
}

.story-cta.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.story-cta:not([hidden]) {
    display: block;
}

.story-cta-rgb {
    position: absolute;
    inset: -2px;
    z-index: 0;
    opacity: 0;
    background: linear-gradient(
        90deg,
        #ff0040 0%,
        #00ff88 33%,
        #0088ff 66%,
        #ff0040 100%
    );
    background-size: 300% 100%;
    mix-blend-mode: screen;
}

.story-cta-text {
    position: relative;
    z-index: 1;
}

.story-cta:hover,
.story-cta:focus-visible {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.35);
    outline: none;
}

.story-cta:hover .story-cta-rgb,
.story-cta:focus-visible .story-cta-rgb {
    opacity: 0.75;
    animation: immerseRgbSlide 0.2s linear infinite;
}

.lofi-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 720px;
    margin: 2px auto 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 0 0 1px #000,
        0 0 18px rgba(255, 255, 255, 0.12),
        inset 0 0 20px rgba(255, 255, 255, 0.03);
}

.lofi-disc {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: grid;
    place-items: center;
    font-size: 15px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.lofi-widget.is-playing .lofi-disc {
    animation: lofiSpin 2.4s linear infinite;
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.6),
        0 0 26px rgba(255, 255, 255, 0.3);
}

@keyframes lofiSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lofi-meta {
    min-width: 0;
    flex: 1;
}

.lofi-title {
    font-size: clamp(9px, 1.3vw, 11px);
    letter-spacing: 0.12em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lofi-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.lofi-note {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.08em;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lofi-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

#lofi-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.lofi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 9px;
    letter-spacing: 0.12em;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: #000;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    text-decoration: none;
}

.lofi-btn:hover,
.lofi-btn:focus-visible {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    outline: none;
}

.lofi-btn-play {
    min-width: 52px;
}


body.room-active .tv-unit.is-room-hidden,
body.room-active .immerse-btn {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

body.tv-active .room-intro:not(.is-entering) {
    display: none;
}

.room-return-btn {
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.12em;
    padding: 6px 10px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.room-return-btn:hover {
    color: #fff;
    border-color: #fff;
    text-shadow: var(--text-glow);
}

body.room-active .room-return-btn {
    display: none;
}

/* ----- Full viewport = screen ----- */
.tv-unit {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--frame);
    position: relative;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.tv-cabinet-body {
    flex: 1;
    min-height: 0;
    display: flex;
    padding: clamp(6px, 1vw, 12px);
}

.tv-bezel-wrap {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: clamp(4px, 0.8vw, 8px);
    background: #000000;
    border-radius: 4px;
    box-shadow: inset 0 0 40px #000;
}

.tv-bezel {
    width: 100%;
    height: 100%;
    padding: 3px;
    background: #000;
    border-radius: 2px;
}

.crt-tube {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--screen-bg);
    border: none;
    outline: none;
    isolation: isolate;
    filter: brightness(1.1) contrast(1.06);
}

.tv-unit.is-off .crt-tube {
    filter: brightness(0) contrast(1.2);
}

.tv-unit.is-off .crt-content,
.tv-unit.is-off .crt-fx {
    visibility: hidden;
    opacity: 0;
}

.tv-unit.is-screen-live .crt-content,
.tv-unit.is-screen-live .crt-fx {
    visibility: visible !important;
    opacity: 1 !important;
}

.tv-unit.is-screen-live .crt-tube {
    filter: brightness(1.08) contrast(1.06) !important;
}

.tv-unit.is-force-on .crt-content,
.tv-unit.is-force-on .crt-fx {
    visibility: visible !important;
    opacity: 1 !important;
}

.tv-unit.is-force-on .crt-tube {
    filter: brightness(1.08) contrast(1.06) !important;
}

.tv-unit.is-force-on .crt-boot,
.tv-unit.is-force-on .crt-boot * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    animation: none !important;
}

.tv-unit.is-booting .crt-content {
    opacity: 0;
    visibility: hidden;
}

.tv-unit.is-booting.boot-content .crt-content {
    visibility: visible;
    animation: contentFadeIn 0.7s ease forwards;
}

@keyframes contentFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tv-unit.is-booting .crt-fx {
    opacity: 0;
}

.tv-unit.is-booting.boot-content .crt-fx {
    animation: contentFadeIn 0.9s ease forwards;
}

.tv-unit.is-booting.boot-glow .crt-tube {
    animation: tubePowerOn 2s ease-out forwards;
}

@keyframes tubePowerOn {
    0%   { filter: brightness(0) contrast(1.3); }
    38%  { filter: brightness(2.2) contrast(1.15); }
    55%  { filter: brightness(1.5) contrast(1.05); }
    100% { filter: brightness(1) contrast(1); }
}

/* ----- TV power-on overlay ----- */
.crt-boot {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

.crt-boot.is-playing {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

/* Hide boot layers completely when idle — prevents ghost edges after animation */
.crt-boot:not(.is-playing) .crt-boot-line,
.crt-boot:not(.is-playing) .crt-boot-expand,
.crt-boot:not(.is-playing) .crt-boot-black {
    display: none;
    animation: none;
    opacity: 0;
    transform: none;
}

.crt-boot-black {
    position: absolute;
    inset: 0;
    background: #000;
    display: none;
    opacity: 0;
}

.crt-boot-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    background: #ffffff;
    box-shadow:
        0 0 16px #ffffff,
        0 0 48px rgba(255, 255, 255, 0.9),
        0 0 96px rgba(255, 255, 255, 0.5);
    transform: scaleX(0);
    opacity: 0;
}

.crt-boot-expand {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    transform-origin: center center;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        #ffffff 45%,
        #ffffff 55%,
        rgba(0, 0, 0, 0.3) 100%
    );
    opacity: 0;
    transform: translateY(-50%) scaleY(0.006);
}

.crt-boot.is-playing .crt-boot-line {
    animation: bootLineIn 2.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.crt-boot.is-playing .crt-boot-expand {
    animation: bootExpand 2.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.crt-boot.is-playing .crt-boot-black {
    opacity: 0;
    animation: bootBlackFade 2.1s ease forwards;
}

@keyframes bootLineIn {
    0%, 6%   { opacity: 0; transform: scaleX(0); }
    14%      { opacity: 1; transform: scaleX(1); }
    32%      { opacity: 1; transform: scaleX(1); }
    48%      { opacity: 0; transform: scaleX(1); }
    100%     { opacity: 0; }
}

@keyframes bootExpand {
    0%, 18%  { opacity: 0; transform: translateY(-50%) scaleY(0.006); }
    24%      { opacity: 1; transform: translateY(-50%) scaleY(0.006); }
    44%      { opacity: 1; transform: translateY(-50%) scaleY(280); }
    52%      { opacity: 0.35; transform: translateY(-50%) scaleY(280); }
    100%     { opacity: 0; transform: translateY(-50%) scaleY(280); }
}

@keyframes bootBlackFade {
    0%, 40%  { opacity: 1; }
    55%      { opacity: 0.4; }
    100%     { opacity: 0; }
}

/* Power-off: quick collapse */
.tv-unit.is-powering-off .crt-boot.is-playing .crt-boot-line {
    animation: none;
    opacity: 0;
}

.tv-unit.is-powering-off .crt-boot.is-playing .crt-boot-expand {
    animation: bootExpandOff 0.55s ease-in forwards;
    opacity: 0.25;
    transform: translateY(-50%) scaleY(280);
}

.tv-unit.is-powering-off .crt-boot.is-playing .crt-boot-black {
    animation: bootBlackOn 0.55s ease-in forwards;
}

@keyframes bootExpandOff {
    0%   { opacity: 0.2; transform: translateY(-50%) scaleY(280); }
    100% { opacity: 0; transform: translateY(-50%) scaleY(0.006); }
}

@keyframes bootBlackOn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

.tv-unit.is-powering-off .crt-tube {
    animation: tubePowerOff 0.5s ease-in forwards;
}

@keyframes tubePowerOff {
    0%   { filter: brightness(1); }
    40%  { filter: brightness(1.8); }
    100% { filter: brightness(0) contrast(1.2); }
}

/* ----- VCR OSD text style ----- */
.crt-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    font-size: clamp(14px, 1.8vw, 20px);
    line-height: 1.45;
    overflow: hidden;
    color: #fff;
    text-shadow: var(--text-glow);
}

.channel-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 45%, rgba(255,255,255,0.08), transparent 45%),
        linear-gradient(135deg, rgba(255,255,255,0.04), rgba(0,0,0,0.8));
}

.channel-bg::before,
.channel-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
}

.channel-bg::before {
    background:
        linear-gradient(90deg, rgba(255, 0, 64, 0.13), transparent 18%, transparent 82%, rgba(0, 210, 255, 0.13)),
        repeating-linear-gradient(
            to bottom,
            rgba(255, 0, 64, 0.04) 0px,
            rgba(0, 255, 130, 0.035) 1px,
            rgba(0, 160, 255, 0.035) 2px,
            transparent 3px,
            transparent 5px
        );
}

.channel-bg::after {
    background:
        radial-gradient(circle at 30% 35%, rgba(255, 0, 80, 0.1), transparent 32%),
        radial-gradient(circle at 70% 55%, rgba(0, 200, 255, 0.11), transparent 34%);
    animation: crtColorBloom 3.8s ease-in-out infinite alternate;
}

.channel-bg-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    min-width: 100%;
    height: 100vh;
    min-height: 100%;
    transform: translate(-50%, -50%) scale(1.16);
    border: 0;
    opacity: 0;
    filter: saturate(1.35) contrast(1.18) brightness(0.62);
    transition: opacity 0.22s ease;
    object-fit: cover;
}

.channel-bg.has-video .channel-bg-frame {
    opacity: 0.46;
    animation: crtColorDrift 2.8s steps(3) infinite;
}

.channel-bg.has-video::before {
    opacity: 0.64;
    animation: crtRgbFringe 0.18s steps(2) infinite;
}

.channel-bg.has-video::after {
    opacity: 0.5;
}

.channel-bg.is-switching .channel-bg-frame {
    animation: crtSecretTune 0.52s steps(5) both;
}

.channel-bg.is-switching::before {
    opacity: 0.95;
    animation: crtSecretColorTear 0.52s steps(4) both;
}

.channel-bg-dim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.62)),
        radial-gradient(circle at center, transparent 0 32%, rgba(0,0,0,0.58) 100%);
}

.channel-bg-label {
    position: absolute;
    left: clamp(18px, 4vw, 42px);
    bottom: clamp(92px, 14vh, 128px);
    z-index: 4;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(9px, 1.15vw, 12px);
    letter-spacing: 0.18em;
    text-shadow: var(--text-glow);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.channel-bg.has-video .channel-bg-label {
    opacity: 1;
    transform: translateY(0);
}

@keyframes crtRgbFringe {
    0% { transform: translate(0, 0); }
    33% { transform: translate(1px, 0); }
    66% { transform: translate(-1px, 1px); }
    100% { transform: translate(0, 0); }
}

@keyframes crtColorDrift {
    0% { filter: saturate(1.32) contrast(1.16) brightness(0.6) hue-rotate(0deg); }
    50% { filter: saturate(1.45) contrast(1.2) brightness(0.64) hue-rotate(1deg); }
    100% { filter: saturate(1.28) contrast(1.18) brightness(0.61) hue-rotate(-1deg); }
}

@keyframes crtColorBloom {
    0% { transform: translate(-1%, 0) scale(1.01); opacity: 0.38; }
    100% { transform: translate(1%, 0.5%) scale(1.03); opacity: 0.56; }
}

@keyframes crtSecretTune {
    0% { opacity: 0.05; transform: translate(-50%, -50%) scale(1.22) skewX(2deg); filter: saturate(2) contrast(1.55) brightness(1.2); }
    20% { opacity: 0.75; transform: translate(calc(-50% + 9px), -50%) scale(1.17) skewX(-1deg); }
    45% { opacity: 0.2; transform: translate(calc(-50% - 11px), calc(-50% + 3px)) scale(1.2); }
    70% { opacity: 0.62; transform: translate(calc(-50% + 4px), calc(-50% - 2px)) scale(1.16); }
    100% { opacity: 0.46; transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes crtSecretColorTear {
    0% { transform: translateX(-12px); }
    25% { transform: translateX(10px); }
    50% { transform: translateX(-7px); }
    75% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

/* HUD corners */
.hud {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: none;
}

.hud-line {
    display: block;
    white-space: nowrap;
}

.hud-logo {
    width: clamp(20px, 2.6vw, 28px);
    height: auto;
    opacity: 1;
    pointer-events: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
}

.hud-time {
    font-variant-numeric: tabular-nums;
}

.hud-tl { top: clamp(16px, 3vh, 32px); left: clamp(16px, 3vw, 40px); text-align: left; }
.hud-tc { top: clamp(16px, 3vh, 32px); left: 50%; transform: translateX(-50%); text-align: center; }
.hud-tr { top: clamp(16px, 3vh, 32px); right: clamp(16px, 3vw, 40px); text-align: right; }
.hud-bl { bottom: clamp(16px, 3vh, 32px); left: clamp(16px, 3vw, 40px); text-align: left; }
.hud-br { bottom: clamp(16px, 3vh, 32px); right: clamp(16px, 3vw, 40px); text-align: right; }

.hud-btn {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    text-align: inherit;
    text-transform: uppercase;
    letter-spacing: inherit;
    pointer-events: auto;
    padding: 0;
    text-shadow: inherit;
    transition: opacity 0.15s;
}

.hud-btn:hover {
    opacity: 0.75;
}

.hud-arrow {
    display: inline-block;
}

/* Center content */
.vcr-main {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(80px, 14vh, 120px) clamp(24px, 6vw, 80px);
    text-align: center;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: none;
    background: transparent;
    border: none;
    outline: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.vcr-main::-webkit-scrollbar {
    display: none;
    width: 0;
}

.vcr-main .panel {
    pointer-events: auto;
    max-width: 720px;
}

.vcr-title {
    font-family: inherit;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.12em;
}

.home-logo {
    width: clamp(48px, 8vw, 74px);
    height: auto;
    margin: 0 auto 12px;
    opacity: 1;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.5));
}

.intro-top-logo,
.hud-logo,
.home-logo {
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.28s steps(4);
    transform-origin: center;
}

.intro-top-logo.is-logo-rotated {
    transform: translateX(-50%) rotate(180deg);
}

.hud-logo.is-logo-rotated,
.home-logo.is-logo-rotated {
    transform: rotate(180deg);
}

.intro-top-logo:hover,
.intro-top-logo:focus-visible,
.hud-logo:hover,
.hud-logo:focus-visible,
.home-logo:hover,
.home-logo:focus-visible {
    filter:
        drop-shadow(2px 0 rgba(255, 0, 64, 0.75))
        drop-shadow(-2px 0 rgba(0, 212, 255, 0.75))
        drop-shadow(0 0 16px rgba(255, 255, 255, 0.85));
    animation: logoGlitchPulse 0.12s steps(2) infinite;
}

@keyframes logoGlitchPulse {
    0% {
        filter:
            drop-shadow(2px 0 rgba(255, 0, 64, 0.75))
            drop-shadow(-2px 0 rgba(0, 212, 255, 0.75))
            drop-shadow(0 0 16px rgba(255, 255, 255, 0.85));
    }
    50% {
        filter:
            drop-shadow(-2px 0 rgba(255, 0, 64, 0.75))
            drop-shadow(2px 0 rgba(0, 212, 255, 0.75))
            drop-shadow(0 0 11px rgba(255, 255, 255, 0.7));
    }
    100% {
        filter:
            drop-shadow(2px 0 rgba(255, 0, 64, 0.75))
            drop-shadow(-2px 0 rgba(0, 212, 255, 0.75))
            drop-shadow(0 0 16px rgba(255, 255, 255, 0.85));
    }
}

.vcr-heading {
    font-family: inherit;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 16px;
    letter-spacing: 0.2em;
}

.vcr-heading-sm {
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
    margin-top: 20px;
    margin-bottom: 10px;
}

.vcr-sub {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 20px;
    font-size: 0.85em;
    text-shadow: var(--text-glow);
}

.vcr-main p {
    margin-bottom: 10px;
    font-size: clamp(12px, 1.5vw, 16px);
    line-height: 1.5;
    color: #ffffff;
}

.vcr-tag {
    color: var(--osd-white);
}

/* ----- Glitch text decode ----- */
.is-glitching {
    animation: glitchTextRgb 0.07s steps(2) infinite;
}

.glitch-settled {
    animation: glitchTextSettle 0.35s ease-out forwards;
}

.panel-glitching .vcr-title,
.panel-glitching .vcr-heading {
    letter-spacing: 0.18em;
}

@keyframes glitchTextRgb {
    0% {
        text-shadow:
            2px 0 rgba(255, 0, 64, 0.75),
            -2px 0 rgba(0, 212, 255, 0.75);
    }
    50% {
        text-shadow:
            -2px 0 rgba(255, 0, 64, 0.5),
            2px 0 rgba(0, 212, 255, 0.5);
    }
    100% {
        text-shadow:
            1px 0 rgba(255, 0, 64, 0.35),
            -1px 0 rgba(0, 212, 255, 0.35);
    }
}

@keyframes glitchTextSettle {
    to { text-shadow: none; }
}

.vcr-status-line {
    margin-top: 20px;
}

.dim {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    margin-top: 24px;
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.5),
        0 0 16px rgba(255, 255, 255, 0.25);
}

a {
    color: var(--osd-white);
    text-decoration: none;
    border-bottom: 1px solid var(--osd-dim);
}

a:hover {
    color: #ffffff;
    text-shadow: var(--text-glow);
}

/* Bottom channel strip */
.vcr-nav {
    position: absolute;
    bottom: clamp(42px, 8vh, 68px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(8px, 1.4vw, 14px);
    z-index: 6;
    width: min(92%, 760px);
}

.channel-strip-label {
    flex-basis: 100%;
    font-size: clamp(9px, 1.1vw, 12px);
    letter-spacing: 0.24em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-shadow: var(--text-glow);
}

.nav-btn {
    font-family: inherit;
    font-size: clamp(10px, 1.25vw, 14px);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.48);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    letter-spacing: 0.1em;
    text-shadow: inherit;
    transition: all 0.15s;
    outline: none;
}

.nav-btn:focus-visible {
    outline: 1px solid var(--osd-white);
    outline-offset: 2px;
}

.nav-btn:hover,
.nav-btn.is-active {
    color: #ffffff;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.7),
        0 0 28px rgba(255, 255, 255, 0.35);
    text-shadow: var(--text-glow);
}

/* ----- Static / snow / CRT FX ----- */
.crt-fx {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
    border: none;
    outline: none;
}

/* Monochrome static — black & white only */
.fx-snow {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-color: #000000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    background-repeat: repeat;
    transform: scale(1.06);
    transform-origin: center center;
    animation: snowDrift 0.12s steps(4) infinite;
    mix-blend-mode: lighten;
    filter: contrast(1.4) brightness(0.85);
    will-change: transform;
}

@keyframes snowDrift {
    0%   { transform: scale(1.06) translate(0, 0); }
    25%  { transform: scale(1.06) translate(-0.3%, 0.2%); }
    50%  { transform: scale(1.06) translate(0.2%, -0.2%); }
    75%  { transform: scale(1.06) translate(-0.2%, 0.3%); }
    100% { transform: scale(1.06) translate(0, 0); }
}

.fx-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0px,
        rgba(255, 255, 255, 0.04) 1px,
        transparent 1px,
        transparent 3px,
        rgba(0, 0, 0, 0.35) 3px,
        rgba(0, 0, 0, 0.35) 4px
    );
    opacity: 0.55;
    mix-blend-mode: overlay;
}

/* Subtle rolling white band + slow line drift — real CRT roll */
.fx-roll-bars {
    position: absolute;
    inset: -20% 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 5px,
        rgba(255, 255, 255, 0.025) 5px,
        rgba(255, 255, 255, 0.025) 6px
    );
    opacity: 0.5;
    animation: crtLineDrift 12s linear infinite;
}

.fx-roll-bars::before {
    content: '';
    position: absolute;
    left: -5%;
    right: -5%;
    height: 14%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 25%,
        rgba(255, 255, 255, 0.06) 48%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.06) 52%,
        rgba(255, 255, 255, 0.02) 75%,
        transparent 100%
    );
    animation: crtRollBand 7.5s linear infinite;
    filter: blur(0.5px);
}

.fx-roll-bars::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 47px,
        rgba(255, 255, 255, 0.035) 47px,
        rgba(255, 255, 255, 0.035) 48px
    );
    opacity: 0.35;
    animation: crtLineDrift 18s linear infinite reverse;
}

/* Random analog tear lines / sync glitches */
.fx-random-glitch {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    z-index: 11;
    background:
        linear-gradient(
            to bottom,
            transparent calc(var(--glitch-y2, 62%) - 0.5%),
            rgba(255, 255, 255, 0.5) var(--glitch-y2, 62%),
            transparent calc(var(--glitch-y2, 62%) + 0.5%)
        );
}

.fx-random-glitch::before,
.fx-random-glitch::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    opacity: 0;
}

/* Primary horizontal glitch streak */
.fx-random-glitch::before {
    top: var(--glitch-y, 52%);
    height: var(--glitch-h, 2px);
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.65) 10%,
            rgba(255, 255, 255, 0.95) 50%,
            rgba(255, 255, 255, 0.65) 90%,
            rgba(255, 255, 255, 0) 100%
        );
    box-shadow:
        0 0 8px rgba(255, 255, 255, 0.6),
        0 0 20px rgba(255, 255, 255, 0.35);
}

/* Scrolling white bar (sync roll sweep) */
.fx-random-glitch::after {
    top: -20%;
    height: var(--glitch-sweep-h, 12%);
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(255, 255, 255, 0.14) 50%,
        rgba(255, 255, 255, 0.08) 65%,
        rgba(255, 255, 255, 0) 100%
    );
    filter: blur(0.6px);
}

.crt-tube.is-random-glitch .fx-random-glitch {
    opacity: 1;
    animation: crtRandomGlitchJitter var(--glitch-dur, 120ms) steps(3) both;
}

.crt-tube.is-random-glitch .fx-random-glitch::before {
    animation: crtRandomGlitchLine var(--glitch-dur, 120ms) steps(2) both,
        crtRandomGlitchBand var(--glitch-dur, 120ms) steps(2) both;
}

.crt-tube.is-random-sweep .fx-random-glitch::after {
    opacity: 0.95;
    animation: crtRandomSweepDown var(--glitch-sweep-dur, 540ms) linear both;
}

@keyframes crtRandomGlitchJitter {
    0%   { transform: translateX(0); }
    30%  { transform: translateX(var(--glitch-shift, 0px)); }
    65%  { transform: translateX(calc(var(--glitch-shift, 0px) * -0.5)); }
    100% { transform: translateX(0); }
}

@keyframes crtRandomGlitchLine {
    0%   { opacity: 0; transform: translateX(-10px); }
    25%  { opacity: 0.9; transform: translateX(8px); }
    60%  { opacity: 0.6; transform: translateX(-4px); }
    100% { opacity: 0; transform: translateX(0); }
}

@keyframes crtRandomGlitchBand {
    0% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    35% {
        box-shadow:
            0 var(--glitch-offset, 8px) 0 rgba(255, 255, 255, 0.4),
            0 calc(var(--glitch-offset, 8px) + var(--glitch-band-h, 10px)) 0 rgba(255, 255, 255, 0.15);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes crtRandomSweepDown {
    0%   { top: -20%; }
    100% { top: 110%; }
}

@keyframes crtLineDrift {
    0%   { transform: translateY(0); }
    100% { transform: translateY(6px); }
}

@keyframes crtRollBand {
    0%   { top: -18%; }
    100% { top: 108%; }
}

.fx-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 88% 82% at 50% 50%,
        transparent 25%,
        rgba(0, 0, 0, 0.7) 70%,
        #000000 100%
    );
}

.fx-flicker {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    animation: flicker 0.1s steps(2) infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.fx-chroma {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0.16;
    background:
        linear-gradient(90deg, rgba(255, 0, 70, 0.18), transparent 18%, transparent 82%, rgba(0, 180, 255, 0.18)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.03) 0px,
            rgba(0, 255, 90, 0.025) 1px,
            rgba(0, 80, 255, 0.025) 2px,
            transparent 3px,
            transparent 6px
        );
    mix-blend-mode: screen;
    animation: crtChromaSwim 2.4s steps(4) infinite;
}

@keyframes crtChromaSwim {
    0% { transform: translateX(0); opacity: 0.12; }
    25% { transform: translateX(1px); opacity: 0.18; }
    50% { transform: translateX(-1px); opacity: 0.14; }
    75% { transform: translateX(2px); opacity: 0.2; }
    100% { transform: translateX(0); opacity: 0.12; }
}

.fx-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 18%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
    border-radius: 0;
}

.crt-static {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px;
    mix-blend-mode: screen;
}

.crt-static.is-active {
    animation: staticBurst 0.4s steps(8) forwards;
}

@keyframes staticBurst {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.crt-tube[data-static="low"] .fx-snow { opacity: 0.28; }
.crt-tube[data-static="mid"] .fx-snow { opacity: 0.45; }
.crt-tube[data-static="high"] .fx-snow { opacity: 0.62; }

/* ----- Bottom bar ----- */
.tv-cabinet-bottom {
    flex-shrink: 0;
    height: var(--cabinet-bottom-h);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 16px;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.power-btn {
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.15em;
    padding: 6px 12px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}

.power-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
    text-shadow: var(--text-glow);
}

.volume-toggle-btn {
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.14em;
    padding: 6px 10px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.volume-toggle-btn:hover,
.volume-toggle-btn:focus-visible {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    outline: none;
}

.volume-toggle-btn[aria-pressed="false"] {
    color: rgba(255, 255, 255, 0.48);
    border-color: rgba(255, 255, 255, 0.22);
    text-shadow: none;
}

.tv-cabinet-bottom .tv-lofi-menu {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: #000;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.04);
}

.tv-cabinet-bottom .tv-lofi-btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 18px;
    font-size: 9px;
    letter-spacing: 0.1em;
    line-height: 1;
    padding: 0 5px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    border-radius: 0;
    box-shadow: none;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.28);
}

.tv-cabinet-bottom .tv-lofi-btn:hover,
.tv-cabinet-bottom .tv-lofi-btn:focus-visible,
.tv-cabinet-bottom .tv-lofi-btn.is-playing {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: #fff;
    outline: none;
    text-shadow: var(--text-glow);
}

.tv-cabinet-bottom .tv-lofi-play {
    min-width: 44px;
}

.tv-cabinet-bottom .tv-lofi-time {
    min-width: 58px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.58);
    font-variant-numeric: tabular-nums;
}

.power-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tv-unit:not(.is-off) .power-led {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 10px #ffffff, 0 0 20px rgba(255, 255, 255, 0.6);
}

.tv-hint {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.08em;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.knob {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
}

.knob::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 7px;
    background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 600px) {
    .hud-tl, .hud-tr { font-size: 11px; }
    .vcr-nav { gap: 6px; }
    .nav-btn { padding: 3px 6px; font-size: 11px; }
    .tv-lofi-time { display: none; }
    .tv-hint { display: none; }
}

/* ----- Immersion button (RGB glitch hover) ----- */
.immerse-btn {
    position: fixed;
    right: 18px;
    bottom: calc(var(--cabinet-bottom-h) + 14px);
    z-index: 100001;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.18em;
    padding: 10px 14px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    text-shadow: var(--text-glow);
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.15s;
}

.immerse-btn-text {
    position: relative;
    z-index: 2;
}

.immerse-btn-rgb {
    position: absolute;
    inset: -2px;
    z-index: 1;
    opacity: 0;
    background: linear-gradient(
        90deg,
        #ff0040 0%,
        #00ff88 33%,
        #0088ff 66%,
        #ff0040 100%
    );
    background-size: 300% 100%;
    mix-blend-mode: screen;
    transition: opacity 0.1s;
}

.immerse-btn:hover,
.immerse-btn:focus-visible {
    border-color: transparent;
    animation: immerseBtnShake 0.12s steps(2) infinite;
    text-shadow:
        2px 0 #ff0040,
        -2px 0 #00d4ff,
        0 0 12px #fff;
}

.immerse-btn:hover .immerse-btn-rgb,
.immerse-btn:focus-visible .immerse-btn-rgb {
    opacity: 0.85;
    animation: immerseRgbSlide 0.2s linear infinite;
}

@keyframes immerseRgbSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

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

.tv-unit.is-off .immerse-btn,
.tv-unit.is-booting .immerse-btn {
    display: none;
}

.tv-unit.is-immersed .immerse-btn {
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    border-color: rgba(255, 255, 255, 0.5);
}

.tv-unit.is-immersed .immerse-btn:hover,
.tv-unit.is-immersed .immerse-btn:focus-visible {
    animation: none;
}

.tv-unit.is-immersed .immerse-btn:hover .immerse-btn-text,
.tv-unit.is-immersed .immerse-btn:focus-visible .immerse-btn-text {
    animation: immerseBtnShake 0.12s steps(2) infinite;
}

.tv-unit.is-immersed .immerse-btn-text::before {
    content: '◀ ';
}

/* Hide on-screen channel strip in immersion — use remote only */
.tv-unit.is-immersed .vcr-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ----- Immersion remote ----- */
.immerse-remote {
    position: fixed;
    right: clamp(12px, 3vw, 24px);
    bottom: clamp(64px, 12vh, 88px);
    z-index: 100002;
    pointer-events: none;
    opacity: 0;
    transform: translateY(28px) scale(0.94);
    transition:
        opacity 0.35s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.immerse-remote.is-visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.immerse-remote.is-dragged,
.immerse-remote.is-dragged.is-visible {
    transform: none;
}

.immerse-remote-shell {
    font-family: inherit;
    box-sizing: border-box;
    position: relative;
    background:
        radial-gradient(circle at 22px 18px, rgba(255, 255, 255, 0.055), transparent 18px),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.012) 0 1px,
            transparent 1px 5px
        ),
        linear-gradient(180deg, #1a1a18 0%, #0b0b0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px 16px 24px 24px;
    box-shadow:
        0 0 0 1px #000,
        0 16px 34px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -14px 18px rgba(0, 0, 0, 0.55);
    padding: 12px 13px 14px;
    width: 230px;
    max-width: min(92vw, 230px);
    overflow: hidden;
    transition: opacity 0.28s ease, transform 0.35s ease;
}

.immerse-remote-shell::before {
    content: '';
    display: block;
    width: 34px;
    height: 8px;
    margin: 0 auto 8px;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.5px) 0 0 / 6px 4px,
        #050505;
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.immerse-remote-shell::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e9e9e9;
    box-shadow:
        0 0 5px rgba(255, 255, 255, 0.9),
        0 0 12px rgba(255, 255, 255, 0.45);
    animation: remoteLedBlink 1.45s steps(2, end) infinite;
}

@keyframes remoteLedBlink {
    0%, 48% {
        opacity: 1;
    }
    49%, 100% {
        opacity: 0.22;
        box-shadow: none;
    }
}

.immerse-remote-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.remote-grab,
.remote-fold {
    font-family: inherit;
    font-size: 7px;
    letter-spacing: 0.08em;
    min-width: 0;
    padding: 4px 6px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.remote-grab {
    cursor: grab;
}

.remote-grab:active {
    cursor: grabbing;
}

.remote-grab:hover,
.remote-fold:hover,
.remote-grab:focus-visible,
.remote-fold:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    outline: none;
}

.immerse-remote-brand {
    font-size: 8px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.34);
    margin-bottom: 9px;
    text-align: center;
}

.immerse-remote-label {
    font-size: 8px;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.42);
    margin: 0 0 6px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.immerse-remote-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 9px;
}

.immerse-remote-channels .remote-ch:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 3.5px);
    justify-self: center;
    text-align: center;
}

.immerse-remote-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 9px;
}

.immerse-remote-tuner {
    grid-template-columns: 1fr 1fr;
}

.remote-secret-label {
    margin-top: 8px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.72);
}

.remote-secret-note {
    margin: -2px 0 7px;
    font-size: 7px;
    line-height: 1.35;
    letter-spacing: 0.1em;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.immerse-remote-secret {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 9px;
}

.remote-btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    font-family: inherit;
    font-size: 8px;
    letter-spacing: 0.06em;
    padding: 8px 5px 7px;
    min-height: 34px;
    background:
        linear-gradient(180deg, #2a2a28 0%, #080808 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-bottom-color: rgba(0, 0, 0, 0.85);
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.62);
    cursor: pointer;
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 2px 0 #000;
    text-shadow: none;
    transition: transform 0.08s, color 0.12s, border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.remote-btn:hover,
.remote-btn:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.48);
    background: linear-gradient(180deg, #353532 0%, #0d0d0c 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 2px 0 #000;
    outline: none;
}

.remote-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.remote-ch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    justify-content: center;
    padding: 8px 4px 7px;
    min-height: 47px;
}

.remote-ch-num {
    font-size: 12px;
    letter-spacing: 0.08em;
}

.remote-ch-name {
    font-size: 8px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}

.remote-ch.is-active,
.remote-ch.is-active .remote-ch-name,
.remote-quote.is-active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.62);
    background: linear-gradient(180deg, #3a3a36 0%, #111 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 2px 0 #000,
        0 0 9px rgba(255, 255, 255, 0.16);
    text-shadow: 0 0 7px rgba(255, 255, 255, 0.45);
}

.remote-quote-off {
    grid-column: 1 / -1;
    border-color: rgba(255, 255, 255, 0.45);
    min-height: 30px;
}

.immerse-remote-row .remote-btn {
    padding: 7px 4px;
}

.remote-eject {
    width: 100%;
    padding: 10px;
    border-color: rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    font-size: 10px;
    letter-spacing: 0.16em;
}

.remote-eject:hover,
.remote-eject:focus-visible {
    border-color: #fff;
    text-shadow: 0 0 8px #fff;
}

.remote-restore {
    position: absolute;
    top: 10px;
    right: 0;
    transform: translateX(24px);
    font-family: inherit;
    font-size: 9px;
    letter-spacing: 0.16em;
    padding: 7px 10px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s ease;
}

.remote-restore:hover,
.remote-restore:focus-visible {
    color: #fff;
    border-color: #fff;
    outline: none;
}

.immerse-remote.is-collapsed .immerse-remote-shell {
    opacity: 0;
    transform: translateX(120%);
    pointer-events: none;
}

.immerse-remote.is-collapsed .remote-restore {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

@media (max-width: 520px) {
    .immerse-remote {
        right: 50%;
        left: auto;
        transform: translate(50%, 28px) scale(0.94);
    }

    .immerse-remote.is-visible {
        transform: translate(50%, 0) scale(1);
    }

    .immerse-remote-shell {
        width: min(92vw, 238px);
    }
}

/* ----- Inside the screen (immersion mode) ----- */
.tv-unit.is-immersed {
    background: #000;
}

.tv-unit.is-immersed .tv-cabinet-bottom {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    min-height: 0;
    overflow: hidden;
    border: none;
}

.tv-unit.is-immersed .tv-cabinet-body {
    position: fixed;
    inset: 0;
    padding: 0;
    z-index: 1;
}

.tv-unit.is-immersed .tv-bezel-wrap {
    padding: 0;
    background: #000;
    box-shadow: none;
    border-radius: 0;
}

.tv-unit.is-immersed .tv-bezel {
    padding: 0;
    border-radius: 0;
    background: #000;
}

.tv-unit.is-immersed .crt-tube {
    border-radius: 0;
    box-shadow: none;
    animation: immerseEnterShake 0.55s steps(5) forwards;
}

.tv-unit.is-immersed .crt-content {
    padding: clamp(24px, 5vw, 48px);
}

.tv-unit.is-immersed .fx-vignette {
    opacity: 0.35;
}

.tv-unit.is-immersed .fx-reflection {
    display: none;
}

.tv-unit.is-immersed .fx-glitch-rgb {
    opacity: 1;
    background:
        linear-gradient(90deg, rgba(255,0,60,0.12) 0%, transparent 40%, transparent 60%, rgba(0,200,255,0.12) 100%),
        linear-gradient(0deg, rgba(0,255,100,0.08) 0%, transparent 50%);
    animation: glitchRgbPulse 0.1s steps(3) infinite;
    mix-blend-mode: screen;
}

.tv-unit.is-immersed .crt-content,
.tv-unit.is-immersed .hud-line {
    animation: immerseTextGlitch 0.15s steps(2) infinite;
}

@keyframes immerseEnterShake {
    0%   { transform: scale(1.08); filter: brightness(2.5) contrast(1.4); }
    20%  { transform: scale(1.02) translate(6px, -3px); }
    40%  { transform: scale(1) translate(-5px, 4px); }
    60%  { transform: scale(1.01) translate(3px, 2px); }
    80%  { transform: scale(1) translate(-2px, -1px); }
    100% { transform: scale(1) translate(0); filter: none; }
}

@keyframes glitchRgbPulse {
    0%   { transform: translate(0, 0); opacity: 0.25; }
    33%  { transform: translate(-4px, 0); opacity: 0.4; }
    66%  { transform: translate(4px, 1px); opacity: 0.3; }
    100% { transform: translate(0, 0); opacity: 0.25; }
}

@keyframes immerseTextGlitch {
    0%   { text-shadow: 2px 0 #ff0040, -2px 0 #00d4ff, 0 0 8px #fff; }
    50%  { text-shadow: -2px 0 #00ff88, 2px 0 #ff0040, 0 0 10px #fff; }
    100% { text-shadow: 1px 0 #0088ff, -1px 0 #ff0040, 0 0 8px #fff; }
}

.immerse-flash {
    position: absolute;
    inset: 0;
    z-index: 25;
    pointer-events: none;
    opacity: 0;
    background: #fff;
    mix-blend-mode: overlay;
}

.immerse-flash.is-active {
    animation: immerseFlash 0.5s steps(6) forwards;
}

@keyframes immerseFlash {
    0%   { opacity: 0.9; }
    15%  { opacity: 0.2; }
    30%  { opacity: 0.7; }
    50%  { opacity: 0.15; }
    100% { opacity: 0; }
}

.fx-glitch-rgb {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .fx-snow,
    .fx-flicker,
    .fx-roll-bars,
    .fx-roll-bars::before,
    .fx-roll-bars::after,
    .fx-random-glitch::before,
    .fx-random-glitch::after,
    .intro-static-snow,
    .intro-static-roll,
    .room-static-snow,
    .room-static-roll {
        animation: none;
    }

    .crt-boot.is-playing .crt-boot-line,
    .crt-boot.is-playing .crt-boot-expand,
    .crt-boot.is-playing .crt-boot-black,
    .tv-unit.is-booting.boot-glow .crt-tube {
        animation-duration: 0.01s;
    }

    .immerse-btn:hover,
    .tv-unit.is-immersed .crt-content,
    .tv-unit.is-immersed .fx-glitch-rgb,
    .is-glitching,
    .glitch-settled {
        animation: none;
    }
}
