/* Melodía del Día · sala de conciertos: terciopelo, oro y vinilo */
:root {
  --bg0: #0e0818;
  --bg1: #1a0c26;
  --bg2: #3a0f2c;
  --gold: #f2c86e;
  --gold2: #c8923a;
  --gold3: #fff0c4;
  --cream: #fbf3e4;
  --muted: rgba(251, 243, 228, 0.62);
  --faint: rgba(251, 243, 228, 0.12);
  --glass: rgba(255, 255, 255, 0.055);
  --glass2: rgba(255, 255, 255, 0.09);
  --line: rgba(242, 200, 110, 0.22);
  --ok: #3fd18b;
  --mid: #f3c548;
  --ko: #ef5161;
  --skip: #5b5266;
  --rose: #ff7aa8;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Baloo 2", system-ui, sans-serif;
  color: var(--cream);
  background: var(--bg0);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Fondo ---------- */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, #5a1638 0%, rgba(58,15,44,.0) 60%),
    radial-gradient(90% 60% at 50% 110%, #2a1450 0%, rgba(42,20,80,0) 70%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}
#bg .glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
#bg .g1 { width: 60vmax; height: 60vmax; left: -20vmax; top: 10vh; background: radial-gradient(circle, rgba(255,140,90,.28), transparent 65%); }
#bg .g2 { width: 55vmax; height: 55vmax; right: -22vmax; top: 35vh; background: radial-gradient(circle, rgba(140,90,255,.28), transparent 65%); animation-delay: -9s; }
@keyframes drift { to { transform: translate(6vmax, -4vmax) scale(1.08); } }
#bg .curtain { position: absolute; top: 0; bottom: 0; width: min(13vw, 120px); opacity: .9;
  background: repeating-linear-gradient(90deg, #4a0d22 0 9px, #6e1630 9px 15px, #3a0819 15px 22px);
  -webkit-mask: linear-gradient(90deg, #000 0%, rgba(0,0,0,.7) 55%, transparent 100%);
          mask: linear-gradient(90deg, #000 0%, rgba(0,0,0,.7) 55%, transparent 100%);
}
#bg .curtain.l { left: 0; }
#bg .curtain.r { right: 0; transform: scaleX(-1); }
#bg .dust { position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 70%, #ffd 50%, transparent 51%), radial-gradient(1px 1px at 85% 60%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 85%, #fff5 50%, transparent 51%), radial-gradient(1.2px 1.2px at 55% 45%, #ffe9 50%, transparent 51%);
  background-size: 300px 300px; animation: dust 40s linear infinite; }
@keyframes dust { to { background-position: 0 -300px; } }

/* ---------- Pantallas ---------- */
.scr { position: fixed; left: 0; right: 0; top: 0; z-index: 1; display: flex; flex-direction: column; height: 100%; height: var(--appH, 100dvh); animation: scrIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes scrIn { from { opacity: 0; transform: translateY(14px); } }
.topbar { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--sat)) 14px 6px; flex: none; max-width: 980px; width: 100%; margin: 0 auto; }
.round { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1; text-decoration: none; color: var(--cream);
  background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); transition: transform .15s, background .2s; }
.round:active { transform: scale(.92); }
.ttl { flex: 1; min-width: 0; text-align: center; line-height: 1.1; }
.ttl b { display: block; font-family: var(--serif); font-size: 19px; letter-spacing: .2px; color: var(--gold3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl small { display: block; font-size: 13px; color: var(--muted); }
.fecha { flex: 1; text-align: center; font-size: 14px; color: var(--muted); letter-spacing: .3px; }

/* ---------- Portada ---------- */
#sInicio { overflow-y: auto; overscroll-behavior: contain; }
.home { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px calc(20px + var(--sab)); display: flex; flex-direction: column; align-items: stretch; gap: 14px; flex: 1; justify-content: center; }
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; }
.logo { margin: 8px 0 0; font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 12vw, 64px); line-height: .95; letter-spacing: -.5px;
  background: linear-gradient(180deg, #fff6d8 10%, var(--gold) 55%, var(--gold2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)) drop-shadow(0 0 22px rgba(242,200,110,.25)); }
.logo small { display: block; font-size: .36em; font-style: italic; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 2px; }
.logo em { display: block; font-style: italic; }
.tagline { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.hoy { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f7d58a, #d79c40 60%, #b67a2a); color: #2b1606; box-shadow: 0 10px 30px rgba(215,156,64,.35), inset 0 1px 0 rgba(255,255,255,.6); transition: transform .15s; }
.hoy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 45%, transparent 60%); transform: translateX(-100%); animation: shine 3.8s ease-in-out infinite 1s; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.hoy:active { transform: scale(.97); }
.hoy-ico { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #2b1606; color: var(--gold); box-shadow: 0 4px 10px rgba(0,0,0,.25); padding-left: 3px; }
.hoy-tx { flex: 1; min-width: 0; line-height: 1.15; }
.hoy-tx b { display: block; font-size: 19px; }
.hoy-tx small { display: block; font-size: 14px; opacity: .78; font-weight: 600; }
.racha { font-weight: 800; font-size: 18px; }
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 14px; border-radius: 18px; text-align: left; line-height: 1.15; min-height: 92px;
  background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); transition: transform .15s, background .2s; }
.mbtn:active { transform: scale(.96); }
.mbtn .mi { font-size: 24px; margin-bottom: 4px; }
.mbtn b { font-size: 16px; color: var(--gold3); }
.mbtn small { font-size: 12.5px; color: var(--muted); }
.mbtn.reto { background: linear-gradient(150deg, rgba(255,122,168,.22), rgba(140,90,255,.18)); border-color: rgba(255,122,168,.4); }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 14px; font-weight: 600; min-height: 40px; }
.chip:active { transform: scale(.95); }

/* ---------- Vinilo ---------- */
.disc-wrap { position: relative; width: var(--disc, 200px); height: var(--disc, 200px); }
.disc-wrap.small { --disc: 120px; }
.vinyl { position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 33%, rgba(0,0,0,.0) 33%),
    conic-gradient(from 30deg, rgba(255,255,255,0) 0deg, rgba(255,255,255,.13) 40deg, rgba(255,255,255,0) 80deg, rgba(255,255,255,0) 180deg, rgba(255,255,255,.1) 220deg, rgba(255,255,255,0) 260deg),
    repeating-radial-gradient(circle, #131016 0 1.5px, #1d1a22 1.5px 3px),
    #111;
  box-shadow: 0 14px 40px rgba(0,0,0,.6), 0 0 0 3px #0a080c, 0 0 0 4px rgba(242,200,110,.35);
}
.vinyl::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 210deg, transparent 0 20deg, rgba(255,255,255,.09) 40deg, transparent 70deg); }
.vinyl .label { position: absolute; inset: 31%; border-radius: 50%; display: grid; place-items: center; text-align: center; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #ffe7a8, var(--gold) 45%, var(--gold2) 100%); color: #3a1b07;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.18), inset 0 0 12px rgba(0,0,0,.25); }
.vinyl .label::after { content: ""; position: absolute; width: 9%; height: 9%; border-radius: 50%; background: #0c0a0e; box-shadow: 0 0 0 2px rgba(0,0,0,.2); }
.vinyl .label span { font-family: var(--serif); font-weight: 700; font-size: calc(var(--disc, 200px) * .15); line-height: 1; position: relative; z-index: 1; }
.vinyl .label:has(span)::after { width: 6%; height: 6%; bottom: 14%; }
.vinyl .label.rev span { font-size: calc(var(--disc, 200px) * .055); padding: 0 8%; font-family: "Baloo 2", sans-serif; font-weight: 800; }
.vinyl.spin, .playing .vinyl { animation: spin 2.2s linear infinite; }
.vinyl.spin { animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }
.arm { position: absolute; right: -14%; top: -8%; width: 30%; height: 90%; transform-origin: 70% 8%; transform: rotate(-26deg); transition: transform .6s cubic-bezier(.3,1.4,.5,1); pointer-events: none; }
.arm::before { content: ""; position: absolute; right: 18%; top: 0; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3d0, #b8862f); box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.arm i { position: absolute; right: 34%; top: 10px; width: 6px; height: 80%; border-radius: 3px; background: linear-gradient(90deg, #d8d2c8, #8d877e); transform-origin: top; transform: rotate(14deg); box-shadow: 2px 3px 6px rgba(0,0,0,.4); }
.arm i::after { content: ""; position: absolute; bottom: -6px; left: -6px; width: 16px; height: 20px; border-radius: 3px; background: linear-gradient(#3a3640, #1b181f); }
.playing .arm { transform: rotate(-4deg); }

/* ---------- Escenario ---------- */
.play-area { flex: 1; min-height: 0; width: 100%; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; padding: 0 16px calc(10px + var(--sab)); gap: 6px; }
.stage { position: relative; flex: 1 1 auto; min-height: 150px; max-height: 300px; width: 100%; display: grid; place-items: center; --disc: min(46vw, 25dvh, 210px); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .disc-wrap { pointer-events: none; }
.playbtn { z-index: 3; position: absolute; left: 50%; top: 50%; width: calc(var(--disc) * .34); height: calc(var(--disc) * .34); min-width: 56px; min-height: 56px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold) 50%, var(--gold2)); box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 4px rgba(14,8,24,.6); display: grid; place-items: center; transition: transform .15s; }
.playbtn:active { transform: translate(-50%, -50%) scale(.92); }
.playbtn svg { width: 46%; height: 46%; fill: #2b1606; }
.playbtn .st { display: none; }
.playing .playbtn .pl { display: none; }
.playing .playbtn .st { display: block; }
.playbtn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 4px rgba(14,8,24,.6), 0 0 0 14px rgba(242,200,110,.18); } }
.side { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 6px; flex: none; }

.timeline { position: relative; height: 14px; border-radius: 8px; background: rgba(0,0,0,.35); border: 1px solid var(--faint); overflow: hidden; }
.tl-open { position: absolute; left: 0; top: 0; bottom: 0; width: 6.25%; background: linear-gradient(90deg, rgba(242,200,110,.35), rgba(242,200,110,.55)); transition: width .6s cubic-bezier(.3,1.2,.4,1); }
.tl-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--gold2), var(--gold3)); box-shadow: 0 0 12px rgba(242,200,110,.8); }
.tl-marks { position: absolute; inset: 0; }
.tl-marks i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(14,8,24,.85); }
.tl-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -4px; font-variant-numeric: tabular-nums; }

