.kids-tower-wrapper {
    position: fixed;
    left: 70px;
    top: 118px;
    transform: scale(0.42);
    transform-origin: top left;
    z-index: 3600;
    width: 980px;
    pointer-events: none;
    cursor: grab;
    user-select: none;
    filter: drop-shadow(0 24px 34px rgba(39, 65, 96, 0.28));
}

.kids-tower-wrapper.is-hidden {
    display: none;
}

.kids-tower-wrapper.dragging {
    cursor: grabbing;
}

.kids-tower-wrapper > * {
    pointer-events: auto;
}

.kids-tower-window-bar {
    position: absolute;
    left: 116px;
    top: -22px;
    z-index: 40;
    width: 684px;
    height: 58px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #24445c;
}

.kids-tower-window-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 230px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(124, 186, 255, 0.38);
    box-shadow: 0 8px 18px rgba(49, 90, 142, 0.12);
    backdrop-filter: blur(8px);
    font-size: 18px;
    font-weight: 900;
}

.kids-tower-window-close {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #69ead9, #45b9ff);
    color: #06342d;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.kids-tower-window-close:hover {
    filter: brightness(1.05);
}

.kids-tower-scene {
    position: relative;
    width: 880px;
    perspective: 1800px;
}

.kids-tower {
    position: relative;
    width: 700px;
    margin-left: 110px;
    padding-top: 70px;
    transform-style: preserve-3d;
}

