/* MusicBox design system: tokens, base, layout and components.
   Dark-first editorial look; light theme follows the system setting. */

:root {
  --bg: #0e0d0b;
  --bg-2: #15130f;
  --surface: #1a1814;
  --surface-2: #232019;
  --line: rgba(245, 239, 230, 0.10);
  --line-2: rgba(245, 239, 230, 0.18);
  --text: #f5efe6;
  --muted: #a39a8c;
  --accent: #f2a541;          /* primary action, winner */
  --accent-ink: #1a1206;
  --accent-soft: rgba(242, 165, 65, 0.14);
  --teal: #4fd1c5;            /* success / voted / you */
  --teal-soft: rgba(79, 209, 197, 0.14);
  --danger: #ff7a6b;
  --silver: #c9cfd6;
  --bronze: #d08a55;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -22px rgba(0,0,0,.7);
  --radius: 16px;
  --radius-sm: 10px;
  --display: "Fraunces", "Georgia", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f3ec;
    --bg-2: #efe9dd;
    --surface: #ffffff;
    --surface-2: #f3eee4;
    --line: rgba(20, 16, 10, 0.10);
    --line-2: rgba(20, 16, 10, 0.18);
    --text: #1d1a15;
    --muted: #6b6356;
    --accent: #c77712;
    --accent-ink: #ffffff;
    --accent-soft: rgba(199, 119, 18, 0.12);
    --teal: #13857a;
    --teal-soft: rgba(19, 133, 122, 0.12);
    --danger: #c23b2a;
    --silver: #8b939c;
    --bronze: #9c5b2c;
    --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 16px 36px -22px rgba(40,30,10,.35);
    color-scheme: light;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(242,165,65,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(79,209,197,.07), transparent 60%),
    var(--bg);
  background-color: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
.h2 { font-size: 1.6rem; font-family: var(--display); font-weight: 600; margin: .3rem 0 .6rem; }
.h3 { font-size: 1.05rem; }
.display { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.02em; margin: .15rem 0 .4rem; font-variation-settings: "opsz" 144; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; color: var(--accent); margin: 0 0 .25rem; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 58ch; margin: .5rem 0 1rem; }
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: .88rem; margin: .4rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code, kbd { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85em; }
kbd { background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 0 .35em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: .5rem .8rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .85rem clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: .25rem; margin-left: .75rem; }
.nav a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; transition: color .2s var(--ease), background .2s var(--ease); }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.me { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.me__chip { display: flex; align-items: center; gap: .5rem; }
.me__avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #d26f3a); color: var(--accent-ink); font-weight: 700; font-size: .78rem; }
.me__name { font-weight: 500; font-size: .92rem; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; }
.tabbar { display: none; }

/* ---------- page ---------- */
.view { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px) 80px; outline: none; animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loader { color: var(--muted); padding: 3rem 0; text-align: center; }
.page-head { margin-bottom: 1.5rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.5vw, 28px); box-shadow: var(--shadow); }
.panel--error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.stack > * + * { margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; align-items: center; }

/* ---------- buttons & fields ---------- */
.btn {
  appearance: none; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 600 .95rem/1 var(--sans); padding: .8rem 1.1rem; border-radius: 999px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 24px -12px var(--accent); }
.btn--ghost { background: transparent; }
.btn--sm { padding: .55rem .85rem; font-size: .85rem; }
.btn--block { width: 100%; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .9rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > label, .field-label { font-weight: 600; font-size: .88rem; }
input[type="email"], input[type="text"], input[type="search"], input[type="number"], input[type="datetime-local"], input:not([type]) {
  width: 100%; font: 400 1rem var(--sans); color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .75rem .9rem; min-height: 46px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form-error { color: var(--danger); font-weight: 500; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: end; }
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 42px; font-size: 1.05rem; min-height: 52px; }

/* ---------- sign-in ---------- */
.signin { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; min-height: calc(100vh - 140px); }
.signin__card { max-width: 480px; justify-self: end; width: 100%; }
.signin__card .btn--primary { margin-top: .75rem; }
.signin__card .field + .field { margin-top: 1rem; }
.sent h2 { color: var(--teal); }
.disc { width: min(72vw, 420px); aspect-ratio: 1; border-radius: 50%; position: relative; background:
  repeating-radial-gradient(circle at 50% 50%, #1b1a17 0 2px, #0d0c0b 2px 4px),
  conic-gradient(from 200deg, #2a2722, #111 25%, #2a2722 50%, #111 75%, #2a2722);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.04);
  animation: spin 22s linear infinite; }
.disc__label { position: absolute; inset: 36%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd38a, var(--accent) 45%, #b8641a); display: grid; place-items: center; color: var(--accent-ink); font: 700 1.2rem var(--display); }
.disc--big { width: min(44vw, 260px); }
.disc--big .disc__label { font-size: 2rem; }
.signin__art { display: grid; place-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero (home) ---------- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, var(--accent-soft), transparent 65%); pointer-events: none; }
.hero__visual { position: relative; z-index: 1; }
.phase { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: .3rem .65rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.phase::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.phase--submitting, .phase--voting { color: var(--teal); background: var(--teal-soft); border-color: transparent; }
.phase--results { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.countdown { color: var(--muted); }
.status { margin: 0; display: grid; gap: .75rem; }
.status-row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.status-row dt { color: var(--muted); }
.status-row dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- artwork ---------- */
.art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--surface-2); box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); }
.art--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-2), var(--bg-2)); color: var(--muted); font: 600 2rem var(--display); }
.art--xl { width: 100%; max-width: 300px; }
.art--lg { width: 96px; min-width: 96px; }
.art--card { border-radius: 12px; }
.thumb { width: 52px; min-width: 52px; height: 52px; border-radius: 8px; aspect-ratio: auto; box-shadow: none; }