.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.slots li { height: clamp(32px, 4.6dvh, 42px); border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 15px; line-height: 1.1;
  background: var(--glass); border: 1px solid var(--faint); overflow: hidden; }
.slots li .ic { width: 22px; height: 22px; flex: none; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: rgba(255,255,255,.06); color: var(--muted); }
.slots li .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slots li .tx small { color: var(--muted); font-size: 13px; }
.slots li.now { border-color: rgba(242,200,110,.55); box-shadow: 0 0 0 1px rgba(242,200,110,.25), inset 0 0 20px rgba(242,200,110,.08); }
.slots li.skip .ic { background: var(--skip); color: #fff; }
.slots li.skip .tx { color: var(--muted); font-style: italic; }
.slots li.mal .ic { background: var(--ko); color: #fff; }
.slots li.comp .ic { background: var(--mid); color: #3a2a00; }
.slots li.ok { background: rgba(63,209,139,.16); border-color: rgba(63,209,139,.55); }
.slots li.ok .ic { background: var(--ok); color: #053; }
.slots li.new { animation: slotIn .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes slotIn { from { transform: scale(.9) translateY(6px); opacity: 0; } }

.guess { position: relative; display: flex; flex-direction: column; gap: 8px; }
.inp-wrap { position: relative; display: flex; align-items: center; }
.inp-wrap .lupa { position: absolute; left: 13px; font-size: 15px; opacity: .7; pointer-events: none; }
#inp { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10,6,18,.65); color: var(--cream); font: inherit; font-size: 16px; padding: 0 42px 0 40px; outline: none; user-select: text; -webkit-user-select: text; }
#inp::placeholder { color: rgba(251,243,228,.42); }
#inp:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,200,110,.2); }
.inp-wrap .clear { position: absolute; right: 4px; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.sugg { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; border-radius: 16px; overflow: hidden; background: rgba(28,16,40,.97); border: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(0,0,0,.55); backdrop-filter: blur(12px); max-height: 50dvh; overflow-y: auto; }
.sugg button { display: block; width: 100%; text-align: left; padding: 10px 14px; line-height: 1.15; border-bottom: 1px solid var(--faint); }
.sugg button:last-child { border-bottom: 0; }
.sugg button b { display: block; font-size: 15px; font-weight: 700; }
.sugg button small { color: var(--muted); font-size: 13px; }
.sugg button mark { background: none; color: var(--gold); }
.sugg button.sel, .sugg button:active { background: rgba(242,200,110,.14); }
.sugg button.usada { opacity: .4; }
.sugg .nada { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.gbtns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.btn { min-height: 48px; padding: 0 16px; border-radius: 14px; font-weight: 800; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .12s, filter .2s, opacity .2s; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.gold { background: linear-gradient(180deg, #f8d991, var(--gold2)); color: #2b1606; box-shadow: 0 6px 16px rgba(200,146,58,.35), inset 0 1px 0 rgba(255,255,255,.6); }
.btn.ghost { background: var(--glass2); border: 1px solid var(--line); color: var(--cream); }
.btn.ghost small { font-size: 13px; color: var(--gold); font-weight: 700; }
.btn.rose { background: linear-gradient(180deg, #ff9cc0, #e0507f); color: #fff; box-shadow: 0 6px 16px rgba(224,80,127,.35); }
.btn.small { min-height: 40px; font-size: 15px; padding: 0 12px; }
.btn.wide { width: 100%; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.btn.pulse { animation: btnPulse 1.3s ease-in-out infinite; }
@keyframes btnPulse { 50% { box-shadow: 0 6px 16px rgba(200,146,58,.35), 0 0 0 6px rgba(242,200,110,.25); } }
body.kb .stage, body.kb .timeline, body.kb .tl-info { display: none; }
body.kb .topbar { padding-top: 6px; }

/* ---------- Superposiciones ---------- */
#ov { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(6,3,12,.62); backdrop-filter: blur(4px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 26px 26px 0 0; padding: 22px 18px calc(18px + var(--sab));
  background: linear-gradient(180deg, #2a1236, #170b22 60%); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0,0,0,.6); animation: up .45s cubic-bezier(.2,1.1,.3,1); }
@keyframes up { from { transform: translateY(100%); } }
.sheet .x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--glass); font-size: 18px; z-index: 2; }
.sheet h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; color: var(--gold3); text-align: center; line-height: 1.1; padding: 0 30px; }
.sheet p { margin: 6px 0; color: var(--muted); line-height: 1.35; }
.sheet .lead { text-align: center; }
.help li { margin: 8px 0; line-height: 1.35; display: flex; gap: 10px; }
.help ul { padding: 0; list-style: none; }
.help li span { font-size: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; font-size: 14px; color: var(--muted); }

.reveal { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 12px 0; }
.reveal .disc-wrap { --disc: 118px; }
.reveal .info b { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.1; color: var(--cream); }
.reveal .info span { display: block; color: var(--gold); font-weight: 700; font-size: 16px; margin-top: 4px; }
.reveal .info small { color: var(--muted); font-size: 14px; }
.cur { background: var(--glass); border: 1px solid var(--faint); border-radius: 16px; padding: 10px 14px; font-size: 15px; line-height: 1.4; color: var(--cream); }
.cur::before { content: "💡 "; }
.listen { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.listen canvas { flex: 1; height: 48px; min-width: 0; }
.grid-res { text-align: center; font-size: 26px; letter-spacing: 2px; margin: 8px 0 2px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
.stats div { background: var(--glass); border-radius: 14px; padding: 8px 2px; }
.stats b { display: block; font-size: 24px; line-height: 1; color: var(--gold3); }
.stats span { font-size: 12px; color: var(--muted); }
.dist { display: grid; gap: 4px; margin: 6px 0 12px; }
.dist div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dist div > span { width: 16px; text-align: right; }
.dist i { display: block; height: 20px; border-radius: 6px; background: rgba(255,255,255,.12); color: var(--cream); font-style: normal; font-weight: 800; font-size: 13px; text-align: right; padding: 0 7px; line-height: 20px; transform-origin: left; animation: grow .7s cubic-bezier(.2,1,.3,1) backwards; }
.dist i.me { background: linear-gradient(90deg, var(--gold2), var(--gold)); color: #2b1606; }
@keyframes grow { from { transform: scaleX(0); } }
.next { text-align: center; color: var(--muted); font-size: 15px; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.next b { color: var(--gold3); }
.btns { display: grid; gap: 8px; margin-top: 10px; }
.btns .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.archivo { display: grid; gap: 6px; margin-top: 10px; }
.archivo button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--faint); text-align: left; }
.archivo button b { min-width: 46px; color: var(--gold); font-family: var(--serif); font-size: 18px; }
.archivo button span { flex: 1; }
.archivo button small { display: block; color: var(--muted); }
.archivo .st { font-size: 18px; flex: none !important; }

/* ---------- Toasts y confeti ---------- */
#toasts { position: fixed; left: 0; right: 0; top: calc(64px + var(--sat)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { padding: 9px 16px; border-radius: 999px; background: rgba(251,243,228,.95); color: #2b1606; font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: tin .3s cubic-bezier(.2,1.4,.4,1); max-width: 90vw; text-align: center; }
.toast.bad { background: #ffd9dd; color: #5a0d16; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px) scale(.9); } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }

/* ---------- Modo Reto ---------- */
.hud { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid var(--faint); transition: .3s; }
.dots i.now { background: var(--gold); box-shadow: 0 0 10px var(--gold); transform: scale(1.2); }
.dots i.s1 { background: #d0915a; } .dots i.s2 { background: #e8c27a; } .dots i.s3 { background: var(--ok); }
.clock { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 52px; padding: 2px 10px; border-radius: 10px; background: rgba(0,0,0,.3); color: var(--gold3); }
.reto-area { flex: 1; min-height: 0; width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: 0 16px calc(12px + var(--sab)); gap: 10px; }
.stage.mini { max-height: 360px; --disc: min(50vw, 27dvh, 230px); }
.reto-area .clipbar { margin-top: auto; }
.clipbar { display: flex; align-items: center; gap: 10px; }
.clip-steps { flex: 1; display: flex; gap: 4px; }
.clip-steps i { flex: 1; height: 10px; border-radius: 5px; background: rgba(255,255,255,.1); font-style: normal; transition: .3s; }
.clip-steps i.on { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; min-height: 58px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--line); line-height: 1.12; transition: transform .12s, background .2s, opacity .3s; }
.opt:active { transform: scale(.97); }
.opt .k { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(242,200,110,.18); color: var(--gold); }
.opt b { display: block; font-size: 16px; }
.opt small { color: var(--muted); font-size: 13px; }
.opt.no { background: rgba(239,81,97,.18); border-color: rgba(239,81,97,.5); opacity: .55; pointer-events: none; }
.opt.si { background: rgba(63,209,139,.22); border-color: var(--ok); animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 50% { transform: scale(1.04); } }
.reto-intro { text-align: center; }
.reto-intro .big { font-size: 54px; }

/* ---------- Entrenar oído ---------- */
.oido { justify-content: center; flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: 560px; margin: 0 auto; padding: 4px 16px calc(16px + var(--sab)); display: flex; flex-direction: column; gap: 12px; }
.ejer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ejer button { padding: 16px 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); text-align: center; line-height: 1.15; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ejer button:active { transform: scale(.96); }
.ejer .e-ico { font-size: 34px; }
.ejer b { color: var(--gold3); font-size: 17px; }
.ejer small { color: var(--muted); font-size: 13px; }
.ejer em { font-style: normal; font-size: 12px; color: var(--gold); }
.q-card { text-align: center; padding: 14px; border-radius: 22px; background: var(--glass); border: 1px solid var(--faint); }
.q-card h3 { margin: 4px 0 0; font-family: var(--serif); font-size: 22px; color: var(--cream); }
.q-score { display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 14px; }
.q-score b { color: var(--gold3); font-size: 18px; }
.q-play { width: 96px; height: 96px; border-radius: 50%; margin: 12px auto 6px; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold) 50%, var(--gold2)); box-shadow: 0 8px 22px rgba(0,0,0,.4); font-size: 34px; color: #2b1606; }
.q-play::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(242,200,110,.3); }
.q-play.on::before { animation: ring 1s ease-out infinite; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-opts button { min-height: 58px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--line); font-weight: 700; font-size: 16px; line-height: 1.1; padding: 6px 8px; }
.q-opts button small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.q-opts button.si { background: rgba(63,209,139,.25); border-color: var(--ok); }
.q-opts button.no { background: rgba(239,81,97,.22); border-color: var(--ko); }
.q-tip { min-height: 22px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Pantallas grandes / apaisado ---------- */
@media (min-width: 820px) and (min-aspect-ratio: 5/4) {
  .play-area { flex-direction: row; align-items: center; gap: 36px; padding: 10px 32px 24px; }
  .stage { flex: 1 1 0; height: 100%; max-height: 560px; --disc: min(30vw, 46dvh, 300px); }
  .side { flex: 0 0 440px; }
  .slots li { height: 44px; }
  .home { max-width: 760px; }
  .menu { grid-template-columns: repeat(4, 1fr); }
  .hero .disc-wrap.small { --disc: 140px; }
  .reto-area { max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; align-items: center; column-gap: 32px; }
  .reto-area .stage.mini { grid-row: 1 / span 2; max-height: 460px; height: 100%; --disc: min(28vw, 44dvh, 280px); }
  .reto-area .clipbar { align-self: end; }
  .reto-area .opts { align-self: start; }
}
@media (min-width: 700px) and (min-height: 600px) {
  #ov { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line); max-height: 88dvh; }
}
@media (max-height: 700px) {
  .stage { min-height: 120px; }
  .slots { gap: 4px; }
  .tagline { display: none; }
  .mbtn { min-height: 78px; padding: 10px 12px; }
  .hero .disc-wrap.small { --disc: 86px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .play-area { flex-direction: row; gap: 16px; }
  .stage { height: 100%; max-height: none; --disc: min(32vw, 50dvh); }
  .side { flex: 0 0 min(440px, 55vw); }
  .slots li { height: 30px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
