/* =========================================================================
   renai.tube // Renai-Bangumi Channel 8 // Heartwave Television Archive
   Sun-warmed terracotta-phosphor CRT video-wall, Showa 62 (1987)
   ========================================================================= */

/* -------------------- Reset & Base -------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #3a160e;
}

body {
    /* deep kiln-fired terracotta control-room shadow with subtle vignette */
    background:
        radial-gradient(ellipse at 50% 40%, #4a1d12 0%, #3a160e 50%, #1f0a05 100%),
        #3a160e;
    color: #f6e4d2;
    font-family: "VT323", "Courier New", monospace;
    font-size: 17px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    position: relative;
    user-select: none;
    cursor: default;
}

/* hidden SVG defs */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* -------------------- Station ID strip (top bezel) -------------------- */
.station-id {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: linear-gradient(180deg, #7a2e1c 0%, #5a2014 100%);
    border-bottom: 2px solid #2b1108;
    font-family: "VT323", monospace;
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: #f6e4d2;
    text-shadow: 0 0 6px rgba(217, 122, 78, 0.5);
    z-index: 80;
    box-shadow: inset 0 -1px 0 rgba(58, 22, 14, 0.6), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.id-call {
    color: #f6e4d2;
}

.id-locale {
    color: #f0a872;
    opacity: 0.85;
}

.id-signal {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d97a4e;
    text-shadow:
        0 0 0.5px #f6e4d2,
        0 0 8px #d97a4e,
        0 0 18px rgba(217, 122, 78, 0.5);
}

.signal-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d97a4e;
    box-shadow: 0 0 6px #d97a4e, 0 0 12px rgba(217, 122, 78, 0.6);
    animation: signal-pulse 1.4s ease-in-out infinite;
}

.signal-dot:nth-child(2) {
    animation-delay: 0.25s;
}

.signal-dot:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes signal-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* -------------------- Control room : the 4x4 CRT video-wall -------------------- */
.control-room {
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    bottom: 56px;
    padding: 22px 26px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 18px;
    /* metal rack background : darker terracotta with subtle screw-rivet hints */
    background:
        radial-gradient(circle at 12% 12%, rgba(122, 46, 28, 0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 88% 12%, rgba(122, 46, 28, 0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 12% 88%, rgba(122, 46, 28, 0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 88% 88%, rgba(122, 46, 28, 0.18) 0 2px, transparent 3px),
        linear-gradient(180deg, #2c100a 0%, #1f0a05 100%);
    perspective: 1400px;
    z-index: 10;
}

/* When a tile is active, defocus all siblings (CSS-only via :has) */
.control-room:has(.crt-tile[data-active="true"]) .crt-tile[data-active="false"] {
    filter: blur(6px) brightness(0.55) saturate(1.1);
    opacity: 0.18;
    transform: scale(0.94);
    transition:
        filter 720ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* -------------------- CRT tile : bowed-glass video-monitor face -------------------- */
.crt-tile {
    position: relative;
    /* asymmetric border-radius mimics the curve of a real Trinitron tube */
    border-radius: 38% 42% 36% 44% / 8% 8% 9% 7%;
    background: linear-gradient(165deg, #f0a872 0%, #d97a4e 55%, #7a2e1c 100%);
    overflow: hidden;
    cursor: pointer;
    transition:
        transform 720ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 720ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 720ms cubic-bezier(0.22, 1, 0.36, 1);
    /* inner glow + halo so each tile feels pressurized from inside */
    box-shadow:
        inset 0 0 80px rgba(58, 22, 14, 0.55),
        inset 0 0 8px rgba(255, 200, 160, 0.4),
        inset 0 1px 0 rgba(255, 220, 200, 0.35),
        0 8px 22px rgba(0, 0, 0, 0.55),
        0 0 0 2px rgba(122, 46, 28, 0.7),
        0 0 0 4px rgba(43, 17, 10, 0.85);
    /* warm glassmorphic refraction edge via conic gradient */
    isolation: isolate;
    transform-origin: center;
    will-change: transform, opacity, filter;
}

/* the glass face : holds scanlines, shadow-mask, burn-in, numeral */
.crt-face {
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    overflow: hidden;
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    background: linear-gradient(168deg, rgba(240, 168, 114, 0.5) 0%, rgba(217, 122, 78, 0.65) 50%, rgba(122, 46, 28, 0.85) 100%);
    box-shadow:
        inset 0 0 60px rgba(58, 22, 14, 0.5),
        inset 0 2px 2px rgba(255, 220, 200, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* horizontal CRT scanlines : 2px transparent, 1px terracotta-dark */
.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        transparent 0,
        transparent 2px,
        rgba(58, 22, 14, 0.22) 3px,
        rgba(58, 22, 14, 0.18) 4px
    );
    z-index: 3;
    mix-blend-mode: multiply;
}

/* aperture-grille shadow-mask : warm dot pitch */
.shadow-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, rgba(217, 122, 78, 0.12) 0.5px, transparent 1px);
    background-size: 4px 4px;
    z-index: 2;
    mix-blend-mode: multiply;
    opacity: 0.55;
}

/* faint phosphor burn-in : ghost of a previous channel */
.burn-in {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + 2px), calc(-50% + 2px));
    font-family: "Bungee", "Arial Black", sans-serif;
    font-size: clamp(4rem, 11vw, 11rem);
    line-height: 1;
    color: #f6e4d2;
    opacity: 0.04;
    letter-spacing: -0.04em;
    z-index: 1;
    pointer-events: none;
}

/* the giant Bungee channel numeral : oversized-display, the hero typography */
.channel-numeral {
    position: relative;
    z-index: 4;
    font-family: "Bungee", "Arial Black", sans-serif;
    font-weight: 400;
    /* clamp produces oversized-display effect even in 4x4 tile context */
    font-size: clamp(3.2rem, 9vw, 9rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: #f6e4d2;
    /* layered shadow : terracotta drop + cream counter-shadow + bloom */
    text-shadow:
        3px 3px 0 #7a2e1c,
        -2px -2px 0 #f6e4d2,
        0 0 0.5px #f6e4d2,
        0 0 12px #d97a4e,
        0 0 28px rgba(217, 122, 78, 0.4);
    animation: phosphor-flicker 18ms steps(2, end) infinite;
    pointer-events: none;
}

/* phosphor flicker : 0.04 amplitude brightness, 60Hz-ish */
@keyframes phosphor-flicker {
    0% { filter: brightness(0.97); }
    50% { filter: brightness(1.04); }
    100% { filter: brightness(0.97); }
}

/* slow CRT breathing : applies to the tile, 14s breath cycle */
.crt-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 25%, rgba(255, 220, 200, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 70% 80%, rgba(58, 22, 14, 0.35) 0%, transparent 50%);
    z-index: 5;
    animation: crt-breathe 14s ease-in-out infinite;
}

@keyframes crt-breathe {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* the Klee One hand-label : taped to the bezel, friendly cultural warmth */
.tile-label {
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    z-index: 6;
    background: rgba(246, 228, 210, 0.94);
    color: #3a160e;
    padding: 3px 9px 2px;
    font-size: 0.95rem;
    line-height: 1.1;
    border-radius: 1px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.45),
        0 0 0 0.5px rgba(122, 46, 28, 0.4);
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.tile-label.klee {
    font-family: "Klee One", "Hiragino Maru Gothic ProN", "Noto Sans JP", serif;
    font-weight: 600;
}

/* the masking-tape strip on top of the label : 12px terracotta-translucent */
.tape {
    position: absolute;
    bottom: calc(14% + 18px);
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    width: 38px;
    height: 12px;
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(217, 122, 78, 0.5) 0 3px,
            rgba(240, 168, 114, 0.45) 3px 6px
        );
    border-left: 1px dashed rgba(58, 22, 14, 0.25);
    border-right: 1px dashed rgba(58, 22, 14, 0.25);
    z-index: 5;
    pointer-events: none;
    opacity: 0.92;
}

/* SVG charm bezel decorations : kotatsu, shouchu, NHK-mic, teacup, etc. */
.charm {
    position: absolute;
    width: 38px;
    height: 32px;
    top: 8px;
    right: 8px;
    z-index: 6;
    opacity: 0.78;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(217, 122, 78, 0.4));
}

.charm-cassette,
.charm-letter,
.charm-pia,
.charm-stamp,
.charm-curtain {
    top: 8px;
    right: 8px;
}

/* alternate placement on every other tile for visual variety */
.crt-tile:nth-child(even) .charm {
    right: auto;
    left: 8px;
    top: auto;
    bottom: 8px;
    transform: rotate(-6deg);
}

.crt-tile:nth-child(3n) .charm {
    transform: rotate(4deg);
}

/* -------------------- Broadcast section : visible only when tile is active -------------------- */
.broadcast {
    position: absolute;
    inset: 12% 8% 18% 8%;
    z-index: 7;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    color: #d97a4e;
    font-family: "VT323", monospace;
    font-size: 1.1rem;
    text-align: left;
    text-shadow:
        0 0 0.5px #f6e4d2,
        0 0 10px #d97a4e,
        0 0 24px rgba(217, 122, 78, 0.5);
    transition: opacity 480ms ease 240ms;
}

.crt-tile[data-active="true"] .broadcast {
    opacity: 1;
}

.crt-tile[data-active="true"] .channel-numeral {
    opacity: 0.18;
    transform: translateY(-30%);
    transition: opacity 480ms ease, transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.crt-tile[data-active="true"] .tile-label,
.crt-tile[data-active="true"] .tape,
.crt-tile[data-active="true"] .charm {
    opacity: 0;
    transition: opacity 240ms ease;
}

.caption-line {
    font-size: 1.05rem;
    color: #f6e4d2;
    opacity: 0.85;
    letter-spacing: 0.04em;
}

.confession-text {
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    line-height: 1.45;
    color: #d97a4e;
    min-height: 4rem;
    letter-spacing: 0.02em;
    white-space: pre-wrap;
}

.confession-text::after {
    content: "_";
    display: inline-block;
    color: #f6e4d2;
    animation: cursor-blink 0.9s steps(1, end) infinite;
    margin-left: 4px;
}

.bbs-line {
    font-size: 1rem;
    color: #f0a872;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* the active tile : zoom-focus channel-selection -------------------- */
.crt-tile[data-active="true"] {
    /* zoom to 86vw x 78vh ish via scale, keep border-radius authentic */
    transform: scale(3.4);
    z-index: 60;
    box-shadow:
        inset 0 0 240px rgba(58, 22, 14, 0.7),
        inset 0 0 18px rgba(255, 220, 200, 0.4),
        0 12px 80px rgba(0, 0, 0, 0.85),
        0 0 0 3px rgba(122, 46, 28, 0.85),
        0 0 0 6px rgba(43, 17, 10, 0.9);
}

/* limit scale based on tile grid position so it stays inside viewport */
.crt-tile[data-channel="01"][data-active="true"],
.crt-tile[data-channel="02"][data-active="true"],
.crt-tile[data-channel="03"][data-active="true"],
.crt-tile[data-channel="04"][data-active="true"] {
    transform-origin: top center;
}

.crt-tile[data-channel="13"][data-active="true"],
.crt-tile[data-channel="14"][data-active="true"],
.crt-tile[data-channel="15"][data-active="true"],
.crt-tile[data-channel="16"][data-active="true"] {
    transform-origin: bottom center;
}

.crt-tile[data-channel="01"][data-active="true"],
.crt-tile[data-channel="05"][data-active="true"],
.crt-tile[data-channel="09"][data-active="true"],
.crt-tile[data-channel="13"][data-active="true"] {
    transform-origin: left center;
}

.crt-tile[data-channel="04"][data-active="true"],
.crt-tile[data-channel="08"][data-active="true"],
.crt-tile[data-channel="12"][data-active="true"],
.crt-tile[data-channel="16"][data-active="true"] {
    transform-origin: right center;
}

.crt-tile[data-channel="01"][data-active="true"] { transform-origin: top left; }
.crt-tile[data-channel="04"][data-active="true"] { transform-origin: top right; }
.crt-tile[data-channel="13"][data-active="true"] { transform-origin: bottom left; }
.crt-tile[data-channel="16"][data-active="true"] { transform-origin: bottom right; }

/* hover preview : subtle scale and brightening */
.crt-tile:hover:not([data-active="true"]) {
    transform: scale(1.025);
    filter: brightness(1.08);
    z-index: 12;
}

.control-room:has(.crt-tile[data-active="true"]) .crt-tile:hover:not([data-active="true"]) {
    transform: scale(0.96);
    filter: blur(4px) brightness(0.7);
}

/* -------------------- VHS tracking-error bar : the signature animation -------------------- */
.tracking-bar {
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    height: 14px;
    z-index: 70;
    pointer-events: none;
    mix-blend-mode: difference;
    filter: hue-rotate(20deg);
    animation: vhs-roll 11s linear infinite;
}

.tracking-noise {
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(217, 122, 78, 0.55) 0 2px,
            rgba(58, 22, 14, 0.5) 2px 4px,
            rgba(246, 228, 210, 0.3) 4px 5px,
            rgba(217, 122, 78, 0.45) 5px 7px
        );
    backdrop-filter: blur(1px);
    box-shadow:
        0 0 20px rgba(217, 122, 78, 0.4),
        0 -2px 8px rgba(217, 122, 78, 0.2);
    animation: tracking-jitter 0.15s steps(2, end) infinite;
}

@keyframes vhs-roll {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes tracking-jitter {
    0% { transform: translateX(0); }
    25% { transform: translateX(2px); }
    50% { transform: translateX(-1px); }
    75% { transform: translateX(1.5px); }
    100% { transform: translateX(0); }
}

/* -------------------- SMPTE idle test-pattern (terracotta-warm recolor) -------------------- */
.test-pattern {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: row;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 1600ms ease;
    mix-blend-mode: screen;
}

.test-pattern.is-on {
    opacity: 0.5;
}

.test-bar {
    flex: 1;
    height: 100%;
    filter: saturate(0.85);
}

/* -------------------- Hand-knit antenna cozy : friendliness anchor -------------------- */
.antenna-cozy {
    position: fixed;
    bottom: 70px;
    left: 18px;
    width: 96px;
    height: 112px;
    z-index: 75;
    pointer-events: none;
    /* mossy studio-curtain green tint glow for the hand-knit cozy */
    filter: drop-shadow(0 0 6px rgba(217, 122, 78, 0.35)) drop-shadow(0 0 12px rgba(43, 58, 46, 0.4));
    --cozy-base: #2b3a2e;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(43, 58, 46, 0.18) 0%, transparent 60%);
}

.antenna-svg {
    width: 100%;
    height: 100%;
}

.antenna-rod {
    transform-origin: 60px 100px;
    animation: antenna-twitch 5s ease-in-out infinite;
}

.antenna-rod.right {
    animation-delay: 1.7s;
    animation-duration: 6.4s;
}

@keyframes antenna-twitch {
    0%, 88%, 100% { transform: rotate(0deg); }
    91% { transform: rotate(2deg); }
    94% { transform: rotate(-1deg); }
    97% { transform: rotate(1.5deg); }
}

.antenna-tip {
    filter: drop-shadow(0 0 6px #d97a4e) drop-shadow(0 0 12px rgba(217, 122, 78, 0.5));
    animation: tip-glow 3.7s ease-in-out infinite;
}

@keyframes tip-glow {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

/* -------------------- Rotary channel knob : the persistent physical UI -------------------- */
.rotary-knob {
    position: fixed;
    bottom: 76px;
    right: 28px;
    width: 140px;
    height: 140px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    cursor: grab;
    user-select: none;
}

.rotary-knob:active {
    cursor: grabbing;
}

.knob-body {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #f0a872 0%, #d97a4e 35%, #7a2e1c 75%, #3a160e 100%);
    box-shadow:
        inset 0 4px 8px rgba(255, 220, 200, 0.4),
        inset 0 -8px 16px rgba(58, 22, 14, 0.7),
        0 6px 20px rgba(0, 0, 0, 0.65),
        0 0 0 2px #2b1108,
        0 0 0 6px rgba(43, 17, 10, 0.6),
        0 0 24px rgba(217, 122, 78, 0.35);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.knob-inner-ring {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 1px solid rgba(43, 17, 10, 0.5);
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 220, 200, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

/* brass tick-mark : the position indicator */
.knob-tick {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, #f6e4d2 0%, #c8c0b0 50%, #7a2e1c 100%);
    transform: translateX(-50%);
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(246, 228, 210, 0.5);
    z-index: 4;
}

/* knob grip notches around the perimeter */
.knob-grip {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform-origin: center;
}

.knob-grip span {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 8px;
    background: rgba(43, 17, 10, 0.7);
    transform-origin: 50% 66px;
    border-radius: 1px;
}

.knob-grip span:nth-child(1) { transform: translateX(-50%) rotate(0deg); }
.knob-grip span:nth-child(2) { transform: translateX(-50%) rotate(45deg); }
.knob-grip span:nth-child(3) { transform: translateX(-50%) rotate(90deg); }
.knob-grip span:nth-child(4) { transform: translateX(-50%) rotate(135deg); }
.knob-grip span:nth-child(5) { transform: translateX(-50%) rotate(180deg); }
.knob-grip span:nth-child(6) { transform: translateX(-50%) rotate(225deg); }
.knob-grip span:nth-child(7) { transform: translateX(-50%) rotate(270deg); }
.knob-grip span:nth-child(8) { transform: translateX(-50%) rotate(315deg); }

.knob-readout {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "VT323", monospace;
    font-size: 1.4rem;
    color: #d97a4e;
    text-shadow:
        0 0 0.5px #f6e4d2,
        0 0 10px #d97a4e,
        0 0 22px rgba(217, 122, 78, 0.5);
    background: rgba(43, 17, 10, 0.7);
    padding: 6px 12px;
    border-radius: 3px;
    border: 1px solid rgba(217, 122, 78, 0.55);
    letter-spacing: 0.06em;
    pointer-events: none;
    z-index: 6;
    box-shadow: inset 0 0 12px rgba(58, 22, 14, 0.7);
}

.knob-label {
    margin-top: 6px;
    font-size: 1rem;
    color: #c8c0b0;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.knob-label.klee {
    font-family: "Klee One", serif;
    font-weight: 400;
}

/* -------------------- BBS status terminal strip : the only persistent caption -------------------- */
.bbs-status {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background:
        linear-gradient(180deg, #2b1108 0%, #1a0904 100%);
    border-top: 2px solid #7a2e1c;
    box-shadow:
        inset 0 1px 0 rgba(217, 122, 78, 0.3),
        0 -4px 12px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    padding: 0 26px;
    gap: 12px;
    font-family: "VT323", monospace;
    font-size: 1.0625rem;
    color: #d97a4e;
    text-shadow:
        0 0 0.5px #f6e4d2,
        0 0 8px #d97a4e,
        0 0 18px rgba(217, 122, 78, 0.45);
    letter-spacing: 0.04em;
    z-index: 85;
    overflow: hidden;
    white-space: nowrap;
    animation: phosphor-flicker 18ms steps(2, end) infinite;
}

.bbs-prompt {
    color: #f6e4d2;
    font-weight: 700;
}

.bbs-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbs-cursor {
    color: #f6e4d2;
    animation: cursor-blink 0.9s steps(1, end) infinite;
    font-weight: 700;
    text-shadow:
        0 0 6px #f6e4d2,
        0 0 14px rgba(217, 122, 78, 0.6);
}

/* -------------------- Layered tile decoration via :nth-child for visual rhythm -------------------- */
.crt-tile:nth-child(1) { border-radius: 38% 42% 36% 44% / 8% 8% 9% 7%; }
.crt-tile:nth-child(2) { border-radius: 40% 38% 42% 36% / 7% 9% 8% 8%; }
.crt-tile:nth-child(3) { border-radius: 36% 44% 38% 40% / 9% 7% 8% 9%; }
.crt-tile:nth-child(4) { border-radius: 42% 36% 40% 38% / 8% 8% 7% 9%; }
.crt-tile:nth-child(5) { border-radius: 38% 40% 42% 36% / 9% 8% 8% 7%; }
.crt-tile:nth-child(6) { border-radius: 40% 42% 38% 36% / 7% 8% 9% 8%; }
.crt-tile:nth-child(7) { border-radius: 36% 38% 40% 42% / 8% 9% 7% 8%; }
.crt-tile:nth-child(8) { border-radius: 42% 38% 44% 36% / 8% 7% 9% 8%; }
.crt-tile:nth-child(9) { border-radius: 38% 36% 42% 40% / 7% 8% 8% 9%; }
.crt-tile:nth-child(10) { border-radius: 40% 38% 36% 42% / 9% 7% 8% 8%; }
.crt-tile:nth-child(11) { border-radius: 36% 42% 40% 38% / 8% 9% 7% 8%; }
.crt-tile:nth-child(12) { border-radius: 42% 40% 38% 36% / 8% 7% 9% 8%; }
.crt-tile:nth-child(13) { border-radius: 38% 44% 36% 40% / 7% 8% 9% 8%; }
.crt-tile:nth-child(14) { border-radius: 40% 36% 42% 38% / 8% 9% 7% 8%; }
.crt-tile:nth-child(15) { border-radius: 36% 40% 38% 44% / 9% 8% 8% 7%; }
.crt-tile:nth-child(16) { border-radius: 42% 38% 40% 36% / 8% 8% 7% 9%; }

/* Featured tile (CH 08) gets a slightly brighter halo */
.crt-tile.is-featured .crt-face {
    background: linear-gradient(168deg, rgba(246, 228, 210, 0.55) 0%, rgba(240, 168, 114, 0.7) 30%, rgba(217, 122, 78, 0.85) 65%, rgba(122, 46, 28, 0.9) 100%);
}

.crt-tile.is-featured {
    box-shadow:
        inset 0 0 100px rgba(58, 22, 14, 0.55),
        inset 0 0 12px rgba(255, 220, 200, 0.5),
        inset 0 1px 0 rgba(255, 220, 200, 0.45),
        0 8px 26px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(217, 122, 78, 0.85),
        0 0 0 4px rgba(43, 17, 10, 0.9),
        0 0 32px rgba(217, 122, 78, 0.25);
}

/* -------------------- Responsive resilience : keep the 4x4 wall sturdy -------------------- */
@media (max-width: 900px) {
    .control-room {
        gap: 10px;
        padding: 14px;
    }
    .channel-numeral {
        font-size: clamp(2.4rem, 14vw, 6rem);
    }
    .rotary-knob {
        width: 96px;
        height: 96px;
        bottom: 70px;
        right: 14px;
    }
    .knob-body {
        width: 96px;
        height: 96px;
    }
    .knob-readout {
        font-size: 1rem;
        padding: 3px 8px;
    }
    .antenna-cozy {
        width: 64px;
        height: 76px;
        bottom: 60px;
        left: 8px;
    }
    .bbs-status {
        font-size: 0.85rem;
        padding: 0 12px;
    }
    .station-id {
        font-size: 0.8rem;
        padding: 0 12px;
    }
}

@media (max-width: 600px) {
    .control-room {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 8px;
        padding: 8px;
    }
    .tile-label {
        font-size: 0.78rem;
    }
    .charm {
        width: 24px;
        height: 22px;
    }
}
