/* Fractura · estéreo de ESCUCHAR (traído de la V2) en los colores de la principal:
   cian (trazo), rosa (secundario), ámbar (picos) sobre el verde-noche de la pantallita */
.rep {
  --st-bg: #051110;
  --st-pri: var(--cian);
  --st-sec: var(--rosa);
  --st-warn: var(--ambar);
  --st-grid: rgba(111, 228, 214, .1);
  --st-txt: rgba(111, 228, 214, .8);
  --st-cd-rim: #2a5f61;
  --st-cd-surface: #091517;
}

/* selector de visualización */
.st-switch-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.st-switch-label { font-family: var(--pixel); font-size: 18px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-switch { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-sw-btn {
  min-block-size: 32px; padding: 4px 12px; border-radius: var(--r-s); border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--muted);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 0 rgba(0, 0, 0, .4);
  transition: border-color .15s, color .15s, transform .14s var(--ease);
}
.st-sw-btn:hover { border-color: var(--cian); color: var(--ink); transform: translateY(-1px); }
.st-sw-btn:active { transform: translateY(1px); }
.st-sw-btn[aria-pressed="true"] { background: var(--cian); border-color: var(--cian); color: #0a1614; font-weight: 600; box-shadow: 0 0 14px rgba(111, 228, 214, .35); }

/* la pantallita muestra solo la visualización elegida */
.rep-deck { position: relative; z-index: 1; margin: 4px 0 2px; }
.rep-deck .st-panel { display: none; }
html[data-estereo="osciloscopio"] .rep-deck .st-panel[data-st="osciloscopio"],
html[data-estereo="discman"] .rep-deck .st-panel[data-st="discman"],
html[data-estereo="vumetro"] .rep-deck .st-panel[data-st="vumetro"] { display: block; }
.st-panel { animation: st-entra .28s var(--ease) both; }
@keyframes st-entra { from { opacity: 0; transform: translateY(4px); } }

/* 1 · osciloscopio */
.st-panel-osc {
  border: 1px solid rgba(111, 228, 214, .22); border-radius: var(--r-s); padding: 8px 10px 6px;
  background: linear-gradient(var(--st-grid) 1px, transparent 1px) 0 0 / 100% 24px,
              linear-gradient(90deg, var(--st-grid) 1px, transparent 1px) 0 0 / 28px 100%, var(--st-bg);
}
.st-osc-head { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 15px; letter-spacing: .06em; color: var(--st-txt); margin-bottom: 2px; }
.st-osc-lock { color: var(--st-warn); }
.st-osc { width: 100%; height: 96px; display: block; }

/* 2 · discman */
.st-panel-disc { border: 1px solid var(--st-cd-rim); border-radius: var(--r-s); background: var(--st-cd-surface); padding: 12px 14px; }
.st-cd-deck { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 16px; }
.st-cd-tray { position: relative; width: 108px; height: 108px; border-radius: 50%; padding: 6px; border: 1.5px solid var(--st-cd-rim); background: var(--st-bg); display: grid; place-items: center; }
.st-cd-ring-prog { position: absolute; inset: 2px; border-radius: 50%; pointer-events: none; background: conic-gradient(var(--st-pri) var(--cd-p, 12%), transparent 0); -webkit-mask: radial-gradient(circle, transparent 47px, #000 48px); mask: radial-gradient(circle, transparent 47px, #000 48px); opacity: .85; }
.st-cd-disc { position: relative; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #1c1f26 0 18%, #d6d8df 19% 35%, #b8bcc8 36% 96%, #7d8392 100%); border: 1px solid rgba(255, 255, 255, .32); display: grid; place-items: center; will-change: transform; overflow: hidden; }
.st-cd-sheen { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; background: conic-gradient(from 25deg, rgba(255,255,255,0) 0deg, rgba(111,228,214,.42) 38deg, rgba(240,138,230,.35) 68deg, rgba(255,255,255,0) 105deg, rgba(255,255,255,0) 180deg, rgba(111,228,214,.35) 218deg, rgba(255,165,58,.32) 252deg, rgba(255,255,255,0) 295deg); }
.st-cd-grooves { position: absolute; inset: 7px; border-radius: 50%; pointer-events: none; background: repeating-radial-gradient(circle, transparent 0 3px, rgba(0, 0, 0, .09) 3px 4px); }
.st-cd-label { position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: var(--st-pri); color: var(--st-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; font-family: var(--mono); font-size: 7.5px; letter-spacing: .04em; text-shadow: none; }
.st-cd-label strong { font-size: 10px; }
.st-cd-hub { position: absolute; z-index: 3; width: 14px; height: 14px; border-radius: 50%; background: var(--st-bg); border: 2px solid var(--st-pri); }
.st-cd-laser { position: absolute; right: 9px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--st-sec); opacity: var(--cd-laser, .35); box-shadow: 0 0 10px var(--st-sec); pointer-events: none; }
.st-cd-meta { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-family: var(--pixel); }
.st-cd-badge { font-size: 15px; letter-spacing: .06em; color: var(--st-sec); }
.st-cd-readout { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 18px; color: var(--st-txt); }
.st-cd-rpm { font-size: 15px; color: var(--st-warn); }
.st-cd-progress { height: 5px; border-radius: 99px; background: rgba(111, 228, 214, .18); overflow: hidden; }
.st-cd-bar { display: block; height: 100%; width: var(--cd-bar, 12%); background: linear-gradient(90deg, var(--magenta), var(--st-pri)); }
.st-cd-hint { font-size: 14px; color: var(--st-txt); opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 3 · vúmetro + 16 bandas */
.st-panel-vu { border: 1px solid rgba(111, 228, 214, .2); border-radius: var(--r-s); background: var(--st-bg); padding: 10px; }
.st-vu-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.st-vu-gauge { background: var(--st-cd-surface); border: 1px solid rgba(111, 228, 214, .16); border-radius: 6px; padding: 6px 8px 4px; color: var(--st-pri); }
.st-vu-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--pixel); font-size: 14px; color: var(--st-txt); }
.st-vu-led { width: 7px; height: 7px; border-radius: 50%; background: #2e1f36; border: 1px solid #5b3f6b; }
.st-vu-led.on { background: var(--magenta); border-color: var(--rosa); box-shadow: 0 0 8px var(--magenta); }
.st-vu-gauge svg { width: 100%; height: auto; max-height: 62px; }
.st-vu-needle { transform-origin: 70px 68px; transform: rotate(-42deg); will-change: transform; }
.st-vu-bars { width: 100%; height: 68px; display: block; }

/* ---------- en modo pantallas: tapa | consola (estéreo + controles) | lista ---------- */
@media (min-width: 961px) {
  .pantallas .rep {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 12px;
  }
  .pantallas .rep-tapa { width: min(21vw, calc(100svh - var(--top-h) - 230px)); min-width: 210px; }
  .pantallas .rep-consola {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, .92fr);
    column-gap: clamp(18px, 2.2vw, 34px);
    row-gap: 10px;
    align-content: start;
    align-items: start;
  }
  .pantallas .rep-consola > * { grid-column: 1; }
  .pantallas .rep-consola > .pistas-cab { grid-column: 2; grid-row: 1; align-self: end; margin: 0; }
  .pantallas .rep-consola > .pistas { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
  .pantallas .rep-consola > .btn-spotify { grid-column: 2; grid-row: 4; justify-self: start; align-self: center; }
  .pantallas .st-switch-bar { flex-wrap: nowrap; gap: 8px; }
  .pantallas .st-switch-label { font-size: 15px; white-space: nowrap; }
  .pantallas .st-switch { flex-wrap: nowrap; }
  .pantallas .st-sw-btn { min-block-size: 28px; padding: 3px 10px; }
  .pantallas .lcd { align-self: start; }
  .pantallas .lcd-titulo { font-size: clamp(28px, 2.8vw, 44px); margin: 6px 0 8px; }
  .pantallas .lcd-libre { font-size: 15px; margin-top: 8px; }
  .pantallas .rep-controles { flex-wrap: nowrap; gap: 8px; }
  .pantallas .rep-vol { margin-left: 2px; gap: 6px; }
  .pantallas .rep-vol input { width: clamp(64px, 6.5vw, 100px); }
  .pantallas .rep-controles .btn-chico { margin-left: auto; white-space: nowrap; padding-inline: 12px; }
}
@media (max-height: 820px) and (min-width: 961px) {
  .pantallas .sec-cab { margin-bottom: 10px; }
  .pantallas .rep-consola { row-gap: 8px; }
  .pantallas .lcd { padding: 12px 16px 10px; }
  .pantallas .lcd-fila { font-size: 17px; }
  .pantallas .lcd-titulo { font-size: clamp(24px, 2.5vw, 36px); margin: 4px 0 6px; }
  .pantallas .lcd-libre { font-size: 13.5px; margin-top: 6px; }
  .pantallas .st-osc { height: 74px; }
  .pantallas .st-panel-disc { padding: 8px 12px; }
  .pantallas .st-cd-deck { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .pantallas .st-cd-tray { width: 88px; height: 88px; }
  .pantallas .st-cd-disc { width: 74px; height: 74px; }
  .pantallas .st-cd-ring-prog { -webkit-mask: radial-gradient(circle, transparent 38px, #000 39px); mask: radial-gradient(circle, transparent 38px, #000 39px); }
  .pantallas .st-panel-vu { padding: 7px 8px; }
  .pantallas .st-vu-meters { gap: 8px; margin-bottom: 5px; }
  .pantallas .st-vu-gauge { padding: 4px 6px 2px; }
  .pantallas .st-vu-gauge svg { max-height: 46px; }
  .pantallas .st-vu-bars { height: 48px; }
}
@media (max-height: 820px) and (min-width: 701px) and (max-width: 960px) {
  .pantallas .rep-deck { zoom: .82; }
  .pantallas .lcd-libre { font-size: 14px; }
}
@media (max-width: 960px) {
  .pantallas .rep-deck { zoom: .86; }
}
@media (max-width: 700px) {
  .pantallas .rep-deck { zoom: .72; }
  .st-switch-label { display: none; }
  .st-switch { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .st-sw-btn { min-block-size: 30px; padding: 2px 6px; font-size: 10px; }
}
@media (max-width: 700px) and (max-height: 860px) {
  .pantallas .btn-spotify { display: none; }
  .pantallas .lcd-libre { font-size: 14px; }
}
@media (max-width: 700px) and (max-height: 760px) {
  .pantallas .rep-deck, .pantallas .lcd-libre { display: none; }
  .pantallas .pista { padding-block: 6px; }
}
