:root {
  --cream: #EBEBEA;
  --ink: #141414;
  --periwinkle: #8A9AEC;
  --border: 1px solid var(--ink);
  --font-display: 'Anton', sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-meta: 'Space Mono', monospace;
  --font-mono: 'IBM Plex Mono', monospace;
  --pencil: rgb(20 20 20 / 48%);
  --staff-line-width: 1.2px;
  --ui-edge-offset: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body.has-open-detail-panel {
  overflow: hidden;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-meta);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body[data-onboarding="open"] {
  overflow: hidden;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(env(safe-area-inset-top, 0px) + 28px)
    calc(env(safe-area-inset-right, 0px) + 20px)
    calc(env(safe-area-inset-bottom, 0px) + 28px)
    calc(env(safe-area-inset-left, 0px) + 20px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.onboarding-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgb(255 255 255 / 0.34), transparent 30%),
    radial-gradient(circle at 80% 72%, rgb(255 255 255 / 0.18), transparent 28%),
    linear-gradient(180deg, rgb(235 235 234 / 0.8), rgb(235 235 234 / 0.88));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.onboarding-overlay__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(820px, 100%);
  min-height: 100%;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 56px);
}

.onboarding-overlay__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.onboarding-overlay__title {
  font-family: var(--font-serif);
  font-size: clamp(2.7rem, 6.5vw, 4.2rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.92;
}

.onboarding-overlay__copy {
  max-width: 36ch;
  margin-top: 52px;
  color: rgb(20 20 20 / 0.92);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.5;
  text-wrap: balance;
}

.onboarding-overlay__hint {
  max-width: 40ch;
  margin-top: 28px;
  color: rgb(20 20 20 / 0.42);
  font-family: var(--font-mono);
  font-size: clamp(0.74rem, 0.9vw, 0.86rem);
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.onboarding-overlay__button {
  min-width: 172px;
  min-height: 52px;
  margin-top: 38px;
  padding: 12px 22px;
  border: 1px solid rgb(20 20 20 / 0.88);
  background: rgb(20 20 20 / 0.96);
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.onboarding-overlay__button:hover,
.onboarding-overlay__button:focus-visible {
  background: rgb(34 34 34 / 0.98);
  border-color: rgb(20 20 20 / 1);
}

.onboarding-overlay__button:focus-visible {
  outline: none;
}

.made-by-sandra {
  margin: 24px 0 0;
  font-family: 'Oooh Baby', cursive;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1;
  text-align: center;
}

.made-by-sandra--legend {
  margin: 6px 0 0;
  padding: 8px 0 calc(env(safe-area-inset-bottom, 0px) + 4px);
  color: var(--ink);
  text-align: center;
}

.credit-link {
  text-decoration: none;
}

.credit-link-text {
  display: inline-block;
  background: linear-gradient(135deg, #433BC2 0%, #6C64E6 40%, #2A8EAF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  animation: credit-reveal 1250ms cubic-bezier(0.2, 0.8, 0.2, 1) 180ms forwards;
}

@keyframes credit-reveal {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }

  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

body[data-onboarding="closed"] .onboarding-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 900px) {
  .onboarding-overlay__inner {
    padding: 40px 18px 38px;
  }

  .onboarding-overlay__copy {
    max-width: 36ch;
    margin-top: 46px;
    font-size: clamp(1.2rem, 5.1vw, 1.6rem);
  }

  .onboarding-overlay__hint {
    max-width: 30ch;
    margin-top: 28px;
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .onboarding-overlay__button {
    min-width: 156px;
    min-height: 48px;
    margin-top: 36px;
    font-size: 0.8rem;
  }

  .onboarding-overlay__title {
    font-size: clamp(2.65rem, 10vw, 3.5rem);
  }

  .made-by-sandra {
    margin-top: 24px;
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .credit-link-text {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    animation: none;
  }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2vw;
  height: 50px;
  border-bottom: var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#audio-toggle {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.app-shell {
  position: fixed;
  inset: 0;
  z-index: 240;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 240ms ease, visibility 240ms ease;
}

body[data-onboarding="open"] .app-shell {
  opacity: 0;
  visibility: hidden;
}

.app-nav {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  border-bottom: 0;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--ui-edge-offset))
    calc(env(safe-area-inset-right, 0px) + var(--ui-edge-offset))
    0
    calc(env(safe-area-inset-left, 0px) + var(--ui-edge-offset));
  pointer-events: none;
}

.app-nav__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 24px;
}

.app-nav__title-wrap,
.app-nav__actions {
  min-width: 0;
}

.app-nav__title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  justify-self: start;
  gap: 10px;
  min-height: 38px;
  width: fit-content;
  padding: 10px 14px 11px;
  background: rgb(235 235 234 / 0.01);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 0;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.app-nav__title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
}

.app-nav__title-meta {
  color: rgb(20 20 20 / 56%);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-transform: uppercase;
}

.app-nav__actions {
  position: relative;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 82px;
  width: 188px;
  pointer-events: auto;
}

.app-nav__actions-row {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-columns: max-content;
  align-items: center;
  justify-content: end;
  width: auto;
}

.app-nav__actions-row:first-child {
  min-height: 38px;
}

.app-nav__actions-row--secondary {
  top: 44px;
  min-height: 20px;
  width: auto;
  grid-template-columns: max-content;
}

.nav-play-button,
.nav-text-button,
.nav-secondary-link,
.nav-view-toggle,
.nav-help-button {
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 8px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgb(20 20 20 / 18%);
  background: rgb(235 235 234 / 92%);
  backdrop-filter: blur(10px);
}

.nav-play-button {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-play-button__symbol {
  display: inline-flex;
  width: 1rem;
  min-width: 1rem;
  justify-content: center;
  align-items: center;
}

.nav-play-button__symbol i {
  font-size: 1rem;
  line-height: 1;
}

.nav-play-button__label {
  display: inline-flex;
}

.nav-text-button,
.nav-secondary-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.nav-text-button {
  position: absolute;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 3px 0;
}

.nav-text-button--replay {
  top: 0;
  color: rgb(20 20 20 / 58%);
}

#playback-back-to-explore {
  top: 34px;
}

.nav-text-button i {
  font-size: 0.92rem;
}

.nav-secondary-link {
  width: auto;
  padding: 0;
  color: rgb(20 20 20 / 68%);
  text-align: right;
  align-self: flex-end;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 18px;
  white-space: nowrap;
}

.nav-view-toggle {
  justify-self: center;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0;
  border: 1px solid rgb(20 20 20 / 18%);
  background: rgb(235 235 234 / 92%);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

#beat-nav {
  display: none !important;
}

.nav-view-toggle[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.nav-view-toggle__option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: rgb(20 20 20 / 56%);
  cursor: pointer;
}

.nav-view-toggle__option + .nav-view-toggle__option {
  border-left: 1px solid rgb(20 20 20 / 12%);
}

.nav-view-toggle__option[aria-pressed="true"] {
  background: rgb(20 20 20 / 6%);
  color: var(--ink);
}

.nav-view-toggle__icon,
.nav-view-toggle__label {
  display: inline-flex;
  align-items: center;
}

.nav-view-toggle__icon {
  font-size: 1rem;
}

.nav-view-toggle__label {
  font-family: var(--font-meta);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-help-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: rgb(20 20 20 / 78%);
  pointer-events: auto;
}

.nav-help-button--fab {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + var(--ui-edge-offset));
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--ui-edge-offset));
}

