/* ============================================================================
   Viniro — dos temas sobre la misma estructura.

     cyber   (default) neón sobre negro: cian = señal, magenta = al aire.
     clasico           ámbar sobre gris: sobrio, tipografía de sistema.

   Todo lo que cambia entre temas vive en variables. Las reglas de abajo son
   las mismas para los dos; se leen los tokens y listo.
   ========================================================================= */

:root,
:root[data-theme="cyber"] {
    --bg: #04060b;
    --bg-layers:
        radial-gradient(900px 500px at 15% -10%, rgba(255, 43, 214, 0.10), transparent 60%),
        radial-gradient(1000px 600px at 95% 0%, rgba(0, 240, 255, 0.10), transparent 55%),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(0, 240, 255, 0.035) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 39px, rgba(0, 240, 255, 0.035) 39px 40px),
        #04060b;

    --panel: rgba(9, 14, 24, 0.86);
    --panel-solid: #0a0f1a;
    --panel-2: rgba(0, 240, 255, 0.05);
    --sunken: #03060c;

    --accent: #00f0ff;          /* señal, foco, acciones */
    --accent-dim: #0a7c8a;
    --hot: #ff2bd6;             /* al aire */
    --hot-dim: #8f1877;
    --spark: #d4ff3a;           /* aguja, cuenta regresiva, pista sonando */
    --red: #ff2e4d;
    --green: #39ff88;

    --line: rgba(0, 240, 255, 0.20);
    --line-soft: rgba(0, 240, 255, 0.09);

    --ink: #d9f7ff;
    --ink-dim: #6f8fa0;
    --ink-faint: #43606f;

    --font-ui: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
    --font-read: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

    --caps: uppercase;
    --track: 0.14em;
    --track-wide: 0.2em;

    --radius: 0px;
    --cut: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    --cut-sm: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
    --cut-block: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);

    --glow: 0 0 8px rgba(0, 240, 255, 0.55);
    --glow-hot: 0 0 10px rgba(255, 43, 214, 0.6);
    --glow-panel: inset 0 0 60px rgba(0, 240, 255, 0.06);
    --scan: 0.45;
    --accent-bar: block;

    --dial-bg:
        repeating-linear-gradient(90deg, transparent 0 23px, rgba(0, 240, 255, 0.05) 23px 24px),
        linear-gradient(180deg, #060a12, #030509);
    --dial-edge: #04070d;
}

:root[data-theme="clasico"] {
    --bg: #0c0b0f;
    --bg-layers: #0c0b0f;

    --panel: #16151b;
    --panel-solid: #16151b;
    --panel-2: #1e1d25;
    --sunken: #0f0e13;

    --accent: #ffb454;
    --accent-dim: #a3722f;
    --hot: #ff4d5e;
    --hot-dim: #8c2b34;
    --spark: #ffb454;
    --red: #ff4d5e;
    --green: #4ade80;

    --line: #2c2a35;
    --line-soft: #24222c;

    --ink: #ece9f1;
    --ink-dim: #9a95a8;
    --ink-faint: #635e70;

    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-read: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --caps: none;
    --track: 0.01em;
    --track-wide: 0.09em;

    --radius: 10px;
    --cut: none;
    --cut-sm: none;
    --cut-block: none;

    --glow: none;
    --glow-hot: none;
    --glow-panel: none;
    --scan: 0;
    --accent-bar: none;

    --dial-bg: linear-gradient(180deg, #14131a, #0e0d12);
    --dial-edge: #0e0d12;
}

:root[data-theme="infierno"] {
    --bg: #070203;
    --bg-layers:
        radial-gradient(1100px 520px at 50% -18%, rgba(224, 16, 32, 0.26), transparent 62%),
        radial-gradient(700px 500px at 8% 108%, rgba(255, 77, 24, 0.10), transparent 60%),
        radial-gradient(900px 700px at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.72) 100%),
        #070203;

    --panel: rgba(20, 6, 8, 0.90);
    --panel-solid: #140608;
    --panel-2: rgba(224, 16, 32, 0.07);
    --sunken: #0a0304;

    --accent: #e0202c;
    --accent-dim: #7a0a14;
    --hot: #ff4d18;            /* brasa: el que está al aire */
    --hot-dim: #8c2a0c;
    --spark: #f0e2c8;          /* hueso: la aguja y las cuentas regresivas */
    --red: #ff2e4d;
    --green: #7ba05b;

    --line: rgba(224, 32, 44, 0.26);
    --line-soft: rgba(224, 32, 44, 0.12);

    --ink: #ecdcd6;
    --ink-dim: #a8837a;
    --ink-faint: #6e4a44;

    /* Serif: donde cyber es una consola, esto es un grimorio. */
    --font-ui: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-read: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

    --caps: uppercase;
    --track: 0.16em;
    --track-wide: 0.26em;

    --radius: 0px;
    --cut: none;
    --cut-sm: none;
    --cut-block: none;

    --glow: 0 0 10px rgba(224, 32, 44, 0.5);
    --glow-hot: 0 0 16px rgba(255, 77, 24, 0.65);
    --glow-panel: inset 0 0 90px rgba(224, 16, 32, 0.10);
    --scan: 0;
    --accent-bar: block;

    --dial-bg:
        repeating-linear-gradient(90deg, transparent 0 47px, rgba(224, 32, 44, 0.06) 47px 48px),
        linear-gradient(180deg, #150507, #070203);
    --dial-edge: #070203;
}

/* Brasa que respira. Lento y de baja amplitud a propósito: nada de destellos
   rápidos, que además de molestar son un problema de accesibilidad. */
@keyframes ember {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.72; }
}
:root[data-theme="infierno"] .panel::before,
:root[data-theme="infierno"] .brand span { animation: ember 4.5s ease-in-out infinite; }

