:root {
  /* Warm, skin-tone inspired light palette */
  --bg: #f3e4d4;
  --bg-deep: #e8d4c0;
  --surface: #fffaf6;
  --text: #3a2f28;
  --muted: #8b7568;
  --ring: #e0cfc0;
  --accent: #c67b5c;
  --accent-hover: #b56a4b;

  --dot-idle: #8b7d72;
  --dot-active: #c67b5c;
  --dot-correct: #2d8a5e;
  --dot-wrong: #c94c4c;

  --genre-pop: #4a7fd4;
  --genre-rap: #d85a5a;
  --genre-rock: #7b5fd4;
  --genre-latin: #d4922a;
  --genre-rnb: #d4569a;
  --genre-edm: #2a9d6f;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

html {
  color-scheme: light;
  font-family: var(--font-sans);
}

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

title {
  font-size: 2rem;
  font-weight: 650;
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 55%, #edd9c8 100%);
  color: var(--text);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  max-width: none;
  margin: 0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__content {
  display: none;
}

.site-credits-group {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.site-credits {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}


.site-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 250, 246, 0.72);
  border: 1px solid var(--ring);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fffaf6;
  background: var(--accent);
  border-color: var(--accent);
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 0.98;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

main {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 max(3rem, 12vw) 1.5rem;
}

.genre-guess h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.section-note {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.genre-guess__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .genre-guess__layout {
    grid-template-columns: 1fr;
  }
}

/* --- Feature fingerprint (left) --- */

.feature-card {
  --fingerprint-accent: var(--accent);
  align-self: start;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 250, 246, 0.72);
  border: 1px solid var(--ring);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(58, 47, 40, 0.05);
}

.feature-card[data-genre="pop"] { --fingerprint-accent: var(--genre-pop); }
.feature-card[data-genre="rap"] { --fingerprint-accent: var(--genre-rap); }
.feature-card[data-genre="rock"] { --fingerprint-accent: var(--genre-rock); }
.feature-card[data-genre="latin"] { --fingerprint-accent: var(--genre-latin); }
.feature-card[data-genre="r&b"] { --fingerprint-accent: var(--genre-rnb); }
.feature-card[data-genre="edm"] { --fingerprint-accent: var(--genre-edm); }

.feature-card__header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ring);
}

.feature-card h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.feature-card__status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-bars {
  display: grid;
  gap: 0.85rem;
}

.feature-bar {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(7rem, 1fr) 3.75rem;
  gap: 0.75rem;
  align-items: center;
}

.feature-bar__label,
.feature-bar__value {
  font-size: 0.83rem;
}

.feature-bar__label {
  color: var(--text);
  font-weight: 600;
}

.feature-bar__value {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.feature-bar__meter {
  position: relative;
  height: 0.62rem;
  overflow: hidden;
  background: rgba(139, 117, 104, 0.14);
  border-radius: 999px;
}

.feature-bar__meter::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--value);
  min-width: 0.28rem;
  background: var(--fingerprint-accent);
  border-radius: inherit;
  transition: width 0.25s ease, background 0.2s ease;
}

.feature-summary {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ring);
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

@media (max-width: 520px) {
  .feature-bar {
    grid-template-columns: 1fr 3.5rem;
    gap: 0.35rem 0.75rem;
  }

  .feature-bar__meter {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* --- Guess panel (right) --- */

.guess-panel {
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 24px rgba(58, 47, 40, 0.06);
}

.label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.guess-panel__now-playing h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.spotify-embed-wrap {
  position: relative;
  margin: 0 0 1.25rem;
}

.spotify-embed-wrap .label {
  margin-bottom: 0.35rem;
}

.spotify-embed {
  position: relative;
  width: 100%;
  min-height: 80px;
  max-height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(58, 47, 40, 0.05);
  border: 1px solid var(--ring);
}

.spotify-embed iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: 12px;
}

.spotify-embed__frame {
  width: 100%;
  height: 80px;
}

.spotify-embed__mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255, 250, 246, 0.78);
  backdrop-filter: blur(14px) saturate(0.75);
  -webkit-backdrop-filter: blur(14px) saturate(0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spotify-embed__mask::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(58, 47, 40, 0.08) 0 1px,
      transparent 1px 9px
    );
  opacity: 0.35;
}

.spotify-embed.is-concealed .spotify-embed__mask {
  opacity: 1;
  pointer-events: auto;
}

.spotify-play-btn {
  position: absolute;
  top: calc(50% + 0.65rem);
  left: 50%;
  z-index: 3;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  color: var(--surface);
  background: #b9731d;
  border: 2px solid rgba(255, 250, 246, 0);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(58, 47, 40, 0.18);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.spotify-play-btn:hover:not(:disabled) {
  background: #18a94c;
  transform: translate(-50%, -50%) scale(1.04);
}

.spotify-play-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.spotify-embed:not(.is-concealed) + .spotify-play-btn {
  display: none;
}

.spotify-play-btn__icon {
  width: 0;
  height: 0;
  margin-left: 0.22rem;
  border-top: 0.72rem solid transparent;
  border-bottom: 0.72rem solid transparent;
  border-left: 1.05rem solid currentColor;
}

.spotify-play-btn.is-playing .spotify-play-btn__icon {
  width: 1rem;
  height: 1.35rem;
  margin-left: 0;
  border: 0;
  border-left: 0.34rem solid currentColor;
  border-right: 0.34rem solid currentColor;
}

.guess-panel__controls {
  margin-bottom: 1rem;
}

.genre-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.genre-btn {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--ring);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.genre-btn:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 2px 8px rgba(58, 47, 40, 0.08);
}

.genre-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.genre-btn[data-genre="pop"] { border-color: var(--genre-pop); }
.genre-btn[data-genre="rap"] { border-color: var(--genre-rap); }
.genre-btn[data-genre="rock"] { border-color: var(--genre-rock); }
.genre-btn[data-genre="latin"] { border-color: var(--genre-latin); }
.genre-btn[data-genre="r&b"] { border-color: var(--genre-rnb); }
.genre-btn[data-genre="edm"] { border-color: var(--genre-edm); }

.guess-panel__reveal {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ring);
}

