/* ==========================================================================
   Greenhouse Venues USA — site styles
   Rustic, handmade Texas farmhouse. Mobile-first.
   Colors can also be overridden from CONFIG.colors in js/app.js.
   ========================================================================== */

:root {
  --bg: #f3ece0;            /* kraft cream */
  --surface: #fffdf9;       /* warm white cards */
  --border: #e2d8c6;
  --text: #2d2a26;          /* charcoal */
  --muted: #5c554c;
  --accent: #9c4221;        /* rust */
  --accent-hover: #7c3419;
  --sage: #5f7a61;
  --sage-text: #4a634c;     /* darker sage for small text (AA) */
  --sage-tint: #e8eee6;
  --featured-tint: #f8e9dc;

  --radius: 10px;
  --rule: 1.5px solid var(--text);
  --shadow: 0 1px 2px rgba(45, 42, 38, .06), 0 4px 14px rgba(45, 42, 38, .06);

  --font-head: "Zilla Slab", Rockwell, "Rockwell Nova", Georgia, serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 64px;
  --toggle-h: 60px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: .5px; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.script { font-family: var(--font-script); font-weight: 400; color: var(--accent); }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: calc(var(--gutter) + var(--safe-l));
  padding-right: calc(var(--gutter) + var(--safe-r));
}
.container--narrow { max-width: 820px; }

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

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 2000;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; color: #fff; }

/* Focus: visible rust ring everywhere */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Section rule (sign-frame feel) */
.rule { border: 0; border-top: var(--rule); margin: 0; }
.rule--double { border-top: var(--rule); box-shadow: 0 4px 0 -2.5px var(--text); height: 4px; }

/* -------------------------------------------------------------------------
   Buttons, chips, tags
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: var(--accent); color: #fff;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--plain { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--plain:hover { background: var(--bg); color: var(--text); border-color: var(--text); }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

.chip {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--text);
  background: var(--surface); color: var(--text);
  font: 600 .95rem/1 var(--font-body);
  cursor: pointer; white-space: nowrap; flex: none; text-decoration: none;
}
.chip:hover { background: var(--bg); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  background: var(--sage-tint); color: var(--sage-text);
  border: 1px solid #cdd8ca;
  font-size: .8rem; font-weight: 600; line-height: 1.6;
  white-space: nowrap;
}
.badge-featured {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  line-height: 1.7; white-space: nowrap;
}
.badge-featured svg { width: 12px; height: 12px; }

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg);
  border-bottom: var(--rule);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  min-width: 0;
}
.brand:hover { color: var(--text); }
.brand__frame, .brand__frame-inner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand__icon { width: 36px; height: 36px; flex: none; }
.brand__sign {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1;
}
.brand__name {
  font-family: var(--font-head); font-weight: 700;
  font-size: .92rem; letter-spacing: .8px; white-space: nowrap;
}
.brand__usa { display: none; }
.brand__tagline { display: none; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--text); text-decoration: none; font-weight: 600;
  border-radius: 999px;
}
.nav-links a:hover { background: var(--surface); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1.5px solid var(--text); border-radius: 999px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn[aria-expanded="true"] { background: var(--text); color: var(--bg); }

.header-advertise { padding: 8px 14px; }
@media (max-width: 859px) {
  .brand__name { white-space: normal; width: min-content; line-height: 1.02; font-size: 1rem; letter-spacing: 1.2px; }
  .site-nav { gap: 6px; flex: none; }
}

/* Mobile menu panel */
.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 8px 0 16px; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 48px;
  padding: 0 4px; color: var(--text); text-decoration: none;
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 400px) {
  .brand__icon { width: 40px; height: 40px; }
}
@media (min-width: 860px) {
  :root { --header-h: 84px; --gutter: 24px; }
  .menu-btn, .mobile-menu { display: none !important; }
  .nav-links { display: flex; gap: 2px; }
  /* Farmhouse sign version */
  .brand__frame {
    display: flex; align-items: center; gap: 12px;
    border: 3px solid var(--text); padding: 3px;
  }
  .brand__frame-inner {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--text); padding: 6px 14px 6px 10px;
  }
  .brand__icon { width: 46px; height: 46px; }
  .brand__name { font-size: 1.2rem; letter-spacing: 2px; }
  .brand__usa {
    display: flex; align-items: center; gap: 6px; margin-top: 4px;
    font-family: var(--font-head); font-weight: 700; font-size: .72rem;
    letter-spacing: 5px; color: var(--accent);
  }
  .brand__usa::before, .brand__usa::after { content: ""; width: 18px; height: 1.5px; background: var(--accent); }
}


