@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #1c0f2e;     /* Vice night purple */
  --dash: #2a1746;      /* faceplate */
  --dash-edge: #553080;
  --amber: #ff9e3d;     /* sunset orange */
  --coral: #ff5e5b;     /* sunset coral */
  --foam: #42e3d2;      /* ocean teal */
  --paper: #fff3ea;     /* body text */
  --muted: #d2bfe6;     /* secondary text */
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --s1: .25rem; --s2: .5rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.5rem; --s6: 4rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--paper);
  font: 400 1.0625rem/1.55 var(--body);
}
a { color: var(--foam); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s3); top: -4rem; background: var(--amber); color: var(--night); padding: var(--s2) var(--s3); font-weight: 700; z-index: 10; }
.skip:focus { top: var(--s3); }

.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.site-head { padding: var(--s4) 0 var(--s3); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.brand { font: 800 1.35rem/1 var(--display); letter-spacing: -.01em; color: var(--paper); text-decoration: none; }
.brand span { color: var(--coral); }
.site-head nav a { margin-left: var(--s3); color: var(--muted); }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; margin: 0 0 var(--s3); }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); max-width: 17ch; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; font-weight: 500; }
p { max-width: 64ch; margin: 0 0 var(--s3); }
.lede { color: var(--muted); font-size: 1.15rem; }

/* ---- The faceplate: the one bold element ---- */
.faceplate {
  margin: var(--s5) 0 var(--s4);
  border: 2px solid var(--dash-edge);
  border-radius: 22px 22px 10px 10px;
  padding: var(--s4) var(--s4) var(--s3);
  border-top: 0; background: linear-gradient(90deg, #ff9e3d 0 33.3%, #ff5e5b 33.3% 66.6%, #9b5cff 66.6%) top / 100% 6px no-repeat, var(--dash);
}
.lcd {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap;
  font-family: var(--display); color: var(--coral);
  margin-bottom: var(--s3);
}
.lcd strong { font-size: clamp(1.1rem, 2.6vw, 1.6rem); font-weight: 800; }
.lcd small { font: 500 .95rem var(--body); color: var(--amber); }

.dial { position: relative; }
.dial-scale {
  position: relative; height: 34px; margin: 0 6px var(--s2);
  background:
    repeating-linear-gradient(90deg, rgba(244,240,230,.55) 0 2px, transparent 2px 100%) 0 100% / calc(100% / 40) 12px no-repeat repeat-x,
    repeating-linear-gradient(90deg, rgba(244,240,230,.9) 0 2px, transparent 2px 100%) 0 100% / calc(100% / 8) 22px repeat-x;
  border-bottom: 2px solid rgba(244,240,230,.6);
}
.needle {
  position: absolute; top: -6px; bottom: -4px; width: 4px; margin-left: -2px; border-radius: 2px;
  background: var(--foam);
  left: 6%; transition: left .35s ease-out;
}
.stations { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.station {
  appearance: none; width: 100%; min-height: 3.25rem; padding: var(--s2) var(--s1);
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 8px;
  font: 700 .8rem/1.2 var(--body); cursor: pointer; text-align: center;
}
.station[aria-checked="true"] { color: var(--night); background: var(--coral); }

/* ---- Matchup ---- */
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s3); align-items: stretch; }
.vs { align-self: center; font: 800 1rem var(--display); color: var(--muted); }
.pick {
  appearance: none; text-align: left; cursor: pointer; width: 100%;
  background: var(--paper); color: var(--night);
  border-radius: 14px; padding: var(--s4);
  display: flex; flex-direction: column; gap: var(--s2); min-height: 10rem;
  border: 3px solid transparent;
}
.pick:active { transform: translateY(1px); }
.pick:disabled { cursor: progress; }
.pick .title { font: 800 clamp(1.1rem, 2.4vw, 1.5rem)/1.15 var(--display); }
.pick .artist { font-size: 1rem; }
.pick .where { margin-top: auto; font-size: .9rem; color: #5a3f73; }
.pick.won { border-color: var(--amber); }
.pick.lost { opacity: .55; }
.matchup-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); }
.status { min-height: 1.6em; color: var(--foam); margin: 0; }

.btn {
  appearance: none; cursor: pointer; border-radius: 999px; padding: .7rem 1.2rem; min-height: 44px;
  font: 700 1rem var(--body); border: 2px solid var(--paper); background: transparent; color: var(--paper);
}
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--night); }

/* ---- Leaderboard ---- */
section { margin: var(--s6) 0; }
.board { width: 100%; border-collapse: collapse; font-size: 1rem; }
.board caption { text-align: left; color: var(--muted); padding-bottom: var(--s2); }
.board th, .board td { padding: .7rem var(--s2); text-align: left; vertical-align: top; border-bottom: 1px solid var(--dash-edge); }
.board th { font-weight: 700; color: var(--muted); }
.board td.num, .board th.num { text-align: right; font-variant-numeric: tabular-nums; }
.board .rank { font: 800 1.1rem var(--display); color: var(--amber); width: 3rem; }
.board .song { font-weight: 700; }
.board .by { display: block; font-weight: 400; color: var(--muted); }
.board .listen a { white-space: nowrap; margin-right: var(--s2); }
.listen-inline { display: none; }

/* ---- Form ---- */
form { max-width: 40rem; }
.field { margin-bottom: var(--s3); }
label { display: block; font-weight: 700; margin-bottom: var(--s1); }
.hint { display: block; color: var(--muted); font-weight: 400; font-size: .95rem; }
input[type="text"], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; border-radius: 10px;
  border: 2px solid var(--dash-edge); background: var(--dash); color: var(--paper); font: inherit;
}
input[type="text"]:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--amber); outline-offset: 1px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: var(--s2); align-items: start; font-weight: 400; }
.check input { width: 1.4rem; height: 1.4rem; margin-top: .15rem; accent-color: var(--amber); }
.error { color: var(--coral); font-weight: 700; display: block; margin-top: var(--s1); }
[aria-invalid="true"] { border-color: var(--coral) !important; }

.notice { border-left: 4px solid var(--amber); padding: var(--s2) var(--s3); background: var(--dash); border-radius: 0 10px 10px 0; }

