:root {
  --cream: #fff3dc;
  --paper: #fffaf0;
  --ink: #1d1033;
  --ink-soft: #5b4a78;
  --tomato: #ff5a36;
  --sun: #ffc933;
  --bubble: #ff8fc7;
  --mint: #36d6a0;
  --sky: #5b86ff;
  --line: var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 26px;
  --display: "Rubik", "Arial Black", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #1a0f2e;
    --paper: #261745;
    --ink: #fff3dc;
    --ink-soft: #c9b9e8;
    --line: #fff3dc;
    --shadow: 5px 5px 0 #000;
    --shadow-sm: 3px 3px 0 #000;
  }
}
:root[data-theme="dark"] {
  --cream: #1a0f2e; --paper: #261745; --ink: #fff3dc; --ink-soft: #c9b9e8; --line: #fff3dc;
  --shadow: 5px 5px 0 #000; --shadow-sm: 3px 3px 0 #000;
}

* { box-sizing: border-box; margin: 0; }
html { color-scheme: light dark; scroll-behavior: smooth; }
body {
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.55;
  color: var(--ink); background: var(--cream); min-height: 100vh; overflow-x: hidden;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1.4px, transparent 1.6px);
  background-size: 26px 26px;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; border-radius: 10px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); line-height: 1; letter-spacing: -.035em; font-weight: 900; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.35rem; letter-spacing: -.04em; }
.logo svg { width: 46px; height: 46px; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover svg { transform: rotate(20deg) scale(1.08); }
.logo small { display: block; font-family: var(--hand); font-size: 1.15rem; font-weight: 700; color: var(--tomato); letter-spacing: 0; margin-top: -4px; }
.nav-r { display: flex; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border: 3px solid var(--line); border-radius: 999px; background: var(--paper);
  font-weight: 800; font-size: .95rem; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.pill:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.pill:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.pill svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 28px 0 56px; position: relative; }
.onair {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 3px solid var(--line);
  border-radius: 999px; background: var(--sun); color: #1d1033; font-weight: 900; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase; box-shadow: var(--shadow-sm); transform: rotate(-2deg);
}
.onair i { width: 12px; height: 12px; border-radius: 50%; background: var(--tomato); border: 2px solid #1d1033; animation: blink 1.2s steps(2) infinite; }
.hero h1 { font-size: clamp(3rem, 8.2vw, 6.6rem); margin: 22px 0 18px; }
.hero h1 .w { display: inline-block; }
.hero h1 .hl { position: relative; z-index: 0; color: #1d1033; padding: 0 .12em; margin-left: -.06em; }
.hero h1 .hl::before {
  content: ""; position: absolute; inset: 8% 0 0; z-index: -1; background: var(--bubble);
  border: 3px solid var(--line); border-radius: .22em; transform: rotate(-2.5deg); box-shadow: var(--shadow-sm);
}
.hero h1 .scribble { font-family: var(--hand); font-weight: 700; font-size: .5em; color: var(--tomato); letter-spacing: 0; display: inline-block; transform: rotate(-6deg) translateY(-.4em); }
.lead { font-size: 1.2rem; max-width: 34ch; color: var(--ink-soft); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; align-items: center; }
.big-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 30px;
  border: 3px solid var(--line); border-radius: 20px; background: var(--tomato); color: #fff;
  font-family: var(--display); font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  text-shadow: 2px 2px 0 rgba(29, 16, 51, .35);
}
.big-btn:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ink); }
.big-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.big-btn svg { width: 24px; height: 24px; fill: currentColor; }
.stat-sticker {
  font-family: var(--hand); font-size: 1.6rem; font-weight: 700; line-height: 1; transform: rotate(3deg);
  border-bottom: 4px wavy var(--mint); text-decoration: underline wavy var(--mint); text-underline-offset: 6px; text-decoration-thickness: 3px;
}
.stat-sticker b { font-family: var(--display); font-size: 1.5rem; font-weight: 900; }

/* floating doodles */
.doodle { position: absolute; pointer-events: none; z-index: 0; }
.d1 { top: 2%; right: 48%; width: 54px; animation: bob 4s ease-in-out infinite; }
.d2 { bottom: 4%; left: 42%; width: 46px; animation: bob 5s ease-in-out -2s infinite; }
.d3 { top: -2%; right: 2%; width: 64px; animation: spin 14s linear infinite; }

