:root {
  --coffee: #4a2612;
  --coffee-dark: #2e1408;
  --cream: #faf6f0;
  --card: #ffffff;
  --ink: #211712;
  --muted: #7c6a5d;
  --line: #ece3d8;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--coffee); }
.home-body { overflow: hidden; background: #e9e2d8; }

/* Full-screen map with fixed overlays */
.map-full { position: fixed; inset: 0; background: #e9e2d8; }
.logo-badge {
  position: fixed; z-index: 5;
  top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center;
  text-decoration: none;
}
.logo-img { display: block; height: 60px; width: auto; }
/* Search pill sits just above the footer links and matches their frosted style;
   its autocomplete dropdown opens upward. */
.search-wrap {
  position: fixed; z-index: 6; margin: 0;
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 46px); left: 50%; transform: translateX(-50%);
  width: min(92vw, 440px);
}
.search-input {
  width: 100%; font: inherit; font-size: 15px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(74, 38, 18, 0.15); color: var(--ink);
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: 2px solid var(--coffee); outline-offset: 1px; }
.search-results {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  max-height: 50vh; overflow-y: auto;
}
.search-results[hidden] { display: none; }
.search-result {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
}
.search-result:hover { background: #faf4ec; }
.sr-line1 { font-weight: 600; font-size: 14px; }
.sr-line2 { font-size: 12px; color: var(--muted); }
.sr-line2:empty { display: none; }

.map-toast {
  position: fixed; z-index: 5; margin: 0;
  top: calc(max(14px, env(safe-area-inset-top)) + 70px); left: 50%; transform: translateX(-50%);
  max-width: min(92vw, 440px); text-align: center;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(33, 23, 18, 0.88); color: #fff; font-size: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.map-toast[hidden] { display: none; }
.overlay-links {
  position: fixed; z-index: 5;
  left: 50%; transform: translateX(-50%);
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex; gap: 16px; align-items: center; white-space: nowrap;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(74, 38, 18, 0.15);
}
.overlay-links a { color: var(--coffee); text-decoration: none; font-size: 13px; font-weight: 600; }
.overlay-links a:hover { color: var(--coffee-dark); }

/* Custom Apple Maps callout for the selected café */
.cafe-callout {
  background: #fff; border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  min-width: 210px; max-width: 260px; font-family: inherit;
}
.cc-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.cc-addr { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cc-meta { font-size: 12px; color: var(--coffee); font-weight: 600; margin-top: 6px; }
.cc-report {
  margin-top: 10px; width: 100%; font: inherit; font-weight: 700; font-size: 14px;
  color: #fff; background: var(--coffee); border: 0; padding: 9px 12px; border-radius: 10px; cursor: pointer;
}
.cc-report:hover { background: var(--coffee-dark); }

/* Report price dialog */
.report-dialog {
  border: 0; padding: 0; border-radius: 18px; color: var(--ink); background: var(--card);
  width: min(420px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.report-dialog::backdrop {
  background: rgba(33, 23, 18, 0.45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
.dialog-close {
  font: inherit; font-size: 18px; line-height: 1; background: transparent; border: 0;
  color: var(--muted); cursor: pointer; padding: 2px 4px;
}
.dialog-close:hover { color: var(--ink); }
.report-form { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field input, .field select {
  font: inherit; font-weight: 500; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--coffee); outline-offset: 1px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--coffee); border-color: var(--coffee); color: #fff; }
.primary {
  font: inherit; font-weight: 700; color: #fff; background: var(--coffee); border: 0;
  padding: 12px 16px; border-radius: 12px; cursor: pointer;
}
.primary:hover { background: var(--coffee-dark); }
.primary:disabled { opacity: 0.6; cursor: default; }
.report-status { margin: 0; font-size: 14px; color: var(--muted); min-height: 18px; }

/* Legal pages keep the standard header/footer chrome */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--coffee); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; }
.brand-mark { font-size: 20px; }
.brand-name { font-size: 18px; letter-spacing: -0.01em; }
.appstore-link {
  color: var(--coffee); background: #fff; text-decoration: none; font-weight: 600;
  font-size: 14px; padding: 7px 14px; border-radius: 999px;
}
.legal { max-width: 720px; margin: 0 auto; padding: 32px 20px 56px; }
.legal h1 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -0.02em; margin: 0 0 4px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; letter-spacing: -0.01em; }
.legal p, .legal li { color: #3a2c22; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 24px; }
.footer-inner {
  max-width: 1040px; margin: 0 auto; padding: 20px; display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px;
}
.footer-nav { display: flex; gap: 18px; white-space: nowrap; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--coffee); }
