:root {
    --case-color: #2c3e50;
    --case-shadow: #1a252f;
    --panel-dark: #222;
    --text-color: #bdc3c7;
    --accent-orange: #d35400;
    --led-red: #ff3333;
    --led-green: #00ff00;
    --led-amber: #ffb300;
}

@font-face {
    font-family: 'Edu TAS Beginner';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/edu-tas-beginner.woff2') format('woff2');
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #1a1a1a;
    color: var(--text-color);
    font-family: 'Lexend Mega', monospace;
}

body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
}

/* ==================== Unified console (brushed black metal) ==================== */

.console {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 1.25rem 1.25rem 1.5rem;
    border-radius: 12px;
    border-bottom: 6px solid #0a0a0a;
    color: var(--text-color);
    background-color: #1a1a1a;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 50%, #0e0e0e 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6),
        inset 2px 2px 5px rgba(255, 255, 255, 0.04),
        inset -3px -3px 8px rgba(0, 0, 0, 0.6),
        0 18px 40px rgba(0, 0, 0, 0.85);
}

.console::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/img/brushed-metal.jpg') center/cover no-repeat;
    opacity: 0.4;
    pointer-events: none;
    border-radius: inherit;
}

.console-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.5rem 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.console-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    min-height: 0;
}

.bay {
    background:
        linear-gradient(180deg, #0e0e0e 0%, #161616 100%);
    border-radius: 8px;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.85),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03),
        0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.strip-bay {
    flex: 0 0 110px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 10px;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.host-bay {
    flex: 1 1 390px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 8px;
}

.cassette-bay {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 10px;
}

.rack-bay {
    margin-top: 1rem;
    padding: 10px;
}

.screw {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #7f8c8d 10%, #2c3e50 90%);
    border-radius: 50%;
    position: absolute;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.screw.tl { top: 10px; left: 10px; }
.screw.tr { top: 10px; right: 10px; }
.screw.bl { bottom: 14px; left: 10px; }
.screw.br { bottom: 14px; right: 10px; }

/* ==================== Top bar: brand + ON AIR sign ==================== */

.player-brand {
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.18em;
    margin: 0;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.player-brand .brand-tri {
    display: inline-block;
    transform: translateY(-1px) scale(0.7);
    margin: 0 0.05em;
    color: #ecf0f1;
}

.on-air-sign {
    position: relative;
    width: max-content;
    padding: 0.4rem 1.1rem 0.35rem;
    background: linear-gradient(180deg, #1a0606 0%, #2a0a0a 50%, #1a0606 100%);
    border: 2px solid #1a0606;
    border-radius: 5px;
    box-shadow:
        inset 0 1px 0 rgba(255, 80, 80, 0.25),
        inset 0 -2px 6px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(255, 50, 50, 0.55),
        0 0 22px rgba(255, 50, 50, 0.25);
}

.on-air-sign::before,
.on-air-sign::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 30% 30%, #d0d0d0, #555);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.7);
}
.on-air-sign::before { left: 6px; }
.on-air-sign::after  { right: 6px; }

.on-air-text {
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: #ff5555;
    text-shadow:
        0 0 3px rgba(255, 80, 80, 0.9),
        0 0 8px rgba(255, 40, 40, 0.7),
        0 0 16px rgba(255, 0, 0, 0.5);
    animation: on-air-pulse 2.4s ease-in-out infinite;
}

@keyframes on-air-pulse {
    0%, 100% { opacity: 0.9; }
    50%      { opacity: 1; }
}

/* ==================== Host panel (CRT drawer from top) ==================== */

.host-panel-toggle {
    width: 28px;
    height: 28px;
    margin-left: auto;
    margin-right: 0.5rem;
    border: 1px solid rgba(127, 255, 154, 0.55);
    border-radius: 4px;
    background: rgba(0, 30, 12, 0.55);
    color: rgba(127, 255, 154, 0.9);
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 6px rgba(0, 255, 0, 0.25);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

body.is-host .host-panel-toggle {
    display: inline-flex;
}

.host-panel-toggle:hover {
    background: rgba(0, 60, 24, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 10px rgba(0, 255, 0, 0.45);
}

.host-panel-toggle[aria-expanded="true"] {
    background: rgba(127, 255, 154, 0.85);
    color: #062;
    text-shadow: none;
}

.host-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 1.25rem;
    padding: 0.85rem 1rem 1rem;
    border-radius: 0 0 8px 8px;
    background:
        radial-gradient(ellipse at center, #0a1a0a 0%, #050a05 70%, #000 100%);
    color: rgba(127, 255, 154, 0.92);
    box-shadow:
        inset 0 0 22px rgba(0, 0, 0, 0.95),
        inset 0 0 4px rgba(0, 255, 0, 0.15),
        0 8px 22px rgba(0, 0, 0, 0.7);
    transform: translateY(-100%);
    transition: transform 250ms ease;
    z-index: 30;
    overflow: hidden;
}

.host-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.18) 0,
        rgba(0, 0, 0, 0.18) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}

body.host-panel-open .host-panel {
    transform: translateY(0);
}

.host-panel[hidden] {
    display: block;
}

.host-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 1;
}

.host-panel-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.32em;
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.55);
}

