@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 560 700; font-display: swap; src: url("fonts/fraunces-latin.woff2") format("woff2"); }

:root {
  --ivory: #fff9f3;
  --white: #ffffff;
  --burgundy: #800020;
  --burgundy-deep: #5c0018;
  --navy: #001838;
  --ink: #242025;
  --muted: #6f6970;
  --line: #e9e0dd;
  --teal-bg: #e5f2f0;
  --teal-ink: #145e59;
  --pink-bg: #f8e7e4;
  --pink-ink: #7c3144;
  --shadow: 0 1px 2px rgba(36, 32, 37, .04), 0 8px 24px rgba(36, 32, 37, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--ivory);
  min-height: 100dvh;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img, svg { max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--burgundy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--navy); color: white;
  padding: 8px 12px; z-index: 50; border-radius: 8px;
}
.skip:focus { top: 8px; }

#app {
  width: min(100%, 480px); margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column;
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  position: sticky; top: 0; z-index: 15;
  background: rgba(255, 249, 243, .94);
  backdrop-filter: blur(8px);
}
.top-home { justify-content: space-between; }
.brand {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  text-decoration: none; color: #7a1f3d;
  font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
}
.brand img { width: 40px; height: 40px; border-radius: 12px; flex: none; display: block; }
.icon-btn, .icon-spacer {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 0; background: transparent; color: var(--navy);
  display: grid; place-items: center; border-radius: 12px;
}
.icon-btn:hover { background: rgba(0, 24, 56, .05); }
.top-home .icon-btn { color: #7d6a70; }

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  padding: 4px 20px calc(8px + env(safe-area-inset-bottom));
}
.home-copy { width: 100%; }
.home h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(42px, 12vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 0;
}
.lede {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  font-weight: 430;
  line-height: 1.4;
}
.home-art-wrap {
  position: relative;
  width: min(86%, 292px);
  display: grid;
  place-items: center;
}
.home-art-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 62%;
  width: 118%;
  height: 88%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 176, 162, .82) 0%,
    rgba(255, 198, 180, .46) 36%,
    rgba(255, 224, 206, .18) 58%,
    rgba(255, 249, 243, 0) 74%);
  pointer-events: none;
}
.home-art {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(166, 104, 92, .16));
}
.home-actions { width: 100%; display: grid; gap: 14px; }
.home .btn {
  min-height: 56px;
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 17px;
  letter-spacing: -0.012em;
}
.home .btn-primary { background: #80364f; }
.home .btn-primary:hover { background: #6c2d42; }
.home .btn-secondary {
  background: var(--white);
  color: #80364f;
  border-color: #80364f;
}
.home-note {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 430;
  margin: 0;
  line-height: 1.4;
}

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 12px 16px;
  border-radius: 14px; border: 1.5px solid transparent;
  font-size: 17px; font-weight: 700; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--burgundy); color: white; }
.btn-primary:hover { background: var(--burgundy-deep); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: white; color: var(--burgundy); border-color: var(--burgundy); }
.btn-ghost { background: white; color: var(--ink); border-color: var(--line); }
.btn-small { min-height: 44px; width: auto; padding: 8px 14px; border-radius: 999px; font-size: 15px; }

.screen { padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
.screen h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; margin: 8px 0 8px; }
.sub { color: var(--muted); margin: 0 0 14px; line-height: 1.4; }
.loc-status, .note, .toast {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; color: var(--ink); margin: 0 0 12px; line-height: 1.4;
}
.toast { color: var(--burgundy); }

.search {
  display: flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--line); border-radius: 14px;
  min-height: 52px; padding: 0 12px; box-shadow: var(--shadow);
}
.search input {
  flex: 1; border: 0; background: transparent; min-width: 0;
  font-size: 16px; padding: 12px 0; outline: none;
}
.search input::placeholder { color: #8a8388; }
.clear {
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--ivory); color: var(--ink);
}
.eyebrow {
  margin: 16px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.show-all, .loc-row {
  width: 100%; text-align: left; background: white; border: 1px solid var(--line);
  border-radius: 14px; min-height: 52px; padding: 12px 14px; margin: 0 0 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow);
}
.show-all { color: var(--burgundy); font-weight: 700; justify-content: center; }
.loc-row .label { font-weight: 680; }
.loc-row .meta { color: var(--muted); font-size: 13px; text-align: right; }
.chev { color: var(--muted); font-size: 20px; line-height: 1; }

