:root {
  --navy: #08090b;
  --navy-2: #15171b;
  --red: #e32620;
  --cream: #18191d;
  --paper: #0b0c0f;
  --white: #f7f7f5;
  --ink: #f2f2f0;
  --muted: #a9adb4;
  --line: #303238;
  --box: #2b2e34;
  --box-dark: #17191d;
  --gold: #ffc400;
  --shadow: 0 18px 44px rgba(0,0,0,.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% -10%, #262a31 0, #111318 36%, #08090b 78%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-header { background: linear-gradient(135deg,#050608 0%,#121419 62%,#25100f 100%); color: white; padding: max(18px, env(safe-area-inset-top)) 16px 18px; border-bottom: 1px solid #3a2423; box-shadow: 0 8px 28px rgba(0,0,0,.48); }
.header-inner { max-width: 1120px; margin: auto; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 13px; }
.brand-mark { width: 50px; height: 50px; color: var(--red); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.eyebrow { margin: 0 0 2px; font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; color: #ef4a43; font-weight: 850; }
h1 { margin: 0; font-size: clamp(1.25rem, 3.5vw, 2rem); line-height: 1.05; }
.tagline { margin: 5px 0 0; color: #d6d8dc; font-size: .91rem; }
.install-button { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: white; border-radius: 999px; padding: 9px 13px; font-weight: 750; }
main { width: min(1120px, 100%); margin: auto; padding: 18px 14px 36px; }
.search-section { position: sticky; top: 0; z-index: 10; padding: 4px 0 12px; background: linear-gradient(var(--paper) 75%, rgba(11,12,15,0)); }
.search-box { background: #17191e; border: 1px solid var(--line); border-radius: 16px; min-height: 52px; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; padding: 0 8px; box-shadow: 0 6px 18px rgba(22,36,57,.08); }
.search-icon { font-size: 1.6rem; color: var(--muted); transform: rotate(-15deg); text-align: center; }
.search-box input { width: 100%; border: 0; outline: 0; min-width: 0; font-size: 1rem; background: transparent; }
.clear-search { border: 0; background: transparent; font-size: 1.5rem; color: var(--muted); }
.quick-filters { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: none; }
.quick-filters::-webkit-scrollbar { display: none; }
.filter-chip { white-space: nowrap; border: 1px solid var(--line); background: #17191e; border-radius: 999px; padding: 8px 12px; color: #ffffff; font-weight: 700; font-size: .86rem; }
.filter-chip.active { background: var(--red); color: white; border-color: #ff514b; box-shadow: 0 0 18px rgba(227,38,32,.24); }
.view-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: #17191e; border-radius: 14px; margin-bottom: 18px; }
.view-tab { border: 0; background: transparent; padding: 11px; border-radius: 10px; color: #a9adb4; font-weight: 800; }
.view-tab.active { background: linear-gradient(135deg,#e32620,#a70f0b); color: white; box-shadow: 0 6px 18px rgba(227,38,32,.28); }
.view-panel { display: none; }
.view-panel.active { display: block; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin: 0 2px 12px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 1.4rem; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.text-button { border: 0; background: transparent; color: var(--red); font-weight: 800; padding: 8px; }
.map-scroll { overflow: auto; overscroll-behavior-inline: contain; border-radius: 18px; box-shadow: var(--shadow); background: #101216; border: 1px solid #33363d; }
.fair-map { width: 100%; min-width: 760px; aspect-ratio: 11 / 8; position: relative; background: linear-gradient(145deg,#22252b,#111318); overflow: hidden; }
.fair-map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; }
.map-pavilion { position: absolute; left: 16%; top: 35%; width: 67%; height: 43%; border: 3px solid #e32620; border-radius: 10px; background: repeating-linear-gradient(45deg,#1b1d22,#1b1d22 14px,#22252b 14px,#22252b 28px); display: grid; place-content: center; text-align: center; color: var(--navy); box-shadow: inset 0 0 0 5px rgba(255,255,255,.4); }
.map-pavilion strong { font-size: clamp(1.2rem,3vw,2.4rem); }
.map-pavilion span { color: #b7bbc2; font-weight: 700; }
.map-vendor { position: absolute; border: 1px solid #555a64; background: linear-gradient(145deg,#343840,#24272d); color: #f4f4f2; border-radius: 7px; padding: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.05; box-shadow: 0 3px 8px rgba(22,36,57,.2); transition: transform .15s, background .15s, box-shadow .15s; overflow: hidden; }
.map-vendor:not(.blank):hover, .map-vendor:not(.blank):focus-visible { transform: scale(1.06); background: linear-gradient(145deg,#e32620,#9e100c); box-shadow: 0 8px 22px rgba(227,38,32,.35); outline: 3px solid rgba(255,196,0,.35); z-index: 3; }
.map-vendor.filtered { background: linear-gradient(145deg,#f0342d,#ad100c); color: white; border-color: #ff645e; box-shadow: 0 0 18px rgba(227,38,32,.35); }
.map-vendor.dimmed { opacity: .27; }
.map-vendor.blank { opacity: .42; cursor: default; border-style: dashed; box-shadow: none; }
.map-number { font-size: clamp(.85rem,1.5vw,1.25rem); font-weight: 900; }
.map-name { display: block; margin-top: 2px; font-size: clamp(.55rem,.95vw,.8rem); font-weight: 750; max-width: 100%; }
.north-marker { position: absolute; bottom: 1.1%; left: 45.5%; width: 9%; text-align: center; color: var(--navy); font-size: .66rem; font-weight: 900; letter-spacing: .15em; }
.north-marker b { display: block; font-size: 1.6rem; line-height: .8; color: var(--red); }
.map-note { position: absolute; top: 1.5%; left: 1.5%; font-size: .65rem; color: #c5c8ce; background: rgba(9,10,13,.82); padding: 4px 7px; border-radius: 999px; }
.map-help { color: var(--muted); font-size: .82rem; margin: 9px 4px 0; }
.sort-control { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--muted); font-weight: 800; }
.sort-control select { border: 1px solid var(--line); background: #17191e; border-radius: 9px; padding: 7px 9px; color: var(--navy); }
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 14px; }
.vendor-card { background: linear-gradient(180deg,#191b20,#111318); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; box-shadow: 0 8px 22px rgba(22,36,57,.09); display: flex; flex-direction: column; min-width: 0; }
.vendor-card button.card-open { all: unset; cursor: pointer; display: flex; flex-direction: column; height: 100%; }
.vendor-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #d9dde0; }
.vendor-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vendor-kicker { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vendor-location { color: var(--red); font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.vendor-status { color: #ffd866; background: #382f16; border-radius: 999px; padding: 3px 7px; font-size: .67rem; font-weight: 800; }
.vendor-card h3 { margin: 0; color: #f7f7f5; font-size: 1.08rem; line-height: 1.15; }
.vendor-card p { margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.4; }
.rating-row { display: flex; align-items: center; gap: 7px; margin-top: auto; }
.rating-stars { letter-spacing: 1px; color: #b8bec4; white-space: nowrap; }
.rating-stars .filled { color: var(--gold); }
.rating-text { font-size: .78rem; color: var(--muted); font-weight: 750; }
.food-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.food-tag { background: #24272d; color: #c9ccd1; border-radius: 999px; padding: 4px 7px; font-size: .69rem; font-weight: 700; }
.no-results { text-align: center; padding: 45px 20px; color: var(--muted); }
.no-results h3 { color: var(--navy); margin: 0 0 5px; }
 .rating-note { margin-top: 22px; background: #17191e; border: 1px solid #353840; border-left: 5px solid var(--red); padding: 13px 14px; border-radius: 10px; color: #c7cad0; font-size: .87rem; }
footer { text-align: center; padding: 22px 16px max(28px,env(safe-area-inset-bottom)); color: #6c737b; font-size: .76rem; }
footer p { margin: 4px; }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9,15,24,.66); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(680px,100%); max-height: 92vh; overflow-y: auto; margin: auto auto 0; background: #121419; border-radius: 22px 22px 0 0; box-shadow: 0 -15px 55px rgba(0,0,0,.25); animation: slideUp .18s ease-out; }
@keyframes slideUp { from { transform: translateY(35px); opacity: .3; } }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #4a4d55; background: rgba(8,9,11,.9); color: white; font-size: 1.5rem; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.modal-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #d9dde0; }
.modal-body { padding: 18px 17px max(24px,env(safe-area-inset-bottom)); }
.modal-location { color: var(--red); font-weight: 900; font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; }
.modal-body h2 { margin: 4px 0 8px; color: var(--navy); font-size: 1.55rem; line-height: 1.1; }
.modal-summary { color: var(--muted); margin: 0 0 18px; line-height: 1.45; }
.menu-panel, .rate-panel { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; }
.menu-panel h3, .rate-panel h3 { margin: 0 0 10px; color: var(--navy); }
.food-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: #d0d2d7; }
.modal-rating-summary { display: flex; align-items: center; gap: 11px; margin: 10px 0 15px; }
.big-rating { font-size: 2rem; font-weight: 900; color: var(--navy); }
.rate-stars { display: flex; gap: 4px; }
.rate-star { border: 0; background: transparent; color: #c8cdd1; font-size: 2.25rem; line-height: 1; padding: 3px; }
.rate-star.selected, .rate-star:hover, .rate-star:focus-visible { color: var(--gold); transform: translateY(-1px); }
.rate-help { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
.modal-actions { display: flex; gap: 9px; margin-top: 17px; }
.action-button { flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: #1a1c21; color: #f4f4f2; font-weight: 800; }
.action-button.primary { background: linear-gradient(135deg,#e32620,#a70f0b); color: white; border-color: #ff514b; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: max(20px,env(safe-area-inset-bottom)); transform: translate(-50%,25px); opacity: 0; pointer-events: none; background: #17202a; color: white; padding: 11px 15px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: .2s; max-width: calc(100% - 28px); text-align: center; font-size: .86rem; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 700px) {
  main { padding-top: 24px; }
  .search-section { position: static; background: transparent; }
  .modal { align-items: center; padding: 24px; }
  .modal-card { border-radius: 22px; margin: auto; }
}
@media (max-width: 520px) {
  .header-inner { grid-template-columns: 44px 1fr auto; }
  .brand-mark { width: 42px; height: 42px; }
  .install-button { padding: 8px 10px; font-size: .8rem; }
  .vendor-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: center; }
  .fair-map { min-width: 700px; }
}


/* v0.1.2 modern black/red theme */
h1, .section-heading h2, .modal-body h2, .menu-panel h3, .rate-panel h3, .big-rating { color: #f7f7f5; }
.search-box input { color: #f4f4f2; }
.search-box input::placeholder { color: #7e838c; }
.install-button { background: linear-gradient(135deg,#e32620,#a70f0b); border-color: #ff514b; box-shadow: 0 6px 18px rgba(227,38,32,.25); }
.vendor-photo, .modal-photo { filter: saturate(1.06) contrast(1.03); }
.vendor-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.vendor-card:hover { transform: translateY(-3px); border-color: #5b2c2a; box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 22px rgba(227,38,32,.08); }
.rating-stars .filled, .rate-star.selected, .rate-star:hover, .rate-star:focus-visible { text-shadow: 0 0 12px rgba(255,196,0,.35); }
footer { border-top: 1px solid #25282e; background: #07080a; }

footer a { color: #ffffff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
footer a:hover, footer a:focus { color: #ff514b; }


/* v0.1.4 dual quality and price ratings */
.rating-row.dual { display:grid; gap:8px; margin-top:auto; }
.rating-metric { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; }
.metric-name { width:48px; color:#fff; font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.rating-dollars { display:inline-flex; gap:2px; color:#586069; font-weight:950; letter-spacing:-1px; }
.rating-dollars .filled { color:#44d17a; text-shadow:0 0 10px rgba(68,209,122,.3); }
.dual-rating-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0 16px; }
.rating-summary-block { border:1px solid var(--line); background:rgba(255,255,255,.035); border-radius:14px; padding:12px; }
.rating-label { color:#fff; font-size:.78rem; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.rating-summary-block .modal-rating-summary { margin:7px 0 0; }
.rating-choice { border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.03); padding:12px; margin-top:10px; }
.rating-choice-heading { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-bottom:8px; }
.rating-choice-heading strong { color:#fff; }
.rating-choice-heading span { color:var(--muted); font-size:.8rem; }
.rate-dollars { display:flex; gap:5px; }
.rate-dollar { border:1px solid #5b626b; border-radius:9px; background:#141619; color:#747c85; min-width:43px; height:43px; font-size:1.25rem; font-weight:950; }
.rate-dollar.selected, .rate-dollar:hover, .rate-dollar:focus-visible { color:#fff; background:#13944b; border-color:#44d17a; box-shadow:0 0 14px rgba(68,209,122,.25); transform:translateY(-1px); }
@media (max-width:600px) {
  .dual-rating-summary { grid-template-columns:1fr; }
  .rating-choice-heading { align-items:flex-start; flex-direction:column; gap:2px; }
  .rate-star { font-size:2rem; }
  .rate-dollar { min-width:39px; }
}

/* v0.1.5 mobile-first usability update */
button, .filter-chip, .view-tab, .action-button, .rate-star, .rate-dollar { touch-action: manipulation; }
.map-scroll { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.modal-card { overscroll-behavior: contain; }

@media (max-width: 699px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  .app-header {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    position: relative;
  }
  .header-inner {
    grid-template-columns: 38px minmax(0,1fr) auto;
    gap: 9px;
  }
  .brand-mark { width: 36px; height: 36px; }
  .eyebrow { display: none; }
  h1 { font-size: clamp(1.02rem, 4.8vw, 1.28rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tagline { margin-top: 2px; font-size: .76rem; }
  .install-button { min-height: 40px; padding: 7px 10px; font-size: .78rem; }

  main { padding: 10px 10px 22px; }
  .search-section {
    top: 0;
    padding: 0 0 8px;
    background: rgba(11,12,15,.94);
    backdrop-filter: blur(12px);
  }
  .search-box { min-height: 48px; border-radius: 13px; }
  .quick-filters { padding-top: 8px; scroll-snap-type: x proximity; }
  .filter-chip { min-height: 40px; padding: 8px 13px; scroll-snap-align: start; }

  .view-tabs {
    position: fixed;
    z-index: 45;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    margin: 0;
    padding: 5px;
    border: 1px solid #383b43;
    border-radius: 17px;
    background: rgba(18,20,25,.96);
    box-shadow: 0 12px 35px rgba(0,0,0,.58);
    backdrop-filter: blur(14px);
  }
  .view-tab { min-height: 48px; font-size: .94rem; }
  .view-tab[data-view="map"]::before { content: "⌖ "; }
  .view-tab[data-view="browse"]::before { content: "☰ "; }

  .section-heading { align-items: flex-start; margin-top: 2px; gap: 8px; }
  .section-heading h2 { font-size: 1.18rem; }
  .section-heading p { font-size: .8rem; }
  .text-button { min-height: 40px; padding: 6px 3px; white-space: nowrap; }
  .sort-control select { min-height: 40px; max-width: 132px; }

  .map-scroll {
    border-radius: 14px;
    scroll-snap-type: x proximity;
  }
  .fair-map {
    width: 600px;
    min-width: 600px;
    height: 450px;
    aspect-ratio: auto;
    scroll-snap-align: start;
  }
  .map-vendor { min-width: 35px; min-height: 35px; padding: 2px; }
  .map-number { font-size: .9rem; }
  .map-name { display: none; }
  .map-pavilion strong { font-size: 1.3rem; }
  .map-pavilion span { font-size: .73rem; }
  .map-note { font-size: .58rem; }
  .map-help { font-size: .76rem; }

  .vendor-grid { gap: 11px; }
  .vendor-card { border-radius: 15px; }
  .vendor-photo { aspect-ratio: 16/9; }
  .vendor-body { padding: 12px; gap: 7px; }
  .vendor-card h3 { font-size: 1.03rem; }
  .vendor-card p { font-size: .83rem; }
  .food-tags { flex-wrap: nowrap; overflow: hidden; }
  .food-tag { white-space: nowrap; }
  .rating-row.dual { padding-top: 2px; }
  .rating-metric { display: grid; grid-template-columns: 46px auto 1fr; gap: 5px; }
  .rating-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .rating-note { margin-top: 16px; font-size: .8rem; }
  footer { padding-bottom: 20px; }

  .modal { align-items: stretch; }
  .modal-card {
    width: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }
  .modal-close {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
  }
  .modal-photo { aspect-ratio: 16/9; max-height: 34vh; }
  .modal-body { padding: 15px 14px calc(92px + env(safe-area-inset-bottom)); }
  .modal-body h2 { font-size: 1.38rem; padding-right: 42px; }
  .dual-rating-summary { gap: 9px; }
  .rating-summary-block { padding: 10px; }
  .big-rating { font-size: 1.65rem; }
  .food-list { font-size: .92rem; gap: 8px; }
  .rating-choice { padding: 11px; }
  .rate-stars, .rate-dollars { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; width: 100%; }
  .rate-star, .rate-dollar {
    width: 100%;
    min-width: 0;
    height: 48px;
    display: grid;
    place-items: center;
  }
  .rate-star { font-size: 2rem; border-radius: 10px; background: #191b20; }
  .modal-actions {
    position: fixed;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    background: rgba(18,20,25,.96);
    border-top: 1px solid #34373e;
    backdrop-filter: blur(14px);
  }
  .action-button { min-height: 48px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .tagline { display: none; }
  .fair-map { width: 560px; min-width: 560px; height: 420px; }
  .metric-name { width: 42px; font-size: .66rem; }
  .rating-metric { grid-template-columns: 42px auto 1fr; }
}

.vendor-card{position:relative}.vendor-fav{position:absolute;z-index:5;right:12px;top:12px;width:42px;height:42px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(5,6,8,.86);color:#fff;font-size:25px;line-height:1;display:grid;place-items:center;cursor:pointer}.vendor-fav.on{color:#ef233c;border-color:#ef233c}.modal-actions{flex-wrap:wrap}
