/* No Tip Club — "sticker bomb meets wheat-paste poster" identity.
   Warm cream paper with a halftone tooth, heavy black ink outlines, deep
   fair-pay green as the hero, safety orange as the loud accent. Anton for
   display type, Permanent Marker for annotations, system stack for body.
   Signature moments: peel-and-slap sticker verdicts, chunky sticker map
   pins, the tip wizard as a perforated ticket stub, a marquee ticker,
   feed rows as sticky tabs, buttons with hard offset shadows.
   Compact vertical rhythm is preserved: this is loud, not airy. */

:root {
  --paper: #F5EFE0;
  --card: #FFFDF6;
  --ink: #191410;
  --muted: #6B5F52;
  --line: #E4D9BE;
  --line-soft: #EFE6CF;
  /* Signature: deep fair-pay green. */
  --green: #0C6B3A;
  --green-deep: #095C31;
  --green-ink: #074A27;
  --green-bg: #D9EEDF;
  --gold: #B45309;
  --gold-bg: #FBEECB;
  --gold-ink: #7A4A06;
  --red: #D92D20;
  --red-bg: #FBDCD6;
  --red-ink: #A11A10;
  --gray-bg: #E8E4D8;
  --gray-ink: #5A5145;
  /* Loud accent: safety orange. Small text uses the deep cut for contrast. */
  --loud: #FF4D1C;
  --loud-deep: #C2340A;
  --loud-bg: #FFE3D3;
  --tape: rgba(255, 196, 110, 0.85);
  --radius: 10px;
  --hard: 4px 4px 0 var(--ink);
  --hard-lg: 6px 6px 0 var(--ink);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  /* Halftone tooth: faint wheat-paste dots over the paper. */
  background-image: radial-gradient(rgba(25, 20, 16, 0.055) 1px, transparent 1.4px);
  background-size: 12px 12px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main#main { flex: 1; width: 100%; }

::selection { background: var(--loud); color: var(--ink); }
:focus-visible { outline: 3px solid var(--loud); outline-offset: 2px; border-radius: 6px; }

/* Display type: Anton for headings, brand, buttons, numerals. */
h1, h2, h3, .brand-name, .btn, .cat-choice .t, .notfound-code,
.chip, .ticker-track, .burst, .ticket-kicker {
  font-family: var(--display);
  font-weight: 400;
}
/* Marker pen: annotations, kickers, playful microcopy. */
.marker, .marker-note, .ticket-kicker, .stats-line, .slip-doodle, .feed-aside h2 {
  font-family: var(--marker);
  font-weight: 400;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 50; }

a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: 0.85em; }
.tight { margin-top: 0; }
.fineprint { margin-top: 16px; }

/* Masking tape strip: absolutely positioned inside a relative parent. */
.tape {
  position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 110px; height: 26px;
  background: var(--tape);
  border-left: 2px dashed rgba(25, 20, 16, 0.25);
  border-right: 2px dashed rgba(25, 20, 16, 0.25);
  box-shadow: 0 1px 2px rgba(25, 20, 16, 0.15);
  pointer-events: none;
}

/* Starburst badge. */
.burst {
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; padding: 10px;
  background: var(--loud); color: var(--ink);
  font-size: 16px; line-height: 1.05; text-align: center; text-transform: uppercase;
  clip-path: polygon(100% 50%, 88.6% 60.4%, 93.3% 75%, 78.3% 78.3%, 75% 93.3%, 60.4% 88.6%, 50% 100%, 39.6% 88.6%, 25% 93.3%, 21.7% 78.3%, 6.7% 75%, 11.4% 60.4%, 0% 50%, 11.4% 39.6%, 6.7% 25%, 21.7% 21.7%, 25% 6.7%, 39.6% 11.4%, 50% 0%, 60.4% 11.4%, 75% 6.7%, 78.3% 21.7%, 93.3% 25%, 88.6% 39.6%);
  transform: rotate(10deg);
}