/* -------------------------------------------------------------------------
   Hero + search
   ------------------------------------------------------------------------- */
.hero { padding: 28px 0 8px; text-align: left; }
.hero__eyebrow { font-family: var(--font-script); color: var(--accent); font-size: 1.5rem; margin: 0 0 4px; line-height: 1.2; }
.hero h1 { margin-bottom: 8px; max-width: 18ch; }
.hero__sub { color: var(--muted); font-size: 1.05rem; max-width: 60ch; margin-bottom: 20px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--text);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  max-width: 760px;
  box-shadow: var(--shadow);
}
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.search svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font: 400 16px/1.4 var(--font-body); /* 16px avoids iOS zoom */
  color: var(--text);
  min-height: 48px; padding: 0;
}
.search input::placeholder { color: #776f64; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.search__clear:hover { background: var(--bg); }
.search__clear[hidden] { display: none; }
.search .btn { padding: 10px 18px; }

@media (min-width: 640px) {
  .hero { padding: 36px 0 8px; }
  .hero__eyebrow { font-size: 1.8rem; }
  .search input { font-size: 1.1rem; min-height: 56px; }
}

@media (min-width: 1024px) {
  .hero h1 { max-width: none; font-size: 2.75rem; }
  .hero__sub { margin-bottom: 18px; }
  .ad-wrap { padding: 12px 0 0; }
  .results-bar { padding-top: 8px; }
}

/* Chips row — scrolls horizontally on mobile */
.chips {
  display: flex; gap: 8px;
  margin: 16px calc(-1 * var(--gutter)) 0;
  padding: 4px var(--gutter) 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.chips > * { scroll-snap-align: start; }
@media (min-width: 860px) {
  .chips { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* Filter bar */
.filters {
  margin-top: 4px;
}
.filters > summary {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 4px;
  cursor: pointer; font-weight: 600; color: var(--text);
  list-style: none;
}
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary svg { width: 18px; height: 18px; transition: transform .15s; }
.filters[open] > summary svg { transform: rotate(180deg); }
.filters__active { color: var(--accent); }
.filters__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 6px 0 4px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: 44px;
  padding: 8px 36px 8px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d2a26' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  font: 16px/1.3 var(--font-body); color: var(--text);
}
.select:hover { border-color: var(--text); }
.filters__actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 860px) {
  .filters__grid { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; }
  .filters__actions { grid-column: auto; }
}

/* -------------------------------------------------------------------------
   Ad slot
   ------------------------------------------------------------------------- */
.ad-wrap { padding: 18px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ad-label { font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.ad-slot {
  width: 320px; max-width: 100%; aspect-ratio: 320 / 100;
  display: block; overflow: hidden;
  border-radius: 6px;
}
.ad-slot img { width: 100%; height: 100%; object-fit: cover; }
.ad-slot--empty {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 1.5px dashed var(--text);
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(45,42,38,.035) 10px 20px), var(--surface);
  color: var(--text); text-decoration: none; text-align: center;
  padding: 8px 16px;
}
.ad-slot--empty:hover { color: var(--accent); border-color: var(--accent); }
.ad-slot--empty strong { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: 1px; display: block; }
.ad-slot--empty span { font-size: .85rem; color: var(--muted); }
@media (min-width: 760px) {
  .ad-slot { width: 728px; aspect-ratio: 728 / 90; }
}

/* -------------------------------------------------------------------------
   Directory: list + map
   ------------------------------------------------------------------------- */
.directory { padding: 10px 0 40px; }

.notice {
  border: 1.5px solid var(--accent); border-radius: var(--radius);
  background: var(--featured-tint); padding: 12px 16px; margin: 0 0 14px;
}
.notice--soft { border-color: var(--border); background: var(--surface); }

/* Mobile List / Map toggle (sticky under header) */
.view-toggle {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 900;
  display: flex; justify-content: center;
  padding: 8px 0;
  background: var(--bg);
  margin: 0 calc(-1 * var(--gutter));
  border-bottom: 1px solid var(--border);
}
.segmented {
  display: inline-flex; padding: 3px;
  border: 1.5px solid var(--text); border-radius: 999px; background: var(--surface);
}
.segmented button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; min-width: 104px; padding: 0 18px;
  border: 0; border-radius: 999px; background: transparent;
  font: 600 1rem var(--font-body); color: var(--text); cursor: pointer;
  justify-content: center;
}
.segmented button svg { width: 18px; height: 18px; }
.segmented button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 0 10px;
}
.results-count { font-family: var(--font-head); font-size: 1.2rem; margin: 0; }
.results-tools { display: flex; gap: 8px; align-items: center; }

.split { display: block; }
.list-pane { min-width: 0; }
.map-pane { display: none; }

body.view-map .list-pane { display: none; }
body.view-map .map-pane { display: block; }

.map-frame {
  position: relative;
  height: calc(100svh - var(--header-h) - var(--toggle-h) - 90px - env(safe-area-inset-top, 0px));
  min-height: 360px;
  border: var(--rule); border-radius: var(--radius);
  overflow: hidden; background: #e9e1d2;
}
#map { position: absolute; inset: 0; }
.map-note {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 500;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; font-size: .9rem; box-shadow: var(--shadow);
}
.map-note[hidden] { display: none; }
.map-hint {
  position: absolute; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 42, 38, .55); color: #fff;
  font-weight: 600; font-size: 1.05rem; text-align: center; padding: 20px;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.map-hint.is-visible { opacity: 1; }
.map-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; color: var(--muted);
}

