/* Night Tube — the last train, run as a lounge */

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

:root {
    --tunnel: #07060a;
    --carriage: #141119;
    --panel-deep: #120f18;
    --panel-bg: rgba(18, 15, 24, 0.86);
    --wall-dark: #4a4234;
    --moquette: #7b2a40;
    --mustard: #c9a227;
    --teal: #1f6f6a;
    --tungsten: #ffd79a;
    --tungsten-bright: #ffe6bc;
    --matrix: #ffae42;
    --roundel-red: #c8102e;
    --text-light: #f3e7d2;
    --accent: #e8b55b;
    --accent-glow: rgba(232, 181, 91, 0.55);
    --danger: #c8102e;
    /* Picked up by the shared map overlay so the close button matches this site. */
    --map-accent: var(--accent);
    --map-accent-glow: var(--accent-glow);
}

body {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    background: var(--tunnel);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    color: var(--text-light);
}

.scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--carriage);
    overflow: hidden;
    cursor: default;
}

/* On a narrow screen a 16:9 carriage can't show its own ends: the visible strip
   is ~418 viewBox units of 1600, which hides the fox, the sleeper, the digger
   and most of the rest. Make it pannable there instead of cropping them away —
   same answer templates/_map_overlay.html already uses for the map. */
.tube-pan {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}
@media (max-aspect-ratio: 7/5) {
    .tube-pan {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }
    .tube-pan::-webkit-scrollbar { display: none; }
    .tube-pan > .tube-backdrop {
        position: relative;
        inset: auto;
        width: calc(100vh * 16 / 9);
        height: 100%;
    }
}

/* The carriage. Scaled a hair over full-bleed so the always-on sway never
   exposes an edge. */
.tube-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
    animation: tb-sway 4.6s ease-in-out infinite;
}
body.playing .tube-backdrop { animation-duration: 3.1s; }
@keyframes tb-sway {
    0%, 100% { transform: scale(1.015) translate(-3px, 2px) rotate(-0.12deg); }
    50%      { transform: scale(1.015) translate(3px, -2px) rotate(0.12deg); }
}

/* Animated nodes spin about their own box. NOT a blanket `*` rule: fill-box also
   re-anchors SVG transform="rotate(a cx cy)" attributes, which throws every
   rotated head, hand and sleeve across the carriage. .t-spin opts back out
   below — it orbits a platter centre in user space. */
.t-streaks, .t-cables, .t-fairy, .t-sign-msg, .t-decks, .t-vu-bar, .t-fox-eye,
.t-fox-tail, .t-fox-ears, .t-sleeper-head, .t-z, .t-dig-sleeve, .t-dig-crate,
.t-pigeon, .t-pigeon-head, .t-mouse, .t-disco-facets, .t-disco-dot,
.t-plant-leaves, .t-steam-a, .t-steam-b, .t-handle-swing, .tube-handle-art,
.t-crate-flip { transform-box: fill-box; }

/* Only the quirks take pointer events back from the backdrop. */
.tube-tap { pointer-events: auto; cursor: pointer; }
/* Chrome's UA sheet puts outline:auto on :focus for a focusable SVG <g> without
   gating it on :focus-visible, so a plain click drew a box round the quirk.
   Suppress that; keyboard focus still gets a ring below. */
.tube-tap:focus { outline: none; }
.tube-tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The real .radio-element is retired to an invisible anchor: it still carries
   the stream URL and the .playing class for scene.js, but the thing you click
   is the DJ console drawn in the scene (.tube-decks). */
