/* Bitewalk — one stylesheet for every page. Tokens and component specs come from the Claude Design handoff (design_handoff_bitewalk/README.md). */
:root {
  --ink: #2A1A14; --text-2: #6B5549; --text-2b: #5A463C; --text-3: #8A7266;
  --page: #FFF4EC; --card: #FFFFFF; --border: #F0DFD2; --border-soft: #F5E8DE; --border-input: #E6CFC0; --handle: #DCC3B3;
  --ph-a: #F4E3D6; --ph-b: #F9EDE3; --hover: #FBEDE2;
  --tomato: #D7372A; --tomato-dark: #C22F23; --link: #C0321F; --yolk-bg: #FFE3B0; --yolk-border: #E09A1A; --closed: #9A3412;
  --shadow-card: 0 1px 3px rgba(42,26,20,.06); --shadow-float: 0 8px 30px rgba(42,26,20,.16); --shadow-now: 0 6px 18px rgba(42,26,20,.16); --shadow-sheet: 0 -8px 30px rgba(42,26,20,.16);
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.45 var(--sans); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--tomato); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.text-link { color: var(--link); font-weight: 600; }
.text-link:hover { color: var(--ink); }

/* Wordmark: "bitewalk" with the i's dot as a bitten tomato stop (dotless ı + a masked circle). */
.wordmark { display: inline-flex; align-items: baseline; font: 700 24px/1 var(--sans); letter-spacing: -.05em; color: var(--ink); white-space: nowrap; }
.wordmark .i { position: relative; display: inline-block; }
.wordmark .i::after { content: ''; position: absolute; left: 50%; top: -.02em; transform: translateX(-50%); width: .25em; height: .25em; border-radius: 50%; background: var(--tomato);
  -webkit-mask: radial-gradient(circle at 100% 20%, transparent .075em, #000 .085em); mask: radial-gradient(circle at 100% 20%, transparent .075em, #000 .085em); }

/* Bites for the brand dots (loader, icon). Stops, buttons and icons are never bitten. */
.bite1 { -webkit-mask-image: radial-gradient(circle at 100% 20%, transparent 30%, #000 32%); mask-image: radial-gradient(circle at 100% 20%, transparent 30%, #000 32%); }
.bite2 { -webkit-mask-image: radial-gradient(circle at 100% 20%, transparent 30%, #000 32%), radial-gradient(circle at 0% 80%, transparent 30%, #000 32%); -webkit-mask-composite: source-in;
  mask-image: radial-gradient(circle at 100% 20%, transparent 30%, #000 32%), radial-gradient(circle at 0% 80%, transparent 30%, #000 32%); mask-composite: intersect; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background-color .15s ease, filter .15s ease; }
.btn:hover { filter: brightness(.94); }
.btn-tomato { background: var(--tomato); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--border-input); }
.btn-outline:hover { filter: none; background: var(--hover); }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-input); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip:hover { background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.time-chip { display: inline-flex; align-items: center; font: 500 12px var(--mono); background: #FBEDE2; color: var(--ink); padding: 2px 6px; border-radius: 4px; }
a.time-chip:hover { background: var(--yolk-bg); }

/* Header */
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 32px; display: flex; align-items: center; gap: 18px; background: var(--card); border-bottom: 1px solid var(--border); }
.topbar nav { margin-left: auto; display: flex; gap: 24px; font-size: 15px; font-weight: 600; }
.topbar nav a:hover { color: var(--link); }
.topbar .spacer { flex: 1; }
.topbar-title { font-size: 15px; font-weight: 400; color: var(--text-2b); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title strong { color: var(--ink); }
.topbar-title a:hover { color: var(--link); }
.topbar nav.crumbs { margin-left: 0; display: block; font-weight: 400; }
.crumbs a { font-weight: 600; }
.crumbs { font-size: 14px; color: var(--text-2b); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { color: var(--link); }
.header-search { flex: 0 1 420px; height: 40px; border: 1px solid var(--border-input); border-radius: 999px; padding: 0 16px; background: var(--card); font-size: 15px; outline: none; }
.header-search:focus { border-color: var(--ink); }
.preview-pill { font: 500 12px var(--mono); background: var(--yolk-bg); border: 1px solid var(--yolk-border); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* Footer / attribution */
.site-foot { border-top: 1px solid var(--border); padding: 20px 40px 28px; font-size: 12px; color: var(--text-2); display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.attrib { font-size: 11px; color: var(--text-2); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); }
.list-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--border-soft); }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--hover); }
.list-row .row-name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.list-row .row-meta { margin-left: auto; font-size: 14px; color: var(--text-2); white-space: nowrap; text-align: right; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: repeating-linear-gradient(135deg, var(--ph-a) 0 6px, var(--ph-b) 6px 12px); border: 1px solid var(--border); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Thumbnails (YouTube) */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(135deg, var(--ph-a) 0 10px, var(--ph-b) 10px 20px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .duration { position: absolute; right: 8px; bottom: 8px; font: 700 12px var(--mono); background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 4px; }

/* Stop pins (numbered, walk colour via --c; never bitten) */
.pin { --c: #8A9099; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center; font: 700 11px/1 var(--sans); border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pin.flat { border: 0; box-shadow: none; }
.pin.review { background: #fff; color: var(--ink); border: 1.5px dashed var(--text-2); box-shadow: none; }
.pin.mentioned { width: 12px; height: 12px; background: var(--handle); border: 2px solid #fff; font-size: 0; }
.pin.lg { width: 56px; height: 56px; font-size: 22px; border-width: 3px; box-shadow: var(--shadow-now); }
.walk-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--c, var(--handle)); }

/* Map container (Google Maps or the drawn fallback) */
.bw-map { position: relative; overflow: hidden; background: #F3E7DC; }
/* Google Maps draws its own tiles, logo and controls with <img>; keep the page's img reset away from them. */
.bw-map .gm-style img { max-width: none; display: revert; }
.bw-map .map-attrib { position: absolute; left: 78px; bottom: 7px; z-index: 3; font-size: 10px; color: var(--text-2b); background: rgba(255,255,255,.8); padding: 1px 6px; border-radius: 3px; pointer-events: none; }
.map-marker { position: absolute; transform: translate(-50%, -50%); cursor: pointer; padding: 0; background: none; border: 0; z-index: 2; transition: opacity .2s ease; }
.map-marker .pin { transition: transform .15s ease; }
.map-marker:hover .pin { transform: scale(1.12); }
.map-marker.dim { opacity: .25; }
.map-marker.active { z-index: 5; }
.map-marker.active .pin { width: 34px; height: 34px; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 4px rgba(22,24,29,.14); }
.map-marker .pin-label { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-card), 0 0 0 1px var(--border); display: none; }
.map-marker .pin-label .mono { font-weight: 500; margin-right: 6px; }
.map-marker.active .pin-label, .map-marker.show-label .pin-label { display: block; }
.fallback-map { position: absolute; inset: 0; }
.fallback-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Loader (mapping a video only) */
.loader { display: inline-flex; gap: 4px; }
.loader i { width: 16px; height: 16px; border-radius: 50%; background: var(--border); display: block; }
.loader i.on { background: var(--tomato); }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; color: var(--text-3); font-weight: 500; }
.steps li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--handle); box-sizing: border-box; }
.steps li.now, .steps li.done { color: var(--ink); }
.steps li.now { font-weight: 700; }
.steps li.now::before { border-color: var(--ink); }
.steps li.done::before { border-color: var(--ink); background: var(--ink); }
.steps li span { font: 400 13px var(--mono); color: var(--text-2b); }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 24px; }
.empty-state img { width: auto; height: 150px; margin-bottom: 6px; }
.empty-state h2 { font-size: 20px; letter-spacing: -.02em; }
.empty-state p { margin: 0; color: var(--text-2b); max-width: 380px; }
.loading-line { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--tomato) 0 30%, var(--border) 30%); background-size: 300% 100%; animation: load 1.2s linear infinite; }
@keyframes load { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ───────────── Home ───────────── */
.home { max-width: 1440px; margin: 0 auto; padding: 48px 40px 56px; display: flex; flex-direction: column; gap: 56px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.hero h1 { font-size: 56px; line-height: 1; letter-spacing: -.04em; margin-bottom: 20px; }
.search-wrap { position: relative; }
.search-pill { display: flex; align-items: center; height: 56px; padding: 0 6px 0 22px; background: var(--card); border: 1px solid var(--border-input); border-radius: 999px; box-shadow: 0 2px 8px rgba(42,26,20,.06); }
.search-pill:focus-within { border-color: var(--ink); }
.search-pill input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 18px; height: 100%; }
.search-pill input::placeholder { color: var(--text-3); }
.search-pill .btn { height: 44px; padding: 0 20px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.suggest .chip { height: 32px; }
.results { position: absolute; left: 0; right: 0; top: 64px; z-index: 30; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-float); padding: 8px 0; max-height: 420px; overflow-y: auto; }
.results h3 { font: 600 12px var(--sans); color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; padding: 10px 18px 4px; }
.results a { display: flex; gap: 10px; align-items: baseline; padding: 9px 18px; }
.results a:hover, .results a.hl { background: var(--hover); }
.results a b { font-weight: 600; }
.results a span { color: var(--text-2); font-size: 13px; }
.results .none { padding: 12px 18px; color: var(--text-2b); }
.paste-card { padding: 20px; }
.paste-card h2 { font-size: 18px; letter-spacing: -.01em; }
.paste-form { display: flex; gap: 8px; margin-top: 14px; }
.paste-form input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--border-input); border-radius: 10px; padding: 0 14px; font: 13px var(--mono); outline: none; background: #fff; }
.paste-form input:focus { border-color: var(--ink); }
.paste-form .btn { height: 48px; border-radius: 10px; padding: 0 18px; }
.paste-help { margin: 12px 0 0; font-size: 13px; color: var(--text-2b); }
.paste-error { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--closed); }
.paste-head { display: flex; align-items: center; gap: 12px; }
.paste-head h2 { font-size: 18px; }
.paste-sub { margin: 6px 0 0; color: var(--text-2b); font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.paste-done p { margin: 0; font-size: 16px; }
.paste-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.paste-actions button.link { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; }
.section-title { font-size: 26px; letter-spacing: -.02em; margin-bottom: 18px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.video-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; transition: box-shadow .15s ease; }
.video-card:hover { box-shadow: var(--shadow-now); }
.video-card .thumb { margin-bottom: 8px; }
.video-card { position: relative; }
.video-card .stretch::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.video-card h3 a:hover { color: var(--link); }
.video-card.featured .mini-map { position: relative; pointer-events: none; }
.video-card .by { font-size: 14px; font-weight: 600; color: var(--text-2b); }
.video-card h3 { font-size: 18px; line-height: 1.2; letter-spacing: -.01em; }
.video-card .meta { font-size: 13px; color: var(--text-2); }
.video-card.featured { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 0; padding: 0; overflow: hidden; }
.video-card.featured .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.video-card.featured .mini-map { min-height: 100%; border-left: 1px solid var(--border); }
.video-rows { display: flex; flex-direction: column; gap: 12px; }
.video-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; }
.video-row .thumb { border-radius: 8px; }
.video-row h3 { font-size: 15px; line-height: 1.2; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* ───────────── Video map ───────────── */
.video-page { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--page); }
.video-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.map-area { position: relative; flex: 1; min-height: 0; }
.map-area > .bw-map { position: absolute; inset: 0; }
.player-panel { position: absolute; left: 24px; top: 24px; z-index: 10; width: 460px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-float); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.player-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(135deg, #2A1A14 0 10px, #35231B 10px 20px); }
.player-frame iframe, .player-frame .yt-target { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; }
.player-poster .play-mark { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; transform: translate(-50%, -50%); border-radius: 12px; background: rgba(42,26,20,.85); display: grid; place-items: center; }
.player-poster .play-mark::after { content: ''; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.player-poster:hover .play-mark { background: var(--tomato); }
.now-pill { position: absolute; left: 10px; top: 10px; z-index: 2; height: 32px; padding: 0 12px 0 4px; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; font-size: 14px; font-weight: 600; max-width: calc(100% - 20px); pointer-events: none; }
.now-pill .pin { width: 24px; height: 24px; border: 0; box-shadow: none; }
.now-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-panel.playing .now-pill { display: none; }
.controls { display: flex; align-items: center; gap: 10px; }
.controls .btn { height: 36px; padding: 0 14px; min-width: 66px; }
.clock { font: 400 14px var(--mono); white-space: nowrap; }
.clock span { color: var(--text-3); }
.controls .counts { margin-left: auto; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.timeline { position: relative; height: 32px; cursor: pointer; touch-action: none; outline: none; }
.timeline:focus-visible { outline: 2px solid var(--tomato); outline-offset: 2px; border-radius: 4px; }
.timeline .track { position: absolute; left: 0; right: 0; top: 14px; height: 4px; background: var(--border); border-radius: 2px; }
.timeline .progress { position: absolute; left: 0; top: 14px; height: 4px; background: var(--tomato); border-radius: 2px; width: 0; }
.timeline .tdot { position: absolute; top: 16px; width: 8px; height: 8px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.timeline .tdot.review { background: #fff; border: 1.5px dashed var(--text-2); }
.timeline .tdot.mentioned { width: 6px; height: 6px; background: var(--handle); }
.timeline .tdot.on { width: 14px; height: 14px; z-index: 2; }
.timeline .thumb-knob { display: none; }
.walks-panel { position: absolute; right: 24px; top: 24px; z-index: 10; width: 290px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-float); overflow: hidden; }
.walks-panel h2, .sheet-walks h2 { padding: 14px 16px 8px; font-size: 15px; letter-spacing: -.01em; }
.walk-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border-soft); min-height: 52px; }
.walk-row:hover { background: var(--hover); }
.walk-row .walk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.walk-row .walk-name { font-size: 14px; font-weight: 600; }
.walk-row .walk-meta { font-size: 12px; color: var(--text-2); }
.walk-row .open { font-size: 12px; font-weight: 600; color: var(--link); white-space: nowrap; }
.walks-foot { padding: 10px 16px 12px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.walks-foot a { color: var(--link); font-weight: 600; }
.strip-wrap { position: relative; z-index: 9; padding: 12px 24px 14px; background: var(--page); border-top: 1px solid var(--border); }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scroll-behavior: smooth; scrollbar-width: thin; }
.stop-card { position: relative; flex: none; width: 176px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-card); text-align: left; transition: box-shadow .15s ease; }
.stop-card .seek { position: absolute; inset: 0; width: 100%; border: 0; background: none; border-radius: 12px; padding: 0; }
.stop-card .details { position: relative; z-index: 1; }
.stop-card:hover { box-shadow: var(--shadow-now); }
.stop-card .top { display: flex; align-items: center; gap: 8px; width: 100%; }
.stop-card .top .pin { border: 0; box-shadow: none; }
.stop-card .top .pin.review { border: 1.5px dashed var(--text-2); }
.stop-card .top .mono { margin-left: auto; font-size: 12px; color: var(--text-2b); }
.stop-card .name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.stop-card .note { font-size: 12px; color: var(--text-2); }
.stop-card .note.closed { color: var(--closed); }
.stop-card .details { display: none; font-size: 12px; font-weight: 600; color: var(--link); margin-top: auto; }
.stop-card.now { background: var(--yolk-bg); border: 2px solid var(--yolk-border); padding: 11px; box-shadow: var(--shadow-now); }
.stop-card.now .details { display: inline; }
.stop-card.mentioned { opacity: .7; }
.stop-card.mentioned .top .pin { margin: 7px; }
.sheet-handle { display: none; }
.sheet-walks { display: none; }
.sheet-foot { display: none; }
.center-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 12; width: min(440px, calc(100% - 32px)); padding: 22px; }
.center-card .error { color: var(--closed); font-weight: 600; margin: 8px 0 0; }

/* ───────────── City / creator listing ───────────── */
.listing { display: grid; grid-template-columns: minmax(0, 1fr) 560px; align-items: start; }
.listing-main { padding: 28px 32px 40px; min-width: 0; }
.title-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.title-row h1 { font-size: 56px; line-height: 1; letter-spacing: -.04em; }
.title-row p { margin: 0 0 6px; color: var(--text-2b); font-size: 15px; }
.title-row p a { color: var(--link); font-weight: 600; }
.filter-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 8px; }
.filter-row > span { font-size: 13px; font-weight: 600; color: var(--text-2); padding-top: 8px; }
.filter-row .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.count-line { margin: 22px 0 14px; font-size: 14px; color: var(--text-2b); }
.count-line b { color: var(--ink); }
.place-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.place-card { position: relative; padding: 14px; display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s ease, background-color .15s ease; }
.place-card:hover, .place-card.active { box-shadow: var(--shadow-now); }
.place-card.active { border-color: var(--ink); }
.place-card .walk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2b); margin-bottom: 4px; }
.place-card .walk .pin { width: 24px; height: 24px; font-size: 10px; border: 0; box-shadow: none; }
.place-card h3 { font-size: 17px; letter-spacing: -.01em; line-height: 1.2; }
.place-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.place-card .type { font-size: 13px; color: var(--text-2b); }
.place-card .by { margin-top: 6px; font-size: 13px; color: var(--text-2b); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.place-card .by a { position: relative; z-index: 1; }
.place-card .closed { font-size: 12px; font-weight: 600; color: var(--closed); }
.creator-videos { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.creator-videos .video-row { flex: 0 0 340px; }
.listing-map { position: sticky; top: 64px; height: calc(100vh - 64px); border-left: 1px solid var(--border); }
.listing-map .bw-map { position: absolute; inset: 0; }

/* ───────────── Place ───────────── */
.place-layout { display: grid; grid-template-columns: minmax(0, 1fr) 540px; align-items: start; }
.place-main { padding: 40px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.place-title { display: flex; align-items: center; gap: 18px; }
.place-title h1 { font-size: 60px; line-height: 1; letter-spacing: -.04em; }
.place-title p { margin: 6px 0 0; color: var(--text-2b); font-size: 16px; }
.place-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.place-actions .btn { height: 46px; padding: 0 20px; }
.trust { font-size: 13px; color: var(--text-2b); }
.trust.closed { color: var(--closed); font-weight: 600; }
.place-main h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 12px; }
.moment { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; padding: 14px; }
.moment .info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.moment .by { font-size: 13px; font-weight: 600; color: var(--text-2b); }
.moment h3 { font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.moment .dishes { display: flex; flex-wrap: wrap; gap: 6px; }
.moment .dishes span { font-size: 12px; background: var(--hover); border-radius: 999px; padding: 3px 9px; }
.moment .btn { align-self: flex-start; margin-top: auto; height: 44px; }
.moment .mentioned { font-size: 13px; color: var(--text-2); }
.note-line { margin: 10px 0 0; font-size: 13px; color: var(--text-2b); }
.walk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.walk-chip { display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.walk-chip:hover { background: var(--hover); }
.walk-chip .mono { font-size: 12px; color: var(--text-2b); }
.walk-chip.current { border: 2px solid var(--ink); padding: 8px 13px; font-weight: 700; }
.place-map { position: sticky; top: 64px; height: calc(100vh - 64px); border-left: 1px solid var(--border); }
.place-map .bw-map { position: absolute; inset: 0; }
details.report { font-size: 13px; }
details.report summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 4px 0; display: inline-block; }
details.report summary:hover { color: var(--ink); }
.report-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.report-form label { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.report-form input[name="note"] { flex: 1 1 220px; height: 36px; border: 1px solid var(--border-input); border-radius: 10px; padding: 0 12px; }
.report-form .btn { height: 36px; }
.report-result { font-size: 13px; font-weight: 600; }

/* 404 */
.lost { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 24px; }

/* ───────────── Tablet ───────────── */
@media (max-width: 1180px) {
  .place-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing { grid-template-columns: minmax(0, 1fr) 420px; }
  .place-layout { grid-template-columns: minmax(0, 1fr) 420px; }
  .moment { grid-template-columns: 200px minmax(0, 1fr); }
  .video-card.featured { grid-template-columns: minmax(0, 1fr); }
  .video-card.featured .mini-map { display: none; }
}

/* ───────────── Phone ───────────── */
@media (max-width: 760px) {
  .topbar { padding: 0 20px; height: 56px; }
  .topbar nav { gap: 16px; font-size: 14px; }
  .topbar .header-search { display: none; }
  .home { padding: 20px 20px 40px; gap: 40px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero h1 { font-size: 36px; margin-bottom: 16px; }
  .search-pill { height: 50px; padding-left: 18px; }
  .search-pill input { font-size: 16px; }
  .search-pill .btn { height: 40px; padding: 0 14px; }
  .results { top: 58px; }
  .paste-form input, .paste-form .btn { height: 48px; }
  .paste-form input { font-size: 16px; }
  .loader i { width: 14px; height: 14px; }
  .video-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .section-title { font-size: 24px; }
  .video-card.compact { display: grid; grid-template-columns: 118px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 12px; row-gap: 2px; padding: 10px; }
  .video-card.compact .thumb { grid-row: 1 / span 3; margin: 0; border-radius: 8px; align-self: start; }
  .video-card.compact h3 { font-size: 15px; }
  .video-card.compact .duration { font-size: 10px; right: 4px; bottom: 4px; }
  .site-foot { padding: 18px 20px 26px; }

  /* Video map: full-screen map, floating mini player, bottom sheet. */
  .video-page .topbar { display: none; }
  .player-panel { left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); width: auto; padding: 10px; display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: "frame controls" "frame timeline"; column-gap: 12px; row-gap: 4px; align-items: center; }
  .player-panel .player-frame { grid-area: frame; }
  .player-panel .controls { grid-area: controls; }
  .player-panel .timeline { grid-area: timeline; height: 28px; }
  .player-panel .timeline .track, .player-panel .timeline .progress { top: 12px; }
  .player-panel .timeline .tdot { top: 14px; width: 6px; height: 6px; }
  .player-panel .timeline .tdot.on { width: 6px; height: 6px; }
  .player-panel .timeline .thumb-knob { display: block; position: absolute; top: 14px; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ink); z-index: 3; }
  .player-panel .counts, .player-panel .clock span, .player-panel .now-pill { display: none; }
  .player-poster .play-mark { width: 40px; height: 28px; border-radius: 8px; }
  .player-poster .play-mark::after { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
  /* YouTube requires a player of at least 200×200 CSS px: once it plays, the embed takes the panel's full width. */
  .player-panel.expanded { grid-template-columns: minmax(0, 1fr); grid-template-areas: "frame" "controls" "timeline"; }
  .walks-panel { display: none; }
  .video-page { background: #F3E7DC; }
  .map-area { position: fixed; left: 0; right: 0; top: 0; bottom: var(--sheet-h, 380px); transition: bottom .25s ease; }
  .strip-wrap { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 15; height: var(--sheet-h, 380px); padding: 0; background: var(--card); border: 0; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; transition: height .25s ease; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .video-page.dragging .strip-wrap, .video-page.dragging .map-area { transition: none; }
  .sheet-handle { display: block; flex: none; height: 28px; width: 100%; border: 0; background: none; padding: 0; position: relative; touch-action: none; }
  .sheet-handle::after { content: ''; position: absolute; left: 50%; top: 12px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--handle); }
  .sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .strip { padding: 4px 16px 12px; gap: 10px; }
  .stop-card { width: 150px; }
  .sheet-walks { display: block; border-top: 1px solid var(--border-soft); }
  .sheet-walks h2 { padding: 16px 16px 6px; font-size: 18px; }
  .sheet-walks .walk-row { padding: 10px 16px; }
  .sheet-walks .walk-name { font-size: 16px; }
  .sheet-walks .walk-meta { font-size: 13px; }
  .sheet-walks .open { font-size: 14px; }
  .sheet-foot { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 24px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-2); }
  .sheet-foot .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .sheet-foot .btn { height: 44px; }

  .listing, .place-layout { grid-template-columns: minmax(0, 1fr); }
  .listing-map, .place-map { position: relative; height: 240px; border-left: 0; border-bottom: 1px solid var(--border); grid-row: 1; }
  .place-map { height: 260px; }
  .listing-main { padding: 20px 20px 32px; }
  .title-row h1 { font-size: 40px; }
  .filter-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .filter-row > span { padding-top: 0; }
  .filter-row .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .filter-row .chip { height: 36px; }
  .place-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .creator-videos .video-row { flex-basis: 280px; }
  .place-main { padding: 20px 20px 32px; gap: 24px; }
  .place-title h1 { font-size: 34px; }
  .place-title .pin.lg { width: 44px; height: 44px; font-size: 17px; }
  .place-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .place-actions .btn { height: 48px; padding: 0 12px; }
  .place-actions .trust { grid-column: 1 / -1; }
  .moment { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .moment .btn { align-self: stretch; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