.guess-panel__reveal[hidden] {
  display: none;
}

.reveal-result {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.reveal-result.is-correct {
  color: var(--dot-correct);
}

.reveal-result.is-wrong {
  color: var(--dot-wrong);
}

.reveal-details {
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.reveal-details dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.reveal-details dd {
  margin: 0;
  font-size: 0.95rem;
}

.reveal-explanation {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.btn-next {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fffaf6;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-next:hover {
  background: var(--accent-hover);
}

.progress-text {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Game summary --- */

.game-summary {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(58, 47, 40, 0.06);
}

.game-summary[hidden] {
  display: none;
}

.game-summary h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.game-summary__lede {
  margin: 0 0 1rem;
  color: var(--muted);
}

.game-summary__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.game-summary__stat {
  padding: 0.85rem;
  background: rgba(243, 228, 212, 0.55);
  border: 1px solid var(--ring);
  border-radius: 8px;
}

.game-summary__stat span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-summary__stat strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.25rem;
}

.game-summary__list {
  display: grid;
  gap: 0.65rem;
}

.game-summary__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--ring);
  border-left: 4px solid var(--dot-wrong);
  border-radius: 8px;
}

.game-summary__item.is-correct {
  border-left-color: var(--dot-correct);
}

.game-summary__badge {
  min-width: 4.25rem;
  padding: 0.25rem 0.45rem;
  color: #fffaf6;
  background: var(--dot-wrong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-summary__item.is-correct .game-summary__badge {
  background: var(--dot-correct);
}

.game-summary__item h3 {
  margin: 0;
  font-size: 0.95rem;
}

.game-summary__item p {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.game-summary__item dl {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.75rem;
  margin: 0;
}

.game-summary__item dt {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-summary__item dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 700px) {
  .game-summary__stats,
  .game-summary__item,
  .game-summary__item dl {
    grid-template-columns: 1fr;
  }
}

/* --- Genre explorer --- */

.genre-explorer {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--ring);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(58, 47, 40, 0.06);
}

.genre-explorer__header {
  max-width: 48rem;
  margin-bottom: 1rem;
}

.genre-explorer h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.genre-explorer__header p:last-child {
  margin: 0;
  color: var(--muted);
}

.genre-explorer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.55fr);
  gap: 1rem;
  align-items: stretch;
}

.genre-explorer__chart-panel,
.genre-profile {
  min-width: 0;
  padding: 1rem;
  background: rgba(243, 228, 212, 0.35);
  border: 1px solid var(--ring);
  border-radius: 8px;
}

.explorer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.explorer-tab {
  padding: 0.42rem 0.7rem;
  color: var(--text);
  background: rgba(255, 250, 246, 0.78);
  border: 1px solid var(--ring);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.explorer-tab:hover,
.explorer-tab.is-active {
  color: #fffaf6;
  background: var(--accent);
  border-color: var(--accent);
}

.explorer-chart-wrap {
  position: relative;
  min-height: 320px;
}

.explorer-chart {
  display: block;
  width: 100%;
  height: auto;
}

.explorer-chart .x-axis path,
.explorer-chart .y-axis path {
  display: none;
}

.explorer-chart .x-axis line {
  stroke: rgba(139, 117, 104, 0.25);
}

.explorer-chart .x-axis text,
.explorer-chart .y-axis text {
  fill: var(--muted);
  font-size: 0.76rem;
}

.explorer-chart .y-axis text {
  fill: var(--text);
  font-weight: 700;
}

.explorer-row rect {
  opacity: 0.78;
}

.explorer-row.is-selected rect,
.explorer-row:hover rect {
  opacity: 1;
  filter: drop-shadow(0 4px 7px rgba(58, 47, 40, 0.16));
}

.explorer-value {
  fill: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.explorer-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 8rem;
  padding: 0.55rem 0.65rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(58, 47, 40, 0.14);
  pointer-events: none;
}

.explorer-tooltip strong,
.explorer-tooltip span,
.explorer-tooltip small {
  display: block;
}

.explorer-tooltip span {
  margin-top: 0.1rem;
  font-weight: 700;
}

.explorer-tooltip small {
  margin-top: 0.1rem;
  color: var(--muted);
}

.explorer-help {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--ring);
  font-size: 0.88rem;
  line-height: 1.45;
}

.explorer-feature-desc {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--ring);
  background: rgba(58, 47, 40, 0.04);
  border-radius: 10px;
}

.explorer-feature-desc__text {
  margin: 0.3rem 0 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
}

.genre-profile {
  --profile-accent: var(--accent);
}

.genre-profile[data-genre="pop"] { --profile-accent: var(--genre-pop); }
.genre-profile[data-genre="rap"] { --profile-accent: var(--genre-rap); }
.genre-profile[data-genre="rock"] { --profile-accent: var(--genre-rock); }
.genre-profile[data-genre="latin"] { --profile-accent: var(--genre-latin); }
.genre-profile[data-genre="r&b"] { --profile-accent: var(--genre-rnb); }
.genre-profile[data-genre="edm"] { --profile-accent: var(--genre-edm); }

.genre-profile h3 {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.25rem;
}

.genre-profile__meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.genre-profile__bars {
  display: grid;
  gap: 0.55rem;
}

.genre-profile__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.genre-profile__bar span,
.genre-profile__bar strong {
  font-size: 0.78rem;
}

.genre-profile__bar i {
  grid-column: 1 / -1;
  position: relative;
  height: 0.42rem;
  overflow: hidden;
  background: rgba(139, 117, 104, 0.14);
  border-radius: 999px;
}

.genre-profile__bar i::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--value);
  min-width: 0.25rem;
  background: var(--profile-accent);
  border-radius: inherit;
}

.genre-profile__bar strong {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.genre-profile__note {
  margin: 0.85rem 0 0;
  padding-top: 0.7rem;
  color: var(--muted);
  border-top: 1px solid var(--ring);
  font-size: 0.88rem;
  font-style: italic;
}

.genre-radar-svg {
  width: 100%;
  max-width: 220px;
  display: block;
  margin: 0.5rem auto 0;
  overflow: visible;
}

.genre-radar-label {
  font-size: 8.5px;
  font-weight: 700;
  fill: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 860px) {
  .genre-explorer__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .genre-explorer {
    padding: 1rem;
  }

}

/* --- Popularity explorer --- */

.performance-explorer {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--ring);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(58, 47, 40, 0.06);
}