.radio-element {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* ================= THE TRAIN IS ALWAYS ROLLING =================
   Each streak group is a fixed-pitch comb translated by exactly one pitch, so
   the loop is seamless; two pitches keep it from reading as a metronome. */
.t-streaks {
    animation: tb-streak 0.95s linear infinite;
}
.t-streaks.slow { animation-name: tb-streak-slow; animation-duration: 1.7s; }
.t-streaks.alt { animation-name: tb-streak-alt; }
.t-streaks.alt.slow { animation-name: tb-streak-alt-slow; animation-duration: 1.7s; }
@keyframes tb-streak          { from { transform: translateX(0); } to { transform: translateX(-160px); } }
@keyframes tb-streak-slow     { from { transform: translateX(0); } to { transform: translateX(-220px); } }
@keyframes tb-streak-alt      { from { transform: translateX(0); } to { transform: translateX(160px); } }
@keyframes tb-streak-alt-slow { from { transform: translateX(0); } to { transform: translateX(220px); } }
body.playing .t-streaks { animation-duration: 0.52s; }
body.playing .t-streaks.slow { animation-duration: 0.95s; }

.t-cables {
    animation: tb-cables 2.8s linear infinite;
}
.t-cables.alt { animation-name: tb-cables-alt; }
@keyframes tb-cables     { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes tb-cables-alt { from { transform: translateX(0); } to { transform: translateX(120px); } }

/* ===================== LIGHTING ===================== */
.t-lamps { animation: tb-flicker 7s ease-in-out infinite; }
@keyframes tb-flicker {
    0%, 100% { opacity: 0.92; }
    47% { opacity: 1; } 49% { opacity: 0.7; } 51% { opacity: 1; }
    80% { opacity: 0.88; }
}

.t-fairy {
    fill: #ffd79a;
    animation: tb-twinkle 2.6s ease-in-out infinite;
}
.t-fairy.b { fill: #ff9ad2; animation-duration: 3.4s; animation-delay: -0.8s; }
.t-fairy.c { fill: #7fd6a0; animation-duration: 2.9s; animation-delay: -1.6s; }
.t-fairy.d { fill: #9fd0e8; animation-duration: 3.8s; animation-delay: -2.3s; }
@keyframes tb-twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
body.playing .t-fairy { animation-duration: 1.2s; }

.t-doorbtn { animation: tb-blink 2.2s steps(1, end) infinite; }
.t-doorbtn.b { animation-delay: -1.1s; }
@keyframes tb-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.35; } }

.t-cctv { animation: tb-blink 3.6s steps(1, end) infinite; }

/* The dot-matrix gets through three opinions a minute. */
.t-sign-msg { opacity: 0; animation: tb-sign 16s ease-in-out infinite; }
/* Base state, which is also what shows when prefers-reduced-motion kills the
   cycle — otherwise the sign sits blank forever. */
.t-sign-msg:first-of-type { opacity: 1; }
.t-sign-msg.b { animation-delay: -12s; }
.t-sign-msg.c { animation-delay: -8s; }
.t-sign-msg.d { animation-delay: -4s; }
/* Four messages at quarter-cycle offsets, so the lit window has to stay under
   25% or two of them light up at once and the sign reads as a smear. */
@keyframes tb-sign {
    0%, 1%    { opacity: 0; }
    3%, 26%   { opacity: 1; }
    29%, 100% { opacity: 0; }
}

/* ============== THE DECKS, LEFT RUNNING (= the play button) ============== */
.t-decks {
    transform-origin: center bottom;
    animation: tb-decks-idle 6.5s ease-in-out infinite;
    transition: filter 0.3s ease;
}
.tube-decks:hover .t-decks { filter: drop-shadow(0 0 16px var(--accent-glow)); }
@keyframes tb-decks-idle {
    0%, 100% { transform: translateY(0)    rotate(-0.4deg); }
    50%      { transform: translateY(-3px) rotate(0.4deg); }
}
body.playing .t-decks { animation: tb-decks-nod 0.74s ease-in-out infinite; }
@keyframes tb-decks-nod {
    0%, 100% { transform: translateY(0)    rotate(-1deg); }
    50%      { transform: translateY(-7px) rotate(1deg); }
}

/* A dot on the label is the only way an ellipse reads as spinning. */
.t-spin { transform-box: view-box; transform-origin: 700px 511px; opacity: 0; }
.t-spin.b { transform-origin: 900px 511px; }
body.playing .t-spin { opacity: 1; animation: tb-spin 0.9s linear infinite; }
body.playing .t-spin.b { animation-duration: 1.15s; }
@keyframes tb-spin { to { transform: rotate(360deg); } }

/* VU meter: flat when paused, dancing when not. */
.t-vu-bar { transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0.2); }
body.playing .t-vu-bar { animation: tb-vu 0.5s ease-in-out infinite alternate; }
body.playing .t-vu-bar.b { animation-duration: 0.33s; }
body.playing .t-vu-bar.c { animation-duration: 0.62s; }
@keyframes tb-vu { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

.t-glyph-pause { opacity: 0; }
body.playing .t-glyph-play { opacity: 0; }
body.playing .t-glyph-pause { opacity: 1; }

/* ===================== THE FOX ===================== */
.t-fox-eye { transform-box: fill-box; transform-origin: center; animation: tb-blink-eye 5.5s ease-in-out infinite; }
@keyframes tb-blink-eye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.t-fox-tail { transform-box: fill-box; transform-origin: right center; animation: tb-tail 5s ease-in-out infinite; }
@keyframes tb-tail { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg); } }
.t-fox-ears { transform-box: fill-box; transform-origin: center bottom; transition: transform 0.25s ease; }
.tube-fox:hover .t-fox-ears { transform: translateY(-2px); }
.tube-fox.active .t-fox-tail { animation-duration: 0.9s; }
.tube-fox.active .t-fox-ears { animation: tb-ears 0.8s ease-in-out infinite; }
@keyframes tb-ears {
    0%, 100% { transform: translateY(-4px) rotate(-3deg); }
    50%      { transform: translateY(-7px) rotate(3deg); }
}

/* ===================== THE SLEEPER ===================== */
.t-sleeper-head { transform-box: fill-box; transform-origin: center bottom; animation: tb-doze 7s ease-in-out infinite; }
@keyframes tb-doze { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(2.5deg); } }
.t-z { opacity: 0; }
.tube-sleeper.active .t-z { animation: tb-zzz 2.4s ease-out infinite; }
.tube-sleeper.active .t-z.b { animation-delay: 0.8s; }
.tube-sleeper.active .t-z.c { animation-delay: 1.6s; }
@keyframes tb-zzz {
    0%   { opacity: 0; transform: translate(0, 10px) scale(0.7); }
    30%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(14px, -26px) scale(1.15); }
}
.t-z { transform-box: fill-box; }