@media (min-width: 860px) {
  .view-toggle { display: none; }
  .split {
    display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; gap: 20px;
    align-items: start;
  }
  .list-pane { display: block !important; }
  .map-pane {
    display: block !important;
    position: sticky; top: calc(var(--header-h) + 16px);
  }
  .map-frame { height: calc(100vh - var(--header-h) - 40px); min-height: 480px; }
  .list-scroll {
    max-height: calc(100vh - var(--header-h) - 40px);
    overflow-y: auto; padding-right: 6px;
    scrollbar-width: thin;
  }
}

/* Listing cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card {
  position: relative;
  display: grid; grid-template-columns: 96px 1fr; gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--text); }
.card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(156, 66, 33, .22), var(--shadow); }
.card--featured { background: var(--featured-tint); border: 2px solid var(--accent); }
.card__media {
  width: 96px; height: 96px; border-radius: 8px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card__title { margin: 0; font-size: 1.2rem; line-height: 1.2; }
.card__title button, .card__title a {
  all: unset; cursor: pointer; color: var(--text);
  font-family: var(--font-head); font-weight: 700;
}
.card__title button:focus-visible, .card__title a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.card__owner { font-size: .95rem; color: var(--muted); margin: 0; }
.card__owner strong { color: var(--text); font-weight: 600; }
.card__addr { font-size: .95rem; color: var(--muted); margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.card__addr svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; color: var(--muted); margin: 0; }
.card__meta b { color: var(--text); font-weight: 600; }
.card__meta > span[aria-hidden] { display: none; }
.card__links { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 2px; }
.card__links a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 10px 0 0;
  font-weight: 600; font-size: .95rem;
}
.card__links svg { width: 16px; height: 16px; }
.card__distance { font-weight: 600; color: var(--text); }

@media (min-width: 480px) {
  .card { grid-template-columns: 120px 1fr; }
  .card__media { width: 120px; height: 120px; }
}

.placeholder-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 120%, rgba(156,66,33,.12), transparent 60%),
    var(--bg);
  color: var(--text);
}
.placeholder-photo svg { width: 58%; height: 58%; opacity: .75; }

.empty-state {
  text-align: center; padding: 40px 16px;
  border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--surface);
}
.empty-state h3 { margin-bottom: 6px; }

.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #ece4d6, #f6f0e6, #ece4d6); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Map pins + popups */
.pin { background: none; border: 0; }
.pin svg { display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.pin.is-active svg { transform: scale(1.18); transform-origin: 50% 100%; }
.leaflet-container { font-family: var(--font-body); background: #e9e1d2; }
.leaflet-container a { color: var(--accent); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); border: 1.5px solid var(--text); box-shadow: var(--shadow); background: var(--surface); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 12px 14px; font-size: .95rem; line-height: 1.4; min-width: 200px; }
.popup__name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin: 0 0 2px; }
.popup__place { color: var(--muted); margin: 0 0 8px; }
.popup__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.popup__actions .btn { min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.leaflet-popup-content .btn, .leaflet-popup-content .btn:hover { color: #fff; }
.leaflet-popup-content .btn--ghost { color: var(--accent); }
.leaflet-popup-content .btn--ghost:hover { color: #fff; }
.leaflet-control-attribution { font-size: 11px; }
.leaflet-control-attribution a { color: #6b3017; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; color: var(--text) !important; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(45,42,38,.25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: var(--text) !important; color: var(--bg) !important; font-weight: 700; }

/* -------------------------------------------------------------------------
   Listing detail dialog (modal on desktop, full screen on mobile)
   ------------------------------------------------------------------------- */
.detail {
  padding: 0; border: 0;
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0;
  background: var(--bg); color: var(--text);
}
.detail::backdrop { background: rgba(45, 42, 38, .6); }
.detail[open] { display: flex; flex-direction: column; }
.detail__bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l));
  background: var(--bg); border-bottom: var(--rule);
}
.detail__bar-title { font-family: var(--font-head); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1.5px solid var(--text); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--text); color: var(--bg); }
.icon-btn svg { width: 20px; height: 20px; }
.detail__scroll { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + var(--safe-b)); }
.detail__photo { aspect-ratio: 16 / 10; background: var(--bg); border-bottom: 1px solid var(--border); overflow: hidden; }
.detail__photo img { width: 100%; height: 100%; object-fit: cover; }
.detail__photo .placeholder-photo svg { width: 30%; height: 30%; }
.photo-credit { font-size: .8rem; color: var(--muted); padding: 4px 16px 0; margin: 0; }
.detail__content { padding: 16px calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l)); }
.detail__content h2 { margin: 6px 0 4px; }
.detail__lead { font-size: 1.05rem; color: var(--muted); margin-bottom: 14px; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.detail { overflow-x: hidden; }
.detail__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 18px; }
.detail__actions .btn { width: 100%; white-space: normal; text-align: center; padding-left: 12px; padding-right: 12px; }
.detail__actions .btn--wide { grid-column: 1 / -1; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 18px; border-top: var(--rule); }
.facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.facts dt { font-weight: 700; font-family: var(--font-head); }
.facts dd { margin: 0; color: var(--text); }
.owner-story {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 18px;
}
.owner-story h3 { margin-bottom: 4px; }
.owner-story .script { font-size: 1.35rem; }
.detail__foot { font-size: .9rem; color: var(--muted); }