:root[data-theme="infierno"] .brand { letter-spacing: 0.3em; font-weight: 400; }
:root[data-theme="infierno"] h1 { font-weight: 400; }
:root[data-theme="infierno"] h2 { font-style: italic; letter-spacing: 0.2em; }
:root[data-theme="infierno"] .panel { border-top-width: 2px; }

/* La aguja arde en vez de brillar en frío. */
:root[data-theme="infierno"] .needle {
    box-shadow: 0 0 16px 3px rgba(255, 77, 24, 0.75);
}
:root[data-theme="infierno"] .dial-hour.midnight {
    color: var(--hot);
    border-left-color: var(--hot);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-read);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-layers);
}

/* Barrido de tubo: solo en cyber (en clásico la opacidad es 0). */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 90;
    background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.20) 0 1px, transparent 1px 3px);
    opacity: var(--scan);
    mix-blend-mode: multiply;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-shadow: var(--glow); text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 140px; }

/* ------------------------------------------------------------------ topbar */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;          /* sin esto la nav empuja la página y aparece scroll lateral */
    gap: 10px 16px;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}
.topbar::after {
    content: "";
    position: absolute;
    left: 20px; right: 20px; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent 70%);
    opacity: 0.5;
}

.brand {
    font-family: var(--font-ui);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: var(--track-wide);
    text-transform: var(--caps);
    color: var(--ink);
}
:root[data-theme="cyber"] .brand { text-shadow: 1px 0 var(--hot-dim), -1px 0 rgba(0, 240, 255, 0.5); }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); text-shadow: var(--glow); }

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    font-size: 12px;
    font-family: var(--font-ui);
}
.nav a, .nav button.theme {
    color: var(--ink-dim);
    padding: 7px 11px;
    font-size: 12px;
    letter-spacing: var(--track);
    text-transform: var(--caps);
    border: 1px solid transparent;
    background: none;
    clip-path: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.nav a:hover, .nav button.theme:hover {
    color: var(--accent);
    border-color: var(--line);
    background: var(--panel-2);
    text-decoration: none;
    box-shadow: none;
}
.nav a.active { color: var(--spark); border-color: var(--accent-dim); }

/* ------------------------------------------------------------------- panel */

.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    clip-path: var(--cut);
    padding: 22px;
}
.panel::before {
    content: "";
    display: var(--accent-bar);
    position: absolute;
    top: 0; left: 0;
    width: 46px; height: 2px;
    background: var(--accent);
    box-shadow: var(--glow);
}
.panel + .panel { margin-top: 16px; }