.performance-explorer__header {
  max-width: 52rem;
  margin-bottom: 1rem;
}

.performance-explorer h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.performance-explorer__header p:last-child,
.performance-note p {
  margin: 0;
  color: var(--muted);
}

.performance-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.performance-step,
.performance-feature-tab,
.performance-genre-filter {
  padding: 0.45rem 0.75rem;
  color: var(--text);
  background: rgba(255, 250, 246, 0.78);
  border: 1px solid var(--ring);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.performance-step:hover,
.performance-step.is-active,
.performance-feature-tab:hover,
.performance-feature-tab.is-active {
  color: #fffaf6;
  background: var(--accent);
  border-color: var(--accent);
}

.performance-genre-filter {
  border-color: var(--filter-color, var(--ring));
}

.performance-genre-filter.is-active {
  color: #fffaf6;
  background: var(--filter-color, var(--accent));
  border-color: var(--filter-color, var(--accent));
}

.performance-explorer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 0.6fr);
  gap: 1rem;
  align-items: stretch;
}

.performance-chart-panel,
.performance-note {
  min-width: 0;
  padding: 1rem;
  background: rgba(243, 228, 212, 0.35);
  border: 1px solid var(--ring);
  border-radius: 8px;
}

.performance-controls {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.performance-feature-tabs,
.performance-genre-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.performance-feature-tabs[hidden],
.performance-genre-filters[hidden] {
  display: none;
}

.performance-chart-wrap {
  position: relative;
  min-height: 390px;
}

.performance-chart {
  display: block;
  width: 100%;
  height: auto;
}

.performance-chart .x-axis path,
.performance-chart .y-axis path {
  display: none;
}

.performance-chart .x-axis line,
.performance-chart .y-axis line,
.performance-grid line {
  stroke: rgba(139, 117, 104, 0.2);
}

.performance-grid path {
  display: none;
}

.performance-chart .x-axis text,
.performance-chart .y-axis text,
.axis-label {
  fill: var(--muted);
  font-size: 0.76rem;
}

.performance-chart .y-axis text {
  fill: var(--text);
  font-weight: 700;
}

.performance-chart circle {
  stroke: rgba(255, 250, 246, 0.7);
  stroke-width: 1;
}

.artist-row rect {
  opacity: 0.78;
}

.artist-row:hover rect {
  opacity: 1;
  filter: drop-shadow(0 4px 7px rgba(58, 47, 40, 0.16));
}

.artist-value {
  fill: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.performance-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 15rem;
  padding: 0.55rem 0.65rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(58, 47, 40, 0.14);
  pointer-events: none;
}

.performance-tooltip strong,
.performance-tooltip span,
.performance-tooltip small {
  display: block;
}

.performance-tooltip span {
  margin-top: 0.1rem;
  font-weight: 700;
}

.performance-tooltip small {
  margin-top: 0.12rem;
  color: var(--muted);
}

.performance-note h3 {
  margin: 0.1rem 0 0.45rem;
  font-size: 1.2rem;
}

.performance-note__stats {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.performance-note__stats div {
  padding: 0.75rem;
  background: rgba(255, 250, 246, 0.58);
  border: 1px solid var(--ring);
  border-radius: 8px;
}

.performance-note__stats span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.performance-note__stats strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.12rem;
}

@media (max-width: 860px) {
  .performance-explorer__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .performance-explorer {
    padding: 1rem;
  }
}

/* --- Artist journey --- */

.artist-journey {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--ring);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(58, 47, 40, 0.06);
}

.artist-journey__header {
  max-width: 52rem;
  margin-bottom: 1.5rem;
}

.artist-journey h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.artist-journey__header p:last-child {
  margin: 0;
  color: var(--muted);
}

/* pick + chart stack */

.artist-journey__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.journey-story {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 14rem;
  min-width: 0;
}

.journey-story[hidden] {
  display: none !important;
}

/* journey placeholder */

.journey-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 260px;
  padding: 2rem 1.5rem;
  border: 1.5px dashed var(--ring);
  border-radius: 10px;
  background: rgba(243, 228, 212, 0.18);
}

.journey-placeholder[hidden] {
  display: none !important;
}

.journey-placeholder__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  max-width: 28rem;
  text-align: center;
}

.journey-placeholder__icon {
  font-size: 2.2rem;
  opacity: 0.35;
  line-height: 1;
}

.journey-placeholder__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
}

.journey-placeholder__desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.journey-placeholder__hints {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  width: 100%;
  max-width: 18rem;
  margin-top: 0.35rem;
}

.journey-placeholder__hint {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.journey-placeholder__hint-bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0.3;
  flex-shrink: 0;
}

.journey-placeholder__hint-label {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.journey-placeholder__years {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  opacity: 0.65;
}

/* pick panel */

.journey-pick-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0 2rem;
  flex-shrink: 0;
}

.journey-pick-panel.is-compact {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem 0.55rem;
  padding: 0.5rem 0 0.65rem;
}

.journey-pick-panel.is-compact .journey-pick-prompt {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.8rem;
  text-align: left;
}

