:root {
  color-scheme: dark;
  --background: #181a19;
  --surface: #222623;
  --raised: #2b302c;
  --foreground: #f0f0e9;
  --muted: #a7afa7;
  --accent: #b9ef85;
  --accent-hover: #c9f5a1;
  --ink: #1a2513;
  --line: #383e38;
  --warning: #e7c787;
  --error: #ffa89e;
  --overlay: #080b08c9;
  --groove: #373d35;
  --record: #191d19;
  --radius: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 100%;
  line-height: 1.5;
  background: var(--background);
  color: var(--foreground);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, textarea { font: inherit; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a { touch-action: manipulation; }
button, textarea, a { transition: color 160ms ease, background-color 160ms ease; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
svg { flex-shrink: 0; }
.shell { max-width: 1200px; margin-inline: auto; padding: 0 var(--space-7); }
.header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 112px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: var(--space-3); align-items: center; font-size: 24px; font-weight: 720; letter-spacing: -.8px; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; color: var(--accent); }
.brand-live { font-weight: 450; color: var(--muted); }
.connection { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--muted); font-size: 14px; }
.status-light { width: 7px; height: 7px; background: var(--muted); border-radius: 50%; flex-shrink: 0; }
.status-light.online { background: var(--accent); }
.status-light.reconnecting { background: var(--warning); }
.now-playing { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-7); padding-block: var(--space-8); border-bottom: 1px solid var(--line); align-items: center; }
.artwork { aspect-ratio: 1; background: var(--surface); position: relative; overflow: hidden; border-radius: var(--radius); }
.record { width: 100%; height: 100%; }
.record-edge { fill: var(--record); stroke: var(--groove); }
.record-grooves { stroke: var(--groove); stroke-width: 1; }
.record-label { fill: var(--accent); }
.record-logo { fill: var(--ink); }
.record-hole { fill: var(--record); }
.artwork-caption { position: absolute; bottom: 12px; left: 16px; color: var(--muted); font-size: 9px; letter-spacing: 2px; }
#cover-image { display: block; position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; }
.track-detail { min-width: 0; }
.playback-heading { display: flex; align-items: center; gap: var(--space-3); color: var(--muted); font-size: 14px; margin-bottom: var(--space-4); }
h1 { font-size: clamp(36px, 4.5vw, 64px); font-weight: 650; letter-spacing: -.055em; line-height: 1.08; overflow-wrap: anywhere; }
.artist { color: var(--muted); font-size: 23px; margin-top: var(--space-3); overflow-wrap: anywhere; line-height: 1.4; max-width: 580px; }
body[data-connection="offline"] .artist { font-size: 18px; max-width: 400px; }
.timeline { margin-top: var(--space-6); }
.progress { height: 4px; background: var(--line); overflow: hidden; }
.progress-fill { width: 0; height: 100%; background: var(--accent); }
.time-labels { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.remaining { margin-left: auto; }
.connection-notice { margin-top: var(--space-4); color: var(--warning); font-size: 14px; }
.equalizer { display: flex; align-items: center; gap: var(--space-1); height: 18px; }
.equalizer i { width: 3px; height: 14px; background: var(--accent); animation: pulse 900ms ease-in-out infinite alternate; transform-origin: center; }
.equalizer i:nth-child(2) { animation-delay: -300ms; height: 9px; }
.equalizer i:nth-child(3) { animation-delay: -600ms; height: 18px; }
.equalizer i:nth-child(4) { animation-delay: -150ms; height: 11px; }
.equalizer i:nth-child(5) { animation-delay: -450ms; height: 7px; }
@keyframes pulse { from { transform: scaleY(.4); } to { transform: scaleY(1); } }
.set-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-8); padding-top: var(--space-7); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.7px; font-weight: 620; }
.queue-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.queue { list-style: none; padding: 0; margin: 0; }
.queue-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding-block: var(--space-4); border-bottom: 1px solid var(--line); min-height: 82px; }
.queue-row:first-child { padding-top: 0; }
.queue-number { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue-row.next .queue-number, .queue-row.next .queue-time { color: var(--accent); }
.queue-title { font-size: 16px; font-weight: 550; overflow-wrap: anywhere; line-height: 1.4; }
.queue-artist { font-size: 13px; color: var(--muted); margin-top: var(--space-1); overflow-wrap: anywhere; }
.queue-time { text-align: right; white-space: nowrap; font-size: 15px; font-variant-numeric: tabular-nums; }
.queue-duration { display: block; font-size: 12px; color: var(--muted); margin-top: var(--space-1); }
.next-label { font-size: 11px; color: var(--accent); display: inline-block; margin-bottom: var(--space-1); }
.schedule-note { font-size: 12px; color: var(--muted); margin-top: var(--space-4); }
.empty-schedule { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-5) 0 var(--space-6); color: var(--muted); font-size: 14px; }
.empty-schedule svg { width: 24px; height: 24px; }
.empty-schedule p { max-width: 360px; }
.request-area { padding-left: var(--space-6); border-left: 1px solid var(--line); }
.request-icon { width: 32px; height: 32px; color: var(--accent); margin-bottom: var(--space-4); }
.request-area h2 { font-size: 26px; }
.request-area > p { font-size: 14px; color: var(--muted); margin-top: var(--space-3); }
.primary { display: flex; justify-content: center; align-items: center; gap: var(--space-2); width: 100%; min-height: 48px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--ink); font-size: 14px; font-weight: 650; padding: var(--space-3) var(--space-4); }
.primary:hover:enabled { background: var(--accent-hover); }
.primary:disabled { background: var(--raised); color: var(--muted); }
.primary svg { width: 18px; height: 18px; }
.request-trigger { margin-top: var(--space-5); }
.request-area .request-availability { font-size: 12px; line-height: 1.5; }
.set-end { color: var(--muted); font-size: 13px; padding-top: var(--space-5); }
footer { margin-top: var(--space-8); padding-block: var(--space-5); border-top: 1px solid var(--line); display: flex; gap: var(--space-5); align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
footer > :first-child { color: var(--foreground); font-weight: 600; }
.footer-dot { margin-inline: var(--space-1); }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 20; background: var(--accent); color: var(--ink); padding: 12px; }
.skip-link:focus { top: 16px; }
dialog { padding: var(--space-6); border: 0; border-radius: var(--radius); background: var(--surface); color: var(--foreground); width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: var(--overlay); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-5); gap: var(--space-4); }
.dialog-brand { color: var(--muted); font-size: 13px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--raised); color: var(--foreground); }
.icon-button svg { width: 20px; height: 20px; }
dialog h2 { font-size: 28px; }
#dialog-description { color: var(--muted); font-size: 14px; margin-top: var(--space-3); margin-bottom: var(--space-5); }
label { display: block; font-size: 14px; margin-bottom: var(--space-2); }
textarea { display: block; width: 100%; min-height: 112px; max-height: 240px; padding: var(--space-3); resize: vertical; border: 1px solid var(--muted); border-radius: var(--radius); background: var(--background); color: var(--foreground); font-size: 16px; line-height: 1.5; }
textarea::placeholder { color: var(--muted); }
.field-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: var(--space-2); margin-bottom: var(--space-5); }
.form-message { font-size: 14px; color: var(--accent); margin-bottom: var(--space-4); }
.form-message.error { color: var(--error); }
.dialog-note { font-size: 12px; color: var(--muted); margin-top: var(--space-3); text-align: center; }
.noscript { padding: 24px; color: var(--warning); }
.mobile-action { display: none; }
@media (max-width: 900px) {
  .shell { padding-inline: var(--space-6); }
  .now-playing { grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-6); padding-block: var(--space-7); }
  .set-layout { gap: var(--space-6); grid-template-columns: minmax(0, 1fr) 220px; }
  .request-area { padding-left: var(--space-5); }
  .artist { font-size: 20px; }
  h1 { font-size: 42px; }
}
@media (max-width: 640px) {
  .shell { padding-inline: var(--space-5); }
  .header { min-height: 88px; gap: var(--space-3); }
  .brand { font-size: 21px; gap: var(--space-2); }
  .brand-mark { width: 28px; height: 28px; }
  .connection { font-size: 12px; gap: var(--space-2); }
  .status-light { width: 6px; height: 6px; }
  .now-playing { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-5); padding-block: var(--space-6); }
  .artwork { width: min(100%, 300px); align-self: center; }
  .track-detail { width: 100%; }
  .playback-heading { font-size: 12px; margin-bottom: var(--space-3); justify-content: space-between; }
  h1 { font-size: clamp(36px, 10vw, 48px); line-height: 1.1; }
  .artist { font-size: 18px; margin-top: var(--space-2); }
  body[data-connection="offline"] .artist { font-size: 16px; }
  .timeline { margin-top: var(--space-5); }
  .time-labels { margin-top: var(--space-2); font-size: 12px; }
  .set-layout { display: flex; flex-direction: column; gap: var(--space-6); padding-top: var(--space-6); }
  .section-heading { margin-bottom: var(--space-5); gap: var(--space-3); }
  h2 { font-size: 22px; }
  .queue-count { font-size: 12px; }
  .queue-row { gap: var(--space-3); grid-template-columns: 20px minmax(0, 1fr) auto; }
  .queue-title { font-size: 15px; }
  .queue-time { font-size: 14px; }
  .empty-schedule { padding-top: 0; padding-bottom: var(--space-2); }
  .request-area { display: none; }
  .request-area h2 { font-size: 25px; }
  .request-area h2 br { display: none; }
  .request-icon { display: none; }
  .request-area > p { font-size: 14px; }
  .primary { min-height: 52px; font-size: 15px; }
  footer { margin-top: var(--space-6); padding-block: var(--space-5); font-size: 11px; gap: var(--space-3); margin-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  footer > :last-child { display: none; }
  dialog { padding: var(--space-5); }
  dialog h2 { font-size: 26px; }
  .mobile-action { display: flex; flex-direction: column; gap: var(--space-2); position: fixed; z-index: 5; inset-inline: 0; bottom: 0; padding: var(--space-4) var(--space-5) max(var(--space-4), env(safe-area-inset-bottom, 0px)); background: var(--surface); }
  .mobile-action > span { color: var(--muted); font-size: 11px; text-align: center; }
  .connection { max-width: 144px; }
}
@media (max-width: 360px) {
  .shell { padding-inline: var(--space-4); }
  .brand { font-size: 19px; }
  .connection { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
