:root {
  color-scheme: dark;
  --ink: #eaf4f3;
  --muted: #a6bccb;
  --quiet: #6c8597;
  --night: #0a1826;
  --panel: rgba(16, 33, 49, 0.58);
  --panel-strong: rgba(18, 38, 56, 0.72);
  --line: rgba(190, 225, 255, 0.18);
  --primary: #45b8ff;
  --primary-deep: #145b78;
  --moss: #65d6c8;
  --gold: #f0c86a;
  --coral: #ff7c6e;
  --blue: #7bc7ff;
  --shadow: 0 22px 60px rgba(4, 16, 28, 0.42);
  --shadow-soft: 0 14px 40px rgba(4, 16, 28, 0.3);
  /* organic, softer corners across the app */
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 28px;
  /* signature asymmetric "blob" radius for hero/feature surfaces */
  --r-blob: 42% 58% 57% 43% / 48% 44% 56% 52%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  /* Festival mesh: layered colour fields over a lighter deep base, slowly
     drifting so the whole canvas feels alive rather than flat-dark. */
  background:
    radial-gradient(46rem 46rem at 4% -8%, rgba(69, 184, 255, 0.5), transparent 60%),
    radial-gradient(42rem 42rem at 100% 4%, rgba(240, 200, 106, 0.4), transparent 58%),
    radial-gradient(44rem 44rem at 82% 102%, rgba(101, 214, 200, 0.38), transparent 60%),
    radial-gradient(34rem 34rem at 12% 92%, rgba(255, 124, 110, 0.3), transparent 58%),
    linear-gradient(165deg, #0a1726 0%, #0c1d2e 52%, #0c2022 100%);
  background-attachment: fixed;
}

html.swipe-lock,
body.swipe-lock {
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

/* Large soft organic blobs that breathe behind the glass UI. */
.ambient {
  position: fixed;
  z-index: -1;
  width: 44rem;
  height: 44rem;
  border-radius: var(--r-blob);
  filter: blur(64px);
  opacity: 0.45;
  animation: drift 24s ease-in-out infinite alternate;
}

.ambient-a {
  left: -16rem;
  top: 10rem;
  background: radial-gradient(circle at 40% 40%, var(--primary), transparent 70%);
}

.ambient-b {
  right: -14rem;
  bottom: -12rem;
  background: radial-gradient(circle at 50% 50%, var(--gold), transparent 70%);
  animation-delay: -9s;
  animation-duration: 28s;
}

.ambient-c {
  left: 38%;
  top: 30%;
  width: 38rem;
  height: 38rem;
  opacity: 0.34;
  background: radial-gradient(circle at 50% 50%, var(--moss), transparent 70%);
  animation-delay: -15s;
  animation-duration: 32s;
}

.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 3vw, 34px) 24px;
}

.topbar,
.hero-band,
.workspace {
  width: 100%;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  transition: min-height 320ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0;
  transform-origin: left center;
  transition: gap 320ms ease, font-size 320ms ease, transform 320ms ease;
}

.brand-button {
  border: 0;
  padding: 0;
  background: transparent;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 18px rgba(69, 184, 255, 0.1);
  transition: width 320ms ease, height 320ms ease, gap 320ms ease, border-radius 320ms ease, box-shadow 320ms ease;
}

.brand-mark span {
  display: block;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(to top, var(--primary), var(--gold));
  animation: pulseBar 1.8s ease-in-out infinite;
}

.brand-mark span:nth-child(1) { height: 10px; }
.brand-mark span:nth-child(2) { height: 16px; animation-delay: 0.18s; }
.brand-mark span:nth-child(3) { height: 12px; animation-delay: 0.34s; }

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-subtitle {
  display: none;
}

body.home-intro .topbar {
  justify-content: center;
  min-height: clamp(190px, 30vh, 300px);
  padding-top: clamp(14px, 3vh, 34px);
}

body.home-intro .brand {
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 28px);
  font-size: clamp(3.25rem, 7.6vw, 6.4rem);
  font-weight: 820;
  line-height: 0.9;
  text-align: center;
}

body.home-intro .brand-copy {
  gap: 10px;
}

body.home-intro .brand-subtitle {
  display: block;
  color: var(--primary);
  font-size: clamp(0.82rem, 1.25vw, 1.1rem);
  font-weight: 760;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

body.home-intro .brand-mark {
  gap: clamp(10px, 1.3vw, 16px);
  width: clamp(148px, 16vw, 220px);
  height: clamp(148px, 16vw, 220px);
  border-radius: 46px;
  box-shadow:
    inset 0 0 42px rgba(69, 184, 255, 0.18),
    0 24px 82px rgba(69, 184, 255, 0.22);
}

body.home-intro .brand-mark span {
  width: clamp(11px, 1.2vw, 16px);
}

body.home-intro .brand-mark span:nth-child(1) { height: 28%; }
body.home-intro .brand-mark span:nth-child(2) { height: 48%; }
body.home-intro .brand-mark span:nth-child(3) { height: 36%; }

body.home-intro .intro-screen {
  min-height: auto;
  padding: clamp(6px, 2vh, 20px) 0 30px;
  isolation: isolate;
}

body.home-intro {
  overflow-x: hidden;
}

body.home-intro .intro-copy {
  display: grid;
  justify-items: center;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  animation: introCopyReveal 680ms ease 1900ms forwards;
}

body.home-intro .intro-copy .kicker {
  display: none;
}

body.home-intro .lead {
  margin-left: auto;
  margin-right: auto;
}

body.home-intro #home-title {
  max-width: 760px;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
}