.host-panel-close {
    background: transparent;
    border: 1px solid rgba(127, 255, 154, 0.4);
    color: rgba(127, 255, 154, 0.9);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.4);
}

.host-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
    max-height: 50vh;
    overflow-y: auto;
}

.host-panel-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px 8px;
    border: 1px solid rgba(127, 255, 154, 0.18);
    border-radius: 4px;
    background: rgba(0, 60, 24, 0.18);
}

.host-panel-row.is-host {
    border-color: rgba(127, 255, 154, 0.45);
    background: rgba(0, 80, 32, 0.28);
}

.host-panel-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.4) brightness(0.9);
    border: 1px solid rgba(127, 255, 154, 0.35);
    flex-shrink: 0;
}

.host-panel-name {
    flex: 1;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.host-panel-action {
    background: transparent;
    border: 1px solid rgba(127, 255, 154, 0.55);
    color: rgba(127, 255, 154, 0.9);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
    flex-shrink: 0;
}

.host-panel-action:hover {
    background: rgba(127, 255, 154, 0.15);
}

.host-panel-action.danger {
    border-color: rgba(255, 80, 80, 0.7);
    color: rgba(255, 130, 130, 0.95);
    text-shadow: 0 0 3px rgba(255, 50, 50, 0.5);
}

.host-panel-action.danger:hover {
    background: rgba(255, 50, 50, 0.18);
}

.host-panel-action[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.host-panel-empty {
    text-align: center;
    padding: 1.2rem 0 0.4rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: rgba(127, 255, 154, 0.6);
    position: relative;
    z-index: 1;
}

/* ==================== Host CRT frames (4:3, pulsing STANDBY) ==================== */

.host-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, #181818 0%, #0a0a0a 100%);
    border-radius: 10px;
    padding: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -2px 6px rgba(0, 0, 0, 0.6),
        0 4px 10px rgba(0, 0, 0, 0.5);
}

.host-screen {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, #0a1a0a 0%, #050a05 70%, #000 100%);
    border-radius: 10px / 14px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 22px rgba(0, 0, 0, 0.95),
        inset 0 0 4px rgba(0, 255, 0, 0.15);
}

.host-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.18) 0,
        rgba(0, 0, 0, 0.18) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}

.host-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0) 35%,
        rgba(255, 255, 255, 0) 65%,
        rgba(255, 255, 255, 0.04) 100%
    );
    pointer-events: none;
}

.host-standby {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.05rem;
    letter-spacing: 0.4em;
    color: rgba(127, 255, 154, 0.85);
    text-shadow:
        0 0 6px rgba(0, 255, 0, 0.6),
        0 0 14px rgba(0, 255, 0, 0.35);
    animation: host-standby-pulse 1.6s ease-in-out infinite;
    z-index: 2;
}

.host-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.4) brightness(0.85);
    z-index: 3;
}

.host-screen.has-avatar .host-standby {
    display: none;
}