/* Marker-pen margin note. */
.marker-note {
  font-size: 16px; color: var(--ink); margin: 6px 0;
  transform: rotate(-1deg); display: inline-block;
}
.marker-note.loud { color: var(--loud-deep); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex-shrink: 0;
  transform: rotate(-8deg);
  filter: drop-shadow(2px 2px 0 var(--ink));
  transition: transform 0.15s ease;
}
.brand:hover .brand-mark { transform: rotate(-2deg) scale(1.08); }
.brand-name {
  font-size: 27px; letter-spacing: 0.01em; text-transform: uppercase;
  transform: rotate(-1.5deg); display: inline-block; line-height: 1;
  text-decoration: underline; text-decoration-color: var(--loud);
  text-decoration-thickness: 4px; text-underline-offset: 4px;
}
.site-nav { display: flex; gap: 14px; align-items: center; }
/* Plain nav links only: anchors borrowing button/bubble styling bring
   their own typography and must not inherit nav-link sizing/color. */
.site-nav a:not(.btn):not(.about-q) {
  text-decoration: none; font-size: 15px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink);
}
.site-nav a:not(.btn):not(.about-q):hover { color: var(--loud-deep); }

/* Header actions: sticker "Tip us off" toggle + "?" about bubble. */
.tip-toggle {
  font-family: var(--display); font-size: 17px; padding: 7px 16px; min-height: 0;
  transform: rotate(1.5deg);
}
.tip-toggle:hover { transform: rotate(-1deg) translate(-1px, -1px); }
.tip-toggle[aria-expanded="true"] {
  background: var(--loud); color: var(--ink);
  transform: rotate(0deg) translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink);
}
.about-q {
  width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--ink); border-radius: 50%;
  background: var(--card); color: var(--ink);
  font-family: var(--display); font-size: 19px; line-height: 1; text-decoration: none;
  box-shadow: var(--hard); transform: rotate(-5deg);
  transition: transform 0.08s ease, box-shadow 0.08s ease, color 0.15s ease;
}
.about-q:hover { transform: rotate(3deg); color: var(--loud-deep); }
.about-q:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* Submission drawer: unrolls beneath the header bar, in flow, pushing the
   ticker and page content down. Closed = zero height, out of the tab order. */
.submit-drawer {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.3s ease, visibility 0s 0.3s;
}
.submit-drawer.drawer-open {
  grid-template-rows: 1fr; visibility: visible;
  transition: grid-template-rows 0.3s ease, visibility 0s 0s;
  border-top: 3px dashed var(--ink);
}
.submit-drawer-inner { overflow: hidden; min-height: 0; }
.submit-drawer .tip-ticket { margin: 14px 0; transform: rotate(0.3deg); }

/* One-line how-to hints under the search and location fields. */
.hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.hint.marker-hint { font-family: var(--marker); font-size: 15px; color: var(--ink); transform: rotate(-0.6deg); display: inline-block; }

/* Marquee ticker under the header: wheat-paste slogan strip. */
.ticker {
  background: var(--loud);
  border-bottom: 3px solid var(--ink);
  overflow: hidden; white-space: nowrap;
}
.ticker-track {
  display: inline-flex; align-items: center;
  font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
  padding: 6px 0;
  animation: ticker-scroll 30s linear infinite;
  will-change: transform;
}
.ticker-chunk { padding-right: 12px; }
.ticker-chunk i { font-style: normal; padding: 0 10px; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }

/* Buttons: chunky pressables with hard offset shadows. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff;
  border: 2.5px solid var(--ink); border-radius: 10px;
  font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 9px 22px; min-height: 44px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--hard);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.btn:hover { background: var(--green-deep); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: var(--hard); }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.secondary:hover { background: var(--loud-bg); }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; }
.btn.ghost:hover { color: var(--ink); background: var(--loud-bg); box-shadow: none; transform: none; }
.btn.small { font-size: 14px; padding: 6px 14px; min-height: 44px; border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); }
.btn.small:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* Verdict stickers: peel-and-slap. Thick white rim, ink keyline, hard
   shadow, slight tilt. White sticker text on the verdict color. */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 6px 14px 5px; white-space: nowrap; flex-shrink: 0;
  color: #fff;
  background: var(--green);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
}
.chip.green { background: var(--green); }
.chip.gold { background: var(--gold); }
.chip.red { background: var(--red); }
.chip.gray { background: var(--gray-ink); }
.feed-row:nth-child(even) .chip { transform: rotate(1.6deg); }