body.home-intro .intro-start {
  margin-top: 22px;
}

body.home-intro .intro-stage {
  position: absolute;
  inset: clamp(-310px, -22vw, -190px) 0 auto 0;
  z-index: 1;
  width: auto;
  height: clamp(620px, 82vh, 860px);
  margin: 0;
  opacity: 0.36;
  filter: blur(18px) saturate(1.25);
  transform: none;
  transform-origin: center top;
  animation: introMapSettle 2200ms cubic-bezier(0.16, 1, 0.3, 1) 420ms both;
  mask-image: radial-gradient(circle at 50% 35%, #000 0 42%, transparent 78%);
}

body.home-intro .intro-stage .pulse-map {
  inset: 0;
  border-color: rgba(69, 184, 255, 0.14);
  border-radius: 42px;
  box-shadow: none;
}

body.home-intro .intro-stage .signal-card {
  opacity: 0.45;
  animation: introSignalFade 2200ms ease 420ms both;
}

.mode-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.mode-tab {
  min-width: 86px;
  min-height: 38px;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.mode-tab:hover {
  color: var(--ink);
}

.mode-tab.active {
  color: #04111a;
  background: var(--primary);
  transform: translateY(-1px);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: screenIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.intro-screen {
  position: relative;
  min-height: calc(100vh - 86px);
  padding: clamp(32px, 7vh, 86px) 0 30px;
}

.intro-copy {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.intro-copy[hidden],
.intro-stage[hidden],
.choice-panel[hidden] {
  display: none;
}

.lead {
  max-width: 620px;
  margin: 18px 0 0;
  color: #bfd0c4;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.intro-stage {
  position: absolute;
  top: 120px;
  right: clamp(18px, 5vw, 70px);
  width: min(32vw, 390px);
  height: 360px;
  pointer-events: none;
}

.pulse-map {
  position: absolute;
  inset: 34px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(circle at 34% 28%, rgba(69, 184, 255, 0.25), transparent 9rem),
    radial-gradient(circle at 72% 62%, rgba(225, 199, 119, 0.16), transparent 8rem),
    rgba(8, 20, 28, 0.72);
  box-shadow: var(--shadow);
}

.pulse-map::before,
.pulse-map::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(238, 246, 238, 0.08);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.pulse-map::after {
  inset: 58px 30px 38px 46px;
  opacity: 0.6;
  transform: rotate(18deg);
}

.signal-card {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 126px;
  padding: 14px;
  border: 1px solid rgba(238, 246, 238, 0.14);
  border-radius: var(--r);
  background: rgba(8, 17, 12, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  animation: floatCard 5s ease-in-out infinite;
}

.signal-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.signal-card strong {
  font-size: 1.38rem;
}

.signal-card-a {
  top: 0;
  right: 18px;
}

.signal-card-b {
  left: 0;
  bottom: 20px;
  animation-delay: -2.2s;
}

.signal-card-c {
  left: 34%;
  top: 44%;
  min-width: 116px;
  animation-delay: -3.6s;
}

.signal-card-c strong {
  color: var(--gold);
}

.choice-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
  max-width: 860px;
  margin-top: clamp(32px, 8vh, 92px);
}

.choice-panel {
  position: relative;
  z-index: 3;
  max-width: 940px;
  padding-top: clamp(34px, 7vh, 84px);
}

.choice-panel .choice-grid {
  margin-top: 18px;
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h2 {
  font-size: clamp(2.15rem, 5vw, 4.4rem);
}

.intro-start {
  margin-top: 28px;
}

.choice-card,
.festival-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  text-align: left;
  background: rgba(8, 20, 28, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice-card > span,
.festival-card > span {
  min-width: 0;
}

.choice-card:hover,
.festival-card:hover {
  transform: translateY(-3px);
  border-color: rgba(69, 184, 255, 0.4);
  background: rgba(10, 30, 42, 0.9);
}

.choice-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--primary);
  background:
    radial-gradient(circle at 35% 30%, rgba(69, 184, 255, 0.32), transparent 70%),
    rgba(69, 184, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(69, 184, 255, 0.22);
}

.choice-icon.blue {
  color: var(--blue);
  background: rgba(112, 166, 206, 0.13);
}

.choice-icon svg,
.back-button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-card strong,
.festival-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.05rem;
}

.choice-card small,
.festival-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.choice-arrow {
  width: 18px;
  height: 18px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  color: rgba(69, 184, 255, 0.64);
  transform: rotate(45deg);
}

.pick-screen,
.result-screen,
.schedule-screen,
.swipe-screen {
  padding: clamp(24px, 5vh, 54px) 0 30px;
}

.config-screen .section-head {
  margin-bottom: clamp(26px, 4vh, 44px);
}

.config-stack {
  display: grid;
  gap: clamp(22px, 3vh, 32px);
  max-width: 1040px;
}

.config-stack .tier-filter,
.config-stack .sample-filter,
.config-stack .matcher-bar {
  margin-top: 0;
}

.config-stack .tier-options {
  max-width: 980px;
}

/* ── Tier filter ──────────────────────────────────── */
.tier-filter {
  margin: 28px 0 0;
}

.sample-filter {
  max-width: 940px;
  margin: 18px 0 0;
}

.sample-filter + .festival-grid,
.tier-filter + .festival-grid {
  margin-top: 34px;
}

.tier-filter-label {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tier-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tier-option {
  cursor: pointer;
}

.tier-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tier-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, transform 160ms ease;
}

.tier-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.tier-card small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.tier-option input:checked + .tier-card {
  border-color: var(--primary);
  background: rgba(69, 184, 255, 0.1);
  box-shadow: 0 0 0 1px var(--primary);
}

.tier-option:hover .tier-card {
  border-color: rgba(69, 184, 255, 0.4);
  transform: translateY(-2px);
}

.sample-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sample-option {
  cursor: pointer;
}

.sample-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.sample-option span {
  display: grid;
  place-items: center;
  min-width: 78px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-weight: 750;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.sample-option input:checked + span {
  color: #04111a;
  border-color: var(--primary);
  background: var(--primary);
}

.sample-option:hover span {
  transform: translateY(-1px);
}

.sample-option.disabled {
  cursor: not-allowed;
}

.sample-option.disabled span {
  opacity: 0.34;
  text-decoration: line-through;
  transform: none;
}

.section-head,
.swipe-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.section-head h2,
.swipe-top h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.swipe-top h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.02;
}

.back-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.back-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-2px);
}

.festival-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  max-width: 940px;
}

.festival-card.wide {
  grid-column: 1 / -1;
}

.festival-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(69, 184, 255, 0.24);
  border-radius: 50%;
  color: var(--primary);
  background:
    radial-gradient(circle at 35% 30%, rgba(69, 184, 255, 0.3), transparent 70%),
    rgba(69, 184, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.swipe-top {
  justify-content: space-between;
}

.swipe-top > div {
  flex: 1;
}

.counter {
  min-width: 56px;
  padding-top: 12px;
  color: var(--muted);
  text-align: right;
  font-weight: 700;
}

.progress-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 280ms ease;
}

.swipe-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1.16fr) minmax(280px, 0.9fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;
  overscroll-behavior: none;
}

