:root {
  --custard: #fbf4e4;
  --paper: #fffaf0;
  --custard-deep: #f3e6c8;
  --ink: #13294b;
  --ink-soft: #3d4f6e;
  --muted: #7a8599;
  --cherry: #d7263d;
  --butterscotch: #e8a33d;
  --mint: #4fb39b;

  --display: 'Shrikhand', 'Cooper Black', Georgia, serif;
  --ui: 'Gabarito', 'Avenir Next', 'Segoe UI', sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --sticker: 4px 4px 0 var(--ink);
  --sticker-lg: 6px 6px 0 var(--ink);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.16 0 0 0 0 0.29 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--custard);
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; cursor: pointer; }

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

/* ---------- Map ---------- */

#map {
  position: fixed;
  inset: 0;
  background: var(--custard);
  font-family: var(--ui);
}

.maplibregl-canvas:focus-visible { outline: 3px solid var(--butterscotch); outline-offset: -3px; }

.maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 16px 16px 0 0; }

.maplibregl-ctrl-group:not(:empty) {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--sticker);
  overflow: hidden;
}
.maplibregl-ctrl-group button { width: 40px; height: 40px; }
.maplibregl-ctrl-group button + button { border-top: 2px solid var(--ink); }
.maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--custard-deep); }

.maplibregl-ctrl-attrib {
  font-family: var(--ui);
  font-size: 10.5px;
}
.maplibregl-ctrl-attrib.maplibregl-compact { background-color: rgba(255, 250, 240, 0.9); }
.maplibregl-ctrl-attrib a { color: var(--ink-soft); }

/* ---------- Balloons ---------- */

/* The marker element itself: MapLibre positions it, so animate the inner .balloon. */
/* MapLibre sets will-change: transform on markers, which makes the browser
   rasterize them as images; with text inside, that renders soft. */
.balloon-icon { width: 196px; height: 68px; cursor: pointer; will-change: auto; z-index: 2; }
.balloon-icon:hover, .balloon-icon:focus-visible { z-index: 5; }
.balloon-icon.is-selected { z-index: 6; }
.balloon-icon:focus-visible { outline: none; }
.balloon-icon:focus-visible .balloon { outline: 3px solid var(--butterscotch); outline-offset: 2px; }
.balloon-icon.is-leaving { pointer-events: none; }
.balloon-icon.is-leaving .balloon { animation: balloon-out 0.18s ease forwards; }

.balloon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 196px;
  height: 58px;
  padding: 5px 12px 5px 5px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  transform-origin: 50% calc(100% + 10px);
  /* backwards, not both: a held final frame would override the hover/selected transforms. */
  animation: balloon-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

/* The tail that points at the store. */
.balloon::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 13px; height: 13px;
  background: var(--paper);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
  border-bottom-right-radius: 3px;
}

.balloon-icon:hover .balloon {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 4px 6px 0 var(--ink);
}

.balloon-img {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--custard) radial-gradient(circle at 35% 30%, #fff 0 30%, var(--custard-deep) 75%);
  border: 1.5px solid rgba(19, 41, 75, 0.18);
  object-fit: contain;
  padding: 2px;
}

.balloon-text { min-width: 0; display: grid; gap: 1px; }

.balloon-flavor {
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.balloon-flavor.is-long { font-size: 12.5px; }

.balloon-city {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balloon.is-status {
  background: #f4efe4;
  border-style: dashed;
  box-shadow: none;
}
.balloon.is-status::after { background: #f4efe4; border-style: dashed; }
.balloon.is-status .balloon-flavor { color: var(--ink-soft); font-weight: 700; font-style: italic; }
.balloon.is-status .balloon-img { filter: grayscale(1); opacity: 0.6; }

.balloon-icon.is-selected .balloon {
  border-color: var(--cherry);
  box-shadow: 3px 3px 0 var(--cherry);
  transform: translateY(-3px) scale(1.06);
}
.balloon-icon.is-selected .balloon::after { border-color: var(--cherry); }

@keyframes balloon-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.3); }
  to { opacity: 1; transform: none; }
}
@keyframes balloon-out {
  to { opacity: 0; transform: translateY(4px) scale(0.6); }
}

