@font-face {
  font-family: 'Plex';
  src: url(fonts/plex-sans.woff2) format('woff2');
  font-weight: 100 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --hue: 240;
  --bg: #eeefe9;
  --bg: oklch(0.957 0.013 var(--hue));
  --bg-2: oklch(0.925 0.018 var(--hue));
  --ink: oklch(0.2 0.014 var(--hue));
  --ink-2: oklch(0.43 0.014 var(--hue));
  --ink-3: oklch(0.58 0.012 var(--hue));
  --dot: oklch(0.2 0.014 var(--hue));
  --accent: oklch(0.575 0.195 31);
  --accent-press: oklch(0.52 0.19 31);
  --on-accent: #fff;
  --pad: 20px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.205 0.012 var(--hue));
    --bg-2: oklch(0.25 0.014 var(--hue));
    --ink: oklch(0.94 0.008 var(--hue));
    --ink-2: oklch(0.76 0.01 var(--hue));
    --ink-3: oklch(0.6 0.01 var(--hue));
    --dot: oklch(0.94 0.008 var(--hue));
    --accent: oklch(0.66 0.19 33);
    --accent-press: oklch(0.6 0.19 33);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  transition: background-color 2.8s var(--ease);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background: var(--bg);
  transition: background-color 2.8s var(--ease), color 2.8s var(--ease);
  font: 400 17px/1.45 'Plex', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

button { font: inherit; color: inherit; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.app {
  padding: 18px var(--pad) max(28px, env(safe-area-inset-bottom));
  max-width: 1360px;
  margin: 0 auto;
}

.top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.tagline { margin: 0; color: var(--ink-2); font-size: 15px; }

.stage { display: flex; flex-direction: column; }
.top__link { display: none; }

.stage { padding-top: clamp(28px, 6svh, 72px); }

.stage__head {
  --name-size: clamp(48px, 15vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(var(--name-size) * 0.96 * 2 + 30px);
}

.stage__num {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.stage__of { color: var(--ink-3); opacity: 0.7; }

.stage__name {
  margin: 0;
  font-weight: 300;
  font-stretch: 80%;
  font-size: var(--name-size);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
  hyphens: manual;
}

.stage__line {
  margin: 18px 0 0;
  max-width: 30ch;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.42;
  text-wrap: pretty;
  min-height: 2.84em;
}

.swap { animation: swap 0.9s var(--ease) both; }
@keyframes swap {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

.grille {
  display: block;
  width: 100%;
  height: 60px;
  margin: 22px 0 18px;
}

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

.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 152px;
  height: 56px;
  padding: 0 26px 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease);
  touch-action: manipulation;
}
.play:hover { background: var(--accent-press); }
.play:active { transform: scale(0.97); }
.play__icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.i-pause { display: none; }
[aria-pressed='true'] .i-play, .is-playing .i-play { display: none; }
[aria-pressed='true'] .i-pause, .is-playing .i-pause { display: inline; }
.play[aria-disabled='true'] { background: var(--bg-2); color: var(--ink-3); cursor: default; }

.volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 168px;
  min-width: 112px;
  color: var(--ink-2);
}
.volume__icon { width: 20px; height: 20px; flex: none; fill: currentColor; }
.volume__wave { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --fill: 80%;
  touch-action: pan-y;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--ink) var(--fill), color-mix(in oklch, var(--ink) 16%, transparent) var(--fill));
}
input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--ink) var(--fill), color-mix(in oklch, var(--ink) 16%, transparent) var(--fill));
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
}
input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.stage__where {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  min-height: 1.4em;
}
.stage__note { margin: 6px 0 0; font-size: 14px; color: var(--accent); }

.places { margin-top: 56px; }
.places ol { list-style: none; margin: 0; padding: 0; }

.place {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: baseline;
  width: 100%;
  padding: 11px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.place__num {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.place__name {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 400;
  font-stretch: 92%;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  transition: color 0.25s;
}
.place__mark {
  width: 9px;
  height: 9px;
  margin-left: 12px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.35s var(--ease);
  align-self: center;
}
.place:hover .place__name { color: var(--ink); }
.place[aria-current='true'] .place__name { color: var(--ink); font-weight: 500; }
.place[aria-current='true'] .place__mark { transform: scale(1); }
.is-playing .place[aria-current='true'] .place__mark { animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: 0.35; } }
.place[data-ready='false'] .place__name { color: var(--ink-3); }
.place__soon { font-size: 13px; color: var(--ink-3); margin-left: 8px; font-weight: 400; }

.foot { margin-top: 40px; padding-bottom: 72px; }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--ink-3) 45%, transparent);
  text-underline-offset: 3px;
}
.link:hover { color: var(--ink); }

.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 6px 6px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--bg-2) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translateY(140%);
  transition: transform 0.45s var(--ease), background-color 2.8s var(--ease);
}
.dock.is-shown { transform: none; }
.dock__play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
.dock__play svg { width: 18px; height: 18px; fill: currentColor; }
.dock__name {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.sheet {
  width: min(760px, 100%);
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
}
.sheet::backdrop { background: oklch(0.2 0.01 var(--hue) / 0.35); }
.sheet__head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: max(18px, env(safe-area-inset-top)) var(--pad) 14px;
  background: var(--bg);
}
.sheet h2 { margin: 0; font-size: 22px; font-weight: 500; font-stretch: 92%; letter-spacing: -0.01em; }
.sheet__body { padding: 8px var(--pad) 48px; font-size: 15px; }
.sheet__body h3 { margin: 30px 0 8px; font-size: 18px; font-weight: 500; }
.sheet__body p { margin: 6px 0; }
.sheet__body a { color: var(--ink); text-underline-offset: 3px; }
.src { margin: 14px 0 0; }
.src__title { font-weight: 500; }
.muted { color: var(--ink-2); }

@media (min-width: 900px) {
  :root { --pad: 48px; }
  .app {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(48px, 7vw, 120px);
    min-height: 100svh;
    padding-top: 36px;
  }
  .top { grid-column: 1 / -1; }
  .stage {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    padding: 48px 0;
  }
  .stage__head { --name-size: clamp(80px, 8.6vw, 140px); }
  .stage__line { font-size: 20px; margin-top: 24px; }
  .grille { height: 74px; max-width: 640px; margin: 32px 0 28px; }
  .places {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0;
  }
  .place { padding: 9px 0; }
  .place__name { font-size: 24px; }
  .foot { grid-column: 1 / -1; grid-row: 3; margin: 0; padding: 12px 0 0; }
  .dock { display: none; }
}

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

.stage__name .w { white-space: nowrap; }

.no-anim, .no-anim body, .no-anim * { transition: none !important; }