.live-panel {
  min-height: 640px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(14px, 2vw, 24px);
}

.result-hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 520px;
  padding: clamp(26px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(28rem 28rem at 22% 12%, rgba(69, 184, 255, 0.26), transparent 60%),
    radial-gradient(24rem 24rem at 92% 96%, rgba(240, 200, 106, 0.2), transparent 60%),
    var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

/* soft organic blob glow drifting inside the hero */
.result-hero::before {
  content: "";
  position: absolute;
  right: -8rem;
  top: -6rem;
  width: 26rem;
  height: 26rem;
  border-radius: var(--r-blob);
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--gold) 50%, transparent), transparent 70%);
  filter: blur(28px);
  pointer-events: none;
  animation: drift 26s ease-in-out infinite alternate;
}

.result-hero > * {
  position: relative;
  z-index: 1;
}

.primary-button {
  width: fit-content;
  min-height: 48px;
  margin-top: 26px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #04111a;
  background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--gold) 70%, var(--primary)));
  font-weight: 750;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 32%, transparent);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 16px 38px color-mix(in srgb, var(--primary) 42%, transparent);
}

.schedule-page {
  display: grid;
  gap: 16px;
  max-width: 960px;
}

.schedule-tools {
  display: grid;
  gap: 12px;
}

.day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.schedule-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-button.active,
.schedule-filter.active {
  color: #04111a;
  border-color: var(--primary);
  background: var(--primary);
}

.export-calendar {
  color: var(--gold);
}

.day-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.day-tab.active {
  color: #04111a;
  background: var(--primary);
}

.schedule-wide {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.timeline-row {
  display: grid;
  grid-template-columns: 58px 18px 1fr;
  gap: 10px;
}

.timeline-time {
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.timeline-line {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 15px;
}

.timeline-line::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: -10px;
  width: 1px;
  background: rgba(238, 246, 238, 0.12);
}

.timeline-line span {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(238, 246, 238, 0.18);
}

.timeline-line span.liked {
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(69, 184, 255, 0.12);
}

.hero-band {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 6vh, 72px) 0 clamp(20px, 4vh, 42px);
}

.kicker,
.panel-label {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 7vw, 5.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
  background: linear-gradient(120deg, var(--ink) 0%, var(--ink) 30%, var(--primary) 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.festival-select-wrap {
  display: grid;
  gap: 8px;
  min-width: min(100%, 260px);
}

.festival-select-wrap label {
  color: var(--muted);
  font-size: 0.8rem;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  background: rgba(5, 18, 27, 0.88);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(320px, 1.24fr) minmax(280px, 0.94fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;
}

.left-panel,
.right-panel,
.deck-shell {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.left-panel,
.right-panel {
  padding: 16px;
}

.left-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mini-map {
  position: relative;
  height: 240px;
  overflow: hidden;
  border-radius: var(--r);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.05), transparent 38%),
    radial-gradient(circle at 34% 28%, rgba(69, 184, 255, 0.27), transparent 9rem),
    radial-gradient(circle at 72% 62%, rgba(225, 199, 119, 0.18), transparent 8rem),
    #0b1710;
}

.mini-map::before,
.mini-map::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(238, 246, 238, 0.08);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.mini-map::after {
  inset: 56px 28px 36px 44px;
  opacity: 0.6;
  transform: rotate(18deg);
}

.scanline {
  position: absolute;
  inset: -70% 0 auto;
  height: 55%;
  background: linear-gradient(to bottom, transparent, rgba(69, 184, 255, 0.14), transparent);
  animation: scan 4.6s linear infinite;
}

.stage-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 8px rgba(69, 184, 255, 0.1), 0 0 30px rgba(69, 184, 255, 0.58);
  animation: breathe 2.6s ease-in-out infinite;
}

.dot-a { left: 26%; top: 22%; }
.dot-b { right: 24%; top: 38%; animation-delay: -0.8s; background: var(--gold); }
.dot-c { left: 42%; bottom: 20%; animation-delay: -1.4s; background: var(--blue); }
.dot-d { right: 18%; bottom: 18%; animation-delay: -2s; background: var(--coral); }

.path-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, transparent 22%, rgba(238, 246, 238, 0.12) 22.4%, transparent 23%, transparent 54%, rgba(238, 246, 238, 0.1) 54.4%, transparent 55%);
  opacity: 0.7;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-grid div,
