/* Playbook — quiet, editorial, one accent. Follows the visitor's light/dark setting. */

:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --inset: #faf9f5;
  --ink: #131313;
  --muted: #6b6861;
  --faint: #98948b;
  --line: #e5e0d5;
  --line-strong: #cdc6b7;
  --accent: #86692f; /* brass, as text or line */
  --accent-fill: #b89a5e; /* brass, as a fill */
  --on-accent: #17130a;
  --shadow: 0 1px 0 rgb(0 0 0 / 0.02), 0 28px 56px -36px rgb(52 40 12 / 0.28);
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #131314;
    --inset: #18181a;
    --ink: #f1eee7;
    --muted: #9a968d;
    --faint: #716e68;
    --line: #232325;
    --line-strong: #38383b;
    --accent: #d2b67c;
    --accent-fill: #d2b67c;
    --on-accent: #17130a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: min(100% - 40px, 760px); margin-inline: auto; }

button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

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

/* ── Header ───────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 21px/1 var(--serif);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg { color: var(--accent); }

.cities { display: flex; gap: 22px; }
.cities a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.cities a:hover { color: var(--ink); }
.cities a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.hero { padding: 56px 0 30px; }

h1 {
  margin: 0;
  font: 400 clamp(38px, 7.4vw, 60px)/1.04 var(--serif);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede { margin: 14px 0 0; color: var(--muted); font-size: 16px; }

/* ── Search ───────────────────────────────────────────── */