/* ===================== THE CRATE DIGGER ===================== */
.t-dig-sleeve { transform-box: fill-box; transform-origin: left bottom; transition: transform 0.4s cubic-bezier(0.2, 0.85, 0.32, 1.05); }
.tube-digger.active .t-dig-sleeve { transform: rotate(-30deg) translateY(-8px); }
.tube-digger.active .t-dig-crate { animation: tb-flick 0.6s ease-out; }
@keyframes tb-flick {
    0% { transform: translateX(0); } 40% { transform: translateX(-6px); } 100% { transform: translateX(0); }
}
.t-dig-crate { transform-box: fill-box; }

/* ===================== THE PIGEON ===================== */
.t-pigeon-head { transform-box: fill-box; transform-origin: right bottom; animation: tb-peck 6s ease-in-out infinite; }
@keyframes tb-peck { 0%, 86%, 100% { transform: translate(0, 0); } 92% { transform: translate(-3px, 5px); } }
.tube-pigeon.active .t-pigeon-head { animation: tb-peck-fast 0.44s ease-in-out infinite; }
@keyframes tb-peck-fast {
    0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6px, 7px); }
}
.tube-pigeon.active .t-pigeon { animation: tb-strut 0.88s ease-in-out infinite; }
.t-pigeon { transform-box: fill-box; }
@keyframes tb-strut { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }

/* ===================== THE MOUSE ===================== */
.t-mouse { transform-box: fill-box; animation: tb-twitch 4.5s ease-in-out infinite; }
@keyframes tb-twitch { 0%, 88%, 100% { transform: translateX(0); } 94% { transform: translateX(5px); } }
.tube-mouse.active .t-mouse { animation: tb-scurry 1.5s ease-in-out infinite; }
@keyframes tb-scurry {
    0%, 100% { transform: translateX(0); }
    45%      { transform: translateX(78px) scaleX(-1); }
    55%      { transform: translateX(78px) scaleX(-1); }
}

/* ===================== THE DISCO BALL ===================== */
.t-disco-facets { transform-box: fill-box; transform-origin: center; animation: tb-spin 14s linear infinite; }
.tube-disco.active .t-disco-facets { animation-duration: 2.2s; }
.t-disco-dot { opacity: 0; transform-box: fill-box; }
body.playing .t-disco-dot,
body:has(.tube-disco.active) .t-disco-dot {
    opacity: 0.5;
    animation: tb-glitter 6s ease-in-out infinite;
}
.t-disco-dot.b { animation-delay: -1.5s; animation-duration: 7.5s; }
.t-disco-dot.c { animation-delay: -3s;   animation-duration: 5.2s; }
.t-disco-dot.d { animation-delay: -4.5s; animation-duration: 8.4s; }
@keyframes tb-glitter {
    0%, 100% { transform: translate(0, 0);       opacity: 0.1; }
    50%      { transform: translate(90px, 40px); opacity: 0.65; }
}