/* Controls: search + location */
.controls {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px;
  padding: 14px 0 12px; align-items: start;
}
@media (max-width: 760px) { .controls { grid-template-columns: 1fr; } }
.controls label, .rw-label, .field label {
  display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 6px;
}
.loc-row { display: flex; gap: 8px; }
.loc-field { position: relative; flex: 1; min-width: 0; }
.loc-field input[type="text"] { width: 100%; padding-right: 48px; }
.loc-gps {
  position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 0 8px 8px 0;
  color: var(--muted); cursor: pointer;
}
.loc-gps:hover { color: var(--loud-deep); background: var(--loud-bg); }
.loc-gps:focus-visible { outline: 3px solid var(--loud); outline-offset: -3px; }
.loc-gps svg { display: block; }
input[type="text"], input[type="search"], textarea, select {
  font-size: 15px; padding: 10px 12px; min-height: 44px;
  border: 2px solid var(--ink); border-radius: 10px;
  background: #fff; color: var(--ink); font-family: inherit;
}
input[type="text"]:focus, input[type="search"]:focus, textarea:focus {
  outline: 3px solid var(--loud); outline-offset: 1px;
}
#loc-status { margin: 6px 0 0; }
#loc-status strong { color: var(--ink); }
.gps-note { display: block; margin-top: 4px; font-size: 13px; }

.search-box { position: relative; }
.search-box input[type="search"] { width: 100%; box-shadow: 3px 3px 0 var(--ink); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px;
  box-shadow: var(--hard); text-align: left; overflow: hidden;
  max-height: 380px; overflow-y: auto;
}
.search-result {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  border: 0; border-bottom: 2px dashed var(--line); background: none; cursor: pointer;
  font-size: 15px; font-family: inherit; color: var(--ink); min-height: 44px;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result:focus-visible { background: var(--loud-bg); }
.search-result .name { font-weight: 600; }
.search-result .addr { color: var(--muted); font-size: 13px; }
.search-result.new-place { background: var(--green-bg); }
.search-result.new-place:hover { background: #CBE8D4; }
.search-hint { color: var(--muted); font-size: 13px; padding: 10px 14px; }

/* Map */
.map-section { padding: 0 0 6px; }
.map-frame {
  border: 3px solid var(--ink); border-radius: 14px; overflow: hidden;
  box-shadow: var(--hard-lg); background: var(--card);
}
#map { height: 56vh; min-height: 420px; max-height: 640px; background: #E8EEF4; z-index: 1; }
.map-wrap { position: relative; }
.map-legend {
  display: flex; gap: 10px; padding: 10px 12px; background: var(--card);
  border-top: 3px solid var(--ink); flex-wrap: wrap; align-items: center;
}
.leaflet-container { font-family: var(--sans); }
.leaflet-popup-content-wrapper { border-radius: 10px; border: 2px solid var(--ink); }
.leaflet-popup-content { font-size: 14px; margin: 10px 12px; }
.leaflet-popup-content a { font-weight: 700; color: var(--green-deep); }

/* Signature map pins: chunky sticker pins with a dollar head. White rim,
   ink keyline, hard offset shadow, slapped on at a tilt. Built as divIcons
   (see pinIcon in app.js). */
.pin-wrap { background: none; border: 0; }
.map-pin {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2.5px var(--ink), 5px 6px 0 rgba(25, 20, 16, 0.9);
  transform: rotate(-8deg);
  animation: pin-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.map-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -7px;
  width: 12px; height: 12px; background: inherit;
  border-right: 4px solid #fff; border-bottom: 4px solid #fff;
  transform: translateX(-50%) rotate(45deg);
}
.map-pin > span {
  color: #fff; font-size: 17px; line-height: 1;
  font-family: var(--display); transform: rotate(8deg);
}
.map-pin.v-fair { background: var(--green); }
.map-pin.v-fixed { background: var(--gold); }
.map-pin.v-bad { background: var(--red); }
.map-pin.v-unknown { background: var(--gray-ink); }
.pin-wrap.pin-big { z-index: 1000 !important; }
.pin-wrap.pin-big .map-pin { transform: rotate(-8deg) scale(1.4); }
.pin-wrap .map-pin { transition: transform 0.15s ease; }
@keyframes pin-in {
  from { opacity: 0; transform: rotate(-8deg) translateY(-18px) scale(1.2); }
  to { opacity: 1; transform: rotate(-8deg) translateY(0) scale(1); }
}

/* Homepage grid */
.home-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px;
  padding: 16px 0; align-items: start;
}
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.home-grid h2 {
  font-size: 27px; letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 10px; line-height: 1;
  text-decoration: underline; text-decoration-color: var(--loud);
  text-decoration-thickness: 4px; text-underline-offset: 5px;
}

.nearby-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 6px; border-bottom: 2px dashed var(--line); text-decoration: none;
  border-radius: 8px; min-height: 48px; color: var(--ink);
  transition: background-color 0.2s ease;
}
.nearby-row:last-child { border-bottom: 0; }
.nearby-row:hover { background: var(--loud-bg); }
.nearby-row.flash { background: var(--loud-bg); outline: 3px solid var(--loud); outline-offset: -3px; }

