/* =========================================================
   DISC SNAKE – discsnake.css
   Wspólny wygląd z DiscMaster / DiscShot / DiscDash / DiscSpace / DiscMan / DiscJump: HUD, pager, zakładki, ranking.
   Mobile: pionowo, cały ekran. PC: poziomo, max 1200px + panel boczny.
   ========================================================= */

:root {
    --bg: #050914;
    --bg2: #0a1430;
    --panel: rgba(8, 16, 38, .90);
    --cyan: #00e5ff;
    --blue: #2f7bff;
    --gold: #ffc83d;
    --green: #3dff8a;
    --red: #ff4466;
    --text: #e8f1ff;
    --muted: #8fa3c7;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    color: var(--text);
    background: radial-gradient(1100px 600px at 15% -10%, rgba(47, 123, 255, .25), transparent 60%),
                radial-gradient(900px 500px at 100% 110%, rgba(0, 229, 255, .18), transparent 60%),
                linear-gradient(180deg, var(--bg2), var(--bg));
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.game-container {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    overflow: hidden;
}

/* ===== HUD ===== */
.hud {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid rgba(0, 229, 255, .25);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: 0 0 20px rgba(0, 229, 255, .15);
    flex-shrink: 0;
}
.hud-box { display: flex; flex-direction: column; }
.hud-center { align-items: center; }
.hud-right { align-items: flex-end; }
.hud-label { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hud-value {
    font-size: 1.45rem; font-weight: 800; color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, .6);
    font-variant-numeric: tabular-nums;
    display: inline-block;
    transform-origin: left center;
}
.timer {
    font-size: 2rem; font-weight: 900; color: #fff;
    text-shadow: 0 0 12px rgba(47, 123, 255, .9);
    font-variant-numeric: tabular-nums;
}
.timer.low { color: var(--red); text-shadow: 0 0 14px rgba(255, 68, 102, .9); animation: timerPulse .5s ease-in-out infinite alternate; }
@keyframes timerPulse { from { transform: scale(1); } to { transform: scale(1.12); } }

/* ===== STATYSTYKI (mobile: pasek, PC: panel boczny) ===== */
.stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 34px;
    padding: 0 10px;
    background: rgba(8, 16, 38, .6);
    border-radius: 10px;
    font-size: .8rem;
    color: var(--muted);
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}
.stat { display: flex; align-items: baseline; gap: 5px; }
.stat-label { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.stat b { color: #fff; font-variant-numeric: tabular-nums; }
.stat-mult b { color: var(--gold); min-width: 2.2ch; }
.stat-exit b { color: var(--muted); }
.stat-exit.open b { color: var(--green); text-shadow: 0 0 8px rgba(61, 255, 138, .8); }
.stat-discs { display: flex; align-items: center; gap: 8px; }
.dc { display: inline-flex; align-items: center; gap: 3px; }
.dc b { color: #fff; font-variant-numeric: tabular-nums; min-width: 1.6ch; }
.stat-btns { display: flex; gap: 6px; }

.mute-btn.off { opacity: .45; filter: grayscale(1); }
.mute-btn {
    font-size: 1rem;
    background: transparent;
    border: 1px solid rgba(143, 163, 199, .4);
    border-radius: 999px;
    width: 30px; height: 26px;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    flex: 0 0 auto;
}

.progress {
    height: 6px; border-radius: 999px; overflow: hidden;
    background: rgba(143, 163, 199, .2);
    border: 1px solid rgba(0, 229, 255, .2);
    flex-shrink: 0;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    transition: width .15s linear;
}
.progress.done .progress-bar { background: linear-gradient(90deg, #1fcf6a, var(--green)); box-shadow: 0 0 10px var(--green); }

/* ===== ARENA – wypełnia całą wolną przestrzeń ===== */
.arena {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border-radius: 16px;
    border: 2px solid rgba(0, 229, 255, .3);
    background: #000;
    box-shadow: 0 0 30px rgba(0, 0, 0, .8), inset 0 0 40px rgba(47, 123, 255, .15);
    overflow: hidden;
}
#view {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
    touch-action: none;
}
.flash {
    position: absolute; inset: 0; z-index: 10;
    background: #fff; opacity: 0; pointer-events: none;
}
.flash.on { animation: flashOut .45s ease-out; }
@keyframes flashOut { 0% { opacity: .75; } 100% { opacity: 0; } }

.banner {
    position: absolute; left: 50%; top: 38%;
    transform: translate(-50%, -50%);
    z-index: 12; pointer-events: none;
    font-size: 1.7rem; font-weight: 900; letter-spacing: .08em; text-align: center;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold), 0 0 40px #ff0, 0 3px 4px #000;
    white-space: nowrap;
}
.banner[hidden] { display: none; }
.banner.show { animation: bannerPop 1.4s ease-out forwards; }
.banner small { display: block; font-size: .75rem; letter-spacing: .2em; color: var(--text); text-shadow: 0 2px 3px #000; margin-top: 4px; }
@keyframes bannerPop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
    15%  { opacity: 1; transform: translate(-50%, -55%) scale(1.15); }
    75%  { opacity: 1; transform: translate(-50%, -60%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -90%) scale(1); }
}

.touch-hint {
    position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 7;
    font-size: .72rem; letter-spacing: .14em; color: var(--muted); pointer-events: none;
    animation: hintFade 3.5s ease-out forwards; white-space: nowrap;
}
.touch-hint[hidden] { display: none; }
@keyframes hintFade { 0%, 70% { opacity: .9; } 100% { opacity: 0; } }
.timer.low { color: var(--red); text-shadow: 0 0 14px rgba(255, 68, 102, .9); animation: timerPulse .5s ease-in-out infinite alternate; }
@keyframes timerPulse { from { transform: scale(1); } to { transform: scale(1.12); } }

/* ===== STATYSTYKI (mobile: pasek, PC: panel boczny) ===== */
.stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 34px;
    padding: 0 10px;
    background: rgba(8, 16, 38, .6);
    border-radius: 10px;
    font-size: .8rem;
    color: var(--muted);
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}
.stat { display: flex; align-items: baseline; gap: 5px; }
.stat-label { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.stat b { color: #fff; font-variant-numeric: tabular-nums; }
.stat-mult b { color: var(--gold); min-width: 2.2ch; }
.stat-exit b { color: var(--muted); }
.stat-exit.open b { color: var(--green); text-shadow: 0 0 8px rgba(61, 255, 138, .8); }
.stat-discs { display: flex; align-items: center; gap: 8px; }
.dc { display: inline-flex; align-items: center; gap: 3px; }
.dc b { color: #fff; font-variant-numeric: tabular-nums; min-width: 1.6ch; }
.stat-btns { display: flex; gap: 6px; }

.mute-btn.off { opacity: .45; filter: grayscale(1); }
.mute-btn {
    font-size: 1rem;
    background: transparent;
    border: 1px solid rgba(143, 163, 199, .4);
    border-radius: 999px;
    width: 30px; height: 26px;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    flex: 0 0 auto;
}

.progress {
    height: 6px; border-radius: 999px; overflow: hidden;
    background: rgba(143, 163, 199, .2);
    border: 1px solid rgba(0, 229, 255, .2);
    flex-shrink: 0;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    transition: width .15s linear;
}
.progress.done .progress-bar { background: linear-gradient(90deg, #1fcf6a, var(--green)); box-shadow: 0 0 10px var(--green); }

/* ===== ARENA – wypełnia całą wolną przestrzeń ===== */
.arena {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border-radius: 16px;
    border: 2px solid rgba(0, 229, 255, .3);
    background: #000;
    box-shadow: 0 0 30px rgba(0, 0, 0, .8), inset 0 0 40px rgba(47, 123, 255, .15);
    overflow: hidden;
}
#view {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
    touch-action: none;
}
.flash {
    position: absolute; inset: 0; z-index: 10;
    background: #fff; opacity: 0; pointer-events: none;
}
.flash.on { animation: flashOut .45s ease-out; }
@keyframes flashOut { 0% { opacity: .75; } 100% { opacity: 0; } }

.banner {
    position: absolute; left: 50%; top: 38%;
    transform: translate(-50%, -50%);
    z-index: 12; pointer-events: none;
    font-size: 1.7rem; font-weight: 900; letter-spacing: .08em; text-align: center;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold), 0 0 40px #ff0, 0 3px 4px #000;
    white-space: nowrap;
}
.banner[hidden] { display: none; }
.banner.show { animation: bannerPop 1.4s ease-out forwards; }
.banner small { display: block; font-size: .75rem; letter-spacing: .2em; color: var(--text); text-shadow: 0 2px 3px #000; margin-top: 4px; }
@keyframes bannerPop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
    15%  { opacity: 1; transform: translate(-50%, -55%) scale(1.15); }
    75%  { opacity: 1; transform: translate(-50%, -60%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -90%) scale(1); }
}

/* ===== PRZYCISK STRZAŁU (tylko urządzenia dotykowe, tylko w trakcie gry) ===== */
.firepad { display: none; position: absolute; right: 12px; bottom: 14px; z-index: 8; pointer-events: none; }
.fire-btn {
    pointer-events: auto;
    width: 76px; height: 76px; border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, .45);
    background: rgba(8, 16, 38, .55);
    color: #fff; font-size: 2rem; line-height: 1;
    box-shadow: 0 0 18px rgba(0, 229, 255, .25);
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none; user-select: none;
}
.fire-btn.active { background: rgba(0, 229, 255, .3); transform: scale(.94); box-shadow: 0 0 22px rgba(0, 229, 255, .6); }
.arena.playing .firepad.touch { display: block; }
.touch-hint {
    position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 7;
    font-size: .72rem; letter-spacing: .14em; color: var(--muted); pointer-events: none;
    animation: hintFade 3.5s ease-out forwards;
}
.touch-hint[hidden] { display: none; }
@keyframes hintFade { 0%, 70% { opacity: .9; } 100% { opacity: 0; } }
.timer.low { color: var(--red); text-shadow: 0 0 14px rgba(255, 68, 102, .9); animation: timerPulse .5s ease-in-out infinite alternate; }
.stat-exit.on b { color: var(--gold); text-shadow: 0 0 8px rgba(255, 200, 61, .7); }
.stat-exit.dbl b { color: var(--cyan); text-shadow: 0 0 8px rgba(0, 229, 255, .7); }

/* ===== PŁYTY (ikony w menu) ===== */
.mini-disc { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: middle; }
.mini-disc.cd { background: conic-gradient(#1a3a2a, #2ecc71, #a8e6cf, #27ae60, #1abc9c, #16a085, #1a3a2a); box-shadow: 0 0 10px rgba(46, 204, 113, .45); }
.mini-disc.dvd { background: conic-gradient(#4a0a0a, #e53935, #ffb4a8, #c62828, #ff6659, #b71c1c, #ff9a8a, #4a0a0a); box-shadow: 0 0 10px rgba(255, 70, 70, .45); }
.mini-disc.bluray { background: conic-gradient(#0a3cff, #5fb4ff, #8a2be2, #00dfff, #0a3cff); }
.mini-disc.uhd { background: conic-gradient(#ffcc33, #fff0a0, #b8860b, #ffe27a, #ffcc33); box-shadow: 0 0 12px rgba(255, 200, 61, .6); }
.mini-disc.bd3d { background: conic-gradient(#0a3cff, #ff3355, #5fb4ff, #00dfff, #ff3355, #8a2be2, #0a3cff); box-shadow: 0 0 10px rgba(255, 60, 100, .45); }
.mini-disc.ld { background: conic-gradient(#ffffff, #b0c4de, #e6e6fa, #708090, #ffffff); }
.mini-disc.hddvd { background: conic-gradient(#2a0410, #6d0d26, #9b1b3c, #3d0715, #7a1230, #2a0410); box-shadow: 0 0 10px rgba(190, 30, 70, .6); }
.mini-disc.md { border-radius: 3px; background: conic-gradient(#5a4ab0, #9b8cff, #c4b5ff, #7a5cff, #5a4ab0); box-shadow: 0 0 8px rgba(155, 140, 255, .6); }
.mini-disc.black { background: radial-gradient(circle at 35% 35%, #5a5a5a, #1a1a1a 62%, #000); border: 1.5px solid #a0a0a0; box-shadow: 0 0 0 1px #3a3a3a, 0 0 8px rgba(200,200,200,.45); }
.rules-box li .mini-disc, .rules-box li .obj { margin-right: 4px; margin-bottom: 2px; }
.obj { display: inline-block; width: 13px; height: 13px; vertical-align: middle; }
.obj-rock { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c9c3b8, #8a8478 55%, #4e4a42); box-shadow: 0 1px 2px #000; }
.obj-rapid, .obj-double, .obj-life, .obj-dot, .obj-power { width: 15px; height: 15px; border-radius: 50%; }
.obj-dot { width: 8px; height: 8px; margin: 0 4px; background: conic-gradient(#00e5ff, #ff5fd2, #ffe27a, #2ecc71, #00e5ff); }
.obj-power { background: conic-gradient(#0a3cff, #5fb4ff, #8a2be2, #00dfff, #0a3cff); box-shadow: 0 0 8px #5fb4ff; }
.obj-rapid  { background: radial-gradient(circle at 35% 35%, #fff6c0, var(--gold)); box-shadow: 0 0 8px var(--gold); }
.obj-double { background: radial-gradient(circle at 35% 35%, #d8fbff, var(--cyan)); box-shadow: 0 0 8px var(--cyan); }
.obj-life   { background: radial-gradient(circle at 35% 35%, #ffd0dc, var(--red)); box-shadow: 0 0 8px var(--red); }
.obj-exit { border: 2px solid var(--green); border-radius: 3px; background: rgba(61, 255, 138, .25); box-shadow: 0 0 6px var(--green); }

.disc-big { display: block; width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; position: relative; }
.disc-big.cd     { background: conic-gradient(#1a3a2a, #2ecc71, #a8e6cf, #27ae60, #1abc9c, #16a085, #1a3a2a); box-shadow: 0 0 14px rgba(46,204,113,.5); }
.disc-big.dvd    { background: conic-gradient(#4a0a0a, #e53935, #ffb4a8, #c62828, #ff6659, #b71c1c, #ff9a8a, #4a0a0a); box-shadow: 0 0 14px rgba(255,70,70,.5); }
.disc-big.bluray { background: conic-gradient(#0a3cff, #5fb4ff, #8a2be2, #00dfff, #0a3cff); box-shadow: 0 0 14px rgba(95,180,255,.5); }
.disc-big.uhd    { background: conic-gradient(#ffcc33, #fff0a0, #b8860b, #ffe27a, #ffcc33); box-shadow: 0 0 14px rgba(255,200,61,.6); }
.disc-big.bd3d   { background: conic-gradient(#0a3cff, #ff3355, #5fb4ff, #00dfff, #ff3355, #8a2be2, #0a3cff); box-shadow: 0 0 14px rgba(255,60,100,.5); }
.disc-big.ld     { background: conic-gradient(#ffffff, #b0c4de, #e6e6fa, #708090, #ffffff); box-shadow: 0 0 14px rgba(230,230,250,.5); }
.disc-big.hddvd  { background: conic-gradient(#2a0410, #6d0d26, #9b1b3c, #3d0715, #7a1230, #2a0410); box-shadow: 0 0 14px rgba(190,30,70,.7); }
.disc-big::after {
    content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    width: 22%; height: 22%; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1a2a5a, #040812 85%);
    border: 2px solid rgba(255,255,255,.55);
    box-shadow: inset 0 0 6px rgba(0,0,0,.9), 0 0 4px rgba(255,255,255,.25);
}
.disc-big.md {
    border-radius: 8px;
    background: linear-gradient(135deg, #2a2a3a, #3a3a5a 18%, #4a4a6a 18%, #3a3a5a 22%, #2a2a3a 28%, #3a3a5a 100%);
    border: 2px solid #9b8cff;
    box-shadow: 0 0 16px rgba(155,140,255,.7), inset 0 0 10px rgba(0,0,0,.6);
    overflow: hidden;
}
.disc-big.md::before {
    content: ""; position: absolute; width: 62%; height: 62%; left: 50%; top: 54%; transform: translate(-50%,-50%);
    border-radius: 50%;
    background: conic-gradient(#5a4ab0, #9b8cff, #c4b5ff, #7a5cff, #5a4ab0);
    box-shadow: 0 0 10px rgba(155,140,255,.8);
}
.disc-big.md::after {
    content: ""; position: absolute; width: 36%; height: 16%; left: 50%; top: 10%; transform: translateX(-50%);
    background: linear-gradient(#888, #ccc 50%, #888); border: 1px solid #aaa; border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* ===== OVERLAY + PAGER ===== */
.overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgba(3, 7, 18, .95);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: default;
    padding: 8px;
}
.overlay.hidden { display: none; }
.panel { width: 100%; margin: auto; text-align: center; }

.panel.pager {
    flex: 1 1 auto; min-height: 0;
    max-width: none; margin: 0;
    display: grid; align-content: center;
    overflow-x: auto; overflow-y: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    grid-auto-flow: column; grid-auto-columns: 100%;
}
.pager::-webkit-scrollbar { display: none; }
.pg { min-width: 0; padding: 0 8px; align-self: center; scroll-snap-align: start; scroll-snap-stop: always; max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.pg::-webkit-scrollbar { display: none; }

.pager-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; padding-top: 8px; flex: 0 0 auto; }
.pager-tabs button {
    font: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
    color: var(--muted); background: transparent;
    border: 1px solid rgba(143, 163, 199, .4);
    border-radius: 999px; padding: 5px 14px; cursor: pointer;
}
.pager-tabs button.active {
    color: #031022; background: var(--cyan); border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, .6);
}

/* Ekrany z opisami nośników */
.disc-card {
    text-align: center; background: rgba(0,0,0,.3);
    border-radius: 14px; padding: 14px 16px;
    border: 1px solid rgba(0,229,255,.2);
    max-width: 380px; width: 100%; margin: 0 auto;
}
.disc-card h3 { color: var(--cyan); font-size: 1.05rem; margin-bottom: 4px; }
.disc-meta { font-size: .72rem; letter-spacing: .06em; color: var(--gold); margin-bottom: 8px; }
.disc-text { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; font-size: .78rem; line-height: 1.5; color: var(--muted); }

/* Strzałki lewo/prawo – tylko na PC */
.pager-arrow {
    display: none;
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 2;
    flex-direction: column; align-items: center; gap: 6px;
    background: none; border: 0;
    color: var(--muted); font: inherit;
    cursor: pointer; padding: 8px;
    transition: color .15s ease, transform .15s ease;
}
.pager-arrow.prev { left: 16px; }
.pager-arrow.next { right: 16px; }
.pager-arrow[hidden] { display: none !important; }
.pager-arrow .pa-icon {
    width: 52px; height: 52px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 2.2rem; line-height: 1; padding-bottom: 4px;
    color: var(--cyan);
    border: 1px solid rgba(0, 229, 255, .45);
    background: rgba(8, 16, 38, .7);
    box-shadow: 0 0 14px rgba(0, 229, 255, .25);
    transition: background .15s ease, box-shadow .15s ease;
}
.pager-arrow .pa-label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; }
.pager-arrow:hover { color: #fff; }
.pager-arrow:hover .pa-icon { background: rgba(0, 229, 255, .22); box-shadow: 0 0 20px rgba(0, 229, 255, .55); }
.pager-arrow.prev:active { transform: translateY(-50%) translateX(-3px); }
.pager-arrow.next:active { transform: translateY(-50%) translateX(3px); }

.title { font-size: 2rem; font-weight: 900; letter-spacing: .08em; color: #fff; margin-bottom: 6px; }
.title span { color: var(--cyan); }
.title-link {
    display: inline-flex; align-items: center; justify-content: center; gap: .3em;
    color: inherit; text-decoration: none; white-space: nowrap;
    transition: text-shadow .15s ease;
}
.title-link:hover, .title-link:focus-visible { text-shadow: 0 0 14px rgba(0, 229, 255, .7); }
.title-text { font-weight: inherit; }
.title-disc {
    flex: 0 0 auto;
    width: 1.7em; height: 1.7em;
    border-radius: 50%;
    background: conic-gradient(#0a3cff, #5fb4ff, #8a2be2, #00dfff, #ffcc33, #0a3cff);
    box-shadow: 0 0 18px rgba(95, 180, 255, .65), 0 0 36px rgba(0, 229, 255, .35);
    display: grid; place-items: center;
    animation: titleDiscSpin 2.8s linear infinite, titleDiscGlow 1.8s ease-in-out infinite alternate;
    position: relative;
}
.title-disc::after {
    content: ""; width: 22%; height: 22%; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1a2a5a, #040812 70%);
    border: 2px solid rgba(255,255,255,.55);
    box-shadow: inset 0 0 6px rgba(0,0,0,.9), 0 0 4px rgba(255,255,255,.3);
    position: relative; z-index: 1;
}
@keyframes titleDiscSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes titleDiscGlow {
    0% { box-shadow: 0 0 18px rgba(95,180,255,.65), 0 0 36px rgba(0,229,255,.25); filter: brightness(1); }
    100% { box-shadow: 0 0 26px rgba(95,180,255,.9), 0 0 50px rgba(0,229,255,.5), 0 0 70px rgba(47,123,255,.25); filter: brightness(1.15); }
}
.title-link:hover .title-disc { animation-duration: 0.9s, 0.6s; }
.lead { margin: 0 auto 14px; font-size: .85rem; color: var(--muted); max-width: 340px; }

.btn {
    width: 100%; max-width: 280px;
    margin: 12px 0; padding: 14px;
    font: inherit; font-size: 1.05rem; font-weight: 900;
    color: #031022; border: 0; border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 20px rgba(0, 229, 255, .5);
    cursor: pointer;
    transition: transform .12s ease;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .6; }
.btn[hidden] { display: none; }
.btn.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; max-width: 280px;
    margin: 8px 0 0; padding: 12px 16px;
    font-size: .9rem; font-weight: 700;
    color: var(--text);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(143,163,199,.35);
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.08);
    transition: transform .08s ease, background .12s ease;
}
.btn.btn-secondary:hover { background: rgba(255,255,255,.13); }
.btn.btn-secondary:active { transform: translateY(2px); box-shadow: none; }

.name-field { margin: 10px auto; width: 100%; max-width: 260px; }
.name-field label { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.name-field input {
    width: 100%; padding: 11px; border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, .4);
    background: rgba(8, 16, 38, .8);
    color: #fff; text-align: center; font-size: 1rem;
    user-select: text; -webkit-user-select: text;
}
.name-field .req { color: var(--red); }
.name-error { color: var(--red); font-size: .8rem; min-height: 1.2em; }
.name-error[hidden] { display: none; }

/* wybór poziomu */
.level-pick {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
    width: 100%; max-width: 360px; margin: 8px auto 0;
}
.lv {
    position: relative;
    font: inherit; color: var(--text);
    background: rgba(8, 16, 38, .7);
    border: 1px solid rgba(143, 163, 199, .35);
    border-radius: 10px; padding: 7px 0 6px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    line-height: 1.1;
}
.lv b { font-size: 1.05rem; font-weight: 900; }
.lv .mini-disc { width: 12px; height: 12px; margin-top: 2px; }
.lv small { font-size: .56rem; color: var(--muted); letter-spacing: .04em; min-height: .7rem; }
.lv.done small { color: var(--green); }
.lv.sel { border-color: var(--cyan); background: rgba(0, 229, 255, .18); box-shadow: 0 0 12px rgba(0, 229, 255, .45); }
.lv.locked { opacity: .4; cursor: not-allowed; }
.level-desc { min-height: 2.6em; max-width: 340px; margin: 8px auto 0; font-size: .78rem; color: var(--muted); }
.level-desc b { color: var(--cyan); display: block; margin-bottom: 2px; letter-spacing: .06em; }

/* ranking */
.rank-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 4px auto 8px; max-width: 460px; }
.rank-chips button {
    font: inherit; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
    color: var(--muted); background: transparent;
    border: 1px solid rgba(143,163,199,.35); border-radius: 999px;
    padding: 3px 10px; cursor: pointer;
}
.rank-chips button.active { color: #031022; background: var(--gold); border-color: var(--gold); }
.ranking { width: 100%; max-width: 380px; margin: 6px auto 0; border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.ranking th { color: var(--muted); padding: 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
.ranking td { padding: 5px 3px; }
.ranking td small { color: var(--muted); }
.ranking tr.my-rank {
    background: linear-gradient(90deg, rgba(61, 255, 138, .22), rgba(61, 255, 138, .10));
    box-shadow: 0 0 12px rgba(61, 255, 138, .35);
    color: #d6ffe6;
    font-weight: 700;
}
.ranking tr.my-rank td { color: #b8ffcf; text-shadow: 0 0 6px rgba(61, 255, 138, .6); }
.ranking tr.my-rank td:first-child { border-radius: 8px 0 0 8px; }
.ranking tr.my-rank td:last-child { border-radius: 0 8px 8px 0; }
.sub { font-size: .9rem; color: var(--cyan); margin: 8px 0; }

.rules-box {
    text-align: left; background: rgba(0,0,0,.3);
    border-radius: 14px; padding: 14px 16px;
    font-size: .8rem; line-height: 1.5; color: var(--muted);
    border: 1px solid rgba(0,229,255,.2);
    max-width: 380px; width: 100%; margin: 0 auto;
}
.rules-box h3 { color: var(--cyan); font-size: 1rem; margin-bottom: 8px; text-align: center; }
.rules-box ul { padding-left: 18px; list-style: none; padding-left: 0; }
.rules-box li { margin-bottom: 8px; }
.rules-box strong { color: var(--text); }

.gameover { font-size: 1.8rem; color: var(--red); }
.gameover.win { color: var(--green); text-shadow: 0 0 16px rgba(61, 255, 138, .6); }
.end-reason { color: var(--muted); font-size: .85rem; margin: 2px 0 8px; min-height: 1.2em; }
.final strong { color: var(--cyan); font-size: 1.6rem; }
.final-best { margin: 4px 0; color: var(--muted); }
.final-best strong { color: var(--text); }
.summary-discs { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 6px; margin: 10px 0; font-size: .8rem; }
.stats-summary h3 { font-size: .85rem; color: var(--muted); font-weight: 600; }
.save-status { min-height: 1.3em; margin: 6px 0; font-size: .85rem; color: var(--muted); }
.end-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin-top: 4px; }
.end-actions .btn { margin: 4px 0; }

.pause { background: rgba(3, 7, 18, .82); align-items: center; justify-content: center; }
.pause-panel { max-width: 300px; display: flex; flex-direction: column; align-items: center; }

.site-footer { display: none; }
.footer-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--muted); text-decoration: none;
    transition: color .15s ease;
}
.footer-link .mini-disc { width: 12px; height: 12px; flex: 0 0 auto; }
.footer-link:hover, .footer-link:focus-visible { color: var(--cyan); }

/* ===== MOBILE (≤799px) – pionowo, cały ekran ===== */
@media (max-width: 799px) {
    .pager-tabs { gap: 5px; }
    .pager-tabs button { padding: 4px 9px; font-size: .62rem; letter-spacing: .06em; }
    .game-container { max-width: none; padding: 4px; gap: 4px; }
    .arena { border-radius: 12px; }
    .pg .title { font-size: clamp(1.7rem, 8vw, 2.2rem); }
    .btn { padding: 12px; font-size: 1rem; }
    .rules-box { font-size: .78rem; padding: 12px; }
    .ranking { font-size: .72rem; }
    .gameover { font-size: 1.6rem; }
    .final strong { font-size: 1.4rem; }
    .title-disc { animation: none; }
    .stats { gap: 6px; padding: 0 8px; font-size: .72rem; }
    .stat-label { display: none; }
    .stat-exit b { font-size: .65rem; }
    .stat-discs { gap: 5px; }
    .banner { font-size: 1.3rem; }
}
@media (max-width: 799px) and (max-height: 640px) {
    .hud { padding: 3px 10px; }
    .hud-value { font-size: 1.2rem; }
    .timer { font-size: 1.6rem; }
    .stats { height: 30px; }
    .title { font-size: 1.5rem; }
    .lead { font-size: .75rem; margin-bottom: 6px; }
}


/* ===== DESKTOP (≥800px) – poziomo, max 1200px ===== */
@media (min-width: 800px) {
    body { align-items: center; padding: 12px; }

    .game-container {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        grid-template-areas:
            "hud hud"
            "prog prog"
            "side arena"
            "foot foot";
        gap: 12px;
        max-width: 1200px;
        height: min(100%, 820px);
        padding: 12px;
    }
    .hud { grid-area: hud; padding: 10px 22px; }
    .hud-value { font-size: 2rem; }
    .timer { font-size: 2.6rem; }
    .progress { grid-area: prog; height: 8px; }

    .stats {
        grid-area: side;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        height: auto;
        padding: 14px;
        font-size: .95rem;
        border: 1px solid rgba(0, 229, 255, .18);
        border-radius: 14px;
        overflow: visible;
    }
    .stat {
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        background: rgba(255, 255, 255, .04);
        border-radius: 10px;
    }
    .stat b { font-size: 1.3rem; }
    .stat-exit b { font-size: 1rem; }
    .stat-discs {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, .04);
        border-radius: 10px;
    }
    .dc { justify-content: space-between; }
    .dc .mini-disc { width: 22px; height: 22px; }
    .dc b { font-size: 1.1rem; text-align: right; }
    .stat-btns { margin-top: auto; }
    .mute-btn.off { opacity: .45; filter: grayscale(1); }
.mute-btn { flex: 1; width: auto; height: 38px; font-size: 1.2rem; border-radius: 10px; }

    .arena { grid-area: arena; width: auto; height: auto; }

    .site-footer {
        display: block; grid-area: foot;
        text-align: center; font-size: .65rem; color: var(--muted);
    }

    .overlay { padding: 20px 110px 14px; }
    .pager-arrow { display: flex; }
    .pg { padding: 0 12px; }

    .title { font-size: 2.6rem; }
    .lead { font-size: .95rem; max-width: 420px; }
    .disc-card { max-width: 700px; padding: 22px 28px; }
    .disc-text { font-size: .95rem; }
    .rules-box { max-width: 700px; font-size: .95rem; padding: 22px 28px; }
    .rules-box h3 { font-size: 1.3rem; }
    .ranking { max-width: 700px; font-size: .95rem; }
    .ranking tr.my-rank {
        background: linear-gradient(90deg, rgba(61, 255, 138, .38), rgba(61, 255, 138, .18));
        box-shadow: 0 0 18px rgba(61, 255, 138, .55), inset 0 0 12px rgba(61, 255, 138, .18);
        color: #e0ffe8; font-weight: 800;
    }
    .ranking tr.my-rank td { color: #c0ffcf; text-shadow: 0 0 10px rgba(61, 255, 138, .85); font-weight: 800; }
    .ranking td { padding: 7px 4px; }
    .sub { font-size: 1.1rem; }
    .gameover { font-size: 2.2rem; }
    .final strong { font-size: 1.9rem; }
    .level-pick { max-width: 460px; grid-template-columns: repeat(5, 1fr); }
    .level-desc { max-width: 460px; font-size: .85rem; }
    .banner { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .title-disc, .timer.low { animation: none; }
}
/* ===== DiscPinball – dodatki ===== */
.level-pick { grid-template-columns: repeat(5, 1fr); }
.mini-disc.hddvd { background: conic-gradient(#3a0620, #a0144e, #ff6fa8, #7a0f3a, #d81b60, #3a0620); box-shadow: 0 0 10px rgba(216, 27, 96, .6); }
.disc-big.hddvd  { background: conic-gradient(#3a0620, #a0144e, #ff6fa8, #7a0f3a, #d81b60, #3a0620); box-shadow: 0 0 14px rgba(216,27,96,.7); }
.stat-discs .dc b { min-width: 1.2em; }
.btn[hidden], [hidden] { display: none !important; }
@media (max-width: 520px) {
    .stats .stat-discs { display: none; }
    .stats .stat-btns { margin-left: auto; }
}

.bonus-note { margin: 0 0 8px; color: var(--muted, #9aa8c7); font-size: .92rem; }
.bonus-list li { margin-bottom: 6px; }
#view { touch-action: none; }

.menu-hero { display: block; width: 260px; max-width: 72%; height: auto; aspect-ratio: 320 / 120; margin: 0 auto 2px; }
.disc-big.md, .disc-big.hddvd { opacity: .55; }
/* przyciski dotykowe łapek */

/* =========================================================
   DiscMusic – studio
   ========================================================= */
.arena { background: radial-gradient(ellipse at 50% 30%, #0d1838 0%, #050914 70%); }
.studio {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px 12px 12px;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; justify-content: center; flex: 0 0 auto; }
.tb {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 38px; padding: 6px 11px;
    color: var(--text); font: 800 .78rem/1 inherit; letter-spacing: .03em;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(0, 229, 255, .22); border-radius: 10px;
    cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.tb:hover { background: rgba(0, 229, 255, .14); border-color: rgba(0, 229, 255, .55); }
.tb:active { transform: scale(.96); }
.tb .ic { font-size: 1rem; }
.tb-play { min-width: 96px; justify-content: center; background: linear-gradient(135deg, #00c8ff, #2f7bff); border-color: transparent; color: #021022; }
.tb-play:hover { background: linear-gradient(135deg, #39d9ff, #4b8dff); }
.tb-play.on { background: linear-gradient(135deg, #ff4f8b, #ff8a3d); color: #fff; box-shadow: 0 0 16px rgba(255, 79, 139, .55); }
.tb-magic { background: linear-gradient(135deg, rgba(179, 136, 255, .35), rgba(255, 200, 61, .25)); border-color: rgba(255, 200, 61, .45); }
.tb-tempo input { width: 90px; accent-color: var(--cyan); }
.tb-tempo b { min-width: 2.2em; text-align: right; color: var(--cyan); }
.tb select {
    background: #0b1430; color: var(--text); border: 1px solid rgba(0, 229, 255, .3); border-radius: 6px;
    font: 700 .78rem inherit; padding: 4px 6px; cursor: pointer;
}
.tb-page { display: none; }
.tb-evo.on { background: rgba(61, 255, 138, .2); border-color: var(--green); box-shadow: 0 0 12px rgba(61, 255, 138, .4); }
.tb.busy { opacity: .55; pointer-events: none; }

/* panele trybów */
.mode-panel {
    flex: 0 0 auto;
    background: rgba(8, 16, 38, .78); border: 1px solid rgba(0, 229, 255, .2); border-radius: 12px;
    padding: 8px 12px; font-size: .8rem;
}
.ch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.ch-head b { color: var(--gold); font-size: .95rem; letter-spacing: .03em; }
.ch-time { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--cyan); }
.ch-time.low { color: var(--red); animation: pulse .6s infinite alternate; }
.ch-goals { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ch-goals li { color: var(--muted); }
.ch-goals li::before { content: '○ '; color: var(--muted); }
.ch-goals li.ok { color: var(--green); }
.ch-goals li.ok::before { content: '✔ '; color: var(--green); }
.ch-listen { margin-top: 6px; display: flex; align-items: center; gap: 10px; color: var(--green); font-weight: 800; }
.ch-listen i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ch-listen em { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--cyan)); }
.lab-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.lab-tabs button, .lab-presets button {
    padding: 4px 9px; border-radius: 999px; cursor: pointer;
    font: 700 .72rem inherit; color: var(--text);
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
}
.lab-tabs button.on, .lab-presets button.on { border-color: var(--cyan); background: rgba(0, 229, 255, .18); }
.lab-text { color: #c9d6ee; margin-bottom: 6px; line-height: 1.35; }
.lab-presets { display: flex; flex-wrap: wrap; gap: 4px; }

/* siatka */
.grid-wrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.grid {
    --cell: 40px; --head: 150px; --cols: 16;
    display: grid;
    grid-template-columns: var(--head) repeat(var(--cols), var(--cell));
    grid-auto-rows: var(--cell);
    gap: 4px;
}
.rh {
    display: flex; align-items: center; gap: 6px;
    padding: 0 6px 0 2px; min-width: 0;
    border-radius: 10px; background: rgba(255, 255, 255, .04);
}
.rh-disc {
    flex: 0 0 auto; width: calc(var(--cell) * .82); height: calc(var(--cell) * .82);
    border: 0; border-radius: 50%; cursor: pointer; position: relative;
    background: var(--disc); box-shadow: 0 0 10px var(--glow);
    animation: spin 2.4s linear infinite; animation-play-state: paused;
}
.rh-disc::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: #0a0e18; box-shadow: 0 0 0 3px rgba(255, 255, 255, .45); }
.rh.md .rh-disc { border-radius: 22%; }
.playing-on .rh-disc { animation-play-state: running; }
.rh.pulse .rh-disc { box-shadow: 0 0 22px var(--glow), 0 0 0 2px #fff; }
.rh-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.1; }
.rh-txt b { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-txt small { font-size: .62rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-ms { display: flex; flex-direction: column; gap: 2px; }
.rh-ms button {
    width: 20px; height: 17px; padding: 0; border-radius: 4px; cursor: pointer;
    font: 900 .6rem/1 inherit; color: var(--muted);
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15);
}
.rh-ms button.m.on { background: var(--red); color: #fff; border-color: var(--red); }
.rh-ms button.s.on { background: var(--gold); color: #1a1202; border-color: var(--gold); }
.rh.muted { opacity: .45; }

.cell {
    position: relative; border: 0; padding: 0; cursor: pointer;
    border-radius: 50%;
    background: radial-gradient(circle, #0a0e18 0 17%, rgba(255, 255, 255, .05) 18% 64%, rgba(255, 255, 255, .1) 65% 69%, transparent 70%);
    transition: transform .08s;
    touch-action: none;
}
.cell.beat { background: radial-gradient(circle, #0a0e18 0 17%, rgba(255, 255, 255, .08) 18% 64%, rgba(255, 255, 255, .18) 65% 69%, transparent 70%); }
.cell.now { background: radial-gradient(circle, #0a0e18 0 17%, rgba(0, 229, 255, .16) 18% 64%, rgba(0, 229, 255, .5) 65% 69%, transparent 70%); }
.cell.on { background: none; box-shadow: 0 0 8px var(--glow); }
.cell.on::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(circle, #0a0e18 0 14%, rgba(255, 255, 255, .6) 15% 19%, transparent 20%), var(--disc);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
    animation: spin 3s linear infinite; animation-play-state: paused;
}
.playing-on .cell.on::before { animation-play-state: running; }
.cell.md, .cell.md.on { border-radius: 24%; }
.cell.on.now { transform: scale(1.06); box-shadow: 0 0 18px var(--glow), 0 0 0 2px #fff; }
.cell.hit { animation: hitpop .28s ease-out; }
/* wysokość dźwięku – kreska na krawędzi płyty */
.cell.on[data-t]::after {
    content: attr(data-t); position: absolute; right: -2px; bottom: -3px;
    min-width: 14px; height: 14px; padding: 0 2px; border-radius: 7px;
    font: 900 .55rem/14px inherit; text-align: center; color: #021022;
    background: #fff; box-shadow: 0 0 6px var(--glow);
}
.cell.page-off, .colhead.page-off { display: none; }
.cell:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hitpop { 0% { transform: scale(1.2); filter: brightness(1.7); } 100% { transform: scale(1.06); filter: none; } }
@keyframes pulse { to { opacity: .55; } }

/* kolory instrumentów (seria Disc) */
.f-cd   { --disc: conic-gradient(#1a3a2a, #2ecc71, #a8e6cf, #27ae60, #1abc9c, #16a085, #1a3a2a); --glow: rgba(46, 204, 113, .65); }
.f-dvd  { --disc: conic-gradient(#4a0a0a, #e53935, #ffb4a8, #c62828, #ff6659, #b71c1c, #ff9a8a, #4a0a0a); --glow: rgba(255, 70, 70, .65); }
.f-bd   { --disc: conic-gradient(#0a3cff, #5fb4ff, #8a2be2, #00dfff, #0a3cff); --glow: rgba(95, 139, 255, .75); }
.f-ld   { --disc: conic-gradient(#ffffff, #b0c4de, #e6e6fa, #708090, #ffffff); --glow: rgba(220, 230, 255, .6); }
.f-md   { --disc: conic-gradient(#5a4ab0, #9b8cff, #c4b5ff, #7a5cff, #5a4ab0); --glow: rgba(155, 140, 255, .7); }
.f-uhd  { --disc: conic-gradient(#ffcc33, #fff0a0, #b8860b, #ffe27a, #ffcc33); --glow: rgba(255, 200, 61, .75); }

/* wybór trybu w menu */
.mode-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 460px; margin: 0 auto 8px; }
.mode {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
    padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text);
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
}
.mode b { font-size: .85rem; }
.mode small { font-size: .66rem; color: var(--muted); line-height: 1.2; }
.mode.sel { border-color: var(--cyan); background: rgba(0, 229, 255, .16); box-shadow: 0 0 12px rgba(0, 229, 255, .35); }
.level-pick[hidden], .name-field[hidden] { display: none !important; }

/* utwory */
.songs-panel { max-width: 520px; width: 100%; }
.songs-note { color: var(--muted); font-size: .78rem; margin-bottom: 8px; text-align: center; }
.songs-list { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-bottom: 8px; }
.slot { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.slot .sl-name { flex: 1 1 auto; min-width: 0; font-size: .8rem; }
.slot .sl-name small { display: block; color: var(--muted); font-size: .66rem; }
.slot button { padding: 6px 9px; border-radius: 8px; cursor: pointer; font: 800 .7rem inherit; color: var(--text); background: rgba(0, 229, 255, .14); border: 1px solid rgba(0, 229, 255, .35); }
.slot button.del { background: rgba(255, 68, 102, .12); border-color: rgba(255, 68, 102, .4); }
.slot button:disabled { opacity: .35; cursor: default; }
.songs-actions { display: flex; flex-direction: column; align-items: center; width: 100%; }

@media (max-width: 799px) {
    .studio { padding: 6px 6px 8px; gap: 6px; }
    .tb { min-height: 34px; padding: 5px 8px; font-size: .7rem; }
    .tb .tx { display: none; }
    .tb-play .tx, .tb-page .tx, .tb-tempo b { display: inline; }
    .tb-tempo input { width: 70px; }
    .tb-page { display: inline-flex; }
    .grid { gap: 3px; }
    .rh { gap: 3px; padding: 0 2px; }
    .rh-txt small { display: none; }
    .rh-txt b { font-size: .62rem; }
    .rh-ms button { width: 17px; height: 15px; font-size: .52rem; }
    .mode-panel { font-size: .7rem; padding: 6px 8px; }
    .ch-goals { gap: 2px 10px; }
    .mode { padding: 6px 8px; }
    .mode small { display: none; }
}
.rh-mini { pointer-events: none; opacity: .85; }
.rh-mini .rh-disc { cursor: default; }
.grid.split .rh-txt b { font-size: .6rem; }
.rh[hidden] { display: none !important; }
.touch-hint { top: auto !important; bottom: 10px !important; white-space: normal !important; max-width: 92%; text-align: center; font-size: .72rem; z-index: 9; }
.tb-tempo .tx, .tb-style .tx { font-size: .95rem; }
@media (max-width: 799px) {
    .tb select { max-width: 118px; }
    .tb-tempo input { width: 64px; }
}
.tb-menu { background: rgba(255, 255, 255, .03); }
.tb-tpl select { max-width: 170px; }
@media (max-width: 799px) {
    .tb-tpl select { max-width: 112px; }
}
@media (max-width: 799px) {
    .toolbar { gap: 4px; }
    .tb { min-height: 32px; padding: 4px 7px; }
    .tb-play { min-width: 84px; }
}

/* ===== DiscMusic v3 ===== */
.f-bd3d { --disc: conic-gradient(#0a3cff, #ff3355, #5fb4ff, #00dfff, #ff3355, #8a2be2, #0a3cff); --glow: rgba(255, 60, 140, .65); }
.tb-sel select { max-width: 150px; }
.tb-pat select { max-width: 84px; }
.tb.on { border-color: var(--cyan); background: rgba(0, 229, 255, .2); box-shadow: 0 0 12px rgba(0, 229, 255, .35); }
.bar-tabs { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; font-size: .75rem; }
.bar-tabs .bt-lbl { color: var(--muted); font-weight: 700; }
.bar-tabs button {
    min-width: 34px; height: 28px; padding: 0 9px; border-radius: 8px; cursor: pointer;
    font: 800 .78rem inherit; color: var(--text);
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
}
.bar-tabs button.on { border-color: var(--cyan); background: rgba(0, 229, 255, .2); }
.bar-tabs button.play { box-shadow: 0 0 0 2px var(--green) inset; }
.bar-tabs .bt-copy { font-size: .68rem; font-weight: 700; color: var(--muted); }
.rh { position: relative; }
.rh-meter { position: absolute; left: 1px; top: 15%; bottom: 15%; width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.rh-meter em { position: absolute; inset: 0; background: var(--glow); transform-origin: bottom; transform: scaleY(0); box-shadow: 0 0 6px var(--glow); }
.mix-panel .mix-row, .fx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.mix-panel label, .fx-row label { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #c9d6ee; }
.mix-panel select { background: #0b1430; color: var(--text); border: 1px solid rgba(0, 229, 255, .3); border-radius: 6px; font: 700 .74rem inherit; padding: 3px 4px; max-width: 150px; }
.mix-act { margin-top: 6px; }
.mix-act .tb { min-height: 32px; }
.mix-note { color: var(--muted); font-size: .7rem; }
.fx-row input[type=range] { width: 90px; accent-color: var(--cyan); }
.space-btns { display: inline-flex; border-radius: 9px; overflow: hidden; border: 1px solid rgba(0, 229, 255, .35); }
.space-btns button { padding: 6px 10px; border: 0; cursor: pointer; font: 800 .72rem inherit; color: var(--text); background: rgba(255, 255, 255, .04); }
.space-btns button + button { border-left: 1px solid rgba(0, 229, 255, .25); }
.space-btns button.on { background: linear-gradient(135deg, #00c8ff, #8a5cff); color: #fff; }
#boostBtn.on { border-color: var(--gold); background: rgba(255, 200, 61, .22); box-shadow: 0 0 12px rgba(255, 200, 61, .4); }
.vol-head { display: none; }
.vol-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin-top: 8px; max-height: 160px; overflow: auto; }
.vol { display: grid; grid-template-columns: 10px 74px 1fr 1fr; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; }
.vol input { width: 100%; min-width: 0; accent-color: var(--cyan); }
.vol input.pan { accent-color: var(--gold); }
.mini-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--disc); box-shadow: 0 0 6px var(--glow); }
@media (max-width: 799px) {
    .tb-sel select { max-width: 104px; }
    .tb-pat select { max-width: 70px; }
    .mix-panel select { max-width: 120px; }
    .vol-list { grid-template-columns: 1fr; max-height: 150px; }
    .fx-row input[type=range] { width: 70px; }
    .mix-note { display: none; }
}
.tb-play.on { background: linear-gradient(135deg, #ff4f8b, #ff8a3d); color: #fff; border-color: transparent; box-shadow: 0 0 16px rgba(255, 79, 139, .55); }
.rh-ms { flex-direction: row; gap: 2px; }
.lab-presets { max-height: 58px; overflow: auto; }
.lab-tabs button, .lab-presets button { padding: 3px 8px; font-size: .68rem; }
.lab-text { margin-bottom: 4px; font-size: .76rem; }
.mode-panel { padding: 6px 10px; }
