:root { --h: 204; --h2: 262; --ink: #eef1fb; --dim: rgba(238, 241, 251, .56); --line: rgba(255, 255, 255, .1); --glass: rgba(255, 255, 255, .06);
  --acc: hsl(var(--h) 85% 70%); --W: min(78vw, 42dvh, 440px); }
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; background: #05060d; color: var(--ink);
  font: 15px/1.4 "Segoe UI Variable Text", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; user-select: none; -webkit-user-select: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* two soft lights behind everything, in the colours of the sounds in the mix */
#glow { position: fixed; inset: -20%; transition: background 1.2s;
  background: radial-gradient(42% 36% at 28% 30%, hsl(var(--h) 80% 42% / .34), transparent 70%), radial-gradient(46% 40% at 74% 76%, hsl(var(--h2) 80% 40% / .3), transparent 70%); }
#app { position: fixed; inset: 0; height: 100dvh; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.brand svg, .brand b { color: var(--acc); transition: color .6s; }
.brand b { font-size: 24px; line-height: 1; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--glass);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; backdrop-filter: blur(12px); }
.pill:hover { background: rgba(255, 255, 255, .12); }
#savedN { color: var(--acc); font-variant-numeric: tabular-nums; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: 6px 20px; gap: 8px; }
#info { text-align: center; width: 100%; max-width: 640px; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--acc); transition: color .6s; }
#num { display: block; margin: 0 auto; font-family: "Segoe UI Variable Display", "SF Pro Display", system-ui, sans-serif; font-weight: 200; line-height: 1.05;
  font-size: clamp(40px, 11vmin, 104px); letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-shadow: 0 0 60px hsl(var(--h) 90% 60% / .55); white-space: nowrap; }
#num.long { font-size: clamp(26px, 6.500vmin, 64px); }
#numIn { display: block; margin: 0 auto; width: min(100%, 9ch); background: none; border: 0; border-bottom: 1px solid var(--acc); outline: none; text-align: center;
  font-family: "Segoe UI Variable Display", "SF Pro Display", system-ui, sans-serif; font-weight: 200; font-size: clamp(40px, 11vmin, 104px); line-height: 1.05; user-select: text; -webkit-user-select: text; }
h1 { font-size: clamp(20px, 3.800vmin, 34px); font-weight: 600; letter-spacing: -.01em; margin-top: 2px; text-wrap: balance; }
#sub { color: var(--dim); margin-top: 2px; font-size: clamp(13px, 1.900vmin, 16px); text-wrap: balance; min-height: 1.4em; }
#parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; min-height: 32px; }
#parts button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--glass);
  border: 1px solid var(--line); font-size: 12px; font-weight: 600; transition: opacity .2s; }
#parts button i { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--c) 85% 68%); box-shadow: 0 0 8px hsl(var(--c) 85% 68%); }
#parts button u { width: 26px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, hsl(var(--c) 85% 68%) var(--v), rgba(255, 255, 255, .16) var(--v)); }
#parts button.off { opacity: .38; text-decoration: line-through; }
.onair { margin-top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.onair.live { color: var(--acc); }
.onair.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 8px;
  box-shadow: 0 0 10px currentColor; animation: pulse 2.400s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* the wheel */
#spin { display: grid; place-items: center; }
#wheel { position: relative; width: var(--W); height: var(--W); border-radius: 50%; touch-action: none; cursor: grab; outline: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .02) 0 44%, rgba(255, 255, 255, .07) 45% 100%);
  box-shadow: 0 0 0 1px var(--line), 0 0 90px hsl(var(--h) 90% 55% / .28), inset 0 0 50px rgba(0, 0, 0, .5); transition: box-shadow 1s; }
#wheel:active { cursor: grabbing; }
#ring { position: absolute; inset: 0; border-radius: 50%; will-change: transform;
  background:
    repeating-conic-gradient(from -0.6deg, rgba(255, 255, 255, .85) 0 1.2deg, transparent 1.2deg 30deg),
    repeating-conic-gradient(from -0.3deg, rgba(255, 255, 255, .3) 0 .6deg, transparent .6deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 0 calc(var(--W) * .385), #000 calc(var(--W) * .39) calc(var(--W) * .47), transparent calc(var(--W) * .475));
  mask: radial-gradient(circle, transparent 0 calc(var(--W) * .385), #000 calc(var(--W) * .39) calc(var(--W) * .47), transparent calc(var(--W) * .475)); }
#ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from -4deg, hsl(var(--h) 90% 70% / .9) 0 8deg, transparent 8deg 120deg); }
.notch { position: absolute; left: 50%; top: -7px; width: 0; height: 0; transform: translateX(-50%); border: 9px solid transparent; border-top: 14px solid var(--acc);
  filter: drop-shadow(0 0 8px var(--acc)); transition: border-color .6s; }
#play { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #05060d; box-shadow: 0 0 60px hsl(var(--h) 90% 60% / .55); transition: transform .15s, box-shadow 1s; }
#play:active { transform: translate(-50%, -50%) scale(.95); }
#play .i-pause, #play.on .i-play { display: none; }
#play.on .i-pause { display: block; }

footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 20px 18px; }
.tool { height: 48px; min-width: 48px; padding: 0 13px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--glass); border: 1px solid var(--line); font-size: 13px; font-weight: 600; transition: transform .15s, background .2s; }
.tool:hover { background: rgba(255, 255, 255, .13); }
.tool:active { transform: scale(.95); }
.tool.wide { padding: 0 18px; background: var(--acc); color: #05060d; border-color: transparent; transition: background .6s, transform .15s; }
.tool.on { color: var(--acc); border-color: var(--acc); }
#save.on svg path { fill: currentColor; }
#timerLabel:empty { display: none; }
#timerLabel { font-variant-numeric: tabular-nums; }
#vol { width: 120px; accent-color: var(--acc); }
@media (pointer: coarse) { #vol { display: none; } }

#sheet { position: fixed; inset: 0; background: rgba(3, 4, 10, .6); backdrop-filter: blur(6px); display: grid; place-items: end center; z-index: 5; }
.card { width: min(100%, 520px); max-height: 70dvh; display: flex; flex-direction: column; background: #0d1020; border: 1px solid var(--line); border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; font-size: 16px; }
.head button { width: 36px; height: 36px; border-radius: 50%; background: var(--glass); }
#savedList { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
#savedList .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); text-align: left; }
#savedList .row.on { border-color: var(--acc); }
#savedList .go { flex: 1; min-width: 0; text-align: left; }
#savedList .go b { display: block; font-size: 12px; color: var(--acc); font-variant-numeric: tabular-nums; }
#savedList .go span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#savedList .go small { display: block; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#savedList .del { width: 32px; height: 32px; border-radius: 50%; color: var(--dim); }
#savedList p { color: var(--dim); padding: 14px 6px; }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); padding: 9px 16px; border-radius: 999px; background: rgba(20, 24, 44, .94);
  border: 1px solid var(--line); font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 6; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* wide screens: the wheel on the left, the station on the right */
@media (min-aspect-ratio: 11/10) {
  :root { --W: min(40vw, 62dvh, 520px); }
  main { flex-direction: row-reverse; justify-content: center; gap: 6vw; }
  #info { text-align: left; width: auto; flex: 0 1 520px; }
  #num, #numIn { margin: 0; text-align: left; }
  #parts { justify-content: flex-start; }
}
@media (max-height: 620px) and (max-aspect-ratio: 11/10) { :root { --W: min(64vw, 36dvh); } .onair { margin-top: 8px; } #parts { margin-top: 8px; } }