.dot-tip { pointer-events: none; }
.dot-tip .maplibregl-popup-content {
  padding: 5px 9px;
  font: 500 12.5px/1.25 var(--ui);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink);
}
.dot-tip strong { font-weight: 800; }
.dot-tip.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--ink); }
.dot-tip.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--ink); }

/* Below the balloons: a nearby store's flavor matters more than the dot. */
.you-marker { width: 18px; height: 18px; z-index: 1; }

.you-are-here {
  position: relative;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cherry);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--ink);
}
.you-are-here.is-dropping { animation: pin-drop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 0.2s both; }
@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-60px) scale(0.5); }
  to { opacity: 1; transform: none; }
}
.you-are-here::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid var(--cherry);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  from { transform: scale(0.3); opacity: 1; }
  to { transform: scale(1.4); opacity: 0; }
}

/* ---------- Panel ---------- */

.panel {
  position: fixed;
  z-index: 1000;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 360px;
  display: flex;
  flex-direction: column;
  background: var(--grain), var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--sticker-lg);
  overflow: hidden;
  animation: panel-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateX(-24px) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}

.masthead {
  position: relative;
  padding: 22px 24px 18px;
  border-bottom: 2px solid var(--ink);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(232, 163, 61, 0.09) 14px 28px),
    var(--custard);
}

.sheet-handle { display: none; }

.kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cherry);
}

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 42px;
  line-height: 0.98;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--butterscotch);
  letter-spacing: 0.005em;
}

.dek {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}
.dek strong { color: var(--ink); font-weight: 800; }

.location-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.location-bar svg {
  flex: none;
  width: 17px; height: 17px;
  fill: none;
  stroke: var(--cherry);
  stroke-width: 2.4;
}
.location-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn {
  padding: 2px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 6px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--butterscotch);
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--cherry); }
.link-btn:focus-visible { outline: 3px solid var(--butterscotch); }

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-soft) transparent;
}

.search {
  position: relative;
  display: block;
  margin-bottom: 16px;
}
.search svg {
  position: absolute;
  left: 14px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.search input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  font: 500 15px var(--ui);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.45); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-label {
  margin: 4px 8px 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chip {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--paper);
  background: var(--cherry);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }

.flavor-list, .store-list { list-style: none; margin: 0; padding: 0; }

.flavor-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 10px 7px 7px;
  text-align: left;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: background 0.15s ease, border-color 0.15s ease;
  animation: row-in 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 22ms + 250ms);
}
.flavor-row:hover { background: var(--custard); border-color: rgba(19, 41, 75, 0.12); }
.flavor-row:focus-visible { outline: 3px solid var(--butterscotch); outline-offset: 1px; }

.flavor-list.no-anim .flavor-row { animation: none; }

@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.flavor-row img {
  width: 44px; height: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 30%, var(--custard-deep) 80%);
}

.flavor-meta { min-width: 0; }
.flavor-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.flavor-bar {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(19, 41, 75, 0.08);
  overflow: hidden;
}
.flavor-bar > span {
  display: block;
  height: 100%;
  width: var(--pct);
  border-radius: inherit;
  background: var(--butterscotch);
}

.flavor-count {
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
  min-width: 2ch;
  text-align: right;
}

.flavor-row.is-active {
  background: var(--ink);
  border-color: var(--ink);
}
.flavor-row.is-active .flavor-name,
.flavor-row.is-active .flavor-count { color: var(--paper); }
.flavor-row.is-active .flavor-bar { background: rgba(255, 255, 255, 0.18); }
.flavor-row.is-active .flavor-bar > span { background: var(--cherry); }
.flavor-row.is-active img { background: var(--paper); }

.flavor-row.is-dim { opacity: 0.45; }