.insight-panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.035);
}

.stat-grid div {
  min-height: 92px;
  padding: 14px;
}

.stat-grid span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.stat-grid small {
  color: var(--muted);
}

.insight-panel {
  padding: 14px;
}

.taste-bars {
  display: grid;
  gap: 12px;
}

.taste-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.taste-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.taste-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--width);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.swipe-stage {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  min-height: clamp(520px, calc(100vh - 200px), 680px);
  overscroll-behavior: none;
}

.deck-shell {
  position: relative;
  min-height: clamp(440px, calc(100vh - 300px), 610px);
  overflow: hidden;
  overscroll-behavior: none;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.08), transparent 32%),
    var(--panel-strong);
}

.deck-bg {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  opacity: 0.55;
  transform: rotate(-7deg);
}

.bg-two {
  inset: 14%;
  transform: rotate(8deg);
  opacity: 0.3;
}

.card-stack {
  position: absolute;
  inset: 18px;
}

.artist-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(238, 246, 238, 0.14);
  border-radius: var(--r-lg);
  background: #101c14;
  box-shadow: 0 24px 60px rgba(4, 16, 28, 0.5);
  touch-action: none;
  user-select: none;
  cursor: pointer;
  will-change: transform, opacity;
  transition: transform 360ms cubic-bezier(0.2, 0.85, 0.2, 1), opacity 260ms ease;
}

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  backface-visibility: hidden;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 240ms ease;
}

.card-front {
  grid-template-rows: 1fr auto;
  transform: rotateY(0deg);
}

.card-front .card-body {
  gap: 14px;
}

.card-front h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-back {
  place-items: stretch;
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 18rem),
    linear-gradient(155deg, rgba(12, 26, 19, 0.98), rgba(5, 14, 10, 0.98));
  transform: rotateY(180deg);
  opacity: 0;
}

.artist-card.flipped .card-front {
  transform: rotateY(-180deg);
  opacity: 0;
}

.artist-card.flipped .card-back {
  transform: rotateY(0deg);
  opacity: 1;
}

.artist-card.flipped .swipe-badge {
  display: none;
}

.artist-card.next {
  transform: translateY(14px) scale(0.96);
  opacity: 0.58;
}

.artist-card.third {
  transform: translateY(28px) scale(0.92);
  opacity: 0.28;
}

.card-art {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, var(--accent), transparent 12rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 42%),
    #0d1711;
}

.card-art::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(35deg, transparent 0 42%, rgba(255, 255, 255, 0.08) 42.2% 43%, transparent 43.2%),
    repeating-linear-gradient(110deg, transparent 0 22px, rgba(238, 246, 238, 0.035) 23px 24px);
  animation: slideTexture 12s linear infinite;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(8, 16, 11, 0.96), transparent);
}

.artist-photo {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(238, 246, 238, 0.12);
  border-radius: var(--r);
  background:
    radial-gradient(circle at 42% 24%, rgba(238, 246, 238, 0.34), transparent 4rem),
    linear-gradient(145deg, var(--image-a), var(--image-b));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

.artist-photo::before {
  content: "";
  position: absolute;
  inset: 18% 24% 0;
  border-radius: 999px 999px 18px 18px;
  background:
    radial-gradient(circle at 50% 16%, rgba(238, 246, 238, 0.7) 0 18%, transparent 18.5%),
    linear-gradient(to bottom, rgba(238, 246, 238, 0.16), rgba(238, 246, 238, 0.02));
  opacity: 0.72;
}

.artist-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 46%, rgba(255, 255, 255, 0.16) 46.3% 47.1%, transparent 47.4%),
    radial-gradient(circle at 20% 82%, rgba(0, 0, 0, 0.42), transparent 9rem);
  mix-blend-mode: screen;
  opacity: 0.52;
}

.photo-one {
  inset: 28px 26px 58px 34%;
  transform: rotate(2deg);
}

.photo-two {
  left: 28px;
  bottom: 36px;
  width: 42%;
  height: 48%;
  transform: rotate(-4deg);
  opacity: 0.78;
}

.photo-three {
  top: 42px;
  left: 30px;
  width: 34%;
  height: 28%;
  transform: rotate(5deg);
  opacity: 0.5;
}

.artist-initials {
  position: absolute;
  left: 28px;
  bottom: 22px;
  z-index: 1;
  color: rgba(238, 246, 238, 0.92);
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 780;
  line-height: 0.8;
}