.nav-help-button__text {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav-help-button__bubble {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(20 20 20 / 24%);
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1;
}

.nav-help-button--mobile,
.mobile-bottom-bar {
  display: none;
}

.mobile-bottom-bar {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  left: calc(env(safe-area-inset-left, 0px) + 16px);
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.mobile-bottom-bar > * {
  pointer-events: auto;
}

body[data-app-mode="explore"] .nav-text-button--replay,
body[data-app-mode="explore"] #playback-back-to-explore,
body[data-app-mode="explore"] .nav-secondary-link,
body[data-app-mode="explore"] .nav-help-button--mobile,
body[data-app-mode="explore"] .mobile-bottom-bar,
body[data-app-mode="explore"] .nav-help-button--fab,
body[data-app-mode="explore"] .nav-play-button,
body[data-app-mode="explore"] .nav-view-toggle,
body[data-app-mode="narrative-running"] .nav-play-button,
body[data-app-mode="narrative-running"] .nav-secondary-link,
body[data-app-mode="narrative-running"] .nav-view-toggle,
body[data-app-mode="narrative-paused"] .nav-play-button,
body[data-app-mode="narrative-paused"] .nav-secondary-link,
body[data-app-mode="narrative-paused"] .nav-view-toggle,
body[data-app-mode="narrative-paused"] .nav-help-button--fab,
body[data-app-mode="narrative-ended"] .nav-text-button--replay,
body[data-app-mode="narrative-ended"] #playback-back-to-explore,
body[data-app-mode="narrative-ended"] .nav-view-toggle,
body[data-app-mode="narrative-ended"] .nav-help-button--fab {
  opacity: 1;
  visibility: visible;
}

body[data-app-mode="explore"] .nav-text-button--replay,
body[data-app-mode="explore"] #playback-back-to-explore,
body[data-app-mode="explore"] .nav-secondary-link,
body[data-app-mode="narrative-running"] .nav-text-button--replay,
body[data-app-mode="narrative-running"] #playback-back-to-explore,
body[data-app-mode="narrative-running"] .nav-view-toggle,
body[data-app-mode="narrative-running"] .nav-help-button--fab,
body[data-app-mode="narrative-running"] .mobile-bottom-bar,
body[data-app-mode="narrative-paused"] .nav-text-button--replay,
body[data-app-mode="narrative-paused"] #playback-back-to-explore,
body[data-app-mode="narrative-paused"] .nav-view-toggle,
body[data-app-mode="narrative-paused"] .mobile-bottom-bar,
body[data-app-mode="narrative-ended"] .nav-secondary-link,
body[data-app-mode="narrative-ended"] .mobile-bottom-bar,
body[data-app-mode="narrative-ended"] .nav-play-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body[data-app-mode="narrative-running"] .nav-play-button,
body[data-app-mode="narrative-running"] .nav-secondary-link,
body[data-app-mode="narrative-running"] .nav-view-toggle,
body[data-app-mode="narrative-paused"] .nav-play-button,
body[data-app-mode="narrative-paused"] .nav-secondary-link,
body[data-app-mode="narrative-paused"] .nav-view-toggle,
body[data-app-mode="explore"] .nav-play-button,
body[data-app-mode="explore"] .nav-view-toggle,
body[data-app-mode="explore"] .nav-help-button--fab,
body[data-app-mode="narrative-ended"] .nav-text-button--replay,
body[data-app-mode="narrative-ended"] #playback-back-to-explore,
body[data-app-mode="narrative-ended"] .nav-view-toggle,
body[data-app-mode="narrative-ended"] .nav-help-button--fab {
  transition: opacity 180ms ease, visibility 180ms ease;
}

.nav-help-button:hover,
.nav-help-button:focus-visible,
.nav-text-button:hover,
.nav-text-button:focus-visible,
.nav-secondary-link:hover,
.nav-secondary-link:focus-visible,
.nav-view-toggle:hover,
.nav-view-toggle:focus-visible,
.nav-play-button:hover,
.nav-play-button:focus-visible {
  color: var(--ink);
}

.nav-help-button:hover,
.nav-help-button:focus-visible {
  color: var(--ink);
}

.nav-help-button:hover .nav-help-button__bubble,
.nav-help-button:focus-visible .nav-help-button__bubble {
  border-color: rgb(20 20 20 / 56%);
}

.nav-help-button.is-pulsing {
  animation: legend-pulse 300ms ease;
}

@keyframes legend-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
  }
}

