:root {
  --bg: #07090b;
  --bg-soft: #0b0e11;
  --panel: #111418;
  --panel-2: #171b20;
  --panel-3: #1d2228;
  --line: #2a3038;
  --line-soft: #20252b;
  --text: #f8f9fa;
  --muted: #9aa4ae;
  --muted-2: #707a84;
  --red: #d51e2b;
  --red-bright: #f02d3a;
  --red-dark: #94121b;
  --green: #35b466;
  --gold: #e9b949;
  --blue: #3d8bfd;
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% -5%, rgba(213, 30, 43, .24), transparent 30%),
    radial-gradient(circle at 96% 4%, rgba(255, 255, 255, .055), transparent 27%),
    linear-gradient(180deg, #080a0d 0%, #060708 100%);
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.finder-shell { width: min(1540px, 100%); margin: 0 auto; padding: 26px; }
.finder-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 10px 4px 24px;
}
.finder-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(213,30,43,.5), var(--line-soft), transparent);
}
.brand-lockup { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-chip {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  grid-auto-flow: column;
  gap: 2px;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -.08em;
  color: #fff;
  border: 5px dashed rgba(255,255,255,.84);
  outline: 4px solid var(--red-dark);
  background: radial-gradient(circle at 35% 30%, #f03b47, #b4121d 60%, #850b13 100%);
  box-shadow: 0 14px 36px rgba(213,30,43,.3), inset 0 0 0 3px rgba(0,0,0,.28);
}
.brand-chip .spade { letter-spacing: 0; }
.eyebrow { margin: 0 0 5px; color: #d8dde2; font-size: .72rem; letter-spacing: .17em; font-weight: 900; }
h1 { margin: 0; font-size: clamp(2.05rem, 4.1vw, 3.7rem); line-height: .96; letter-spacing: -.035em; }
h2 { margin: 3px 0 0; font-size: 1.35rem; letter-spacing: -.015em; }
.hero-copy { max-width: 760px; margin: 11px 0 0; color: var(--muted); line-height: 1.5; }
.hero-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.live { color: #bff5cf; border-color: rgba(53,180,102,.42); background: rgba(53,180,102,.12); }
.status-pill.demo { color: #ffe2a1; border-color: rgba(233,185,73,.35); background: rgba(233,185,73,.1); }
.hero-free { margin: 0; color: #d8dde1; font-weight: 800; font-size: .82rem; }
.hero-free span { color: var(--green); margin-right: 5px; }

.finder-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(145px, .55fr) minmax(145px, .55fr) auto;
  gap: 12px;
  padding: 18px 0 12px;
  align-items: end;
}
.control-group { min-width: 0; }
.control-group label { display: block; margin: 0 0 7px 2px; color: #c7cdd3; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.input-shell { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-52%); color: #89939e; font-size: 1.45rem; line-height: 1; pointer-events: none; }
input, select, .filter-button, .location-button {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--panel);
}
input { padding: 0 14px 0 43px; }
select { padding: 0 38px 0 13px; cursor: pointer; }
input::placeholder { color: #737d87; }
input:focus, select:focus, .filter-button:focus-visible, .location-button:focus-visible, .clear-button:focus-visible, .map-button:focus-visible {
  border-color: #656d75;
  box-shadow: 0 0 0 3px rgba(255,255,255,.065);
}
.control-actions { display: grid; grid-template-columns: auto auto; gap: 10px; }
.filter-button, .location-button { padding: 0 16px; cursor: pointer; font-weight: 850; white-space: nowrap; }
.filter-button { background: var(--panel-2); }
.filter-button:hover { background: var(--panel-3); }
.filter-button[aria-pressed="true"] { color: #fff; border-color: var(--red); background: rgba(213,30,43,.16); box-shadow: inset 0 0 0 1px rgba(213,30,43,.3); }
.location-button { border-color: var(--red); background: linear-gradient(180deg, var(--red-bright), var(--red)); box-shadow: 0 8px 20px rgba(213,30,43,.18); }
.location-button:hover { filter: brightness(1.07); }
.location-button:disabled { opacity: .72; cursor: wait; }

.finder-summary {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(260px, 1.2fr) auto;
  gap: 0;
  align-items: center;
  margin: 0 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(17,20,24,.72);
  overflow: hidden;
}
.summary-item { min-width: 0; padding: 11px 15px; border-right: 1px solid var(--line-soft); }
.summary-label { display: block; color: var(--muted-2); font-size: .67rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.summary-item strong { display: block; margin-top: 2px; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-tip strong { color: #cfd5da; font-weight: 720; }
.clear-button { margin: 0 10px; padding: 8px 10px; border: 0; border-radius: 9px; color: #f39da4; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.clear-button:hover { background: rgba(213,30,43,.08); }

.finder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 14px; min-height: 500px; }
.map-card, .results-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.map-card { display: grid; grid-template-rows: auto 1fr auto; min-height: 500px; }
.map-topbar, .map-bottom-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.map-topbar { min-height: 52px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.map-topbar > div { display: flex; align-items: center; gap: 9px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 0 5px rgba(213,30,43,.13); }
.map-button { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; color: #d5dae0; background: var(--panel-2); cursor: pointer; font-size: .76rem; font-weight: 800; }
.map-button:hover { background: var(--panel-3); }
#map { width: 100%; height: 400px; min-height: 400px; background: #e9e5df; overflow: hidden; }
#map.leaflet-container { position: relative; }
.map-bottom-bar { min-height: 45px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; justify-content: flex-start; }
.map-bottom-bar span { display: inline-flex; align-items: center; gap: 7px; margin-right: 13px; }
.legend-marker { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; border: 2px solid #fff; background: var(--red); font-size: 8px; font-style: normal; font-weight: 950; box-shadow: 0 2px 7px rgba(0,0,0,.28); }
.legend-today { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(53,180,102,.14); }

.results-card { display: flex; flex-direction: column; min-height: 0; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px; border-bottom: 1px solid var(--line); }
.result-badge { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 999px; color: #fff; background: var(--red); font-size: .79rem; font-weight: 900; }
.venue-list { flex: 1; min-height: 0; overflow: auto; padding: 10px; scrollbar-color: #3a4149 transparent; }
.venue-card { margin-bottom: 10px; overflow: hidden; border: 1px solid #272d34; border-radius: 15px; background: linear-gradient(180deg, #191d22, #15191d); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.venue-card:hover { transform: translateY(-1px); border-color: #3a424b; box-shadow: 0 10px 25px rgba(0,0,0,.17); }
.venue-card.is-nearest { border-color: rgba(61,139,253,.52); box-shadow: inset 0 0 0 1px rgba(61,139,253,.08); }
.venue-card-main { display: block; width: 100%; padding: 14px 14px 11px; border: 0; text-align: left; color: inherit; background: transparent; cursor: pointer; }
.venue-card-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 9px; }
.district-badge, .today-badge, .distance-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; font-size: .66rem; font-weight: 900; letter-spacing: .02em; }
.district-badge { color: #ffacb1; border: 1px solid rgba(213,30,43,.32); background: rgba(213,30,43,.13); }
.today-badge { color: #a5edbc; border: 1px solid rgba(53,180,102,.3); background: rgba(53,180,102,.11); }
.distance-badge { margin-left: auto; color: #aed2ff; border: 1px solid rgba(61,139,253,.28); background: rgba(61,139,253,.1); }
.venue-name { margin: 0 0 5px; font-size: 1.08rem; line-height: 1.25; letter-spacing: -.01em; }
.venue-address { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.schedule-wrap { display: grid; gap: 6px; margin-top: 11px; }
.schedule-row { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: baseline; color: #dce1e5; font-size: .79rem; }
.schedule-day { color: #fff; font-weight: 850; }
.schedule-time { color: #aeb7bf; }
.schedule-row.today-row .schedule-day { color: #88e4a7; }
.venue-td { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #252b31; color: #939da6; font-size: .76rem; }
.venue-td strong { color: #cbd2d8; }
.venue-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 13px; }
.venue-actions button, .venue-actions a { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; text-decoration: none; font-size: .76rem; font-weight: 900; }
.details-button { color: #e7eaed; border: 1px solid #343b43; background: #22272d; }
.details-button:hover { background: #292f36; }
.directions-link { color: #fff; border: 1px solid var(--red); background: var(--red); }
.directions-link:hover { background: var(--red-bright); }
.empty-state { margin: auto; padding: 36px 28px; text-align: center; color: var(--muted); }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { margin: 8px 0 6px; color: var(--text); }
.empty-state span { font-size: .84rem; line-height: 1.5; }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; color: #fff; background: rgba(213,30,43,.16); border: 1px solid rgba(213,30,43,.25); }

.finder-footer { display: flex; justify-content: space-between; gap: 15px; padding: 14px 4px 0; color: #68717a; font-size: .73rem; }
.demo-note { color: #b69243; }

/* Leaflet */
.leaflet-control-zoom { border: 0 !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.18) !important; }
.leaflet-control-zoom a { border: 0 !important; border-bottom: 1px solid #e2ded8 !important; background: #fff !important; color: #17191c !important; }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-popup-content-wrapper { border-radius: 15px; border: 1px solid #d9d5cf; box-shadow: 0 12px 35px rgba(0,0,0,.22); }
.leaflet-popup-content { margin: 14px; }
.popup-content { min-width: 235px; color: #17191c; }
.popup-content h3 { margin: 2px 0 7px; font-size: 1.03rem; }
.popup-content p { margin: 5px 0; color: #59616a; line-height: 1.4; font-size: .8rem; }
.popup-content .popup-district { color: #b31520; font-weight: 900; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; }
.popup-content .popup-today { display: inline-flex; margin: 6px 0 2px; padding: 4px 7px; border-radius: 999px; color: #17763a; background: #e8f8ee; font-size: .67rem; font-weight: 900; }
.popup-content a { display: inline-flex; margin-top: 9px; padding: 8px 10px; border-radius: 8px; color: #fff; background: var(--red); text-decoration: none; font-weight: 900; font-size: .76rem; }
.poker-marker { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: radial-gradient(circle at 33% 28%, #ef3542, #c71925 62%, #9c1019); border: 3px solid #fff; box-shadow: 0 6px 15px rgba(0,0,0,.34); font-weight: 950; font-size: 12px; }
.poker-marker.today-marker::after { content: ""; position: absolute; width: 9px; height: 9px; right: -2px; top: -1px; border-radius: 50%; border: 2px solid #fff; background: var(--green); }
.user-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(61,139,253,.22), 0 4px 12px rgba(0,0,0,.25); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .finder-controls { grid-template-columns: 1.4fr .7fr .7fr; }
  .control-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .finder-grid { grid-template-columns: minmax(0, 1fr) 365px; }
  .summary-tip { display: none; }
  .finder-summary { grid-template-columns: auto 1fr auto; }
}

@media (max-width: 900px) {
  .finder-shell { padding: 17px; }
  .finder-grid { grid-template-columns: 1fr; min-height: auto; }
  .map-card { min-height: 0; }
  #map { height: 360px; min-height: 360px; }
  .results-card { max-height: 620px; }
  .hero-meta { align-items: flex-start; }
}

@media (max-width: 680px) {
  .finder-shell { padding: 12px; }
  .finder-hero { align-items: flex-start; padding-top: 4px; }
  .brand-chip { width: 58px; height: 58px; border-width: 4px; outline-width: 3px; font-size: 18px; }
  .hero-copy { font-size: .86rem; margin-top: 8px; }
  .hero-meta { display: none; }
  .finder-controls { grid-template-columns: 1fr 1fr; gap: 10px; }
  .control-search { grid-column: 1 / -1; }
  .control-actions { grid-column: 1 / -1; }
  .finder-summary { grid-template-columns: 1fr auto; }
  .summary-item:nth-child(2) { display: none; }
  .clear-button { margin-left: 0; }
  .map-topbar strong { font-size: .84rem; }
  #map { height: 320px; min-height: 320px; }
  .finder-footer { flex-direction: column; }
}

@media (max-width: 460px) {
  .finder-controls { grid-template-columns: 1fr; }
  .control-search, .control-actions { grid-column: auto; }
  .control-actions { grid-template-columns: 1fr 1fr; }
  .filter-button, .location-button { padding: 0 9px; font-size: .78rem; }
  .map-bottom-bar { flex-wrap: wrap; }
}
