/* Az árnyalat-változók regisztrálva vannak, így a háttér színe finoman átúszik. */
@property --t1 { syntax: "<color>"; inherits: true; initial-value: #1ed760; }
@property --t2 { syntax: "<color>"; inherits: true; initial-value: #2bb3ff; }
@property --t3 { syntax: "<color>"; inherits: true; initial-value: #8b5cf6; }

:root {
  --silver: #e4e7ec;
  --silver-dark: #4f555e;
  --bg: #0b0b10;
  --glass: rgba(24, 24, 32, .62);
  --glass-strong: rgba(30, 30, 40, .86);
  --surface: rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .09);
  --border: rgba(255, 255, 255, .1);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #f4f4f8;
  --muted: #a1a1b3;
  --accent: #1ed760;
  --accent-2: #19e3c0;
  --accent-ink: #04140a;
  --wrong: #ff5470;
  --near: #ffc547;
  --skip: #6b6b80;
  --radius: 16px;
  --tap: 52px;
  --disc: clamp(104px, calc(72dvh - 368px), min(58vw, 250px));
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t1: #1ed760;
  --t2: #2bb3ff;
  --t3: #8b5cf6;
  color-scheme: dark;
  transition: --t1 1.6s ease, --t2 1.6s ease, --t3 1.6s ease;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; overflow-x: hidden; overscroll-behavior: none; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; touch-action: manipulation; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--border);
}

/* ---------- Élő háttér ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .22;
  will-change: transform;
}
.b1 { background: radial-gradient(circle, var(--t1), transparent 65%); top: -30vmax; left: -25vmax; animation: drift1 22s ease-in-out infinite alternate; }
.b2 { background: radial-gradient(circle, var(--t2), transparent 65%); bottom: -35vmax; right: -30vmax; animation: drift2 26s ease-in-out infinite alternate; }
.b3 { background: radial-gradient(circle, var(--t3), transparent 65%); top: 30%; left: 20%; width: 50vmax; height: 50vmax; opacity: .14; animation: drift3 30s ease-in-out infinite alternate; }
body.playing .blob { opacity: .32; transition: opacity 1s; }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -12vmax) scale(1.2); } }
@keyframes drift3 { to { transform: translate(-14vmax, 10vmax) scale(.85); } }
.grain {
  position: absolute; inset: -50%;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Elrendezés ---------- */
.app {
  position: relative; z-index: 1;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

/* Fejléc */
.topbar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 6px;
  z-index: 20;
}
.topbar-side { display: flex; gap: 8px; width: 96px; }
.topbar-side.right { justify-content: flex-end; }
.logo {
  margin: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: 1.45rem; font-weight: 900; letter-spacing: -.01em;
}
.logo-hu {
  margin-left: 4px;
  font-size: .7em;
  padding: 2px 7px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 0 18px rgba(30, 215, 96, .45);
}
.logo-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; }
.logo-eq i {
  width: 4px; height: 30%;
  border-radius: 2px;
  background: linear-gradient(var(--accent-2), var(--accent));
  animation: eq 1.1s ease-in-out infinite;
  animation-play-state: paused;
}
.logo-eq i:nth-child(2) { animation-delay: -.3s; height: 70%; }
.logo-eq i:nth-child(3) { animation-delay: -.6s; height: 50%; }
.logo-eq i:nth-child(4) { animation-delay: -.9s; height: 85%; }
body.playing .logo-eq i { animation-play-state: running; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.1rem; font-weight: 800;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s var(--ease-spring), border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.small { width: 40px; height: 40px; font-size: 1rem; flex: none; }

/* Hangerő */
#volumeBtn .v-mute { display: none; }
#volumeBtn.muted .v-mute { display: inline; }
#volumeBtn.muted .v-wave1, #volumeBtn.muted .v-wave2, #volumeBtn.low .v-wave2 { display: none; }
.volume-pop {
  position: absolute;
  left: 14px; top: calc(100% - 2px);
  width: min(300px, calc(100vw - 28px));
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--glass-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  transform-origin: top left;
  animation: pop-in .25s var(--ease-spring);
}
.volume-pop input[type="range"] { flex: 1; min-width: 0; height: 40px; accent-color: var(--accent); }
.volume-val { width: 2.8em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; font-weight: 600; }
@keyframes pop-in { from { opacity: 0; transform: scale(.85) translateY(-6px); } }

/* Mód + pontok */
.mode-row {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px 6px;
  max-width: 552px; width: 100%; margin: 0 auto;
}
/* Módváltó: két egyforma fél, alatta egy csúszó, világító kijelölés. */
.segmented {
  position: relative;
  flex: 1;
  max-width: 360px;
  height: 50px;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 5px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35);
}
.seg-indicator {
  position: absolute; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / 3);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:
    0 6px 20px rgba(30, 215, 96, .35),
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -2px 0 rgba(0, 0, 0, .12);
  transition: transform .5s var(--ease-spring);
}
.segmented[data-mode="daily"] .seg-indicator { transform: translateX(100%); }
.segmented[data-mode="artist"] .seg-indicator { transform: translateX(200%); }
.segmented button {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 6px;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .01em;
  cursor: pointer;
  transition: color .35s;
  white-space: nowrap;
}
.segmented button:hover:not([aria-selected="true"]) { color: var(--text); }
.segmented button svg { width: 19px; height: 19px; flex: none; }
.segmented button[aria-selected="true"] { color: var(--accent-ink); }
.segmented button[aria-selected="true"] svg { animation: icon-pop .55s var(--ease-spring); }
@keyframes icon-pop { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.18) rotate(4deg); } }
.seg-badge {
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: .68rem; font-weight: 900;
  background: var(--near);
  color: #2a1a00;
  box-shadow: 0 0 0 2px rgba(11, 11, 16, .6);
  animation: pop-in .4s var(--ease-spring);
}
.segmented button[aria-selected="true"] .seg-badge { background: var(--accent-ink); color: var(--accent); box-shadow: none; }