.store-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 7px 10px 7px 7px;
  text-align: left;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
}
.store-row:hover { background: var(--custard); border-color: rgba(19, 41, 75, 0.12); }
.store-row img {
  width: 36px; height: 36px;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 30%, var(--custard-deep) 80%);
}
.store-row .store-flavor { display: block; font-weight: 700; font-size: 14px; line-height: 1.15; }
.store-row .store-where { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.store-row .store-dist { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.place-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  background: var(--custard);
  border: 2px dashed rgba(19, 41, 75, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}
.place-row:hover { border-color: var(--ink); border-style: solid; }
.place-row svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--cherry); stroke-width: 2.4; }

.nearby, .store-results {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(19, 41, 75, 0.18);
}

.empty {
  padding: 12px 10px;
  font-size: 14px;
  color: var(--muted);
}

.fine-print {
  margin-top: 18px;
  padding: 14px 8px 4px;
  border-top: 2px dashed rgba(19, 41, 75, 0.18);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.fine-print p { margin: 0 0 6px; }
.fine-print a { color: var(--ink-soft); font-weight: 700; text-decoration-color: var(--butterscotch); text-underline-offset: 2px; }
.fine-print .stale { color: var(--cherry); font-weight: 700; }

/* ---------- Floating buttons ---------- */

.map-buttons {
  position: fixed;
  z-index: 900;
  right: 16px;
  top: 116px;
  display: grid;
  gap: 12px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--sticker);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.round-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.round-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.round-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Store card ---------- */

.card {
  position: fixed;
  z-index: 1100;
  right: 16px;
  bottom: 28px;
  width: 380px;
  padding: 20px 20px 18px;
  background: var(--grain), var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--sticker-lg);
  animation: card-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}
.card[hidden] { display: none; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) rotate(1deg); }
  to { opacity: 1; transform: none; }
}

.card-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  font-size: 24px;
  line-height: 1;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 50%;
}
.card-close:hover { background: var(--custard); border-color: var(--ink); }

.card-hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 16px;
  padding-right: 28px;
}

.card-img {
  width: 112px; height: 112px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff 0 32%, var(--custard-deep) 78%);
  box-shadow: 3px 3px 0 var(--butterscotch);
  padding: 4px;
}

.card-flavor {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.08;
  color: var(--ink);
}

.card-desc {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.card-store {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px dashed rgba(19, 41, 75, 0.2);
}
.card-store h3 { margin: 0; font-size: 16px; font-weight: 800; }
.card-store p { margin: 3px 0 0; font-size: 14px; color: var(--muted); }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--ink); color: var(--paper); flex-basis: 100%; }
.btn svg { width: 17px; height: 17px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn[hidden] { display: none; }

/* ---------- Welcome (location prompt) ---------- */

.welcome {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(251, 244, 228, 0.6);
  backdrop-filter: blur(4px) saturate(1.1);
  -webkit-backdrop-filter: blur(4px) saturate(1.1);
  animation: fade-in 0.3s ease both;
}
.welcome[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Lift the card away and let the map show through as the camera starts moving. */
.welcome.is-leaving { pointer-events: none; animation: fade-out 0.38s ease forwards; }
.welcome.is-leaving .welcome-card { animation: welcome-out 0.38s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes welcome-out {
  to { opacity: 0; transform: translateY(-36px) scale(0.92); }
}

.welcome-card {
  position: relative;
  width: min(440px, 100%);
  padding: 30px 30px 22px;
  text-align: center;
  background: var(--grain), var(--paper);
  border: 2px solid var(--ink);
  border-radius: 26px;
  box-shadow: 8px 8px 0 var(--ink);
  animation: welcome-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

@keyframes welcome-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}

.welcome-cone {
  display: block;
  width: 58px; height: 58px;
  margin: 0 auto 8px;
  transform-origin: 50% 90%;
  animation: wobble 2.8s ease-in-out 0.6s infinite;
}
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-7deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-2deg); }
  80% { transform: rotate(0); }
}