/* HORNÁ PLOCHA */
.tower-top-plane {
    position: absolute;
    left: 12px;
    top: 0;
    width: 676px;
    height: 86px;
    background: linear-gradient(180deg, #f5f6fa 0%, #dde2ea 100%);
    border: 2px solid #a5acb8;
    border-bottom: 0;
    border-radius: 30px 30px 12px 12px;
    transform: perspective(1500px) rotateX(76deg);
    transform-origin: bottom center;
    box-shadow:
        0 8px 18px rgba(0,0,0,0.14),
        inset 0 2px 0 rgba(255,255,255,0.96),
        inset 0 -6px 12px rgba(0,0,0,0.08);
    z-index: 5;
}

.tower-screw {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d8dde5 44%, #9ba3b1 100%);
    border: 2px solid #8b93a0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.screw-tl { top: 10px; left: 16px; }
.screw-tr { top: 10px; right: 16px; }
.screw-bl { bottom: 10px; left: 16px; }
.screw-br { bottom: 10px; right: 16px; }

.top-cd-bay {
    position: absolute;
    inset: 10px 56px 12px;
    border-radius: 24px;
    background: linear-gradient(180deg, #e8ebf3 0%, #d3d8e3 100%);
    border: 2px solid #b8bec9;
    box-shadow:
        inset 0 3px 8px rgba(255,255,255,0.86),
        inset 0 -8px 16px rgba(0,0,0,0.08);
}

.top-cd-bay-inner {
    position: absolute;
    inset: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(80,86,96,0.16) 0%, rgba(255,255,255,0.10) 100%);
    border: 1px solid rgba(118,126,140,0.24);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-disc-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-disc {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    border: 4px solid #c0c7d3;
    background:
        radial-gradient(circle at center, #ffffff 0 12px, #96a2b7 13px 21px, transparent 22px),
        conic-gradient(
            from 0deg,
            #f7f7f9,
            #b9dbff,
            #f7f7f9,
            #ffdbea,
            #f7f7f9,
            #d4ffe2,
            #f7f7f9
        );
    box-shadow:
        inset 0 0 14px rgba(255,255,255,0.95),
        0 6px 10px rgba(0,0,0,0.12);
}

/* PRAVÝ BOK */
.tower-right-side {
    display: none;
}

.tower-right-side::before {
    display: none;
}

/* PREDOK */
.tower-front {
    position: relative;
    width: 700px;
    background: linear-gradient(180deg, #fbfcfd 0%, #e8ecf1 24%, #d9dee6 52%, #eef2f5 82%, #ffffff 100%);
    border: 2px solid #a7b0bd;
    border-radius: 26px 26px 30px 30px;
    box-shadow:
        0 20px 38px rgba(0,0,0,0.20),
        inset 0 2px 0 rgba(255,255,255,0.95),
        inset 0 -4px 10px rgba(0,0,0,0.08);
    padding: 18px 20px 18px;
    overflow: hidden;
    z-index: 3;
}

.tower-front-core {
    position: relative;
    z-index: 2;
    width: 448px;
    margin: 0 auto;
}

/* REPRODUKTORY */
.front-speaker {
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 82px;
    border-radius: 22px;
    background: linear-gradient(180deg, #e4e8ee 0%, #cbd2dc 52%, #edf0f4 100%);
    border: 2px solid #a4adb9;
    box-shadow:
        inset 0 0 0 7px rgba(255,255,255,0.24),
        inset 0 1px 0 rgba(255,255,255,0.55);
    z-index: 1;
}

.speaker-left { left: 12px; }
.speaker-right { right: 12px; }

.speaker-port {
    position: absolute;
    left: 50%;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 45% 42%, rgba(255,255,255,0.72) 0 5px, rgba(150, 166, 184, 0.22) 6px 100%);
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.36),
        inset 0 -4px 7px rgba(0,0,0,0.24);
}

.port-top { top: 94px; }
.port-bottom { bottom: 94px; }

.tower-speaker-cassette-shelf {
    position: absolute;
    left: 7px;
    right: 7px;
    top: 142px;
    bottom: 142px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 1px;
    scrollbar-width: thin;
    z-index: 3;
}

.tower-speaker-cassette-shelf[hidden] {
    display: none;
}

.tower-speaker-cassette-shelf .tower-cassette-card {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.tower-speaker-cassette-shelf .tower-cassette-btn {
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 34px;
    padding: 5px 4px;
    border-radius: 8px;
    font-size: 8px;
    line-height: 1.05;
    box-shadow: 0 4px 9px rgba(51, 77, 150, 0.20);
}

.tower-speaker-cassette-shelf .tower-cassette-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tower-speaker-cassette-shelf .tower-cassette-deck {
    margin-top: 2px;
    font-size: 7px;
    letter-spacing: 0;
}

.tower-speaker-cassette-shelf .tower-cassette-code-form {
    flex-direction: column;
    gap: 3px;
    margin-top: 3px;
}

.tower-speaker-cassette-shelf .tower-cassette-code-input,
.tower-speaker-cassette-shelf .tower-cassette-code-btn {
    width: 100%;
    padding: 3px 4px;
    border-radius: 6px;
    font-size: 8px;
}

.tower-speaker-cassette-shelf .tower-cassette-card {
    transform-origin: center top;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.tower-speaker-cassette-shelf .tower-cassette-btn {
    position: relative;
    transform: translateY(0) scale(1);
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.tower-speaker-cassette-shelf .tower-cassette-btn::after {
    content: "";
    position: absolute;
    inset: 2px 5px auto 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.30);
    opacity: 0.65;
    pointer-events: none;
}

.tower-speaker-cassette-shelf .tower-cassette-card.is-pressing .tower-cassette-btn {
    animation: cassettePress 0.18s ease-out;
}

.tower-speaker-cassette-shelf .tower-cassette-card.is-inserted .tower-cassette-btn {
    transform: translateY(5px) scale(0.965);
    box-shadow:
        inset 0 4px 9px rgba(24, 17, 58, 0.34),
        0 1px 3px rgba(51, 77, 150, 0.18);
    filter: saturate(1.08) brightness(0.94);
}

.tower-speaker-cassette-shelf .tower-cassette-card.is-inserted {
    transform: translateY(1px);
}

.tower-speaker-cassette-shelf .tower-cassette-card.is-playing-cassette .tower-cassette-btn {
    border-color: rgba(137, 233, 255, 0.98);
    box-shadow:
        inset 0 4px 9px rgba(24, 17, 58, 0.28),
        0 0 0 2px rgba(137, 233, 255, 0.72),
        0 0 14px rgba(70, 195, 226, 0.42),
        0 2px 5px rgba(0,0,0,0.24);
    filter: saturate(1.16) brightness(1.04);
}

@keyframes cassettePress {
    0% { transform: translateY(0) scale(1); }
    45% { transform: translateY(8px) scale(0.95); }
    100% { transform: translateY(5px) scale(0.965); }
}

@media (prefers-reduced-motion: reduce) {
    .tower-speaker-cassette-shelf .tower-cassette-card,
    .tower-speaker-cassette-shelf .tower-cassette-btn,
    .tower-speaker-cassette-shelf .tower-cassette-card.is-pressing .tower-cassette-btn {
        animation: none;
        transition: none;
    }
}

/* HORNÝ INFO PANEL */
.cd-info-box {
    text-align: center;
    margin-bottom: 12px;
    padding: 16px 12px;
    border-radius: 20px;
    border: 2px solid #c9d2dd;
    background: linear-gradient(180deg, #f8fafc 0%, #e9eef4 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.82),
        0 4px 10px rgba(108,78,175,0.05);
}

.cd-label {
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #616775;
    margin-bottom: 8px;
}

.cd-title {
    display: block;
    font-size: 15px;
    font-weight: 900;
    color: #2f3442;
}

/* TLAČIDLÁ */
.cd-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cd-btn,
.source-btn,
.radio-bottom-btn,
.tape-btn,
.mini-btn {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cd-btn,
.radio-bottom-btn,
.tape-btn,
.mini-btn {
    border: 1px solid #95a0af;
    background: linear-gradient(180deg, #ffffff 0%, #dde2ea 48%, #bcc4d0 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.92),
        0 4px 10px rgba(0,0,0,0.18);
}

.cd-btn:hover,
.radio-bottom-btn:hover,
.tape-btn:hover,
.mini-btn:hover {
    transform: translateY(-2px);
}

.cd-btn:active,
.radio-bottom-btn:active,
.tape-btn:active,
.mini-btn:active,
.source-btn:active {
    transform: translateY(2px);
}

.mini-btn.is-pressed {
    transform: translateY(4px) scale(0.96);
    box-shadow:
        inset 0 3px 7px rgba(38, 48, 64, 0.34),
        inset 0 1px 0 rgba(255,255,255,0.55),
        0 1px 3px rgba(0,0,0,0.16);
}

.mini-btn.is-latched {
    transform: translateY(4px) scale(0.96);
    background: linear-gradient(180deg, #dce8f7 0%, #aebfd4 52%, #8798af 100%);
    box-shadow:
        inset 0 4px 8px rgba(38, 48, 64, 0.36),
        inset 0 1px 0 rgba(255,255,255,0.55),
        0 1px 3px rgba(0,0,0,0.14);
}

.cd-btn {
    min-width: 40px;
    height: 34px;
    border-radius: 11px;
    color: #345f9f;
    font-size: 16px;
    cursor: pointer;
}

.source-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.source-btn {
    min-width: 72px;
    padding: 9px 12px;
    border: 1px solid #8d95a3;
    border-radius: 999px;
    background: linear-gradient(180deg, #f9fafc 0%, #d8dde6 48%, #bcc4d1 100%);
    color: #2e3442;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.92),
        0 4px 10px rgba(0,0,0,0.16);
}

.source-btn.active {
    background: linear-gradient(180deg, #7fa7c9 0%, #4f789d 52%, #345676 100%);
    border-color: #385a78;
    color: #fff;
}

.tower-cassette-shelf {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    margin: -6px 0 10px;
    scrollbar-width: thin;
}

.tower-cassette-shelf[hidden] {
    display: none;
}

.tower-cassette-btn {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 190px;
    border: 1px solid rgba(122, 142, 164, 0.62);
    border-radius: 14px;
    padding: 8px 12px;
    background:
        linear-gradient(135deg, rgba(80, 112, 139, 0.96), rgba(94, 154, 158, 0.88)),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 8px, rgba(255,255,255,0.035) 8px 16px);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(39, 54, 76, 0.18);
}

.tower-cassette-btn:nth-child(2n) {
    background: linear-gradient(135deg, rgba(164, 122, 94, 0.92), rgba(88, 122, 154, 0.90));
}

.tower-cassette-btn:nth-child(3n) {
    background: linear-gradient(135deg, rgba(92, 145, 119, 0.92), rgba(74, 128, 158, 0.90));
}

.tower-cassette-btn.is-active {
    border-color: #fff;
    box-shadow:
        0 0 0 2px rgba(255,255,255,0.75),
        0 10px 24px rgba(49, 88, 122, 0.26);
}

.tower-cassette-deck {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,0.78);
    font-size: 9px;
    letter-spacing: 0.04em;
}

.tower-cassette-card {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 190px;
}

.tower-cassette-card .tower-cassette-btn {
    width: 100%;
}

.tower-cassette-card.tone-2 .tower-cassette-btn {
    background: linear-gradient(135deg, rgba(164, 122, 94, 0.92), rgba(88, 122, 154, 0.90));
}

.tower-cassette-card.tone-3 .tower-cassette-btn {
    background: linear-gradient(135deg, rgba(92, 145, 119, 0.92), rgba(74, 128, 158, 0.90));
}

.tower-cassette-code-form {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}

.tower-cassette-code-input {
    min-width: 0;
    width: 76px;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 8px;
    padding: 4px 6px;
    background: rgba(255,255,255,0.88);
    color: #243445;
    font-size: 10px;
    font-weight: 800;
}

.tower-cassette-code-btn {
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 8px;
    padding: 4px 6px;
    background: rgba(45, 62, 78, 0.88);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}

.tower-cassette-code-form.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

/* RADIO PANEL */
.radio-panel {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 84px;
    gap: 12px;
    align-items: center;
    background: linear-gradient(180deg, #f4efff 0%, #dfcfff 100%);
    border: 2px solid #ccb3ff;
    border-radius: 22px;
    padding: 12px 10px;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.74),
        0 8px 18px rgba(112,84,171,0.06);
    margin-bottom: 14px;
}

.radio-knob {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #848c98;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e6e9ef 38%, #adb5c2 68%, #7d8593 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.9),
        inset 0 -6px 8px rgba(0,0,0,0.10),
        0 8px 16px rgba(0,0,0,0.18);
}

.radio-knob::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 12px;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #3e4c68;
}

.radio-knob-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4d78d1;
    box-shadow:
        0 0 0 4px rgba(255,255,255,0.7),
        0 0 8px rgba(72,138,255,0.22);
}

.radio-center {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.radio-display {
    position: relative;
    background: linear-gradient(180deg, #0a0d14 0%, #11151d 50%, #05070b 100%);
    border: 2px solid #3e4657;
    border-radius: 16px;
    padding: 10px 10px 8px;
    box-shadow:
        inset 0 0 22px rgba(0,0,0,0.8),
        0 0 18px rgba(76,163,255,0.10);
}

.radio-display-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.radio-mode,
.radio-volume {
    font-size: 10px;
    font-weight: 800;
    color: #7fd8ff;
    letter-spacing: 0.8px;
}

.radio-station-current {
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    color: #e8faff;
    margin-bottom: 8px;
    text-shadow:
        0 0 6px rgba(120,220,255,0.6),
        0 0 14px rgba(120,220,255,0.3);
    animation: ledPulse 2s infinite ease-in-out;
}

.radio-station-list {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.radio-station-name {
    border: 0;
    background: transparent;
    color: #7fd8ff;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.radio-station-name.active {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.radio-presets {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.radio-preset {
    width: 20px;
    height: 6px;
    border-radius: 999px;
    border: 0;
    background: #5c7086;
    cursor: pointer;
}

.radio-preset.active {
    background: linear-gradient(180deg, #dff8ff 0%, #84dcff 100%);
}

.radio-bottom-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.radio-bottom-btn {
    min-width: 42px;
    height: 28px;
    border-radius: 9px;
    color: #2d3443;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

/* VISIBLE VOLUME */
.radio-volume-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 16px;
    border: 2px solid #c7b0ff;
    background: linear-gradient(180deg, #f7f2ff 0%, #eadfff 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.82),
        0 8px 18px rgba(37,22,71,0.10);
}

.radio-volume-side-title {
    text-align: center;
    font-size: 8px;
    font-weight: 900;
    color: #6b56a7;
}

.radio-volume-track {
    position: relative;
    width: 14px;
    height: 104px;
    margin: 0 auto;
    border-radius: 999px;
    border: 2px solid #8f96a3;
    background: linear-gradient(180deg, #f7f9fc 0%, #dfe3ea 48%, #bcc3d0 100%);
    cursor: pointer;
    overflow: hidden;
}

.radio-volume-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 33.333%;
    border-radius: 999px;
    background: linear-gradient(180deg, #9ccfff 0%, #5ea6ff 55%, #356ee6 100%);
    pointer-events: none;
}

.radio-volume-thumb {
    position: absolute;
    left: 50%;
    bottom: calc(33.333% - 6px);
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #7f8ba0;
    background: linear-gradient(180deg, #ffffff 0%, #e7ebf3 100%);
    pointer-events: none;
}

/* TAPE */
.tower-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.tape-section {
    display: grid;
    gap: 8px;
}

.tape-deck {
    background: linear-gradient(180deg, #f7f2ff 0%, #eadfff 100%);
    border: 2px solid #d0b8ff;
    border-radius: 18px;
    padding: 9px;
    min-height: 132px;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.74);
}

.tape-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tape-label {
    font-size: 11px;
    font-weight: 900;
    color: #2f3442;
}

.tape-clear-btn {
    border: 2px solid #d1b8ff;
    border-radius: 999px;
    background: #fff;
    color: #764db7;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    cursor: pointer;
}

.tape-clear-placeholder {
    visibility: hidden;
    padding: 4px 10px;
}

.tape-window {
    position: relative;
    height: 48px;
    border-radius: 12px;
    border: 2px solid #596173;
    background: linear-gradient(180deg, #232733 0%, #10141d 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 0 18px rgba(0,0,0,0.65);
}

.tape-reel {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #e7e7e7 0 4px, #8f8f8f 5px 8px, transparent 9px),
        radial-gradient(circle at center, transparent 0 10px, #d7d7d7 11px 16px, #939393 17px 100%);
}

.tape-strip {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 62px);
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(255,214,118,0.65);
}

.tape-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    background: rgba(255,255,255,0.38);
    border: 1px solid rgba(132,140,152,0.18);
    border-radius: 10px;
    padding: 6px 8px;
}

.tape-now-playing-label {
    font-size: 9px;
    font-weight: 700;
    color: #5e6472;
}

.tape-now-playing-title {
    font-size: 11px;
    font-weight: 800;
    color: #2f3442;
}

/* SPODNÝ RAD */
.bottom-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.bottom-controls-gap {
    width: 16px;
}

.mini-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #2d3443;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.mini-red {
    position: relative;
}

.mini-red::before {
    content: "";
    width: 7px;
    height: 7px;
    background: #d4364f;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px rgba(255,255,255,.45), 0 0 9px rgba(212,54,79,.42);
}

.tape-create-hint {
    position: absolute;
    left: 50%;
    bottom: 48px;
    z-index: 9;
    width: min(260px, calc(100% - 24px));
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(22, 29, 42, .92);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 14px 26px rgba(20, 28, 42, .28);
    transform: translate(-50%, 8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.tape-create-hint.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.stop-btn {
    color: #28334d;
}

/* PLAYER AREA */
.tower-player-area {
    margin-top: 26px;
    display: none;
}

.tower-player-placeholder,
.tower-video-frame-wrap {
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid #d5c0ff;
    background: linear-gradient(180deg, #faf7ff 0%, #f1e9ff 100%);
    box-shadow: 0 12px 24px rgba(89,56,146,0.12);
}

.tower-player-placeholder {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tower-player-placeholder-inner {
    text-align: center;
    max-width: 520px;
}

.tower-player-placeholder-icon {
    font-size: 44px;
    margin-bottom: 10px;
}

.tower-player-placeholder-title {
    font-size: 20px;
    font-weight: 900;
    color: #5a4295;
    margin-bottom: 8px;
}

.tower-player-placeholder-text {
    font-size: 15px;
    line-height: 1.5;
    color: #7158aa;
}

.tower-now-playing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7f9fe 0%, #dde3ed 100%);
    border: 1px solid #9aa2af;
    margin-top: 14px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #5d4698;
}

.tower-video-frame-wrap {
    min-height: 320px;
    padding: 14px;
}

.tower-video-frame {
    width: 100%;
    min-height: 290px;
    border-radius: 18px;
    background: #16171f;
    overflow: hidden;
}

/* EDITOR */
.tape-a-editor {
    margin-top: 22px;
    display: none;
}

.tape-a-editor-inner {
    background: linear-gradient(180deg, #fdfbff 0%, #f2ebff 100%);
    border: 2px solid #d7c3ff;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 10px 22px rgba(92,59,148,0.1);
}

.tape-a-editor-inner h3 {
    margin: 0 0 14px;
    font-size: 22px;
    color: #59428e;
}

.tape-a-editor-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

#tapeALinkInput {
    flex: 1;
    min-width: 240px;
    height: 44px;
    border: 2px solid #d0b8ff;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
}

#tapeAAddLinkBtn,
#tapeASaveBtn,
#tapeARestoreBtn,
#tapeACloseEditorBtn {
    height: 42px;
    border: 2px solid #c9afff;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #ece2ff 100%);
    color: #5a4293;
    font-size: 14px;
    font-weight: 800;
    padding: 0 14px;
    cursor: pointer;
}

.tape-a-editor-list {
    min-height: 90px;
    border: 2px dashed #d8c4ff;
    border-radius: 16px;
    background: rgba(255,255,255,0.5);
    padding: 14px;
    margin-bottom: 14px;
}

.tape-a-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.is-playing .cd-disc {
    animation: cdSpin 2.2s linear infinite;
}

.is-spinning {
    animation: tapeSpin 1.2s linear infinite;
}

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

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

@keyframes ledPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .82; }
}

@media (max-width: 900px) {
    .kids-tower-wrapper {
        transform: scale(0.34);
    }

    .kids-tower-window-bar {
        left: 116px;
        width: 684px;
    }
}

@media (max-width: 768px) {
    .kids-tower-wrapper {
        transform: scale(0.28);
        left: 8px;
        top: 104px;
    }

    .kids-tower-window-bar {
        left: 116px;
        width: 684px;
    }
}

@media (max-width: 480px) {
    .kids-tower-wrapper {
        transform: scale(0.22);
        left: -18px;
    }

    .kids-tower-window-bar {
        left: 116px;
        width: 684px;
    }

    .kids-tower-window-title {
        font-size: 16px;
        padding: 8px 12px;
    }
}


.kids-tower-wrapper.has-video .tower-player-area {
    display: block;
}

.kids-tower-wrapper.has-video {
    width: 1120px;
}

.kids-tower-wrapper.has-video .tower-player-area {
    width: 640px;
    margin-left: 140px;
}

.kids-tower-wrapper.has-video .tower-video-frame iframe,
.kids-tower-wrapper.has-video .tower-video-frame > div {
    width: 100%;
    height: 100%;
    min-height: 290px;
    border: 0;
    display: block;
}

/* Kompaktnejší biely video prehrávač */
.kids-tower-wrapper.has-video {
    width: 1060px;
}

.kids-tower-wrapper.has-video .tower-player-area {
    width: 600px;
    margin-left: 96px;
    margin-top: 12px;
}

.kids-tower-wrapper.has-video .tower-now-playing {
    margin: 0 0 6px 0;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.1;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #edf1f8 100%);
    border: 1px solid rgba(116, 126, 151, 0.5);
    color: #5a4690;
    box-shadow: 0 3px 8px rgba(42, 31, 76, 0.08);
}

.kids-tower-wrapper.has-video .tower-now-playing-label {
    font-weight: 800;
}

.kids-tower-wrapper.has-video .tower-now-playing-value {
    max-width: 430px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kids-tower-wrapper.has-video .tower-video-frame-wrap {
    min-height: 0;
    padding: 12px 12px 14px;
    border-radius: 18px;
    border: 2px solid #d7c4ff;
    background: linear-gradient(180deg, #ffffff 0%, #fbf9ff 48%, #efe7ff 100%);
    box-shadow: 0 10px 18px rgba(63, 45, 104, 0.12);
}

.kids-tower-wrapper.has-video .tower-video-frame {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #050506;
}

.kids-tower-wrapper.has-video .tower-video-frame iframe,
.kids-tower-wrapper.has-video .tower-video-frame > div {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    display: block;
}
/* Ostřejší rádio displej */
.radio-display {
    background: #070b12;
    border-color: #66738b;
    box-shadow:
        inset 0 0 0 1px rgba(168, 224, 255, 0.16),
        inset 0 -10px 18px rgba(0, 0, 0, 0.42),
        0 0 10px rgba(95, 185, 255, 0.14);
    overflow: hidden;
}

.radio-display-top {
    margin-bottom: 8px;
}

.radio-mode,
.radio-volume {
    color: #aee9ff;
    font-size: 10px;
    letter-spacing: 0;
    text-shadow: none;
}

.radio-station-current {
    color: #f4fdff;
    font-size: 18px;
    line-height: 1.12;
    min-height: 22px;
    letter-spacing: 0;
    text-shadow: 0 1px 0 #000, 0 0 4px rgba(115, 210, 255, 0.55);
    animation: none;
}

.radio-station-list,
.radio-presets,
.radio-bottom-controls {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 216, 255, 0.75) rgba(255, 255, 255, 0.14);
    -webkit-overflow-scrolling: touch;
}

.radio-station-list::-webkit-scrollbar,
.radio-presets::-webkit-scrollbar,
.radio-bottom-controls::-webkit-scrollbar {
    height: 6px;
}

.radio-station-list::-webkit-scrollbar-thumb,
.radio-presets::-webkit-scrollbar-thumb,
.radio-bottom-controls::-webkit-scrollbar-thumb {
    background: rgba(126, 216, 255, 0.75);
    border-radius: 999px;
}

.radio-station-list {
    gap: 8px;
    margin-bottom: 9px;
    padding: 1px 2px 5px;
}

.radio-station-name {
    flex: 0 0 auto;
    color: #9ee7ff;
    font-size: 10px;
    letter-spacing: 0;
    text-shadow: none;
    white-space: nowrap;
}

.radio-station-name.active {
    color: #ffffff;
    text-decoration-thickness: 2px;
}

.radio-presets {
    gap: 7px;
    padding-bottom: 4px;
}

.radio-preset {
    flex: 0 0 auto;
}

.radio-bottom-controls {
    gap: 7px;
    padding: 2px 4px 8px;
}

.radio-bottom-station {
    flex: 0 0 auto;
    min-width: 70px;
    padding: 0 10px;
    height: 30px;
    border: 1px solid #aeb6c4;
    background: linear-gradient(180deg, #f9fbff 0%, #d8dde8 52%, #aeb7c6 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 3px 8px rgba(37,45,66,0.18);
    letter-spacing: 0;
    white-space: nowrap;
}

.radio-bottom-station.active {
    color: #ffffff;
    border-color: #2353b5;
    background: linear-gradient(180deg, #72c6ff 0%, #3479f4 56%, #1f4cad 100%);
}
/* Keep the radio body fixed; only station rows may scroll sideways. */
.radio-panel {
    grid-template-columns: 52px minmax(0, 1fr) 84px;
    overflow: hidden;
}

.radio-center,
.radio-display {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.radio-display {
    width: 100%;
}

.radio-station-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.radio-station-list,
.radio-presets,
.radio-bottom-controls {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
/* Split the stereo into readable modes: radio, CD, and cassette. */
.kids-tower.mode-radio .cd-info-box,
.kids-tower.mode-radio .cd-controls,
.kids-tower.mode-radio .tower-bottom,
.kids-tower.mode-radio .bottom-controls-row,
.kids-tower.mode-cd .radio-panel,
.kids-tower.mode-cd .tower-bottom,
.kids-tower.mode-cd .bottom-controls-row,
.kids-tower.mode-tape-a .cd-controls,
.kids-tower.mode-tape-a .radio-panel,
.kids-tower.mode-tape-b .cd-controls,
.kids-tower.mode-tape-b .radio-panel,
.kids-tower.mode-aux .radio-panel {
    display: none;
}

.kids-tower.mode-radio .radio-panel {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 74px;
    gap: 10px;
    padding: 14px 12px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.kids-tower.mode-radio .radio-display {
    min-height: 116px;
    padding: 12px 12px 10px;
    border-radius: 14px;
}

.kids-tower.mode-radio .radio-station-current {
    font-size: 20px;
    min-height: 26px;
    margin-bottom: 10px;
}

.kids-tower.mode-radio .radio-station-list {
    gap: 12px;
    padding: 2px 2px 8px;
    margin-bottom: 8px;
}

.kids-tower.mode-radio .radio-station-name {
    font-size: 11px;
}

.kids-tower.mode-radio .radio-presets {
    gap: 8px;
    padding-bottom: 6px;
}

.kids-tower.mode-radio .radio-preset {
    width: 26px;
    height: 8px;
}

.kids-tower.mode-radio .radio-bottom-controls {
    gap: 8px;
    padding: 4px 4px 10px;
}

.kids-tower.mode-radio .radio-bottom-station {
    min-width: 84px;
    height: 34px;
    font-size: 10px;
}

.kids-tower.mode-radio .source-switcher,
.kids-tower.mode-cd .source-switcher,
.kids-tower.mode-tape-a .source-switcher,
.kids-tower.mode-tape-b .source-switcher {
    margin-bottom: 12px;
}

.kids-tower.mode-cd .cd-info-box {
    min-height: 118px;
    justify-content: center;
    margin-bottom: 14px;
}

.kids-tower.mode-cd .cd-label {
    font-size: 12px;
}

.kids-tower.mode-cd .cd-title {
    font-size: 18px;
    line-height: 1.25;
}

.kids-tower.mode-cd .cd-controls {
    gap: 12px;
    margin-bottom: 16px;
}

.kids-tower.mode-cd .cd-btn {
    width: 40px;
    height: 34px;
    font-size: 14px;
}

.kids-tower.mode-tape-a .cd-info-box,
.kids-tower.mode-tape-b .cd-info-box {
    min-height: 52px;
    margin-bottom: 12px;
}

.kids-tower.mode-tape-a .tower-bottom,
.kids-tower.mode-tape-b .tower-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.kids-tower.mode-tape-a .tape-section,
.kids-tower.mode-tape-b .tape-section {
    display: none;
}

.kids-tower.mode-tape-a .tape-a-section,
.kids-tower.mode-tape-b .tape-b-section {
    display: block;
}

.kids-tower.mode-tape-a .tape-deck,
.kids-tower.mode-tape-b .tape-deck {
    min-height: 128px;
    padding: 14px;
}

.kids-tower.mode-tape-a .tape-window,
.kids-tower.mode-tape-b .tape-window {
    height: 54px;
}

.kids-tower.mode-tape-a .bottom-controls-row,
.kids-tower.mode-tape-b .bottom-controls-row {
    display: flex;
    justify-content: center;
    gap: 9px;
}

.kids-tower.mode-tape-a .bottom-controls-row [data-tape="b"],
.kids-tower.mode-tape-a .bottom-controls-gap,
.kids-tower.mode-tape-b .bottom-controls-row [data-tape="a"],
.kids-tower.mode-tape-b .bottom-controls-gap {
    display: none;
}

/* =========================================================
   FIX TAPE B VIDEO PANEL
   ========================================================= */

.kids-tower-wrapper.has-video {
    width: 1060px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.kids-tower-wrapper.has-video .tower-front,
.kids-tower-wrapper.has-video .kids-tower-scene {
    overflow: visible !important;
}

.kids-tower-wrapper.has-video .tower-player-area,
.tower-player-area:not([hidden]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 80 !important;
    width: 600px !important;
    margin-left: 96px !important;
    margin-top: 12px !important;
}

.kids-tower-wrapper.has-video .tower-video-frame-wrap,
.tower-video-frame-wrap:not([hidden]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 0 !important;
    padding: 12px 12px 14px !important;
    border-radius: 18px !important;
    border: 2px solid #d7c4ff !important;
    background: linear-gradient(180deg, #faf7ff 0%, #f1e9ff 100%) !important;
}

.kids-tower-wrapper.has-video .tower-video-frame,
.tower-video-frame:not(:empty) {
    display: block !important;
    width: 100% !important;
    min-height: 260px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 14px !important;
    background: #050506 !important;
    overflow: hidden !important;
}

.kids-tower-wrapper.has-video .tower-video-frame iframe,
.kids-tower-wrapper.has-video .tower-video-frame > div,
.tower-video-frame:not(:empty) iframe,
.tower-video-frame:not(:empty) > div {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 260px !important;
    border: 0 !important;
}

.tower-facebook-player {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    width: 100% !important;
    min-height: 260px !important;
    height: 100% !important;
    background: #050506;
}

.tower-facebook-player iframe {
    flex: 1 1 auto;
    min-height: 220px !important;
}

.tower-facebook-open {
    align-self: center;
    margin-bottom: 8px;
    border-radius: 999px;
    padding: 7px 14px;
    background: #ffffff;
    color: #37246f;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

/* Modern touchscreen-style radio display, preserving the original tower layout. */
.radio-panel {
    grid-template-columns: 42px minmax(0, 1fr) 64px;
    gap: 10px;
    padding: 13px 10px;
    background: linear-gradient(180deg, #eef2f6 0%, #dfe6ee 100%);
    border-color: #b9c4d1;
}

.radio-volume-side {
    padding-inline: 4px;
}

.radio-display {
    min-height: 148px;
    padding: 14px 13px 12px;
    border-radius: 20px;
    border-color: #435162;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 32%, transparent 33%),
        linear-gradient(180deg, #101923 0%, #071017 58%, #03070b 100%);
    box-shadow:
        inset 0 0 0 1px rgba(190, 225, 245, 0.18),
        inset 0 -18px 28px rgba(0, 0, 0, 0.36),
        0 10px 18px rgba(38, 55, 74, 0.16);
}

.radio-display::after {
    content: "";
    position: absolute;
    inset: 7px 9px auto 9px;
    height: 34px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02));
    pointer-events: none;
}

.radio-display-top {
    margin-bottom: 10px;
}

.radio-mode,
.radio-volume {
    color: #9fd2e6;
    font-size: 10px;
    font-weight: 900;
}

.radio-station-current {
    min-height: 34px;
    margin-bottom: 12px;
    color: #f6fbff;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0;
    text-shadow: 0 1px 0 #000, 0 0 10px rgba(108, 181, 215, 0.34);
}

.radio-station-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(68px, max-content);
    justify-content: flex-start;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    margin-bottom: 0;
    scrollbar-width: thin;
}

.radio-station-name {
    min-height: 28px;
    border: 1px solid rgba(157, 198, 219, 0.26);
    border-radius: 999px;
    padding: 6px 9px;
    background: rgba(255,255,255,0.07);
    color: #b8dcec;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.radio-station-name:hover {
    background: rgba(255,255,255,0.12);
}

.radio-station-name.active {
    border-color: rgba(199, 232, 246, 0.76);
    background: linear-gradient(180deg, rgba(119, 172, 198, 0.88), rgba(59, 100, 126, 0.92));
    color: #ffffff;
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.24),
        0 0 10px rgba(96, 166, 202, 0.26);
}

/* Alignment pass: keep TAPE A/B decks and transport buttons on the same baseline. */
.tower-bottom {
    align-items: stretch;
}

.tape-section,
.tape-deck {
    height: 100%;
}

.tape-deck {
    display: grid;
    grid-template-rows: 28px 54px minmax(44px, 1fr);
    align-items: stretch;
    box-sizing: border-box;
}

.tape-header {
    height: 28px;
    margin-bottom: 8px;
}

.tape-label,
.tape-clear-btn,
.tape-clear-placeholder {
    line-height: 1;
}

.tape-clear-btn,
.tape-clear-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 24px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.tape-clear-btn {
    border-color: #c9d2dd;
}

.tape-clear-placeholder {
    visibility: hidden;
}

.tape-window {
    height: 54px;
    box-sizing: border-box;
}

.tape-meta {
    min-height: 44px;
    box-sizing: border-box;
    justify-content: center;
}

.bottom-controls-row {
    display: grid;
    grid-template-columns: 30px repeat(5, 30px) 14px repeat(5, 30px);
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.bottom-controls-gap {
    width: 14px;
    min-width: 14px;
}

.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    line-height: 1;
    box-sizing: border-box;
}

.kids-tower.mode-tape-a .bottom-controls-row,
.kids-tower.mode-tape-b .bottom-controls-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.kids-tower.mode-tape-a .tape-deck,
.kids-tower.mode-tape-b .tape-deck {
    display: grid;
    grid-template-rows: 28px 54px minmax(44px, 1fr);
}

/* CD-ROM startup effect: the disc only spins when CD playback is active. */
.is-playing .cd-disc {
    animation: none;
}

.cd-disc.is-spinning {
    animation:
        cdSpinStart 0.65s cubic-bezier(.18,.82,.28,1) 1,
        cdSpin 1.15s linear 0.65s infinite;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.88),
        0 8px 18px rgba(34, 52, 72, 0.22),
        inset 0 0 18px rgba(255,255,255,0.45);
}

.cd-disc.is-spinning::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: conic-gradient(from 20deg, transparent 0 26deg, rgba(255,255,255,0.42) 34deg 46deg, transparent 58deg 360deg);
    pointer-events: none;
}

@keyframes cdSpinStart {
    0% { transform: rotate(0deg) scale(0.985); filter: brightness(0.96); }
    45% { transform: rotate(95deg) scale(1.015); filter: brightness(1.08); }
    100% { transform: rotate(360deg) scale(1); filter: brightness(1); }
}

/* Keep volume visible but quiet inside the touchscreen display. */
.radio-display-top {
    align-items: center;
}

.radio-volume {
    opacity: 0.62;
    font-size: 9px;
    font-weight: 800;
    color: #8fb5c8;
    padding: 2px 6px;
    border: 1px solid rgba(159, 210, 230, 0.16);
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    text-shadow: none;
}

.radio-mode {
    opacity: 0.82;
}

.radio-station-current {
    margin-top: 2px;
}

/* Make the radio horizontal station strip easier to grab on desktop and touch. */
.radio-display .radio-station-list {
    padding-bottom: 14px;
    scrollbar-width: auto;
    scrollbar-color: rgba(150, 224, 255, 0.9) rgba(255, 255, 255, 0.16);
}

.radio-display .radio-station-list::-webkit-scrollbar {
    height: 12px;
}

.radio-display .radio-station-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.radio-display .radio-station-list::-webkit-scrollbar-thumb {
    border: 3px solid rgba(12, 22, 31, 0.96);
    border-radius: 999px;
    background: rgba(150, 224, 255, 0.92);
}


/* Cassette storage stands - readable side spines */
.tower-speaker-cassette-shelf {
    left: 6px;
    right: 6px;
    top: 36px;
    bottom: 36px;
    gap: 4px;
    padding: 7px 5px 9px;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.08), transparent 10%, transparent 90%, rgba(255,255,255,0.06)),
        linear-gradient(180deg, rgba(31, 39, 49, 0.98), rgba(10, 15, 22, 0.98)),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 9px);
    border: 1px solid rgba(208, 219, 232, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        inset 7px 0 12px rgba(255,255,255,0.04),
        inset -7px 0 12px rgba(0,0,0,0.26),
        inset 0 -10px 18px rgba(0,0,0,0.28),
        0 10px 22px rgba(0,0,0,0.28);
    overflow: hidden;
}

.tower-speaker-cassette-shelf-a {
    transform: perspective(240px) rotateY(-4deg);
}

.tower-speaker-cassette-shelf-b {
    transform: perspective(240px) rotateY(4deg);
}

.tower-cassette-shelf-toggle {
    width: 100%;
    min-height: 22px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 8px;
    padding: 3px 5px;
    background: linear-gradient(180deg, rgba(78, 96, 116, 0.98), rgba(38, 48, 61, 0.98));
    color: #f7fbff;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 5px rgba(0,0,0,0.24);
}

.tower-cassette-shelf-label {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0;
    text-align: left;
}

.tower-cassette-shelf-count {
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(130, 211, 255, 0.26);
    color: #ffffff;
    font-size: 8px;
    font-weight: 900;
}

.tower-cassette-shelf-chevron {
    font-size: 10px;
    line-height: 1;
    transform: translateY(-1px);
}

.tower-cassette-shelf-hint {
    color: rgba(226, 236, 248, 0.64);
    font-size: 6px;
    font-weight: 800;
    text-align: center;
    line-height: 1;
}

.tower-cassette-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    padding: 1px 1px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 211, 238, 0.7) rgba(10, 15, 22, 0.5);
}

.tower-cassette-list::-webkit-scrollbar {
    width: 6px;
}

.tower-cassette-list::-webkit-scrollbar-track {
    background: rgba(8, 13, 20, 0.45);
    border-radius: 999px;
}

.tower-cassette-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(177, 230, 255, 0.78), rgba(94, 140, 170, 0.78));
    border-radius: 999px;
}

.tower-speaker-cassette-shelf.is-collapsed {
    bottom: auto;
    height: 35px;
    padding-bottom: 5px;
}

.tower-speaker-cassette-shelf.is-collapsed .tower-cassette-shelf-chevron {
    transform: rotate(180deg);
}

.tower-speaker-cassette-shelf.is-collapsed .tower-cassette-shelf-hint,
.tower-speaker-cassette-shelf.is-collapsed .tower-cassette-list {
    display: none;
}

.tower-speaker-cassette-shelf .tower-cassette-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    position: relative;
}

.tower-speaker-cassette-shelf .tower-cassette-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr;
    column-gap: 3px;
    align-items: center;
    padding: 3px 4px 3px 3px;
    border-radius: 4px;
    border: 1px solid rgba(20, 27, 36, 0.42);
    background:
        linear-gradient(90deg, rgba(33, 41, 52, 0.92) 0 5px, rgba(246, 248, 250, 0.96) 6px, rgba(215, 224, 235, 0.96) 45%, rgba(136, 154, 174, 0.98));
    color: #18212c;
    box-shadow:
        inset 1px 0 0 rgba(255,255,255,0.62),
        inset -4px 0 8px rgba(0,0,0,0.16),
        0 2px 4px rgba(0,0,0,0.28);
    text-align: left;
}

.tower-speaker-cassette-shelf .tower-cassette-btn::after {
    inset: 2px 4px auto 9px;
    height: 2px;
    background: rgba(255,255,255,0.4);
}

.tower-speaker-cassette-shelf .tower-cassette-card.tone-2 .tower-cassette-btn {
    background: linear-gradient(90deg, rgba(44, 35, 31, 0.92) 0 5px, rgba(255, 241, 224, 0.96) 6px, rgba(221, 146, 102, 0.94) 48%, rgba(112, 78, 68, 0.98));
}

.tower-speaker-cassette-shelf .tower-cassette-card.tone-3 .tower-cassette-btn {
    background: linear-gradient(90deg, rgba(25, 48, 54, 0.92) 0 5px, rgba(230, 248, 245, 0.96) 6px, rgba(102, 179, 171, 0.94) 48%, rgba(58, 91, 103, 0.98));
}

.tower-speaker-cassette-shelf .tower-cassette-card.tone-4 .tower-cassette-btn {
    background: linear-gradient(90deg, rgba(35, 35, 58, 0.92) 0 5px, rgba(238, 235, 255, 0.96) 6px, rgba(139, 134, 194, 0.94) 48%, rgba(61, 65, 104, 0.98));
}

.tower-cassette-spine-code {
    display: none;
}

.tower-speaker-cassette-shelf .tower-cassette-title {
    min-width: 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 7.4px;
    line-height: 1.05;
    font-weight: 900;
    color: inherit;
    text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}

.tower-speaker-cassette-shelf .tower-cassette-deck {
    display: none;
}

.tower-cassette-info-panel {
    position: fixed;
    z-index: 1000;
    width: 108px;
    margin: 0;
    padding: 5px 7px;
    border-radius: 5px;
    background: rgba(13, 20, 29, 0.92);
    border: 1px solid rgba(126, 216, 236, 0.36);
    color: #edf8ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.tower-cassette-info-panel::before {
    content: "";
    position: absolute;
    top: 9px;
    width: 7px;
    height: 7px;
    background: inherit;
    border: inherit;
    transform: rotate(45deg);
}

.tower-cassette-info-panel.is-right::before {
    left: -5px;
    border-top: 0;
    border-right: 0;
}

.tower-cassette-info-panel.is-left::before {
    right: -5px;
    border-bottom: 0;
    border-left: 0;
}

.tower-cassette-info-panel strong,
.tower-cassette-info-panel span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tower-cassette-info-panel strong {
    font-size: 7.2px;
    line-height: 1.1;
    font-weight: 1000;
}

.tower-cassette-info-panel span {
    margin-top: 2px;
    font-size: 6.2px;
    line-height: 1;
    font-weight: 850;
    color: rgba(222, 242, 252, 0.74);
}

.tower-speaker-cassette-shelf .tower-cassette-card.is-showing-info .tower-cassette-btn {
    border-color: rgba(137, 233, 255, 0.78);
    box-shadow:
        inset 2px 0 0 rgba(255,255,255,0.62),
        inset -6px 0 10px rgba(0,0,0,0.20),
        0 0 0 1px rgba(137, 233, 255, 0.44),
        0 2px 4px rgba(0,0,0,0.28);
}

.tower-speaker-cassette-shelf .tower-cassette-code-form {
    display: grid;
    grid-template-columns: 1fr 22px;
    gap: 3px;
    margin-top: 3px;
}

.tower-speaker-cassette-shelf .tower-cassette-code-input,
.tower-speaker-cassette-shelf .tower-cassette-code-btn {
    width: 100%;
    min-width: 0;
    height: 18px;
    padding: 2px 3px;
    border-radius: 4px;
    font-size: 7px;
}

@media (max-width: 680px) {
    .tower-speaker-cassette-shelf {
        left: 4px;
        right: 4px;
        top: 120px;
        bottom: 120px;
    }

    .tower-cassette-shelf-hint {
        display: none;
    }
}


/* Refined cassette deck visuals: keeps the existing reel spin logic intact. */
.tape-deck {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.86) 0%, rgba(238, 231, 255, 0.96) 42%, rgba(224, 214, 252, 0.98) 100%);
    border-color: rgba(188, 169, 244, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        inset 0 -10px 18px rgba(123, 97, 184, 0.08),
        0 8px 16px rgba(76, 58, 139, 0.14);
}

.tape-deck::before {
    content: "";
    position: absolute;
    inset: 6px 7px auto 7px;
    height: 28px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.48), rgba(255,255,255,0.02));
    pointer-events: none;
}

.tape-window {
    isolation: isolate;
    height: 58px;
    border-radius: 13px;
    border: 2px solid rgba(43, 49, 62, 0.96);
    background:
        linear-gradient(125deg, rgba(255,255,255,0.26) 0 18%, rgba(255,255,255,0.06) 19% 38%, transparent 39% 100%),
        linear-gradient(180deg, rgba(255,255,255,0.10), transparent 30%),
        radial-gradient(circle at 18% 50%, rgba(84, 218, 216, 0.12) 0 24px, transparent 25px),
        radial-gradient(circle at 82% 50%, rgba(84, 218, 216, 0.12) 0 24px, transparent 25px),
        linear-gradient(180deg, rgba(35, 43, 53, 0.96) 0%, rgba(13, 19, 27, 0.98) 57%, rgba(4, 7, 12, 0.98) 100%);
    padding: 0 16px;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        inset 0 0 20px rgba(0,0,0,0.72),
        0 4px 8px rgba(44, 42, 76, 0.22);
}

.tape-window::before {
    content: "";
    position: absolute;
    inset: 5px 7px auto 7px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.02));
    opacity: 0.72;
    pointer-events: none;
    z-index: 4;
}

.tape-window::after {
    content: "";
    position: absolute;
    left: 38px;
    right: 38px;
    top: 50%;
    height: 16px;
    margin-top: -8px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(164, 247, 244, 0.26), rgba(23, 169, 171, 0.42) 45%, rgba(9, 85, 105, 0.38)),
        repeating-linear-gradient(90deg, rgba(220,255,255,0.10) 0 2px, rgba(8,58,69,0.16) 2px 4px);
    box-shadow:
        inset 0 1px 0 rgba(222, 255, 254, 0.30),
        inset 0 -2px 4px rgba(4, 47, 56, 0.34),
        0 0 12px rgba(54, 219, 205, 0.18);
    z-index: 1;
}

.tape-strip {
    position: absolute;
    left: 44px;
    right: 44px;
    top: 50%;
    height: 18px;
    margin-top: -9px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(194, 255, 252, 0.24) 0%, rgba(48, 200, 197, 0.42) 46%, rgba(10, 88, 112, 0.35) 100%),
        repeating-linear-gradient(90deg, rgba(230,255,255,0.10) 0 2px, rgba(7,58,70,0.17) 2px 4px);
    box-shadow:
        inset 0 2px 0 rgba(224, 255, 251, 0.22),
        inset 0 -3px 4px rgba(5, 64, 82, 0.26),
        0 0 12px rgba(55, 216, 203, 0.20);
    z-index: 2;
}

.tape-reel {
    position: relative;
    z-index: 3;
    width: 37px;
    height: 37px;
    border: 2px solid rgba(238, 242, 247, 0.88);
    background:
        radial-gradient(circle at center, #f5fbff 0 4px, #2e4656 5px 8px, transparent 9px),
        repeating-conic-gradient(from 0deg, rgba(244,252,255,0.86) 0 10deg, rgba(32,43,52,0.82) 10deg 20deg, rgba(151,223,224,0.48) 20deg 30deg),
        radial-gradient(circle at center, transparent 0 15px, rgba(225,233,237,0.86) 16px 19px, rgba(74,86,95,0.92) 20px 100%);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.80),
        inset 0 -2px 3px rgba(0,0,0,0.35),
        0 2px 7px rgba(0,0,0,0.48);
}

.tape-reel::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(18, 24, 34, 0.48);
    background: radial-gradient(circle, rgba(235,255,252,0.96) 0 2px, rgba(8,68,74,0.78) 3px 4px, transparent 5px);
}

.tape-reel.is-spinning {
    animation: tapeSpin 0.92s linear infinite;
}

.tape-reel.is-rewinding {
    animation-direction: reverse;
}

.tape-deck:has(.tape-reel.is-spinning) .tape-window {
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.10),
        inset 0 0 20px rgba(0,0,0,0.72),
        0 0 0 2px rgba(80, 220, 210, 0.18),
        0 6px 12px rgba(44, 42, 76, 0.24);
}

.tape-deck:has(.tape-reel.is-spinning) .tape-strip {
    animation: tapeBandGlow 1.25s ease-in-out infinite alternate;
}

.tape-meta {
    background: linear-gradient(180deg, rgba(255,255,255,0.64), rgba(244, 239, 255, 0.48));
    border-color: rgba(174, 160, 221, 0.32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
}

.tape-now-playing-label {
    color: rgba(57, 52, 86, 0.70);
    font-weight: 900;
}

.tape-now-playing-title {
    color: #2e2a48;
    font-weight: 950;
}

@keyframes tapeBandGlow {
    from { filter: brightness(1) saturate(1.05); }
    to { filter: brightness(1.22) saturate(1.28); }
}