/* Pontszámláló: arany érme + szám */
.points-pill {
  position: relative;
  flex: none;
  height: 50px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0 16px 0 6px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 197, 71, .16), rgba(255, 140, 40, .05)),
    rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 197, 71, .3);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .12), 0 6px 20px rgba(0, 0, 0, .25);
  white-space: nowrap;
}
.coin {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 32% 28%, #fff1b8 0, #ffd04d 32%, #f5a300 70%, #c77700 100%);
  box-shadow:
    0 4px 14px rgba(255, 170, 20, .45),
    inset 0 -3px 0 rgba(150, 80, 0, .35),
    inset 0 2px 0 rgba(255, 255, 255, .6);
}
.coin::before {
  /* belső perem */
  content: "";
  position: absolute; inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(160, 90, 0, .35);
}
.coin::after {
  /* lassan átfutó fényvillanás */
  content: "";
  position: absolute; top: -20%; bottom: -20%; left: -80%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-18deg);
  animation: coin-shine 4.5s ease-in-out infinite;
}
@keyframes coin-shine { 0%, 70% { left: -80%; } 100% { left: 140%; } }
.coin svg { position: relative; width: 20px; height: 20px; filter: drop-shadow(0 1px 0 rgba(140, 70, 0, .5)); }
.points-text { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.points-text b {
  font-size: 1.2rem; font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #ffe6a6;
  text-shadow: 0 0 18px rgba(255, 197, 71, .35);
}
.points-text small {
  font-size: .6rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 220, 150, .6);
}
/* Kör pontja a pill bal oldalán, elválasztóval */
.round-pts {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1; gap: 3px;
  min-width: 50px;
  padding: 0 10px 0 8px;
  margin-right: 1px;
  border-right: 1px solid rgba(255, 197, 71, .22);
}
.round-pts b {
  font-size: 1.05rem; font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.round-pts small {
  font-size: .56rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}
.round-pts.won b { color: #7dffb0; text-shadow: 0 0 14px rgba(80, 255, 150, .4); }
.round-pts.lost b { color: rgba(255, 255, 255, .35); }
.round-pts.tick b { animation: round-tick .45s var(--ease-spring); }
@keyframes round-tick { 40% { transform: scale(1.25); } }
.points-pill.bump { animation: bump .7s var(--ease-spring); }
.points-pill.bump .coin { animation: coin-flip .9s var(--ease-out); }
@keyframes bump { 35% { transform: scale(1.1); box-shadow: 0 0 30px rgba(255, 197, 71, .55); } }
@keyframes coin-flip { 0% { transform: rotateY(0); } 100% { transform: rotateY(720deg); } }
.spark {
  position: absolute; left: 25px; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 8px #ffc547;
  pointer-events: none;
  animation: spark .8s var(--ease-out) forwards;
}
@keyframes spark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}
@media (max-width: 360px) {
  .segmented { min-width: 0; padding: 4px; }
  .segmented button { font-size: .8rem; min-width: 0; padding: 0 2px; }
  .seg-indicator { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); }
  .mode-row { gap: 8px; padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 345px) {
  .segmented button { font-size: .72rem; }
}

.daily-banner {
  flex: none;
  text-align: center;
  padding: 2px 16px 10px;
  color: var(--muted);
  font-size: .9rem;
  animation: fade-down .4s var(--ease-out);
}
.daily-banner b { color: var(--text); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } }

/* Kategóriák */
.categories-wrap { flex: none; position: relative; animation: fade-down .4s var(--ease-out); }
.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 16px 6px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent);
}
.categories::-webkit-scrollbar { display: none; }
.chip {
  position: relative; overflow: hidden;
  flex: none;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease-spring), box-shadow .25s, border-color .25s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(30, 215, 96, .35);
}

/* Görgethető középső rész */
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.game {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Lemez + vizualizáció ---------- */
.stage {
  position: relative;
  width: calc(var(--disc) + 64px);
  height: calc(var(--disc) + 64px);
  margin: 0 auto;
  display: grid; place-items: center;
}
.viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring {
  position: absolute;
  width: calc(var(--disc) + 16px); height: calc(var(--disc) + 16px);
  transform: rotate(-90deg);
  overflow: visible;
}
.ring circle { fill: none; stroke-width: 2.2; stroke-dasharray: 100; }
.ring-track { stroke: rgba(255, 255, 255, .07); stroke-dashoffset: 0; }
.ring-unlocked { stroke: rgba(255, 255, 255, .28); stroke-dashoffset: 100; transition: stroke-dashoffset .8s var(--ease-out); stroke-linecap: round; }
.ring-progress { stroke: var(--accent); stroke-dashoffset: 100; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--accent)); }