.photo-caption {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  max-width: 56%;
  color: rgba(238, 246, 238, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.flip-cue,
.flip-close {
  display: grid;
  place-items: center;
  border: 1px solid rgba(238, 246, 238, 0.18);
  color: var(--ink);
  background: rgba(5, 18, 27, 0.72);
  backdrop-filter: blur(16px);
}

.flip-cue {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: ui-serif, Georgia, serif;
  opacity: 0.88;
}

.flip-close {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: var(--r);
}

.flip-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-content {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 100%;
  padding-top: 22px;
}

.artist-card .card-back h2 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  line-height: 0.95;
  text-wrap: balance;
}

.back-meta {
  margin: -6px 0 0;
  color: var(--accent, var(--primary));
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-bio {
  max-width: 56ch;
  margin: 0;
  color: #d6e2d9;
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  line-height: 1.62;
}

.card-art:focus-visible,
.flip-close:focus-visible {
  outline: 2px solid var(--accent, var(--primary));
  outline-offset: -4px;
}

.swipe-badge {
  position: absolute;
  top: 26px;
  z-index: 3;
  padding: 9px 12px;
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  opacity: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-10deg);
  transition: opacity 120ms ease;
}

.swipe-badge.like {
  left: 24px;
  color: var(--primary);
}

.swipe-badge.skip {
  right: 24px;
  color: var(--coral);
  transform: rotate(10deg);
}

.card-body {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(12, 24, 17, 0.86), rgba(6, 13, 9, 0.96));
}

.artist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(238, 246, 238, 0.12);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
}

.artist-card h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(238, 246, 238, 0.13);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.05);
}

.play-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #04111a;
  background: var(--primary);
}

.play-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.track-title {
  margin: 0 0 4px;
  font-weight: 650;
}

.track-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.equalizer {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 32px;
}

.equalizer span {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(to top, var(--primary), var(--gold));
  animation: eq 900ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 80ms);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.round-button {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.round-button:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
}

.round-button svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accept {
  color: var(--primary);
}

.reject {
  color: var(--coral);
}

.super {
  color: var(--gold);
  border-color: rgba(240, 200, 106, 0.42);
  background: rgba(240, 200, 106, 0.08);
}

.super:hover {
  background: rgba(240, 200, 106, 0.15);
}

.round-button.super svg {
  fill: currentColor;
  stroke: currentColor;
}

.replay {
  width: 54px;
  height: 54px;
  align-self: center;
  color: var(--gold);
}

.right-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: clamp(520px, calc(100vh - 200px), 680px);
}

.schedule-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.schedule-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.text-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
}

.schedule {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-top: 14px;
  overflow: auto;
}

.day-block {
  display: grid;
  gap: 8px;
}

.day-title {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slot {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(238, 246, 238, 0.1);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.035);
  animation: riseIn 360ms ease both;
}

.slot.liked {
  border-color: rgba(69, 184, 255, 0.4);
  background: linear-gradient(120deg, rgba(69, 184, 255, 0.14), rgba(255, 255, 255, 0.035));
}

.slot.superliked {
  border-color: rgba(240, 200, 106, 0.68);
  background: linear-gradient(120deg, rgba(240, 200, 106, 0.18), rgba(69, 184, 255, 0.08));
}

.slot.superliked .slot-artist {
  font-weight: 860;
}

.super-mark {
  display: inline-grid;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.38em;
  color: var(--gold);
  vertical-align: -0.14em;
}

.super-mark svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: currentColor;
}

.slot.overlap::after {
  content: "Overlap";
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 3px 7px;
  border-radius: 99px;
  color: #201208;
  background: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
}

.slot-time {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.slot-artist {
  margin: 0 0 3px;
  padding-right: 58px;
  font-weight: 700;
}

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

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed rgba(238, 246, 238, 0.16);
  border-radius: var(--r);
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3rem, -2rem, 0) rotate(8deg) scale(1.1); }
  100% { transform: translate3d(-2rem, 3rem, 0) rotate(-6deg) scale(1.04); }
}

@keyframes pulseBar {
  0%, 100% { transform: scaleY(0.72); opacity: 0.72; }
  50% { transform: scaleY(1.08); opacity: 1; }
}

@keyframes scan {
  to { transform: translateY(330%); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.14); }
}

@keyframes slideTexture {
  to { transform: translate3d(7%, 4%, 0); }
}

@keyframes eq {
  0%, 100% { height: 9px; opacity: 0.55; }
  50% { height: 28px; opacity: 1; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introMapSettle {
  0%, 22% {
    opacity: 0.92;
    filter: blur(0) saturate(1.08);
    transform: translateY(clamp(210px, 24vh, 280px)) scale(0.62);
  }
  100% {
    opacity: 0.36;
    filter: blur(18px) saturate(1.25);
    transform: translateY(0) scale(1);
  }
}

@keyframes introSignalFade {
  0%, 22% { opacity: 1; }
  100% { opacity: 0.45; }
}

@keyframes introCopyReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introMapSettleMobile {
  0%, 22% {
    opacity: 0.88;
    filter: blur(0) saturate(1.08);
    transform: translateY(185px) scale(0.72);
  }
  100% {
    opacity: 0.28;
    filter: blur(16px) saturate(1.25);
    transform: translateY(0) scale(1);
  }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.78fr);
  }

  .left-panel {
    display: none;
  }

  .swipe-layout,
  .result-layout {
    grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.72fr);
  }

  .intro-stage {
    opacity: 0.45;
  }
}

@media (min-width: 1121px) {
  .intro-copy {
    max-width: min(760px, calc(100% - 440px));
  }
}

