:root {
  --ink: #0B0B0B;
  --paper: #FFFDF8;
  --sun: #FFCC33;
  --flame: #FF5A36;
  --mint: #B8F2C2;
  --sky: #7EC8E3;
  --line: rgba(255,255,255,0.28);
  --soft: rgba(255,253,248,0.78);
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .bg-slide, .opt-card, .ken-burns, .option-dots > span, .option-progress > span { animation: none !important; transition: none !important; }
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--paper);
  background: #090909;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  height: 100dvh;
}

.chrome {
  flex: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.9rem;
  background: rgba(9,9,9,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand { display: flex; align-items: baseline; gap: 0.45rem; }
.wordmark { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; }
.chip {
  font-family: system-ui, sans-serif;
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--flame); color: #fff; font-weight: 800;
  padding: 0.22rem 0.5rem; border-radius: 999px;
}
.proof {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.65rem; letter-spacing: 0.05em;
  color: rgba(255,253,248,0.72);
  text-align: right;
  max-width: 55%;
}

.toggles {
  flex: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 0.3rem 0.75rem 0.34rem;
  background: rgba(12,12,12,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  max-height: 42dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.toggle-block { min-width: 0; }
/* Row names stay for screen readers; chips ("All vibes", "Any time", dates…)
   and per-row selected colours make each row self-explanatory. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.pill-row {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
/* One line, horizontally scrollable, edge fade on the side with more. */
.pill-row.scroll {
  position: relative;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 2.5rem;
  margin-inline: -0.75rem;
  padding: 2px 0.75rem;
  --fade: 2.6rem;
}
/* Neighborhoods: two rows that scroll sideways together. */
.pill-row.scroll.two-row {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 4px 0.3rem;
  align-items: stretch;
}
.pill-row.scroll::-webkit-scrollbar { display: none; }
.pill-row.scroll.fade-r {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade)), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade)), transparent);
}
.pill-row.scroll.fade-l {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade));
          mask-image: linear-gradient(90deg, transparent, #000 var(--fade));
}
.pill-row.scroll.fade-l.fade-r {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.pill-row button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--paper);
  border-radius: 999px;
  padding: 0 0.7rem;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) {
  .pill-row button:hover { border-color: rgba(255,255,255,0.38); }
}
.pill-row button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -3px;
}
.pill-row button[aria-selected="true"] {
  background: var(--sun);
  color: var(--ink);
  border-color: transparent;
  font-weight: 800;
}
#party-row button[aria-selected="true"] { background: var(--mint); color: var(--ink); }
#night-row button[aria-selected="true"] { background: var(--flame); color: #fff; }
#hood-row button[aria-selected="true"] { background: var(--sky); color: var(--ink); }
#time-row button[aria-selected="true"] { background: #E8B4F8; color: var(--ink); }
/* Date chips: small weekday before "Sep 30". */
#night-row .dow {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.62;
}
#night-row button[aria-selected="true"] .dow { opacity: 0.85; }

/* "With" chips share their line with the Flexible switch. */
.with-flex {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.with-flex .pill-row.scroll {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 0;
  padding-right: 0.2rem;
}
.flex-switch {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: rgba(255,253,248,0.78);
  font-family: system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 0 0 0.2rem;
}
.flex-switch:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; border-radius: 6px; }
.flex-track {
  position: relative;
  width: 2.35rem;
  height: 1.28rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.flex-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: rgba(255,253,248,0.85);
  transition: transform 0.18s ease, background 0.18s ease;
}
.flex-switch[aria-checked="true"] .flex-track {
  background: rgba(184,242,194,0.35);
  border-color: var(--mint);
}
.flex-switch[aria-checked="true"] .flex-thumb {
  transform: translateX(1.05rem);
  background: var(--mint);
}
.flex-switch[aria-checked="true"] .flex-name { color: var(--mint); font-weight: 700; }
.flex-cue {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.35rem;
  font-family: system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,253,248,0.62);
  border: 1px dashed rgba(255,253,248,0.35);
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
}

.deck {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.lane {
  position: relative;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: #090909;
  /* Peek geometry: active card 84% wide, neighbors peek ~6.5% at each edge. */
  --card-w: 84cqw;
  --gap: 1.5cqw;
  --edge: calc((100cqw - var(--card-w)) / 2);
}

.lane-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem var(--edge) 0.45rem;
}
.lane-heading {
  margin: 0;
  font-size: clamp(1.35rem, 5.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #fff;
}
.option-count {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: rgba(255,253,248,0.55);
  white-space: nowrap;
}

.lane-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.option-track {
  position: relative;
  height: 100%;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.option-track::-webkit-scrollbar { display: none; }
/* Spacers so first/last cards can center (more reliable than end padding). */
.option-track::before,
.option-track::after {
  content: "";
  flex: 0 0 calc(var(--edge) - var(--gap));
}
.option-track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.opt-card {
  position: relative;
  flex: 0 0 var(--card-w);
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: #16100e;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  transform: scale(0.94);
  opacity: 0.45;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.35s ease;
}
.opt-card.is-before { transform-origin: right center; }
.opt-card.is-after { transform-origin: left center; }
.opt-card.is-active {
  transform: none;
  opacity: 1;
  cursor: auto;
}
.opt-card:not(.is-active) .photo-ticks { opacity: 0; }

.option-panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
}

.lane-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: -1.125rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,10,10,0.5);
  color: rgba(255,253,248,0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(8px);
}
.lane-nav.prev { left: max(0.25rem, calc(var(--edge) / 2 - 1.125rem)); }
.lane-nav.next { right: max(0.25rem, calc(var(--edge) / 2 - 1.125rem)); }
.lane-nav:disabled { visibility: hidden; }
@media (hover: hover) and (pointer: fine) {
  .lane:hover .lane-nav { opacity: 0.55; }
  .lane .lane-nav:hover,
  .lane-nav:focus-visible { opacity: 1; background: rgba(10,10,10,0.72); }
}
@media not all and (hover: hover) {
  .lane-nav { display: none; }
}