.disc {
  position: absolute;
  width: var(--disc); height: var(--disc);
  border-radius: 50%;
  perspective: 900px;
  transition: border-radius .9s var(--ease-out), transform .6s var(--ease-spring);
}
.disc-vinyl {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 31%, rgba(255, 255, 255, .03) 31.5%, transparent 32.5%),
    repeating-radial-gradient(circle at 50% 50%, #121218 0 2px, #1a1a22 2px 3px),
    #111;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, .6),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    inset 0 0 40px rgba(0, 0, 0, .7);
  animation: spin 3.2s linear infinite;
  animation-play-state: paused;
  transition: opacity .6s, transform .9s var(--ease-out);
}
.disc-vinyl::after {
  /* fényvisszaverődés */
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 8%, rgba(255, 255, 255, .09) 12%, transparent 18% 58%, rgba(255, 255, 255, .07) 62%, transparent 68%);
}
.disc-label {
  position: absolute; inset: 31%;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 55%, #0f8f43);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: calc(var(--disc) * .13);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .15);
}
.disc-label span { opacity: 0; }
body.playing .disc-vinyl, .stage.loading .disc-vinyl { animation-play-state: running; }
.stage.loading .disc-vinyl { animation-duration: 1.2s; }
.stage.loading .disc-label { animation: label-pulse 1.2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes label-pulse { 50% { filter: brightness(1.4); } }

.disc-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 0;
  transform: rotateY(-180deg) scale(.6);
  backface-visibility: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  transition: transform 1s var(--ease-spring), opacity .4s;
}
.disc.revealed { border-radius: 22px; transform: scale(1.04); }
.disc.revealed .disc-vinyl { opacity: 0; transform: rotateY(180deg) scale(.6); }
.disc.revealed .disc-cover.loaded { opacity: 1; transform: none; }

.play-btn {
  position: relative;
  z-index: 2;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: none;
  /* Zöld gomb, sötétezüst nyíl */
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--silver-dark);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 6px rgba(30, 215, 96, .14);
  transition: transform .3s var(--ease-spring), box-shadow .3s, opacity .3s, background .3s;
}
.play-btn:hover:not(:disabled) { transform: scale(1.08); }
.play-btn:active:not(:disabled) { transform: scale(.92); }
.play-btn svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .35)); }
.play-btn .i-play { margin-left: 3px; }
.play-btn .i-stop, .play-btn.playing .i-play { display: none; }
.play-btn.playing .i-stop { display: block; }
/* Letiltva a gomb halványabb zöld, a nyíl ezüst marad. */
.play-btn:disabled { cursor: default; background: linear-gradient(135deg, rgba(30, 215, 96, .5), rgba(25, 227, 192, .5)); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.play-btn .spinner {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}
.play-btn.loading .spinner { opacity: 1; animation: spin .7s linear infinite; }
.play-btn.pulse::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: ring-out 1.8s var(--ease-out) infinite;
}
@keyframes ring-out { from { transform: scale(1); opacity: .7; } to { transform: scale(1.8); opacity: 0; } }
.disc.revealed ~ .play-btn {
  width: 52px; height: 52px;
  color: var(--silver);
  transform: translate(calc(var(--disc) * .36), calc(var(--disc) * .36));
}
.disc.revealed ~ .play-btn svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }

.float-points {
  position: absolute; left: 50%; top: 42%;
  z-index: 3;
  font-size: 2.2rem; font-weight: 900;
  color: var(--near);
  text-shadow: 0 4px 20px rgba(255, 197, 71, .6);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0);
}
.float-points.go { animation: float-up 1.6s var(--ease-out) forwards; }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -90px) scale(1); }
}