.welcome-title { font-size: 46px; }

.welcome-dek {
  margin: 12px auto 22px;
  max-width: 30ch;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.welcome-dek strong { color: var(--ink); }

.btn-lg {
  width: 100%;
  height: 54px;
  gap: 10px;
  font-size: 17px;
  box-shadow: 3px 3px 0 var(--cherry);
}
.btn-lg:hover { box-shadow: 4px 4px 0 var(--cherry); }
.btn-lg svg { width: 22px; height: 22px; margin-right: 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btn.is-busy { pointer-events: none; opacity: 0.85; }
.btn.is-busy svg { animation: spin 1s linear infinite; }

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.or::before, .or::after {
  content: '';
  flex: 1;
  border-top: 2px dashed rgba(19, 41, 75, 0.2);
}

.place-form { display: flex; gap: 8px; }
.place-form input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  font: 600 16px var(--ui);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.15s ease;
}
.place-form input::placeholder { color: var(--muted); font-weight: 500; }
.place-form input:focus { box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.45); }
.place-form .btn { height: 50px; padding: 0 20px; font-size: 16px; }

.welcome-error {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cherry);
}
.welcome-error[hidden] { display: none; }

.welcome .link-btn { margin-top: 16px; }

.welcome-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Report a problem ---------- */

.modal {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(19, 41, 75, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade-in 0.2s ease both;
}
.modal[hidden] { display: none; }

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 26px 26px 22px;
  background: var(--grain), var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--sticker-lg);
  animation: card-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

.report-title {
  margin: 0 36px 6px 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  color: var(--ink);
}

.report-dek {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.report-card textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: 500 15px/1.4 var(--ui);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  resize: vertical;
  outline: none;
  transition: box-shadow 0.15s ease;
}
.report-card textarea::placeholder { color: var(--muted); }
.report-card textarea:focus { box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.45); }

.report-context {
  margin: 10px 0 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.report-status {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.report-status.is-error { color: var(--cherry); }
.report-status[hidden] { display: none; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 1200;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--cherry);
}
.toast[hidden] { display: none; }

/* ---------- Small screens: the panel becomes a bottom sheet ---------- */

@media (max-width: 720px) {
  .panel {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: auto;
    max-height: 72vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    box-shadow: 0 -4px 0 var(--ink);
    animation-name: sheet-in;
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes sheet-in {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }

  .masthead { padding: 18px 18px 14px; border-bottom-width: 0; cursor: pointer; }
  .panel.is-open .masthead { border-bottom-width: 2px; }

  .sheet-handle {
    display: block;
    position: absolute;
    top: 7px; left: 50%;
    width: 44px; height: 5px;
    padding: 0;
    transform: translateX(-50%);
    background: var(--ink);
    opacity: 0.35;
    border: 0;
    border-radius: 999px;
  }
  .sheet-handle::before { content: ''; position: absolute; inset: -14px -40px; }

  .title { font-size: 28px; text-shadow: 2px 2px 0 var(--butterscotch); }
  .title br { display: none; }
  .location-bar { margin-top: 8px; font-size: 13.5px; }

  .welcome-card { padding: 24px 20px 18px; box-shadow: 5px 5px 0 var(--ink); }
  .welcome-cone { width: 48px; height: 48px; }
  .welcome-title { font-size: 34px; }
  .welcome-title br { display: inline; }
  .welcome-dek { margin: 10px auto 18px; font-size: 15px; }
  .kicker { margin-bottom: 4px; }
  .dek { margin-top: 6px; font-size: 13.5px; }

  .panel-body { display: none; }
  .panel.is-open .panel-body { display: block; }

  .maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 10px 10px 0 0; }
  .map-buttons { top: 110px; right: 10px; }

  .card {
    left: 10px; right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
  }
  .card-hero { grid-template-columns: 84px 1fr; gap: 12px; }
  .card-img { width: 84px; height: 84px; }
  .card-flavor { font-size: 22px; }
}

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