:root {
  color-scheme: dark;
  --bg: #09090d;
  --panel: #111116;
  --panel-2: #16161d;
  --line: rgba(255,255,255,.10);
  --text: #f7f7fa;
  --muted: #9b9ba9;
  --pink: #ff4fc8;
  --pink-2: #ff7eda;
  --purple: #8d64ff;
  --green: #57e4a0;
  --red: #ff6b82;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 9%, rgba(141,100,255,.11), transparent 28rem),
    radial-gradient(circle at 18% 30%, rgba(255,79,200,.08), transparent 26rem),
    var(--bg);
  color: var(--text);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.noise { position: fixed; inset: 0; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: .08em; font-size: 14px; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg,var(--pink),var(--purple)); font-size: 14px; letter-spacing: 0; box-shadow: 0 8px 30px rgba(255,79,200,.24); }
.top-actions { display: flex; gap: 8px; }
.icon-button { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; font-weight: 800; }
.icon-button:hover { background: rgba(255,255,255,.06); }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; flex: 1 0 auto; padding-bottom: 28px; }
.hero { padding: 92px 0 76px; }
.eyebrow, .modal-kicker { color: var(--pink-2); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.hero h1, .game-header h1 { margin: 18px 0 20px; letter-spacing: -.055em; line-height: .94; font-size: clamp(52px, 8vw, 106px); max-width: 920px; }
.hero h1 span { background: linear-gradient(90deg,#fff 0%,#ffb8ea 45%,#a98dff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { color: var(--muted); font-size: clamp(17px,2vw,21px); line-height: 1.65; max-width: 650px; margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 36px; flex-wrap: wrap; }
.primary-button, .secondary-button, .submit-button, .skip-button { min-height: 48px; border-radius: 14px; font-weight: 800; cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.primary-button { border: 0; padding: 0 20px; background: linear-gradient(135deg,var(--pink),var(--purple)); color: white; box-shadow: 0 12px 38px rgba(255,79,200,.18); }
.primary-button:hover, .submit-button:hover, .play-button:hover { transform: translateY(-1px); }
.primary-button span { margin-left: 8px; }
.primary-button.compact { min-height: 44px; }
.primary-button.full { width: 100%; margin-top: 18px; }
.today-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 700; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(87,228,160,.08); }
.game-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; margin-top: 86px; }
.game-card { min-height: 265px; border-radius: 24px; padding: 24px; border: 1px solid var(--line); background: linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.018)); display: flex; flex-direction: column; }
.game-card.featured { background: radial-gradient(circle at 82% 0%,rgba(255,79,200,.16),transparent 45%), linear-gradient(180deg,#17131b,#111116); border-color: rgba(255,79,200,.26); }
.game-card-top { display: flex; justify-content: space-between; align-items: center; }
.game-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.06); font-weight: 900; font-size: 22px; }
.live-pill, .soon-pill { font-size: 10px; letter-spacing: .14em; font-weight: 900; border-radius: 999px; padding: 8px 10px; }
.live-pill { color: #ffb6e8; background: rgba(255,79,200,.10); border: 1px solid rgba(255,79,200,.18); }
.soon-pill { color: var(--muted); background: rgba(255,255,255,.04); }
.game-card h2 { font-size: 27px; margin: auto 0 8px; letter-spacing: -.03em; }
.game-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.text-button { border: 0; background: none; text-align: left; padding: 18px 0 0; color: #ffc5ed; cursor: pointer; font-weight: 800; }
.muted-card { opacity: .56; }
.hidden { display: none !important; }
.game-screen { padding: 44px 0 112px; max-width: 860px; margin: 0 auto; }
.back-button { border: 0; background: none; color: var(--muted); padding: 8px 0; cursor: pointer; }
.game-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 32px; }
.game-header h1 { font-size: clamp(52px,8vw,84px); margin-bottom: 0; }
.attempt-counter { border: 1px solid var(--line); border-radius: 18px; min-width: 88px; height: 72px; display: flex; align-items: baseline; justify-content: center; gap: 4px; padding-top: 14px; }
.attempt-counter span { font-size: 31px; font-weight: 900; }
.attempt-counter small { color: var(--muted); }
.player-card { display: grid; grid-template-columns: 190px 1fr; gap: 24px; margin-top: 36px; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); }
.cover-shell { aspect-ratio: 1; border-radius: 20px; overflow: hidden; position: relative; display: grid; place-items: center; background: linear-gradient(135deg,#1d1722,#211a35 55%,#101016); }
.vinyl-ring { position: absolute; width: 74%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.10); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.015),0 0 0 40px rgba(255,255,255,.012); }
.cover-letter { font-size: 48px; font-weight: 950; background: linear-gradient(135deg,var(--pink-2),#b9a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; z-index: 2; }
.cover-shell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.cover-shell.revealed img { opacity: 1; }
.cover-shell.revealed .cover-letter,.cover-shell.revealed .vinyl-ring { opacity: 0; }
.player-main { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.waveform { height: 72px; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.waveform i { flex: 1; min-width: 2px; max-width: 5px; border-radius: 99px; background: linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,.12)); opacity: .75; }
.time-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }
.player-controls { display: flex; align-items: center; gap: 14px; margin-top: 17px; }
.play-button { width: 54px; height: 54px; border: 0; border-radius: 50%; background: linear-gradient(135deg,var(--pink),var(--purple)); cursor: pointer; color: white; font-weight: 900; box-shadow: 0 12px 34px rgba(255,79,200,.22); }
.player-controls strong, .player-controls span { display: block; }
.player-controls span { color: var(--muted); margin-top: 5px; font-size: 13px; }
.audio-status { margin-top: 14px; color: #ffc1eb; font-size: 12px; min-height: 18px; }
.progress-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 7px; margin: 17px 2px 0; }
.progress-dot { height: 6px; border-radius: 99px; background: rgba(255,255,255,.10); }
.progress-dot.active { background: linear-gradient(90deg,var(--pink),var(--purple)); }
.progress-dot.wrong { background: rgba(255,107,130,.55); }
.progress-dot.win { background: var(--green); }
.guess-form { margin-top: 34px; }
.guess-form label { display: block; color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 9px; }
.search-wrap { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.search-wrap input { width: 100%; min-height: 54px; border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--text); padding: 0 16px; outline: none; font-size: 16px; }
.search-wrap input:focus { border-color: rgba(255,79,200,.55); box-shadow: 0 0 0 4px rgba(255,79,200,.08); }
.submit-button { border: 0; background: white; color: #0c0c10; padding: 0 20px; min-width: 96px; }
.submit-button:disabled { opacity: .28; cursor: not-allowed; transform: none; }
.suggestions { position: absolute; z-index: 10; left: 0; right: 105px; top: 61px; border: 1px solid var(--line); background: #15151b; border-radius: 15px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.55); max-height: 310px; overflow-y: auto; }
.suggestion { width: 100%; display: flex; justify-content: space-between; gap: 14px; border: 0; background: transparent; color: var(--text); padding: 13px 14px; cursor: pointer; text-align: left; }
.suggestion:hover,.suggestion.focused { background: rgba(255,255,255,.055); }
.suggestion strong { font-size: 14px; }
.suggestion span { color: var(--muted); font-size: 12px; text-align: right; }
.guess-history { display: grid; gap: 8px; margin-top: 15px; }
.guess-item { min-height: 52px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(255,255,255,.02); }
.guess-item strong { font-size: 14px; }
.guess-item span { color: var(--muted); font-size: 12px; text-align: right; }
.guess-item.wrong { border-color: rgba(255,107,130,.25); }
.bottom-actions { display: flex; justify-content: center; margin-top: 18px; }
.skip-button { border: 1px solid var(--line); background: transparent; padding: 0 18px; color: var(--muted); }
.skip-button span { color: #ddd; margin-left: 6px; }
.result-panel { margin-top: 30px; border: 1px solid rgba(87,228,160,.22); border-radius: 24px; padding: 24px; background: radial-gradient(circle at 100% 0,rgba(87,228,160,.08),transparent 35%),var(--panel); }
.result-panel h2 { margin: 10px 0 2px; font-size: clamp(32px,6vw,52px); letter-spacing: -.04em; }
.result-panel p { margin: 0; color: var(--muted); font-size: 18px; }
.result-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 17px; }
.result-meta span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; color: var(--muted); font-size: 12px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.secondary-button { text-decoration: none; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--line); color: var(--text); }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); }
.next-card strong { color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; border-top: 1px solid var(--line); padding: 26px 0 max(52px, env(safe-area-inset-bottom)); flex: 0 0 auto; display: flex; justify-content: space-between; gap: 30px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line); background: #121218; color: var(--text); border-radius: 24px; padding: 28px; box-shadow: 0 28px 90px rgba(0,0,0,.68); }
.modal::backdrop { background: rgba(5,5,8,.78); backdrop-filter: blur(8px); }
.modal-close { position: absolute; top: 16px; right: 16px; border: 1px solid var(--line); width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; }
.modal h2 { margin: 10px 0 20px; font-size: 34px; letter-spacing: -.04em; }
.modal ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.modal li { display: grid; grid-template-columns: 45px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.modal li > span { color: var(--pink-2); font-weight: 900; font-size: 12px; padding-top: 2px; }
.modal li strong { font-size: 14px; }
.modal li p { color: var(--muted); margin: 5px 0 0; line-height: 1.45; font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.stats-grid div { border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 15px; padding: 16px 8px; text-align: center; }
.stats-grid strong { display: block; font-size: 26px; }
.stats-grid span { display: block; color: var(--muted); margin-top: 5px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.distribution { margin-top: 22px; }
.distribution h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.bar-row { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: center; margin-top: 7px; color: var(--muted); font-size: 11px; }
.bar { min-width: 28px; height: 26px; background: rgba(255,255,255,.08); border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; color: #eee; font-weight: 800; }
@media (max-width: 760px) {
  .topbar, main, footer { width: min(100% - 28px, 1180px); }
  .hero { padding-top: 62px; }
  .game-grid { grid-template-columns: 1fr; margin-top: 60px; }
  .game-card { min-height: 210px; }
  .player-card { grid-template-columns: 110px 1fr; gap: 16px; padding: 16px; border-radius: 20px; }
  .waveform { height: 54px; }
  .player-controls { margin-top: 12px; }
  .play-button { width: 48px; height: 48px; flex: 0 0 auto; }
  .game-header { align-items: center; }
  .attempt-counter { min-width: 72px; height: 62px; }
  .search-wrap { grid-template-columns: 1fr; }
  .submit-button { min-height: 52px; }
  .suggestions { right: 0; top: 61px; }
  footer { flex-direction: column; gap: 10px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 52px; }
  .game-header h1 { font-size: 50px; }
  .player-card { grid-template-columns: 1fr; }
  .cover-shell { max-width: 180px; width: 100%; margin: 0 auto; }
  .player-main { padding: 0 2px 4px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}


/* Daily challenge selector */
.challenge-section { margin-top: 78px; padding-top: 38px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.045em; }
.section-heading p { max-width: 410px; margin: 0; color: var(--muted); line-height: 1.55; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.mode-card { position: relative; min-width: 0; min-height: 150px; padding: 17px; text-align: left; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.025); color: var(--text); cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.mode-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.045); }
.mode-card.active { border-color: rgba(255,79,200,.38); background: radial-gradient(circle at 100% 0, rgba(255,79,200,.13), transparent 55%), rgba(255,255,255,.03); }
.mode-number { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 9px; background: rgba(255,255,255,.06); color: #ffc2eb; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.mode-card strong { display: block; margin-top: 26px; font-size: 17px; letter-spacing: -.02em; }
.mode-card small { display: block; margin-top: 5px; padding-right: 22px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.mode-arrow { position: absolute; right: 16px; bottom: 16px; color: #ffc2eb; font-weight: 900; }
.mode-kicker { margin-top: 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.music-button { min-height: 44px; }
.preview-note { margin: 13px 0 0 !important; color: var(--muted) !important; font-size: 12px !important; line-height: 1.45; }
.skip-button:disabled, .play-button:disabled { opacity: .32; cursor: not-allowed; transform: none; }

/* Keep dialogs and the bottom of the page usable on short/mobile viewports. */
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }
body::after { content: ''; display: block; height: env(safe-area-inset-bottom); flex: 0 0 auto; }

@media (max-width: 900px) {
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .challenge-section { margin-top: 58px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-actions > * { flex: 1 1 100%; justify-content: center; text-align: center; }
  .game-screen { padding-bottom: 132px; }
}
@media (max-width: 430px) {
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 125px; }
  .mode-card strong { margin-top: 20px; }
}

/* v3 — collections, volume controls, verified artwork and all-records hub */
.nav-button {
  min-height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--text);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}
.nav-button:hover { background: rgba(255,255,255,.06); }

.section-heading-side { display: grid; justify-items: end; gap: 12px; }
.records-link {
  border: 0;
  background: none;
  padding: 0;
  color: #ffc2eb;
  font-weight: 850;
  cursor: pointer;
}
.records-link:hover { color: #fff; }

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.collection-card {
  min-width: 0;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.015));
  color: var(--text);
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.collection-card::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  right: -90px;
  top: -100px;
  background: rgba(255,79,200,.07);
  filter: blur(4px);
  pointer-events: none;
}
.collection-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.collection-card[aria-expanded="true"] { border-color: rgba(255,79,200,.34); background: radial-gradient(circle at 100% 0,rgba(255,79,200,.10),transparent 50%), rgba(255,255,255,.035); }
.daily-collection { border-color: rgba(255,79,200,.32); background: radial-gradient(circle at 100% 0,rgba(255,79,200,.13),transparent 52%), linear-gradient(180deg,#17131b,#111116); }
.collection-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  font-size: 25px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}
.music-icon { background: linear-gradient(135deg,rgba(255,79,200,.18),rgba(141,100,255,.18)); color: #ffd5f2; }
.folder-icon {
  width: 55px;
  height: 42px;
  border-radius: 10px 12px 12px 12px;
  background: linear-gradient(135deg,rgba(255,126,218,.22),rgba(141,100,255,.16));
  border: 1px solid rgba(255,255,255,.09);
  position: relative;
  margin-top: 8px;
}
.folder-icon::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 10px;
  left: 6px;
  top: -7px;
  border-radius: 7px 7px 0 0;
  background: rgba(255,126,218,.25);
  border: 1px solid rgba(255,255,255,.08);
  border-bottom: 0;
}
.collection-copy { display: block; margin-top: auto; padding-top: 44px; position: relative; z-index: 1; }
.collection-copy strong { display: block; font-size: 25px; letter-spacing: -.035em; }
.collection-copy small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 300px; }
.collection-status {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #ffc2eb;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 850;
  position: relative;
  z-index: 1;
}
.collection-status b { font-size: 16px; }

.folder-panel {
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  background: radial-gradient(circle at 80% 0,rgba(141,100,255,.07),transparent 36%), rgba(255,255,255,.018);
  padding: 26px;
}
.folder-header { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.folder-header h3 { margin: 9px 0 0; font-size: clamp(28px,4vw,42px); letter-spacing: -.04em; }
.folder-close { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; font-size: 18px; }
.submode-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 24px; }
.submode-card {
  min-width: 0;
  min-height: 150px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  text-align: left;
  padding: 18px 42px 18px 18px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.submode-card:hover { transform: translateY(-2px); border-color: rgba(255,79,200,.28); background: rgba(255,255,255,.045); }
.submode-label { display: block; color: #ffc2eb; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.submode-card strong { display: block; margin-top: 28px; font-size: 19px; letter-spacing: -.02em; }
.submode-card small { display: block; color: var(--muted); margin-top: 7px; font-size: 11px; line-height: 1.4; }
.submode-card > span:last-child { position: absolute; right: 17px; bottom: 17px; color: #ffc2eb; font-weight: 900; }

.listen-copy { min-width: 0; }
.volume-control {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 184px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.volume-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d9d9e3;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.volume-button:hover { background: rgba(255,255,255,.06); }
.volume-button svg { width: 19px; height: 19px; fill: currentColor; }
.volume-button svg path:not(:first-child) { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.volume-button .mute-slash { display: none; }
.volume-button.muted .volume-waves { display: none; }
.volume-button.muted .mute-slash { display: block; }
.volume-slider {
  width: 92px;
  height: 4px;
  margin: 0;
  accent-color: var(--pink-2);
  cursor: pointer;
}
.player-controls .volume-value {
  min-width: 30px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Only reveal artwork when the API result passed the stricter release check. */
.cover-shell.revealed img { opacity: 0; }
.cover-shell.revealed .cover-letter,
.cover-shell.revealed .vinyl-ring { opacity: 1; }
.cover-shell.revealed.artwork-visible img { opacity: 1; }
.cover-shell.revealed.artwork-visible .cover-letter,
.cover-shell.revealed.artwork-visible .vinyl-ring { opacity: 0; }

.records-result-button { min-height: 44px; background: transparent; cursor: pointer; border-radius: 14px; }
.records-modal { width: min(920px, calc(100% - 32px)); }
.records-modal > h2 { margin-bottom: 22px; }
.records-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.records-summary > div { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); padding: 18px 12px; text-align: center; }
.records-summary strong { display: block; font-size: 28px; }
.records-summary span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.records-groups { display: grid; gap: 24px; margin-top: 28px; }
.records-group > h3 { margin: 0 0 9px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.record-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px,1.8fr) repeat(4,minmax(66px,.7fr));
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: rgba(255,255,255,.018);
  color: var(--text);
  padding: 12px 13px;
  cursor: pointer;
  text-align: center;
}
.record-row:first-of-type { border-radius: 14px 14px 0 0; }
.record-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.record-row:only-of-type { border-bottom: 1px solid var(--line); border-radius: 14px; }
.record-row:hover, .record-row.active { background: rgba(255,255,255,.045); }
.record-row.active { border-color: rgba(255,79,200,.25); }
.record-row > span { min-width: 0; }
.record-row b { display: block; font-size: 14px; }
.record-row small { display: block; color: var(--muted); margin-top: 3px; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.record-name { text-align: left; }
.record-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.record-name small { text-transform: none; letter-spacing: 0; }
.record-detail { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 26px; }
.record-detail-head h3 { margin: 7px 0 16px; font-size: 27px; letter-spacing: -.03em; }

/* Stronger bottom/safe-area protection. */
body { min-height: 100vh; min-height: 100dvh; }
main { min-height: 0; padding-bottom: max(56px, env(safe-area-inset-bottom)); }
.game-screen { padding-bottom: max(140px, calc(96px + env(safe-area-inset-bottom))); }
footer { padding-bottom: max(64px, calc(36px + env(safe-area-inset-bottom))); }

@media (max-width: 900px) {
  .collection-grid { grid-template-columns: 1fr; }
  .collection-card { min-height: 190px; }
  .collection-copy { padding-top: 32px; }
  .submode-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .player-controls { flex-wrap: wrap; }
  .volume-control { margin-left: 68px; }
}
@media (max-width: 760px) {
  .section-heading-side { justify-items: start; }
  .collection-card { min-height: 175px; padding: 20px; }
  .collection-copy { padding-top: 26px; }
  .collection-copy strong { font-size: 22px; }
  .folder-panel { padding: 20px; }
  .records-modal { width: min(100% - 20px, 920px); padding: 22px 16px; }
  .record-row { grid-template-columns: minmax(135px,1.5fr) repeat(2,minmax(56px,.7fr)); }
  .record-row > span:nth-child(4), .record-row > span:nth-child(5) { display: none; }
  .records-summary { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .nav-button { padding: 0 10px; }
  .submode-grid { grid-template-columns: 1fr; }
  .submode-card { min-height: 125px; }
  .submode-card strong { margin-top: 20px; }
  .volume-control { margin-left: 0; width: 100%; min-width: 0; }
  .volume-slider { flex: 1; width: auto; }
  .record-row { grid-template-columns: minmax(120px,1.5fr) minmax(54px,.7fr); }
  .record-row > span:nth-child(3), .record-row > span:nth-child(4), .record-row > span:nth-child(5) { display: none; }
}
@media (max-width: 420px) {
  .top-actions { gap: 6px; }
  .nav-button > span:first-child { display: none; }
  .collection-card { min-height: 165px; }
  .folder-panel { padding: 17px; }
}

/* Daily completion states */
.collection-card.is-won {
  border-color: rgba(87,228,160,.58);
  background:
    radial-gradient(circle at 86% 8%, rgba(87,228,160,.20), transparent 42%),
    linear-gradient(180deg, rgba(87,228,160,.065), rgba(255,255,255,.018));
  box-shadow: 0 0 0 1px rgba(87,228,160,.08) inset, 0 0 34px rgba(87,228,160,.10);
}
.collection-card.is-failed {
  border-color: rgba(255,107,130,.42);
  background:
    radial-gradient(circle at 86% 8%, rgba(255,107,130,.14), transparent 42%),
    linear-gradient(180deg, rgba(255,107,130,.045), rgba(255,255,255,.018));
  box-shadow: 0 0 30px rgba(255,107,130,.07);
}
.collection-card.is-won .collection-status { color: #8ff0bf; }
.collection-card.is-failed .collection-status { color: #ff9cac; }
.collection-card.has-progress {
  border-color: rgba(255,126,218,.34);
  background:
    radial-gradient(circle at 88% 4%, rgba(255,79,200,.14), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.018));
  box-shadow: 0 0 30px rgba(255,79,200,.065);
}
.collection-card.is-complete.folder-card {
  border-color: rgba(87,228,160,.52);
  background:
    radial-gradient(circle at 88% 4%, rgba(87,228,160,.18), transparent 44%),
    linear-gradient(180deg, rgba(87,228,160,.055), rgba(255,255,255,.018));
  box-shadow: 0 0 34px rgba(87,228,160,.09);
}
.collection-card.is-complete.folder-card .collection-status { color: #8ff0bf; }
.collection-card.is-complete.folder-card .folder-icon {
  background: linear-gradient(135deg,rgba(87,228,160,.30),rgba(141,100,255,.16));
  box-shadow: 0 0 22px rgba(87,228,160,.13);
}

.submode-card.is-complete {
  padding-top: 20px;
}
.submode-card.is-won {
  border-color: rgba(87,228,160,.52);
  background:
    radial-gradient(circle at 92% 0, rgba(87,228,160,.17), transparent 45%),
    rgba(87,228,160,.038);
  box-shadow: 0 0 25px rgba(87,228,160,.085);
}
.submode-card.is-failed {
  border-color: rgba(255,107,130,.40);
  background:
    radial-gradient(circle at 92% 0, rgba(255,107,130,.13), transparent 45%),
    rgba(255,107,130,.028);
  box-shadow: 0 0 24px rgba(255,107,130,.06);
}
.submode-card.is-complete::after {
  content: attr(data-completion-label);
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .10em;
  line-height: 1;
  background: rgba(9,9,13,.58);
}
.submode-card.is-won::after { color: #8ff0bf; }
.submode-card.is-failed::after { color: #ff9cac; }
.submode-card.is-won .submode-label { color: #8ff0bf; }
.submode-card.is-failed .submode-label { color: #ff9cac; }

.game-card.featured.has-progress {
  border-color: rgba(255,126,218,.40);
  box-shadow: 0 0 34px rgba(255,79,200,.08);
}
.game-card.featured.is-complete {
  border-color: rgba(87,228,160,.52);
  background:
    radial-gradient(circle at 82% 0%,rgba(87,228,160,.16),transparent 45%),
    linear-gradient(180deg,#131a18,#111116);
  box-shadow: 0 0 36px rgba(87,228,160,.09);
}
.live-pill.progress-pill {
  color: #ffc5ed;
  border-color: rgba(255,79,200,.28);
  background: rgba(255,79,200,.12);
}
.live-pill.complete-pill {
  color: #8ff0bf;
  border-color: rgba(87,228,160,.28);
  background: rgba(87,228,160,.10);
}

@media (max-width: 560px) {
  .submode-card.is-complete::after {
    top: 12px;
    right: 12px;
    font-size: 7px;
  }
}

/* v5 — unmistakable outcomes, recent-song history, and safer header spacing */
.topbar {
  width: min(1180px, calc(100% - 48px));
  min-height: 88px;
  padding: 8px 4px;
  overflow: visible;
}
.top-actions { flex: 0 0 auto; padding: 2px; margin-right: 2px; }
.icon-button { flex: 0 0 42px; display: inline-grid; place-items: center; line-height: 1; }

.player-card.is-won {
  border-color: rgba(87,228,160,.48);
  box-shadow: 0 0 0 1px rgba(87,228,160,.06), 0 22px 70px rgba(87,228,160,.09);
}
.player-card.is-failed {
  border-color: rgba(255,107,130,.46);
  box-shadow: 0 0 0 1px rgba(255,107,130,.06), 0 22px 70px rgba(255,107,130,.08);
}
.result-panel {
  border-color: var(--line);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.result-panel.is-won {
  border-color: rgba(87,228,160,.55);
  background: radial-gradient(circle at 96% 0, rgba(87,228,160,.14), transparent 40%), var(--panel);
  box-shadow: 0 18px 65px rgba(87,228,160,.10);
}
.result-panel.is-failed {
  border-color: rgba(255,107,130,.55);
  background: radial-gradient(circle at 96% 0, rgba(255,107,130,.13), transparent 40%), var(--panel);
  box-shadow: 0 18px 65px rgba(255,107,130,.09);
}
.outcome-banner {
  min-height: 94px;
  margin: -4px -4px 24px;
  padding: 18px 20px;
  border-radius: 19px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid transparent;
}
.result-panel.is-won .outcome-banner {
  background: linear-gradient(135deg, rgba(87,228,160,.20), rgba(87,228,160,.07));
  border-color: rgba(87,228,160,.28);
}
.result-panel.is-failed .outcome-banner {
  background: linear-gradient(135deg, rgba(255,107,130,.20), rgba(255,107,130,.07));
  border-color: rgba(255,107,130,.30);
}
.outcome-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  font-size: 34px;
  font-weight: 950;
  background: rgba(255,255,255,.07);
}
.result-panel.is-won .outcome-icon { color: var(--green); }
.result-panel.is-failed .outcome-icon { color: var(--red); }
.outcome-copy { min-width: 0; }
.outcome-copy strong {
  display: block;
  font-size: clamp(28px, 5vw, 42px);
  line-height: .95;
  letter-spacing: -.04em;
}
.outcome-copy small {
  display: block;
  margin-top: 8px;
  color: rgba(247,247,250,.72);
  font-size: 13px;
  line-height: 1.4;
}

.recent-history {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.018);
  overflow: hidden;
}
.recent-history summary {
  min-height: 76px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}
.recent-history summary::-webkit-details-marker { display: none; }
.recent-history summary span { min-width: 0; }
.recent-history summary strong { display: block; font-size: 15px; }
.recent-history summary small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.recent-history summary > b {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: #ffc1eb;
  font-size: 20px;
  transition: transform .18s ease;
}
.recent-history[open] summary > b { transform: rotate(45deg); }
.recent-songs-list { border-top: 1px solid var(--line); padding: 6px 20px 12px; }
.recent-song-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 86px minmax(0,1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.recent-song-row:last-child { border-bottom: 0; }
.recent-day b, .recent-day small, .recent-song strong, .recent-song small { display: block; }
.recent-day b { font-size: 12px; color: #ffc1eb; }
.recent-day small, .recent-song small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.recent-song strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-empty { padding: 20px 0 14px; color: var(--muted); font-size: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .result-panel.is-won .outcome-banner,
  .result-panel.is-failed .outcome-banner { animation: result-pop .34s ease-out both; }
  @keyframes result-pop {
    from { opacity: .35; transform: translateY(5px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (max-width: 760px) {
  .topbar { width: calc(100% - 36px); padding-inline: 2px; }
  .top-actions { margin-right: 0; }
  .outcome-banner { min-height: 86px; padding: 16px; }
  .outcome-icon { width: 50px; height: 50px; flex-basis: 50px; font-size: 30px; }
}
@media (max-width: 390px) {
  .topbar { width: calc(100% - 32px); }
  .brand { gap: 8px; font-size: 12px; letter-spacing: .06em; }
  .nav-button { padding-inline: 10px; }
  .nav-button span:last-child { display: none; }
  .recent-song-row { grid-template-columns: 70px minmax(0,1fr); }
}
.guess-item.correct {
  border-color: rgba(87,228,160,.48);
  background: linear-gradient(90deg, rgba(87,228,160,.12), rgba(87,228,160,.035));
}
.guess-item.correct strong { color: #b9f8d6; }

/* v5.1 — unmistakable finish flash + safer help-button spacing */
.topbar {
  width: min(1180px, calc(100% - 64px));
  padding-inline: 0;
}
.top-actions { padding-right: 4px; }
.attempt-counter { transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.attempt-counter.is-won {
  border-color: rgba(87,228,160,.55);
  background: rgba(87,228,160,.08);
  box-shadow: 0 0 28px rgba(87,228,160,.08);
}
.attempt-counter.is-won span { color: var(--green); }
.attempt-counter.is-failed {
  border-color: rgba(255,107,130,.52);
  background: rgba(255,107,130,.07);
  box-shadow: 0 0 28px rgba(255,107,130,.07);
}
.attempt-counter.is-failed span { color: var(--red); }

.result-flash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: rgba(5,5,8,.18);
  backdrop-filter: blur(2px);
}
.result-flash.show { opacity: 1; visibility: visible; }
.result-flash-card {
  width: min(560px, 100%);
  min-height: 170px;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(17,17,22,.96);
  box-shadow: 0 28px 100px rgba(0,0,0,.58);
}
.result-flash-card.is-won {
  border-color: rgba(87,228,160,.65);
  background: radial-gradient(circle at 92% 8%, rgba(87,228,160,.22), transparent 45%), rgba(14,25,20,.97);
  box-shadow: 0 28px 100px rgba(0,0,0,.58), 0 0 70px rgba(87,228,160,.15);
}
.result-flash-card.is-failed {
  border-color: rgba(255,107,130,.62);
  background: radial-gradient(circle at 92% 8%, rgba(255,107,130,.20), transparent 45%), rgba(28,14,18,.97);
  box-shadow: 0 28px 100px rgba(0,0,0,.58), 0 0 70px rgba(255,107,130,.13);
}
.result-flash-icon {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  background: rgba(255,255,255,.07);
  font-size: 50px;
  line-height: 1;
  font-weight: 950;
}
.result-flash-card.is-won .result-flash-icon { color: var(--green); }
.result-flash-card.is-failed .result-flash-icon { color: var(--red); }
.result-flash-copy { min-width: 0; }
.result-flash-copy strong {
  display: block;
  font-size: clamp(36px, 7vw, 58px);
  line-height: .9;
  letter-spacing: -.055em;
}
.result-flash-copy small {
  display: block;
  margin-top: 13px;
  color: rgba(247,247,250,.77);
  font-size: 14px;
  line-height: 1.45;
}

@media (prefers-reduced-motion: no-preference) {
  .result-flash { transition: opacity .16s ease, visibility .16s ease; }
  .result-flash.show .result-flash-card { animation: finish-flash .42s cubic-bezier(.2,.85,.25,1) both; }
  @keyframes finish-flash {
    0% { transform: translateY(10px) scale(.92); opacity: .15; }
    70% { transform: translateY(0) scale(1.025); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
  }
}

@media (max-width: 760px) {
  .topbar { width: calc(100% - 44px); }
  .result-flash { padding: 18px; }
  .result-flash-card { min-height: 142px; padding: 23px; gap: 17px; border-radius: 23px; }
  .result-flash-icon { width: 66px; height: 66px; flex-basis: 66px; border-radius: 20px; font-size: 40px; }
  .result-flash-copy small { font-size: 12px; }
}
@media (max-width: 390px) {
  .topbar { width: calc(100% - 36px); }
  .top-actions { padding-right: 2px; }
  .result-flash-card { padding: 20px; }
  .result-flash-icon { width: 58px; height: 58px; flex-basis: 58px; font-size: 34px; }
}

/* v6 — safe header, unmistakable current record, alpha footer + bug reporter */
.topbar {
  width: min(1228px, 100%);
  min-height: 88px;
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  box-sizing: border-box;
  overflow: visible;
}
.top-actions { margin: 0; padding: 0; flex: 0 0 auto; }
.icon-button { margin: 0; }
.brand { cursor: pointer; }
.brand:focus-visible, .icon-button:focus-visible, .nav-button:focus-visible, .bug-report-link:focus-visible, .record-row:focus-visible {
  outline: 2px solid var(--pink-2);
  outline-offset: 3px;
}

.record-row { position: relative; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.record-row.active:not(.current-mode) {
  background: rgba(141,100,255,.075);
  border-color: rgba(169,141,255,.30);
}
.record-row.current-mode {
  z-index: 2;
  border-color: rgba(255,79,200,.72);
  background:
    radial-gradient(circle at 92% 50%, rgba(141,100,255,.18), transparent 31%),
    linear-gradient(90deg, rgba(255,79,200,.17), rgba(255,79,200,.055) 48%, rgba(141,100,255,.08));
  box-shadow: 0 0 0 1px rgba(255,79,200,.20), 0 0 34px rgba(255,79,200,.13), inset 4px 0 0 var(--pink);
}
.record-row.current-mode:hover { background: linear-gradient(90deg, rgba(255,79,200,.21), rgba(141,100,255,.10)); }
.record-row.current-mode .record-name strong { color: #fff; }
.record-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.record-title-line > strong { min-width: 0; }
.record-current-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255,126,218,.36);
  border-radius: 999px;
  padding: 4px 6px 3px;
  color: #ffd0ef;
  background: rgba(255,79,200,.12);
  font-style: normal;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .10em;
  line-height: 1;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 max(64px, calc(36px + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.alpha-notice {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.alpha-pill {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255,126,218,.28);
  border-radius: 9px;
  color: #ffc4ea;
  background: rgba(255,79,200,.08);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .14em;
}
.alpha-copy { min-width: 0; }
.alpha-copy strong { display: block; color: rgba(247,247,250,.90); font-size: 12px; }
.alpha-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.bug-report-link {
  border: 1px solid var(--line);
  border-radius: 11px;
  min-height: 38px;
  padding: 0 12px;
  background: rgba(255,255,255,.025);
  color: #ffc4ea;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}
.bug-report-link:hover { background: rgba(255,79,200,.08); border-color: rgba(255,126,218,.26); }
.bug-report-link span { margin-left: 5px; }
.footer-meta { display: flex; justify-content: space-between; gap: 30px; padding-top: 22px; }
.footer-meta > span:last-child { max-width: 760px; text-align: right; }

.bug-modal { width: min(600px, calc(100% - 32px)); }
.bug-intro { margin: -7px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; max-width: 510px; }
.bug-form { display: grid; gap: 15px; }
.bug-field { display: grid; gap: 7px; position: relative; }
.bug-field > span, .bug-context > span { color: rgba(247,247,250,.84); font-size: 11px; font-weight: 850; }
.bug-field select, .bug-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.bug-field select { min-height: 46px; }
.bug-field textarea { resize: vertical; min-height: 118px; line-height: 1.5; }
.bug-field select:focus, .bug-field textarea:focus { border-color: rgba(255,126,218,.48); box-shadow: 0 0 0 3px rgba(255,79,200,.07); }
.bug-field select option { background: #15151b; color: #fff; }
.bug-field > small { justify-self: end; color: var(--muted); font-size: 9px; margin-top: -3px; }
.bug-context {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  background: rgba(255,255,255,.02);
}
.bug-context strong { font-size: 13px; }
.bug-context small { color: var(--muted); font-size: 10px; }
.bug-submit-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.bug-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.bug-actions .secondary-button, .bug-actions .primary-button { min-height: 44px; padding-inline: 16px; }
.bug-actions .secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.bug-status { min-height: 18px; color: #9df0c4; font-size: 11px; text-align: right; }

@media (max-width: 760px) {
  .topbar { width: 100%; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .site-footer { width: calc(100% - 32px); }
  .alpha-notice { grid-template-columns: auto 1fr; }
  .bug-report-link { grid-column: 1 / -1; width: 100%; }
  .footer-meta { flex-direction: column; gap: 8px; }
  .footer-meta > span:last-child { text-align: left; }
  .record-current-badge { display: none; }
}
@media (max-width: 390px) {
  .topbar { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
}

/* v7 — true safe header + centred, single-line desktop alpha footer */
.topbar {
  width: min(1180px, calc(100% - 72px)) !important;
  max-width: 1180px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}
.top-actions {
  flex: 0 0 auto;
  margin-right: 10px !important;
  padding: 0 !important;
}
#infoButton { flex: 0 0 42px; }

.site-footer {
  width: min(1380px, calc(100% - 72px));
  max-width: 1380px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0 max(54px, calc(28px + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--line);
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.alpha-notice {
  min-height: 78px;
  padding: 17px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.alpha-message {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.alpha-copy {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.alpha-copy strong {
  display: inline;
  color: rgba(247,247,250,.94);
  font-size: 12px;
}
.alpha-copy span { display: inline; }
.alpha-pill { flex: 0 0 auto; }
.bug-report-link { flex: 0 0 auto; }
.footer-meta {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  white-space: nowrap;
}
.footer-meta i {
  color: rgba(255,255,255,.22);
  font-style: normal;
}

/* Make the actual challenge behind Records impossible to miss. */
.record-row.current-mode {
  border-color: rgba(255,79,200,.95) !important;
  background:
    radial-gradient(circle at 86% 50%, rgba(141,100,255,.32), transparent 34%),
    linear-gradient(90deg, rgba(255,79,200,.29), rgba(255,79,200,.12) 52%, rgba(141,100,255,.14)) !important;
  box-shadow:
    0 0 0 2px rgba(255,79,200,.26),
    0 0 44px rgba(255,79,200,.22),
    inset 5px 0 0 var(--pink) !important;
}
.record-row.current-mode .record-title-line::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--pink-2);
  box-shadow: 0 0 0 5px rgba(255,79,200,.12), 0 0 18px rgba(255,79,200,.5);
}
.record-current-badge {
  display: inline-flex !important;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-color: rgba(255,179,231,.48);
  background: rgba(255,79,200,.18);
  color: #ffe3f6;
  font-size: 8px;
  letter-spacing: .11em;
}

@media (max-width: 980px) {
  .site-footer { width: calc(100% - 48px); }
  .alpha-notice { justify-content: space-between; }
  .alpha-copy { white-space: normal; flex-wrap: wrap; }
  .footer-meta { white-space: normal; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .topbar {
    width: calc(100% - 44px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .top-actions { margin-right: 8px !important; }
  .site-footer { width: calc(100% - 32px); }
  .alpha-notice {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 12px;
    padding: 18px 0;
  }
  .alpha-message { justify-content: flex-start; align-items: flex-start; }
  .alpha-copy { display: flex; flex-wrap: wrap; gap: 3px 5px; white-space: normal; }
  .bug-report-link { width: 100%; }
  .footer-meta { justify-content: flex-start; text-align: left; gap: 6px 8px; }
}
@media (max-width: 390px) {
  .topbar { width: calc(100% - 36px) !important; }
  .top-actions { margin-right: 6px !important; }
  .alpha-message { gap: 10px; }
  .footer-meta i { display: none; }
  .footer-meta { display: grid; gap: 4px; }
}

/* v8 — smooth background, definitive header safe area, branded result links, expanded help */
html, body { background-color: var(--bg); }
body {
  background-image:
    radial-gradient(ellipse 72% 46% at 79% 8%, rgba(141,100,255,.10) 0%, rgba(141,100,255,.035) 38%, transparent 72%),
    radial-gradient(ellipse 58% 42% at 18% 30%, rgba(255,79,200,.065) 0%, rgba(255,79,200,.018) 42%, transparent 76%),
    linear-gradient(180deg, #0a0a0f 0%, #09090d 48%, #08080c 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}
.noise { display: none !important; }

/* Full-width header with real inset padding: the help button can no longer sit on the crop edge. */
.topbar {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  min-height: 88px;
  padding-left: max(32px, env(safe-area-inset-left)) !important;
  padding-right: max(40px, env(safe-area-inset-right)) !important;
  box-sizing: border-box;
  overflow: visible !important;
}
.top-actions {
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
}
#infoButton { margin: 0 !important; flex: 0 0 42px; }

.result-actions { align-items: stretch; }
.result-actions .secondary-button,
.result-actions .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.music-button {
  gap: 10px;
  text-decoration: none;
}
.service-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}
.apple-music-button .service-icon { color: #ff9bdc; }
.spotify-button .service-icon { color: #72e9a7; }

.how-to-modal { width: min(680px, calc(100% - 32px)); }
.how-to-modal > h2 { margin-bottom: 8px; }
.how-to-intro {
  margin: 0 42px 18px 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}
.how-to-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.how-to-steps li {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,.085);
}
.how-to-steps li:first-child { border-top: 0; }
.how-to-steps li > span {
  color: var(--pink-2);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  padding-top: 2px;
}
.how-to-steps strong { display: block; font-size: 14px; }
.how-to-steps p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.how-to-steps p b { color: rgba(247,247,250,.92); font-weight: 750; }

@media (max-width: 760px) {
  body { background-attachment: scroll; }
  .topbar {
    padding-left: max(20px, env(safe-area-inset-left)) !important;
    padding-right: max(24px, env(safe-area-inset-right)) !important;
  }
  .how-to-modal { padding: 24px 20px; }
  .how-to-intro { margin-right: 38px; }
  .how-to-steps li { grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 13px 0; }
}
@media (max-width: 390px) {
  .topbar {
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(20px, env(safe-area-inset-right)) !important;
  }
  .how-to-modal { width: calc(100% - 20px); padding: 22px 17px; }
}

/* v9 — refined instructions, permanent reset timer, cleaner daily messaging */
.reset-chip {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  color: var(--muted);
}
.reset-chip span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  color: rgba(255,255,255,.48);
}
.reset-chip strong {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

/* Keep the dialog shell still; only the instruction body scrolls. */
.how-to-modal {
  max-height: min(820px, calc(100vh - 32px));
  overflow: hidden !important;
  flex-direction: column;
}
.how-to-modal[open] { display: flex; }
.how-to-modal:not([open]) { display: none !important; }
.how-to-modal > h2 { flex: 0 0 auto; }
.how-to-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 4px 0;
  margin-right: -2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent;
}
.how-to-scroll::-webkit-scrollbar { width: 6px; }
.how-to-scroll::-webkit-scrollbar-track { background: transparent; }
.how-to-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}
.how-to-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.30); }

.how-to-intro {
  margin: 0 42px 14px 0;
  font-size: 13px;
}
.how-to-steps {
  display: grid;
  gap: 8px !important;
}
.how-to-steps li {
  grid-template-columns: 42px minmax(0,1fr);
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.055) !important;
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}
.how-to-steps li:first-child { border-top: 1px solid rgba(255,255,255,.055) !important; }
.how-to-steps li > span {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(245,65,188,.09);
  border: 1px solid rgba(245,65,188,.14);
}
.how-to-steps strong { font-size: 14px; }
.how-to-steps p { font-size: 12.5px; line-height: 1.5; margin-top: 4px; }
.how-to-got-it {
  flex: 0 0 auto;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .reset-chip span { display: none; }
  .reset-chip { padding-inline: 10px; }
}
@media (max-width: 620px) {
  .top-actions { gap: 7px !important; }
  .nav-button#statsButton span:last-child { display: none; }
  .reset-chip strong { font-size: 11px; }
  .reset-chip { min-height: 40px; }
  .how-to-steps li { grid-template-columns: 36px minmax(0,1fr); padding: 11px 10px; gap: 9px; }
  .how-to-steps li > span { width: 28px; height: 28px; }
  .how-to-scroll { padding-right: 5px; }
}
@media (max-width: 430px) {
  .reset-chip { display: none; }
}

/* Keep the reset clock genuinely persistent, including narrow screens. */
@media (max-width: 430px) {
  .reset-chip { display: inline-flex; }
  .nav-button#statsButton {
    width: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
  }
  .nav-button#statsButton span:first-child { display: inline !important; }
  .nav-button#statsButton span:last-child { display: none !important; }
}
@media (max-width: 360px) {
  .brand > span:last-child { display: none; }
  .brand { gap: 0; }
}

/* v11 — geometric result icons and preview-gated rounds */
.outcome-icon svg,
.result-flash-icon svg {
  width: 30px;
  height: 30px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.result-flash-icon svg { width: 34px; height: 34px; }

/* v12 — language picker, recent cover art, and stricter preview preflight */
.language-picker { position: relative; flex: 0 0 auto; }
.language-button {
  min-width: 54px;
  height: 42px;
  padding: 0 11px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font: inherit;
}
.language-button:hover,
.language-button[aria-expanded="true"] { background: rgba(255,255,255,.065); border-color: rgba(255,255,255,.16); }
.language-globe { color: #ffc2eb; font-size: 15px; line-height: 1; }
.language-button strong { font-size: 10px; letter-spacing: .06em; }
.language-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 9px);
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  background: rgba(18,18,24,.98);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(18px);
}
.language-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.language-menu button:hover { background: rgba(255,255,255,.055); color: var(--text); }
.language-menu button.selected { background: rgba(255,79,200,.10); color: #ffd0ef; font-weight: 850; }

.recent-song-row {
  grid-template-columns: 48px 76px minmax(0,1fr);
  min-height: 72px;
}
.recent-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle at 35% 30%, rgba(255,79,200,.18), transparent 45%), rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.48);
  font-weight: 900;
  font-size: 15px;
}
.recent-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s ease; }
.recent-cover.has-art img { opacity: 1; }

@media (max-width: 760px) {
  .recent-song-row { grid-template-columns: 44px 68px minmax(0,1fr); gap: 10px; }
  .recent-cover { width: 40px; height: 40px; border-radius: 9px; }
}
@media (max-width: 620px) {
  .language-button { min-width: 44px; width: 44px; padding: 0; }
  .language-globe { display: none; }
  .language-menu { width: 176px; }
}
@media (max-width: 430px) {
  .top-actions { gap: 5px !important; }
  .reset-chip { padding-inline: 7px; }
  .language-button, .icon-button, .nav-button#statsButton { min-width: 38px !important; width: 38px !important; height: 38px; }
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* v13 — legacy branding, clearer completion copy, translate icon, and mystery-audio artwork */
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,79,200,.96), rgba(141,100,255,.96));
  box-shadow: 0 8px 30px rgba(255,79,200,.25);
  overflow: hidden;
}
.brand-mark svg { width: 23px; height: 23px; display: block; }
.brand-mark svg rect { fill: #fff; opacity: .96; }
.brand > span:last-child { letter-spacing: .095em; }

.language-symbol {
  width: 20px;
  height: 20px;
  position: relative;
  display: inline-block;
  color: #ffc2eb;
  flex: 0 0 20px;
}
.language-symbol span {
  position: absolute;
  display: block;
  margin: 0;
  line-height: 1;
  font-weight: 850;
  color: currentColor;
}
.language-symbol span:first-child { left: 0; top: 1px; font-size: 11px; }
.language-symbol span:last-child { right: 0; bottom: 1px; font-size: 10px; }
.language-symbol::after {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  top: 10px;
  height: 1px;
  background: currentColor;
  opacity: .38;
  transform: rotate(-32deg);
  transform-origin: center;
}

.cover-shell {
  background:
    radial-gradient(circle at 50% 45%, rgba(177,118,255,.15), transparent 34%),
    linear-gradient(145deg,#17131d,#0f0f16 70%);
  border: 1px solid rgba(255,255,255,.055);
}
.mystery-audio {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity .28s ease, transform .28s ease;
}
.mystery-orbit {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.075);
  box-shadow:
    0 0 0 18px rgba(255,255,255,.012),
    0 0 0 38px rgba(255,255,255,.008),
    0 0 44px rgba(141,100,255,.08);
}
.mystery-wave {
  position: relative;
  z-index: 2;
  width: 64%;
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(255,79,200,.16));
}
.mystery-wave rect { fill: #d88cff; opacity: .94; }
.cover-shell.revealed.artwork-visible .mystery-audio { opacity: 0; transform: scale(.94); }
.cover-shell.revealed:not(.artwork-visible) .mystery-audio { opacity: .82; }

/* Longer completion wording should remain compact without looking squeezed. */
.submode-card.is-complete::after {
  font-size: 7px;
  letter-spacing: .075em;
  padding: 6px 8px;
}
.live-pill.progress-pill,
.live-pill.complete-pill { font-size: 9px; letter-spacing: .09em; }

@media (max-width: 620px) {
  .language-button { width: 42px; min-width: 42px; padding: 0; }
  .language-button strong { display: none; }
  .language-symbol { display: inline-block; }
  .brand > span:last-child { font-size: 11px; }
}

/* v14 — recent-day results, native language labels, tighter mobile footer, and player alignment */
.language-button {
  width: auto;
  min-width: 88px;
  padding-inline: 11px 13px;
}
.language-button strong {
  display: inline-block;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: .015em;
  text-transform: none;
}

/* Let the waveform occupy the same full width as the timestamps beneath it. */
.waveform {
  width: 100%;
  gap: 3px;
}
.waveform i {
  flex: 1 1 0;
  min-width: 1px;
  max-width: none;
}
.time-row { width: 100%; }

/* Centre the mystery treatment as one balanced composition rather than overlapping grid items. */
.mystery-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.mystery-orbit {
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.mystery-wave {
  width: 58%;
  flex: 0 0 auto;
}
.mystery-audio > span {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  margin: 0;
  color: rgba(247,247,250,.82);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .035em;
  text-align: center;
}

/* Recent songs: show the player's own result on the far right when that day was played. */
.recent-song-row {
  grid-template-columns: 48px 76px minmax(0,1fr) auto;
}
.recent-result {
  justify-self: end;
  min-width: 62px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.recent-result.is-won {
  color: #9df0c4;
  border-color: rgba(87,228,160,.32);
  background: rgba(87,228,160,.075);
}
.recent-result.is-failed {
  color: #ff9bac;
  border-color: rgba(255,107,130,.32);
  background: rgba(255,107,130,.07);
}

/* Cleaner mobile footer: centred, compact, and without orphan separator dots. */
@media (max-width: 760px) {
  .site-footer {
    width: calc(100% - 36px);
    padding-bottom: max(42px, calc(24px + env(safe-area-inset-bottom)));
  }
  .alpha-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 0 20px;
    text-align: center;
  }
  .alpha-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
  .alpha-copy {
    display: block;
    white-space: normal;
    text-align: center;
    line-height: 1.45;
  }
  .alpha-copy strong,
  .alpha-copy span { display: block; }
  .alpha-copy span { margin-top: 2px; }
  .bug-report-link {
    width: auto;
    min-width: 160px;
    justify-self: auto;
  }
  .footer-meta {
    display: grid;
    justify-items: center;
    justify-content: center;
    gap: 5px;
    padding-top: 18px;
    text-align: center;
    white-space: normal;
  }
  .footer-meta i { display: none; }
  .footer-meta > span { text-align: center !important; max-width: 100%; }
  .recent-song-row {
    grid-template-columns: 40px 62px minmax(0,1fr) auto;
    gap: 9px;
  }
  .recent-result { min-width: 54px; padding-inline: 7px; font-size: 9px; }
}

@media (max-width: 620px) {
  .language-button {
    width: auto;
    min-width: 42px;
    padding: 0 9px;
  }
  .language-button strong { display: inline-block; max-width: 70px; font-size: 9px; }
}

@media (max-width: 500px) {
  /* On very narrow phones, keep the translate symbol rather than falling back to an ISO code. */
  .language-button { width: 40px; min-width: 40px; padding: 0; }
  .language-button strong { display: none; }
  .mystery-audio { gap: 9px; }
  .mystery-audio > span { font-size: 10px; }
  .recent-song-row {
    grid-template-columns: 38px 54px minmax(0,1fr) auto;
    gap: 8px;
  }
  .recent-cover { width: 36px; height: 36px; }
  .recent-day small { font-size: 9px; }
  .recent-song strong { font-size: 12px; }
  .recent-song small { font-size: 10px; }
  .recent-result { min-width: 48px; min-height: 27px; font-size: 8.5px; padding-inline: 6px; }
}

/* v15 — compact expanding header actions and group collection icons */
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px !important;
  margin-right: 0 !important;
  overflow: visible;
}

.header-action {
  width: 44px;
  max-width: 44px;
  height: 42px;
  min-width: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  font: inherit;
  flex: 0 0 auto;
  transition: max-width .24s cubic-bezier(.2,.8,.2,1), width .24s cubic-bezier(.2,.8,.2,1), background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.header-action:hover,
.header-action:focus-visible,
.header-action[aria-expanded="true"] {
  background: rgba(255,255,255,.065);
  border-color: rgba(255,255,255,.17);
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  outline: none;
}
.header-action-icon,
.header-action-question,
.language-symbol {
  width: 42px;
  min-width: 42px;
  height: 40px;
  flex: 0 0 42px;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
}
.header-action-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: #f2d5ec;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.records-action-icon svg { stroke: #efb8e6; }
.header-action-question {
  color: #f1d8ed;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.header-action-copy {
  min-width: 0;
  padding-right: 13px;
  opacity: 0;
  transform: translateX(-5px);
  pointer-events: none;
  transition: opacity .14s ease, transform .2s ease;
}
.header-action-copy.single-line {
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .01em;
}
.reset-action { cursor: default; }
.reset-action .header-action-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.reset-action .header-action-copy > span {
  color: rgba(255,255,255,.48);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
}
.reset-action .header-action-copy > strong {
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
}

.language-picker { position: relative; flex: 0 0 auto; }
.language-button {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px;
  padding: 0 !important;
  justify-content: flex-start !important;
  gap: 9px !important;
}
.language-button .language-symbol {
  position: relative;
  color: #ffc2eb;
}
.language-button .language-symbol > span {
  position: absolute;
  display: block !important;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  line-height: 1;
  color: currentColor;
}
.language-button .language-symbol > span:first-child { left: 10px; top: 9px; font-size: 11px; }
.language-button .language-symbol > span:last-child { right: 9px; bottom: 9px; font-size: 10px; }
.language-button .language-symbol::after { left: 12px; right: 12px; top: 20px; }
.language-button .header-action-copy strong {
  display: inline-block !important;
  max-width: 108px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .reset-action:hover,
  .reset-action:focus-visible { width: 190px; max-width: 190px; }
  #statsButton:hover,
  #statsButton:focus-visible { width: 118px; max-width: 118px; }
  .language-button:hover,
  .language-button:focus-visible,
  .language-button[aria-expanded="true"] { width: 154px !important; max-width: 154px; }
  .help-action:hover,
  .help-action:focus-visible { width: 138px; max-width: 138px; }

  .header-action:hover .header-action-copy,
  .header-action:focus-visible .header-action-copy,
  .header-action[aria-expanded="true"] .header-action-copy {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Keep icon-only controls on touch/mobile; the controls remain fully labelled for assistive tech. */
@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .header-action,
  .language-button,
  .header-action:hover,
  .header-action:focus-visible,
  .header-action[aria-expanded="true"],
  .language-button:hover,
  .language-button:focus-visible,
  .language-button[aria-expanded="true"] {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px;
    padding: 0 !important;
  }
  .header-action-icon,
  .header-action-question,
  .language-symbol {
    width: 38px;
    min-width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .header-action-copy { display: none !important; }
  .top-actions { gap: 6px !important; }
}

/* A group symbol reads more naturally here than a literal file-folder icon. */
.group-collection-icon {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}
.group-collection-icon::after {
  content: '';
  position: absolute;
  inset: auto -10px -19px 5px;
  height: 38px;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .5;
}
.girls-group-icon {
  color: #ffd2f0;
  background: linear-gradient(145deg, rgba(255,79,200,.19), rgba(141,100,255,.11));
}
.girls-group-icon::after { background: rgba(255,79,200,.22); }
.boys-group-icon {
  color: #ded8ff;
  background: linear-gradient(145deg, rgba(141,100,255,.18), rgba(80,147,255,.10));
}
.boys-group-icon::after { background: rgba(141,100,255,.22); }
.group-collection-icon svg {
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 1;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.folder-card .collection-copy { padding-top: 40px; }
.folder-card.is-complete .group-collection-icon {
  color: #c4f9dd;
  border-color: rgba(87,228,160,.24);
  background: linear-gradient(145deg, rgba(87,228,160,.15), rgba(87,228,160,.055));
}

/* v15 supersedes the old folder glyph. */
.folder-icon { display: none !important; }


/* v16 — polished expanding utility controls */
.header-action {
  align-items: center !important;
}
.header-action-copy,
.header-action-copy.single-line,
.language-button .header-action-copy {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 1 !important;
  padding-top: 0;
  padding-bottom: 0;
}
.header-action-copy.single-line {
  font-size: 11px;
  line-height: 1 !important;
}
.header-action-copy.single-line strong,
.language-button .header-action-copy strong {
  line-height: 1.05 !important;
}
.reset-action .header-action-copy {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.reset-action .header-action-copy > span,
.reset-action .header-action-copy > strong {
  display: inline-flex;
  align-items: center;
  line-height: 1 !important;
}
.language-button .header-action-copy {
  padding-right: 14px;
}
.language-button .header-action-copy strong {
  display: inline-flex !important;
  align-items: center;
  height: 100%;
}
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .reset-action:hover,
  .reset-action:focus-visible { width: 194px; max-width: 194px; }
  #statsButton:hover,
  #statsButton:focus-visible { width: 116px; max-width: 116px; }
  .language-button:hover,
  .language-button:focus-visible,
  .language-button[aria-expanded="true"] { width: 148px !important; max-width: 148px; }
  .help-action:hover,
  .help-action:focus-visible { width: 136px; max-width: 136px; }
}


/* v17 — BIASDLE launch branding + hero reset timer + tappable mobile reset control */
.today-chip {
  gap: 9px;
  padding-inline: 14px;
}
.today-divider {
  width: 1px;
  height: 15px;
  background: rgba(255,255,255,.12);
  margin-inline: 1px;
}
.hero-countdown {
  color: #eee9f2;
  font-size: 12px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
  white-space: nowrap;
}

/* On touch/mobile the reset control expands on tap instead of relying on hover. */
@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .reset-action {
    cursor: pointer;
    overflow: hidden;
    transition: width .22s cubic-bezier(.2,.8,.2,1), max-width .22s cubic-bezier(.2,.8,.2,1), background .16s ease, border-color .16s ease !important;
  }
  .reset-action.is-expanded {
    width: 142px !important;
    min-width: 142px !important;
    max-width: 142px !important;
    background: rgba(255,255,255,.065);
    border-color: rgba(255,255,255,.17);
  }
  .reset-action.is-expanded .header-action-copy {
    display: flex !important;
    opacity: 1 !important;
    transform: none !important;
    padding-right: 11px;
    flex: 1 1 auto;
  }
  .reset-action.is-expanded .header-action-copy > span {
    display: none !important;
  }
  .reset-action.is-expanded .header-action-copy > strong {
    display: inline-flex !important;
    color: var(--text);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .035em;
  }
}

@media (max-width: 430px) {
  .hero-actions { gap: 12px; }
  .today-chip { min-height: 42px; padding-inline: 12px; gap: 7px; }
  .hero-countdown { font-size: 11px; }
}

@media (max-width: 365px) {
  .today-chip .dot { display: none; }
  .today-chip { gap: 6px; }
}
