:root {
  color-scheme: dark;
  --page: #161a17;
  --surface: #202622;
  --field: #222923;
  --raised: #2b342c;
  --line: #39423a;
  --text: #f1f0e7;
  --muted: #aeb9ac;
  --accent: #b4d6a9;
  --accent-ink: #1d321e;
  --peach: #e5b18b;
  --radius: 9px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 0;
  background: var(--page);
  color: var(--text);
  font: 400 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1380px; padding-inline: clamp(22px, 3.5vw, 52px); margin-inline: auto; }
.topbar { border-bottom: 1px solid #ffffff0e; }
.topbar-inner { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 720; letter-spacing: -.055em; white-space: nowrap; }
.brandmark { display: grid; place-items: center; width: 22px; height: 28px; color: var(--accent); }
.dot { color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.android-download { display: inline-flex; align-items: center; gap: 5px; min-height: 42px; padding: 4px 0; color: var(--muted); font-size: 12px; font-weight: 560; white-space: nowrap; }
.android-app .android-download { display: none; }
.guide-help { position: relative; }
.guide-help summary { display: grid; place-items: center; width: 36px; height: 42px; list-style: none; color: var(--muted); }
.guide-help summary::-webkit-details-marker, .map-drawer summary::-webkit-details-marker { display: none; }
.guide-help summary span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 650; line-height: 1; }
.help-content { position: absolute; z-index: 1200; top: calc(100% + 7px); right: 0; width: min(340px, calc(100vw - 32px)); padding: 4px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 14px 36px #0005; color: var(--muted); font-size: 13px; }
.help-content p { margin: 12px 0; }
.help-content strong { color: var(--text); }

.directory { display: block; padding-top: 25px; padding-bottom: 55px; }
.directory h1 { margin: 0 0 20px; font-size: 36px; font-weight: 710; letter-spacing: -.055em; line-height: 1.08; }
.location-panel { min-width: 0; padding: 0; margin: 0 0 23px; border: 0; background: transparent; }
.location-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px 90px; align-items: end; gap: 12px; }
.location-heading.citywide-area { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px 90px; }
.preset-picker, .point-b-picker, .radius-picker { display: grid; gap: 5px; min-width: 0; }
.preset-picker { grid-column: 1; grid-row: 1; }
.point-b-picker { grid-column: 2; grid-row: 1; }
.radius-picker { grid-column: 3; grid-row: 1; }
.location-small { display: flex; align-items: center; gap: 5px; min-height: 18px; color: var(--muted); font-size: 11px; font-weight: 500; }
.point-label { color: var(--accent); font-size: 11px; font-weight: 750; }
.point-label-b { color: var(--peach); }
.optional { color: var(--muted); font-weight: 400; }
.location-heading select {
  appearance: none; width: 100%; min-width: 0; height: 43px; padding: 0 30px 0 12px;
  border: 0; border-bottom: 1px solid #52614f; border-radius: 4px 4px 0 0;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 15px) 50% / 4px 4px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 11px) 50% / 4px 4px no-repeat, var(--field);
  color: var(--text); text-overflow: ellipsis; font-size: 14px; font-weight: 510;
}
.location-heading select:focus-visible { outline-offset: 2px; }
.location-heading option { background: var(--field); color: var(--text); }
.location-heading option:disabled { color: var(--muted); }
.location-status, .coverage-warning, .hours-status { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.location-feedback { display: flex; align-items: baseline; gap: 8px; }
#route-retry { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; text-decoration: underline; }
.coverage-warning, .hours-status { color: var(--peach); }
.hours-status { margin: -3px 0 13px; }
.address-picker { width: 100%; max-width: 760px; min-width: 0; margin-top: 15px; }
.address-form { min-width: 0; }
.address-form > label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.address-input-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.address-input-row input {
  flex: 1 1 0; width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px;
  border: 0; border-bottom: 1px solid #52614f; border-radius: 4px 4px 0 0;
  background: var(--field); color: var(--text); font-size: 15px;
}
.address-input-row input::placeholder { color: var(--muted); }
.address-input-row button { flex: none; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 4px; font-size: 13px; font-weight: 560; }
#address-search { background: var(--raised); color: var(--accent); }
#address-cancel { padding-inline: 5px; background: transparent; color: var(--muted); }
.address-input-row button:disabled { opacity: .55; cursor: wait; }
.address-status { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.address-results { max-height: 280px; margin: 8px 0 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.address-results li { min-width: 0; margin: 0; padding: 0; }
.address-results li + li { border-top: 1px solid var(--line); }
.address-results button { display: block; width: 100%; min-height: 44px; padding: 11px 6px; border: 0; border-radius: 0; background: transparent; color: var(--text); text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.address-results button:focus-visible { outline-offset: -2px; }
.address-results button small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.address-results button:hover, #address-search:hover { background: var(--raised); }
#address-cancel:hover { color: var(--text); }
.address-attribution { display: inline-block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.address-attribution + .address-attribution { margin-inline-start: 8px; }
.address-attribution:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.map-drawer { grid-column: 4; grid-row: 1; min-width: 0; }
.map-drawer > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 7px; list-style: none; color: var(--accent); font-size: 13px; font-weight: 580; }
.map-drawer > summary::after { content: '+'; margin-left: 1px; font-size: 18px; line-height: 1; font-weight: 400; }
.map-drawer[open] > summary::after { content: '−'; }
.map-drawer[open] { grid-column: 1 / -1; grid-row: 2; }
.map-drawer[open] > summary { justify-content: flex-start; min-height: 35px; padding-inline: 0; }
.pin-icon { position: relative; display: inline-block; width: 11px; height: 11px; margin: 0 2px 3px; border: 1.5px solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.pin-icon::after { content: ''; position: absolute; inset: 2.5px; border: 1px solid currentColor; border-radius: 50%; }
.brandmark .pin-icon { width: 17px; height: 17px; border-width: 2px; }
.brandmark .pin-icon::after { inset: 4px; border-width: 1.5px; }
#location-map { position: relative; width: 100%; height: 285px; margin-top: 4px; overflow: hidden; border-radius: 5px; background: #d3ded0; color: #243329; z-index: 0; }
.location-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.location-controls a { color: var(--accent); font-size: 12px; font-weight: 550; }
.map-targets { display: flex; gap: 6px; }
.map-targets button { min-height: 38px; padding: 5px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; }
.map-targets button[aria-pressed=true] { border-bottom-color: var(--accent); color: var(--text); }
.point-marker span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px #0005; color: #fff; font: 750 14px system-ui, sans-serif; }
.point-a { background: #3b543d; }
.point-b { background: #ae502d; }

.results { min-width: 0; }
.results-toolbar { display: flex; align-items: center; gap: 24px; padding-bottom: 0; border-bottom: 1px solid var(--line); }
.food-scope-picker { flex: 0 1 auto; min-width: 0; }
.food-scope-buttons { display: flex; gap: 23px; min-width: 0; }
.food-scope-buttons button { min-height: 46px; min-width: 0; padding: 5px 0 9px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.food-scope-buttons button.active { border-bottom-color: var(--accent); color: var(--text); }
.search { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; max-width: 370px; height: 42px; min-width: 0; margin-left: auto; padding: 0 1px; color: var(--muted); }
.search-icon { position: relative; flex: 0 0 13px; height: 13px; margin-right: 2px; border: 1.6px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ''; position: absolute; left: 8px; top: 9px; width: 6px; height: 1.6px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { color: var(--accent); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 7px 0 16px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.filters button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 5px 10px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
.filters button:first-child { margin-left: -10px; }
.filters button[aria-pressed=true] { background: #ffffff09; color: var(--accent); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #849081; }
#open-now[aria-pressed=true] .status-dot { background: var(--accent); }
.result-count { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 0; border-radius: var(--radius); background: var(--surface); }
.card-image { position: relative; height: clamp(175px, 19vw, 240px); overflow: hidden; background: #262e27; }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 16px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.category { color: var(--accent); font-size: 11px; font-weight: 540; overflow-wrap: anywhere; }
.distance { flex: none; padding: 0; color: var(--muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card h3 { margin: 7px 0 5px; font-size: clamp(20px, 1.7vw, 24px); line-height: 1.15; letter-spacing: -.035em; font-weight: 690; overflow-wrap: anywhere; }
.address { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.card-metrics { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 15px; }
.rating { min-width: 0; color: var(--text); font-size: 15px; font-weight: 680; }
.rating-value { display: block; line-height: 1.15; }
.rating .star { color: #e9c283; }
.rating small, .rating-detail, .rating.unrated { color: var(--muted); font-size: 11px; font-weight: 450; }
.rating-detail { display: block; margin-top: 4px; }
.rating:hover .rating-value { text-decoration: underline; }
.score-row { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--accent); font-variant-numeric: tabular-nums; }
.score-row strong { font-size: 22px; line-height: 1; font-weight: 650; }
.score-row span { color: var(--muted); font-size: 10px; font-weight: 450; }
.business-status, .opening-note { align-self: flex-start; margin-top: 9px; font-size: 12px; font-weight: 550; }
.temporary-closed { color: var(--peach); }
.opening-note { color: var(--accent); }
.card-bottom { margin-top: auto; padding-top: 15px; }
.map-link { display: inline-flex; align-items: center; gap: 7px; min-height: 39px; padding: 5px 0; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; }
.carousel { position: relative; width: 100%; height: 100%; }
.carousel-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; touch-action: pan-x pan-y; }
.carousel-track:focus-visible { outline-offset: -3px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.photo-slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; overflow: hidden; scroll-snap-align: start; background: #29312a; }
.photo-slide img { user-select: none; -webkit-user-drag: none; }
.photo-pending { display: grid; place-items: center; background: #262e27; color: var(--muted); font-size: 12px; }
.photo-tag, .photo-count, .carousel-button { position: absolute; border: 0; color: #fff; background: #101711d9; }
.photo-tag { bottom: 9px; left: 9px; min-width: 32px; padding: 4px 8px; border-radius: 4px; text-align: center; }
.photo-count { top: 10px; right: 10px; padding: 4px 7px; border-radius: 4px; font-size: 11px; font-weight: 550; font-variant-numeric: tabular-nums; pointer-events: none; }
.carousel-button { display: grid; place-items: center; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0 0 2px; border-radius: 50%; font-size: 25px; line-height: 1; }
.carousel-button.prev { left: 9px; }
.carousel-button.next { right: 9px; }
.load-error, .empty { padding: 24px 12px; color: var(--muted); text-align: center; }
.load-error { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.load-error button, .load-more { min-height: 42px; padding: 7px 14px; border: 0; border-radius: 4px; background: var(--raised); color: var(--accent); font-weight: 550; }
.empty strong { color: var(--text); font-size: 18px; font-weight: 600; }
.empty p { margin: 5px 0 0; font-size: 13px; }
.more-wrap { margin-top: 24px; text-align: center; }
@media (hover: hover) {
  .android-download:hover, .guide-help summary:hover, .map-link:hover, .map-drawer > summary:hover, .filters button:hover { color: var(--text); }
  .map-link:hover, .android-download:hover { text-decoration: underline; text-underline-offset: 4px; }
  .location-heading select:hover { border-bottom-color: var(--accent); }
  .food-scope-buttons button:not(.active):hover { color: var(--text); }
  .carousel-button:hover, .photo-tag:hover, .load-more:hover, .load-error button:hover { background: #364638; }
}
@media (max-width: 1020px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .location-heading { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px 70px; gap: 9px; }
  .results-toolbar { gap: 18px; }
  .food-scope-buttons { gap: 17px; }
}