.host-screen.has-avatar::before,
.host-screen.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #00ff66;
    mix-blend-mode: multiply;
    z-index: 4;
    pointer-events: none;
}

.host-screen-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(127, 255, 154, 0.95);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    text-shadow:
        0 0 4px rgba(0, 255, 0, 0.6),
        0 0 10px rgba(0, 255, 0, 0.3);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    z-index: 5;
}

/* ===========================================================
   Host frame: image + canvas + mode picker
   =========================================================== */

.host-display-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    background: #000;
}

.host-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: transparent;
    display: block;
}

.host-screen.has-canvas .host-standby,
.host-screen.has-image  .host-standby {
    display: none;
}

.host-screen.has-canvas::before {
    /* Reactive canvases render their own colors — drop the multiply tint. */
    display: none;
}

/* Upload trigger — tiny phosphor-green pip in the top-right corner of the host's
   own screen. Visible to the host themselves only. */
.host-upload-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 6;
    width: 22px;
    height: 22px;
    line-height: 18px;
    text-align: center;
    padding: 0;
    border: 1px solid rgba(127, 255, 154, 0.7);
    background: rgba(0, 30, 12, 0.65);
    color: rgba(127, 255, 154, 0.95);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 6px rgba(0, 255, 0, 0.25);
    transition: background 0.15s ease;
}

.host-upload-btn:hover {
    background: rgba(0, 60, 24, 0.8);
}

/* Mode picker — small phosphor-green button row across the bottom of the
   host's own screen. The screen-bar (display name) sits below at z-index 5;
   we sit at z-index 6 just above the bar but inside the same screen, with a
   little breathing room from the top of the bar. */
.host-mode-picker {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 22px;
    z-index: 6;
    display: flex;
    gap: 3px;
    justify-content: center;
    pointer-events: auto;
}

.host-mode-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 3px 0;
    border: 1px solid rgba(127, 255, 154, 0.55);
    background: rgba(0, 20, 8, 0.55);
    color: rgba(127, 255, 154, 0.85);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    border-radius: 2px;
    cursor: pointer;
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.45);
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.host-mode-btn:hover:not(:disabled) {
    background: rgba(0, 50, 20, 0.7);
    color: rgba(160, 255, 180, 1);
}

.host-mode-btn.selected {
    border-color: rgba(255, 220, 130, 0.95);
    color: rgba(255, 230, 160, 1);
    background: rgba(40, 30, 0, 0.65);
    text-shadow:
        0 0 3px rgba(255, 200, 80, 0.7),
        0 0 8px rgba(255, 180, 60, 0.4);
    box-shadow: 0 0 6px rgba(255, 200, 80, 0.35);
}

.host-mode-btn:disabled,
.host-mode-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@keyframes host-standby-pulse {
    0%, 100% { opacity: 0.55; text-shadow: 0 0 4px rgba(0, 255, 0, 0.45); }
    50%      { opacity: 1;    text-shadow: 0 0 10px rgba(0, 255, 0, 0.85), 0 0 20px rgba(0, 255, 0, 0.5); }
}

