:root {
  --cream: #FFFAF0;
  --plum: #443049;
  --berry: #A52B60;
  --berry-dark: #8A2150;
  --pink: #FFE0ED;
  --lavender: #EAE2FF;
  --yellow: #FFEDCA;
  --green-bg: #E2F3DE;
  --green: #37643E;
  --muted: #846E83;
  --border: #EDDDE4;
  --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(68, 48, 73, 0.04), 0 4px 14px rgba(68, 48, 73, 0.05);
  --radius-card: 22px;
  --radius-input: 16px;
  --focus: 0 0 0 3px var(--cream), 0 0 0 6px var(--berry);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: Nunito, ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--berry); }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--berry); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 10; text-decoration: none; font-weight: 800; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* ---- pills ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-lavender { background: var(--lavender); color: var(--plum); }

/* ---- header ---- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--plum); border-radius: 12px; min-height: 44px; }
.brand-icon { width: 30px; height: 30px; }
.wordmark { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; }
.wordmark .go { color: var(--berry); }

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "text mascot" "copy mascot";
  align-items: center;
  column-gap: 40px;
  padding: 36px 0 28px;
}
.hero-text { grid-area: text; align-self: end; }
.hero-copy { grid-area: copy; align-self: start; font-size: 19px; color: var(--muted); max-width: 34ch; margin-top: 14px; }
.eyebrow { font-size: 13px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--berry); margin-bottom: 12px; }
h1 { font-size: 58px; line-height: 1.02; font-weight: 900; letter-spacing: -0.03em; }
h1 .accent { color: var(--berry); }
.mascot { grid-area: mascot; position: relative; justify-self: end; width: 280px; }
.mascot svg { display: block; width: 100%; height: auto; }
.bubble {
  position: absolute; top: 6px; right: -6px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-weight: 800; font-size: 15px; color: var(--berry); box-shadow: var(--shadow);
}
.bubble::after {
  content: ""; position: absolute; left: 22px; bottom: -7px; width: 12px; height: 12px;
  background: #fff; border-right: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border);
  transform: rotate(45deg);
}

/* ---- search + results head ---- */
.search { position: relative; }
.search input {
  width: 100%; min-height: 56px; padding: 0 54px 0 52px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-input);
  font-size: 17px; font-weight: 600; box-shadow: var(--shadow);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: 1; font-weight: 600; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus-visible { border-color: var(--berry); }