@media (min-width: 821px) {
  .app-shell {
    min-height: 100svh;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: 12px;
  }

  .swipe-screen.active {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: min(644px, calc(100svh - 76px));
    padding: 14px 0 0;
    overflow: hidden;
  }

  .swipe-top {
    margin-bottom: 10px;
  }

  .swipe-top h2 {
    font-size: clamp(1.75rem, 3vw, 2.7rem);
  }

  .progress-bar {
    margin-bottom: 10px;
  }

  .swipe-layout {
    min-height: 0;
    align-items: stretch;
  }

  .swipe-stage {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .deck-shell {
    min-height: 0;
  }

  .card-stack {
    inset: 14px;
  }

  .card-front {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  
  .card-art {
    min-height: 0;
  }

  .artist-card h2 {
    font-size: clamp(2.1rem, 4.4vw, 3.9rem);
  }

  .card-body {
    gap: 10px;
    padding: 16px;
  }

  .pill {
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.7rem;
  }

  .live-panel {
    min-height: 0;
  }

  .player {
    min-height: 62px;
    padding: 10px;
  }

  .actions {
    align-items: center;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: 100%;
    min-height: 100svh;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  }

  .topbar {
    align-items: flex-start;
  }

  body.home-intro .topbar {
    align-items: center;
    min-height: 188px;
    padding-top: 8px;
  }

  body.home-intro .brand {
    gap: 14px;
    font-size: clamp(2.65rem, 13vw, 3.35rem);
  }

  body.home-intro .brand-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  body.home-intro .brand-mark {
    width: clamp(126px, 34vw, 150px);
    height: clamp(126px, 34vw, 150px);
    border-radius: 34px;
  }

  body.home-intro .brand-mark span {
    width: 10px;
  }

  .intro-screen {
    min-height: auto;
    padding-top: 24px;
  }

  body.home-intro .intro-screen {
    padding-top: 4px;
  }

  body.home-intro .intro-stage {
    position: absolute;
    inset: -170px 0 auto 0;
    width: auto;
    height: 520px;
    margin: 0;
    opacity: 0.28;
    filter: blur(16px) saturate(1.25);
    transform: none;
    animation-name: introMapSettleMobile;
  }

  .intro-stage {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 158px;
    margin: 14px 0;
    opacity: 1;
  }

  .signal-card {
    min-width: 112px;
    padding: 12px;
  }

  h1 {
    font-size: clamp(2.1rem, 11.5vw, 3.35rem);
  }

  .lead {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .choice-grid,
  .festival-grid,
  .swipe-layout,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    margin-top: 10px;
    gap: 10px;
  }

  .choice-panel {
    padding-top: 28px;
  }

  .choice-panel .choice-grid {
    margin-top: 14px;
  }

  .intro-start {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .choice-card,
  .festival-card {
    min-height: 104px;
    padding: 16px;
  }

  .sample-filter + .festival-grid,
  .tier-filter + .festival-grid {
    margin-top: 22px;
  }

  .sample-filter {
    margin-top: 16px;
  }

  .config-stack {
    gap: 20px;
  }

  .tier-options {
    grid-template-columns: 1fr;
  }

  .tier-card {
    padding: 15px 16px;
  }

  .sample-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .sample-option span {
    min-width: 0;
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .festival-card.wide {
    grid-column: auto;
  }

  .section-head h2,
  .swipe-top h2 {
    font-size: clamp(1.85rem, 10vw, 3.2rem);
  }

  .section-head {
    align-items: center;
    margin-bottom: 18px;
  }

  .swipe-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 10px;
  }

  .swipe-top .kicker {
    margin-bottom: 3px;
    font-size: 0.66rem;
  }

  .swipe-top h2 {
    max-width: 100%;
    font-size: 1.08rem;
    line-height: 1.12;
  }

  .swipe-screen.active {
    display: grid;
    grid-template-rows: auto auto 1fr;
    min-height: calc(100svh - 56px);
    padding-top: 12px;
  }

  .progress-bar {
    margin-bottom: 10px;
  }

  .swipe-layout {
    min-height: 0;
  }

  .swipe-stage,
  .right-panel,
  .live-panel {
    min-height: auto;
  }

  .live-panel {
    display: none;
  }

  .deck-shell {
    min-height: 0;
    height: clamp(410px, calc(100svh - 355px), 540px);
    border-radius: 14px;
  }

  .card-stack {
    inset: 10px;
  }

  .artist-card {
    border-radius: 12px;
    grid-template-rows: minmax(0, 1.05fr) auto;
  }

  .artist-card.next {
    transform: translateY(10px) scale(0.965);
  }

  .artist-card.third {
    display: none;
  }

  .card-art {
    min-height: 0;
  }

  .artist-initials {
    left: 18px;
    bottom: 16px;
    font-size: clamp(3rem, 22vw, 5.8rem);
  }

  .photo-one {
    inset: 20px 18px 44px 30%;
  }

  .photo-two {
    left: 16px;
    bottom: 28px;
    width: 46%;
    height: 48%;
  }

  .photo-three {
    top: 20px;
    left: 18px;
    width: 36%;
    height: 28%;
  }

  .photo-caption {
    right: 18px;
    bottom: 18px;
    max-width: 48%;
  }

  .artist-card h2 {
    font-size: clamp(1.75rem, 9vw, 2.8rem);
  }

  .card-body {
    gap: 12px;
    padding: 18px;
  }

  .card-back {
    padding: 22px;
    overflow-y: auto;
  }

  .artist-card .card-back h2 {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }

  .back-content {
    gap: 12px;
    align-content: start;
    padding-top: 46px;
  }

  .back-bio {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .artist-meta {
    gap: 6px;
  }

  .pill {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .bio {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .player {
    min-height: 62px;
    padding: 10px;
  }

  .play-button {
    width: 40px;
    height: 40px;
  }

  .actions {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 4;
    flex-wrap: wrap;
    margin-top: -2px;
    padding-bottom: 2px;
  }

  .result-hero {
    min-height: 360px;
  }

  .schedule-wide {
    padding: 12px;
  }
}

@media (max-width: 460px) {
  .intro-stage {
    display: none;
  }

  body.home-intro .intro-stage {
    display: block;
  }

  .intro-screen {
    padding-top: 28px;
  }

  .choice-grid {
    margin-top: 22px;
  }

  .player {
    grid-template-columns: auto 1fr;
  }

  .equalizer {
    display: none;
  }

  .round-button {
    width: 58px;
    height: 58px;
    background: rgba(5, 18, 27, 0.92);
    backdrop-filter: blur(18px);
  }

  .round-button.accept {
    width: 66px;
    height: 66px;
  }

  .choice-card,
  .festival-card {
    grid-template-columns: auto 1fr;
    min-height: 96px;
    padding: 14px;
    gap: 12px;
  }

  .choice-icon,
  .festival-mark {
    width: 50px;
    height: 50px;
  }

  .choice-arrow {
    display: none;
  }

  .timeline-row {
    grid-template-columns: 48px 16px 1fr;
  }

  .slot {
    grid-template-columns: 48px 1fr;
  }

  .deck-shell {
    height: clamp(410px, calc(100svh - 355px), 540px);
  }

  .card-body {
    gap: 10px;
    padding: 14px;
  }

  .card-back {
    padding: 18px;
  }

  .flip-close {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
  }

  .flip-cue {
    right: 14px;
    top: 14px;
  }

  .artist-card h2 {
    font-size: clamp(1.45rem, 8vw, 2.35rem);
  }

  .photo-caption {
    right: 14px;
    bottom: 14px;
    max-width: 58%;
    font-size: 0.66rem;
  }

  .actions {
    gap: 12px;
  }
}

/* ============ refinements: card art, dock, meter ============ */

/* festival icons (consistent across the app) */
.fest-svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.festival-mark .fest-svg {
  width: 28px;
  height: 28px;
}

.slot-festicon {
  display: grid;
  place-items: center;
  color: var(--accent, var(--primary));
}

.slot-festicon .fest-svg {
  width: 22px;
  height: 22px;
}

.meta-festicon {
  display: inline-flex;
  vertical-align: -3px;
  margin-right: 5px;
  color: var(--accent, var(--primary));
}

.meta-festicon .fest-svg {
  width: 14px;
  height: 14px;
}

/* select-all toolbar */
.select-toolbar {
  display: flex;
  justify-content: flex-end;
  max-width: 940px;
  margin: 0 0 10px;
}

.chip-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.chip-button:hover {
  border-color: rgba(69, 184, 255, 0.4);
  background: rgba(10, 30, 42, 0.9);
  transform: translateY(-1px);
}

/* matcher multi-select */
.pick-lead {
  max-width: 640px;
  margin: -6px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.matcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 940px;
  margin-top: 20px;
}

.matcher-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.session-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 940px;
  margin-top: 22px;
}

.text-button {
  min-height: 34px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-button:hover {
  color: var(--primary);
}

.session-status {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer {
  width: min(1440px, 100%);
  margin: -6px auto 0;
  padding: 0 clamp(16px, 3vw, 34px) max(18px, env(safe-area-inset-bottom));
}

.privacy-panel {
  max-width: 940px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.58;
}

.privacy-panel summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--muted);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
  list-style: none;
  cursor: pointer;
}

.privacy-panel summary::-webkit-details-marker {
  display: none;
}

.privacy-panel summary:hover,
.privacy-panel[open] summary {
  color: var(--primary);
}

.privacy-copy {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(8, 20, 28, 0.68);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px);
}

.privacy-copy p {
  margin: 0;
}

.matcher-bar .primary-button {
  margin-top: 0;
}

.matcher-bar .primary-button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  filter: none;
}

.select-card {
  position: relative;
}

.select-check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.select-check svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-card.selected {
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  background: linear-gradient(120deg, rgba(69, 184, 255, 0.16), rgba(10, 30, 42, 0.9));
}

.select-card.selected .select-check {
  color: #04111a;
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.08);
}

.select-card.selected .festival-mark {
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
  color: var(--primary);
}

/* the card track row is tappable to skip songs */
.player {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.player:hover {
  border-color: color-mix(in srgb, var(--accent, var(--primary)) 45%, transparent);
  background: rgba(255, 255, 255, 0.07);
}


.swipe-note,
.schedule-note {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 240ms ease;
}

.swipe-note.show {
  opacity: 0.92;
  max-height: 40px;
}

.schedule-note {
  opacity: 0.92;
  max-height: none;
  color: var(--muted);
}

/* day pip on schedule tabs */
.day-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.day-tab:hover {
  transform: translateY(-1px);
}

.day-pip {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 99px;
  background: rgba(4, 17, 26, 0.35);
  color: inherit;
  font-size: 0.7rem;
  font-weight: 800;
}

.day-tab:not(.active) .day-pip {
  background: var(--primary);
  color: #04111a;
}

/* real artist photo */
.card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 600ms ease;
  z-index: 1;
  animation: kenburns 18s ease-in-out infinite alternate;
}

.card-photo.loaded {
  opacity: 1;
}

@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -2%, 0); }
}