@media (min-width: 860px) {
  .detail {
    width: min(760px, calc(100% - 48px)); height: auto; max-height: calc(100vh - 64px);
    margin: auto; border-radius: var(--radius); border: var(--rule);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
  }
  .detail__bar { padding: 10px 14px; }
  .detail__content { padding: 18px 24px 0; }
  .detail__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail__actions .btn--wide { grid-column: auto; }
  .photo-credit { padding: 4px 24px 0; }
}

/* -------------------------------------------------------------------------
   Content pages (About / Advertise / Add / generated SEO pages)
   ------------------------------------------------------------------------- */
.page-head { padding: 32px 0 18px; border-bottom: var(--rule); margin-bottom: 26px; }
.page-head p { color: var(--muted); font-size: 1.08rem; max-width: 62ch; margin: 0; }
.page-head .script { font-size: 1.5rem; display: block; margin-bottom: 2px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.section { padding: 8px 0 36px; }

.panel {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.panel--sign { border: 3px solid var(--text); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px var(--text); padding: 26px; }
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c4221' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
}
.x-list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c554c' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

/* Forms */
.form { display: grid; gap: 14px; }
.form .field label { font-size: .95rem; color: var(--text); }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: 16px/1.4 var(--font-body);
}
.textarea { min-height: 130px; resize: vertical; }
.input:hover, .textarea:hover { border-color: var(--text); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { border-color: var(--accent); }
.form-status { font-weight: 600; }
.form-status[data-ok="true"] { color: var(--sage-text); }
.form-status[data-ok="false"] { color: var(--accent); }
.embed-frame { width: 100%; min-height: 1100px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); }