/* ---- Footer & legal pages ---- */
.site-foot { border-top: 1px solid var(--dash-edge); padding: var(--s5) 0 var(--s6); color: var(--muted); font-size: .95rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-bottom: var(--s3); }
.site-foot p { max-width: 72ch; }
.legal { padding-bottom: var(--s5); }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: none; margin-top: var(--s5); }
.legal h2 { font-size: 1.25rem; margin-top: var(--s5); }
.legal li { max-width: 64ch; margin-bottom: var(--s2); }
.legal table { border-collapse: collapse; margin: var(--s3) 0; }
.legal th, .legal td { border: 1px solid var(--dash-edge); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
.fill { background: #4a1636; color: var(--amber); padding: 0 .3em; border-radius: 4px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .wrap { width: min(100% - 1.5rem, 68rem); }
  .site-head { padding-top: var(--s3); }
  .site-head nav { display: flex; gap: var(--s3); }
  .site-head nav a { margin-left: 0; }
  .site-head nav a[href="#vote"] { display: none; }
  h1 { font-size: 2rem; margin-bottom: var(--s2); }
  .lede { font-size: 1rem; }
  section { margin: var(--s5) 0; }

  .faceplate { margin: var(--s4) calc(-1 * var(--s2)) var(--s3); padding: var(--s3); border-radius: 16px; }
  .lcd { flex-direction: column; gap: 0; margin-bottom: var(--s2); }
  .dial-scale { display: none; }

  /* Station dial becomes a swipeable strip */
  .stations {
    display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--s3)); padding: var(--s1) var(--s3) var(--s2);
    scroll-padding-inline: var(--s3); scrollbar-width: none;
  }
  .stations::-webkit-scrollbar { display: none; }
  .station {
    flex: 0 0 auto; width: auto; min-height: 44px; padding: 0 var(--s3);
    border: 1px solid var(--dash-edge); border-radius: 999px; font-size: .9rem; white-space: nowrap;
    scroll-snap-align: start;
  }
  .station[aria-checked="true"] { border-color: var(--coral); }

  .matchup { grid-template-columns: 1fr; gap: var(--s2); margin-top: var(--s3) !important; }
  .vs { justify-self: center; font-size: .85rem; }
  .pick { min-height: 0; padding: var(--s3); gap: var(--s1); border-radius: 12px; }
  .pick .title { font-size: 1.15rem; }
  .pick .where { margin-top: var(--s1); }
  .matchup-foot { flex-direction: column-reverse; align-items: stretch; gap: var(--s2); }
  .matchup-foot .btn { width: 100%; }
  .status { text-align: center; }

  /* Rankings as compact rows */
  .board thead { display: none; }
  .board .hide-sm { display: none; }
  .board tr { display: grid; grid-template-columns: 2.25rem 1fr auto; column-gap: var(--s2); align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--dash-edge); }
  .board td { padding: 0; border: 0; }
  .board .rank { width: auto; font-size: 1rem; }
  .board td.num { font-weight: 700; }
  .listen-inline { display: flex; gap: var(--s3); margin-top: var(--s1); font-weight: 400; font-size: .95rem; }
  .listen-inline a { min-height: 32px; display: inline-flex; align-items: center; }

  form { max-width: none; }
  .btn.primary { width: 100%; }
  .site-foot { padding: var(--s4) 0 calc(var(--s5) + env(safe-area-inset-bottom)); }
  .site-foot nav { gap: var(--s2) var(--s3); }
  .site-foot nav a { min-height: 32px; display: inline-flex; align-items: center; }

  .legal h1 { margin-top: var(--s4); }
  .legal table { display: block; overflow-x: auto; }
  .legal th, .legal td { padding: var(--s2); }
}

/* ---------- Header links shown as buttons ---------- */
.site-head { align-items: center; }
.site-head nav { display: flex; flex-wrap: wrap; gap: var(--s2); }
.site-head nav a {
  margin-left: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border: 2px solid var(--paper); border-radius: 999px; color: var(--paper);
  font-weight: 700; text-decoration: none;
}
.site-head nav a.cta { background-color: var(--amber); border-color: var(--amber); color: var(--night); }
@media (max-width: 720px) {
  .site-head nav a { padding: 0 .8rem; font-size: .95rem; }
}
@media (max-width: 380px) {
  .site-head nav .long { display: none; }
}

/* ---------- Hover: sunset-stripe motif, mouse and trackpad only ---------- */
.pick { position: relative; overflow: hidden; }
.pick::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, #ff9e3d 0 33.3%, #ff5e5b 33.3% 66.6%, #9b5cff 66.6%);
  transform: scaleX(0); transform-origin: left;
}
.pick.won::after { transform: scaleX(1); }

.btn, .site-head nav a {
  background-image: linear-gradient(var(--paper), var(--paper));
  background-size: 0% 100%; background-repeat: no-repeat;
}
.btn.primary, .site-head nav a.cta { background-image: linear-gradient(var(--coral), var(--coral)); }

.needle-ghost { position: absolute; top: 4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--paper); opacity: 0; }
.station { position: relative; }
.station::after {
  content: ""; position: absolute; left: 25%; right: 25%; bottom: 4px; height: 3px; border-radius: 2px;
  background: var(--coral); transform: scaleX(0);
}

@media (hover: hover) {
  .pick::after, .btn, .site-head nav a, .station::after, .needle-ghost, .board tbody td, .board .rank {
    transition: transform .22s ease-out, background-size .25s ease-out, color .2s ease-out, border-color .2s ease-out, opacity .2s ease-out, background-color .2s ease-out;
  }
  .pick:hover::after { transform: scaleX(1); }
  .pick:hover .side { background-color: var(--coral); color: var(--night); }

  .btn:hover, .site-head nav a:hover { background-size: 100% 100%; color: var(--night); border-color: var(--paper); }
  .btn.primary:hover, .site-head nav a.cta:hover { border-color: var(--coral); }

  .station:hover { color: var(--paper); }
  .station:hover::after { transform: scaleX(1); }
  .station[aria-checked="true"]:hover { color: var(--night); }
  .station[aria-checked="true"]::after { background: var(--night); }
  .dial:has(.station:hover) .needle-ghost { opacity: .5; }

  a:not(.btn):not(.brand):not(.site-head nav a) { transition: color .2s ease-out, text-decoration-thickness .2s ease-out; }
  a:not(.brand):hover { color: var(--paper); text-decoration-thickness: 3px; }
  .site-head nav a:hover { text-decoration: none; }

  .board tbody tr:hover td { background-color: var(--dash); }
  .board tbody tr:hover .rank { color: var(--coral); }
}
@media (prefers-reduced-motion: reduce) {
  .pick::after, .btn, .site-head nav a, .station::after, .needle-ghost { transition: none !important; }
}