/* ===================== THE MONSTERA ===================== */
.t-plant-leaves { transform-box: fill-box; transform-origin: center bottom; animation: tb-leaf 8s ease-in-out infinite; }
@keyframes tb-leaf { 0%, 100% { transform: rotate(-1.8deg); } 50% { transform: rotate(1.8deg); } }
.tube-plant.active .t-plant-leaves { animation: tb-rustle 0.55s ease-in-out infinite; }
@keyframes tb-rustle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
body.playing .t-plant-leaves { animation-duration: 4s; }

/* ===================== THE LAMP (click to switch it off) ===================== */
.t-lamp-glow, .t-lamp path, .t-lamp ellipse { transition: opacity 0.4s ease, fill 0.4s ease; }
.tube-lamp.active .t-lamp-glow { opacity: 0; }
.tube-lamp.active .t-lamp-fringe { opacity: 0.4; }

/* ===================== THE TEA ===================== */
.t-steam-a, .t-steam-b { transform-box: fill-box; animation: tb-steam 4.5s ease-in-out infinite; }
.t-steam-b { animation-delay: -2.2s; animation-duration: 5.4s; }
@keyframes tb-steam {
    0%   { opacity: 0;   transform: translateY(6px)   scaleY(0.7); }
    35%  { opacity: 0.6; }
    100% { opacity: 0;   transform: translateY(-22px) scaleY(1.2); }
}
.tube-cup.active .t-steam-a,
.tube-cup.active .t-steam-b { animation-duration: 1.6s; }

/* ===================== GRAB HANDLES ===================== */
.t-handle-swing {
    transform-origin: center top;
    animation: tb-handle 4.6s ease-in-out infinite;
}
.t-handle-swing.b { animation-duration: 5.4s; animation-delay: -1.2s; }
.t-handle-swing.c { animation-duration: 4s;   animation-delay: -2.4s; }
@keyframes tb-handle { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
body.playing .t-handle-swing { animation-duration: 3s; }

.tube-handle-art {
    transform-origin: center top;
    animation: tb-handle 5s ease-in-out infinite;
    transition: filter 0.3s ease;
}
.tube-handle:hover .tube-handle-art { filter: drop-shadow(0 0 7px var(--accent-glow)); }
.tube-handle.active .tube-handle-art {
    animation: tb-handle-hard 0.85s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}
@keyframes tb-handle-hard { 0%, 100% { transform: rotate(-15deg); } 50% { transform: rotate(15deg); } }

/* ===================== THE CRATE ===================== */
.t-crate-flip { transform-box: fill-box; transform-origin: left bottom; transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.32, 1.05); }
.tube-crate.active .t-crate-flip { transform: rotate(-26deg) translateY(-8px); }

/* Everything clickable lifts a little on hover, so quirks announce themselves. */
.tube-fox, .tube-sleeper, .tube-digger, .tube-pigeon, .tube-mouse,
.tube-disco, .tube-plant, .tube-lamp, .tube-cup, .tube-crate {
    transition: filter 0.3s ease;
}
.tube-fox:hover, .tube-sleeper:hover, .tube-digger:hover, .tube-pigeon:hover,
.tube-mouse:hover, .tube-disco:hover, .tube-plant:hover,
.tube-lamp:hover, .tube-cup:hover, .tube-crate:hover {
    filter: drop-shadow(0 0 9px var(--accent-glow));
}

/* ============ Pixel Text ============ */
.pixel-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    text-shadow: 2px 2px 0 var(--tunnel), 0 0 10px rgba(255, 215, 154, 0.25);
}

/* ============ Song Display — a second dot-matrix strip ============ */
.song-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: var(--panel-deep);
    border: 2px solid var(--accent);
    border-radius: 4px;
    z-index: 30;
    min-width: 200px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 0 0 1px var(--tunnel), 0 4px 0 rgba(0, 0, 0, 0.45), 0 0 15px var(--accent-glow);
    transition: all 0.3s ease;
    user-select: none;
}
.song-display .pixel-text {
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
    display: block;
    color: var(--matrix);
    text-shadow: 0 0 8px rgba(255, 174, 66, 0.6);
}
.song-display:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 0 0 1px var(--tunnel), 0 6px 0 rgba(0, 0, 0, 0.45), 0 0 25px var(--accent-glow);
}
.song-display:active { transform: translateX(-50%) translateY(-3px); }
.song-display.generating { animation: tb-generating 2s infinite; }
@keyframes tb-generating {
    0%, 100% { box-shadow: 0 0 0 1px var(--tunnel), 0 4px 0 rgba(0,0,0,0.45), 0 0 15px var(--accent-glow); }
    50%      { box-shadow: 0 0 0 1px var(--tunnel), 0 4px 0 rgba(0,0,0,0.45), 0 0 26px var(--accent); }
}