.search {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* The next two weeks, one tap each. */
.days {
  display: flex;
  gap: 4px;
  margin-inline: -16px;
  padding: 2px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.days::-webkit-scrollbar { display: none; }
/* Fade the right edge so it's clear the row keeps going. */
.days, .filters {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}

.day {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  min-width: 66px;
  padding: 10px 12px 11px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: center;
  scroll-snap-align: start;
  transition: background 0.15s, color 0.15s;
}
.day span {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.day b { font: 500 15px/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.day:hover { background: var(--inset); }
.day[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.day[aria-pressed="true"] span { color: inherit; opacity: 0.6; }

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

.control {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 58px;
  padding: 0 14px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--inset);
  transition: border-color 0.15s;
}
.control:hover, .control:focus-within { border-color: var(--line-strong); }

.control-label {
  position: absolute;
  top: 10px;
  left: 14px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.control select {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 20px 40px 0 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}
.control select:focus-visible { outline-offset: 0; border-radius: 16px; }
.chevron { position: absolute; right: 16px; top: 50%; color: var(--muted); pointer-events: none; }

.control output { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.stepper { display: flex; gap: 6px; margin-left: auto; align-self: center; margin-bottom: -9px; }
.stepper button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.stepper button:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stepper button:disabled { opacity: 0.3; cursor: default; }

/* Activity filter: a single quiet row that scrolls sideways on small screens. */
.filters {
  display: flex;
  gap: 8px;
  margin: 18px -20px 0;
  padding: 2px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.pill {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pill:hover { border-color: var(--line-strong); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ── Results ──────────────────────────────────────────── */

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin: 34px 0 2px;
}

.summary { margin: 0; color: var(--muted); font-size: 15px; }
.summary b { color: var(--ink); font-weight: 600; }

.fresh { margin: 0 0 8px; color: var(--faint); font-size: 13px; white-space: nowrap; }
.refresh {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.refresh:hover { color: var(--ink); text-decoration-color: currentColor; }

.venue { padding: 26px 0 28px; border-top: 1px solid var(--line); }

.venue-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2px 14px;
}
.emblem { width: 40px; height: 40px; }
.venue h2 a { text-decoration: none; }
.venue h2 a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 5px; }

.venue h2 { margin: 0; font: 500 24px/1.2 var(--serif); letter-spacing: -0.015em; }

.kicker {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.offer { margin-top: 16px; }

.offer-head { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0 0 9px; font-size: 13.5px; }
.offer-head b { font-weight: 600; }
.offer-head span { color: var(--muted); }

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

.slot {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 36px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.slot small { color: var(--muted); font-size: 12px; font-weight: 500; }
.slot:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.slot:hover small { color: inherit; opacity: 0.7; }

/* The exact time you asked for. */
.slot.exact { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.slot.exact small { color: inherit; opacity: 0.75; }

/* Not what you asked for, but the nearest there is. */
.slot.other { border-style: dashed; color: var(--muted); }

.more {
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.more:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Heading above a run of venue cards (e.g. the ones with only nearby times). */
.divider { margin: 44px 0 0; padding-bottom: 14px; }
.divider + .venue { padding-top: 22px; }

/* Loading placeholder */
.skeleton { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.skeleton i {
  width: 82px;
  height: 38px;
  border-radius: 11px;
  background: var(--line);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
.skeleton i:nth-child(2) { animation-delay: 0.12s; }
.skeleton i:nth-child(3) { animation-delay: 0.24s; }
.skeleton i:nth-child(4) { animation-delay: 0.36s; }
@keyframes pulse { to { opacity: 0.35; } }

/* Compact lists: venues with nothing online, and venues we can only link to. */
.section { margin: 44px 0 0; }
.section > .kicker { padding-bottom: 12px; }

.rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); column-gap: 36px; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.row-text { min-width: 0; }
.row-name { display: block; font: 500 17px/1.3 var(--serif); letter-spacing: -0.01em; }
.row-note { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.row svg { flex: 0 0 auto; color: var(--faint); transition: transform 0.15s, color 0.15s; }
.row:hover svg { color: var(--accent); transform: translate(2px, -2px); }
.row:hover .row-name { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }

.empty { padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }

.foot { margin: 56px 0 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
.foot p { margin: 0; max-width: 62ch; }

/* ── Search box, sort and map toggle ──────────────────── */

.ask {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--inset);
  color: var(--muted);
  transition: border-color 0.15s;
}
.ask:hover, .ask:focus-within { border-color: var(--line-strong); }
.ask svg { flex: 0 0 auto; }
.ask input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.ask input::placeholder { color: var(--faint); }

.tools { display: flex; align-items: center; gap: 14px; }
.sort { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; }
.sort select {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  appearance: none;
  cursor: pointer;
}
.toggle {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.toggle:hover { border-color: var(--ink); }
.toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ── Map ──────────────────────────────────────────────── */

.map {
  position: relative;
  z-index: 0;
  height: 400px;
  margin: 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--inset);
}
.map[hidden] { display: none; }
.leaflet-container { background: var(--inset); font: inherit; }
/* Quieten the street map so it sits with the rest of the page. */
.leaflet-tile-pane { filter: grayscale(1) contrast(0.92) brightness(1.05) sepia(0.14); }

.pin { box-sizing: border-box; border-radius: 50%; }
.pin.open { border: 2px solid var(--surface); background: var(--accent-fill); box-shadow: 0 0 0 1px var(--accent-fill), 0 2px 6px rgb(0 0 0 / 0.35); }
.pin.quiet { border: 2px solid var(--muted); background: var(--surface); }
.pin.link { border: 2px dashed var(--faint); background: var(--surface); }

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 32px -14px rgb(0 0 0 / 0.5);
}
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 14px 16px; font-size: 14px; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.pop-name { display: block; font: 500 17px/1.25 var(--serif); letter-spacing: -0.01em; text-decoration: none; }
.leaflet-container a.pop-name, .leaflet-container a.slot { color: var(--ink); }
.leaflet-container a.slot:hover { color: var(--bg); }
.pop .kicker { margin: 4px 0 10px; }
.pop .slots { gap: 6px; margin-bottom: 10px; }
.pop .slot { height: 32px; padding: 0 10px; font-size: 13px; line-height: 30px; }
.pop .row-note { margin: 0 0 10px; }
.leaflet-container a.pop-more { color: var(--muted); font-size: 13px; text-underline-offset: 3px; }
.leaflet-bar a, .leaflet-bar a:hover { border-bottom-color: var(--line); background: var(--surface); color: var(--ink); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--faint); font-size: 10.5px; }
.leaflet-container .leaflet-control-attribution a { color: var(--muted); }

/* ── Venue pages and guide text ───────────────────────── */

.crumbs { padding-top: 22px; color: var(--faint); font-size: 13px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs + .hero { padding-top: 26px; }

.venue-hero { display: flex; align-items: center; gap: 26px; }
.venue-hero h1 { font-size: clamp(32px, 6vw, 50px); }
.venue-hero .kicker { margin-bottom: 10px; }
.emblem-large { flex: 0 0 auto; width: 104px; height: 104px; }

.section-heading { margin: 4px 0 14px; font: 500 22px/1.25 var(--serif); letter-spacing: -0.01em; }

.cta {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cta:hover { background: var(--accent-fill); color: var(--on-accent); }
.cta-row { margin: 14px 0 0; }
.aside { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.guide { margin-top: 56px; border-top: 1px solid var(--line); }
.guide h2 { margin: 34px 0 10px; font: 500 22px/1.25 var(--serif); letter-spacing: -0.01em; }
.guide h3 { margin: 22px 0 6px; font-size: 15px; font-weight: 600; }
.guide p { max-width: 68ch; margin: 0 0 10px; color: var(--muted); }
.guide .map { max-width: 640px; height: 300px; }

.directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  column-gap: 28px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.directory li { padding: 10px 0; border-top: 1px solid var(--line); }
.directory a { display: block; font: 500 16px/1.3 var(--serif); letter-spacing: -0.01em; text-decoration: none; }
.directory a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.directory span { display: block; margin-top: 2px; color: var(--faint); font-size: 12.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips a {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.chips a:hover { border-color: var(--line-strong); color: var(--ink); }

.facts { max-width: 640px; margin: 12px 0 0; }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--faint); font-size: 13px; }
.facts dd { margin: 0; font-size: 14.5px; }
.facts a { text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.notes { max-width: 68ch; margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.notes li { margin-bottom: 4px; }

.explore {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px 40px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.explore ul { margin: 10px 0 0; padding: 0; columns: 2; column-gap: 20px; list-style: none; }
.explore li { margin-bottom: 6px; break-inside: avoid; }
.explore a { color: var(--muted); font-size: 13px; text-decoration: none; }
.explore a:hover { color: var(--ink); }
.explore .kicker a { color: inherit; }
.explore + .foot { margin-top: 28px; }
.foot a { color: var(--muted); text-underline-offset: 3px; }

@media (prefers-color-scheme: dark) {
  .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) grayscale(0.75) brightness(0.82) contrast(0.95); }
}

@media (max-width: 560px) {
  .venue-head { grid-template-columns: auto 1fr; }
  .venue-head .kicker { grid-column: 2; }
  .emblem { grid-row: span 2; }
  .venue-hero { align-items: flex-start; gap: 16px; }
  .emblem-large { width: 64px; height: 64px; }
  .map { height: 320px; }
  .facts div { grid-template-columns: 112px 1fr; }
  .tools { width: 100%; justify-content: space-between; }
  .wrap { width: min(100% - 32px, 760px); }
  .top { padding-top: 20px; }
  .cities { gap: 16px; }
  .hero { padding: 40px 0 24px; }
  .search { padding: 12px; border-radius: 20px; }
  .days { margin-inline: -12px; padding-inline: 12px; }
  .filters { margin-inline: -16px; padding-inline: 16px; }
  .venue { padding: 22px 0 24px; }
  .venue h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