.journey-pick-panel.is-compact .artist-picker {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.journey-pick-panel.is-compact .artist-pick-btn {
  padding: 0.38rem 0.72rem;
  font-size: 0.8rem;
  border-width: 1px;
}

.journey-pick-panel.is-compact .btn-journey-start {
  flex-shrink: 0;
  padding: 0.42rem 0.9rem;
  font-size: 0.82rem;
}

.journey-pick-prompt {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.artist-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.artist-pick-btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 250, 246, 0.78);
  border: 2px solid var(--ring);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.artist-pick-btn:hover,
.artist-pick-btn.is-active {
  color: #fffaf6;
  background: var(--artist-color, var(--accent));
  border-color: var(--artist-color, var(--accent));
}

.btn-journey-start {
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fffaf6;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-journey-start:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* story container */

.journey-story__toolbar {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

.btn-journey-reset {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 250, 246, 0.72);
  border: 1px solid var(--ring);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-journey-reset:hover {
  color: var(--text);
  border-color: var(--muted);
  background: rgba(255, 250, 246, 0.95);
}

.journey-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.journey-progress__step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.journey-progress__step::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ring);
  transition: background 0.25s, width 0.25s, border-radius 0.25s;
  flex-shrink: 0;
}

.journey-progress__step.is-done::before {
  background: var(--accent);
  opacity: 0.45;
}

.journey-progress__step.is-active {
  color: var(--accent);
}

.journey-progress__step.is-active::before {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
}

.journey-progress__sep {
  color: var(--ring);
  font-size: 0.7rem;
}

.artist-journey__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.55fr);
  gap: 1rem;
  align-items: start;
}

.artist-journey__chart-panel {
  min-width: 0;
  padding: 1rem;
  background: rgba(243, 228, 212, 0.35);
  border: 1px solid var(--ring);
  border-radius: 8px;
}

.journey-chart-wrap {
  position: relative;
  min-height: 300px;
}

.journey-chart {
  display: block;
  width: 100%;
  height: auto;
}

.journey-chart .x-axis path,
.journey-chart .y-axis path {
  display: none;
}

.journey-chart .x-axis line,
.journey-chart .y-axis line,
.journey-grid line {
  stroke: rgba(139, 117, 104, 0.2);
}

.journey-grid path {
  display: none;
}

.journey-chart .x-axis text,
.journey-chart .y-axis text,
.journey-chart .axis-label {
  fill: var(--muted);
  font-size: 0.76rem;
}

.journey-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--text);
}

.journey-legend__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.journey-legend__item i {
  display: inline-block;
  width: 1.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--legend-color, var(--muted));
  flex-shrink: 0;
}

.journey-legend__item.is-dashed i {
  background: repeating-linear-gradient(
    90deg,
    var(--legend-color, var(--muted)) 0 5px,
    transparent 5px 8px
  );
}

.journey-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 16rem;
  padding: 0.55rem 0.65rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(58, 47, 40, 0.14);
  pointer-events: none;
}

.journey-tooltip strong,
.journey-tooltip span,
.journey-tooltip small {
  display: block;
}

.journey-tooltip span {
  margin-top: 0.1rem;
  font-weight: 700;
}

.journey-tooltip small {
  margin-top: 0.12rem;
  color: var(--muted);
}

/* narrative panel */

.journey-narrative {
  min-width: 0;
  padding: 1.25rem;
  background: rgba(243, 228, 212, 0.35);
  border: 1px solid var(--ring);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 300px;
}

.journey-narrative h3 {
  margin: 0.1rem 0 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.journey-narrative p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.narrative-year-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.25rem 0;
}

.narrative-year {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.narrative-pop {
  display: flex;
  flex-direction: column;
}

.narrative-pop__score {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--narrative-color, var(--accent));
}

.narrative-pop__label {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.2;
}

.narrative-change {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 !important;
}