/* Idő + hullámforma */
.clip-info { display: flex; align-items: baseline; justify-content: space-between; margin-top: -6px; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3em; font-size: .85rem; font-weight: 600; }
.time:last-child { text-align: right; }
.clip-len {
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.clip-len.bump { animation: bump-text .6s var(--ease-spring); }
/* Tippelés közben a másodperc-jelölések és az idők nem kellenek (a hullámforma marad). */
.game:has(#reveal[hidden]) .wave-marks,
.game:has(#reveal[hidden]) .clip-info .time { visibility: hidden; }
.game:has(#reveal[hidden]) .wave-marks { display: none; }
@keyframes bump-text { 40% { transform: scale(1.35); } }

.wave-wrap { display: grid; gap: 4px; }
.wave {
  height: 54px;
  display: flex; align-items: center; gap: 2px;
}
.wave i {
  flex: 1;
  min-width: 2px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .1);
  transform-origin: center;
  transition: background .35s, transform .35s var(--ease-spring);
}
.wave i.unlocked { background: rgba(255, 255, 255, .42); }
.wave i.played { background: linear-gradient(var(--accent-2), var(--accent)); transform: scaleY(1.12); }
.wave.intro i { animation: wave-in .6s var(--ease-spring) backwards; }
@keyframes wave-in { from { transform: scaleY(0); } }
.wave-marks { position: relative; height: 14px; }
.wave-marks span {
  position: absolute; top: 0;
  transform: translateX(-50%);
  font-size: .68rem; font-weight: 700;
  color: var(--muted);
  opacity: .55;
  transition: opacity .3s, color .3s;
}
.wave-marks span.on { opacity: 1; color: var(--text); }

/* Próbálkozás-jelzők */
.tries { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tries i {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .1);
  transition: background .4s, box-shadow .4s;
}
.tries i.current { background: rgba(255, 255, 255, .55); animation: blink 1.4s ease-in-out infinite; }
.tries i.skip { background: var(--skip); }
.tries i.wrong { background: var(--wrong); box-shadow: 0 0 10px rgba(255, 84, 112, .5); }
.tries i.near { background: var(--near); box-shadow: 0 0 10px rgba(255, 197, 71, .5); }
.tries i.right { background: var(--accent); box-shadow: 0 0 12px rgba(30, 215, 96, .7); }
@keyframes blink { 50% { opacity: .35; } }

/* 5 dalos kör állása */
.set-bar { display: flex; align-items: center; gap: 10px; }
.set-slots { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.set-slots span {
  height: 26px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: .78rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: rgba(255, 255, 255, .05);
  border: 1px dashed rgba(255, 255, 255, .12);
  transition: background .4s, color .4s, border-color .4s;
}
.set-slots span.current { color: var(--text); border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); }
.set-slots span.won { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; animation: bump .6s var(--ease-spring); }
.set-slots span.lost { color: var(--wrong); background: rgba(255, 84, 112, .12); border: 1px solid rgba(255, 84, 112, .3); }
.set-record {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: rgba(255, 220, 150, .75);
  background: rgba(255, 197, 71, .1);
  border: 1px solid rgba(255, 197, 71, .22);
}
.set-record b { color: #ffe6a6; font-variant-numeric: tabular-nums; }

.streak-line { color: var(--muted); font-size: .9rem; text-align: center; min-height: 1.3em; }
.streak-line b { color: var(--text); }
.flame { display: inline-block; animation: flicker 1.3s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 25% { transform: scale(1.12) rotate(-4deg); } 50% { transform: scale(.95) rotate(3deg); } 75% { transform: scale(1.08) rotate(-2deg); } }

/* Tippek listája */
.guesses { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.guesses li {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; gap: 10px;
  font-size: .95rem;
  overflow: hidden;
}
.guesses li .mark {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 900; font-size: .85rem;
}
.guesses li .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.guesses li .tag { flex: none; font-size: .72rem; font-weight: 800; color: var(--near); text-transform: uppercase; letter-spacing: .04em; }
.guesses li.wrong { border-color: rgba(255, 84, 112, .45); }
.guesses li.wrong .mark { background: rgba(255, 84, 112, .18); color: var(--wrong); }
.guesses li.near { border-color: rgba(255, 197, 71, .5); }
.guesses li.near .mark { background: rgba(255, 197, 71, .18); color: var(--near); }
.guesses li.skip { color: var(--muted); }
.guesses li.skip .mark { background: var(--surface-2); }
.guesses li.right { border-color: var(--accent); background: rgba(30, 215, 96, .12); box-shadow: 0 0 24px rgba(30, 215, 96, .18); }
.guesses li.right .mark { background: var(--accent); color: var(--accent-ink); }
.guesses li.new { animation: slide-in .5s var(--ease-spring); }
.guesses li.wrong.new, .guesses li.near.new { animation: slide-in .5s var(--ease-spring), shake .45s .15s; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* Megoldás */
.reveal {
  text-align: center;
  padding: 16px;
  border-radius: 20px;
  animation: rise .6s var(--ease-out);
}
.reveal > * { animation: rise .6s var(--ease-out) backwards; }
.reveal > :nth-child(2) { animation-delay: .1s; }
.reveal > :nth-child(3) { animation-delay: .18s; }
.reveal > :nth-child(4) { animation-delay: .26s; }
.reveal > :nth-child(5) { animation-delay: .34s; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.reveal p { margin: 0 0 4px; overflow-wrap: anywhere; }
.reveal-result { font-weight: 800; color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.reveal-result.lost { color: var(--wrong); }
.reveal-title { font-size: 1.6rem; font-weight: 900; line-height: 1.15; letter-spacing: -.01em; }
.reveal-artist { font-size: 1.05rem; font-weight: 600; }
.reveal-album { color: var(--muted); font-size: .85rem; }
.reveal-year {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 800; font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--border);
  vertical-align: 1px;
}
.reveal-year.bump { animation: bump-text .6s var(--ease-spring); }
.reveal-meta { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.reveal-emoji { letter-spacing: 2px; font-size: 1rem; }
.reveal-points {
  font-weight: 900; color: var(--near);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 197, 71, .12);
}
.reveal-points:empty { display: none; }
.reveal-set {
  margin: 12px 0 0 !important;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}
.reveal-set b { color: #ffe6a6; }
.reveal-set .rec { color: var(--near); text-shadow: 0 0 14px rgba(255, 197, 71, .5); }

/* ---------- Alsó vezérlősáv ---------- */
.dock {
  position: relative;
  flex: none;
  border-width: 1px 0 0;
  border-radius: 24px 24px 0 0;
  background: var(--glass-strong);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  z-index: 5;
}
.load-bar { position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 3px; overflow: hidden; background: var(--surface); }
.load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s var(--ease-out); }
.dock-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 16px 12px;
  display: grid;
  gap: 8px;
}

.status { margin: 0; text-align: center; color: var(--muted); font-size: .9rem; min-height: 1.3em; font-weight: 500; }
.status.error { color: var(--wrong); }
.status.flash { animation: fade-down .35s var(--ease-out); }

.controls { display: grid; gap: 8px; }
.guess-box { position: relative; }
.search-ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
#guessInput {
  width: 100%;
  height: var(--tap);
  padding: 0 46px 0 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
#guessInput::placeholder { color: var(--muted); opacity: .8; }
#guessInput:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30, 215, 96, .15); background: rgba(0, 0, 0, .45); }
#guessInput:disabled { opacity: .5; }
.clear-btn {
  position: absolute; right: 4px; top: 4px;
  width: 44px; height: 44px;
  border: none; background: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.suggestions {
  position: absolute;
  left: 0; right: 0; bottom: calc(100% + 8px);
  margin: 0; padding: 6px;
  list-style: none;
  /* alacsonyabb lista, hogy a lemez közepe (lejátszás gomb) látszódjon */
  max-height: min(40vh, 340px);
  max-height: min(40dvh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: rgba(24, 24, 32, .98);
  border-radius: 18px;
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .55);
  z-index: 10;
  transform-origin: bottom center;
  animation: pop-up .22s var(--ease-out);
}
@keyframes pop-up { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.suggestions li {
  min-height: 56px;
  padding: 6px 10px;
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  animation: rise .3s var(--ease-out) backwards;
  transition: background .15s;
}
.suggestions li:nth-child(2) { animation-delay: .02s; }
.suggestions li:nth-child(3) { animation-delay: .04s; }
.suggestions li:nth-child(4) { animation-delay: .06s; }
.suggestions li:nth-child(5) { animation-delay: .08s; }
.suggestions li:nth-child(n+6) { animation-delay: .1s; }
.suggestions li[aria-selected="true"] { background: var(--surface-2); }
@media (hover: hover) { .suggestions li:hover { background: var(--surface-2); } }
.suggestions .s-cover {
  width: 44px; height: 44px; flex: none;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}
.suggestions .s-text { display: flex; flex-direction: column; min-width: 0; }
.suggestions .s-title { font-weight: 700; }
.suggestions .s-artist { color: var(--muted); font-size: .85rem; }
.suggestions .s-feat { color: var(--accent-2); font-weight: 600; }
.suggestions .s-title, .suggestions .s-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions mark { background: none; color: var(--accent); }
.suggestions .empty { color: var(--muted); cursor: default; justify-content: center; }

.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  position: relative; overflow: hidden;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: transform .25s var(--ease-spring), opacity .2s, box-shadow .25s, background .2s;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(30, 215, 96, .3);
}
.btn-primary:not(:disabled)::before {
  /* fényvillanás */
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: shine 3.5s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 32px rgba(30, 215, 96, .45); }
.btn-ghost { background: var(--surface-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .13); }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: .25;
  transform: scale(0);
  animation: ripple .6s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.shake { animation: shake .45s; }
@keyframes shake {
  15%, 55% { transform: translateX(-7px); }
  35%, 75% { transform: translateX(7px); }
}

/* Értesítés */
.toast {
  position: fixed;
  left: 50%; top: calc(env(safe-area-inset-top) + 70px);
  transform: translateX(-50%);
  background: var(--glass-strong);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  animation: toast-in .4s var(--ease-spring);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -16px) scale(.9); } }

/* Konfetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confetti i {
  position: absolute; top: -14px;
  width: 8px; height: 14px;
  border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); } }

/* ---------- Párbeszédablakok ---------- */
.dialog {
  width: min(92vw, 420px);
  max-height: 88dvh;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: rgba(22, 22, 30, .92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: var(--text);
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.dialog[open] { animation: dialog-in .45s var(--ease-spring); }
.dialog::backdrop { background: rgba(4, 4, 8, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog[open]::backdrop { animation: fade .3s; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(.92); } }
@keyframes fade { from { opacity: 0; } }
.dialog h2 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 900; }
.dialog h3 { margin: 18px 0 8px; font-size: .95rem; color: var(--muted); font-weight: 700; }
.dialog > form > .btn { width: 100%; margin-top: 20px; }
.dialog .buttons { margin-top: 18px; }
.dialog p { color: var(--muted); }
.help { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.help li { display: flex; gap: 12px; align-items: flex-start; }
.help-ico {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-weight: 900;
}
.help-ico.near { background: rgba(255, 197, 71, .2); color: var(--near); }
.help li:nth-child(n) { animation: rise .5s var(--ease-out) backwards; }
.help li:nth-child(2) { animation-delay: .05s; }
.help li:nth-child(3) { animation-delay: .1s; }
.help li:nth-child(4) { animation-delay: .15s; }
.help li:nth-child(5) { animation-delay: .2s; }
.help li:nth-child(6) { animation-delay: .25s; }
.hint-keys { font-size: .85rem; margin: 16px 0 0; }
kbd {
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 5px;
  font: inherit; font-size: .8rem; color: var(--text);
}
@media (hover: none) { .hint-keys { display: none; } }

.stat-points { margin: 0 0 4px; font-size: 1.6rem; font-weight: 900; color: var(--near) !important; }
.stat-note { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.stat-grid > div { padding: 10px 4px; border-radius: 14px; background: var(--surface); animation: rise .5s var(--ease-out) backwards; }
.stat-grid > div:nth-child(2) { animation-delay: .05s; }
.stat-grid > div:nth-child(3) { animation-delay: .1s; }
.stat-grid > div:nth-child(4) { animation-delay: .15s; }
.stat-grid .n { font-size: 1.5rem; font-weight: 900; }
.stat-grid .l { font-size: .72rem; color: var(--muted); font-weight: 600; }
.dist { display: grid; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 1.6em 1fr; align-items: center; gap: 8px; font-size: .9rem; font-weight: 700; }
.dist-bar {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 3px 8px;
  text-align: right;
  font-weight: 800;
  min-width: 2em;
  transform-origin: left;
  animation: grow .7s var(--ease-out) backwards;
}
@keyframes grow { from { transform: scaleX(0); } }
.dist-bar.hl { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.dist-bar.loss { background: rgba(255, 84, 112, .8); color: #fff; }

/* ---------- Napi nehézségek ---------- */
.diff-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; }
.diff-dot { font-size: .8rem; }
.diff-mult {
  font-size: .72rem; font-weight: 800;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.chip[aria-pressed="true"] .diff-mult { background: rgba(0, 0, 0, .15); }
.diff-state {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .7rem; font-weight: 900;
  animation: pop-in .4s var(--ease-spring);
}
.diff-chip.won .diff-state { background: var(--accent); color: var(--accent-ink); }
.diff-chip.lost .diff-state { background: var(--wrong); color: #fff; }
.chip[aria-pressed="true"].won .diff-state { background: var(--accent-ink); color: var(--accent); }
/* Telefonon mind a négy szint elfér: a szorzó a fenti sávban látszik, a többi szintnél csak a pötty. */
@media (max-width: 520px) {
  .diff-chip .diff-mult { display: none; }
  .diff-chip:not([aria-pressed="true"]) > span:nth-child(2) { display: none; }
  .diff-chip:not([aria-pressed="true"]) { padding: 0 11px; }
  .categories:has(.diff-chip) { justify-content: safe center; }
}

.diff-table { display: grid; gap: 4px; }
.diff-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  animation: rise .5s var(--ease-out) backwards;
}
.diff-row span:first-child { text-align: left; white-space: nowrap; font-weight: 700; }
.diff-row.head { background: none; padding-top: 0; padding-bottom: 0; font-size: .68rem; font-weight: 600; color: var(--muted); animation: none; }

/* ---------- Jelentés ---------- */
.report-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .75rem; font-weight: 700;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.report-btn:hover { color: var(--text); border-color: var(--border-strong); }
.report-btn.reported { color: var(--near); border-color: rgba(255, 197, 71, .4); background: rgba(255, 197, 71, .1); }
.report-song { color: var(--text) !important; font-weight: 700; margin: -6px 0 6px; }
.report-reasons { display: grid; gap: 8px; margin-top: 12px; }
.report-reasons .btn { justify-content: flex-start; min-height: 48px; font-weight: 700; font-size: .95rem; }

.lib-tools { display: flex; gap: 8px; margin: -2px 0 10px; flex-wrap: wrap; }
.lib-search[hidden] + .lib-tools { margin-top: 14px; }
.lib-tools .chip { min-height: 36px; font-size: .85rem; }
.lib-reported li { align-items: center; }
.lib-reported .reason { color: var(--near) !important; }
.lib-restore {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: .78rem; font-weight: 700;
  cursor: pointer;
}
.lib-tracks li.is-blocked { opacity: .45; }
.lib-tracks li.is-blocked b::after { content: " ⚑"; color: var(--near); }

/* ---------- Dallista ---------- */
.topbar-side.right { width: 96px; }
.dialog-tall[open] {
  width: min(94vw, 520px);
  height: min(88dvh, 760px);
  display: flex; flex-direction: column;
  padding: 18px 16px 0;
}
.lib-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lib-head h2 { margin: 0; }
.lib-meta { margin: 2px 0 0; font-size: .85rem; }
.lib-search { position: relative; margin: 14px 0 10px; flex: none; }
#libSearch {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#libSearch:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30, 215, 96, .15); }
.lib-list { flex: 1; overflow-y: auto; margin: 0 -16px; padding: 0 16px 16px; overscroll-behavior: contain; }
.lib-group { border-bottom: 1px solid var(--border); }
.lib-group summary {
  list-style: none;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
  padding: 6px 4px;
  cursor: pointer;
  font-weight: 700;
}
.lib-group summary::-webkit-details-marker { display: none; }
.lib-group summary img {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.lib-group summary .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-group summary .count {
  font-size: .8rem; color: var(--muted);
  padding: 2px 8px; border-radius: 999px; background: var(--surface);
}
.lib-group summary .chev { color: var(--muted); transition: transform .3s var(--ease-out); }
.lib-group[open] summary .chev { transform: rotate(90deg); }
.lib-tracks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; animation: rise .3s var(--ease-out); }
.lib-tracks li {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 4px 6px 8px;
  border-radius: 10px;
}
.lib-tracks li:hover { background: var(--surface); }
.lib-tracks li { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s; }
.lib-tracks li:active { background: var(--surface-2); }
.lib-tracks li:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Lejátszás gomb a sor végén: háromszög, lejátszás közben ugráló oszlopok */
.lib-play {
  position: relative;
  flex: none;
  width: 32px; height: 32px;
  margin-right: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s var(--ease-spring);
}
.lib-play::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--silver);
}
.lib-tracks li.playing { background: rgba(30, 215, 96, .08); }
.lib-tracks li.playing .t b { color: var(--accent); }
.lib-tracks li.playing .lib-play {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.lib-tracks li.playing .lib-play::before {
  /* három oszlop egy elemmel: box-shadow másolatok */
  border: none;
  width: 3px; height: 12px;
  border-radius: 2px;
  background: var(--silver);
  transform: translate(-50%, -50%);
  box-shadow: -6px 0 0 var(--silver), 6px 0 0 var(--silver);
  animation: lib-eq .9s ease-in-out infinite;
}
.lib-tracks li.loading .lib-play::before { animation: lib-eq .45s ease-in-out infinite; opacity: .6; }
@keyframes lib-eq {
  0%, 100% { height: 6px; }
  50% { height: 14px; }
}
.lib-tracks img { width: 36px; height: 36px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.lib-tracks .t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lib-list { overflow-x: hidden; }
.lib-list mark { background: none; color: var(--accent); }
.lib-tracks .t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-tracks .t span { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-tracks mark { background: none; color: var(--accent); }
.lib-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- Méretek ---------- */
/* ---------- Napi előadó ---------- */
.artist-chip .diff-mult { text-transform: uppercase; letter-spacing: .06em; }
/* Az előadó-oldal a fő nézetben: a dalos játék és a vezérlősáv helyén */
body[data-mode="artist"] .categories-wrap,
body[data-mode="artist"] .daily-banner,
body[data-mode="artist"] .dock { display: none; }
.artist-view { max-width: 520px; margin: 0 auto; padding: 0 16px 24px; animation: rise .4s var(--ease-out); }
/* Nem ragad a tetejére: az új tipp úgyis felülre kerül, így a lista nem csúszik alá. */
.ad-top { position: relative; z-index: 5; padding: 4px 0 0; }
.ad-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ad-title h2 { margin: 0; font-size: 1.35rem; font-weight: 900; }
.ad-title p { margin: 0; color: var(--muted); font-size: .85rem; }
.ad-search { position: relative; margin: 10px 0 8px; flex: none; }
#adInput {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#adInput:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30, 215, 96, .15); }
.ad-suggestions {
  top: calc(100% + 6px); bottom: auto;
  max-height: min(46dvh, 360px);
  transform-origin: top center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  z-index: 20;
}
.ad-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; flex: none; }
.ad-tools .chip { min-height: 34px; font-size: .82rem; }
.ad-tools .chip:disabled { opacity: .5; cursor: default; }
.ad-tools .chip.loading { animation: blink 1s ease-in-out infinite; }
.ad-legend { font-size: .72rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ad-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-left: 4px; }
.ad-legend i.hit { background: var(--accent); }
.ad-legend i.near { background: var(--near); }
.ad-scroll { flex: 1; overflow-y: auto; margin: 0 -16px; padding: 0 16px 16px; overscroll-behavior: contain; }
.ad-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.ad-guesses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ad-row { animation: rise .4s var(--ease-out); }
.ad-name { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: .92rem; }
.ad-name img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.ad-row.win .ad-name b { color: var(--accent); }
.ad-tile {
  min-height: 44px;
  display: grid; place-items: center;
  padding: 4px 3px;
  border-radius: 10px;
  text-align: center;
  font-size: .74rem; font-weight: 800; line-height: 1.15;
  overflow-wrap: anywhere;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  animation: ad-flip .5s var(--ease-out) backwards;
}
.ad-tile.still { animation: none; }
button.ad-tile { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; align-content: center; gap: 1px; }
button.ad-tile:active { transform: scale(.95); }
.ad-tile small { display: block; font-size: .56rem; font-weight: 700; opacity: .7; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
.ad-tile.hit { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; }
.ad-tile.near { background: var(--near); color: #2a1d00; border-color: transparent; }
.ad-tile.miss { background: rgba(255, 255, 255, .05); color: rgba(244, 244, 248, .8); }
/* Mezőmagyarázat: hosszabb szöveg, kártya forma */
.toast.long { width: max-content; max-width: min(calc(100vw - 32px), 420px); border-radius: 16px; text-align: center; line-height: 1.35; font-weight: 600; }
@keyframes ad-flip { from { transform: perspective(300px) rotateX(-90deg); opacity: 0; } }
.ad-empty { font-size: .9rem; line-height: 1.5; margin: 18px 4px; }
.ad-empty b { color: var(--text); font-weight: 700; }
.ad-help { margin: 14px 0 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-size: .84rem; line-height: 1.45; color: var(--muted); }
.ad-help summary { list-style: none; cursor: pointer; padding: 10px 14px; font-weight: 800; color: var(--text); display: flex; justify-content: space-between; }
.ad-help summary::-webkit-details-marker { display: none; }
.ad-help summary::after { content: "›"; transition: transform .3s var(--ease-out); }
.ad-help[open] summary::after { transform: rotate(90deg); }
.ad-help > :not(summary) { margin: 0 14px 10px; }
.ad-help dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
.ad-help dt { font-weight: 800; color: var(--text); }
.ad-help dd { margin: 0; }
.ad-help b { color: var(--text); }
.ad-help-key i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 4px; background: rgba(255, 255, 255, .15); }
.ad-help-key i.hit { background: var(--accent); }
.ad-help-key i.near { background: var(--near); }
.ad-win {
  text-align: center;
  padding: 16px;
  margin: 4px 0 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(30, 215, 96, .16), rgba(25, 227, 192, .06));
  border: 1px solid rgba(30, 215, 96, .3);
  animation: rise .5s var(--ease-out);
}
.ad-win p { margin: 0 0 4px; }
.ad-answer { margin: 10px 0 12px; text-align: left; }
.ad-answer .ad-name { display: none; }
.ad-win.lost { background: linear-gradient(135deg, rgba(255, 84, 112, .14), rgba(255, 84, 112, .04)); border-color: rgba(255, 84, 112, .3); }
.ad-win.lost .ad-win-title { color: var(--wrong) !important; }
.ad-win.lost .ad-win-points { color: var(--muted) !important; }
.ad-giveup { color: var(--wrong); border-color: rgba(255, 84, 112, .3); }
.ad-giveup.confirm { background: var(--wrong); color: #fff; border-color: transparent; animation: bump .5s var(--ease-spring); }
.ad-win-title { color: var(--accent) !important; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.ad-win-name { color: var(--text) !important; font-size: 1.6rem; font-weight: 900; }
.ad-win-points { color: var(--near) !important; font-weight: 900; }
.ad-win-next { font-size: .82rem; }
.ad-win .btn { margin-top: 10px; min-height: 44px; padding: 0 22px; }

@media (max-height: 760px) {
  :root { --tap: 48px; }
  .wave { height: 40px; }
  .game { gap: 8px; }
  .topbar { padding-top: 6px; padding-bottom: 4px; }
  .dock-inner { gap: 7px; padding-top: 8px; padding-bottom: 10px; }
}
@media (max-height: 640px) {
  :root { --tap: 44px; }
  .chip { min-height: 32px; }
  .wave { height: 32px; }
  .play-btn { width: 54px; height: 54px; }
  .reveal-title { font-size: 1.3rem; }
}
/* Három fül csak ikon nélkül fér el telefonon. */
@media (max-width: 520px) {
  .segmented button svg { display: none; }
  .segmented button { gap: 4px; padding: 0 3px; font-size: .86rem; }
  #artistBadge { min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
}
@media (max-width: 400px) {
  .topbar { padding-left: 10px; padding-right: 10px; }
  .topbar-side, .topbar-side.right { gap: 6px; width: 86px; }
  .icon-btn { width: 40px; height: 40px; }
  .logo { font-size: 1.25rem; gap: 6px; }
}
@media (max-width: 400px) {
  /* telefonon a díszítő érme helyett több hely jut a három fülnek */
  .points-pill .coin { display: none; }
  .points-pill { padding-left: 2px; }
}
@media (max-width: 440px) {
  .points-text small, .round-pts small { letter-spacing: .06em; }
  .round-pts { min-width: 44px; padding: 0 7px 0 4px; }
  .points-pill { padding: 0 10px 0 4px; gap: 6px; }
  .points-pill .coin { width: 30px; height: 30px; }
  .points-pill .coin svg { width: 16px; height: 16px; }
  .points-text small, .round-pts small { font-size: .5rem; }
}
@media (min-width: 600px) {
  .categories { justify-content: center; flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
}

/* Asztali nézet: több levegő a sorok között, nagyobb lemez, függőlegesen középre igazított játék. */
@media (min-width: 900px) and (min-height: 700px) {
  :root { --disc: clamp(140px, calc(100dvh - 610px), 340px); }
  .topbar { padding: 12px 28px 8px; }
  .mode-row { max-width: 640px; padding-bottom: 12px; }
  .categories { gap: 10px; padding: 2px 16px 12px; }
  .chip { min-height: 38px; padding: 0 18px; }
  .scroll { display: flex; flex-direction: column; }
  .game { max-width: 600px; width: 100%; margin: auto; gap: 10px; padding: 6px 16px 14px; }
  .wave { height: 48px; }
  .dock-inner { max-width: 600px; gap: 10px; padding: 14px 16px 18px; }
  .artist-view { max-width: 680px; width: 100%; padding-top: 8px; }
  .ad-top {
    margin: 0 0 14px; padding: 16px 18px 4px;
    border-radius: 20px; border: 1px solid var(--border);
    background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .ad-search { margin: 16px 0 12px; }
  .ad-tools { margin-bottom: 18px; }
  .ad-guesses { gap: 22px; }
  .ad-name { margin-bottom: 8px; font-size: 1rem; }
  .ad-tiles { gap: 8px; }
  .ad-tile { min-height: 58px; font-size: .86rem; }
  .ad-tile small { font-size: .62rem; margin-bottom: 3px; }
  .ad-empty { margin: 24px 4px; font-size: .98rem; }
  .ad-help { font-size: .92rem; }
  .ad-help dl { gap: 10px 16px; }
}
/* Magas asztali képernyőn még több hely. */
@media (min-width: 900px) and (min-height: 860px) {
  :root { --disc: clamp(180px, calc(100dvh - 660px), 340px); }
  .topbar { padding: 18px 28px 14px; }
  .mode-row { padding-bottom: 18px; }
  .categories { padding-bottom: 18px; }
  .chip { min-height: 40px; }
  .game { gap: 14px; padding: 8px 16px 20px; }
  .wave { height: 56px; }
  .dock-inner { gap: 12px; padding: 16px 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .blob { animation: none !important; }
}