/* Stats line: marker-pen proof, numbers in loud orange. */
.stats-line { font-size: 17px; color: var(--ink); margin: 6px 0 2px; transform: rotate(-0.4deg); }
.stats-line strong { color: var(--loud-deep); }
.nearby-main { min-width: 0; }
.nearby-name { font-weight: 700; font-size: 15px; display: block; }
.nearby-sub { color: var(--muted); font-size: 13.5px; display: block; margin-top: 2px; }

/* Recently tipped off: a stack of sticky tabs. */
.feed-aside h2 {
  font-size: 19px; color: var(--loud-deep); margin: 0 0 4px;
  transform: rotate(-1deg); display: inline-block;
}
.feed { display: flex; flex-direction: column; padding-top: 10px; }
.feed-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; margin: 0 6px 10px 0;
  background: var(--card); border: 2px solid var(--ink); border-radius: 3px 10px 10px 10px;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none; color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feed-row:nth-child(odd) { transform: rotate(-0.7deg); }
.feed-row:nth-child(even) { transform: rotate(0.6deg); }
.feed-row:hover { transform: rotate(0deg) translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
/* Tape tab holding each sticky note up. */
.feed-row::before {
  content: ""; position: absolute; top: -10px; left: 22px;
  width: 58px; height: 17px; background: var(--tape);
  border-left: 2px dashed rgba(25, 20, 16, 0.25);
  border-right: 2px dashed rgba(25, 20, 16, 0.25);
  transform: rotate(-4deg); pointer-events: none;
}
.feed-row:nth-child(even)::before { left: auto; right: 26px; transform: rotate(5deg); }
.feed-main { min-width: 0; }
.feed-name { font-size: 13.5px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-size: 12px; color: var(--muted); }
.feed-row .chip { font-size: 11px; padding: 4px 10px 3px; }
@keyframes feed-in {
  from { opacity: 0; transform: translateY(-8px) rotate(-3deg); }
  to { opacity: 1; }
}
.feed-new { animation: feed-in 0.5s ease-out; }

/* Post-submission banner: the ticket stub. Perforated left edge, slapped on
   at a tilt. The verdict sticker slams in just after (pure CSS). The global
   prefers-reduced-motion rule at the end of this file disables it. */
#tip-slip-slot { margin: 14px 0 0; }
#tip-slip-slot:empty { margin: 0; }
.tip-slip-line {
  position: relative;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 3px solid var(--ink);
  border-radius: 12px; padding: 8px 8px 8px 26px;
  box-shadow: var(--hard-lg);
  transform: rotate(-0.5deg);
  animation: slip-drop 0.35s ease-out;
}
/* Punched perforation down the left side. */
.tip-slip-line::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 8px;
  background-image: radial-gradient(circle, var(--paper) 3px, rgba(25, 20, 16, 0.35) 3.6px);
  background-size: 8px 14px; background-repeat: repeat-y; background-position: center;
  pointer-events: none;
}
@keyframes slip-drop {
  from { opacity: 0; transform: translateY(-10px) rotate(1deg); }
  to { opacity: 1; transform: translateY(0) rotate(-0.5deg); }
}
.slip-line-text { margin: 0; font-size: 14.5px; flex: 1 1 auto; min-width: 180px; }
.slip-doodle { color: var(--loud-deep); font-size: 16px; margin-left: 6px; transform: rotate(-4deg); display: inline-block; }
.slip-line-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.slip-line-actions a {
  font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--green-deep); text-decoration: none; padding: 10px 12px; border-radius: 8px; white-space: nowrap;
}
.slip-line-actions a:hover { background: var(--green-bg); }
.slip-x {
  border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1;
  width: 40px; height: 40px; cursor: pointer; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.slip-x:hover { color: var(--ink); background: var(--loud-bg); }
.slip-stamp { display: inline-flex; flex-shrink: 0; }
.slip-stamp .chip {
  animation: stamp-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 0.12s both;
}
@keyframes stamp-in {
  0% { opacity: 0; transform: scale(2.4) rotate(-16deg); }
  55% { opacity: 1; transform: scale(0.92) rotate(-2deg); }
  75% { transform: scale(1.06) rotate(-6deg); }
  100% { opacity: 1; transform: scale(1) rotate(-4deg); }
}

/* Restaurant detail. */
.place-head { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; }
.place-head-main { min-width: 0; }
#place-map {
  width: 240px; height: 240px; flex: none;
  border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: var(--hard);
  background: var(--gray-bg); z-index: 0;
  transform: rotate(1deg);
}
@media (max-width: 640px) {
  .place-head { flex-direction: column; }
  #place-map { width: 100%; height: 220px; transform: none; }
}
.detail-head { padding: 24px 0 14px; }
.detail-head h1 {
  font-size: clamp(36px, 5vw, 54px); letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 8px; line-height: 0.95;
}
.detail-head .addr { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.verdict-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.verdict-line .chip { font-size: 16px; padding: 8px 18px 7px; }

/* Tip distribution bar: chunky torn-paper segments. */
.verdict-breakdown { margin: 2px 0 12px; max-width: 440px; }
.vbar {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  border: 2.5px solid var(--ink); background: var(--card);
}
.vbar-seg { min-width: 4px; }
.vbar-seg + .vbar-seg { border-left: 2.5px solid var(--ink); }
.seg-no_tips { background: var(--green); }
.seg-fixed_tips { background: var(--gold); }
.seg-bad_practice { background: var(--red); }
.vbar-legend { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.vbar-key { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--ink); }
.two-col { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.two-col h2 { font-size: 24px; text-transform: uppercase; letter-spacing: 0.01em; margin: 0 0 10px; }
.share-row { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* Cards and grids: sticker cards. */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }
.card {
  position: relative;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px;
  padding: 18px; box-shadow: var(--hard); text-decoration: none; display: block;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover { transform: translate(-2px, -2px) rotate(-0.4deg); box-shadow: 6px 6px 0 var(--ink); }
.card h3 { margin: 10px 0 4px; font-size: 19px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.15; }
.card > h3:first-child { margin-top: 0; }
.card .meta { color: var(--muted); font-size: 14px; margin: 0; }
.card.push { margin-bottom: 14px; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
/* Tape holding each about-card to the wall. */
.card .tape { top: -13px; }

/* No Tip Club wizard: a perforated ticket stub. "ADMIT ONE TIP." */
.tip-ticket {
  position: relative;
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: var(--hard-lg);
  padding: 18px 30px 14px; margin: 18px 0 14px;
  transform: rotate(-0.4deg);
}
/* Punched perforations down both sides of the stub. */
.tip-ticket::before, .tip-ticket::after {
  content: ""; position: absolute; top: 12px; bottom: 12px; width: 8px;
  background-image: radial-gradient(circle, var(--paper) 3px, rgba(25, 20, 16, 0.3) 3.6px);
  background-size: 8px 14px; background-repeat: repeat-y; background-position: center;
  pointer-events: none;
}
.tip-ticket::before { left: 8px; }
.tip-ticket::after { right: 8px; }
.tip-ticket .wizard-sticker {
  font-family: var(--display); font-size: 24px; letter-spacing: 0.02em;
  text-transform: uppercase; line-height: 1; white-space: nowrap; flex: none;
  background: var(--green); color: #FFFDF6;
  border: 3px solid var(--ink); border-radius: 10px; padding: 8px 14px;
  box-shadow: var(--hard); transform: rotate(-2deg); margin: 0;
}
.ticket-kicker {
  font-size: 15px; color: var(--loud-deep); margin: 4px 0 0;
  transform: rotate(-1deg); display: inline-block;
}
.tip-ticket .admit {
  float: right; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); border: 2px dashed var(--muted); border-radius: 8px;
  padding: 4px 10px; transform: rotate(3deg); margin-left: 12px;
}
.rw-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  align-items: end; margin-top: 12px;
}
@media (max-width: 820px) { .rw-grid { grid-template-columns: 1fr; } .tip-ticket .admit { float: none; display: inline-block; margin: 0 0 8px; } }

/* Visually hidden but still announced by assistive tech. */
.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;
}

/* Collapsible wizard: the slim bar is always visible; the rest of the stub
   unrolls beneath it when .wizard-collapsed is removed. */
.tip-ticket .rw-bar { display: flex; align-items: center; gap: 14px; }
.rw-bar .rw-name { flex: 1 1 auto; min-width: 0; }
.rw-bar .search-box input {
  width: 100%; font-size: 16px; padding: 12px 14px; cursor: text;
  box-shadow: var(--hard);
}
.rw-bar .search-box input::placeholder { color: var(--muted); }
.tip-ticket.wizard-collapsed { padding: 12px 30px; }
.rw-expandable {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, visibility 0s 0s;
}
.wizard-collapsed .rw-expandable {
  grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.3s ease, visibility 0s 0.3s;
}
.rw-expandable-inner { overflow: hidden; min-height: 0; }
.wizard-dismiss {
  background: none; border: 0; padding: 6px 4px; margin-top: 8px; cursor: pointer;
  color: var(--muted); font-size: 15px; transform: rotate(-1deg);
}
.wizard-dismiss:hover, .wizard-dismiss:focus-visible {
  color: var(--loud-deep); text-decoration: underline;
}
@media (max-width: 640px) {
  .wizard-sticker { font-size: 19px; padding: 7px 10px; }
  .tip-ticket.wizard-collapsed .admit { display: none; }
}

.cat-choices.compact { grid-template-columns: repeat(3, 1fr); }
.cat-choices.compact .cat-choice { padding: 8px 10px; text-align: center; }
@media (max-width: 640px) { .cat-choices.compact { grid-template-columns: 1fr; } .cat-choices.compact .cat-choice { text-align: left; } }

/* Category toggles: chunky pressables. Pressed = slammed in. */
.cat-choice {
  border: 2.5px solid var(--ink); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  background: #fff; text-align: left; font-family: inherit; color: var(--ink); min-height: 44px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.cat-choice:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.cat-choice .t { font-size: 15px; display: block; letter-spacing: 0.04em; text-transform: uppercase; }
.cat-choice .d { font-size: 13.5px; color: var(--muted); display: block; line-height: 1.45; }
.cat-choice[aria-pressed="true"] { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); color: #fff; }
.cat-choice[aria-pressed="true"] .d { color: rgba(255, 255, 255, 0.85); }
.cat-choice[aria-pressed="true"].c-no_tips { background: var(--green); }
.cat-choice[aria-pressed="true"].c-fixed_tips { background: var(--gold); }
.cat-choice[aria-pressed="true"].c-bad_practice { background: var(--red); }

/* Step 2: entity match */
.match-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.match-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 10px 14px; cursor: pointer;
  border: 2.5px solid var(--ink); border-radius: 12px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: inherit; color: var(--ink); min-height: 48px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.match-card:hover, .match-card:focus-visible { background: var(--loud-bg); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.match-main { min-width: 0; }
.match-name { font-weight: 700; font-size: 15px; display: block; }
.match-addr { color: var(--muted); font-size: 13.5px; display: block; margin-top: 2px; }
.match-yes {
  flex-shrink: 0; font-family: var(--display); font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; background: var(--green);
  border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; white-space: nowrap;
  box-shadow: 2px 2px 0 var(--ink);
}
.match-alt { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

.report-form {
  background: var(--card); border: 3px solid var(--ink); border-radius: 14px;
  padding: 18px; box-shadow: var(--hard-lg); max-width: 720px;
  transform: rotate(0.4deg);
}
.report-form h2 { font-size: 26px; text-transform: uppercase; letter-spacing: 0.01em; margin: 0; }

/* Stage-2 report form: a compact horizontal strip. Stacks on small screens. */
.strip-row { display: flex; gap: 10px; align-items: stretch; margin-top: 12px; }
.strip-verdict { display: flex; flex: 0 0 auto; }
.cat-choices.strip { display: flex; gap: 8px; }
.cat-choices.strip .cat-choice {
  border-radius: 999px; padding: 8px 14px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.cat-choices.strip .cat-choice .t { font-size: 14px; white-space: nowrap; }
.strip-comment {
  flex: 1 1 auto; min-width: 0;
  font-size: 15px; padding: 10px 12px; min-height: 44px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: #fff; color: var(--ink); font-family: inherit;
}
.strip-comment:focus { outline: 3px solid var(--loud); outline-offset: 1px; }
@media (max-width: 640px) {
  .strip-row { flex-direction: column; }
  .cat-choices.strip { flex-wrap: wrap; }
}
.field { margin: 14px 0; }
.field label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; font-family: var(--sans); }

.hp { position: absolute; left: -9999px; }

.notice { border-radius: 10px; padding: 10px 14px; font-size: 15px; margin: 10px 0; border: 2.5px solid var(--ink); }
.notice.error { background: var(--red-bg); color: var(--red-ink); }
.notice.ok { background: var(--green-bg); color: var(--green-ink); }

/* Report list */
.report {
  border: 2.5px solid var(--ink); border-radius: 12px; padding: 12px 14px;
  background: var(--card); margin-bottom: 12px; box-shadow: var(--hard);
}
.report .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.report .fee { font-size: 15px; color: var(--red-ink); font-weight: 600; margin: 6px 0; }
.report .comment { font-size: 15px; margin: 6px 0; }
.report .foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.report-block { margin-top: 12px; }
.report-block h3 { font-size: 20px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 10px; }

/* Cities + footer */
.cities { padding: 4px 0 24px; }
.cities h2 { font-size: 22px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 8px; }
.city-links { font-size: 15px; margin: 0; }
.city-links a {
  color: var(--ink); text-decoration: none; font-weight: 600;
  border-bottom: 3px solid var(--loud); padding-bottom: 1px;
}
.city-links a:hover { background: var(--loud-bg); }

.site-footer {
  border-top: 3px solid var(--ink); margin-top: 32px; padding: 22px 0 28px;
  background: var(--ink); color: #F5EFE0;
}
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-inner p { max-width: 440px; font-size: 14px; margin: 8px 0 0; color: #C9BFAE; }
.footer-brand { font-size: 24px; letter-spacing: 0.02em; text-transform: uppercase; transform: rotate(-1deg); display: inline-block; }
.site-footer nav { display: flex; gap: 20px; align-items: flex-start; }
.site-footer nav a { text-decoration: none; color: #F5EFE0; font-size: 14px; font-weight: 600; }
.site-footer nav a:hover { color: var(--loud); }
.footer-doodle { font-family: var(--marker); color: var(--loud); font-size: 15px; margin-top: 10px; transform: rotate(-1deg); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  #map { min-height: 360px; }
  .report-form, .tip-ticket { padding: 14px 18px; }
  .loc-row { flex-wrap: wrap; }
  .burst { width: 80px; height: 80px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ticker-track { animation: none; }
}

/* 404: lost sticker pin on a mini-map + ticket-stub tip form */
.notfound { text-align: center; padding: 32px 0 56px; }
.notfound-code { margin: 14px 0 4px; line-height: 1; }
.code-slap {
  display: inline-block; font-size: 104px; letter-spacing: 0.01em;
  background: var(--loud); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: var(--hard-lg); padding: 2px 26px 6px;
  transform: rotate(-2deg);
}
.notfound h1 { font-size: 30px; margin: 12px 0 8px; text-transform: uppercase; letter-spacing: 0.01em; }
.notfound p.muted { margin: 0 auto 20px; max-width: 460px; }
.notfound-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
#lost-map {
  height: 230px; border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: var(--hard-lg); background: var(--gray-bg); z-index: 0; margin-bottom: 10px;
  transform: rotate(-0.5deg);
}
.lost-pin-wrap { background: none; border: 0; }
.lost-pin {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--loud);
  border: 4px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2.5px var(--ink), 4px 5px 0 rgba(25, 20, 16, 0.9);
  transform: rotate(-8deg);
  animation: pin-drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.lost-pin > span {
  transform: rotate(8deg); color: #fff; font-size: 22px; line-height: 1;
  font-family: var(--display);
}
@keyframes pin-drop {
  from { opacity: 0; transform: rotate(-8deg) translate(-6px, -20px); }
  to { opacity: 1; transform: rotate(-8deg) translate(0, 0); }
}
.lost-caption { font-size: 14px; color: var(--muted); margin: 0 0 16px; min-height: 21px; }

.nf-tip-form {
  position: relative;
  background: var(--card); border: 3px solid var(--ink); border-radius: 14px;
  padding: 20px 18px 16px; box-shadow: var(--hard-lg); margin: 18px 0 12px; text-align: left;
  transform: rotate(0.5deg);
}
.nf-tip-row { display: flex; gap: 10px; align-items: stretch; }
.nf-tip-row input[type="text"] { flex: 1 1 auto; min-width: 0; }
.nf-cats { margin-top: 12px; }
.nf-tip-form .field { margin: 10px 0 0; }
#nf-result { margin-top: 10px; text-align: left; }
#nf-result:empty { margin-top: 0; }