h1 {
    font-family: var(--font-ui);
    font-size: 24px;
    margin: 0 0 8px;
    letter-spacing: var(--track);
    text-transform: var(--caps);
    color: #fff;
}
:root[data-theme="cyber"] h1 { text-shadow: 2px 0 var(--hot-dim), -2px 0 var(--accent-dim); }
:root[data-theme="clasico"] h1 { font-size: 26px; letter-spacing: -0.02em; color: var(--ink); }

h2 {
    font-family: var(--font-ui);
    font-size: 12px;
    margin: 0 0 16px;
    letter-spacing: var(--track-wide);
    text-transform: var(--caps);
    color: var(--accent);
    text-shadow: var(--glow);
}
:root[data-theme="clasico"] h2 { font-size: 15px; color: var(--ink); font-weight: 600; }

.sub { color: var(--ink-dim); font-size: 13px; line-height: 1.6; margin: 0 0 22px; }

.label {
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 8px;
}

/* --------------------------------------------------------------- the dial */

.dial-shell {
    position: relative;
    background: var(--dial-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    clip-path: var(--cut);
    box-shadow: var(--glow-panel);
}

.dial { position: relative; height: 124px; overflow: hidden; }
.dial-track { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }

.dial-hour {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid var(--line-soft);
    padding: 9px 0 0 8px;
    font-family: var(--font-ui);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
    user-select: none;
}
.dial-hour.midnight { border-left-color: var(--hot); color: var(--hot); text-shadow: var(--glow-hot); }

.dial-block {
    position: absolute;
    top: 40px;
    height: 58px;
    padding: 8px 11px;
    overflow: hidden;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent-dim);
    border-radius: var(--radius);
    clip-path: var(--cut-block);
    transition: background 0.25s, border-color 0.25s;
}
.dial-block.live {
    background: color-mix(in srgb, var(--hot) 14%, transparent);
    border-color: var(--hot);
    border-left-color: var(--hot);
    box-shadow: 0 0 22px color-mix(in srgb, var(--hot) 35%, transparent);
}
.dial-block.past { opacity: 0.3; }

.dial-block b {
    display: block;
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: var(--caps);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dial-block.live b { color: #fff; text-shadow: var(--glow-hot); }
.dial-block i { font-style: normal; font-family: var(--font-ui); font-size: 10.5px; color: var(--ink-dim); }

.needle {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--spark);
    box-shadow: 0 0 14px 2px color-mix(in srgb, var(--spark) 70%, transparent);
    z-index: 3;
    pointer-events: none;
}
.needle::before {
    content: "";
    position: absolute;
    top: 0; left: -5px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--spark);
}

.dial-fade { position: absolute; top: 0; width: 64px; height: 100%; z-index: 2; pointer-events: none; }
.dial-fade.left { left: 0; background: linear-gradient(90deg, var(--dial-edge), transparent); }
.dial-fade.right { right: 0; background: linear-gradient(270deg, var(--dial-edge), transparent); }

/* --------------------------------------------------------------- now bar */

.now { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-top: 1px solid var(--line-soft); }