.art-fallback {
  position: absolute;
  left: 28px;
  bottom: 22px;
  z-index: 1;
  display: none;
  color: rgba(238, 246, 238, 0.92);
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 780;
  line-height: 0.8;
}

.card-art.no-photo .art-fallback {
  display: block;
}

.card-art.no-photo .card-photo {
  display: none;
}

/* keep the bottom scrim above the photo for caption legibility */
.card-art::after {
  z-index: 1;
}

.photo-caption {
  z-index: 2;
}

/* generative card art (replaces stock-photo blocks) */
.art-aura {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(circle at 30% 28%, var(--accent), transparent 46%),
    radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--accent) 60%, white), transparent 38%);
  filter: blur(6px);
  opacity: 0.85;
  animation: auraDrift 9s ease-in-out infinite alternate;
}

.art-rings {
  position: absolute;
  inset: 8% 0 auto;
  height: 88%;
  background:
    repeating-radial-gradient(circle at 50% 38%, transparent 0 22px, rgba(238, 246, 238, 0.07) 22px 23px);
  mask-image: radial-gradient(circle at 50% 38%, black, transparent 70%);
  animation: ringPulse 7s ease-in-out infinite;
}

@keyframes auraDrift {
  from { transform: translate3d(-4%, -2%, 0) scale(1.02); }
  to { transform: translate3d(6%, 4%, 0) scale(1.12); }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

.card-head {
  display: grid;
  gap: 12px;
}

.pill.accent {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: color-mix(in srgb, var(--accent) 78%, white);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.player-copy {
  min-width: 0;
}

.player-copy .track-title,
.player-copy .track-sub {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* equalizer only dances while playing */
.equalizer span {
  animation-play-state: paused;
}

.artist-card.playing .equalizer span {
  animation-play-state: running;
}

.artist-card.playing .play-button {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* tilt glow while dragging */
.artist-card .card-art::before {
  opacity: calc(0.6 + var(--tilt-glow, 0) * 0.4);
}

/* ---------- now-playing dock ---------- */
.now-playing {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent, var(--primary)) 14%, transparent), transparent 60%),
    var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}

.now-playing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent, var(--primary)) 30%, transparent), transparent);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.now-playing.playing::before {
  animation: sheen 2.6s linear infinite;
  opacity: 0.5;
}