/* ---------- submit ---------- */
.submit { display: grid; grid-template-columns: 1.05fr 1fr; gap: 1.25rem; align-items: start; }
.results { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .4rem; max-height: 62vh; overflow: auto; }
.results li[role="option"] { margin: 0; }
.result { width: 100%; display: flex; align-items: center; gap: .9rem; padding: .6rem; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; color: inherit; cursor: pointer; font: inherit; transition: background .15s, border-color .15s; }
.result:hover, .result:focus-visible { background: var(--surface-2); border-color: var(--line-2); }
.results li[aria-selected="true"] .result { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.result__text { display: grid; min-width: 0; }
.result__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result__meta { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results__empty { color: var(--muted); padding: .8rem; }
.preview, .mysong { display: grid; gap: 1.25rem; }
.preview { grid-template-columns: 1fr; position: sticky; top: 90px; }
.preview__empty { display: grid; gap: 1rem; justify-items: start; }
.preview__body { min-width: 0; }
.preview__title { font-family: var(--display); font-size: 1.7rem; margin: .1rem 0; }
.preview__artist { color: var(--muted); margin: 0 0 1rem; font-size: 1.05rem; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 0 0 .9rem; }
.meta dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.meta dd { margin: .15rem 0 0; font-weight: 600; }
.link { color: var(--teal); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.mysong { grid-template-columns: minmax(180px, 280px) 1fr; }

/* ---------- vote ---------- */
.vote { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: start; }
.vote__slots { position: sticky; top: 90px; }
.slots { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.slot { display: grid; grid-template-columns: 38px auto 1fr auto; align-items: center; gap: .65rem; padding: .55rem .6rem; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--line-2); min-height: 64px; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.slot--filled { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); animation: pop .35s var(--ease); }
.slot__place { font: 600 1.05rem var(--display); color: var(--accent); text-align: center; }
.slot__text { display: grid; min-width: 0; }
.slot__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__artist { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__empty { color: var(--muted); font-size: .9rem; grid-column: 3 / -1; }
@keyframes pop { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: none; } }
.vote__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
.card { position: relative; appearance: none; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; cursor: pointer; display: grid; gap: .25rem; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; box-shadow: var(--shadow); }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card.is-picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.card__art { position: relative; display: block; margin-bottom: .45rem; }
.card__badge { position: absolute; top: 8px; left: 8px; min-width: 30px; height: 30px; padding: 0 .5rem; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .8rem; box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); }
.card__badge:empty { display: none; }
.card__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__artist { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta { color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.card__meta strong { color: var(--teal); font-weight: 600; }
.locked { display: grid; gap: .4rem; margin-bottom: 1.25rem; }
.locked__badge { justify-self: start; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: .85rem; padding: .35rem .7rem; border-radius: 999px; }
.podium-picks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.pick { display: flex; gap: 1rem; align-items: center; }
.pick__place { display: block; color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.pick__title { display: block; font: 600 1.25rem var(--display); }
.pick__artist { color: var(--muted); }

/* ---------- results & podium ---------- */
.week-picker { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 1.25rem; scrollbar-width: thin; }
.week-chip { flex: none; text-decoration: none; display: grid; gap: .1rem; padding: .55rem .85rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 96px; transition: border-color .2s, transform .2s var(--ease); }
.week-chip:hover { transform: translateY(-1px); }
.week-chip.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.week-chip.is-locked { opacity: .7; }
.week-chip__no { font-weight: 700; }
.week-chip__state { color: var(--muted); font-size: .75rem; }
.locked-results { text-align: left; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 1.1rem; align-items: end; margin-bottom: 1.25rem; }
.podium__step { position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1.2rem; display: grid; gap: .3rem; justify-items: center; text-align: center; box-shadow: var(--shadow); animation: rise .6s var(--ease) both; }
.podium__step:nth-child(2) { animation-delay: .1s; }
.podium__step:nth-child(3) { animation-delay: .2s; }
.podium__step--gold { padding-top: 1.6rem; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow); }
.podium__step--silver { border-color: color-mix(in srgb, var(--silver) 50%, transparent); }
.podium__step--bronze { border-color: color-mix(in srgb, var(--bronze) 50%, transparent); }
.podium__art { width: 100%; max-width: 200px; }
.podium__place { font: 700 .75rem/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: .4rem; }
.podium__step--gold .podium__place { color: var(--accent); }
.podium__title { font: 600 1.15rem var(--display); margin: 0; }
.podium__artist { color: var(--muted); margin: 0; font-size: .92rem; }
.podium__pts { margin: .2rem 0 0; color: var(--muted); }
.podium__pts strong { color: var(--text); font-size: 1.4rem; font-family: var(--display); }
.results-list-wrap { padding: 0; overflow: hidden; }
.results-head, .row { display: grid; grid-template-columns: 44px minmax(0, 2.4fr) 1fr 70px 1.3fr 60px; align-items: center; gap: .9rem; padding: .85rem 1.25rem; }
.results-head { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid var(--line); }
.results-list { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); transition: background .2s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row__place { font: 600 1.1rem var(--display); color: var(--muted); }
.row__song { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.row__song > span:last-child { min-width: 0; }
.row__title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__artist { display: block; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__genre, .row__time, .row__firsts { color: var(--muted); font-size: .92rem; }
.row__pts { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: .6rem; }
.row__pts strong { text-align: right; font-size: 1.05rem; }
.bar { display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ffd38a); width: var(--w); min-width: 6px; }
.results-list-wrap .help { padding: 0 1.25rem 1rem; }

/* ---------- standings ---------- */
.standings { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.standings__row { display: grid; grid-template-columns: 40px minmax(120px, 1fr) minmax(120px, 2fr) 60px; align-items: center; gap: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--bg-2); border: 1px solid transparent; }
.standings__row.is-me { border-color: color-mix(in srgb, var(--teal) 60%, transparent); }
.standings__rank { font: 600 1.2rem var(--display); color: var(--accent); }
.standings__bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.standings__bar span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: inherit; transition: width .8s var(--ease); }
.standings__pts { text-align: right; font-size: 1.15rem; }

/* ---------- admin ---------- */
.today { display: flex; align-items: center; margin-bottom: 1.25rem; }
.season-block { margin-bottom: 1.25rem; }
.week-edit { border-top: 1px solid var(--line); padding: 1rem 0; }
.week-edit header { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
#new-season .form-grid { margin-top: 1rem; }

/* ---------- toasts & confetti ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: .6rem; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); padding: .8rem 1rem; border-radius: 12px; box-shadow: var(--shadow); animation: rise .3s var(--ease) both; transition: opacity .4s, transform .4s; }
.toast--error { border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.toast--out { opacity: 0; transform: translateY(6px); }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti span { position: absolute; top: 40%; width: 9px; height: 13px; border-radius: 2px; animation: burst 1.9s var(--ease) forwards; }
@keyframes burst { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 70vh) rotate(540deg); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .vote { grid-template-columns: 1fr; }
  .vote__slots { position: static; }
  .submit, .mysong, .signin, .grid-2 { grid-template-columns: 1fr; }
  .signin__card { justify-self: stretch; max-width: none; }
  .signin__art { display: none; }
  .preview { position: static; }
  .form-grid, .form-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .brand span { font-size: 1.05rem; }
  .me__name { display: none; }
  .me { margin-left: auto; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: .2rem; padding: .4rem .2rem; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 500; border-radius: 12px; }
  .tabbar a.is-active { color: var(--accent); }
  .tabbar .ico { width: 22px; height: 22px; }
  .view { padding-bottom: 96px; }
  .hero { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .vote__grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .podium { grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
  .podium__title { font-size: .95rem; }
  .podium__step { padding: .75rem .5rem; }
  .podium__art { max-width: 120px; }
  .results-head, .row { grid-template-columns: 30px minmax(0, 1fr) 90px; padding: .75rem .9rem; }
  .hide-sm { display: none; }
  .standings__row { grid-template-columns: 30px 1fr 50px; }
  .standings__bar { display: none; }
  .form-grid, .form-grid--4 { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr 1fr; }
  .toasts { left: 16px; right: 16px; bottom: 80px; max-width: none; }
}
@media (max-width: 380px) { .vote__grid { grid-template-columns: 1fr; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .disc { animation: none; }
}