/* ================= Vice night styling ================= */
:root { --stripe: linear-gradient(90deg, #ff9e3d 0 33.3%, #ff5e5b 33.3% 66.6%, #9b5cff 66.6%); }

/* Retro sun setting behind the headline */
html, body { overflow-x: clip; }
body { position: relative; }
body::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 40px; right: max(-140px, calc(50% - 46rem)); width: 440px; height: 440px; border-radius: 50%;
  background: linear-gradient(180deg, #ffcf5a 0%, #ff9e3d 35%, #ff5e5b 70%, #9b5cff 100%);
  -webkit-mask: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 64%, transparent 64% 69%, #000 69% 76%, transparent 76% 82%, #000 82% 87%, transparent 87% 94%, #000 94%);
  mask: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 64%, transparent 64% 69%, #000 69% 76%, transparent 76% 82%, #000 82% 87%, transparent 87% 94%, #000 94%);
  opacity: .42;
}
/* Horizon line under the hero */
main > .lede { position: relative; }

/* Headline with an 80s print offset */
h1 { text-shadow: 3px 3px 0 var(--coral), 6px 6px 0 #6b2fd6; }
.legal h1 { text-shadow: 2px 2px 0 var(--coral); }

/* Section headings get the sunset stripe */
section > h2::after, .legal h2::after {
  content: ""; display: block; width: 72px; height: 5px; margin-top: .6rem; background: var(--stripe); border-radius: 1px;
}

/* Car-stereo LCD with scanlines */
.lcd {
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px),
    #160a26;
  border: 2px solid #3d2266; border-radius: 8px; padding: .6rem 1rem;
  box-shadow: inset 0 2px 0 rgba(0,0,0,.45);
}
.lcd strong { letter-spacing: .02em; }

/* Faceplate screws */
.faceplate { position: relative; }
.faceplate::before, .faceplate::after {
  content: ""; position: absolute; top: 18px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a78a8, #3a2a55 70%);
  box-shadow: inset 0 0 0 1px #24143b;
}
.faceplate::before { left: 12px; }
.faceplate::after { right: 12px; }
@media (max-width: 720px) { .faceplate::before, .faceplate::after { display: none; } }

/* Podium colours for the top 3 */
.board tbody tr:nth-child(1) .rank { color: #ffcf5a; font-size: 1.5rem; }
.board tbody tr:nth-child(2) .rank { color: var(--coral); font-size: 1.3rem; }
.board tbody tr:nth-child(3) .rank { color: #b98cff; font-size: 1.15rem; }

/* Points stamp on the song you picked */
.stamp {
  position: absolute; bottom: 1rem; right: 1rem; padding: .25rem .6rem; border-radius: 6px;
  background: var(--night); color: var(--amber); font: 800 .95rem var(--display);
  transform: rotate(-6deg);
}
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: stamp .35s cubic-bezier(.2,.9,.3,1.2) both; }
  @keyframes stamp { from { transform: rotate(-6deg) scale(1.8); opacity: 0; } to { transform: rotate(-6deg) scale(1); opacity: 1; } }
}

/* Footer and form details */
.site-foot { border-top: 0; background: var(--stripe) top / 100% 4px no-repeat; }
input[type="text"], select { background-color: #160a26; }
::selection { background: var(--coral); color: var(--night); }

@media (max-width: 720px) {
  body::before { width: 230px; height: 230px; top: 8px; right: -70px; opacity: .2; }
  h1 { text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 #6b2fd6; }
  .site-head { flex-wrap: nowrap; align-items: center; }
  .brand { font-size: 1.15rem; flex-shrink: 0; }
  .site-head nav { flex-wrap: nowrap; gap: var(--s1); }
  .site-head nav a { min-height: 40px; padding: 0 .75rem; font-size: .9rem; }
  .lcd { padding: .5rem .8rem; }
}
@media (max-width: 440px) { .site-head nav .long { display: none; } }

/* ================= Stats ================= */
.stats-summary { font: 800 clamp(1.2rem, 2.6vw, 1.6rem)/1.25 var(--display); color: var(--paper); max-width: 30ch; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin: var(--s4) 0; }
.fact { background: var(--dash); border-radius: 12px; padding: var(--s3) var(--s4); border-left: 6px solid var(--coral); }
.fact:nth-child(2) { border-left-color: var(--amber); }
.fact:nth-child(3) { border-left-color: var(--foam); }
.fact:nth-child(4) { border-left-color: #b98cff; }
.fact h3 { margin-bottom: var(--s2); color: var(--muted); font-size: 1rem; }
.fact p { margin: 0; font-size: 1.05rem; }

.charts { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s4); }
.chart { margin: 0; background: var(--dash); border-radius: 12px; padding: var(--s3) var(--s4) var(--s4); }
.chart figcaption { margin-bottom: var(--s3); }
.chart figcaption h3 { margin: 0; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.bars li { display: grid; grid-template-columns: 11rem 1fr 3rem; gap: var(--s2); align-items: center; }
.bar-name { font-weight: 700; font-size: .95rem; }
.bar-track { height: 14px; background: #160a26; border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--stripe); background-size: 100% 100%; }
.bars li:nth-child(1) .bar-fill { background: #ffcf5a; }
.bars li:nth-child(2) .bar-fill { background: var(--coral); }
.bars li:nth-child(3) .bar-fill { background: #b98cff; }
.bars li:nth-child(n+4) .bar-fill { background: var(--muted); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 150px; align-items: end; }
.days li { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.day-col { display: block; min-height: 2px; background: var(--foam); border-radius: 2px 2px 0 0; }
.days li:last-child .day-col { background: var(--coral); }
.day-label { font-size: .75rem; color: var(--muted); text-align: center; margin-top: 4px; }
#stats-note { margin-top: var(--s3); }
@media (prefers-reduced-motion: no-preference) {
  .bar-fill, .day-col { transition: width .4s ease-out, height .4s ease-out; }
}
@media (max-width: 720px) {
  .facts, .charts { grid-template-columns: 1fr; gap: var(--s2); }
  .fact { padding: var(--s3); }
  .chart { padding: var(--s3); }
  .bars li { grid-template-columns: 1fr 2.6rem; }
  .bar-name { grid-column: 1 / -1; font-size: .9rem; }
  .bar-track { grid-column: 1; }
  .site-head nav a[href="#rankings"] { display: none; }
}

/* ---------- Card swap when skipping or after a vote ---------- */
@media (prefers-reduced-motion: no-preference) {
  .side-col { transition: opacity .26s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
  #col-b { transition-delay: .05s; }
  .side-col.leaving { opacity: 0; transform: translateX(-28px); }
  .side-col.entering { opacity: 0; transform: translateX(28px); transition: none; }
  .pick:active { transform: translateY(1px); }
  @media (max-width: 720px) {
    .side-col.leaving { transform: translateY(-14px); }
    .side-col.entering { transform: translateY(14px); }
  }
}
.btn:disabled { opacity: .6; cursor: progress; }

/* ================= Auto-correct chips ================= */
.fix:empty { display: none; }
.fix { margin-top: var(--s2); }
.fix-chip {
  appearance: none; width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  column-gap: var(--s3); align-items: center; text-align: left; cursor: pointer;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), #160a26;
  border: 2px solid #3d2266; border-left: 6px solid var(--amber); border-radius: 8px;
  padding: .55rem .8rem; color: var(--paper); font: inherit;
}
.fix-label { grid-column: 1; font-size: .85rem; color: var(--muted); }
.fix-value { grid-column: 1; font: 800 1rem/1.25 var(--display); color: var(--amber); overflow-wrap: anywhere; }
.fix-use {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  padding: .45rem .9rem; border-radius: 999px; background: var(--amber); color: var(--night); font-weight: 700; font-size: .95rem;
}
.fix-note { margin: 0; padding: .55rem .8rem; border-left: 6px solid var(--foam); background: var(--dash); border-radius: 8px; font-size: .95rem; }
@media (prefers-reduced-motion: no-preference) {
  .fix-chip, .fix-note { animation: fixIn .22s ease-out both; }
  @keyframes fixIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
@media (hover: hover) {
  .fix-chip { transition: border-color .2s ease-out; }
  .fix-chip:hover { border-color: var(--amber); }
}

/* Phone form: a stereo-panel card with LCD inputs */
@media (max-width: 720px) {
  #suggest-form {
    background: var(--stripe) top / 100% 5px no-repeat, var(--dash);
    margin: 0 calc(-1 * var(--s2)); padding: var(--s4) var(--s3) var(--s3); border-radius: 16px; border: 2px solid var(--dash-edge);
  }
  #suggest-form input[type="text"], #suggest-form select {
    min-height: 52px; font-size: 1.05rem; border-radius: 10px;
    background: repeating-linear-gradient(180deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), #160a26;
  }
  #suggest-form input[type="text"]:focus { color: var(--amber); }
  .fix-chip { min-height: 56px; }
  .fix-use { padding: .6rem 1rem; }
  .check { padding: var(--s2) 0; }
  #suggest-form .btn.primary { min-height: 52px; font-size: 1.05rem; }
}

/* Cassette side labels on the two song cards */
.pick .side {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem;
  font: 800 .8rem/1 var(--display); letter-spacing: .02em;
  background: var(--night); color: var(--paper); padding: .35rem .6rem .45rem; border-radius: 4px;
  background-image: var(--stripe); background-size: 100% 3px; background-position: bottom; background-repeat: no-repeat;
}
.pick .side::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box;
}
.pick .side::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box;
}
@media (hover: hover) { .pick .side { transition: background-color .2s ease-out, color .2s ease-out; } }

/* LCD second line: signal light, genre and song count */
.lcd-meta {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 700 .95rem/1 var(--body); color: var(--amber);
}
.signal {
  width: 8px; height: 8px; border-radius: 50%; background: var(--foam); flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .signal { animation: signal 1.6s ease-in-out infinite; }
  @keyframes signal { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
}
@media (max-width: 720px) {
  .lcd-meta { margin-top: .35rem; gap: .5rem; font-size: .9rem; flex-wrap: wrap; }
}

/* Listen links attached under each song card */
.side-col { display: flex; flex-direction: column; min-width: 0; }
.side-col .pick { flex: 1; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.listen-row {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  background: #f1e2d6; border-radius: 0 0 14px 14px; padding: .6rem 1.5rem .7rem;
}
.listen-hint { font-size: .9rem; color: #4a2f63; margin-right: auto; }
.listen-link {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem;
  border-radius: 999px; border: 2px solid var(--night); color: var(--night); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.listen-link::before { content: ""; width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
a.listen-link:focus-visible { outline-color: var(--night); }
@media (hover: hover) {
  .listen-link { transition: background-color .2s ease-out, color .2s ease-out; }
  a.listen-link:hover { background: var(--night); color: var(--paper); text-decoration: none; }
}
@media (max-width: 720px) {
  .side-col .pick { border-radius: 12px 12px 0 0; }
  .listen-row { border-radius: 0 0 12px 12px; padding: .55rem 1rem .7rem; }
  .listen-link { min-height: 44px; padding: 0 1rem; }
}

/* Station display: centre the genre line against the station name */
.lcd { align-items: center; }
.lcd-meta { line-height: 1.2; }
@media (max-width: 720px) { .lcd { align-items: flex-start; } }

/* ================= Phone: swipe deck ================= */
.swipe-hint, .swipe-stamp { display: none; }
@media (max-width: 720px) {
  .swipe-hint { display: block; text-align: center; color: var(--muted); font-size: .9rem; margin: var(--s3) 0 0; }
  .matchup {
    position: relative; grid-template-columns: 1fr 1fr !important; gap: 0 !important;
    touch-action: pan-y; user-select: none; -webkit-user-select: none;
    border-radius: 14px;
    box-shadow: 0 8px 0 -3px #3b2163, 0 16px 0 -7px #2f1a50;
    margin-bottom: var(--s4);
  }
  .matchup.dragging { cursor: grabbing; }
  .matchup .vs {
    position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%);
    width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--night); color: var(--paper); font-size: .8rem; border: 3px solid #fff3ea;
  }
  .side-col .pick { padding: var(--s3) .8rem var(--s3) .9rem; border-radius: 0; gap: .35rem; }
  #col-a .pick { border-top-left-radius: 14px; border-right: 1px dashed #c9b3a6; }
  #col-b .pick { border-top-right-radius: 14px; padding-left: 1.1rem; }
  .pick .title { font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
  .pick .artist { font-size: .9rem; }
  .pick .where { font-size: .8rem; }
  .pick .side { font-size: .7rem; padding: .3rem .45rem .4rem; gap: .3rem; }
  .pick .side::before, .pick .side::after { width: 7px; height: 7px; }
  .listen-row { flex-direction: column; align-items: stretch; gap: .4rem; padding: .6rem .7rem .8rem; border-radius: 0; }
  #col-a .listen-row { border-bottom-left-radius: 14px; border-right: 1px dashed #c9b3a6; }
  #col-b .listen-row { border-bottom-right-radius: 14px; }
  .listen-hint { display: none; }
  .listen-link { justify-content: center; min-height: 40px; font-size: .85rem; padding: 0 .5rem; }
  .side-col.leaving, .side-col.entering { transform: none; }

  /* Lean feedback while dragging */
  .matchup[data-lean="a"] #col-a .pick, .matchup[data-lean="b"] #col-b .pick { background: #ffe3d0; }
  .matchup[data-lean="a"] #col-b, .matchup[data-lean="b"] #col-a { opacity: .55; }
  .swipe-stamp {
    display: block; position: absolute; z-index: 3; top: 1rem; left: 50%; transform: translateX(-50%) rotate(-8deg);
    padding: .35rem .8rem; border: 3px solid var(--coral); border-radius: 8px; background: var(--night);
    color: var(--coral); font: 800 1.1rem var(--display); opacity: 0; pointer-events: none;
  }
  .stamp { bottom: .6rem; right: .6rem; font-size: .8rem; }
}
@media (max-width: 720px) {
  .swipe-stamp { top: 38%; }
  .matchup[data-lean="a"] .swipe-stamp { left: 25%; transform: translate(-50%, -50%) rotate(-10deg); }
  .matchup[data-lean="b"] .swipe-stamp { left: 75%; transform: translate(-50%, -50%) rotate(10deg); }
  .matchup[data-lean] .vs { opacity: 0; }
  .matchup[data-lean=""] .vs { opacity: 1; }
}

/* ================= Bigger, primary station options ================= */
.brand { font-size: 1.6rem; }
.stations { gap: var(--s2); }
.station {
  min-height: 4.25rem; padding: var(--s2);
  background: #3a2160; color: var(--paper); border: 2px solid #5c3591; border-radius: 12px;
  font: 700 1rem/1.2 var(--body);
}
.station[aria-checked="true"] { background: var(--coral); border-color: var(--coral); color: var(--night); }
@media (hover: hover) {
  .station:hover { border-color: var(--coral); color: var(--paper); }
  .station[aria-checked="true"]:hover { color: var(--night); }
}
@media (max-width: 720px) {
  .brand { font-size: 1.25rem; }
  .station { min-height: 52px; padding: 0 1.1rem; font-size: 1rem; border-radius: 999px; border-width: 2px; }
}

.lcd-meta[hidden] { display: none; }

/* ================= Start card on the home page ================= */
.start-card { display: grid; gap: var(--s3); justify-items: start; }
.start-card .lcd { width: 100%; margin: 0; }
.start-text { margin: 0; font-size: 1.1rem; max-width: 52ch; }
.start-btn { min-height: 60px; padding: 0 2.2rem; font-size: 1.2rem; font-family: var(--display); font-weight: 800; }
.board-filter-field { display: flex; align-items: center; gap: var(--s2); max-width: 22rem; }
.board-filter-field label { margin: 0; }
@media (max-width: 720px) {
  .start-btn { width: 100%; justify-content: center; }
  .start-card { justify-items: stretch; }
}

/* ================= Full-screen voting page ================= */
body.vote-app {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
body.vote-app::before { opacity: .18; }
.vote-top {
  display: flex; align-items: center; gap: var(--s3); justify-content: space-between;
  width: min(100% - 2rem, 72rem); margin: 0 auto; padding: var(--s3) 0;
}
.vote-top .brand { font-size: 1.4rem; }
.session { font: 800 .95rem var(--display); color: var(--amber); margin-left: auto; }
.vote-close {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px;
  border: 2px solid var(--paper); color: var(--paper); font-weight: 700; text-decoration: none;
}
.vote-main {
  flex: 1; display: flex; flex-direction: column; gap: var(--s3);
  width: min(100% - 2rem, 72rem); margin: 0 auto; padding-bottom: var(--s3);
}
.vote-main .lcd { margin: 0; }
.vote-main .matchup { flex: 1; min-height: 22rem; }
.vote-main .side-col .pick { justify-content: center; padding: var(--s5) var(--s4); }
.vote-main .pick .title { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.vote-main .pick .artist { font-size: 1.15rem; }
.vote-main .matchup-foot { margin: 0; }
.vote-foot {
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: center;
  width: min(100% - 2rem, 72rem); margin: 0 auto; padding: var(--s2) 0 calc(var(--s3) + env(safe-area-inset-bottom));
  color: var(--muted); font-size: .85rem; border-top: 1px solid var(--dash-edge);
}
@media (hover: hover) {
  .vote-close { transition: background-color .2s ease-out, color .2s ease-out; }
  .vote-close:hover { background: var(--paper); color: var(--night); }
}

@media (max-width: 720px) {
  body.vote-app::before { display: none; }
  .vote-top { width: calc(100% - 1.5rem); padding: var(--s2) 0; gap: var(--s2); }
  .vote-top .brand { font-size: 1.2rem; }
  .vote-close { min-height: 40px; padding: 0 .8rem; font-size: .9rem; }
  .session { font-size: .85rem; }
  .vote-main { width: calc(100% - 1.5rem); gap: var(--s2); padding-bottom: var(--s2); }
  .vote-main .lcd { padding: .45rem .8rem; flex-direction: row; align-items: center; justify-content: space-between; }
  .vote-main .lcd strong { font-size: 1.05rem; }
  .vote-main .lcd-meta { margin-top: 0; font-size: .85rem; }
  .vote-main .stations { margin: 0 -.75rem; padding: var(--s1) .75rem var(--s1); }
  .vote-main .swipe-hint { margin: 0; font-size: .85rem; }
  .vote-main .matchup { min-height: 0; margin-bottom: var(--s3); }
  .vote-main .side-col .pick { padding: var(--s4) .9rem; justify-content: center; }
  .vote-main #col-b .pick { padding-left: 1.1rem; }
  .vote-main .pick .title { font-size: 1.3rem; }
  .vote-main .pick .artist { font-size: 1rem; }
  .vote-main .matchup .vs { top: 45%; }
  .vote-main .matchup-foot { flex-direction: row; align-items: center; }
  .vote-main .matchup-foot .btn { width: auto; flex: 1; }
  .vote-main .status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vote-foot { display: none; }
}
.vote-main .pick .where { margin-top: var(--s2); }
.start-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.start-btn:hover { text-decoration: none; }
@media (max-width: 380px) { .site-head nav a { padding: 0 .6rem; font-size: .85rem; } .brand { font-size: 1.05rem; } }

/* ================= Listen & rate page (card app) ================= */
body.rate-app { background: #140a22; min-height: 100vh; min-height: 100dvh; }
body.rate-app::before { display: none; }
body.gate-open { overflow: hidden; }
.rate-shell {
  width: min(100%, 30rem); margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.rate-top { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem .5rem; }
.rate-top .brand { font-size: 1.1rem; flex-shrink: 0; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; appearance: none; border: 0; background: transparent; color: var(--muted);
  font: 700 .95rem var(--body); padding: .55rem .8rem; min-height: 40px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  scroll-snap-align: start;
}
.tab[aria-checked="true"] { background: #2b1745; color: var(--paper); box-shadow: inset 0 0 0 1.5px #5c3591; }
@media (hover: hover) { .tab:hover { color: var(--paper); } }

.rate-main { flex: 1; display: flex; flex-direction: column; padding: 0 .75rem; min-height: 0; }

/* The card */
.song-card {
  position: relative; flex: 1; min-height: 23rem; border-radius: 22px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  background: #22123a; isolation: isolate;
}
.song-card.dragging { cursor: grabbing; }
.art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.song-card::after { /* readable text over any background */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,10,34,.35) 0%, rgba(20,10,34,0) 22%, rgba(20,10,34,0) 42%, rgba(20,10,34,.82) 72%, #140a22 100%);
}
.art-sun {
  position: absolute; left: 50%; top: 20%; width: 64%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: linear-gradient(180deg, var(--sun1), var(--sun2) 55%, var(--sun3));
  -webkit-mask: linear-gradient(180deg, #000 0 50%, transparent 50% 55%, #000 55% 63%, transparent 63% 68%, #000 68% 75%, transparent 75% 81%, #000 81% 86%, transparent 86% 93%, #000 93%);
  mask: linear-gradient(180deg, #000 0 50%, transparent 50% 55%, #000 55% 63%, transparent 63% 68%, #000 68% 75%, transparent 75% 81%, #000 81% 86%, transparent 86% 93%, #000 93%);
}
.art-horizon {
  position: absolute; left: 0; right: 0; top: 55%; bottom: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), var(--grid) calc(12.5% - 1px) 12.5%),
    repeating-linear-gradient(180deg, var(--grid) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, var(--ground1), var(--ground2));
  transform: perspective(260px) rotateX(48deg); transform-origin: top;
}
.art:not([style*="url"]) { background: linear-gradient(180deg, var(--sky1), var(--sky2) 55%, var(--sky3) 56%); }
.art[style*="url"] .art-sun, .art[style*="url"] .art-horizon { display: none; }

.song-card { --sky1:#2a1048; --sky2:#ff5e5b; --sky3:#2a1048; --sun1:#ffe08a; --sun2:#ff9e3d; --sun3:#ff5e5b; --grid:rgba(255,94,91,.55); --ground1:#2a1048; --ground2:#140a22; }
.song-card[data-station="flash"]       { --sky1:#1c0b3a; --sky2:#b13cff; --sky3:#1c0b3a; --sun1:#fff1a8; --sun2:#ff6ad5; --sun3:#8a3cff; --grid:rgba(184,92,255,.6); }
.song-card[data-station="cocoteo"]     { --sky1:#3a0f2e; --sky2:#ff7a3d; --sky3:#0b3a4a; --sun1:#ffe08a; --sun2:#ff7a3d; --sun3:#ff3d6e; --grid:rgba(66,227,210,.5); --ground1:#0b3a4a; --ground2:#071d29; }
.song-card[data-station="dirtysouth"]  { --sky1:#12081f; --sky2:#5b1f7a; --sky3:#12081f; --sun1:#ffcf5a; --sun2:#ff8a3d; --sun3:#b0305e; --grid:rgba(255,158,61,.5); }
.song-card[data-station="afrobank"]    { --sky1:#2c1a07; --sky2:#e8a317; --sky3:#123a22; --sun1:#fff2b0; --sun2:#ffc23d; --sun3:#e86a17; --grid:rgba(98,214,120,.5); --ground1:#123a22; --ground2:#08190f; }
.song-card[data-station="backcountry"] { --sky1:#2a1608; --sky2:#d9773a; --sky3:#3a230f; --sun1:#ffe4a8; --sun2:#ffae5a; --sun3:#c4532a; --grid:rgba(255,190,120,.4); --ground1:#3a230f; --ground2:#1a0f06; }
.song-card[data-station="chamber"]     { --sky1:#0d0508; --sky2:#7a0d1a; --sky3:#0d0508; --sun1:#ff9a8a; --sun2:#d61f2c; --sun3:#4a0610; --grid:rgba(214,31,44,.55); --ground1:#1a0608; --ground2:#0a0204; }
.song-card[data-station="trailers"]    { --sky1:#0a1f3a; --sky2:#42e3d2; --sky3:#0a1f3a; --sun1:#fff3ea; --sun2:#ff9e3d; --sun3:#ff5e5b; --grid:rgba(66,227,210,.55); --ground1:#0a1f3a; --ground2:#06101f; }

/* Loop progress: 8 segments, like stories */
.loop { position: absolute; top: .7rem; left: .8rem; right: 3.6rem; display: flex; gap: 4px; }
.seg { --fill: 0; flex: 1; height: 4px; border-radius: 2px; background: rgba(255,243,234,.3); overflow: hidden; position: relative; }
.seg::after { content: ""; position: absolute; inset: 0; background: var(--paper); transform-origin: left; transform: scaleX(var(--fill)); }

.sound {
  position: absolute; top: .45rem; right: .55rem; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(20,10,34,.55); color: var(--paper); display: grid; place-items: center; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sound svg { width: 22px; height: 22px; display: none; }
.sound[data-state="off"] .i-off, .sound[data-state="paused"] .i-on, .sound[data-state="playing"] .i-pause { display: block; }

.card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.1rem 1.1rem 1rem; }
.song-title {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font: 800 clamp(1.6rem, 7vw, 2.2rem)/1.08 var(--display); color: var(--paper); margin: 0 0 .3rem; letter-spacing: -.01em; text-shadow: none;
}
.song-title::after { display: none; }
.badge { width: 1.4rem; height: 1.4rem; flex-shrink: 0; }
.song-artist { margin: 0 0 .7rem; font-size: 1.1rem; color: var(--paper); }
.chips { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { font-size: .85rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px; background: rgba(255,243,234,.14); color: var(--paper); }
.chips li[hidden] { display: none; }
.chips li:first-child { background: var(--coral); color: var(--night); }
.song-links { margin: 0; display: flex; gap: 1rem; font-size: .9rem; }
.song-links a { color: var(--foam); }
.clip-note { margin: 0 0 .5rem; font-size: .9rem; color: var(--amber); }

.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; margin-bottom: .55rem; opacity: 0; transition: opacity .2s; }
.eq span { width: 4px; height: 30%; background: var(--foam); border-radius: 2px; }
.song-card.playing .eq { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .song-card.playing .eq span { animation: eq .9s ease-in-out infinite alternate; }
  .song-card.playing .eq span:nth-child(2) { animation-delay: -.3s; }
  .song-card.playing .eq span:nth-child(3) { animation-delay: -.6s; }
  .song-card.playing .eq span:nth-child(4) { animation-delay: -.15s; }
  @keyframes eq { from { height: 20%; } to { height: 100%; } }
}

/* Swipe feedback */
.stamp-swipe {
  position: absolute; top: 3.2rem; z-index: 2; padding: .3rem .8rem; border: 4px solid; border-radius: 10px;
  font: 800 1.6rem var(--display); opacity: 0; pointer-events: none; background: rgba(20,10,34,.35);
}
.song-card[data-lean="up"] .stamp-swipe { left: 1rem; color: var(--foam); transform: rotate(-12deg); }
.song-card[data-lean="down"] .stamp-swipe { right: 1rem; color: var(--coral); transform: rotate(12deg); }
.song-card[data-lean="meh"] .stamp-swipe { left: 50%; color: var(--amber); transform: translateX(-50%); font-size: 1.3rem; }

/* Action buttons: small, big, small, big */
.actions { display: flex; justify-content: center; align-items: flex-start; gap: .9rem; padding: .9rem 0 .2rem; }
.act {
  appearance: none; border: 0; background: none; color: var(--paper); cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: .35rem; font: 700 .75rem var(--body); min-width: 64px;
}
.act svg { box-sizing: content-box; border-radius: 50%; background: #241338; border: 2px solid #3d2266; color: var(--muted); }
.act.small svg { width: 22px; height: 22px; padding: 15px; }
.act.big svg { width: 30px; height: 30px; padding: 19px; }
.act.down svg { color: var(--coral); }
.act.up svg { color: var(--foam); }
.act.meh svg { color: var(--amber); }
.act span { color: var(--muted); }
.act:active svg { transform: scale(.92); }
@media (hover: hover) {
  .act svg { transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
  .act.down:hover svg { background: var(--coral); border-color: var(--coral); color: var(--night); }
  .act.up:hover svg { background: var(--foam); border-color: var(--foam); color: var(--night); }
  .act.meh:hover svg { background: var(--amber); border-color: var(--amber); color: var(--night); }
  .act.small:not(.meh):hover svg { background: var(--paper); border-color: var(--paper); color: var(--night); }
}
.hint { text-align: center; color: var(--muted); font-size: .8rem; margin: .4rem auto 0; }
.credit { text-align: center; color: var(--muted); font-size: .72rem; margin: .5rem auto .3rem; max-width: 40ch; }
.toast {
  position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: var(--paper); color: var(--night); padding: .7rem 1rem; border-radius: 12px; font-weight: 700; max-width: min(90vw, 26rem); margin: 0;
}

/* Bottom navigation */
.tabbar {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #140a22; border-top: 1px solid #2b1745; padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; min-height: 48px; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 700; border-radius: 10px;
}
.tabbar svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--coral); }
@media (hover: hover) { .tabbar a:hover { color: var(--paper); } }

/* Start screen */
.gate {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: end center;
  background: rgba(10,4,18,.72); padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
.gate[hidden] { display: none; }
.gate-box {
  width: min(100%, 28rem); background: #22123a; border-radius: 22px; padding: 1.5rem 1.3rem 1.3rem;
  background-image: var(--stripe); background-size: 100% 6px; background-repeat: no-repeat;
  display: grid; gap: .8rem;
}
.gate-box h2 { margin: 0; font-size: 1.5rem; }
.gate-box h2::after { display: none; }
.gate-box p { margin: 0; color: var(--paper); font-size: .98rem; }
.gate-box .btn { width: 100%; min-height: 52px; justify-content: center; display: inline-flex; align-items: center; font-size: 1.05rem; }
@media (min-width: 721px) { .gate { place-items: center; } }

/* Desktop: keep the phone-style column, give the card room */
@media (min-width: 721px) {
  .rate-shell { width: min(100%, 32rem); }
  .song-card { min-height: 30rem; }
}
@media (max-height: 640px) {
  .act.big svg { padding: 15px; } .act.small svg { padding: 12px; }
  .hint { display: none; }
}
.act.small svg { margin: 8px 0; }
@media (max-height: 720px) {
  .song-card { min-height: 0; }
  .song-title { font-size: 1.5rem; }
  .song-artist { margin-bottom: .45rem; font-size: 1rem; }
  .chips { margin-bottom: .4rem; } .chips li { font-size: .78rem; padding: .25rem .55rem; }
  .actions { padding-top: .6rem; gap: .6rem; }
  .act.big svg { width: 26px; height: 26px; padding: 15px; }
  .act.small svg { width: 20px; height: 20px; padding: 12px; margin: 6px 0; }
  .hint { display: none; }
  .credit { margin: .35rem auto .2rem; }
  .tabbar a { min-height: 44px; }
}

/* ================= Round 2: bigger card, plain text details, smooth popups ================= */
.song-meta { margin: 0 0 .6rem; font-size: 1rem; color: var(--paper); opacity: .92; }
.clip-credit {
  position: absolute; top: 1.35rem; left: .8rem; font-size: .75rem; font-weight: 700; color: var(--paper);
  opacity: .85; text-decoration: none; padding: .2rem 0;
}
.clip-credit:hover { opacity: 1; text-decoration: underline; }
.rate-main { padding-bottom: .35rem; }
.actions { padding: .8rem 0 .5rem; }

/* Start screen: fade the backdrop, slide the sheet up */
.gate-small { font-size: .8rem !important; color: var(--muted) !important; text-align: center; }
.gate .notice { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .gate { animation: gateFade .25s ease-out both; }
  .gate-box { animation: sheetUp .34s cubic-bezier(.2,.8,.2,1) both; }
  .gate.closing { animation: gateFadeOut .26s ease-in both; }
  .gate.closing .gate-box { animation: sheetDown .26s ease-in both; }
  @keyframes gateFade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes gateFadeOut { from { opacity: 1; } to { opacity: 0; } }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes sheetDown { from { transform: none; opacity: 1; } to { transform: translateY(40px); opacity: 0; } }
}

/* Toast: slides in and out instead of popping */
.toast {
  display: block; opacity: 0; pointer-events: none; transform: translate(-50%, 12px);
  bottom: calc(5.2rem + env(safe-area-inset-bottom));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: no-preference) {
  .toast { transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
}

/* Installed app (PWA): no browser bars, so respect the notch and home indicator */
@media (display-mode: standalone) {
  .rate-top { padding-top: max(.7rem, env(safe-area-inset-top)); }
  .rate-shell { padding-top: 0; }
  body:not(.rate-app) .site-head { padding-top: max(var(--s4), env(safe-area-inset-top)); }
}
/* No bottom bar: keep the buttons clear of the phone's home indicator */
.rate-main { padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
.toast { bottom: calc(7.5rem + env(safe-area-inset-bottom)); }
.rate-top { justify-content: center; padding: .6rem .9rem .5rem; }
.rate-top .brand { font-size: 1.25rem; }

/* ================= Simple home page ================= */
.home { max-width: 44rem; }
.home h1 { text-shadow: none; font-size: clamp(2.2rem, 7vw, 3.6rem); max-width: 14ch; margin-bottom: var(--s3); }
.home section { margin: var(--s6) 0; }
.home h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); }
.hero { margin-top: var(--s5) !important; }
.hero .lede { font-size: 1.15rem; max-width: 34ch; color: var(--muted); margin-bottom: var(--s4); }
.hero .start-btn { min-width: 14rem; }
.hero .notice { margin-top: var(--s4); }

/* Ranked rows with a split bar */
.song-list, .mood { list-style: none; margin: 0; padding: 0; }
.song-list li, .mood li {
  display: grid; grid-template-columns: 2rem 1fr 8rem 5.5rem; align-items: center; gap: var(--s3);
  padding: .9rem 0; border-bottom: 1px solid #2b1745;
}
.song-list .r { font: 800 1.15rem var(--display); color: var(--amber); }
.who { display: flex; flex-direction: column; min-width: 0; }
.who strong { font-weight: 700; overflow-wrap: anywhere; }
.who span { color: var(--muted); font-size: .92rem; }
.val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #2b1745; gap: 2px; }
.split span { flex-basis: 0; min-width: 0; }
.split .s-up { background: var(--foam); }
.split .s-meh { background: var(--amber); }
.split .s-down { background: var(--coral); }
.split.empty .s-meh { background: #2b1745; }
.mood li { grid-template-columns: 1fr 9rem 5.5rem; padding: .7rem 0; }
.mood .who { font-weight: 700; }

/* Highlight cards with a percentage ring */
.stats-line { color: var(--muted); margin-bottom: var(--s3); }
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.hl { background: #22123a; border-radius: 16px; padding: var(--s3); display: grid; gap: .6rem; justify-items: start; align-content: start; }
.hl h3 { margin: 0; font: 700 .9rem var(--body); color: var(--muted); }
.hl p { margin: 0; font-size: .92rem; color: var(--muted); }
.hl p strong { color: var(--paper); font-size: 1rem; }
.ring {
  --p: 0; --c: var(--foam);
  width: 4.2rem; height: 4.2rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, #22123a 74%, transparent 75%), conic-gradient(var(--c) calc(var(--p) * 1%), #3a2160 0);
  font: 800 .95rem var(--display);
}
.hl-down .ring { --c: var(--coral); }
.hl-meh .ring { --c: var(--amber); }
.hl-split .ring { --c: var(--foam); background: radial-gradient(closest-side, #22123a 74%, transparent 75%), conic-gradient(var(--foam) calc(var(--p) * 1%), var(--coral) 0); }
.sub { margin: var(--s5) 0 var(--s2); font-size: 1.05rem; font-weight: 700; font-family: var(--body); }
.legend { margin-top: var(--s3); color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.legend .k { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.legend .k.up { background: var(--foam); } .legend .k.meh { background: var(--amber); } .legend .k.down { background: var(--coral); }

/* Suggestion form, folded away until needed */
.suggest-box { background: #22123a; border-radius: 16px; padding: 0 var(--s4); }
.suggest-box summary { cursor: pointer; list-style: none; padding: var(--s4) 0; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.suggest-box summary::-webkit-details-marker { display: none; }
.suggest-box summary::after { content: "+"; font: 800 1.6rem/1 var(--display); color: var(--amber); }
.suggest-box[open] summary::after { content: "\2212"; }
.suggest-box summary h2 { margin: 0; font-size: 1.15rem; }
.suggest-box summary h2::after { display: none; }
.suggest-box[open] { padding-bottom: var(--s4); }
.home #suggest-form { background: none; border: 0; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  .suggest-box[open] > :not(summary) { animation: fixIn .25s ease-out both; }
}

@media (max-width: 720px) {
  .home section { margin: var(--s5) 0; }
  .song-list li { grid-template-columns: 1.6rem 1fr 4.8rem; row-gap: .45rem; }
  .song-list li .split { grid-column: 2 / -1; grid-row: 2; }
  .song-list li .val { grid-row: 1; grid-column: 3; }
  .mood li { grid-template-columns: 1fr 4.8rem; row-gap: .45rem; }
  .mood li .split { grid-column: 1 / -1; grid-row: 2; }
  .highlights { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -.75rem; padding: 0 .75rem .4rem; scrollbar-width: none; }
  .highlights::-webkit-scrollbar { display: none; }
  .hl { scroll-snap-align: start; }
  .suggest-box { padding: 0 var(--s3); }
  .hero .start-btn { width: 100%; }
}
.val small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }
@media (max-width: 720px) {
  .highlights { margin: 0; padding: 0 0 .4rem; grid-auto-columns: 70%; }
}

/* Primary buttons: one solid sunset orange, no pink layer underneath */
.btn.primary, .site-head nav a.cta, .start-btn {
  background: var(--amber) !important; background-image: none !important;
  border-color: var(--amber) !important; color: var(--night) !important;
}
@media (hover: hover) {
  .btn.primary, .site-head nav a.cta { transition: background-color .2s ease-out, border-color .2s ease-out; }
  .btn.primary:hover, .site-head nav a.cta:hover { background: #ffb866 !important; border-color: #ffb866 !important; }
}

/* "Let's ride" button: a little equalizer that bounces like a car stereo, and a sunset glint on hover */
.ride { position: relative; overflow: hidden; gap: .7rem; isolation: isolate; }
.ride-eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 1.1em; }
.ride-eq i { display: block; width: 4px; height: 40%; border-radius: 2px; background: var(--night); }
.ride::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 45%, rgba(255,94,91,.35) 55%, transparent 70%);
  transform: translateX(-120%);
}
.ride:active { transform: scale(.97); }
@media (prefers-reduced-motion: no-preference) {
  .ride-eq i { animation: rideEq 1s ease-in-out infinite alternate; }
  .ride-eq i:nth-child(2) { animation-delay: -.35s; }
  .ride-eq i:nth-child(3) { animation-delay: -.7s; }
  .ride-eq i:nth-child(4) { animation-delay: -.15s; }
  @keyframes rideEq { from { height: 25%; } to { height: 100%; } }
  .ride { transition: transform .15s ease; }
  .ride::after { animation: rideGlint 4.5s ease-in-out 1.2s infinite; }
  @keyframes rideGlint { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ride:hover::after { animation-duration: 1.2s; animation-delay: 0s; }
}

/* Inline sound switch instead of a popup */
.sound-lbl { display: none; }
.sound[data-state="off"] {
  width: auto; height: 40px; padding: 0 .9rem 0 .7rem; border-radius: 999px; gap: .4rem;
  display: inline-flex; align-items: center; background: var(--amber); color: var(--night); top: 1.4rem;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sound[data-state="off"] .sound-lbl { display: inline; font: 700 .9rem var(--body); white-space: nowrap; }
.sound[data-state="off"] .i-off { display: none; }
.sound[data-state="off"] .i-on { display: block; width: 20px; height: 20px; }
.sound-note {
  position: absolute; top: 1.45rem; left: .8rem; right: 10.5rem; margin: 0;
  font-size: .75rem; line-height: 1.35; color: var(--paper); opacity: .9;
}
.sound-note a { color: var(--paper); }
.sound-note[hidden], .clip-credit[hidden] { display: none; }
.rate-main > .notice { font-size: .8rem; padding: .4rem .7rem; margin: .4rem 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .sound { transition: background-color .25s ease, width .25s ease; }
  .clip-credit:not([hidden]) { animation: fixIn .3s ease-out both; }
}
@media (hover: hover) { .sound[data-state="off"]:hover { background: #ffb866; } }

/* Deezer note: visible on arrival, then tucks behind an (i) button. Screen readers can always reach it. */
.info-btn {
  position: absolute; top: 1.4rem; left: .7rem; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(20,10,34,.55); color: var(--paper); display: grid; place-items: center; cursor: pointer;
}
.info-btn svg { width: 22px; height: 22px; }
.info-btn[hidden] { display: none; }
.song-card.note-fading .sound-note { opacity: 0; transform: translateY(-6px); }
/* Tucked: invisible but still read by screen readers. Opening and closing via (i) fades. */
.song-card.note-tucked .sound-note { left: 3.6rem; opacity: 0; transform: translateY(-4px); pointer-events: none; }
.song-card.note-pinned .sound-note { left: 3.6rem; opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .sound-note { transition: opacity .35s ease, transform .35s ease; }
  .song-card.note-fading .sound-note { transition-duration: .5s; }
}

/* ================= Exit button and session summary ================= */
.rate-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; justify-items: center; }
.exit-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: #241338; color: var(--muted); justify-self: start;
}
.exit-btn svg { width: 18px; height: 18px; }
@media (hover: hover) { .exit-btn { transition: background-color .2s, color .2s; } .exit-btn:hover { background: #3a2160; color: var(--paper); } }

body.sheet-open { overflow: hidden; }
.sheet {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center;
  background: rgba(10,4,18,.72); padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
.sheet[hidden] { display: none; }
.sheet-box {
  width: min(100%, 30rem); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain;
  background: #22123a; border-radius: 22px; padding: 1.6rem 1.3rem 1.2rem;
  background-image: var(--stripe); background-size: 100% 6px; background-repeat: no-repeat;
}
.sheet-box h2 { margin: 0 0 .3rem; font-size: 1.7rem; }
.sheet-box h2::after { display: none; }
.sum-line { margin: 0 0 .9rem; color: var(--muted); }
.sum-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .9rem; }
.sum-counts:empty { display: none; }
.cnt { margin: 0; background: #2b1745; border-radius: 12px; padding: .6rem .7rem; font-size: .82rem; color: var(--muted); }
.cnt strong { display: block; font: 800 1.4rem/1.1 var(--display); margin-bottom: .15rem; }
.cnt-up strong { color: var(--foam); } .cnt-meh strong { color: var(--amber); } .cnt-down strong { color: var(--coral); }
.sum-agree { margin: 0 0 .4rem; font-weight: 700; }
.sum-agree:empty { display: none; }
.sheet-box .sub { margin: 1.1rem 0 .3rem; }
.song-list.compact li { padding: .6rem 0; grid-template-columns: 1.5rem 1fr 4.6rem; row-gap: .35rem; }
.song-list.compact .split { grid-column: 2 / -1; grid-row: 2; }
.song-list.compact .val { grid-row: 1; grid-column: 3; font-size: .85rem; }
.song-list.compact .who span { font-size: .85rem; }
.sum-actions { display: grid; gap: .6rem; margin-top: 1.2rem; }
.sum-actions .btn { width: 100%; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 1.05rem; }
@media (min-width: 721px) { .sheet { place-items: center; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: gateFade .25s ease-out both; }
  .sheet-box { animation: sheetUp .34s cubic-bezier(.2,.8,.2,1) both; }
  .sheet.closing { animation: gateFadeOut .26s ease-in both; }
  .sheet.closing .sheet-box { animation: sheetDown .26s ease-in both; }
}
.sum-actions { position: sticky; bottom: -1.2rem; background: #22123a; padding: .8rem 0 1.2rem; margin-bottom: -1.2rem; }
.song-list.compact li { column-gap: .7rem; }

/* Summary: small count chips and fun facts */
.sum-counts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.sum-counts .cnt { display: inline-flex; align-items: baseline; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; font-size: .85rem; }
.sum-counts .cnt strong { display: inline; font: 800 1rem var(--display); margin: 0; }
.facts-list { list-style: none; margin: 0 0 .2rem; padding: 0; display: grid; gap: .5rem; }
.facts-list li { background: #2b1745; border-radius: 12px; padding: .65rem .8rem; font-size: .95rem; line-height: 1.4; }
.facts-list li strong { color: var(--amber); }

/* Secondary buttons: never turn white, so the text always stays readable */
.btn:not(.primary) { background-image: none !important; }
@media (hover: hover) {
  .btn:not(.primary):hover, a.btn:not(.primary):hover { background-color: #3a2160 !important; color: var(--paper) !important; border-color: var(--paper) !important; }
}

/* Minimal summary: plain type, no boxes, no bars */
.sheet-box h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.sum-line { color: var(--paper); font-size: 1.05rem; line-height: 1.5; margin-bottom: 1.1rem; }
.sum-line strong { font-family: var(--display); font-weight: 800; }
.sum-line .n-up { color: var(--foam); } .sum-line .n-meh { color: var(--amber); } .sum-line .n-down { color: var(--coral); }
.sum-counts { display: none; }
.facts-list { gap: 0; margin: 0; }
.facts-list li { background: none; border-radius: 0; padding: .7rem 0; border-top: 1px solid #3a2160; font-size: .95rem; color: var(--muted); }
.facts-list li strong { color: var(--paper); font-weight: 700; }
.sheet-box .sub { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 1.2rem 0 .2rem; }
.sheet .song-list.compact li { grid-template-columns: 1.3rem 1fr auto; padding: .45rem 0; border-bottom: 0; row-gap: 0; }
.sheet .song-list.compact .split, .sheet .song-list.compact .val small { display: none; }
.sheet .song-list.compact .r { font-size: .95rem; color: var(--muted); }
.sheet .song-list.compact .who { flex-direction: row; flex-wrap: wrap; gap: 0 .45rem; align-items: baseline; }
.sheet .song-list.compact .who strong { font-size: .95rem; }
.sheet .song-list.compact .who span { font-size: .82rem; }
.sheet .song-list.compact .val { font-size: .9rem; color: var(--foam); }
.sheet .song-list.compact .who span { display: none; }
.sheet .song-list.compact li { padding: .35rem 0; }

/* ================= Compact home stats ================= */
.home section { margin: var(--s5) 0; }
.home h2 { margin-bottom: .4rem; }
.home h2::after { margin-top: .4rem; }
.stats-line { font-size: .9rem; margin-bottom: .6rem; }
.empty { color: var(--muted); margin: .4rem 0 0; }
[hidden] { display: none !important; }

.song-list.mini li {
  grid-template-columns: 1.4rem 1fr auto; column-gap: .75rem; row-gap: .35rem;
  padding: .6rem 0; border-bottom: 1px solid #2b1745;
}
.song-list.mini .r { font-size: .95rem; grid-row: 1; }
.song-list.mini .who { flex-direction: row; flex-wrap: wrap; gap: 0 .45rem; align-items: baseline; grid-row: 1; }
.song-list.mini .who strong { font-size: .98rem; }
.song-list.mini .who span { font-size: .82rem; }
.song-list.mini .split { grid-column: 2 / -1; grid-row: 2; height: 4px; border-radius: 2px; }
.song-list.mini .val { grid-row: 1; grid-column: 3; color: var(--foam); font-size: .95rem; }
.song-list.mini .val small { font-size: .72rem; }

.home-facts { margin-top: .2rem; }
.home-facts li { font-size: .92rem; padding: .55rem 0; }
.home-facts li strong { color: var(--muted); font-weight: 700; }
.home-facts li .t { color: var(--paper); font-weight: 700; }
.home .sub { margin: 1.4rem 0 .2rem; font-size: .85rem; color: var(--muted); }

.mood.mini li { grid-template-columns: minmax(0, 1fr) 36% 2.8rem; column-gap: .7rem; padding: .45rem 0; border-bottom: 0; row-gap: 0; }
.mood.mini .who { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mood.mini .split { grid-column: auto; grid-row: auto; height: 6px; border-radius: 3px; }
.mood.mini .val { font-size: .85rem; }
.home .legend { margin-top: .5rem; font-size: .75rem; }
@media (max-width: 720px) {
  .song-list.mini li { grid-template-columns: 1.2rem 1fr auto; }
  .mood.mini li { grid-template-columns: minmax(0, 1fr) 34% 2.6rem; }
}
@media (max-width: 720px) { .song-list.mini .val small { display: none; } .song-list.mini li { padding: .5rem 0; } }
