/* Paper and s'chach green, with an esrog-yellow accent. */
:root {
  --paper: #f4efe3;
  --ink: #1b2a1f;
  --muted: #5d685c;
  --rule: #d8cfbb;
  --band: #1f3a27;
  --band-ink: #f4efe3;
  --band-muted: #a7b6a1;
  --band-rule: rgba(244, 239, 227, 0.18);
  --esrog: #e3c341;
  --esrog-hover: #eed25e;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1510;
    --ink: #ece6d6;
    --muted: #97a292;
    --rule: #26352a;
    --band: #172b1d;
    --band-muted: #93a58d;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0e1510;
  --ink: #ece6d6;
  --muted: #97a292;
  --rule: #26352a;
  --band: #172b1d;
  --band-muted: #93a58d;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.text-btn {
  border: 0; padding: 0; background: none; cursor: pointer;
  font: inherit; color: inherit;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* Masthead */

.masthead { padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: 28px; }

.topline {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; color: var(--muted);
}

.live { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #c0392b; }
.listeners::before { content: "·"; margin: 0 8px 0 2px; }

.wordmark {
  margin: 20px 0 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: min(24vw, 170px);
  line-height: 0.8;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tagline {
  margin: 18px 0 0;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.45;
}

/* Now playing */

.band {
  background: var(--band);
  color: var(--band-ink);
  padding: 30px 0 32px;
}

.now-label { margin: 0; font-size: 15px; color: var(--band-muted); }

.now-title {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 12vw, 76px);
  line-height: 0.92;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.now-artist { margin: 10px 0 0; font-size: 18px; color: var(--band-muted); min-height: 1.5em; }

.timeline { margin-top: 26px; }
.track { height: 3px; background: var(--band-rule); }
.bar { height: 100%; width: 0; background: var(--esrog); }
.times {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 14px; color: var(--band-muted); font-variant-numeric: tabular-nums;
}

.controls { display: flex; align-items: center; gap: 18px; margin-top: 22px; }

.play {
  flex: none; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--esrog); color: #1b2a1f;
  transition: background 0.15s ease, transform 0.1s ease;
}
.play:hover { background: var(--esrog-hover); }
.play:active { transform: scale(0.97); }
.play:disabled { opacity: 0.45; cursor: default; }
.play svg { width: 26px; height: 26px; fill: currentColor; }
.play .i-play { margin-left: 3px; }
.play .i-stop { display: none; }
.is-playing .play .i-play { display: none; }
.is-playing .play .i-stop { display: block; width: 22px; height: 22px; }

.control-text { flex: 1; min-width: 0; }
.status { display: block; font-weight: 600; }
.volume { display: block; margin-top: 6px; max-width: 220px; }

input[type="range"] {
  width: 100%; margin: 0; cursor: pointer; background: transparent;
  accent-color: var(--esrog);
}

/* Coming up */

.coming { padding-top: 34px; }
.coming h3 {
  margin: 0 0 6px;
  font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1;
  text-transform: uppercase;
}

.next { list-style: none; margin: 0; padding: 0; }
.next li {
  display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--rule);
}
.next time { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.next .t { font-weight: 600; overflow-wrap: anywhere; }
.next .a { color: var(--muted); font-size: 15px; }

/* Sync nudge */

.sync { margin-top: 30px; }
.sync summary {
  cursor: pointer; list-style: none; display: inline-block;
  font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.sync summary::-webkit-details-marker { display: none; }
.sync p { margin: 12px 0 0; max-width: 34em; color: var(--muted); font-size: 16px; }
.nudge {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; max-width: 420px;
  font-size: 15px; color: var(--muted);
}
.nudge input { accent-color: var(--ink); }
.nudge-meta { display: flex; gap: 14px; }

/* Footer */

.foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 18px; padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  font-size: 15px; color: var(--muted);
}
.made { display: inline-flex; align-items: center; gap: 6px; }
.made svg { width: 14px; height: 14px; fill: #c8102e; }

@media (min-width: 720px) {
  .masthead { padding-bottom: 40px; }
  .band { padding: 44px 0 46px; }
  .tagline { font-size: 20px; }
}