.legend-panel,
.concert-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 250;
  width: min(420px, 100vw);
  height: 100dvh;
  background: var(--cream);
  border-left: 1px solid rgb(20 20 20 / 16%);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overscroll-behavior: contain;
  pointer-events: none;
}

.legend-panel.is-open,
.concert-detail-panel.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.legend-panel {
  z-index: 255;
  width: min(600px, 100vw);
}

.legend-panel__inner,
.concert-detail-panel__inner {
  position: relative;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 20px 18px calc(40px + env(safe-area-inset-bottom, 0px));
}

.legend-panel__inner {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.legend-panel__close,
.concert-detail-panel__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.legend-panel__content,
.concert-detail-panel__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 18px;
}

.legend-panel__content {
  min-height: 100%;
  padding-top: 32px;
  overflow-x: hidden;
}

.legend-fragment {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
}

.legend-page-title {
  position: sticky;
  top: -32px;
  z-index: 2;
  margin: -32px -18px 28px;
  padding: 18px 72px;
  background: var(--cream);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.legend-page-title__heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 0.94;
  color: rgb(20 20 20 / 88%);
}

.legend-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 52px;
}

.legend-section--snapshot {
  margin-top: 34px;
}

.legend-section + .legend-section {
  padding-top: 44px;
  border-top: 1px solid rgb(20 20 20 / 10%);
}

.legend-section--companions {
  border-top: 0;
  margin-top: -8px;
  padding-top: 0;
}