/* ============ Startup Overlay ============ */
.startup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 6, 10, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}
.startup-message {
    text-align: center;
    padding: 30px 40px;
    background: rgba(18, 15, 24, 0.92);
    border: 3px solid var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 0 2px var(--tunnel), 0 8px 0 rgba(0, 0, 0, 0.5), 0 0 30px var(--accent-glow);
}
.startup-message .pixel-text {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--matrix);
    text-shadow: 2px 2px 0 var(--tunnel), 0 0 15px rgba(255, 174, 66, 0.6);
}
.startup-dots { display: flex; justify-content: center; gap: 8px; font-size: 24px; color: var(--accent); }
.startup-dots span { animation: tb-dot 1.4s infinite; animation-delay: calc(var(--dot-index, 0) * 0.2s); }
.startup-dots span:nth-child(1) { --dot-index: 0; }
.startup-dots span:nth-child(2) { --dot-index: 1; }
.startup-dots span:nth-child(3) { --dot-index: 2; }
@keyframes tb-dot { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }

/* ============ Status Indicator ============ */
.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    background: var(--panel-bg);
    border: 2px solid var(--accent);
    border-radius: 3px;
    z-index: 30;
    box-shadow: 0 0 0 1px var(--tunnel), 0 2px 0 rgba(0, 0, 0, 0.4);
}
.status-indicator.online { border-color: var(--accent); animation: tb-status 2s infinite; }
.status-indicator.offline { border-color: var(--danger); }
@keyframes tb-status {
    0%, 100% { box-shadow: 0 0 0 1px var(--tunnel), 0 2px 0 rgba(0,0,0,0.4), 0 0 10px var(--accent-glow); }
    50%      { box-shadow: 0 0 0 1px var(--tunnel), 0 2px 0 rgba(0,0,0,0.4), 0 0 20px var(--accent); }
}

/* ============ Ripple ============ */
.ripple {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: rgba(255, 215, 154, 0.55);
    transform: scale(0);
    animation: tb-ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 100;
}
@keyframes tb-ripple { to { transform: scale(5); opacity: 0; } }

/* ============ Map button ============ */
.map-button {
    position: absolute;
    top: max(20px, env(safe-area-inset-top) + 12px);
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 12px;
    background: var(--panel-deep);
    color: var(--accent);
    border: 3px solid var(--wall-dark);
    border-radius: 6px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.06);
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    z-index: 30;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}
.map-button:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.06), 0 0 20px var(--accent-glow);
}
.map-button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.06);
}
.map-button:focus-visible { outline: 2px solid var(--text-light); outline-offset: 3px; }
.map-button-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px var(--accent-glow));
    animation: tb-needle 4s ease-in-out infinite;
    transform-origin: center;
}
@keyframes tb-needle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.map-button-label { line-height: 1; }

@media (max-width: 600px) {
    .map-button { padding: 6px 10px 6px 8px; font-size: 10px; letter-spacing: 0.16em; }
    .map-button-icon { width: 18px; height: 18px; }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .song-display {
        bottom: max(100px, env(safe-area-inset-bottom) + 85px);
        padding: 10px 16px;
        min-width: 150px;
        max-width: 90%;
    }
    .pixel-text { font-size: 12px; }
    .status-indicator { top: max(15px, env(safe-area-inset-top) + 10px); right: 15px; }
}

/* ============================================================
   News button palette — matches the map button.
   Structure + layout live in templates/_news_overlay.html.
   ============================================================ */
.news-button {
    --news-btn-bg: var(--panel-deep);
    --news-btn-fg: var(--accent);
    --news-btn-border: var(--wall-dark);
    --news-btn-hover-border: var(--accent);
    --news-btn-glow: var(--accent-glow);
    --news-btn-dot: var(--matrix);
    --news-btn-focus: var(--text-light);
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