.host-nameplate {
    text-align: center;
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #95a5a6;
    text-transform: uppercase;
    padding: 4px 0 2px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 4px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

/* ==================== Transport panel (B88-style chunky keys) ==================== */

.transport-panel {
    background: #232d36;
    padding: 10px 14px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 2px solid #333;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.4);
}

.transport-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.tape-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tape-counter-display {
    background: #9cad80;
    color: #222;
    font-family: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 6px 12px;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid #555;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5);
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    min-width: 86px;
}

.tape-counter-label {
    font-family: 'Aldrich', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    font-weight: 700;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.transport-keys {
    display: flex;
    gap: 5px;
}

.np-scrub {
    width: 100%;
    accent-color: var(--led-amber);
    margin: 0;
}

.transport-key {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 2px;
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: #1c1c1c;
    letter-spacing: 0.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 5px;
    cursor: pointer;
    box-shadow: 0 5px 0 #000, 0 8px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    position: relative;
}

.transport-key:active,
.transport-key.active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #000, inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.transport-key:disabled {
    cursor: not-allowed;
    filter: grayscale(0.6) brightness(0.7);
}

.transport-key:disabled:active {
    transform: none;
    box-shadow: 0 5px 0 #000, 0 8px 5px rgba(0, 0, 0, 0.5);
}

.transport-key .key-glyph {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 4px;
    color: #1c1c1c;
}

.transport-key .key-label {
    font-size: 9px;
}

.key-stop  { background: #95a5a6; }
.key-stop:active,
.key-stop.active { background: #7f8c8d; }

.key-play  { background: #2ecc71; }
.key-play:active,
.key-play.active { background: #27ae60; }

.key-pause { background: #f39c12; }
.key-pause:active,
.key-pause.active { background: #d68910; }

/* ==================== Drop overlay ==================== */

.drop-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 0, 0.1);
    border: 4px dashed var(--led-green);
    color: var(--led-green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    letter-spacing: 0.2em;
    pointer-events: none;
    z-index: 10;
}

body.dragging .drop-overlay {
    display: flex;
}

/* ==================== Now-playing (cassette frame) ==================== */

.now-playing {
    background: var(--panel-dark);
    padding: 0.6rem 0.75rem 0.75rem;
    text-align: left;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

@keyframes cassette-spin {
    to { transform: rotate(360deg); }
}

.cassette-frame {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0 0.5rem;
    position: relative;
}

.cassette-lens {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: #925527;
    mix-blend-mode: multiply;
    opacity: 0.5;
    z-index: 10;
}

.cassette-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 11;
    background:
        linear-gradient(135deg, rgba(255, 240, 220, 0.22) 0%, rgba(255, 240, 220, 0) 38%, rgba(255, 240, 220, 0) 62%, rgba(0, 0, 0, 0.22) 100%),
        radial-gradient(ellipse at 28% 18%, rgba(255, 240, 220, 0.28) 0%, rgba(255, 240, 220, 0) 55%),
        radial-gradient(ellipse at 72% 82%, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 55%);
    box-shadow:
        inset 0 1px 0 rgba(255, 240, 220, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.cassette-track-text {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    z-index: 6;
    font-family: 'Edu TAS Beginner', 'Share Tech Mono', monospace;
    font-size: 5cqw;
    font-weight: 600;
    color: #1a130c;
    text-align: center;
    pointer-events: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding-top: 4.4cqw;
}

.cassette-body {
    width: 100%;
    max-width: 272px;
    aspect-ratio: 300 / 179;
    background: #111;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    container-type: inline-size;
}

.cassette-inset {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 54%;
    background: #eee;
    border-radius: 1.25cqw;
    z-index: 2;
    box-shadow: inset 0 0 1.6cqw rgba(0, 0, 0, 0.2);
}

.cassette-label {
    position: absolute;
    top: 1.9cqw;
    left: 3.1cqw;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 900;
    font-size: 2.5cqw;
    letter-spacing: 0.3cqw;
    color: #333;
    z-index: 5;
}

.cassette-window {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 26%;
    background: #222;
    border-radius: 6.25cqw;
    border: 0.6cqw solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 4;
}

.cassette-spool {
    width: 13.1cqw;
    height: 13.1cqw;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cassette-spool::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(#4a3b32 60%, transparent 61%);
    z-index: 0;
}

.cassette-spool-gear {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    mask: radial-gradient(transparent 50%, black 52%);
    -webkit-mask: radial-gradient(transparent 50%, black 52%);
    background: repeating-conic-gradient(#ffffff 0deg 10deg, #222222 10deg 60deg);
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}

.now-playing.playing .cassette-spool {
    animation: cassette-spin 2s linear infinite;
}

.cassette-trapezoid {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 73%;
    height: 28%;
    background: #1a1a1a;
    z-index: 3;
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0% 100%);
    border-top: 1px solid #333;
}

.cassette-trapezoid::after {
    content: '';
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 33%;
    background: #000;
    border-radius: 0.6cqw;
}


/* ==================== Channel strip internals (HI/LO knobs, fader, VU, mute) ==================== */

.strip-knob-bay {
    background: #1a1a1a;
    border-radius: 4px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.7),
        0 1px 0 rgba(255, 255, 255, 0.04);
}

.strip-knob {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.knob-dial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #4a4a4a 0%, #2a2a2a 50%, #161616 100%);
    border: 1px solid #555;
    position: relative;
    cursor: ns-resize;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.6);
    touch-action: none;
}

.knob-indicator {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 12px;
    margin-left: -1px;
    background: var(--accent-orange);
    border-radius: 1px;
    transform-origin: 50% 16px;
    box-shadow: 0 0 3px rgba(211, 84, 0, 0.7);
}

.knob-label {
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: #95a5a6;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.strip-fader-bay {
    flex: 1 1 0;
    min-height: 0;
    background: #1a1a1a;
    border-radius: 4px;
    padding: 12px 6px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.7),
        0 1px 0 rgba(255, 255, 255, 0.04);
}

.strip-fader {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 28px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    flex-shrink: 1;
    background: transparent;
    cursor: ns-resize;
    margin: 0;
}

.strip-fader::-webkit-slider-runnable-track {
    width: 6px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 3px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
}

.strip-fader::-moz-range-track {
    width: 6px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 3px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
}

.strip-fader::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 12px;
    background: linear-gradient(to bottom, #ecf0f1 0%, #bdc3c7 100%);
    border: 1px solid #7f8c8d;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    cursor: ns-resize;
}

.strip-fader::-moz-range-thumb {
    width: 22px;
    height: 12px;
    background: linear-gradient(to bottom, #ecf0f1 0%, #bdc3c7 100%);
    border: 1px solid #7f8c8d;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    cursor: ns-resize;
}

.vu-meter {
    display: flex;
    flex-direction: column;
    gap: 1px;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    background: #000;
    border-radius: 2px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.9);
    flex: 0 0 auto;
    min-height: 0;
}

.vu-seg {
    width: 8px;
    flex: 1 1 0;
    min-height: 4px;
    max-height: 12px;
    background: #181818;
    border-radius: 1px;
}

.vu-seg.seg-g { background: #134613; }
.vu-seg.seg-a { background: #664d00; }
.vu-seg.seg-r { background: #521515; }

.vu-seg.lit-g { background: #00ff00; box-shadow: 0 0 3px #00ff00; }
.vu-seg.lit-a { background: #ffb300; box-shadow: 0 0 3px #ffb300; }
.vu-seg.lit-r { background: #ff3333; box-shadow: 0 0 4px #ff3333; }

.strip-mute {
    width: 56px;
    height: 28px;
    align-self: center;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 7px;
    background:
        radial-gradient(ellipse at 32% 25%, #ffffff 0%, #f4f4f4 40%, #d8d8d8 100%);
    color: #555;
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.18),
        0 3px 6px rgba(0, 0, 0, 0.45);
    transition: transform 0.1s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.strip-mute::before {
    content: '';
    position: absolute;
    top: 6%;
    left: 12%;
    right: 12%;
    height: 38%;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.strip-mute > * {
    position: relative;
    z-index: 1;
}

.strip-mute:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 2px 6px rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.4);
}

.strip-mute.muted {
    color: #ff1f1f;
    text-shadow: 0 0 4px rgba(255, 51, 51, 0.6);
    box-shadow:
        inset 0 0 14px rgba(255, 30, 30, 0.85),
        inset 0 0 28px rgba(255, 60, 60, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.18),
        0 3px 6px rgba(0, 0, 0, 0.45),
        0 0 18px rgba(255, 40, 40, 0.55);
}

/* ==================== Bottom tape rack (columns of 4) ==================== */

.tape-rack {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    background-color: #4a2f15;
    background-image: url('/img/wood-frame.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow:
        inset 0 0 8px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.tape-feed {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, 45px);
    /* Five columns visible at once; everything past that scrolls horizontally. */
    grid-auto-columns: calc((100% - 8px - 4 * 6px) / 5);
    gap: 6px;
    padding: 4px;
    background: #000;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
    overflow-x: auto;
    overflow-y: hidden;
}

/* ==================== Cassette spine ==================== */

.tape-spine {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid transparent;
    background-image:
        linear-gradient(
            115deg,
            transparent 35%,
            rgba(255, 255, 255, 0.30) 47%,
            rgba(255, 255, 255, 0.45) 50%,
            rgba(255, 255, 255, 0.30) 53%,
            transparent 65%
        ),
        linear-gradient(to bottom, #e6dcbc 0%, #c9b894 50%, #b09778 100%),
        linear-gradient(to bottom, #c8c8c8 0%, #555 100%);
    background-origin: padding-box, padding-box, border-box;
    background-clip: padding-box, padding-box, border-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    cursor: pointer;
    color: inherit;
    font-family: 'Share Tech Mono', monospace;
    text-align: left;
    transition: transform 120ms ease;
    overflow: hidden;
}

.tape-spine:hover {
    transform: translateX(-2px);
}

.tape-spine.queued {
    box-shadow:
        inset 3px 0 0 var(--accent-orange),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.5);
    padding-left: 12px;
}

.tape-spine-badge {
    flex-shrink: 0;
    color: var(--accent-orange);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    margin-right: 0.5rem;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.tape-spine-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.tape-spine-title {
    color: #2a1a08;
    font-family: 'Edu TAS Beginner', 'Bradley Hand', cursive;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tape-spine-actions {
    display: flex;
    gap: 0.2rem;
    flex-shrink: 0;
    margin-left: 0.4rem;
    opacity: 0;
    transition: opacity 120ms ease;
}

.tape-spine:hover .tape-spine-actions,
body.is-mobile .tape-spine-actions {
    opacity: 1;
}

.tape-spine-btn {
    background: transparent;
    color: var(--led-amber);
    border: 1px solid var(--led-amber);
    padding: 0.1rem 0.4rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    cursor: pointer;
    border-radius: 2px;
}

.tape-spine-btn:hover {
    background: var(--led-amber);
    color: var(--panel-dark);
}

.tape-spine-btn.confirming {
    background: #b00020;
    color: #fff;
    border-color: #ff4d4d;
    box-shadow: 0 0 6px rgba(255, 60, 60, 0.6);
}

.tape-spine-btn.danger {
    color: var(--led-red);
    border-color: var(--led-red);
}

.tape-spine-btn.danger:hover {
    background: var(--led-red);
    color: var(--panel-dark);
}

.tape-spine-type {
    position: absolute;
    right: 6px;
    bottom: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    color: #5a3818;
    letter-spacing: 0.15em;
    opacity: 0.7;
    pointer-events: none;
}

.tape-spine.blank {
    background-image:
        linear-gradient(
            115deg,
            transparent 35%,
            rgba(255, 255, 255, 0.10) 47%,
            rgba(255, 255, 255, 0.18) 50%,
            rgba(255, 255, 255, 0.10) 53%,
            transparent 65%
        ),
        linear-gradient(to bottom, #3a3a3a 0%, #1c1c1c 100%),
        linear-gradient(to bottom, #c8c8c8 0%, #555 100%);
    background-origin: padding-box, padding-box, border-box;
    background-clip: padding-box, padding-box, border-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    justify-content: center;
}

.tape-spine.blank:hover {
    transform: translateX(-1px);
    filter: brightness(1.15);
}

.tape-spine-blank-label {
    font-family: 'Aldrich', 'Lexend Peta', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #ececec;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* ==================== Mobile reflow (< 900 px) ==================== */

@media (max-width: 899px) {
    body {
        padding: 1rem 0.75rem;
    }
    .console {
        padding: 1rem 0.85rem 1.25rem;
    }
    .console-row {
        flex-direction: column;
        gap: 0.6rem;
    }
    .strip-bay,
    .host-bay,
    .cassette-bay {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
    }
    .strip-bay  { order: 1; }
    .host-bay   { order: 2; }
    .cassette-bay { order: 3; }
    .strip-bay {
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
        padding: 10px;
    }
    .strip-knob-bay {
        flex-direction: row;
        gap: 12px;
        flex: 0 0 auto;
        padding: 8px 10px;
    }
    .strip-fader-bay {
        flex: 1 1 auto;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 8px;
        gap: 4px;
    }
    .strip-fader {
        -webkit-appearance: auto;
        appearance: auto;
        writing-mode: horizontal-tb;
        direction: ltr;
        width: 100%;
        height: 24px;
        max-height: none;
        cursor: ew-resize;
    }
    .vu-meter {
        flex-direction: row-reverse;
        width: 100%;
        height: 18px;
    }
    .vu-seg {
        width: auto;
        height: 100%;
        flex: 1 1 0;
        min-height: 0;
        max-height: none;
    }
    .host-bay {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    .host-screen {
        min-height: 240px;
    }
    .tape-feed {
        grid-auto-flow: row;
        grid-template-rows: none;
        grid-template-columns: 1fr;
        grid-auto-columns: auto;
        grid-auto-rows: 42px;
        max-height: 60vh;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .on-air-text {
        font-size: 0.85rem;
        letter-spacing: 0.28em;
    }
    .transport-key {
        width: 46px;
        height: 46px;
    }
    .transport-key .key-glyph {
        font-size: 16px;
    }
    body.is-mobile .tape-spine:hover {
        transform: none;
    }
    body.is-mobile .drop-overlay {
        display: none !important;
    }
}

/* ==================== Connect overlay (FM tuner) ==================== */

.connect-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 50;
    transition: opacity 350ms ease;
}

body.connecting .console {
    filter: brightness(0.45) saturate(0.7);
    pointer-events: none;
}

body.joined .connect-overlay {
    opacity: 0;
    pointer-events: none;
}

.tuner-card {
    width: 100%;
    max-width: 380px;
    margin: 0 1rem;
    padding: 1.25rem 1rem 1rem;
    border-radius: 8px;
    background:
        linear-gradient(to bottom, #d8d8d8 0%, #aaa 50%, #888 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 12px 32px rgba(0, 0, 0, 0.7);
    position: relative;
}

.tuner-card::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.tuner-strip {
    position: relative;
    height: 64px;
    border-radius: 4px;
    background:
        radial-gradient(ellipse at center, #f0e6c4 0%, #d4c39a 60%, #a8927a 100%);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.4);
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.tuner-strip::before {
    content: '';
    position: absolute;
    left: 2%;
    right: 2%;
    top: 50%;
    height: 14px;
    transform: translateY(-50%);
    background-image:
        linear-gradient(to right,
            #2a1c08 0,
            #2a1c08 1px,
            transparent 1px,
            transparent 5%);
    background-size: 5% 14px;
    background-repeat: repeat-x;
    pointer-events: none;
    opacity: 0.6;
}

.tuner-scale {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tuner-num {
    position: absolute;
    top: 6px;
    transform: translateX(-50%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #2a1c08;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.tuner-needle {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: 2px;
    left: 2%;
    background: #cc2222;
    box-shadow:
        0 0 4px rgba(204, 34, 34, 0.7),
        0 0 1px #fff;
    border-radius: 1px;
    animation: tuner-scan 1.5s ease-out forwards;
}

.tuner-needle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -4px;
    width: 10px;
    height: 6px;
    background: #cc2222;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(204, 34, 34, 0.6);
}

@keyframes tuner-scan {
    from { left: 2%; }
    to   { left: 50%; }
}

@keyframes tuner-strip-flash {
    0%   { filter: brightness(1); }
    40%  { filter: brightness(1.6); }
    100% { filter: brightness(1); }
}

body.tuned-in .tuner-strip {
    animation: tuner-strip-flash 350ms ease-out 1;
}

.tuner-status {
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tuner-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    color: var(--led-amber);
    letter-spacing: 0.25em;
    text-shadow: 0 0 6px rgba(255, 179, 0, 0.5);
}

.tuner-text.error {
    color: var(--led-red);
    text-shadow: 0 0 6px rgba(255, 51, 51, 0.5);
    letter-spacing: 0.1em;
}

.tuner-dots::after {
    content: '\00a0';
    display: inline-block;
    width: 1.6em;
    text-align: left;
    animation: tuner-dots 1.4s steps(4, end) infinite;
}

@keyframes tuner-dots {
    0%   { content: '\00a0'; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: '\00a0'; }
}

.tuner-join {
    background: var(--panel-dark);
    color: var(--led-amber);
    border: 1px solid var(--led-amber);
    padding: 0.55rem 2.4rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 0.3em;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(255, 179, 0, 0.3);
}

.tuner-join:hover {
    background: var(--led-amber);
    color: var(--panel-dark);
}

/* ===========================================================
   host-cam.html — out-of-iframe publisher tab
   =========================================================== */

.cam-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at center, #1a232c 0%, #0a0e12 100%);
    color: var(--text-color);
    font-family: 'Lexend Mega', 'Share Tech Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cam-frame {
    width: 100%;
    max-width: 720px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    border: 1px solid #0d1318;
    border-radius: 14px;
    padding: 24px 28px 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cam-header {
    text-align: center;
    margin-bottom: 18px;
}

.cam-brand {
    margin: 0;
    font-family: 'Aldrich', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.32em;
    color: var(--text-color);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.cam-sub {
    margin-top: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.28em;
    color: rgba(127, 255, 154, 0.85);
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.35);
}

.cam-screen {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px / 14px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at center, #0a1a0a 0%, #050a05 70%, #000 100%);
    box-shadow:
        inset 0 0 22px rgba(0, 0, 0, 0.95),
        inset 0 0 4px rgba(0, 255, 0, 0.15);
    margin-bottom: 16px;
}

.cam-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.cam-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 0.32em;
    color: rgba(127, 255, 154, 0.85);
    text-shadow:
        0 0 6px rgba(0, 255, 0, 0.55),
        0 0 14px rgba(0, 255, 0, 0.3);
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
    text-align: center;
    padding: 0 16px;
}

.cam-status[data-kind="live"] {
    color: rgba(255, 90, 90, 0.95);
    text-shadow:
        0 0 6px rgba(255, 50, 50, 0.6),
        0 0 14px rgba(255, 50, 50, 0.35);
    background: transparent;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px 14px 0 0;
    flex-direction: row;
    font-size: 0.75rem;
    letter-spacing: 0.32em;
}

.cam-status[data-kind="error"] {
    color: rgba(255, 140, 140, 0.95);
    text-shadow: 0 0 6px rgba(255, 50, 50, 0.5);
    background: rgba(0, 0, 0, 0.6);
}

.cam-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}

.cam-btn {
    flex: 1;
    max-width: 200px;
    padding: 10px 14px;
    border: 1px solid rgba(127, 255, 154, 0.7);
    background: rgba(0, 30, 12, 0.65);
    color: rgba(127, 255, 154, 0.95);
    font-family: 'Aldrich', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    border-radius: 4px;
    cursor: pointer;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 6px rgba(0, 255, 0, 0.25);
    transition: background 0.15s ease;
}

.cam-btn:hover:not(:disabled) {
    background: rgba(0, 60, 24, 0.8);
}

.cam-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cam-btn-muted {
    border-color: rgba(255, 180, 80, 0.8);
    color: rgba(255, 200, 120, 0.98);
    text-shadow: 0 0 3px rgba(255, 140, 40, 0.55);
    background: rgba(40, 22, 0, 0.6);
}

.cam-btn-muted:hover:not(:disabled) {
    background: rgba(70, 38, 0, 0.75);
}

.cam-btn-stop {
    border-color: rgba(255, 90, 90, 0.7);
    color: rgba(255, 130, 130, 0.95);
    text-shadow: 0 0 3px rgba(255, 50, 50, 0.5);
    background: rgba(40, 0, 0, 0.55);
}

.cam-btn-stop:hover:not(:disabled) {
    background: rgba(80, 0, 0, 0.7);
}

.cam-footer {
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: rgba(189, 195, 199, 0.7);
}

.cam-footer p {
    margin: 4px 0;
}

.cam-footer strong {
    color: rgba(255, 200, 120, 0.95);
    font-weight: normal;
}
