/* Hidden Food Gems: warm, appetizing, mobile-first */
:root {
  --ink: #1f1612;
  --ink-2: #4a3a32;
  --muted: #8a776c;
  --cream: #fff8ef;
  --paper: #ffffff;
  --sand: #f6ebdd;
  --line: #ecdccb;
  --chili: #d9381e;
  --chili-2: #b52a14;
  --saffron: #f4a62a;
  --gold: #ffcf5c;
  --leaf: #2f8f5b;
  --health-blue: #1a56db;
  --plum: #6b2d5c;
  --radius: 20px;
  --shadow: 0 10px 30px -12px rgba(60, 30, 10, .28);
  --shadow-lg: 0 24px 60px -20px rgba(60, 30, 10, .45);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream);
  padding-bottom: calc(76px + var(--safe-b)); line-height: 1.45; overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: rgba(31, 22, 18, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.25rem; font-weight: 700; letter-spacing: .2px; }
.brand-gem { font-size: 1.35rem; filter: drop-shadow(0 0 8px rgba(255, 207, 92, .6)); }
.brand em { color: var(--gold); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 13px 20px; border-radius: 999px; font-weight: 700; background: var(--chili); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(217, 56, 30, .7); transition: transform .15s, background .15s;
}
.btn:hover { background: var(--chili-2); }
.btn:active { transform: scale(.97); }
.btn-ghost { background: rgba(255, 255, 255, .12); box-shadow: none; color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); }
.btn-light { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }
.btn-light:hover { background: var(--sand); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--saffron)); color: var(--ink); box-shadow: 0 8px 20px -8px rgba(244, 166, 42, .8); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 440px; display: flex; align-items: flex-end; color: #fff; overflow: hidden;
  background: #2a1a12 url('/img/hero.jpg') center/cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(31, 22, 18, .15) 0%, rgba(31, 22, 18, .55) 45%, rgba(31, 22, 18, .95) 100%);
}
.hero-inner { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 20px 30px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 207, 92, .18); color: var(--gold); border: 1px solid rgba(255, 207, 92, .4);
}
.hero h1 { font-family: var(--display); font-size: clamp(2.1rem, 8vw, 3.6rem); line-height: 1.05; margin: 14px 0 10px; letter-spacing: -.5px; }
.hero h1 span { color: var(--gold); font-style: italic; }
.hero p { margin: 0 0 20px; font-size: 1.05rem; color: rgba(255, 255, 255, .85); max-width: 580px; }
.search {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-lg); max-width: 620px;
}
.search input { flex: 1; border: 0; outline: 0; font-size: 1rem; padding: 10px 0; background: transparent; color: var(--ink); min-width: 0; }
.search .btn { padding: 11px 18px; white-space: nowrap; }
.btn-near-me {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  background: rgba(46, 125, 50, .09); color: var(--leaf, #2e7d32); border: 1.5px solid rgba(46, 125, 50, .3);
  font-weight: 700; font-size: .88rem; cursor: pointer; transition: all .15s ease; white-space: nowrap; flex-shrink: 0;
}
.btn-near-me:hover {
  background: var(--leaf, #2e7d32); color: #fff; border-color: var(--leaf, #2e7d32);
}
.btn-near-me.active {
  background: var(--leaf, #2e7d32); color: #fff; border-color: var(--leaf, #2e7d32);
  box-shadow: 0 2px 10px rgba(46, 125, 50, .35);
}
.btn-near-me.loading {
  opacity: .7; pointer-events: none;
}
.btn-near-me .gps-icon {
  font-size: 1.05rem;
}
@media (max-width: 600px) {
  .search { padding: 6px 6px 6px 14px; gap: 6px; }
  .btn-near-me { padding: 9px 10px; font-size: .82rem; }
  .search .btn { padding: 9px 14px; font-size: .88rem; }
}
.hero-stats { display: flex; gap: 22px; margin-top: 18px; font-size: .88rem; color: rgba(255, 255, 255, .8); flex-wrap: wrap; }
.hero-stats b { color: #fff; font-size: 1.1rem; display: block; }

/* ---------- Filters ---------- */
.filters { position: sticky; top: 56px; z-index: 30; background: rgba(255, 248, 239, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.filters-inner { max-width: 1100px; margin: 0 auto; padding: 12px 0 10px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  background: var(--paper); border: 1.5px solid var(--line); font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.chip:hover { border-color: var(--saffron); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 14px -6px rgba(31, 22, 18, .6); }
.chip .emo { font-size: 1.05rem; }
.filter-bar { display: flex; flex-direction: column; gap: 8px; padding: 4px 18px 4px; }
.filter-primary-row, .filter-secondary-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.mobile-filter-btn {
  display: none; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); font-size: .85rem; font-weight: 800; color: var(--ink);
  cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.mobile-filter-btn.active {
  background: var(--ink); color: var(--gold); border-color: var(--ink);
}
.select {
  appearance: none; -webkit-appearance: none; padding: 8px 30px 8px 11px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a3a32' stroke-width='2' fill='none'/%3E%3C/svg%3E") right 10px center no-repeat;
  font-size: .88rem; font-weight: 600; flex: 0 0 auto; min-width: 0; max-width: 100%; text-overflow: ellipsis;
}
.grade-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); font-size: .84rem; font-weight: 700;
  cursor: pointer; color: var(--muted); transition: all .15s; flex: 0 0 auto;
}
.grade-toggle:hover { border-color: #3b82f6; color: #1e3a8a; }
.grade-toggle.active { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; box-shadow: 0 2px 8px rgba(37, 99, 235, .2); }
.price-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; flex: 0 0 auto; background: var(--paper); }
.price-toggle button { border: 0; background: transparent; padding: 7px 11px; font-weight: 700; cursor: pointer; color: var(--muted); }
.price-toggle button[aria-pressed="true"] { background: var(--leaf); color: #fff; }
.clear-link { border: 0; background: none; color: var(--chili); font-weight: 700; cursor: pointer; flex: 0 0 auto; padding: 6px; font-size: .88rem; }
.load-more-wrap { text-align: center; margin: 32px 0 20px; }
.btn-load-more {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 30px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .95rem; cursor: pointer; border: none;
  box-shadow: 0 4px 14px rgba(31, 22, 18, .25); transition: all .15s;
}
.btn-load-more:hover { background: var(--chili); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(217, 56, 30, .3); }

/* ---------- Results ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 18px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.results-head h2 { font-family: var(--display); font-size: 1.5rem; margin: 0; }
.results-head span { color: var(--muted); font-size: .9rem; }
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; animation: rise .45s ease both;
  border: 1.5px solid transparent;
}
.card.featured-card { border-color: var(--saffron); box-shadow: 0 12px 32px -10px rgba(244, 166, 42, .45); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:active { transform: scale(.985); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card-media {
  position: relative; width: 100%; aspect-ratio: 16 / 9; height: 124px; min-height: 124px; max-height: 124px;
  flex: 0 0 124px; flex-shrink: 0; display: block;
  background: linear-gradient(135deg, #3b2215 0%, #5c3520 50%, #2b170e 100%); overflow: hidden;
}
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); pointer-events: none; }
.badge {
  position: absolute; top: 8px; left: 10px; z-index: 2; padding: 4px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800;
  background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.badge.gem { background: linear-gradient(135deg, var(--gold), var(--saffron)); }
.badge.fav { background: var(--chili); color: #fff; }
.badge.new { background: var(--leaf); color: #fff; }

/* Verified County Health Grade Pill */
.health-badge {
  position: absolute; top: 8px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 8px; background: rgba(26, 86, 219, .95); color: #fff;
  font-size: .7rem; font-weight: 800; letter-spacing: .02em; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .35);
}
.health-badge b { background: #fff; color: var(--health-blue); padding: 0 4px; border-radius: 4px; font-size: .74rem; }

.media-flags { position: absolute; right: 10px; bottom: 6px; left: 10px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.flag { padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .68); color: #fff; font-size: .68rem; font-weight: 700; backdrop-filter: blur(6px); }
.flag.pinned { background: linear-gradient(135deg, #ffcf5c, #f4a62a); color: var(--ink); }
.card-body { padding: 9px 12px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.card-title { display: flex; justify-content: space-between; gap: 6px; align-items: center; min-width: 0; width: 100%; }
.card-title h3 { flex: 1 1 0%; min-width: 0; margin: 0; font-family: var(--display); font-size: 1.05rem; line-height: 1.15; white-space: normal; overflow: visible; }
.regional-sub { font-size: .66rem; font-weight: 800; color: var(--chili); text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; white-space: normal; overflow: visible; text-overflow: clip; max-width: 100%; }
.meta { color: var(--muted); font-size: .74rem; font-weight: 600; line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip; max-width: 100%; }
.stars { color: var(--saffron); letter-spacing: 1px; white-space: nowrap; font-size: .88rem; flex-shrink: 0; }
.rating-grade-row { flex: 0 0 auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }
.grade-inline-pill {
  flex: 0 0 auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 6px; background: var(--health-blue); color: #fff;
  font-weight: 800; font-size: .72rem; white-space: nowrap; letter-spacing: .01em;
}
.rating-pill { flex: 0 0 auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 7px; background: var(--sand); font-weight: 800; font-size: .75rem; white-space: nowrap; color: var(--ink); }
.rating-pill .stars-sym { color: #d97706; letter-spacing: .5px; }
.roots-scratch-block {
  display: block; background: #fff9ef;
  border-left: 2.5px solid var(--saffron); border-radius: 0 7px 7px 0;
  padding: 4px 8px; min-width: 0; width: 100%;
}
.roots-scratch-line {
  font-size: .71rem; color: var(--ink-2); line-height: 1.28;
  white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word;
}
.roots-scratch-line b { color: var(--ink); font-weight: 800; }
.dest-callout {
  background: #fff5e4; border-left: 3px solid var(--saffron); padding: 7px 10px; border-radius: 0 10px 10px 0;
  font-size: .83rem; color: var(--ink-2); margin: 2px 0;
}
.dest-callout b { color: var(--ink); display: block; font-size: .85rem; }
.desc { color: var(--ink-2); font-size: .9rem; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tag { font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); color: var(--ink-2); }
.tag.veg { background: #e8f5ec; border-color: #bfe3cc; color: var(--leaf); }

/* 3-photo strip inside card or detail */
.photo-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px;
}
.photo-trio button {
  padding: 0; border: 0; border-radius: 10px; overflow: hidden; height: 64px; cursor: zoom-in;
  position: relative; background: var(--sand); box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.photo-trio img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-trio button:hover img { transform: scale(1.06); }
.photo-trio span {
  position: absolute; inset: auto 0 0 0; padding: 10px 5px 3px; font-size: .58rem; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.84)); text-align: left; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Health Inspection Verification Box (Compact 1-row) */
.health-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #93c5fd;
  border-radius: 10px; padding: 6px 10px; margin-top: 6px;
}
.health-letter {
  width: 28px; height: 28px; border-radius: 7px; background: var(--health-blue); color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-size: 1rem; font-weight: 900;
  flex-shrink: 0;
}
.health-info { flex: 1; font-size: .68rem; color: #1e3a8a; line-height: 1.2; }
.health-info b { font-size: .74rem; color: #172554; }

/* Destination Dish & Heritage Box */
.heritage-box {
  background: linear-gradient(135deg, #fffdf9, #fff3df); border: 1.5px solid #f3d5a0;
  border-radius: 20px; padding: 16px 18px; margin-top: 14px;
}
.heritage-pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--chili); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px;
}
.heritage-box h4 { font-family: var(--display); font-size: 1.25rem; margin: 2px 0 6px; color: var(--ink); }
.heritage-meta { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e6c68e; font-size: .88rem; }

/* Structured 4-Part Menu */
.menu-group { margin-top: 14px; }
.menu-group:first-of-type { margin-top: 6px; }
.menu-group-title {
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--chili); margin: 0 0 8px; display: flex; align-items: center; gap: 6px;
}
.menu-item {
  padding: 10px 0; border-top: 1px dashed var(--line);
}
.menu-item:first-of-type { border-top: 0; padding-top: 2px; }
.menu-item-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; font-size: .95rem; color: var(--ink); }
.menu-item-price { color: var(--leaf); font-weight: 800; white-space: nowrap; }
.menu-item p { margin: 3px 0 0; font-size: .85rem; color: var(--ink-2); line-height: 1.38; }

/* Warm Wood-Grain & Kitchen Graphic Placeholder Art */
.ph {
  width: 100%; height: 100%; min-height: 124px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: #fff; padding: 12px;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 2px, transparent 2px, transparent 10px),
    radial-gradient(circle at 30% 25%, #8b4c2b, #3a1f12 80%);
}
.ph .ph-emo { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
.ph .ph-txt { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .92; margin-top: 4px; color: #ffdf9e; }
.ph-0 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 10px), radial-gradient(circle at 30% 20%, #a85428, #3d1d0e 78%); }
.ph-1 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 10px), radial-gradient(circle at 30% 20%, #7d4e2d, #2d1a0e 78%); }
.ph-2 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 10px), radial-gradient(circle at 30% 20%, #944322, #36180c 78%); }
.ph-3 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 10px), radial-gradient(circle at 30% 20%, #b06229, #42210d 78%); }
.ph-4 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 10px), radial-gradient(circle at 30% 20%, #854727, #30190d 78%); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; }
.empty h3 { color: var(--ink); font-family: var(--display); font-size: 1.4rem; margin: 10px 0 6px; }

/* Owner CTA band */
.cta-band {
  margin: 28px 0 10px; border-radius: 26px; padding: 26px 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2a1a12 0%, #5a2414 55%, #d9381e 130%);
}
.cta-band h3 { font-family: var(--display); font-size: 1.6rem; margin: 0 0 8px; }
.cta-band p { margin: 0 0 16px; color: rgba(255, 255, 255, .85); max-width: 640px; }
.cta-band .bg-emo { position: absolute; right: -10px; bottom: -20px; font-size: 7rem; opacity: .15; transform: rotate(-12deg); }

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; justify-content: space-around;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 8px 0 calc(8px + var(--safe-b));
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 2px 14px; border-radius: 12px; }
.bottomnav a span { font-size: 1.3rem; transition: transform .2s; }
.bottomnav a.active { color: var(--chili); }
.bottomnav a.active span { transform: translateY(-2px) scale(1.12); }
@media (min-width: 900px) { .bottomnav { display: none; } body { padding-bottom: 0; } }
@media (max-width: 899px) { .hide-mobile { display: none; } }

/* ---------- Sheet (detail / forms) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 12, 8, .6); backdrop-filter: blur(3px); animation: fade .25s ease; }
.sheet-panel {
  position: relative; width: 100%; max-width: 540px; max-height: 94vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--cream); border-radius: 22px 22px 0 0; animation: up .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: calc(12px + var(--safe-b));
}
@media (min-width: 760px) { .sheet { align-items: center; } .sheet-panel { border-radius: 22px; max-height: 90vh; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.sheet-close {
  position: absolute; top: 8px; right: 10px; z-index: 5; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: .9rem; backdrop-filter: blur(6px);
}
.detail-media { position: relative; height: 92px; background: #000; overflow: hidden; }
.detail-media img, .detail-media video { width: 100%; height: 100%; object-fit: cover; }
.detail-media .badge { top: 8px; left: 10px; }
.detail-body { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: hidden; }
.detail-body h2 { flex: 1 1 0%; min-width: 0; font-family: var(--display); font-size: 1.25rem; margin: 0; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-rating { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; min-width: 0; width: 100%; }
.detail-rating .big { font-size: 1.1rem; font-weight: 800; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 6px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--paper);
  border: 1px solid var(--line); font-weight: 700; font-size: .82rem; cursor: pointer; box-shadow: 0 4px 12px -8px rgba(0, 0, 0, .3);
}
.action span { font-size: 1.35rem; }
.section { background: var(--paper); border-radius: 20px; padding: 16px 18px; margin-top: 14px; border: 1px solid var(--line); }
.section h4 { margin: 0 0 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.section p { margin: 0; color: var(--ink-2); }
.info-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.info-row:first-of-type { border-top: 0; }
.info-row .ic { font-size: 1.2rem; width: 26px; text-align: center; }
.story { font-style: italic; color: var(--ink-2); border-left: 3px solid var(--saffron); padding-left: 12px; margin-top: 10px !important; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gallery button { padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; cursor: zoom-in; background: var(--sand); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.videos { display: grid; gap: 10px; }
.videos video { width: 100%; border-radius: 14px; background: #000; max-height: 70vh; }
.hint { color: var(--muted); font-size: .85rem; }

/* Upload */
.owner-menu-upload-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--paper); border: 1px dashed #dcc5a6; border-radius: 9px;
  padding: 4px 9px; font-size: .72rem; font-weight: 700; color: var(--ink-2);
  min-width: 0; width: 100%; overflow: hidden;
}
.owner-menu-upload-row > span {
  flex: 1 1 0%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.owner-upload-pill {
  flex: 0 0 auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 8px; font-size: .68rem; font-weight: 800; color: var(--ink); cursor: pointer;
  white-space: nowrap;
}
.owner-upload-pill:hover { border-color: var(--chili); color: var(--chili); }
.upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.upload-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 16px 8px; border-radius: 18px; border: 2px dashed #e3c9ad; background: var(--cream); cursor: pointer; font-weight: 700; font-size: .85rem;
  transition: all .15s;
}
.upload-btn:hover { border-color: var(--chili); background: #fff3ea; }
.upload-btn span { font-size: 1.8rem; }
.upload-btn small { color: var(--muted); font-weight: 600; font-size: .72rem; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress { height: 10px; border-radius: 999px; background: var(--sand); overflow: hidden; margin-top: 12px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--chili)); transition: width .2s; }

/* Ratings */
.star-input { display: flex; gap: 6px; margin: 4px 0 10px; }
.star-input button { border: 0; background: none; font-size: 2.1rem; cursor: pointer; color: #e5d5c3; padding: 0; transition: transform .1s, color .1s; line-height: 1; }
.star-input button.on { color: var(--saffron); }
.star-input button:active { transform: scale(1.25); }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.review-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: .92rem; }
.review p { margin: 4px 0 0; font-size: .92rem; }
.bars { display: grid; gap: 4px; margin: 6px 0 12px; }
.bar { display: grid; grid-template-columns: 26px 1fr 26px; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.bar i { display: block; height: 8px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.bar i b { display: block; height: 100%; background: var(--saffron); border-radius: 999px; }

/* Forms */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.input, .textarea, .form select {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); font-size: 1rem; outline: 0; font-weight: 400;
}
.input:focus, .textarea:focus, .form select:focus { border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(244, 166, 42, .18); }
.textarea { min-height: 90px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-grid label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 600; font-size: .88rem; cursor: pointer; }
.check-grid input { accent-color: var(--chili); }
.check-grid label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.form-head { padding: 26px 20px 6px; }
.form-head h2 { font-family: var(--display); font-size: 1.8rem; margin: 0 0 6px; }
.form-head p { margin: 0; color: var(--ink-2); }

/* Reels */
.reels { height: calc(100vh - 56px - 70px - var(--safe-b)); overflow-y: auto; scroll-snap-type: y mandatory; background: #000; }
@media (min-width: 900px) { .reels { height: calc(100vh - 56px); } }
.reel { position: relative; height: 100%; scroll-snap-align: start; display: grid; place-items: center; }
.reel video { width: 100%; height: 100%; object-fit: cover; max-width: 520px; }
.reel-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 22px; color: #fff; max-width: 520px; margin: 0 auto;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.reel-info h3 { font-family: var(--display); font-size: 1.5rem; margin: 0 0 4px; }
.reels-empty { min-height: calc(100vh - 140px); display: grid; place-items: center; text-align: center; padding: 30px; background: linear-gradient(180deg, #1f1612, #3a1d12); color: #fff; }
.reels-empty h2 { font-family: var(--display); font-size: 1.8rem; margin: 12px 0 8px; }
.reels-empty p { color: rgba(255, 255, 255, .8); max-width: 380px; margin: 0 auto 18px; }

/* Lightbox + toast */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .94); display: grid; place-items: center; padding: 16px; touch-action: pinch-zoom; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; object-fit: contain; }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%) translateY(20px); z-index: 90; opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-lg); transition: all .25s; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Top Meal-Time Tabs (Breakfast · Brunch · Lunch · Dinner) ---------- */
.meal-tabs-wrap {
  padding: 2px 18px 8px;
}
.meal-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px;
  background: var(--sand); border: 1.5px solid var(--line); border-radius: 16px;
}
.meal-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
  border-radius: 12px; border: 0; background: transparent; color: var(--ink-2);
  font-weight: 800; font-size: .88rem; cursor: pointer; transition: all .15s;
}
.meal-tab:hover { background: rgba(255, 255, 255, .65); color: var(--ink); }
.meal-tab.active {
  background: var(--ink); color: #fff;
  box-shadow: 0 4px 12px rgba(31, 22, 18, .28);
}
.meal-tab small {
  font-size: .74rem; padding: 1px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .08); color: inherit; font-weight: 700;
}
.meal-tab.active small { background: rgba(255, 207, 92, .25); color: var(--gold); }

/* ---------- Dynamic Operational Status Pill & Today's Live Hours on Card Front ---------- */
.op-status-box {
  background: #faf5ee; border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 8px; margin: 1px 0; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: 6px; min-width: 0; width: 100%;
}
.op-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px; font-size: .69rem; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; line-height: 1.15; white-space: nowrap;
}
.op-pill.open {
  background: #e6f7ed; color: #146c3b; border: 1px solid #a8e2c0;
}
.op-pill.low_prep {
  background: #fff6db; color: #8c5800; border: 1px solid #f5d47a;
}
.op-pill.sold_out {
  background: #fde8e4; color: #a82010; border: 1px solid #f5b5aa;
}
.op-hours {
  flex: 1 1 auto; min-width: 0; justify-content: flex-end; text-align: right;
  font-size: .71rem; color: var(--ink-2); font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2;
}
.op-hours span {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hours-info-btn {
  flex: 0 0 auto; border: 1px solid #dcc5a6; background: var(--paper); color: var(--ink-2);
  border-radius: 999px; padding: 1px 6px; font-size: .63rem; font-weight: 800; cursor: pointer;
  line-height: 1.2; white-space: nowrap; transition: all .12s;
}
.hours-info-btn:hover { border-color: var(--chili); color: var(--chili); background: #fff5ec; }
.weekly-hours-popover {
  background: #fff9ef; border: 1px dashed #dcc5a6; border-radius: 8px;
  padding: 4px 8px; font-size: .68rem; color: var(--ink-2); line-height: 1.3;
  width: 100%; margin-top: 1px;
}

/* ---------- Front-of-Card Legible Menu & Category Switcher ---------- */
.card-menu-box {
  background: #fffdf9; border: 1px solid #eddcc4; border-radius: 11px;
  padding: 7px 9px; margin-top: 1px; display: flex; flex-direction: column; gap: 5px;
  min-width: 0; width: 100%; overflow: hidden;
}
.card-cat-tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.card-cat-tabs::-webkit-scrollbar { display: none; }
.card-cat-tab {
  flex: 0 0 auto; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--cream); color: var(--ink-2); font-size: .68rem; font-weight: 800;
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.card-cat-tab.active {
  background: var(--chili); color: #fff; border-color: var(--chili);
}
.card-price-list {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; width: 100%;
}
.card-price-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 4px;
  font-size: .78rem; padding-bottom: 1px;
  min-width: 0; width: 100%; flex-wrap: nowrap; overflow: hidden;
}
.card-price-row:last-child { padding-bottom: 0; }
.card-price-name {
  flex: 0 1 auto; min-width: 0; max-width: calc(100% - 68px);
  font-weight: 700; color: var(--ink); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-price-dots {
  flex: 1 1 10px; min-width: 8px;
  border-bottom: 1.5px dotted #d8c6b2;
  margin: 0 3px; position: relative; top: -3px;
}
.card-price-val {
  flex: 0 0 54px; width: 54px; flex-shrink: 0;
  font-weight: 800; color: var(--leaf); white-space: nowrap; font-size: .78rem;
  text-align: right; font-variant-numeric: tabular-nums;
}
.verified-price-stamp {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: .66rem; font-weight: 700; color: #1e5e3a; background: #eef9f2;
  padding: 2px 7px; border-radius: 6px; border: 1px solid #c6ebd4;
  min-width: 0; width: 100%; overflow: hidden;
}
.verified-price-stamp span {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- The 2 Numbers That Prove Value (.ec-ad-box) ---------- */
.ec-ad-box {
  margin-top: auto; padding-top: 3px; display: flex; flex-direction: column; gap: 4px;
  min-width: 0; width: 100%;
}
.ec-action-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px;
}
.ec-tab-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 7px 6px; border-radius: 10px; font-weight: 800; font-size: .78rem;
  cursor: pointer; text-align: center; border: 1px solid transparent; transition: transform .12s, box-shadow .12s;
  text-decoration: none; line-height: 1.15; min-width: 0; overflow: hidden;
}
.ec-tab-btn:active { transform: scale(.97); }
.ec-tab-btn small { font-size: .66rem; font-weight: 700; opacity: .92; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-tab-btn.call-btn {
  background: linear-gradient(135deg, #15803d, #166534); color: #fff;
  box-shadow: 0 5px 12px -6px rgba(21, 128, 61, .65);
}
.ec-tab-btn.call-btn:hover { background: linear-gradient(135deg, #16a34a, #15803d); }
.ec-tab-btn.map-btn {
  background: linear-gradient(135deg, #1d4ed8, #1e40af); color: #fff;
  box-shadow: 0 5px 12px -6px rgba(29, 78, 216, .65);
}
.ec-tab-btn.map-btn:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ec-proof-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: .68rem; font-weight: 700; color: var(--ink-2);
  background: var(--sand); padding: 3px 8px; border-radius: 8px;
  min-width: 0; width: 100%; overflow: hidden;
}
.ec-proof-bar span {
  flex: 1 1 0%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-proof-btn {
  flex: 0 0 auto; flex-shrink: 0;
  border: 0; background: var(--ink); color: var(--gold); font-size: .66rem; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.ec-proof-btn:hover { background: var(--chili); color: #fff; }

/* ---------- Analytics & End-of-Month Renewal Proof Page ---------- */
.analytics-hero {
  background: linear-gradient(135deg, #1f1612 0%, #3d2116 60%, #1e3a8a 140%);
  color: #fff; padding: 28px 20px; border-bottom: 1px solid var(--line);
}
.analytics-hero-inner { max-width: 1100px; margin: 0 auto; }
.kpi-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0;
}
@media (min-width: 720px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 16px; box-shadow: var(--shadow);
}
.kpi-card .kpi-lbl { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi-card .kpi-val { font-family: var(--display); font-size: 2rem; font-weight: 900; color: var(--ink); margin: 4px 0 2px; line-height: 1.05; }
.kpi-card .kpi-sub { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.proof-generator-card {
  background: var(--paper); border: 2px solid var(--saffron); border-radius: 22px;
  padding: 20px; box-shadow: var(--shadow-lg); margin-bottom: 22px;
}
.sms-preview-box {
  background: #1f1612; color: #fff; border-radius: 16px; padding: 16px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem;
  line-height: 1.55; white-space: pre-wrap; margin: 12px 0; border: 1px solid rgba(255, 207, 92, .35);
}
.admin-btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.analytics-table-wrap {
  background: var(--paper); border-radius: 20px; border: 1.5px solid var(--line);
  overflow-x: auto; box-shadow: var(--shadow);
}
.analytics-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.analytics-table th, .analytics-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line);
}
.analytics-table th {
  background: var(--sand); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2);
}
.analytics-table tr:hover td { background: #fffaf2; }

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



/* Plain Branded Owner Claim Tile & 3-Second Micro Video Support */
.card-media video, .detail-media video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.ph-owner-tile {
  width: 100%; height: 100%; min-height: 124px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: #fff; padding: 8px 10px;
  position: relative; box-sizing: border-box; text-decoration: none; user-select: none;
}
.ph-owner-tile .ph-badge-coming-soon {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
  color: #ffdf9e; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.03em;
  text-transform: uppercase; margin-bottom: 5px; border: 1px solid rgba(255, 223, 158, 0.3);
}
.ph-owner-tile .ph-claim-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95); color: #1f1612;
  font-size: 0.70rem; font-weight: 800; line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer; transition: transform 0.2s, background 0.2s, color 0.2s;
  pointer-events: auto;
}
.ph-owner-tile .ph-claim-btn:hover {
  background: #ffcf5c; color: #1f1612; transform: translateY(-1px);
}
.ph-owner-tile .ph-cuisine-sub {
  font-size: 0.67rem; font-weight: 700; opacity: 0.88; margin-top: 3px; color: #fff;
}
/* Video Badge */
.video-reel-badge {
  position: absolute; top: 8px; right: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px);
  color: #fff; font-size: 0.64rem; font-weight: 800; border: 1px solid rgba(255,255,255,0.3);
}

.ph-badge-coming-soon, .ph-claim-btn { display: none !important; }


/* Community Notice Callout */
.community-notice-banner {
  background: #fff9ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--saffron);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.35;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.community-notice-banner .notice-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}
.community-notice-banner p {
  margin: 0;
}
.community-notice-banner b {
  color: #c2410c;
}
.card-notice-note {
  background: #fffaf0;
  border-top: 1px dashed #fcd34d;
  padding: 5px 8px;
  margin-top: 4px;
  border-radius: 6px;
  font-size: 0.68rem;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}