.search-icon { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.clear:hover { background: var(--pink); color: var(--berry); }
.clear svg { width: 20px; height: 20px; }
.clear[hidden] { display: none; }

.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 28px 0 16px; }
.results-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.results-title h2 { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.results-title .pill { white-space: normal; }
.results-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.ghost {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); font-weight: 800; font-size: 15px; cursor: pointer;
}
.ghost svg { width: 18px; height: 18px; color: var(--berry); }
.ghost:hover { border-color: var(--berry); }
.ghost[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--berry); }
.sort select {
  min-height: 44px; padding: 0 40px 0 16px; border: 1.5px solid var(--border); border-radius: 999px; background-color: var(--card);
  font-weight: 800; font-size: 15px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23A52B60' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.sort select:hover { border-color: var(--berry); }
.note { font-size: 14px; color: var(--muted); margin: -6px 0 14px; }

/* ---- cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(68, 48, 73, 0.05), 0 10px 24px rgba(68, 48, 73, 0.07); }
.card-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 12px 12px; min-height: 64px; }
.accent-pink .card-strip { background: var(--pink); }
.accent-lavender .card-strip { background: var(--lavender); }
.accent-yellow .card-strip { background: var(--yellow); }
.card-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, 0.75); border-radius: 999px; }
.card-icon svg { width: 28px; height: 28px; }
.badge { border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; background: #fff; color: var(--berry); text-align: right; }
.badge.neutral { color: var(--muted); }
.card-body { padding: 16px 20px 20px; }
.shop-name { font-size: 21px; font-weight: 900; letter-spacing: -0.01em; line-height: 1.2; }
.shop-meta { color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 2px; }
.shop-meta > span:not(:empty) + span:not(:empty)::before { content: "·"; margin: 0 6px; }
.shop-open.is-open { color: var(--green); font-weight: 800; }
.reading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-top: 16px; }
.wait { display: flex; flex-direction: column; min-width: 0; }
.wait-value { font-size: 44px; line-height: 1; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wait-value.long { font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }
.wait-sub { color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 4px; }
.wait-sub:empty { display: none; }
.facts { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 800; }
.facts p:empty, .facts p[hidden] { display: none; }
.people { display: inline-flex; align-items: center; gap: 6px; }
.people svg { width: 18px; height: 18px; color: var(--berry); flex: none; }
.trend.shorter { color: var(--green); }
.trend.steady { color: var(--muted); }
.trend.busier { color: var(--berry); }
.freshness { margin-top: 16px; padding-top: 12px; border-top: 1.5px dashed var(--border); color: var(--muted); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.freshness::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9BCB91; flex: none; }
.card.is-stale .freshness::before, .card.is-offline .freshness::before { background: #D9C3CE; }
.freshness:empty { display: none; }
.scoop {
  width: 100%; min-height: 48px; margin-top: 14px; border: 0; border-radius: 999px;
  background: var(--berry); color: #fff; font-weight: 900; font-size: 16px; cursor: pointer;
  transition: background-color 120ms ease;
}
.scoop:hover { background: var(--berry-dark); }
.details { margin-top: 14px; padding: 14px 16px; background: var(--cream); border-radius: 16px; font-size: 14px; }
.details dl { display: grid; gap: 8px; }
.details dt { font-weight: 900; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.details dd { font-weight: 700; white-space: pre-line; }
.directions { display: inline-flex; align-items: center; min-height: 44px; font-weight: 900; text-decoration: none; border-radius: 8px; }
.directions:hover { text-decoration: underline; }
.d-note { color: var(--muted); font-size: 13px; }

/* camera panel */
.cam { position: relative; margin: 0; aspect-ratio: 352 / 240; background: #3A2A40; overflow: hidden; }
.cam-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cam-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-area { fill: rgba(255, 224, 237, 0.16); stroke: #FFB8D2; stroke-width: 2; stroke-dasharray: 6 4; }
.cam-person { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; }
.cam-person.in-line { stroke: #FFD666; stroke-width: 2.5; }
.cam.is-dim .cam-img { filter: grayscale(0.7); opacity: 0.6; }
.cam.is-dim .cam-overlay { opacity: 0.5; }
.cam-caption {
  position: absolute; left: 10px; bottom: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px);
  display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(68, 48, 73, 0.78); color: #fff; font-size: 12px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cam-dot { width: 7px; height: 7px; border-radius: 50%; background: #D9C3CE; flex: none; }
.cam.is-live .cam-dot { background: #7BE07F; }
.cam-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #F3E3EC; font-weight: 800; font-size: 14px; }
/* No frame to show: a slim note rather than a big empty box. */
.cam.is-empty { aspect-ratio: auto; background: #FBF4F7; border-top: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border); }
.cam.is-empty .cam-empty { position: static; padding: 10px 16px; color: var(--muted); font-size: 13px; }
.skeleton .cam-sk { aspect-ratio: 352 / 240; background: #F3E9EE; }

/* skeletons */
.card.skeleton .card-strip { background: #F6EEF1; }
.sk { display: block; background: #F3E9EE; border-radius: 999px; }
.skeleton .sk-title { width: 62%; height: 22px; }
.skeleton .sk-line { width: 44%; height: 14px; margin-top: 10px; }
.skeleton .sk-wait { width: 38%; height: 42px; margin-top: 18px; border-radius: 14px; }
.skeleton .sk-btn { width: 100%; height: 48px; margin-top: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .sk { animation: shimmer 1.4s ease-in-out infinite; }
  @keyframes shimmer { 50% { opacity: 0.55; } }
}

.empty { padding: 28px; text-align: center; background: var(--card); border: 1.5px dashed var(--border); border-radius: var(--radius-card); color: var(--muted); font-weight: 700; }
.empty[hidden] { display: none; }

/* ---- banner + footer ---- */
.banner { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 22px 26px; background: var(--green-bg); border-radius: var(--radius-card); color: var(--green); }
.banner-icon { flex: none; width: 52px; height: 52px; border-radius: 999px; background: #fff; display: grid; place-items: center; }
.banner-icon svg { width: 28px; height: 28px; }
.banner h2 { font-size: 20px; font-weight: 900; color: var(--plum); }
.banner p { font-weight: 600; margin-top: 2px; }
.site-footer { padding-top: 22px; padding-bottom: 36px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 24px; }
  .mascot { width: 220px; }
  h1 { font-size: 50px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .cards { grid-template-columns: 1fr; }
  .hero {
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-areas: "text mascot" "copy copy";
    column-gap: 12px; padding: 18px 0 18px; align-items: end;
  }
  .mascot { width: 96px; align-self: center; }
  .bubble { display: none; }
  h1 { font-size: 40px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.1em; margin-bottom: 8px; }
  .hero-copy { font-size: 17px; margin-top: 12px; }
  .results-head { margin-top: 22px; }
  .results-title h2 { font-size: 23px; }
  .banner { align-items: flex-start; padding: 18px; }
  .banner-icon { width: 44px; height: 44px; }
  .banner h2 { font-size: 18px; }
}
@media (max-width: 360px) {
  .wordmark { font-size: 21px; }
  .site-header .pill { font-size: 12px; padding: 5px 10px; }
  h1 { font-size: 38px; }
  .hero { grid-template-columns: minmax(0, 1fr) 72px; }
  .mascot { width: 72px; }
  .wait-value { font-size: 40px; }
  .results-tools { width: 100%; }
  .results-tools > * { flex: 1 1 auto; }
  .sort select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