/* Sample visuals on Advertise page */
.sample-label { font-size: .8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.sample-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 6px; padding: 14px 18px; overflow: hidden;
  background: var(--text); color: var(--bg);
  aspect-ratio: 728 / 90; max-width: 728px;
}
.sample-banner strong { font-family: var(--font-head); font-size: clamp(1rem, 2.6vw, 1.5rem); letter-spacing: .5px; }
.sample-banner .script { color: #f0b48f; font-size: clamp(1rem, 2.4vw, 1.4rem); }
.sample-banner span.btn { pointer-events: none; min-height: 36px; padding: 6px 14px; font-size: .9rem; }
@media (max-width: 759px) {
  .sample-banner { aspect-ratio: 320 / 100; max-width: 320px; padding: 10px 14px; }
  .sample-banner .script { display: none; }
}

/* State / occasion index tiles */
.tile-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile-grid a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 52px; padding: 10px 14px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.tile-grid a:hover { border-color: var(--accent); color: var(--accent); }
.tile-grid .count { color: var(--muted); font-weight: 400; font-size: .9rem; }

.breadcrumb { font-size: .92rem; margin: 18px 0 0; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li[aria-current] { padding: 10px 0; color: var(--text); }
.breadcrumb li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--muted); }
.breadcrumb a { display: inline-block; padding: 10px 0; }

.venue-hero { display: grid; gap: 20px; }
.venue-hero .detail__photo { border-radius: var(--radius); border: 1.5px solid var(--border); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
@media (min-width: 900px) { .quick-actions { display: none; } }
.mini-map { height: 280px; border: var(--rule); border-radius: var(--radius); overflow: hidden; position: relative; background: #e9e1d2; }
.mini-map--tall { height: 420px; }
@media (min-width: 900px) {
  .venue-hero { grid-template-columns: 7fr 5fr; align-items: start; }
}

.cta-band {
  margin: 30px 0 10px; padding: 26px 20px; text-align: center;
  border-top: var(--rule); border-bottom: var(--rule);
}
.cta-band .script { font-size: 1.6rem; display: block; }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 6px auto 14px; }

/* Redirect page */
.redirect { text-align: center; padding: 80px 16px; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  margin-top: 24px;
  border-top: var(--rule);
  background: var(--text); color: var(--bg);
  padding: 32px 0 calc(24px + var(--safe-b));
}
.site-footer a { color: var(--bg); }
.site-footer a:hover { color: #f0b48f; }
.footer-grid { display: grid; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand svg { width: 64px; height: 64px; flex: none; }
.footer-brand .script { color: #f0b48f; font-size: 1.4rem; display: block; line-height: 1.2; }
.footer-brand strong { font-family: var(--font-head); letter-spacing: 1.5px; font-size: 1.1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.footer-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-cta .btn--ghost { color: var(--bg); border-color: var(--bg); }
.footer-cta .btn--ghost:hover { background: var(--bg); color: var(--text); }
.footer-cta .btn { color: #fff; }
.footer-legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(243,236,224,.25); font-size: .9rem; color: #d9d0c1; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.newsletter { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.newsletter .input { flex: 1 1 200px; background: #fffdf9; border-color: transparent; }
.newsletter[hidden] { display: none; }
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; }
}

/* Print: keep it simple */
@media print {
  .site-header, .site-footer, .ad-wrap, .map-pane, .view-toggle { display: none !important; }
}