/* ---------- boombox player ---------- */
.box {
  position: relative; z-index: 1; background: var(--paper); border: 4px solid var(--line); border-radius: 34px;
  box-shadow: 10px 10px 0 var(--ink); padding: 22px; transform: rotate(1.2deg);
  transition: transform .4s cubic-bezier(.3, 1.4, .5, 1);
}
.box:hover { transform: rotate(0); }
.box::before { /* handle */
  content: ""; position: absolute; top: -34px; left: 50%; width: 46%; height: 34px; translate: -50% 0;
  border: 4px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; background: transparent;
}
.screen {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px;
  background: #1d1033; color: var(--mint); border: 3px solid var(--line); border-radius: 14px;
  font-family: "Rubik", monospace; font-weight: 800; letter-spacing: .08em; font-size: .9rem; text-transform: uppercase;
}
.screen .freq { color: var(--sun); font-variant-numeric: tabular-nums; }
.deck { display: grid; grid-template-columns: 1fr; place-items: center; padding: 26px 0 8px; }
.disc-stage { position: relative; width: min(100%, 300px); aspect-ratio: 1; }
.disc {
  position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--line);
  background:
    radial-gradient(circle, transparent 0 22%, rgba(255, 255, 255, .06) 22.5% 23%, transparent 23.5%),
    repeating-radial-gradient(circle, #1d1033 0 3px, #2c1a4d 3px 5px);
  display: grid; place-items: center; box-shadow: var(--shadow);
  animation: spin 7s linear infinite; animation-play-state: paused;
}
.playing .disc { animation-play-state: running; }
.cover {
  width: 46%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--line);
  background: var(--bubble) center / cover; position: relative;
}
.cover::after { content: ""; position: absolute; inset: 50%; width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%; background: var(--cream); border: 3px solid var(--line); }
.badge-live {
  position: absolute; right: -8px; top: -8px; z-index: 2; background: var(--mint); color: #1d1033; border: 3px solid var(--line);
  border-radius: 14px; padding: 4px 12px; font-family: var(--display); font-weight: 900; font-size: .8rem;
  transform: rotate(8deg); box-shadow: var(--shadow-sm); display: none;
}
.badge-live.on { display: block; }
.now { text-align: center; padding: 18px 8px 4px; min-height: 92px; }
.now .t { font-family: var(--display); font-weight: 900; font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.now .a { color: var(--ink-soft); font-weight: 800; margin-top: 4px; }
.bar { height: 16px; border: 3px solid var(--line); border-radius: 999px; background: var(--cream); overflow: hidden; margin: 14px 4px 6px; }
.bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--tomato) 0 10px, var(--sun) 10px 20px); border-right: 3px solid var(--line); transition: width 1s linear; }
.eq { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 44px; margin: 8px 0; }
.eq i { flex: 1; max-width: 12px; height: 18%; border-radius: 6px 6px 2px 2px; background: var(--c, var(--mint)); border: 2px solid var(--line); transform-origin: bottom; animation: eq 1s ease-in-out infinite; animation-play-state: paused; }
.playing .eq i { animation-play-state: running; }
.ctrl { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.play {
  flex: none; width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--line); background: var(--sun);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, background .2s;
}
.play:hover { transform: translate(-2px, -2px) scale(1.04); box-shadow: 5px 5px 0 var(--ink); }
.play:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.play svg { width: 34px; height: 34px; fill: #1d1033; }
.play .i-pause, .playing .play .i-play { display: none; }
.playing .play .i-pause { display: block; }
.playing .play { background: var(--mint); }
.vol { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.vol svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border: 3px solid var(--line); border-radius: 999px; background: var(--cream); cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bubble); border: 3px solid var(--line); box-shadow: 2px 2px 0 var(--ink); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--bubble); border: 3px solid var(--line); }
.ears { text-align: center; font-family: var(--hand); font-weight: 700; font-size: 1.35rem; color: var(--ink-soft); margin-top: 10px; }
.ears b { font-family: var(--display); color: var(--ink); }