.narrative-change.is-up { color: #2d8a5e; }
.narrative-change.is-down { color: #c94c4c; }
.narrative-change.is-neutral { color: var(--muted); }

.narrative-track {
  font-size: 0.875rem;
  margin: 0 !important;
  color: var(--muted) !important;
}

.narrative-track em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.narrative-meta {
  font-size: 0.78rem;
  color: var(--muted) !important;
  margin: 0 !important;
}

.narrative-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--ring);
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 -6px 18px rgba(58, 47, 40, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.narrative-year-count {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.btn-journey-next {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fffaf6;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  text-align: center;
}

.btn-journey-next:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-journey-skip {
  width: 100%;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--ring);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-journey-retry {
  width: 100%;
  padding: 0.52rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 250, 246, 0.74);
  border: 1px solid var(--ring);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-journey-retry:hover {
  background: #fffaf6;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.journey-guess-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.journey-now-playing {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.6rem;
  flex-shrink: 0;
  border-top: 1px solid var(--ring);
  margin-top: 0.5rem;
}

.journey-now-playing__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 !important;
}

.journey-now-playing__embed iframe {
  display: block;
  border-radius: 8px;
  border: none;
}

/* Custom artist search */

.artist-custom-pick {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-search-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.artist-search-label {
  display: none;
}

.artist-search-field {
  position: relative;
}

.artist-search-input {
  width: 11rem;
  padding: 0.44rem 0.65rem;
  font-size: 0.84rem;
  color: var(--text);
  background: rgba(255, 250, 246, 0.9);
  border: 1.5px solid var(--ring);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.artist-search-input:focus {
  border-color: var(--accent);
}

.artist-search-input.is-selected {
  border-color: var(--dot-correct);
  background: rgba(45, 138, 94, 0.07);
}

.artist-search-results {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  right: 0;
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(58, 47, 40, 0.14);
  max-height: 13rem;
  overflow-y: auto;
}

.artist-search-result {
  padding: 0.38rem 0.6rem;
  font-size: 0.86rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.1s;
}

.artist-search-result:hover {
  background: var(--bg-deep);
}


.artist-search-status {
  font-size: 0.78rem;
  margin: 0;
  padding: 0.3rem 0;
}

.artist-search-status.is-error {
  color: #8b3a2a;
}

.artist-search-status.is-warn {
  color: #7a5c1e;
}

.journey-guess-btn {
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: #f0ebe4;
  border: 1.5px solid var(--ring);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
  text-align: center;
}

.journey-guess-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf6;
}

.narrative-guess-result {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 !important;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

.narrative-guess-result.is-correct {
  color: #2a7a4f;
  background: #e6f4ed;
}

.narrative-guess-result.is-wrong {
  color: #8b3a2a;
  background: #faeae6;
}

.btn-journey-skip:hover {
  border-color: var(--muted);
  color: var(--text);
}

@media (max-width: 860px) {
  .artist-journey__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .artist-journey {
    padding: 1rem;
  }
}

/* --- Music-inspired section backgrounds --- */

.genre-guess,
.game-summary,
.genre-explorer,
.performance-explorer,
.artist-journey {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.genre-guess > *,
.game-summary > *,
.genre-explorer > *,
.performance-explorer > *,
.artist-journey > * {
  position: relative;
  z-index: 1;
}

.genre-guess::before,
.game-summary::before,
.genre-explorer::before,
.performance-explorer::before,
.artist-journey::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.genre-guess {
  background:
    linear-gradient(115deg, rgba(255, 250, 246, 0.9) 0%, rgba(248, 239, 230, 0.84) 52%, rgba(238, 226, 214, 0.82) 100%);
}

.genre-guess::before {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(198, 123, 92, 0.1) 18% 18.4%, transparent 18.4% 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0 16px,
      rgba(58, 47, 40, 0.035) 16px 17px,
      transparent 17px 34px
    );
  opacity: 0.72;
}

.game-summary {
  background:
    linear-gradient(135deg, rgba(255, 250, 246, 0.9) 0%, rgba(244, 235, 225, 0.86) 100%);
}

.game-summary::before {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(45, 138, 94, 0.08) 0 1px,
      transparent 1px 18px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(201, 76, 76, 0.055) 0 1px,
      transparent 1px 18px
    );
  opacity: 0.45;
}

.genre-explorer {
  background:
    linear-gradient(135deg, rgba(255, 250, 246, 0.92) 0%, rgba(238, 246, 239, 0.86) 100%);
}

.genre-explorer::before {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 23px,
      rgba(42, 157, 111, 0.12) 23px 24px,
      transparent 24px 34px
    ),
    linear-gradient(90deg, rgba(42, 157, 111, 0.08), transparent 42%);
  opacity: 0.58;
}

.performance-explorer {
  background:
    linear-gradient(135deg, rgba(255, 250, 246, 0.92) 0%, rgba(237, 241, 250, 0.86) 100%);
}

.performance-explorer::before {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(74, 127, 212, 0.075) 0 1px,
      transparent 1px 28px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 12px,
      rgba(74, 127, 212, 0.1) 12px 13px,
      transparent 13px 38px
    );
  opacity: 0.52;
}

.artist-journey {
  background:
    linear-gradient(135deg, rgba(255, 250, 246, 0.92) 0%, rgba(249, 238, 245, 0.86) 100%);
}

.artist-journey::before {
  background:
    linear-gradient(90deg, rgba(212, 86, 154, 0.08), transparent 46%),
    repeating-linear-gradient(
      90deg,
      transparent 0 44px,
      rgba(212, 86, 154, 0.1) 44px 45px,
      transparent 45px 88px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 32px,
      rgba(58, 47, 40, 0.035) 32px 33px,
      transparent 33px 64px
    );
  opacity: 0.6;
}

/* --- Restored modern/story checkpoint --- */

:root {
  --bg: #f5f2ed;
  --bg-deep: #e8e2d8;
  --surface: #fffdf8;
  --text: #22201d;
  --muted: #6f6a63;
  --ring: #d8d0c5;
  --accent: #8f5f47;
  --accent-hover: #734c39;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72) 0, rgba(255, 253, 248, 0) 22rem),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.site-header {
  max-width: none;
  padding: 0.75rem 1.5rem;
}

.site-nav {
  margin-bottom: 0;
}

.site-nav a {
  min-height: 2.4rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 253, 248, 0.84);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(34, 32, 29, 0.06);
}

.site-header h1 {
  max-width: 56rem;
  margin-bottom: 0.65rem;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 0.98;
}

.lede {
  max-width: 44rem;
  font-size: 1.05rem;
}

main {
  width: 100%;
  max-width: none;
  padding-block: 2rem 0;
}

.genre-guess,
.game-summary,
.genre-explorer,
.performance-explorer,
.artist-journey {
  scroll-margin-top: 1.25rem;
}

.genre-guess,
.genre-explorer,
.performance-explorer,
.artist-journey,
.game-summary {
  padding: clamp(1.1rem, 3vw, 1.65rem);
  border: 1px solid rgba(216, 208, 197, 0.9);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(34, 32, 29, 0.07);
}

.genre-guess {
  margin-top: 0;
}

.genre-guess.is-complete {
  display: none;
}

.genre-explorer,
.performance-explorer,
.artist-journey,
.game-summary {
  margin-top: 0;
}

.genre-guess h2,
.genre-explorer h2,
.performance-explorer h2,
.artist-journey h2,
.game-summary h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: 0;
}

.genre-explorer__header,
.performance-explorer__header,
.artist-journey__header {
  max-width: 44rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ring);
}

.label {
  letter-spacing: 0.09em;
}

.feature-card,
.guess-panel,
.genre-explorer__chart-panel,
.genre-profile,
.performance-chart-panel,
.performance-note,
.artist-journey__chart-panel,
.journey-narrative,
.game-summary__stat,
.game-summary__item,
.performance-note__stats div {
  background: rgba(255, 253, 248, 0.82);
  border-color: var(--ring);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.explorer-tab,
.performance-step,
.performance-feature-tab,
.performance-genre-filter,
.artist-pick-btn,
.btn-journey-start,
.btn-next,
.btn-shuffle,
.btn-journey-next,
.btn-journey-skip,
.btn-journey-reset,
.btn-play-again {
  border-radius: 8px;
}

.genre-btn {
  border-radius: 8px;
  font-weight: 650;
}

.btn-play-again {
  margin-top: 1rem;
  padding: 0.65rem 1.1rem;
  color: #fffaf6;
  background: var(--accent);
  border: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-play-again:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.spotify-embed,
.spotify-embed iframe {
  border-radius: 8px;
}

.spotify-play-btn {
  box-shadow: 0 16px 34px rgba(34, 32, 29, 0.2);
}

.genre-explorer__layout,
.performance-explorer__layout,
.artist-journey__layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.6fr);
  gap: 1.25rem;
  align-items: start;
}

.genre-explorer__chart-panel,
.performance-chart-panel,
.artist-journey__chart-panel {
  background: rgba(255, 253, 248, 0.86);
}

.genre-profile,
.performance-note,
.journey-narrative {
  border-left: 4px solid var(--accent);
  line-height: 1.6;
}