.lane-foot {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.9rem;
  padding: 0.2rem var(--edge) calc(0.2rem + env(safe-area-inset-bottom, 0px));
}
.option-dots {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.option-dots > span {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  transition: width 0.25s ease, background 0.25s ease;
}
.option-dots > span.is-on {
  width: 1.1rem;
  background: rgba(255,253,248,0.9);
}
.option-progress {
  position: relative;
  display: block;
  width: 4.5rem;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.16);
  overflow: hidden;
}
.option-progress > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 12%;
  border-radius: 3px;
  background: rgba(255,253,248,0.85);
  transition: left 0.25s ease;
}
.swipe-hint {
  justify-self: end;
  font-family: system-ui, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,253,248,0.42);
  white-space: nowrap;
}
.swipe-hint::before { content: "\2191  "; }

.photo-ticks {
  position: absolute;
  top: 0.7rem;
  left: 0.9rem;
  right: 0.9rem;
  z-index: 3;
  display: flex;
  gap: 4px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.photo-ticks > span {
  flex: 1;
  height: 2.5px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  transition: background 0.3s ease;
}
.photo-ticks > span.is-on { background: rgba(255,255,255,0.92); }

.bg-stack {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #1a1210;
}
.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
  transform: scale(1.06);
  /* Gentle pop: a touch more colour, contrast and light — not oversaturated. */
  filter: saturate(1.12) contrast(1.05) brightness(1.03);
}
.bg-slide.is-active {
  opacity: 1;
}
.bg-slide.ken-burns {
  opacity: 1;
  animation: kenburns 14s ease-in-out infinite alternate;
}
@keyframes kenburns {
  0% { transform: scale(1.04) translate(0, 0); }
  100% { transform: scale(1.14) translate(-2%, -1.5%); }
}
.bg-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #3d2218 0%, #FF5A36 48%, #FFCC33 100%);
}
.bg-fallback .lettermark {
  font-family: Georgia, serif;
  font-size: clamp(5rem, 28vw, 9rem);
  font-weight: 700;
  color: rgba(255,253,248,0.22);
  letter-spacing: -0.06em;
  user-select: none;
}
.shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.42) 0%,
    rgba(0,0,0,0.2) 28%,
    rgba(0,0,0,0.35) 48%,
    rgba(0,0,0,0.92) 100%
  );
  pointer-events: none;
}

.copy {
  position: relative;
  z-index: 2;
  padding: clamp(1.1rem, 3.5vw, 2rem);
  padding-top: 2.2rem;
  padding-bottom: clamp(1rem, 3vw, 1.6rem);
  max-width: 36rem;
  width: 100%;
}
.eyebrow {
  font-family: system-ui, sans-serif;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sun); margin: 0 0 0.45rem; font-weight: 700;
}
.option-title {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.8rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.meta, .note, .lede { font-family: system-ui, sans-serif; }
.meta { margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--soft); }
.note {
  margin: 0.65rem 0 0; font-size: 0.98rem; color: rgba(255,253,248,0.94); max-width: 30rem;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.lede { margin: 0.5rem 0 0; font-size: 0.95rem; color: var(--soft); }

.pills { display: flex; flex-wrap: wrap; gap: 0.32rem; margin-bottom: 0.45rem; }
.pill {
  display: inline-flex; align-items: center;
  font-family: system-ui, sans-serif;
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 999px; padding: 0.26rem 0.52rem; font-weight: 800;
  border: 1px solid transparent;
}
.pill.vibe { background: var(--flame); color: #fff; }
.pill.party { background: var(--mint); color: var(--ink); }
.pill.hood { background: rgba(126,200,227,0.92); color: var(--ink); }
.pill.time { background: rgba(232,180,248,0.92); color: var(--ink); }
.pill.soft { background: rgba(255,255,255,0.12); color: #fff; border-color: var(--line); }
.pill.is-match {
  box-shadow: 0 0 0 1.5px rgba(255,253,248,0.85);
}
.pill.is-flex {
  opacity: 0.92;
  border-style: dashed;
  border-color: rgba(255,253,248,0.45);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.btn {
  font-family: system-ui, sans-serif;
  font-size: 0.88rem; font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.05rem;
  border: 1px solid transparent;
  display: inline-flex; align-items: center;
  cursor: pointer;
  color: var(--ink);
  background: var(--sun);
}
.btn.ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.btn.flame { background: var(--flame); color: #fff; }

.empty-lane .copy {
  margin: auto;
  text-align: center;
  max-width: 22rem;
}
.empty-lane .option-title { font-size: clamp(1.5rem, 6vw, 2.1rem); }

/* Links to venue pages (/v/<slug>) — keep the card look, just make names tappable. */
.option-title .title-link { color: inherit; text-decoration: none; }
.option-title .title-link:hover, .option-title .title-link:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.meta .venue-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,253,248,0.45); text-underline-offset: 0.18em; }