.loc-line {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: transparent; border: 0; padding: 4px 0 10px; color: var(--burgundy);
  font-weight: 700; min-height: 44px;
}
.loc-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vote-banner {
  background: #f8ecee; border-radius: 16px; padding: 14px 14px 12px; margin: 4px 0 14px;
}
.vote-banner h2 { margin: 0 0 4px; font-size: 20px; }
.vote-banner p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.4; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap; margin: 4px 0 6px;
}
.toolbar h2 { margin: 0; font-size: 18px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: flex; background: white; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button {
  min-height: 40px; min-width: 52px; border: 0; background: transparent; border-radius: 999px;
  padding: 6px 12px; font-weight: 700; color: var(--ink);
}
.seg button[aria-pressed="true"] { background: var(--burgundy); color: white; }
.sort-note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.count-line { color: var(--muted); font-size: 13px; margin: 0 0 8px; }

.cards { display: grid; gap: 12px; }
.card {
  background: white; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 12px;
}
.card-hit {
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; width: 100%;
  text-align: left; background: transparent; border: 0; padding: 0; border-radius: 12px;
}
.thumb {
  width: 56px; height: 56px; border-radius: 12px; background: #f6efea; color: var(--burgundy);
  display: grid; place-items: center;
}
.card h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.meta { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.rating { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.rating .muted, .muted { color: var(--muted); font-weight: 500; }
.star { color: #c8962e; }
.byo-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px;
  font-size: 12px; font-weight: 700; line-height: 1.35;
}
.badge.confirmed { background: var(--teal-bg); color: var(--teal-ink); }
.badge.listed { background: var(--pink-bg); color: var(--pink-ink); }
.badge.unknown { background: #f3eeea; color: #5c565c; }
.cork { font-size: 13px; color: var(--ink); }
.addr { margin: 8px 0 0; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.addr a { color: var(--ink); font-weight: 650; text-underline-offset: 2px; }
.dist { color: var(--navy); font-weight: 700; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions a, .actions button {
  min-height: 44px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: white; color: var(--burgundy);
  font-weight: 700; font-size: 14px; text-decoration: none;
  display: inline-flex; align-items: center;
}

.empty-panel, .panel {
  background: white; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 28px 18px; text-align: center; margin-top: 12px;
}
.empty-panel h2, .panel h1, .panel h2 { margin: 8px 0; font-size: 22px; }
.empty-panel p, .panel p { color: var(--muted); line-height: 1.45; }
.stack { display: grid; gap: 10px; margin-top: 14px; }
.section-label {
  margin: 18px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}

.map-wrap { background: #e7f0e6; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.map-svg { width: 100%; height: auto; display: block; min-height: 280px; background:
  repeating-linear-gradient(135deg, #e7f0e6, #e7f0e6 14px, #d7e6d4 14px, #d7e6d4 16px); }
.map-caption { color: var(--muted); font-size: 12px; margin: 8px 2px 0; }
.map-preview {
  width: 100%; text-align: left; margin-top: 10px; background: white; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); min-height: 64px;
}
.map-preview strong { display: block; }
.map-preview span { color: var(--muted); font-size: 14px; }

.check {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  width: 100%; text-align: left; background: white; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 12px; margin: 0 0 8px; min-height: 72px;
}
.check[aria-pressed="true"] { border-color: var(--burgundy); box-shadow: 0 0 0 1px var(--burgundy); }
.box {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c8bfbc; display: grid; place-items: center;
  margin-top: 2px;
}
.check[aria-pressed="true"] .box { background: var(--burgundy); border-color: var(--burgundy); color: white; }
.check strong { display: block; }
.check .fine { color: var(--muted); font-size: 14px; }

.screen-select { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(255, 249, 243, .96); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.dock-inner { width: min(100%, 480px); margin: 0 auto; }
.dock-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.dock-meta span { color: var(--muted); }

.steps { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.step {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #efe7e4; color: var(--muted); font-weight: 800;
}
.step.on { background: var(--burgundy); color: white; }
.step.done { background: #efe7e4; color: var(--burgundy); }
.step-line { flex: 1; height: 2px; background: var(--line); max-width: 48px; }
.step-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: -6px 0 12px; }

.link-row { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; }
.link-row code {
  flex: 1; min-width: 0; background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px;
}
.place-row {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--line); border-radius: 14px; min-height: 52px;
  padding: 10px 12px; margin: 0 0 8px; text-align: left;
}

.choice {
  width: 100%; text-align: left; background: white; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 12px; margin: 0 0 8px; display: grid;
  grid-template-columns: 28px 1fr; gap: 10px; align-items: start; min-height: 64px;
}
.choice[aria-pressed="true"] { border-color: var(--burgundy); }
.radio {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c8bfbc; margin-top: 2px;
  display: grid; place-items: center;
}
.choice[aria-pressed="true"] .radio { border-color: var(--burgundy); }
.choice[aria-pressed="true"] .radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--burgundy);
}
.bars { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 14px; }
.track { grid-column: 1 / -1; height: 8px; background: #f3eeea; border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--burgundy); }

.sheet {
  position: fixed; inset: 0; z-index: 30; background: rgba(36, 32, 37, .4);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-card {
  width: min(100%, 480px); max-height: min(92dvh, 760px); overflow: auto;
  background: var(--ivory); border-radius: 18px 18px 0 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head h2 { margin: 8px 0; font-size: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: white;
  padding: 8px 12px; font-weight: 650;
}
.chip[aria-pressed="true"] { background: var(--navy); color: white; border-color: var(--navy); }
.field { display: block; margin: 8px 0; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
  padding: 10px 12px; font-size: 16px; background: white;
}
.fine-print { color: var(--muted); font-size: 14px; line-height: 1.45; }
.call-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.call-list a {
  display: flex; justify-content: space-between; gap: 8px; background: white;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: inherit;
  min-height: 48px;
}
.detail p { margin: 8px 0; line-height: 1.4; }
.shops { list-style: none; padding: 0; margin: 8px 0; }
.shops li { margin: 0 0 6px; font-size: 14px; }

@media (max-width: 359px) {
  .brand { font-size: 13px; gap: 6px; }
  .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .home { padding-left: 16px; padding-right: 16px; }
  .home h1 { font-size: 36px; }
  .card-hit { grid-template-columns: 48px 1fr; }
  .thumb { width: 48px; height: 48px; }
}
@media (max-height: 620px) {
  .home { justify-content: flex-start; gap: 16px; padding-top: 8px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .home h1 { font-size: 34px; }
  .lede { margin-top: 8px; }
  .home-art-wrap { width: min(74%, 230px); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