/* ---------- ticker ---------- */
.ticker { background: var(--ink); color: var(--cream); border-block: 4px solid var(--line); overflow: hidden; transform: rotate(-1deg); margin: 20px -2vw; padding: 14px 0; }
.ticker div { display: flex; width: max-content; gap: 44px; animation: marquee 40s linear infinite; font-family: var(--display); font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.ticker span { display: inline-flex; align-items: center; gap: 14px; }
.ticker span::before { content: "★"; color: var(--sun); }
.ticker span:nth-child(3n)::before { color: var(--bubble); }
.ticker span:nth-child(3n+1)::before { color: var(--mint); }
.ticker:hover div { animation-play-state: paused; }

/* ---------- lists ---------- */
.grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; padding: 56px 0 30px; align-items: start; }
.panel { background: var(--paper); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.panel.next { background: var(--bubble); color: #1d1033; transform: rotate(-1deg); }
.panel h2 { font-size: 1.7rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.panel h2 .tag { font-family: var(--hand); font-size: 1.4rem; font-weight: 700; color: var(--tomato); transform: rotate(-4deg); }
.panel.next h2 .tag { color: #1d1033; }
.tracks { list-style: none; padding: 0; display: grid; gap: 12px; }
.panel.hist .tracks { grid-template-columns: repeat(2, 1fr); }
.tracks li {
  display: flex; align-items: center; gap: 12px; padding: 10px; border: 3px solid var(--line); border-radius: 18px;
  background: var(--cream); color: var(--ink); transition: transform .15s;
}
.panel.next .tracks li { background: var(--paper); }
.tracks li:hover { transform: translateY(-3px) rotate(-.8deg); }
.tracks img, .tracks .ph { width: 56px; height: 56px; flex: none; border-radius: 12px; border: 3px solid var(--line); object-fit: cover; background: var(--sun); }
.tracks b { display: block; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.tracks span { color: var(--ink-soft); font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.tracks .empty { color: var(--ink-soft); font-weight: 700; padding: 8px; background: transparent; border-style: dashed; }

/* ---------- tune-in ---------- */
.tune { padding: 30px 0 64px; }
.tune-card {
  background: var(--sky); color: #fff; border: 4px solid var(--line); border-radius: 34px; box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(24px, 5vw, 48px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden;
}
.tune-card h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); text-shadow: 3px 3px 0 #1d1033; }
.tune-card p { margin-top: 12px; font-weight: 700; max-width: 40ch; }
.url-box { display: flex; gap: 10px; align-items: stretch; background: var(--paper); color: var(--ink); border: 3px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-sm); }
.url-box code { flex: 1; min-width: 0; padding: 8px 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.url-box button { border: 3px solid var(--line); border-radius: 12px; background: var(--sun); color: #1d1033; font-weight: 900; padding: 8px 16px; min-height: 44px; box-shadow: 2px 2px 0 var(--ink); transition: transform .12s; }
.url-box button:active { transform: translate(2px, 2px); box-shadow: none; }
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-weight: 800; font-size: .9rem; }
.apps span { padding: 5px 12px; border: 3px solid var(--line); border-radius: 999px; background: #1d1033; color: #fff3dc; }

footer { text-align: center; padding: 10px 0 44px; font-weight: 800; color: var(--ink-soft); }
footer b { color: var(--tomato); }

/* ---------- confetti ---------- */
.conf { position: fixed; z-index: 100; width: 14px; height: 14px; border: 2px solid #1d1033; pointer-events: none; animation: pop 900ms cubic-bezier(.2, .8, .3, 1) forwards; }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-14px) rotate(8deg); } }
@keyframes blink { 50% { background: transparent; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes pop { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-bottom: 40px; }
  .grid, .tune-card { grid-template-columns: 1fr; }
  .d1, .d2 { display: none; }
  .box { transform: none; }
}
@media (max-width: 520px) {
  .panel.hist .tracks { grid-template-columns: 1fr; }
  .logo small { display: none; }
  .pill span { display: none; }
  .pill { padding: 8px 14px; }
  .big-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ticker div { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---------- song requests ---------- */
.pill.ghost { background: transparent; box-shadow: none; }
.pill.ghost:hover { background: var(--paper); }
.request { padding: 30px 0; scroll-margin-top: 20px; }
.req-card { background: var(--mint); color: #1d1033; border: 4px solid var(--line); border-radius: 34px; box-shadow: 10px 10px 0 var(--ink); padding: clamp(22px, 4vw, 40px); transform: rotate(.6deg); }
.req-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.req-head p { margin-top: 10px; font-weight: 800; max-width: 46ch; }
.req-search { display: flex; gap: 10px; margin-top: 22px; }
.req-search input { flex: 1; min-width: 0; min-height: 52px; padding: 10px 18px; font: inherit; font-weight: 800; color: var(--ink); background: var(--paper); border: 3px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.req-search input::placeholder { color: var(--ink-soft); }
.req-search .go { background: var(--sun); color: #1d1033; cursor: pointer; }
.req-msg { min-height: 1.6em; margin: 14px 4px 4px; font-weight: 900; }
.req-msg.bad { color: #8a1500; }
.req-list { grid-template-columns: repeat(2, 1fr); }
.req-list li { background: var(--paper); }
.rq { flex: none; margin-left: auto; min-height: 44px; padding: 8px 16px; border: 3px solid var(--line); border-radius: 12px; background: var(--tomato); color: #fff; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); text-shadow: 1px 1px 0 rgba(29,16,51,.4); transition: transform .12s; }
.rq:active { transform: translate(2px, 2px); box-shadow: none; }
.rq:disabled { background: var(--sun); color: #1d1033; text-shadow: none; cursor: default; }
@media (max-width: 900px) { .req-list { grid-template-columns: 1fr; } .req-card { transform: none; } }
@media (max-width: 520px) { .req-search { flex-direction: column; } }

/* mobile overflow fixes */
.hero > *, .tune-card > *, .grid > *, .req-card > * { min-width: 0; }
.tune-card { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.url-box code { overflow-x: auto; text-overflow: clip; -webkit-overflow-scrolling: touch; user-select: all; scrollbar-width: thin; }
@media (max-width: 900px) { .tune-card { grid-template-columns: minmax(0, 1fr); } .tune-card p { max-width: none; } }
@media (max-width: 520px) { .url-box { flex-direction: column; } .url-box code { padding: 10px; } .url-box button { width: 100%; } .tune-card { overflow: hidden; } }