.journey-narrative {
  min-height: 24rem;
}

.explorer-help,
.genre-profile__note,
.performance-note p,
.journey-narrative p {
  color: var(--muted);
}

.journey-progress {
  justify-content: flex-start;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 253, 248, 0.66);
  border: 1px solid var(--ring);
  border-radius: 8px;
}

.journey-progress__step::before {
  border-radius: 2px;
}

.explorer-tooltip,
.performance-tooltip,
.journey-tooltip {
  background: rgba(255, 253, 248, 0.96);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(34, 32, 29, 0.12);
}

.genre-guess {
  background:
    linear-gradient(115deg, rgba(255, 253, 248, 0.9) 0%, rgba(248, 243, 235, 0.84) 52%, rgba(238, 231, 221, 0.82) 100%);
}

.genre-guess::before {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(143, 95, 71, 0.1) 18% 18.4%, transparent 18.4% 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0 16px,
      rgba(34, 32, 29, 0.035) 16px 17px,
      transparent 17px 34px
    );
  opacity: 0.72;
}

.game-summary {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.9) 0%, rgba(242, 239, 233, 0.86) 100%);
}

.game-summary::before {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(45, 138, 94, 0.08) 0 1px,
      transparent 1px 18px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(201, 76, 76, 0.055) 0 1px,
      transparent 1px 18px
    );
  opacity: 0.45;
}

.genre-explorer {
  background:
    linear-gradient(135deg, rgba(252, 249, 242, 0.92) 0%, rgba(240, 244, 240, 0.86) 100%);
}

.genre-explorer::before {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 23px,
      rgba(42, 157, 111, 0.12) 23px 24px,
      transparent 24px 34px
    ),
    linear-gradient(90deg, rgba(42, 157, 111, 0.08), transparent 42%);
  opacity: 0.58;
}

.performance-explorer {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.92) 0%, rgba(241, 242, 248, 0.86) 100%);
}

.performance-explorer::before {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(74, 127, 212, 0.075) 0 1px,
      transparent 1px 28px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 12px,
      rgba(74, 127, 212, 0.1) 12px 13px,
      transparent 13px 38px
    );
  opacity: 0.52;
}

.artist-journey {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.92) 0%, rgba(247, 239, 243, 0.86) 100%);
}

.artist-journey::before {
  background:
    linear-gradient(90deg, rgba(212, 86, 154, 0.08), transparent 46%),
    repeating-linear-gradient(
      90deg,
      transparent 0 44px,
      rgba(212, 86, 154, 0.1) 44px 45px,
      transparent 45px 88px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 32px,
      rgba(34, 32, 29, 0.035) 32px 33px,
      transparent 33px 64px
    );
  opacity: 0.6;
}