.onair {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 10px;
    letter-spacing: var(--track-wide);
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink-faint);
    white-space: nowrap;
}
.onair .dot { width: 7px; height: 7px; border-radius: var(--radius); background: var(--ink-faint); }
.onair.live {
    color: var(--hot);
    border-color: var(--hot);
    text-shadow: var(--glow-hot);
}
.onair.live .dot { background: var(--hot); box-shadow: var(--glow-hot); animation: blink 1.4s infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

.now-meta { flex: 1; min-width: 0; }
.now-title {
    font-family: var(--font-ui);
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: var(--caps);
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
:root[data-theme="clasico"] .now-title { color: var(--ink); font-weight: 600; letter-spacing: 0; }

.now-sub {
    font-size: 12px;
    color: var(--ink-dim);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.now-sub .track { color: var(--spark); }
.now-sub b.count {
    font-family: var(--font-ui);
    color: var(--spark);
    font-weight: 600;
    letter-spacing: 0.06em;
}
.now-sub a { border-bottom: 1px dashed var(--accent); }

.listeners { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); white-space: nowrap; }

/* -------------------------------------------------------------- controls */

button {
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: var(--track);
    text-transform: var(--caps);
    cursor: pointer;
    padding: 11px 18px;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius);
    clip-path: var(--cut-sm);
    transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
button:hover:not(:disabled) {
    color: #fff;
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}
button:disabled { opacity: 0.3; cursor: not-allowed; }

button.primary {
    color: #02131a;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: var(--glow);
}
button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 75%, #fff); color: #02131a; }

button.danger {
    color: #fff;
    background: var(--hot);
    border-color: var(--hot);
    font-weight: 700;
    box-shadow: var(--glow-hot);
}
button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--hot) 78%, #fff); }

button.ghost { color: var(--ink-dim); border-color: var(--line); }
button.ghost:hover:not(:disabled) { color: var(--accent); }
button.small { padding: 7px 12px; font-size: 11px; }

.tune {
    width: 76px; height: 76px;
    padding: 0;
    font-size: 20px;
    border-radius: 50%;
    clip-path: none;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

input[type="text"], input[type="password"], input[type="datetime-local"],
input[type="number"], textarea, select {
    width: 100%;
    background: var(--sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    padding: 11px 13px;
    font-family: inherit;
    font-size: 13px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: var(--ink-faint); }
textarea { resize: vertical; min-height: 76px; }
input[type="file"] { color: var(--ink-dim); font-size: 12px; }

.field { margin-bottom: 18px; }

input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 3px;
    border-radius: var(--radius);
    background: var(--accent-dim);
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: var(--glow);
    cursor: pointer;
}

/* ----------------------------------------------------------------- notes */

.note {
    padding: 12px 15px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 16px;
    border-left: 3px solid;
    border-radius: var(--radius);
}
.note.err { background: color-mix(in srgb, var(--red) 10%, transparent); color: color-mix(in srgb, var(--red) 60%, #fff); border-color: var(--red); }
.note.ok { background: color-mix(in srgb, var(--green) 8%, transparent); color: var(--green); border-color: var(--green); }
.note.info { background: var(--panel-2); color: var(--ink-dim); border-color: var(--accent-dim); }
.note.hidden { display: none; }

.empty {
    font-family: var(--font-ui);
    color: var(--ink-faint);
    font-size: 12px;
    letter-spacing: var(--track);
    text-transform: var(--caps);
    text-align: center;
    padding: 28px 0;
}

/* -------------------------------------------------------------- playlist */

.deck { background: var(--sunken); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; }

.deck-now { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.deck-title { flex: 1; min-width: 0; font-size: 13px; color: var(--spark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-time { font-family: var(--font-ui); font-size: 11px; color: var(--ink-dim); }

.bar { height: 3px; border-radius: var(--radius); background: var(--line); overflow: hidden; margin-bottom: 16px; }
.bar > div { height: 100%; width: 0; background: var(--accent); box-shadow: var(--glow); }

.tracks { list-style: none; margin: 16px 0 0; padding: 0; max-height: 210px; overflow-y: auto; }
.tracks li {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 11px;
    font-size: 12.5px;
    cursor: pointer;
    border-left: 2px solid transparent;
    border-radius: var(--radius);
}
.tracks li:hover { background: var(--panel-2); border-left-color: var(--accent-dim); }
.tracks li.playing { background: color-mix(in srgb, var(--hot) 10%, transparent); border-left-color: var(--hot); color: #fff; }
.tracks li .n { font-family: var(--font-ui); font-size: 10px; color: var(--ink-faint); width: 22px; flex-shrink: 0; }
.tracks li .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------- vu meter */

.vu { display: flex; gap: 3px; height: 24px; align-items: flex-end; }
.vu i { display: block; width: 4px; height: 100%; border-radius: var(--radius); background: var(--line); transition: background 0.06s; }
.vu i.on { background: var(--green); }
.vu i.hot { background: var(--spark); }
.vu i.peak { background: var(--red); }

/* ---------------------------------------------------------------- lists */

.blocklist { list-style: none; margin: 0; padding: 0; }
.blocklist li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.blocklist li:last-child { border-bottom: none; }
.blocklist .when { font-family: var(--font-ui); font-size: 11.5px; color: var(--accent); width: 148px; flex-shrink: 0; }
.blocklist .what { flex: 1; min-width: 0; }
.blocklist .what b { display: block; font-size: 13px; letter-spacing: 0.05em; text-transform: var(--caps); }
.blocklist .what span { font-size: 12px; color: var(--ink-faint); }

.tag {
    font-family: var(--font-ui);
    font-size: 9.5px;
    letter-spacing: var(--track-wide);
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink-faint);
    white-space: nowrap;
}
.tag.live { border-color: var(--hot); color: var(--hot); text-shadow: var(--glow-hot); }

/* ------------------------------------------------------------------ chat */

.chat-dock {
    position: fixed;
    right: 20px;
    bottom: 0;
    width: 340px;
    max-width: calc(100vw - 40px);
    z-index: 80;
    display: flex;
    flex-direction: column;
    font-size: 12.5px;
}

/* En la radio el chat no flota: va en el flujo, debajo del dial. */
.chat-dock.inline {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 16px;
}
.chat-dock.inline .chat-tab { clip-path: var(--cut); }
.chat-dock.inline .chat-body { border-bottom: 1px solid var(--line); height: 280px; }

.chat-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 15px;
    clip-path: var(--cut-sm);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-bottom: none;
    color: var(--accent);
}
.chat-tab:hover:not(:disabled) { background: var(--panel-2); box-shadow: none; }
.chat-tab-label { flex: 1; text-align: left; letter-spacing: var(--track-wide); }
.chat-caret { font-size: 10px; transition: transform 0.2s; }
.chat-dock.open .chat-caret { transform: rotate(180deg); }

.chat-badge {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #12000d;
    background: var(--hot);
    box-shadow: var(--glow-hot);
    animation: blink 1.6s infinite;
}
:root[data-theme="clasico"] .chat-badge { color: #fff; border-radius: 100px; animation: none; }

.chat-dock.alert .chat-tab { border-color: var(--hot); color: var(--hot); }

.chat-body {
    display: none;
    flex-direction: column;
    height: 340px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-bottom: none;
}
.chat-dock.open .chat-body { display: flex; }

.chat-log {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.chat-msg { line-height: 1.45; word-break: break-word; }
.chat-who { font-family: var(--font-ui); color: var(--accent); margin-right: 7px; }
.chat-msg.me .chat-who { color: var(--spark); }
.chat-msg.host .chat-who { color: var(--hot); text-shadow: var(--glow-hot); }
.chat-msg.host .chat-who::after { content: " [AL AIRE]"; font-size: 9px; letter-spacing: 0.1em; }
.chat-msg.system {
    color: var(--ink-faint);
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: var(--caps);
    border-left: 2px solid var(--accent-dim);
    padding-left: 8px;
}
.chat-text { color: var(--ink); }
.chat-msg.system .chat-text { color: var(--ink-faint); }

.chat-compose { display: flex; border-top: 1px solid var(--line-soft); }
.chat-input { border: none; border-radius: 0; background: var(--sunken); padding: 12px 13px; font-size: 12.5px; }
.chat-input:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
.chat-send { clip-path: none; border-radius: 0; border: none; border-left: 1px solid var(--line-soft); padding: 0 18px; }

.chat-log::-webkit-scrollbar, .tracks::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-track, .tracks::-webkit-scrollbar-track { background: var(--sunken); }
.chat-log::-webkit-scrollbar-thumb, .tracks::-webkit-scrollbar-thumb { background: var(--accent-dim); }

@media (max-width: 700px) {
    .now { flex-wrap: wrap; }
    .blocklist .when { width: 100%; }
    .blocklist li { flex-wrap: wrap; gap: 8px; }
    .chat-dock { right: 0; left: 0; width: auto; max-width: none; }
    .wrap { padding-bottom: 120px; }
}