.legend-section-label,
.legend-combined-title {
  color: rgb(20 20 20 / 58%);
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.legend-section-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.legend-section--snapshot .legend-section-content {
  align-items: stretch;
}

.legend-section.legend-section--snapshot {
  padding-top: 0;
  border-top: 0 !important;
}

.legend-stats-heading {
  color: rgb(20 20 20 / 88%);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.7vw, 2.7rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 0.94;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -32px -18px 24px;
  padding: 26px 56px 24px;
  border-top: 4px double rgb(20 20 20 / 24%);
}

.legend-figure {
  display: block;
  width: 100%;
  height: auto;
}

.legend-figure--staff {
  width: calc(100% + 20px);
  margin: 0 -10px;
}

.legend-annotation--mobile {
  display: none;
}

.legend-annotation-group--mobile {
  display: none;
}

.legend-body-copy,
.legend-note-label,
.legend-blob-initial,
.legend-blob-caption {
  color: rgb(20 20 20 / 62%);
  font-family: var(--font-mono);
}

.legend-body-copy {
  max-width: 44ch;
  font-size: 0.72rem;
  line-height: 1.8;
  text-align: center;
}

.legend-body-copy--link {
  margin-top: -4px;
}

.legend-inline-link {
  color: rgb(20 20 20 / 82%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.legend-inline-link:hover,
.legend-inline-link:focus-visible {
  color: var(--ink);
}

.legend-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.legend-stat-card {
  min-height: 100%;
  padding: 16px 16px 14px;
  border: 1px solid rgb(20 20 20 / 10%);
  border-radius: 16px;
  background: rgb(255 255 255 / 36%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-stat-card__label {
  color: rgb(20 20 20 / 56%);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.legend-stat-card__label--mono {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legend-stat-card__value,
.legend-stat-card__detail {
  margin: 0;
  color: rgb(20 20 20 / 72%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
}

.legend-stat-card__value {
  color: rgb(20 20 20 / 88%);
  font-size: 1rem;
  line-height: 1.2;
}

.legend-stat-card__detail strong {
  color: rgb(20 20 20 / 88%);
  font-weight: 500;
}

.legend-stat-card--scale,
.legend-stat-card--artists {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.legend-stat-card--artists {
  margin-top: 34px;
  margin-bottom: 18px;
  padding-top: 30px;
  border-top: 1px solid rgb(20 20 20 / 10%);
  border-bottom: 1px solid rgb(20 20 20 / 10%);
}

.legend-stat-card--combined {
  grid-column: 1 / -1;
  padding: 0;
  padding-top: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-top: 28px;
  margin-bottom: 18px;
}

.legend-artist-rankings {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legend-artist-rank {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgb(20 20 20 / 7%);
}

.legend-artist-rank:first-of-type {
  border-top: 0;
  padding-top: 2px;
}

.legend-artist-rank--second {
  padding-top: 12px;
}

.legend-artist-rank__place {
  font-size: 1.35rem;
  line-height: 1.2;
  transform: translateY(0.08em);
}

.legend-artist-rank__body {
  min-width: 0;
}

.legend-artist-rank__artists {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: baseline;
}

.legend-artist-rank__artists--inline {
  row-gap: 2px;
}

.legend-artist-rank__artist {
  color: rgb(20 20 20 / 88%);
  font-family: var(--font-serif);
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1.05;
}

.legend-artist-rank__artist--featured {
  font-style: normal;
  font-size: 1.24rem;
}

.legend-artist-rank__separator {
  color: rgb(20 20 20 / 36%);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0 0.42rem;
}

.legend-artist-rank__count {
  color: rgb(20 20 20 / 48%);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: nowrap;
}

.legend-scale-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.legend-scale-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.legend-scale-item__value {
  color: rgb(20 20 20 / 88%);
  font-family: var(--font-mono);
  font-size: clamp(1.82rem, 3.1vw, 2.45rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.legend-scale-item__label {
  color: rgb(20 20 20 / 50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.1;
  text-transform: uppercase;
}

.legend-stat-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-genre-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
}

.legend-genre-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.legend-genre-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(20 20 20 / 54%);
  font-size: 0.98rem;
  line-height: 1;
}

.legend-genre-item__icon .ph {
  display: inline-block;
  font-size: inherit;
  line-height: 1;
}

.legend-genre-item__text {
  color: rgb(20 20 20 / 72%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
}

.legend-stat-card__detail--flags {
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.legend-stats-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgb(20 20 20 / 10%);
  grid-column: 1 / -1;
  width: 100%;
}

.legend-stats-footer__line {
  margin: 0;
  color: rgb(20 20 20 / 58%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  text-align: center;
}

.legend-artist-runners-up {
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid rgb(20 20 20 / 7%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
}

.legend-artist-runners-up__marker,
.legend-artist-runners-up__text,
.legend-artist-runners-up__count {
  color: rgb(20 20 20 / 50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.7;
}

.legend-artist-runners-up__count {
  justify-self: end;
  white-space: nowrap;
}

.legend-blobs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 22px;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

.legend-blob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.legend-blob-item--overlap {
  align-items: stretch;
}

.legend-blob {
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.72;
  mix-blend-mode: multiply;
}

.legend-blob--me {
  width: 64px;
  height: 64px;
  background: #9BA8E8;
  filter: blur(16px);
}

.legend-blob--sm {
  width: 52px;
  height: 52px;
}

.legend-blob-initial,
.legend-note-label,
.legend-blob-caption {
  font-size: 0.68rem;
  line-height: 1.2;
}

.legend-blob-overlap-preview {
  position: relative;
  width: 98px;
  height: 72px;
  margin-bottom: 8px;
}

.legend-blob-overlap-preview .legend-blob:nth-child(1) {
  position: absolute;
  left: 0;
  top: 14px;
}

.legend-blob-overlap-preview .legend-blob:nth-child(2) {
  position: absolute;
  left: 18px;
  top: 4px;
}

.legend-blob-overlap-preview .legend-blob:nth-child(3) {
  position: absolute;
  left: 36px;
  top: 14px;
}

.legend-blob-caption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.legend-combined-row {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 36px;
  align-items: stretch;
  width: 100%;
}

.legend-combined-block {
  display: grid;
  grid-template-rows: auto 122px;
  gap: 18px;
  align-items: center;
}

.legend-combined-separator {
  width: 1px;
  background: rgb(20 20 20 / 10%);
}

.legend-stems-row {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: center;
  height: 122px;
}

.legend-stems-row--cost,
.legend-stems-row--type {
  align-self: end;
}

.legend-stem-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.legend-stem-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.legend-stem-line {
  width: 1.5px;
  background: var(--ink);
}

.legend-notehead,
.legend-notehead--hollow {
  width: 13px;
  height: 8px;
  border-radius: 55% 55% 45% 45% / 60% 60% 40% 40%;
  transform: rotate(-12deg);
}

.legend-notehead {
  background: var(--ink);
}

.legend-notehead--hollow {
  border: 1.5px solid var(--ink);
  background: transparent;
}

.concert-detail-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.concert-detail-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-right: 40px;
}

.concert-detail-band {
  font-family: var(--font-serif);
  font-size: clamp(1.98rem, 3.75vw, 2.85rem);
  font-weight: 600;
  line-height: 0.94;
}

.concert-detail-band--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.02em;
  line-height: 0.92;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.concert-detail-band-entry {
  display: block;
  white-space: nowrap;
}

.concert-detail-band-separator {
  white-space: nowrap;
}

.concert-detail-meta {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.concert-detail-heading--stacked {
  padding-right: 0;
}

.concert-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.concert-detail-pill,
.concert-detail-price {
  padding: 6px 10px;
  border: 1px solid rgb(20 20 20 / 18%);
  border-radius: 999px;
  font-family: var(--font-meta);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.concert-detail-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concert-detail-section-title {
  font-family: var(--font-meta);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.concert-detail-subsection-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.15;
}

.concert-detail-companions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.concert-detail-blob {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-meta);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.concert-detail-ticket {
  display: block;
  width: 100%;
  max-width: 100%;
  filter: drop-shadow(4px 4px 12px rgb(0 0 0 / 50%));
  transform: rotate(-2deg);
}

.concert-detail-ticket-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.concert-detail-ticket-grid .concert-detail-ticket:nth-child(even) {
  transform: rotate(1.5deg);
}

.concert-detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.concert-detail-photo-grid > :first-child:nth-last-child(1),
.concert-detail-photo-grid > :first-child:nth-last-child(3) {
  grid-column: 1 / -1;
}

.concert-detail-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgb(20 20 20 / 12%);
}

.concert-detail-photo.is-portrait {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: rgb(20 20 20 / 4%);
}

.concert-detail-photo--document {
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
  border: 0;
}

.concert-detail-photo--document.is-portrait,
.concert-detail-photo--document.is-landscape {
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

.concert-detail-photo-grid--other .concert-detail-photo {
  border: 0;
  filter: drop-shadow(8px 10px 12px rgb(0 0 0 / 24%));
}

.concert-detail-panel[data-concert-date="2024-10-24"] .concert-detail-section--other {
  margin-top: -110px;
  position: relative;
  z-index: 2;
}

.concert-detail-panel[data-concert-date="2024-10-24"] .concert-detail-section--other .concert-detail-photo-grid {
  grid-template-columns: 1fr;
  justify-items: end;
}

.concert-detail-panel[data-concert-date="2024-10-24"] .concert-detail-section--other .concert-detail-photo {
  width: 30%;
}

.concert-detail-panel[data-concert-date="2024-10-28"] .concert-detail-section--other .concert-detail-photo {
  width: 50%;
  justify-self: center;
}

.concert-detail-panel[data-concert-date="2025-04-05"] .concert-detail-section--other {
  margin-top: -44px;
  position: relative;
  z-index: 2;
}

.concert-detail-panel[data-concert-date="2025-04-05"] .concert-detail-section--other .concert-detail-photo-grid {
  grid-template-columns: 1fr;
}

.concert-detail-panel[data-concert-date="2025-04-05"] .concert-detail-section--other .concert-detail-photo {
  width: 38%;
  justify-self: center;
}

.concert-detail-panel[data-concert-date="2025-07-11"] .concert-detail-section--ticket .concert-detail-ticket {
  width: 62%;
  margin-left: auto;
  margin-right: auto;
}

.concert-detail-panel[data-concert-date="2024-11-23"] .concert-detail-section--ticket .concert-detail-ticket {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

.concert-detail-panel[data-concert-date="2017-04-15"] .concert-detail-section--ticket .concert-detail-ticket {
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}

.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other .concert-detail-photo-grid {
  grid-template-columns: 1fr;
  gap: 0;
  justify-items: center;
}

.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other {
  margin-top: -42px;
  position: relative;
  z-index: 2;
}

.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other .concert-detail-photo--1,
.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other .concert-detail-photo--3 {
  justify-self: center;
}

.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other .concert-detail-photo--1 {
  width: 44%;
  transform: rotate(-4deg);
  transform-origin: center;
  position: relative;
  z-index: 3;
}

.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other .concert-detail-photo--3 {
  width: 88%;
  margin-top: -18px;
  position: relative;
  z-index: 1;
}

.concert-detail-panel[data-concert-date="2025-07-18"] .concert-detail-section--other .concert-detail-photo--2 {
  width: 64%;
  margin-top: -12px;
  position: relative;
  z-index: 2;
}

.concert-detail-panel[data-concert-date="2025-07-19"] .concert-detail-section--other .concert-detail-photo {
  width: 42%;
  justify-self: center;
  filter: drop-shadow(8px 10px 12px rgb(0 0 0 / 24%));
  transform: rotate(3deg);
  transform-origin: center;
}

.concert-detail-panel[data-concert-date="2025-07-19"] .concert-detail-section--other {
  margin-top: -72px;
  position: relative;
  z-index: 2;
}

.concert-detail-panel[data-concert-date="2024-12-21"] .concert-detail-section--setlist .concert-detail-photo {
  width: 125%;
  max-width: none;
  justify-self: start;
}

.concert-detail-setlist {
  margin: 0;
  padding-left: 1.5rem;
  font-family: var(--font-meta);
  font-size: 0.68rem;
  line-height: 1.7;
}

.concert-detail-setlist-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.concert-detail-video {
  display: block;
  width: 100%;
  max-height: 70vh;
  border: 1px solid rgb(20 20 20 / 12%);
  background: rgb(20 20 20 / 8%);
  object-fit: contain;
}

.concert-detail-video.is-portrait {
  width: 100%;
}

.beat-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.beat-copy-layer,
.beat-annotation-layer {
  position: absolute;
  inset: 0;
}

.beat-drawing-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.beat2-blob {
  pointer-events: none;
}

.beat2-copy {
  pointer-events: none;
}

.beat2-label {
  fill: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  dominant-baseline: middle;
  text-anchor: middle;
  pointer-events: none;
}

.beat2-note {
  fill: #C84158;
  font-family: var(--font-hand);
  font-size: 34px;
  text-anchor: middle;
  pointer-events: none;
}

.beat-copy,
.beat-annotation {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 260px;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 240ms ease;
  font-family: var(--font-hand);
  font-weight: 500;
}

.beat-copy.is-visible,
.beat-annotation.is-visible {
  opacity: 1;
}

.beat-copy {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.2;
}

.beat-copy-hand {
  max-width: 560px;
  color: #C84158;
  font-family: var(--font-hand);
  font-size: 2.45rem;
  font-style: normal;
  font-weight: 500;
  line-height: 0.94;
  white-space: pre-line;
}

.beat-copy-long {
  max-width: 420px;
  line-height: 1.28;
}

.beat-copy-beat6 {
  color: #C84158;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-style: normal;
  font-weight: 500;
  text-transform: lowercase;
}

.beat-copy-beat8 {
  max-width: 520px;
  white-space: pre-line;
  text-align: left;
}

.beat-copy-beat10 {
  max-width: 300px;
  text-align: left;
}

.beat-copy-beat1-intro {
  text-align: center;
}

.beat-annotation {
  font-size: 1.02rem;
  line-height: 1.15;
  font-style: italic;
  font-weight: 500;
}

.beat-annotation-beat3 {
  color: #C84158;
  font-family: var(--font-hand);
  font-size: 4.25rem;
  font-style: normal;
}

.beat-annotation-pandemic-copy {
  color: #C84158;
  font-family: var(--font-hand);
  font-size: 2.8rem;
  font-style: normal;
  font-weight: 500;
}

.beat-annotation-beat5 {
  font-family: var(--font-hand);
  font-size: 2.9rem;
  color: #C84158;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.beat-annotation-month-tag {
  color: rgb(20 20 20 / 0.78);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: normal;
  white-space: nowrap;
}

.beat-annotation-gaslight {
  color: #C84158;
  font-family: var(--font-hand);
  font-size: 2.1rem;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.beat-drawing-group {
  opacity: 0;
  transition: opacity 240ms ease;
}

.beat-drawing-group.is-visible {
  opacity: 1;
}

.beat-drawing-path {
  fill: none;
  stroke: #C84158;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beat-drawing-label {
  fill: #C84158;
  font-family: var(--font-hand);
  font-size: 24px;
  font-weight: 500;
  pointer-events: none;
}

.beat-annotation--stacked {
  white-space: pre-line;
}

.beat-dots {
  position: fixed;
  top: 50%;
  right: calc(env(safe-area-inset-right, 0px) + var(--ui-edge-offset));
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
  pointer-events: none;
}

body[data-app-mode="explore"] .beat-dots,
body[data-app-mode="narrative-ended"] .beat-dots {
  opacity: 0;
  visibility: hidden;
}

body[data-app-mode="narrative-running"] .beat-dots,
body[data-app-mode="narrative-paused"] .beat-dots {
  opacity: 1;
  visibility: visible;
}

body.has-open-detail-panel .beat-dots {
  opacity: 0;
}

.beat-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid rgb(20 20 20 / 45%);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.beat-dot.is-active {
  background: var(--ink);
  border-color: var(--ink);
  transform: scale(1.28);
}

.beat-dot.is-paused-active {
  animation: paused-beat-pulse 1.6s ease-in-out infinite;
}

@keyframes paused-beat-pulse {
  0%,
  100% {
    transform: scale(1.15);
  }

  50% {
    transform: scale(1.28);
  }
}

.beat-nav {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  left: 50%;
  z-index: 45;
  display: flex;
  gap: 32px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.beat-nav button {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
}

.beat-nav button:hover,
.beat-nav button:focus-visible {
  opacity: 1;
}

.beat-nav button:disabled {
  opacity: 0.15;
  pointer-events: none;
}

#audio-toggle:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-links span {
  margin: 0 1vw;
  cursor: default;
  opacity: 0.6;
}

.slash {
  opacity: 0.3;
}

.grid-container {
  min-height: 100vh;
}

.main-stage {
  position: relative;
  min-height: 100vh;
  background: var(--cream);
  overflow: hidden;
}

#webgl-container {
  position: absolute;
  inset: 0;
}

#webgl-container {
  z-index: 1;
  cursor: crosshair;
}

#webgl-container canvas {
  display: block;
}

.data-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4vw;
  padding: 4vw;
  background: var(--ink);
  color: var(--cream);
}

.data-block {
  padding-top: 1.5rem;
  border-top: 1px solid rgb(230 228 221 / 20%);
}

.data-block-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 1rem;
}

.data-number {
  margin-right: 1.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.data-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-desc {
  max-width: 80%;
  font-size: 0.8rem;
  line-height: 1.6;
  opacity: 0.8;
}

.label-city {
  padding: 2px 6px;
  margin-top: -15px;
  border: 1px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-meta);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  animation: fade-in 1s forwards 2s;
}

.label-month {
  color: rgb(20 20 20 / 42%);
  background: transparent;
  border: 0;
  font-family: var(--font-meta);
  font-size: 0.48rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  animation: fade-in 1s forwards 2s;
}

.score-tooltip {
  position: fixed;
  z-index: 30;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid rgb(20 20 20 / 22%);
  background: rgb(235 235 234 / 96%);
  box-shadow: 0 8px 18px rgb(20 20 20 / 8%);
  color: var(--ink);
  font-family: var(--font-meta);
  font-size: 0.68rem;
  line-height: 1.45;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.score-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.score-tooltip-band {
  margin-bottom: 0.35rem;
  font-weight: 700;
  text-transform: uppercase;
}

.score-tooltip-meta + .score-tooltip-meta {
  margin-top: 0.22rem;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .data-section {
    grid-template-columns: 1fr;
  }

  .data-desc {
    max-width: none;
  }

  .legend-panel__inner,
  .concert-detail-panel__inner {
    padding: 22px 18px 34px;
  }
}

@media (max-width: 720px) {
  body,
  html {
    overflow-x: hidden;
  }

  .main-stage {
    min-height: 100dvh;
  }

  #webgl-container {
    top: -72px;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .app-nav {
    padding:
      calc(env(safe-area-inset-top, 0px) + 16px)
      calc(env(safe-area-inset-right, 0px) + 16px)
      0
      calc(env(safe-area-inset-left, 0px) + 16px);
  }

  .app-nav__bar {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0;
    align-items: start;
  }

  .app-nav__actions {
    width: auto;
    min-width: 108px;
  }

  .app-nav__title-wrap {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    width: fit-content;
    padding: 8px 11px;
    border: 0;
  }

  .app-nav__title {
    font-size: 24px;
    letter-spacing: 0;
  }

  .app-nav__title-meta {
    font-size: 0.54rem;
    letter-spacing: 0.06em;
  }

  .nav-view-toggle--mobile,
  .nav-help-button--mobile,
  .mobile-bottom-bar {
    display: inline-flex;
  }

   .nav-view-toggle {
    display: none;
  }

  .nav-view-toggle--mobile {
    display: inline-grid;
  }

  .nav-play-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.66rem;
    border: 0;
    background: rgb(235 235 234 / 72%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .nav-secondary-link {
    font-size: 0.8rem;
  }

  .nav-secondary-link,
  #playback-back-to-explore {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    padding: 8px 12px;
    border: 0;
    background: rgb(235 235 234 / 72%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(-50%);
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .nav-text-button,
  .nav-secondary-link {
    justify-content: flex-end;
  }

  .nav-secondary-link,
  #playback-back-to-explore {
    justify-content: center;
  }

  #playback-back-to-explore {
    top: auto;
  }

  .app-nav__actions-row {
    grid-template-columns: auto;
  }

  body[data-app-mode="explore"] .mobile-bottom-bar {
    display: flex;
  }

  body[data-app-mode="narrative-running"] .mobile-bottom-bar,
  body[data-app-mode="narrative-paused"] .mobile-bottom-bar,
  body[data-app-mode="narrative-ended"] .mobile-bottom-bar {
    display: none;
  }

  .nav-help-button--fab {
    display: none !important;
  }

  .legend-page-title {
    top: -32px;
    margin: -32px -18px 10px;
    padding: 16px 64px 16px 18px;
    gap: 6px;
  }

  .legend-page-title__heading {
    font-size: 2rem;
  }

  .legend-section {
    margin-bottom: 42px;
    gap: 18px;
  }

  .legend-section:first-of-type {
    margin-top: -6px;
    gap: 26px;
  }

  .legend-section--snapshot {
    margin-top: 24px;
  }

  .legend-section + .legend-section {
    padding-top: 34px;
  }

  .legend-figure--staff {
    width: calc(100% + 156px) !important;
    max-width: none;
    margin: 0 -78px;
    overflow: visible;
  }

  .legend-annotation--desktop {
    display: none;
  }

  .legend-annotation--mobile {
    display: block;
    font-size: 18px;
  }

  .legend-annotation-group--desktop {
    display: none;
  }

  .legend-annotation-group--mobile {
    display: block;
  }

  .legend-body-copy {
    font-size: 0.68rem;
    line-height: 1.7;
  }

  .legend-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .legend-section--snapshot {
    padding-top: 0;
  }

  .legend-panel__inner {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .legend-stats-heading {
    font-size: 1.72rem;
    margin: -32px -18px 20px;
    padding: 22px 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .legend-section-label {
    font-size: 1.12rem;
  }

  .legend-section:first-of-type > .legend-section-label {
    font-size: 1.72rem !important;
    line-height: 0.96;
  }

  .legend-stat-card {
    padding: 14px 14px 12px;
    border-radius: 0;
    gap: 6px;
  }

  .legend-stat-card__value {
    font-size: 0.94rem;
  }

  .legend-stat-card__detail {
    font-size: 0.68rem;
    line-height: 1.65;
  }

  .legend-scale-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .legend-scale-item__value {
    font-size: 1.5rem;
  }

  .legend-scale-item__label {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
  }

  .legend-stat-card--scale,
  .legend-stat-card--artists,
  .legend-stat-card--combined {
    grid-column: 1;
  }

  .legend-stat-card--artists {
    margin-top: 28px;
    margin-bottom: 14px;
    padding-top: 24px;
  }

  .legend-stat-card--combined {
    margin-top: 24px;
    padding-top: 24px;
    margin-bottom: 16px;
  }

  .legend-artist-rank {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
  }

  .legend-artist-rank__count {
    grid-column: 3;
    justify-self: end;
  }

  .legend-artist-rank__artist {
    font-size: 1.22rem;
  }

  .legend-artist-rank__artist--featured {
    font-size: 1.22rem;
  }

  .legend-artist-rankings {
    padding-top: 14px;
  }

  .legend-artist-rank__separator {
    margin: 0 0.3rem;
  }

  .legend-artist-runners-up__marker,
  .legend-artist-runners-up__text,
  .legend-artist-runners-up__count {
    font-size: 0.58rem;
  }

  .legend-artist-runners-up__count {
    grid-column: 3;
    justify-self: end;
  }

  .legend-artist-runners-up__text {
    white-space: nowrap;
  }

  .legend-genre-item__icon {
    font-size: 0.92rem;
  }

  .legend-genre-item__text {
    font-size: 0.8rem;
  }

  .legend-stat-card__detail--flags {
    font-size: 0.84rem;
  }

  .legend-stat-copy .legend-stat-card__detail {
    font-size: 0.8rem;
  }

  .legend-artist-rank,
  .legend-artist-runners-up,
  .legend-stats-footer {
    border-radius: 0;
  }

  .legend-blobs-grid {
    gap: 18px 16px;
  }

  .legend-combined-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .legend-combined-separator {
    display: block;
    width: 100%;
    height: 1px;
  }

  .legend-stats-footer {
    margin-top: 22px;
  }

  .made-by-sandra--legend {
    padding-top: 8px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 2px);
  }

  .beat-copy,
  .beat-annotation {
    max-width: 82vw;
  }

  .beat-copy-hand {
    max-width: 92vw;
    font-size: 1.42rem;
    line-height: 1.04;
    width: 92vw;
    text-align: center;
    white-space: normal;
  }

  .beat-copy-beat1-intro {
    width: min(76vw, calc(100vw - 112px));
    max-width: calc(100vw - 112px);
    font-size: 1.22rem;
    line-height: 1.08;
  }

  .beat-copy-beat5 {
    white-space: pre-line;
    text-align: left;
  }

  .beat-copy-beat8 {
    max-width: 72vw;
    white-space: pre-line;
    text-align: left;
  }

  .beat-copy-beat6 {
    max-width: none;
    font-size: 1.08rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .beat-annotation-pandemic-copy {
    max-width: none;
    font-size: 1.28rem;
    line-height: 1.08;
    white-space: nowrap;
    text-transform: lowercase;
  }

  .beat-annotation-beat5 {
    max-width: 84vw;
    font-size: 1.32rem;
    line-height: 1.08;
    white-space: nowrap;
    text-align: left;
  }

  .beat-annotation-gaslight {
    max-width: 84vw;
    font-size: 1.28rem;
    line-height: 1.05;
    white-space: normal;
    text-transform: lowercase;
  }

  .beat-annotation-month-tag {
    font-size: 0.92rem;
  }

  .beat-drawing-label {
    font-size: 18px;
  }

  .beat2-label {
    font-size: 12px;
  }

  .beat-dots {
    right: calc(env(safe-area-inset-right, 0px) + 16px);
    gap: 10px;
  }

  .beat-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .legend-panel,
  .concert-detail-panel {
    width: 100vw;
    height: 72dvh;
    top: auto;
    bottom: 0;
    border-top: 1px solid rgb(20 20 20 / 16%);
    border-left: 0;
    box-shadow: 0 -18px 40px rgb(20 20 20 / 12%);
    transform: translateY(100%);
  }

  .legend-panel.is-open,
  .concert-detail-panel.is-open {
    overflow-y: auto;
    touch-action: pan-y;
    transform: translateY(0);
  }

  .legend-panel__inner,
  .concert-detail-panel__inner {
    height: 72dvh;
    max-height: 72dvh;
    padding: 0 0 calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .legend-panel__content,
  .concert-detail-panel__content {
    gap: 16px;
    padding: 0 18px 24px;
  }

  .legend-panel__content {
    padding-top: 0;
    padding-left: 16px;
    padding-right: 16px;
  }

  .concert-detail-header {
    position: sticky;
    top: 0;
    z-index: 2;
    gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 56px 16px 18px;
    margin: 0 -18px 10px;
    background: var(--cream);
    border-bottom: 1px solid rgb(20 20 20 / 12%);
  }

  .concert-detail-heading {
    padding-right: 0;
  }

  .concert-detail-band {
    font-size: 1.58rem;
    line-height: 0.9;
  }

  .concert-detail-band:not(.concert-detail-band--stacked) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .concert-detail-meta {
    font-size: 0.58rem;
    line-height: 1.55;
  }

  .concert-detail-row {
    gap: 8px;
  }

  .concert-detail-pill,
  .concert-detail-price {
    font-size: 0.58rem;
  }

  .legend-panel__close,
  .concert-detail-panel__close {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: auto;
    z-index: 4;
    margin-left: auto;
    margin-right: 12px;
    margin-bottom: -44px;
    display: block;
    width: fit-content;
  }

  .mobile-bottom-bar {
    left: calc(env(safe-area-inset-left, 0px) + 16px);
    right: calc(env(safe-area-inset-right, 0px) + 16px);
    justify-content: space-between;
    gap: 16px;
  }

  .mobile-bottom-bar .nav-view-toggle {
    display: inline-grid;
  }

  .mobile-bottom-bar .nav-view-toggle__option {
    min-height: 34px;
    padding: 7px 10px;
    gap: 0;
  }

  .mobile-bottom-bar .nav-view-toggle__label {
    display: none;
  }

  .mobile-bottom-bar .nav-view-toggle__icon {
    font-size: 1.08rem;
  }

  .nav-help-button--mobile {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(20 20 20 / 24%);
    border-radius: 999px;
    background: var(--cream);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1;
  }

  body.has-open-detail-panel .beat-nav {
    display: none;
  }

  body.has-open-detail-panel #webgl-container {
    pointer-events: none;
  }
}