.genre-guess::after,
.genre-explorer::after,
.performance-explorer::after,
.artist-journey::after {
  position: absolute;
  right: clamp(1rem, 3vw, 1.65rem);
  top: clamp(1rem, 3vw, 1.65rem);
  z-index: 0;
  color: rgba(34, 32, 29, 0.12);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.genre-guess::after {
  content: "♪";
}

.genre-explorer::after {
  content: "≋";
}

.performance-explorer::after {
  content: "▥";
}

.artist-journey::after {
  content: "↗";
}

/* --- Story sections: natural scroll flow --- */

.story-scroll {
  margin-top: 0;
}

.story-stage {
  display: flex;
  flex-direction: column;
}

.story-stage > .story-hook {
  min-height: clamp(32rem, 54dvh, 42rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(2.5rem, 5vh, 4rem) 2rem clamp(1.75rem, 4vh, 3rem);
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.story-stage > .story-finale {
  min-height: min(100dvh, 54rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.story-stage > .genre-guess,
.story-stage > .genre-explorer,
.story-stage > .performance-explorer,
.story-stage > .artist-journey {
  min-height: min(100dvh, 58rem);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
}

.story-stage > .story-takeaway {
  display: flex;
  flex-direction: column;
  padding: 4rem 2rem;
  box-sizing: border-box;
}

.story-stage > .story-transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem;
  box-sizing: border-box;
}

.story-stage > .game-summary {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  box-sizing: border-box;
}

.story-stage > .game-summary[hidden] {
  display: none;
}

.story-scroll .genre-guess__layout {
  align-items: start;
}

.story-scroll .genre-guess .section-note {
  flex-shrink: 0;
}

.story-scroll .genre-guess {
  gap: 0;
  padding-block: clamp(0.85rem, 2vw, 1.15rem);
}

.story-scroll .genre-guess h2 {
  margin-bottom: 0.2rem;
}

.story-scroll .genre-guess__layout {
  gap: 1rem;
  flex-shrink: 0;
}

.story-scroll .feature-card,
.story-scroll .guess-panel {
  padding: 0.95rem 1.05rem;
}

.story-scroll .feature-card__header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
}

.story-scroll .feature-card h3,
.story-scroll .guess-panel__now-playing h3 {
  font-size: 1.08rem;
}

.story-scroll .feature-bars {
  gap: 0.55rem;
}

.story-scroll .feature-bar {
  gap: 0.45rem 0.65rem;
}

.story-scroll .feature-summary {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.story-scroll .spotify-embed-wrap {
  margin-bottom: 0.75rem;
}

.story-scroll .guess-panel__controls {
  margin-bottom: 0.6rem;
}

.story-scroll .genre-buttons {
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.story-scroll .genre-btn {
  padding: 0.42rem 0.68rem;
  font-size: 0.82rem;
}

.story-scroll .progress-text {
  margin-top: 0.45rem;
}

.story-scroll .genre-guess:has(.guess-panel__reveal:not([hidden])) .listening-guide {
  display: none;
}

.story-scroll .listening-guide {
  margin-top: 3rem;
}

.listening-guide {
  margin-top: 0.45rem;
  min-height: 10.25rem;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--ring);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.listening-guide__intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(216, 208, 197, 0.72);
}

.listening-guide__intro h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.listening-guide__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.listening-cue {
  min-width: 0;
  min-height: 7rem;
  padding: 0.72rem 0.72rem;
  background: rgba(255, 250, 246, 0.62);
  border: 1px solid rgba(216, 208, 197, 0.7);
  border-radius: 8px;
}

.listening-cue__mark {
  display: inline-flex;
  margin-bottom: 0.28rem;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.listening-cue h4 {
  margin: 0 0 0.2rem;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.listening-cue p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.story-scroll .genre-explorer__header,
.story-scroll .performance-explorer__header,
.story-scroll .artist-journey__header {
  flex-shrink: 0;
  margin-bottom: 0.6rem;
  padding-bottom: 0.55rem;
}

.story-scroll .performance-steps {
  flex-shrink: 0;
  margin-bottom: 0.6rem;
}

.story-scroll .genre-explorer__layout,
.story-scroll .performance-explorer__layout,
.story-scroll .artist-journey__layout {
  flex: 1;
  min-height: 420px;
  align-items: stretch;
}

.story-scroll .genre-explorer__chart-panel,
.story-scroll .performance-chart-panel,
.story-scroll .artist-journey__chart-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.story-scroll .genre-profile,
.story-scroll .performance-note {
  min-height: 0;
  overflow-y: auto;
}

.story-scroll .journey-narrative {
  min-height: 0;
  overflow-y: auto;
}

.story-scroll .explorer-chart-wrap,
.story-scroll .performance-chart-wrap,
.story-scroll .journey-chart-wrap {
  flex: 1 1 300px;
  min-height: 0;
}

.story-scroll .explorer-chart,
.story-scroll .performance-chart,
.story-scroll .journey-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.story-scroll .explorer-help,
.story-scroll .explorer-feature-desc,
.story-scroll .journey-legend,
.story-scroll .journey-progress {
  flex-shrink: 0;
}

.story-scroll .explorer-help {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  font-size: 0.8rem;
}

.story-scroll .explorer-feature-desc {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
}

.story-scroll .journey-narrative {
  min-height: 0;
}

.story-scroll .artist-journey.is-journey-chart-open .artist-journey__body {
  flex: 1;
  min-height: 0;
  gap: 0.35rem;
  overflow: hidden;
}

.story-scroll .artist-journey:not(.is-journey-chart-open) .artist-journey__body {
  flex: 1;
  min-height: 0;
  gap: 0.35rem;
}

.story-scroll .artist-journey:not(.is-journey-chart-open) .artist-journey__header {
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
}

.story-scroll .artist-journey:not(.is-journey-chart-open) .journey-pick-panel {
  padding-bottom: 0.15rem;
}


.story-scroll .journey-pick-panel {
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 0.45rem;
  padding: 0.2rem 0 0.35rem;
}

.story-scroll .journey-pick-prompt {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.72rem;
  text-align: left;
}

.story-scroll .artist-picker {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 0.35rem;
}

.story-scroll .artist-pick-btn {
  padding: 0.28rem 0.58rem;
  font-size: 0.74rem;
  border-width: 1px;
}

.story-scroll .btn-journey-start {
  flex-shrink: 0;
  padding: 0.34rem 0.72rem;
  font-size: 0.76rem;
}

.story-scroll .artist-search-status {
  display: none;
}

.story-scroll .artist-search-input {
  width: 8rem;
  padding: 0.24rem 0.45rem;
  font-size: 0.74rem;
  border-radius: 6px;
}

.story-scroll .journey-story {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.story-scroll .journey-story .artist-journey__layout {
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1.5fr) minmax(15rem, 0.5fr);
}

.story-scroll .journey-progress {
  margin-bottom: 0.45rem;
  padding: 0.45rem 0.55rem;
}

.story-scroll .journey-narrative {
  padding: 0.75rem;
  font-size: 0.85rem;
}

.story-scroll .narrative-footer {
  gap: 0.45rem;
  padding: 0.65rem;
  border-radius: 8px;
}

.story-scroll .journey-narrative h3 {
  font-size: 1rem;
}

.story-scroll .narrative-year {
  font-size: 2rem;
}

.story-scroll__spacer {
  min-height: 100vh;
}

.story-scroll__spacer + .story-scroll__spacer {
  border-top: 1px solid transparent;
}

/* Arrow-key nav hint */


/* Minimize header + picker while journey is in progress */

.artist-journey.is-journey-active .artist-journey__header .label,
.artist-journey.is-journey-active .artist-journey__header p:last-child {
  display: none;
}

.artist-journey.is-journey-active .artist-journey__header {
  margin-bottom: 0.25rem;
}

.artist-journey.is-journey-active .journey-pick-panel {
  display: none;
}

/* Story transitions */

.story-transition__inner {
  max-width: 44rem;
  width: 100%;
  padding: 0.5rem 0;
}

/* Quotes section overrides */
.story-stage > .story-quotes {
  justify-content: flex-start;
  align-items: stretch;
  padding: 4rem 3rem;
  gap: 0;
}

.quotes-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 3rem;
}

.quotes-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.scroll-quote {
  margin: 0;
  max-width: 22rem;
}

.scroll-quote--left  { margin-right: auto; }
.scroll-quote--center { margin-left: auto; margin-right: auto; text-align: center; }
.scroll-quote--right  { margin-left: auto; text-align: right; }

.quotes-writeup {
  margin: 3rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 36rem;
  border-top: 1px solid var(--ring);
  padding-top: 1.25rem;
}

.quote-text {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 0.5rem;
  min-height: 1.3em;
}

.quote-text::before { content: '\201C'; }
.quote-text::after  { content: '\201D'; }

.quote-text.is-typing::after {
  content: '\201D';
  animation: none;
}

.scroll-quote cite {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.scroll-quote.is-done cite {
  opacity: 1;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.quote-cursor::after {
  content: '\201D\007C';
  animation: cursor-blink 0.55s step-end infinite;
}

.story-takeaway__inner {
  width: 100%;
  padding: 1.75rem 2rem;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--ring);
  border-radius: 16px;
  box-sizing: border-box;
}

.story-transition h2,
.story-takeaway h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.3rem 0 0.85rem;
}

.story-transition__lede {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
  max-width: 38rem;
}

/* Genre dot strip plot */

.story-transition__feature-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.transition-dot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin-bottom: 0.85rem;
}

.transition-dot-legend-item {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text);
}

.transition-dot-svg {
  width: 100%;
  max-width: 34rem;
  overflow: visible;
  display: block;
}

.transition-dot-track {
  stroke: var(--ring);
  stroke-width: 2;
}

.transition-dot-tick {
  stroke: var(--muted);
  stroke-width: 1;
  opacity: 0.45;
}

.transition-dot-feat-label {
  font-size: 11px;
  font-weight: 700;
  fill: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.transition-dot-scale-label {
  font-size: 9px;
  fill: var(--muted);
  opacity: 0.65;
}

.transition-dot-genre-label {
  font-size: 9px;
  font-weight: 700;
}

.transition-lollipop-genre {
  font-size: 10.5px;
  font-weight: 700;
}

/* Stat cards */

.story-transition__stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.transition-stat {
  flex: 1;
  min-width: 10rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 250, 246, 0.8);
  border: 1px solid var(--ring);
  border-radius: 12px;
}

.transition-stat__num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.transition-stat__label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* Takeaway / Timeline section */

.timeline-controls {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.timeline-selector-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.timeline-selector-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  min-width: 3.2rem;
  flex-shrink: 0;
}

.timeline-chip {
  padding: 0.25rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1.5px solid var(--ring);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  font-family: inherit;
}

.timeline-chip:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.timeline-chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fffaf6;
}

.timeline-chip.has-color.is-active {
  background: var(--chip-color);
  border-color: var(--chip-color);
  color: #fff;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 0.85rem;
}

.timeline-square {
  aspect-ratio: 1;
  border-radius: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  transition: background 0.35s ease;
}

.timeline-square.is-empty {
  opacity: 0.35;
}

.timeline-square:hover {
  filter: brightness(0.78);
  transform: scale(1.18);
  z-index: 1;
  transition: filter 0.1s ease, transform 0.1s ease, background 0.35s ease;
}

.timeline-year-label {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
  line-height: 1;
  pointer-events: none;
}

.timeline-tooltip {
  position: fixed;
  z-index: 100;
  padding: 0.5rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(58, 47, 40, 0.14);
  pointer-events: none;
  min-width: 8rem;
}

.timeline-tooltip strong,
.timeline-tooltip span,
.timeline-tooltip small {
  display: block;
}

.timeline-tooltip span {
  margin-top: 0.15rem;
  font-weight: 700;
}

.timeline-tooltip small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.timeline-legend-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.timeline-legend-bar {
  height: 7px;
  flex: 1;
  border-radius: 999px;
  transition: background 0.35s ease;
}

.timeline-legend-end {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.story-takeaway__credit {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ring);
}

/* Hook intro */

.story-hook__inner {
  width: min(100%, 86rem);
  position: relative;
}

.story-hook__headline {
  max-width: 20ch;
  margin-inline: auto;
  font-size: clamp(3rem, 6.2vw, 7.2rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0.65rem 0 1.35rem;
  letter-spacing: -0.02em;
}

.story-hook__sub {
  font-size: clamp(1.1rem, 1.7vw, 2rem);
  color: var(--muted);
  line-height: 1.5;
  max-width: 74rem;
  margin: 0 auto 2.4rem;
}

.story-hook__cta {
  font-size: clamp(0.95rem, 1.25vw, 1.45rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0;
  animation: hook-bounce 2s ease-in-out infinite;
}

@keyframes hook-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Final takeaway */

.story-finale__inner {
  max-width: 36rem;
  width: 100%;
  text-align: left;
  position: relative;
}

.story-finale__inner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.3rem 0 1.5rem;
}

.story-finale__points {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.story-finale__point {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 250, 246, 0.72);
  border: 1px solid var(--ring);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.story-finale__point::before {
  content: attr(data-num);
  position: absolute;
  top: -0.6rem;
  left: 0.4rem;
  font-size: 7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

.story-finale__num {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.12em;
  padding-top: 0.2rem;
  flex-shrink: 0;
  min-width: 1.8rem;
}

.story-finale__point h3 {
  margin: 0 0 0.25rem;
  font-size: 0.97rem;
  font-weight: 700;
}

.story-finale__point p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

.story-finale__credit {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ring);
  text-align: left;
}

@media (max-width: 860px) {
  main {
    padding-inline: 1rem;
  }

  .genre-explorer__layout,
  .performance-explorer__layout,
  .artist-journey__layout {
    grid-template-columns: 1fr;
  }

  .story-stage {
    position: static;
    min-height: auto;
  }

  .story-stage > .story-transition,
  .story-stage > .story-takeaway,
  .story-stage > .genre-guess,
  .story-stage > .game-summary,
  .story-stage > .genre-explorer,
  .story-stage > .performance-explorer,
  .story-stage > .artist-journey {
    position: static;
    inset: auto;
    width: auto;
    max-height: none;
    min-height: auto;
    margin-bottom: 2rem;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .story-stage > .artist-journey {
    margin-bottom: 0;
  }

  .genre-guess.is-complete {
    display: none;
  }

  .listening-guide__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-scroll__spacer {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .story-hook__headline {
    font-size: clamp(2.25rem, 12vw, 3.6rem);
  }

  .story-hook__sub {
    font-size: 1rem;
  }

  .listening-guide__intro {
    display: block;
  }

  .listening-guide__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Visual effects ─────────────────────────────────────────── */

/* Scattered background music notes */
.bg-note {
  position: absolute;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.story-hook .bg-note {
  color: rgba(198, 123, 92, 0.12);
}

.story-finale .bg-note {
  color: rgba(198, 123, 92, 0.08);
}

/* Floating notes animation (plays once on load) */
@keyframes float-note {
  0%   { opacity: 0;    transform: translateY(0)      rotate(var(--rot)); }
  15%  { opacity: 0.6; }
  100% { opacity: 0;    transform: translateY(-110px) rotate(calc(var(--rot) + 18deg)); }
}

.float-note {
  position: absolute;
  pointer-events: none;
  user-select: none;
  color: rgba(198, 123, 92, 0.55);
  animation: float-note 3s ease-out both;
  z-index: 0;
}

/* Fade-up reveal on scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