@keyframes sheen {
  to { transform: translateX(100%); }
}

.dock-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  color: #04111a;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(150deg, var(--accent, var(--primary)), color-mix(in srgb, var(--accent, var(--primary)) 40%, #04111a));
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.25);
}

.dock-art.has-photo {
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.now-playing.playing .dock-art {
  animation: spinDisc 7s linear infinite;
}

@keyframes spinDisc {
  to { transform: rotate(360deg); }
}

.dock-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dock-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-sub {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-progress {
  margin-top: 4px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.dock-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent, var(--primary)), var(--gold));
  transition: width 220ms linear;
}

.dock-eq {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.dock-eq span {
  width: 3px;
  height: 6px;
  border-radius: 99px;
  background: var(--accent, var(--primary));
  animation: eq 900ms ease-in-out infinite;
  animation-play-state: paused;
}

.dock-eq span:nth-child(2) { animation-delay: 0.15s; }
.dock-eq span:nth-child(3) { animation-delay: 0.3s; }
.dock-eq span:nth-child(4) { animation-delay: 0.45s; }

.now-playing.playing .dock-eq span {
  animation-play-state: running;
}

.dock-play {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #04111a;
  background: var(--accent, var(--primary));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent, var(--primary)) 35%, transparent);
  touch-action: manipulation;
  transition: transform 160ms ease, filter 160ms ease;
}

.dock-play:hover {
  transform: scale(1.06);
}

.dock-play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.dock-link {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 2px;
  color: var(--muted);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  transition: color 160ms ease, transform 160ms ease, background 160ms ease;
}

.dock-link:hover {
  color: #1ed760;
  background: rgba(30, 215, 96, 0.12);
  transform: scale(1.06);
}

.dock-link svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* the real Spotify iframe lives here, clipped out of view but audible */
.spotify-host {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

#spotify-host {
  width: 100%;
  height: 100%;
}

/* undo button */
.round-button.undo {
  width: 50px;
  height: 50px;
  color: var(--gold);
}

.round-button.undo:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.round-button.peek {
  width: 50px;
  height: 50px;
  color: var(--primary);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 14, 22, 0.68);
  backdrop-filter: blur(18px);
  animation: screenIn 260ms ease both;
}

.demo-overlay[hidden] {
  display: none;
}

.demo-card {
  width: min(520px, 100%);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 12% 0%, rgba(69, 184, 255, 0.2), transparent 14rem),
    rgba(10, 24, 36, 0.94);
  box-shadow: var(--shadow);
}

.demo-card h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
}

.demo-list {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.demo-list p {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  line-height: 1.45;
}

/* result match meter */
.result-meter {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  max-width: 440px;
}

.meter-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.meter-name {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meter-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  animation: meterGrow 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes meterGrow {
  from { transform: scaleX(0); transform-origin: left; }
}

.meter-val {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.slot {
  border-left: 2px solid transparent;
}

.slot.liked {
  border-left-color: var(--accent, var(--primary));
}

@media (max-width: 820px) {
  .now-playing {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .dock-eq { display: none; }

  .deck-shell {
    height: clamp(410px, calc(100svh - 355px), 540px);
  }

  .meter-row {
    grid-template-columns: 96px 1fr auto;
    font-size: 0.8rem;
  }

  .result-meter { margin-top: 18px; }

  .matcher-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .matcher-bar .primary-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .session-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
  }
}

@media (max-width: 820px) and (max-height: 740px) {
  .actions {
    position: static;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
