/* MinBy — styles. The map is the world; everything else is a HUD floating over it. */

/* ---------- Tokens ---------- */
:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; /* only for codes you copy (coupons) and key hints */
  /* six text sizes (11px is the smallest anything is written), plus two for big numbers (the temperature) */
  --fs-xs: 11px;
  --fs-s: 12.5px;
  --fs-m: 14px;
  --fs-l: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-num: 34px;
  --fs-hero: 56px;
  /* corners: small parts, controls, cards, panels, sheets (pills and circles use 999px / 50%) */
  --r-xs: 4px;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 22px;
  --rail-w: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --noise: 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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* One meaning per color:
   amber = news · pink = events · green = store deals (only) · blue = things for sale · orange = neighbors (rides, posts)
   red = safety alerts and errors (only) · indigo = MinBy, you, AI and "new" · cyan = weather · status and buttons are neutral
   The six on the map stay apart for color-blind eyes too: yellow/blue differ for everyone, and the warm ones (amber,
   orange, red) and pink/blue also differ in lightness. Every marker keeps its own shape and icon as well. */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1013;
  --rail: #0A0B0D;
  --card: #17181C;
  --card-2: #1F2025;
  --card-3: #2A2B31;
  --panel: rgba(20, 21, 25, .9);
  --hover: rgba(255, 255, 255, .045);
  --active: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .1);
  --text: #F2F3F5;
  --text-2: #B5BAC1;
  --text-3: #9AA0AA;
  --brand: #6C5CF5;
  --brand-2: #A79DFF;
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .06);
  --shadow-panel: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 50px -18px rgba(0, 0, 0, .75);
  --c-news: #F4DD37;
  --c-events: #F982DA;
  --c-deals: #2FD49C;
  --c-market: #4F8FFF;
  --c-people: #F97924;
  --c-alert: #FA434A;
  --c-weather: #4FD1E8;
  --c-brand: #A79DFF;
  --on-c: #0E0F12;
  --c-new: #8E7FFF;
  --mk-ring: #0E0F12;
  --mk-shadow: 0 4px 10px -2px rgba(0, 0, 0, .55);
  --cloud-a: #F4F6FA;
  --cloud-b: #A3AEC2;
  --cloud-edge: transparent;
  --sun-a: #FFE58A;
  --sun-b: #FFC24B;
  --sun-c: #FF9A3C;
  --moon-a: #E9E6FF;
  --moon-b: #A69CFF;
  --wi-ray: #FFC24B;
  --wi-flake: #CFE6FF;
  --wi-bolt: #FFC24B;
  --tint: 16%;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F3F5;
  --rail: #E3E5E8;
  --card: #FFFFFF;
  --card-2: #F4F5F7;
  --card-3: #E8E9EC;
  --panel: rgba(255, 255, 255, .97);
  --hover: rgba(20, 22, 30, .045);
  --active: rgba(20, 22, 30, .08);
  --line: rgba(20, 22, 30, .08);
  --line-2: rgba(20, 22, 30, .13);
  --text: #1E1F23;
  --text-2: #4E5058;
  --text-3: #686C76;
  --brand: #5B4BEB;
  --brand-2: #5B4BEB;
  --shadow-lg: 0 30px 80px -24px rgba(20, 20, 30, .3), 0 0 0 1px rgba(20, 20, 30, .07);
  --shadow-panel: inset 0 0 0 1px rgba(20, 22, 30, .09), 0 16px 40px -20px rgba(20, 20, 30, .35);
  /* the warm two are text colors here (dark enough to read on white); their fills are true amber and orange below.
     News is the darker one by far, so the two stay apart with red-green colour blindness too (A3) */
  --c-news: #5E4200;
  --c-events: #B8248E;
  --c-deals: #008463;
  --c-market: #003AB5;
  --c-people: #C25400;
  --c-alert: #D0152C;
  --c-weather: #0E7490;
  --c-brand: #5B4BEB;
  --on-c: #FFFFFF;
  --c-new: #5B4BEB;
  --mk-ring: #FFFFFF;
  --mk-shadow: 0 3px 8px -2px rgba(20, 22, 30, .28);
  /* a pale cloud on a pale card needs a darker belly and a fine outline to read */
  --cloud-a: #F3F6FB;
  --cloud-b: #8592AB;
  --cloud-edge: rgba(52, 64, 90, .32);
  --sun-a: #FFD45E;
  --sun-b: #F5A623;
  --sun-c: #E9851C;
  --moon-a: #B8AEFF;
  --moon-b: #6F62E8;
  --wi-ray: #E89A00;
  --wi-flake: #1A6FBF;
  --wi-bolt: #E89A00;
  --tint: 12%;
}
/* rides and posts are both "from a neighbor"; older names point at the same color */
:root { --c-rides: var(--c-people); --c-square: var(--c-people); --fill-news: var(--c-news); --fill-people: var(--c-people); --on-warm: var(--on-c); }
:root[data-theme="light"] { --fill-news: #F2B200; --fill-people: #E8761C; --on-warm: #1E1F23; }
/* Filled shapes (markers, icon tiles, buttons) paint with --fill, which is --c except in light mode's warm colors:
   there amber and orange fill with dark ink on top, so news reads amber (not brown) and rides stay clear of alert red.
   (Elements set --c inline as "--c:var(--c-news)"; toasts set it from script, with a space.) */
:root[data-theme="light"] [style*="--c:var(--c-"], :root[data-theme="light"] [style*="--c: var(--c-"] { --fill: var(--c); --on-c: #FFFFFF; }
:root[data-theme="light"] :is([style*="--c:var(--c-news)"], [style*="--c: var(--c-news)"]) { --fill: var(--fill-news); --on-c: #1E1F23; }
:root[data-theme="light"] :is([style*="--c:var(--c-people)"], [style*="--c: var(--c-people)"], [style*="--c:var(--c-rides)"], [style*="--c: var(--c-rides)"], [style*="--c:var(--c-square)"], [style*="--c: var(--c-square)"]) { --fill: var(--fill-people); --on-c: #1E1F23; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  font: 450 var(--fs-m)/1.45 var(--font);
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
kbd { font: 500 var(--fs-xs)/1 var(--mono); padding: 4px 6px; border-radius: var(--r-s); color: var(--text-3); background: var(--card-2); }
::selection { background: color-mix(in srgb, var(--brand) 40%, transparent); }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
/* inside clipped panels, draw the ring inward so it's never cut off */
.panel :focus-visible, .modal :focus-visible, .menu :focus-visible, .palette-list :focus-visible { outline-offset: -2px; }
/* titles that focus is moved to (so screen readers start there) aren't controls: no ring */
#main:focus-visible, #feed-title:focus-visible, #feed-count:focus-visible, #detail-title:focus-visible, #det-sum:focus-visible, #fc-title:focus-visible, #key-title:focus-visible { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: var(--r-m); font-weight: 600; color: #fff; background: var(--brand); text-decoration: none; transition: top .2s var(--ease); }
.skip:focus { top: 12px; }
.stage:focus { outline: 0; }
.noscript { margin: 40px auto; max-width: 420px; text-align: center; color: var(--text-2); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
* { scrollbar-width: thin; scrollbar-color: var(--card-3) transparent; }
[hidden] { display: none !important; }
.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex-shrink: 0; }

.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--c-brand); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
.dotsep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; flex-shrink: 0; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 150; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg); transition: opacity .6s var(--ease), visibility .6s, transform .6s var(--ease);
}
.splash.is-done { opacity: 0; visibility: hidden; transform: scale(1.04); }
.splash-radar { position: relative; width: 110px; height: 110px; display: grid; place-items: center; }
.splash-radar span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent); animation: radar 2.4s var(--ease) infinite; opacity: 0; }
.splash-radar span:nth-child(2) { animation-delay: .8s; }
.splash-radar span:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.splash-logo { width: 54px; height: 54px; filter: drop-shadow(0 12px 30px color-mix(in srgb, var(--brand) 60%, transparent)); }
.splash-text { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: var(--fs-m); min-height: 22px; }
.splash-text b { color: var(--text); font-weight: 600; }
.splash-text .lucide { width: 16px; height: 16px; color: var(--brand-2); }

/* ---------- Shell: the places rail, then the stage (map + HUD) ---------- */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }

.rail {
  position: relative; z-index: 40; height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0;
  background: var(--rail); overflow-y: auto; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-group { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rail-sep { width: 32px; height: 2px; border-radius: var(--r-xs); background: var(--line-2); flex-shrink: 0; }
.rail-btn {
  --h: 250;
  position: relative; flex-shrink: 0; width: 48px; height: 48px; border-radius: 24px;
  display: grid; place-items: center; color: var(--text-2); background: var(--card);
  font: 650 var(--fs-s)/1 var(--font); transition: border-radius .25s var(--ease), background-color .2s, color .2s;
}
.rail-btn::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 8px; margin-top: -4px;
  border-radius: 0 4px 4px 0; background: var(--text); opacity: 0; transform: scaleX(.4);
  transition: height .25s var(--ease), margin .25s var(--ease), opacity .2s, transform .2s;
}
.rail-btn.is-active { border-radius: var(--r-l); }
.rail-btn.is-active::before { opacity: 1; transform: none; height: 40px; margin-top: -20px; }
.rail-home { background: none; overflow: hidden; }
.rail-home svg { width: 48px; height: 48px; }
.rail-place { color: #fff; background: linear-gradient(140deg, hsl(var(--h) 55% 52%), hsl(calc(var(--h) + 40) 58% 40%)); }
.rail-add, .rail-explore { color: var(--brand-2); }
.rail-settings { margin-top: auto; color: var(--text-3); }
@media (hover: hover) {
  .rail-btn:hover { border-radius: var(--r-l); }
  .rail-btn:hover::before { opacity: 1; transform: none; height: 20px; margin-top: -10px; }
  .rail-add:hover, .rail-explore:hover { color: #fff; background: var(--brand); }
  .rail-settings:hover { color: var(--text); }
}

.stage {
  --gap: 12px; --bar-h: 52px; --hud-l: 300px; --hud-r: 372px; --hud-top: calc(var(--gap) * 2 + var(--bar-h));
  position: relative; height: 100%; min-width: 0; overflow: hidden; isolation: isolate;
}
#map { position: absolute; inset: 0; z-index: 0; background: var(--card-2); }
.vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(130% 100% at 50% 45%, transparent 66%, color-mix(in srgb, var(--bg) 60%, transparent)); }
:root[data-theme="light"] .vignette { display: none; }

/* HUD panels: glass over the map */
.panel {
  background: var(--panel); border-radius: var(--r-l); box-shadow: var(--shadow-panel);
  backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25);
}
body:not(.is-ready) .panel, body:not(.is-ready) .map-ctrls { opacity: 0; }
.is-ready .topbar { animation: hudDown .7s var(--ease) backwards; }
.is-ready .hud-left > *, .is-ready .feed { animation: hudIn .7s var(--ease) backwards; animation-delay: .12s; }
.is-ready .feed { animation-name: hudInR; }
.is-ready .hotbar { animation: hudUp .7s var(--ease) .25s backwards; }
@keyframes hudDown { from { opacity: 0; transform: translateY(-14px); } }
@keyframes hudIn { from { opacity: 0; transform: translateX(-18px); } }
@keyframes hudInR { from { opacity: 0; transform: translateX(18px); } }
@keyframes hudUp { from { opacity: 0; translate: 0 16px; } }

/* ---------- Top bar ---------- */
.topbar {
  position: absolute; z-index: 30; top: var(--gap); left: var(--gap); right: var(--gap); height: var(--bar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 8px 0 10px;
}
.place-wrap { position: relative; min-width: 0; }
.place-btn { display: inline-flex; align-items: center; gap: 9px; height: 40px; max-width: 100%; min-width: 0; padding: 0 8px 0 10px; border-radius: var(--r-m); text-align: left; transition: background .15s; }
.place-btn:hover { background: var(--hover); }
.place-txt { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.place-txt b { font-size: var(--fs-l); font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-txt small { font-size: var(--fs-s); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-txt small:empty { display: none; }
.place-btn > .lucide { width: 17px; height: 17px; color: var(--text-3); transition: transform .25s var(--ease); }
.place-btn[aria-expanded="true"] > .lucide { transform: rotate(180deg); }
/* "Oslo · approx.": plain words, not a symbol that looks like a button */
.approx-tag { flex-shrink: 0; font-size: var(--fs-s); font-weight: 500; color: var(--text-3); white-space: nowrap; }
.approx-tag::before { content: "·"; margin: 0 5px 0 -2px; }
.join-btn > .lucide { display: none; }
.search-pill {
  flex: 0 1 440px; margin: 0 auto; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 7px 0 12px;
  border-radius: var(--r-m); color: var(--text-3); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, color .2s;
}
.search-pill:hover { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.search-pill .lucide { width: 17px; height: 17px; }
.search-ph { flex: 1; text-align: left; font-size: var(--fs-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pill kbd { background: var(--card-3); }
.top-end { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.top-end .btn { margin-left: 4px; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
.bell-wrap { position: relative; }
/* "new" is one thing everywhere: a small dot in the brand color (bell, chips, tabs, list rows, markers, updates) */
.badge-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-new); box-shadow: 0 0 0 2px var(--card); }
.bell-btn.ring .lucide { animation: ring .9s var(--ease); transform-origin: 50% 10%; }
@keyframes ring { 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

/* menus fit the screen and scroll inside; a soft shadow at an edge says there's more that way */
.menu {
  --sh: color-mix(in srgb, var(--text) 22%, transparent);
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 40; width: 260px; padding: 6px;
  max-height: calc(100dvh - var(--hud-top) - var(--gap) * 2 - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--r-m); box-shadow: var(--shadow-lg);
  background:
    linear-gradient(var(--card) 40%, transparent) top / 100% 26px no-repeat local,
    linear-gradient(transparent, var(--card) 60%) bottom / 100% 26px no-repeat local,
    radial-gradient(farthest-side at 50% 0, var(--sh), transparent) top / 100% 10px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, var(--sh), transparent) bottom / 100% 10px no-repeat scroll,
    var(--card);
  transform-origin: top left; animation: menuIn .18s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-s); font-size: var(--fs-m); font-weight: 520; color: var(--text-2); text-align: left; }
.menu button:hover { color: var(--text); background: var(--hover); }
.menu button .lucide { width: 17px; height: 17px; }
.menu .m-dot { width: 22px; height: 22px; border-radius: var(--r-s); flex-shrink: 0; display: grid; place-items: center; font: 700 var(--fs-xs)/1 var(--font); color: #fff; background: linear-gradient(140deg, hsl(var(--h) 55% 52%), hsl(calc(var(--h) + 40) 58% 40%)); }
.menu .m-dot svg { width: 22px; height: 22px; }
.menu button.is-current { color: var(--text); background: var(--active); }
.menu-sep { height: 1px; margin: 5px 6px; background: var(--line-2); }
.menu .label { padding: 8px 10px 6px; }
.menu-note { display: flex; gap: 8px; padding: 9px 10px 10px; margin-bottom: 4px; font-size: var(--fs-s); line-height: 1.35; color: var(--text-3); border-bottom: 1px solid var(--line); }
.menu-note .lucide { width: 15px; height: 15px; margin-top: 1px; }
.mobile-only { display: none !important; }
.menu.notes { left: auto; right: -8px; width: 340px; transform-origin: top right; }
.notes-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 6px; }
.notes-head button { width: auto; height: 26px; padding: 0 8px; font-size: var(--fs-s); color: var(--text-3); }
.note { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px !important; height: auto !important; border-radius: var(--r-m); text-align: left; }
.note .n-ico { width: 32px; height: 32px; border-radius: var(--r-m); display: grid; place-items: center; flex-shrink: 0; color: var(--c); background: color-mix(in srgb, var(--fill, var(--c)) var(--tint), transparent); }
.note .n-ico .lucide { width: 16px; height: 16px; }
.note .n-txt { flex: 1; min-width: 0; display: grid; gap: 2px; line-height: 1.3; }
/* two lines, so a title or price is never cut mid-word */
.note .n-txt b { font-size: var(--fs-m); font-weight: 540; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.note .n-txt small { font-size: var(--fs-s); color: var(--text-3); }
.note .dot { display: block; }
.note.is-read .dot { visibility: hidden; }
.notes-empty { display: flex; align-items: flex-start; gap: 12px; padding: 6px 10px 12px; }
.notes-empty > .lucide { width: 32px; height: 32px; padding: 7px; flex-shrink: 0; border-radius: var(--r-m); color: var(--text-3); background: var(--card-2); }
.notes-empty p { display: grid; gap: 2px; font-size: var(--fs-s); line-height: 1.4; color: var(--text-3); }
.notes-empty b { font-size: var(--fs-m); font-weight: 600; color: var(--text); }
/* light / dark and Settings, side by side at the top of the place menu */
.menu-quick { gap: 4px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu .menu-quick button { flex: 1 1 0; min-width: 0; justify-content: center; gap: 8px; padding: 0 8px; color: var(--text); background: var(--card-2); }
.menu .menu-quick button:hover { background: var(--card-3); }
.menu-quick .i-moon, .menu-quick .t-light { display: none; }
:root[data-theme="light"] .menu-quick .i-sun, :root[data-theme="light"] .menu-quick .t-dark { display: none; }
:root[data-theme="light"] .menu-quick .i-moon, :root[data-theme="light"] .menu-quick .t-light { display: inline; }

/* ---------- Controls ---------- */
.btn {
  --accent: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--r-m); font-weight: 560; font-size: var(--fs-m); white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { cursor: default; opacity: .55; }
.btn .lucide { width: 16px; height: 16px; }
.btn-primary { color: #fff; background: var(--brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, white); }
.btn-soft { color: var(--text); background: var(--card-2); }
.btn-soft:hover { background: var(--card-3); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: var(--r-s); font-size: var(--fs-m); gap: 5px; }
.btn-sm .lucide { width: 15px; height: 15px; }
.btn-block { width: 100%; height: 44px; border-radius: var(--r-m); font-size: var(--fs-m); }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: var(--r-m); display: grid; place-items: center;
  color: var(--text-2); transition: background .15s, color .15s, transform .15s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--hover); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .lucide { width: 20px; height: 20px; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: var(--r-s); }
.icon-btn.sm .lucide { width: 16px; height: 16px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px;
  font-size: var(--fs-m); font-weight: 520; color: var(--text-2); background: var(--card-2);
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.chip:hover { color: var(--text); background: var(--card-3); }
.chip:active { transform: scale(.96); }
.chip.is-on { color: var(--text); background: color-mix(in srgb, var(--brand) var(--tint), var(--card-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent); }
.chip .lucide { width: 15px; height: 15px; }

.seg { position: relative; display: inline-flex; padding: 3px; border-radius: var(--r-m); background: var(--card-2); }
.seg button { position: relative; height: 26px; padding: 0 11px; border-radius: var(--r-s); font-size: var(--fs-s); font-weight: 560; color: var(--text-3); transition: color .2s, background-color .2s; }
.seg button.is-on { color: var(--text); background: var(--card-3); }
:root[data-theme="light"] .seg button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(20, 20, 30, .14); }
.seg-sm { padding: 2px; border-radius: var(--r-s); }
.seg-sm button { height: 24px; padding: 0 8px; font-size: var(--fs-s); border-radius: var(--r-s); }

.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-s); color: var(--text-3); }
.meta .lucide { width: 14px; height: 14px; }
.label { font: 650 var(--fs-xs)/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }

.ava {
  --s: 40px; --h: 250;
  position: relative; flex-shrink: 0; width: var(--s); height: var(--s); border-radius: 50%;
  display: grid; place-items: center; font: 650 calc(var(--s) * .36)/1 var(--font); color: var(--fg, #fff);
  background: linear-gradient(140deg, hsl(var(--h) 60% 58%), hsl(calc(var(--h) + 45) 60% 44%));
}
.ava.sm { --s: 32px; }
.ava.xs { --s: 28px; }
.ava .online { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-brand); box-shadow: 0 0 0 3px var(--panel); }

.empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; color: var(--text-3); text-align: center; }
.empty .lucide { width: 26px; height: 26px; opacity: .6; }
.empty p { max-width: 260px; font-size: var(--fs-m); line-height: 1.45; text-wrap: balance; }

.dot { display: none; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--c-new); }
.has-dot .dot { display: block; animation: dotIn .5s var(--spring); }
@keyframes dotIn { from { transform: scale(0); } 60% { transform: scale(1.35); } }
.row-new { width: 8px; height: 8px; margin: 4px 2px 0 0; border-radius: 50%; flex-shrink: 0; background: var(--c-new); }
.pop-anim { animation: popIn .45s var(--spring); }
@keyframes popIn { 40% { transform: scale(1.12); } }
.sk { border-radius: var(--r-m); background: linear-gradient(90deg, var(--card-2) 0%, var(--card-3) 40%, var(--card-2) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.price-tag { font-weight: 650; font-variant-numeric: tabular-nums; }
.price-tag.is-free { color: var(--c-market); }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); font-size: var(--fs-s); line-height: 1.4; color: var(--text-2); background: var(--card-2); }
.notice > .lucide { width: 17px; height: 17px; color: var(--brand-2); }
.notice > span { flex: 1; min-width: 0; }
.notice .btn { flex-shrink: 0; }
.sample-note { display: flex; align-items: center; gap: 7px; font-size: var(--fs-s); color: var(--text-3); }
.sample-note .lucide { width: 14px; height: 14px; }
.perk { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: var(--fs-s); font-weight: 600; color: var(--c); } /* the item's own color: a deal's perk is green, an event's pink */
.perk .lucide { width: 15px; height: 15px; }
.verified { display: inline-flex; }
.verified .lucide { width: 15px; height: 15px; color: var(--c-weather); }

/* ---------- The map: a marker for everything happening ----------
   Shape says who it's from, color says what it is, and every shape keeps an icon (color is never the only clue).
   Each marker sets --mw/--mh (head size), --hx/--hy (head center inside its box) and --ax/--ay (the point on the map). */
.leaflet-container { font-family: var(--font); background: var(--card-2); }
.leaflet-container:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -3px; }
/* a calm base map: its own labels, road numbers and parks step back, so the markers read first */
.tiles-base { filter: saturate(.5) contrast(.88); }
:root[data-theme="dark"] .tiles-base { filter: brightness(1.02) saturate(.45) contrast(.85); }
.tiles-labels { opacity: .55; }
.tiles-base .leaflet-tile { mix-blend-mode: plus-lighter; } /* no hairline seams at half-step zooms */
/* Esri's tiles show light seams that way: they get a hair of overlap instead */
.tiles-base.tiles-esri img.leaflet-tile { mix-blend-mode: normal; width: 256.5px !important; height: 256.5px !important; }
.leaflet-control-attribution { background: transparent !important; color: var(--text-3) !important; font-size: var(--fs-xs) !important; padding: 0 8px 2px !important; }
.leaflet-control-attribution a { color: var(--text-3) !important; }
.leaflet-bottom.leaflet-right { right: var(--hud-r); }
.map-off { position: absolute; inset: 0; place-content: center; }
/* neither tile provider answers: a plain grid, so the markers still make sense */
#map.is-map-down { background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 56px 56px; }
#map.is-map-down .leaflet-tile-pane { opacity: 0; }
/* a long trip: markers hide while the map flies, and drop in when it lands */
.leaflet-marker-pane, .leaflet-overlay-pane { transition: opacity .25s; }
.is-travelling .leaflet-marker-pane, .is-travelling .leaflet-overlay-pane, .is-travelling .leaflet-popup-pane { opacity: 0; transition-duration: .1s; }

.mk-wrap { background: none; border: 0; }
/* only the drawn parts take clicks, so a hidden marker never steals a tap meant for its neighbor */
.leaflet-marker-icon.mk-wrap { pointer-events: none !important; }
.mk-hit, .mk-dot, .mk-label, .mk.is-cluster .mk-clu, .mk.is-cluster .mk-cap { pointer-events: auto; cursor: pointer; }
.mk.is-grouped *, .mk.is-speck *, .mk.is-pending * { pointer-events: none !important; }
.mk.is-pending { visibility: hidden; }
.mk { --c: var(--brand); --mw: 30px; --mh: 30px; --hx: 15px; --hy: 15px; --ax: 15px; --ay: 15px; position: relative; width: 100%; height: 100%; transition: opacity .2s, visibility 0s; }
/* every marker takes taps in a 44px circle around its head, however small it's drawn */
.mk-hit { position: absolute; z-index: 0; left: calc(var(--hx) - max(22px, var(--mw) / 2)); top: calc(var(--hy) - 22px); width: max(44px, var(--mw)); height: 44px; border-radius: 999px; }
.mk-dot {
  position: absolute; z-index: 2; left: calc(var(--hx) - var(--mw) / 2); top: calc(var(--hy) - var(--mh) / 2); width: var(--mw); height: var(--mh);
  display: grid; place-items: center; color: var(--on-c); background: var(--fill, var(--c)); border-radius: var(--r-s);
  box-shadow: 0 0 0 2px var(--mk-ring), var(--mk-shadow);
  transform-origin: calc(var(--ax) - var(--hx) + var(--mw) / 2) calc(var(--ay) - var(--hy) + var(--mh) / 2);
  transition: transform .25s var(--spring), box-shadow .25s, border-radius .2s;
}
.mk-dot .lucide { width: 16px; height: 16px; stroke-width: 2.2; }
/* news: a square tile · safety: a bigger red alert tile */
.shape-alert .mk-dot { border-radius: var(--r-s); }
.shape-alert .mk-dot .lucide { width: 17px; height: 17px; }
/* events: a calendar tile with the day or time on top */
.shape-cal .mk-dot { align-content: end; padding-bottom: 5px; color: var(--c); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 2px var(--mk-ring), var(--mk-shadow); overflow: hidden; }
.shape-cal .mk-dot .lucide { width: 15px; height: 15px; }
.mk-day { position: absolute; left: 0; right: 0; top: 0; height: 14px; display: grid; place-items: center; font: 700 var(--fs-xs)/14px var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--on-c); background: var(--fill, var(--c)); white-space: nowrap; }
.mk.is-live .mk-day { letter-spacing: .04em; }
.mk.is-live .mk-dot { animation: halo 1.8s var(--ease) infinite; }
@keyframes halo { 0% { box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 2px var(--mk-ring), 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent), var(--mk-shadow); } 100% { box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 2px var(--mk-ring), 0 0 0 14px color-mix(in srgb, var(--c) 0%, transparent), var(--mk-shadow); } }
/* stores: a teardrop pin you could walk into, with a % badge */
.shape-pin .mk-dot { background: none; box-shadow: none; border-radius: 0; }
.mk-pinhead { position: absolute; inset: 0; z-index: -1; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--fill, var(--c)); box-shadow: 0 0 0 2px var(--mk-ring), var(--mk-shadow); }
.shape-pin .mk-dot .lucide { width: 15px; height: 15px; }
.mk-badge { position: absolute; top: -5px; right: -6px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: var(--card); box-shadow: 0 0 0 1.5px var(--mk-ring); }
.mk-badge .lucide { width: 10px; height: 10px; stroke-width: 2.6; }
.mk.is-ending .mk-pinhead { outline: 2px dashed var(--c); outline-offset: 3px; }
/* things for sale: a price tag with a little tail, and the item's own icon (a car, a sofa) */
.shape-tag .mk-dot { gap: 4px; grid-auto-flow: column; padding: 0 9px 0 8px; border-radius: var(--r-m); font: 700 var(--fs-s)/24px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 2px var(--mk-ring), var(--mk-shadow); }
.shape-tag .mk-dot::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg); background: inherit; box-shadow: inset -1.5px -1.5px 0 var(--c); z-index: -1; }
.shape-tag .mk-dot > .lucide { width: 13px; height: 13px; color: var(--c); }
.shape-tag.is-free .mk-dot { color: var(--on-c); background: var(--fill, var(--c)); box-shadow: 0 0 0 2px var(--mk-ring), var(--mk-shadow); }
.shape-tag.is-free .mk-dot > .lucide { color: inherit; }
.shape-tag.is-free .mk-dot::after { box-shadow: none; }
/* a neighbor who needs a ride: a big circle with a car */
.shape-circle .mk-dot { border-radius: 50%; }
.shape-circle .mk-dot .lucide { width: 17px; height: 17px; }
.mk.is-urgent .mk-dot { animation: haloRound 1.6s var(--ease) 2; }
@keyframes haloRound { from { box-shadow: 0 0 0 2px var(--mk-ring), 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent), var(--mk-shadow); } to { box-shadow: 0 0 0 2px var(--mk-ring), 0 0 0 16px color-mix(in srgb, var(--c) 0%, transparent), var(--mk-shadow); } }
.mk.is-mine .mk-dot { box-shadow: 0 0 0 2px var(--mk-ring), 0 0 0 5px var(--brand-2), var(--mk-shadow); }
/* people's posts: small dots, speech bubbles up close */
.shape-dot .mk-dot { border-radius: 50%; }
.shape-dot .mk-dot .lucide { opacity: 0; width: 13px; height: 13px; }
.shape-dot.is-bubble .mk-dot { border-radius: 50% 50% 50% 4px; }
.shape-dot.is-bubble .mk-dot .lucide { opacity: 1; }
.mk.shape-dot:not(.is-bubble):not(.is-popular) .mk-dot { transform: scale(.5); }
.mk.shape-dot.is-popular:not(.is-bubble) .mk-dot { transform: scale(.67); }
.mk.is-speck { pointer-events: none; opacity: .6; }
.mk.is-speck .mk-dot { transform: scale(.25) !important; box-shadow: none; }
.no-posts .mk--posts { display: none; }
/* far away: small solid badges on their spot, each still with an icon for its kind */
.mk.is-mini { --mw: 20px !important; --mh: 20px !important; --hx: var(--ax) !important; --hy: var(--ay) !important; }
.mk.is-mini.shape-tag { --mw: 24px !important; --mh: 18px !important; }
.mk-mini { display: none; }
.mk.is-mini .mk-dot { align-content: center; padding: 0; border-radius: var(--r-s); color: var(--on-c); background: var(--fill, var(--c)); box-shadow: 0 0 0 2px var(--mk-ring), var(--mk-shadow); transform: none; }
.mk.is-mini .mk-dot > :not(.mk-pinhead):not(.mk-mini) { display: none; }
.mk.is-mini .mk-mini { display: grid; place-items: center; }
.mk.is-mini .mk-mini .lucide { width: 12px; height: 12px; stroke-width: 2.5; color: inherit; }
.mk.is-mini.shape-tag .mk-dot { border-radius: var(--r-s); }
.mk.is-mini.shape-tag .mk-dot::after { display: none; }
.mk.is-mini.shape-pin .mk-dot { background: none; box-shadow: none; }
.mk.is-mini.shape-pin .mk-mini .lucide { width: 11px; height: 11px; }
.mk.is-mini.is-mine .mk-dot { box-shadow: 0 0 0 2px var(--mk-ring), 0 0 0 5px var(--brand-2), var(--mk-shadow); }

/* titles sit behind the head and stretch to one side; short of room, they shrink (with an ellipsis) or sit on
   their own above or below the head. js/map-layout.js places them; --lw is a shrunk width. */
.mk-label {
  position: absolute; z-index: 1; top: calc(var(--hy) - 13px); left: calc(var(--hx) - var(--mw) / 2); height: 26px; max-width: var(--lw, var(--title-max, 260px));
  display: flex; align-items: center; padding: 0 11px 0 calc(var(--mw) + 7px); border-radius: 999px;
  font: 600 var(--fs-s)/1 var(--font); white-space: nowrap; color: var(--text); background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px -10px rgba(0, 0, 0, .6);
  visibility: hidden; opacity: 0; transform: scale(.92); transform-origin: calc(var(--mw) / 2) 50%;
  transition: opacity .18s, transform .22s var(--ease), visibility .18s;
}
:root[data-theme="light"] .mk-label { box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-text { overflow: hidden; text-overflow: ellipsis; }
.mk:is(.lbl-right, .lbl-left, .lbl-above, .lbl-below, .is-hot) .mk-label { visibility: visible; opacity: 1; transform: none; }
.mk.lbl-left .mk-label, .mk.is-hot.hot-left:not(.lbl-right, .lbl-above, .lbl-below) .mk-label { left: auto; right: calc(100% - var(--hx) - var(--mw) / 2); padding: 0 calc(var(--mw) + 7px) 0 11px; transform-origin: calc(100% - var(--mw) / 2) 50%; }
.mk:is(.lbl-above, .lbl-below) .mk-label { left: var(--hx); translate: -50% 0; padding: 0 11px; transform-origin: 50% 50%; }
.mk.lbl-above .mk-label { top: calc(var(--hy) - var(--mh) / 2 - 30px); }
.mk.lbl-below .mk-label { top: calc(max(var(--hy) + var(--mh) / 2, var(--ay)) + 4px); }

/* new: a small dot on the head's corner, until you open it */
.mk-new { position: absolute; z-index: 4; width: 10px; height: 10px; left: calc(var(--hx) + var(--mw) / 2 - 7px); top: calc(var(--hy) - var(--mh) / 2 - 4px); border-radius: 50%; background: var(--c-new); box-shadow: 0 0 0 2px var(--mk-ring); display: none; }
.mk.is-fresh .mk-new { display: block; animation: dotIn .5s var(--spring); }

/* a group: things whose heads overlap share one neutral bubble with the total, ringed with what's inside */
.mk-clu, .mk-cap { display: none; }
.mk.is-cluster .mk-dot, .mk.is-cluster .mk-label, .mk.is-cluster .mk-new { display: none; }
.mk.is-cluster .mk-clu {
  position: absolute; z-index: 3; left: var(--hx); top: var(--hy); width: 36px; height: 36px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; border: 4px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--mix, var(--text-3)) border-box;
  box-shadow: 0 0 0 1.5px var(--mk-ring), var(--mk-shadow);
}
.mk.is-cluster.is-big-clu .mk-clu { width: 42px; height: 42px; }
.mk.is-cluster .mk-clu, .mk.is-cluster .mk-hit { translate: var(--nx, 0px) var(--ny, 0px); } /* stepped aside from the open head (map.js) */
.mk-clu b { font: 700 var(--fs-s)/1 var(--font); color: var(--text); font-variant-numeric: tabular-nums; }
.mk.is-cluster .mk-cap:not(:empty) {
  display: block; position: absolute; z-index: 3; left: var(--hx); top: calc(var(--hy) + 24px); transform: translateX(-50%);
  padding: 3px 8px; border-radius: var(--r-s); font: 650 var(--fs-s)/1.2 var(--font); white-space: nowrap; color: var(--text); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: inset 0 0 0 1px var(--line-2);
}
.mk.is-cluster.cap-above .mk-cap:not(:empty) { top: calc(var(--hy) - 44px); } /* when a map button is in the way below (map.js) */

/* hover (a list row or the marker): outlined, raised and titled; everything else dims a little and stays put */
.mk.is-hot .mk-dot { transform: scale(1.12); outline: 2.5px solid var(--text); outline-offset: 2px; }
.mk.is-hot.shape-pin .mk-dot { outline: 0; }
.mk.is-hot.shape-pin .mk-pinhead, .mk.is-hot .mk-clu { outline: 2.5px solid var(--text); outline-offset: 2px; }
.has-hot .mk:not(.is-hot):not(.is-active):not(.is-grouped):not(.is-speck) { opacity: .6; }
/* selected: bigger and ringed, its title kept clear of the ring */
.mk.is-active .mk-dot { transform: scale(1.2); }
.mk.is-active:not(.shape-pin):not(.shape-cal) .mk-dot { box-shadow: 0 0 0 2px var(--mk-ring), 0 0 0 5px var(--text), 0 0 0 11px color-mix(in srgb, var(--c) 35%, transparent), var(--mk-shadow); }
.mk.is-active.shape-pin .mk-pinhead, .mk.is-active.shape-cal .mk-dot { outline: 3px solid var(--text); outline-offset: 2px; }
.mk.is-active .mk-label { font-weight: 700; padding-left: calc(var(--mw) * 1.1 + 26px); box-shadow: inset 0 0 0 1.5px var(--c), 0 10px 26px -10px rgba(0, 0, 0, .75); }
.mk.is-active.lbl-left .mk-label { padding: 0 calc(var(--mw) * 1.1 + 26px) 0 11px; } /* clear of the bigger head and its glow */
.mk.is-active:is(.lbl-above, .lbl-below) .mk-label { padding: 0 11px; }
.mk.is-active.lbl-above .mk-label { top: calc(var(--hy) - var(--mh) * .6 - 36px); }
.mk.is-active.lbl-below .mk-label { top: calc(max(var(--hy) + var(--mh) / 2, var(--ay)) + var(--mh) * .1 + 10px); }
.has-selection .mk:not(.is-active):not(.is-hot):not(.is-grouped):not(.is-speck) { opacity: .55; }
.mk.is-grouped { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility 0s .2s; }
.mk.is-drop .mk-dot { animation: dropIn .6s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
.mk.is-drop .mk-clu { animation: cluIn .45s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes dropIn { from { transform: translateY(-28px) scale(.5); opacity: 0; } }
@keyframes cluIn { from { opacity: 0; scale: .4; } }
.is-zooming .mk-label { transition: none; }

/* you: a dot with a ripple; while your location is approximate, a quiet dot in a soft circle (your area) */
.you { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 25%, transparent), 0 6px 16px rgba(0, 0, 0, .45); }
.you::before, .you::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--brand); animation: ripple 2.8s var(--ease) infinite; }
.you::after { animation-delay: 1.4s; }
.you.is-approx { width: 14px; height: 14px; margin: 3px; border-width: 2.5px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent), 0 3px 8px rgba(0, 0, 0, .35); }
.you.is-approx::before, .you.is-approx::after { display: none; }
.you-area { fill: var(--brand); fill-opacity: .04; stroke: var(--brand-2); stroke-opacity: .32; stroke-width: 1.5; stroke-dasharray: 4 7; }
@keyframes ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(4); opacity: 0; } }
.ghost-pin { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 3px solid var(--card); animation: dropIn .4s var(--spring); }
.leaflet-popup.mb-pop .leaflet-popup-content-wrapper, .leaflet-popup.mb-pop .leaflet-popup-tip { background: var(--card); color: var(--text); }
.leaflet-popup.mb-pop .leaflet-popup-content-wrapper { border-radius: var(--r-m); box-shadow: var(--shadow-lg); }
.leaflet-popup.mb-pop .leaflet-popup-tip { box-shadow: none; }
.leaflet-popup.mb-pop .leaflet-popup-content { margin: 12px 14px; font-size: var(--fs-m); line-height: 1.4; min-width: 170px; }
.pop { display: grid; gap: 3px; }
.pop-k { display: flex; color: var(--c, var(--text-3)); }
.pop-k .lucide { width: 16px; height: 16px; }
.pop strong { font-size: var(--fs-m); font-weight: 620; }
.pop p { color: var(--text-3); font-size: var(--fs-s); }
.pop .btn { margin-top: 8px; }
/* a group's list, and what's near a long-pressed spot */
.pop-list { gap: 6px; }
.pop-rows { display: grid; margin: 0 -8px; }
.pop-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 8px; border-radius: var(--r-m); text-align: left; color: var(--text); }
.pop-row:hover { background: var(--hover); }
.pop-ico { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-s); color: var(--on-c); background: var(--fill, var(--c)); }
.pop-ico[data-shape="circle"], .pop-ico[data-shape="dot"] { border-radius: 50%; }
.pop-ico[data-shape="tag"] { border-radius: var(--r-s); }
.pop-ico[data-shape="cal"] { color: var(--c); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--c); }
.pop-ico .lucide { width: 15px; height: 15px; }
.pop-txt { display: grid; min-width: 0; line-height: 1.3; }
.pop-txt b { overflow: hidden; font-size: var(--fs-m); font-weight: 620; white-space: nowrap; text-overflow: ellipsis; }
.pop-txt small { overflow: hidden; font-size: var(--fs-s); color: var(--text-3); white-space: nowrap; text-overflow: ellipsis; }
.pop-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.pop-acts > span { font-size: var(--fs-s); color: var(--text-3); }
.pop-acts .btn { margin-top: 0; }


/* map buttons, "explore this area", notes over the map, and the map key */
.map-ctrls { position: absolute; z-index: 15; right: calc(var(--hud-r) + var(--gap)); bottom: calc(var(--gap) + 4px); display: flex; flex-direction: column; gap: 8px; transition: opacity .2s; }
.ctl-zoom { display: grid; border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-panel); background: var(--panel); }
.icon-btn.ctl { width: 42px; height: 42px; border-radius: var(--r-m); color: var(--text); background: var(--panel); box-shadow: var(--shadow-panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.icon-btn.ctl[aria-expanded="true"] { color: var(--brand-2); }
.ctl-zoom .icon-btn.ctl { border-radius: 0; box-shadow: none; background: none; }
.ctl-zoom .icon-btn.ctl + .icon-btn.ctl { box-shadow: inset 0 1px 0 var(--line-2); }
.explore-here {
  position: absolute; z-index: 16; top: calc(var(--hud-top) + 2px);
  left: calc(var(--hud-l) + (100% - var(--hud-l) - var(--hud-r)) / 2); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 13px; border-radius: 999px;
  font-size: var(--fs-m); font-weight: 620; color: #fff; background: var(--brand); animation: pillIn .35s var(--spring);
}
.explore-here .lucide { width: 16px; height: 16px; }
.explore-here.is-busy .lucide { animation: spin 1s linear infinite; }
@keyframes pillIn { from { opacity: 0; translate: 0 -8px; scale: .94; } }
/* "nothing right here" and "map unavailable": small notes at the top of the open map (placed by map.js) */
.map-float {
  position: absolute; z-index: 16; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: calc(100% - 24px); min-height: 44px; padding: 5px 5px 5px 12px; border-radius: var(--r-xl);
  font-size: var(--fs-s); font-weight: 560; color: var(--text); animation: pillIn .35s var(--spring);
}
.map-float > .lucide { flex-shrink: 0; width: 16px; height: 16px; color: var(--text-3); }
.map-float > span { display: grid; min-width: 0; line-height: 1.3; }
.map-float small { font-size: var(--fs-s); font-weight: 400; color: var(--text-3); }
.map-float .btn { flex-shrink: 0; }
.map-down { padding: 8px 8px 8px 14px; border-radius: var(--r-l); }
.map-key { position: absolute; z-index: 36; right: calc(var(--hud-r) + var(--gap) + 54px); bottom: calc(var(--gap) + 4px); width: 372px; max-height: calc(100% - var(--hud-top) - var(--gap)); overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 8px; animation: menuIn .2s var(--ease); transform-origin: bottom right; }
.key-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.key-head h2 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-l); font-weight: 650; }
.key-head h2 .lucide { width: 16px; height: 16px; color: var(--brand-2); }
.key-head h2:focus { outline: 0; }
.key-intro { margin: 0 2px 6px; font-size: var(--fs-s); line-height: 1.4; color: var(--text-2); }
.key-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.key-grid li { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.key-mk { position: relative; flex-shrink: 0; width: 54px; height: 40px; pointer-events: none; }
.key-mk .mk { display: block; }
.key-mk .shape-tag { scale: .76; }
.key-txt { display: grid; min-width: 0; line-height: 1.25; }
.key-txt b { font-size: var(--fs-s); font-weight: 650; color: var(--text); }
.key-txt small { font-size: var(--fs-xs); color: var(--text-3); }
.you-key { position: absolute; inset: 0; display: grid; place-items: center; }
.you-key::before { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 9%, transparent); border: 1.5px dashed color-mix(in srgb, var(--brand-2) 60%, transparent); }
.you-key .you { margin: 0; }
.key-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin-top: 4px; padding: 6px 2px; border-top: 1px solid var(--line); font-size: var(--fs-m); font-weight: 560; text-align: left; }
.key-foot { padding: 2px 2px 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--text-3); }
.key-foot a { color: inherit; }

/* ---------- Left HUD: the place frame with weather, and the chat window ---------- */
.hud-left {
  position: absolute; z-index: 20; top: var(--hud-top); left: var(--gap); bottom: var(--gap); width: calc(var(--hud-l) - var(--gap));
  display: flex; flex-direction: column; gap: var(--gap); pointer-events: none;
}
.hud-left > * { pointer-events: auto; }

.hud-wx { position: relative; overflow: hidden; padding: 14px 14px 12px; flex-shrink: 0; }
.hud-wx::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .9; background: radial-gradient(120% 80% at 100% 0%, var(--sky1, transparent), transparent 60%); }
.hud-wx[data-sky^="clear-day"] { --sky1: rgba(255, 186, 80, .26); }
.hud-wx[data-sky^="clear-night"] { --sky1: rgba(123, 108, 255, .26); }
.hud-wx[data-sky^="cloudy"] { --sky1: rgba(150, 165, 195, .2); }
.hud-wx[data-sky^="rain"] { --sky1: rgba(80, 140, 255, .24); }
.hud-wx[data-sky^="snow"] { --sky1: rgba(190, 215, 255, .26); }
.hud-wx[data-sky^="storm"] { --sky1: rgba(150, 100, 255, .28); }
.wxh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wxh-name { min-width: 0; }
.wxh-greet { font-size: var(--fs-s); color: var(--text-3); }
.wxh-place { font: 650 var(--fs-2xl)/1.15 var(--font); letter-spacing: -.03em; padding-right: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: color-mix(in oklab, var(--text) 82%, var(--brand-2)); }
.wxh-time { flex-shrink: 0; margin-top: 2px; padding: 5px 7px; border-radius: var(--r-s); font: 550 var(--fs-s)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); background: var(--card-2); }
.wxh-time:empty { display: none; }
.wxh-main { display: flex; align-items: center; gap: 12px; width: calc(100% + 12px); margin: 8px -6px 0; padding: 6px; border-radius: var(--r-m); text-align: left; transition: background .15s; }
.wxh-main:hover { background: var(--hover); }
.wxh-icon { width: 56px; height: 56px; flex-shrink: 0; }
.wxh-icon svg { width: 100%; height: 100%; overflow: visible; }
.wxh-now { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.wxh-temp { font: 300 var(--fs-num)/1 var(--font); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.wxh-cond { font-size: var(--fs-m); font-weight: 600; margin-top: 3px; }
.wxh-now small { font-size: var(--fs-s); color: var(--text-3); font-variant-numeric: tabular-nums; }
.wxh-go { width: 16px; height: 16px; color: var(--text-3); }
.wxh-load { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.wx-failed { padding: 18px 8px 6px; }
.wx-bars { display: grid; gap: 8px; margin-top: 10px; }
.wx-bars li { display: grid; grid-template-columns: 16px 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.wx-bars .lucide { width: 15px; height: 15px; color: var(--bar); }
.bar-l { font-size: var(--fs-s); font-weight: 560; color: var(--text-2); }
.bar { height: 7px; border-radius: var(--r-xs); background: var(--card-3); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.bar i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--bar) 55%, transparent), var(--bar)); animation: fill 1.1s var(--ease) backwards .3s; }
@keyframes fill { from { width: 0; } }
.wx-bars b { min-width: 64px; text-align: right; font: 600 var(--fs-xs)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); }
.wxh-rain { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font: 600 var(--fs-s)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--c-weather); background: color-mix(in srgb, var(--c-weather) 14%, transparent); flex-shrink: 0; }
.wxh-rain .lucide { width: 13px; height: 13px; }
.wx-tip { display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 9px 11px; border-radius: var(--r-m); font-size: var(--fs-s); line-height: 1.35; background: color-mix(in srgb, var(--c-weather) 11%, transparent); }
.wx-tip .lucide { width: 15px; height: 15px; color: var(--c-weather); }

.social { container: chat / inline-size; margin-top: auto; display: flex; flex-direction: column; min-height: 0; max-height: 50%; transition: max-height .3s var(--ease); }
.social.is-open { height: 400px; }
.social-head { display: flex; align-items: center; gap: 6px; padding: 6px; flex-shrink: 0; }
.social.is-open .social-head { box-shadow: 0 1px 0 var(--line); }
/* short labels that always fit; the arrow keeps its own space at the end */
.social-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; overflow: hidden; }
.social-tabs [role="tab"] { position: relative; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r-s); font-size: var(--fs-s); font-weight: 600; color: var(--text-3); white-space: nowrap; transition: background .15s, color .15s; }
.social-tabs [role="tab"]:hover { color: var(--text-2); background: var(--hover); }
.social-tabs [role="tab"] .lucide { width: 15px; height: 15px; }
.social.is-open [role="tab"].is-on { color: var(--text); background: var(--active); }
@container chat (max-width: 290px) { .social-tabs [role="tab"]:not(.is-on) .lucide { display: none; } }
.social-toggle { flex-shrink: 0; margin-left: auto; color: var(--text-3); }
.social-peek { display: none; padding: 0 12px 11px; font-size: var(--fs-s); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-peek b { color: var(--text-2); font-weight: 600; }
.social:not(.is-open) .social-peek { display: block; }
/* the newest messages show first; older ones fade out under the tabs instead of looking cut off */
.social-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 8px; -webkit-mask-image: linear-gradient(transparent, #000 14px); mask-image: linear-gradient(transparent, #000 14px); }
.social-foot { flex-shrink: 0; padding: 0 10px 10px; }
.social-foot:empty { display: none; }
.social:not(.is-open) .social-body, .social:not(.is-open) .social-foot { display: none; }
.social .notice { margin-bottom: 10px; }

.chat { display: grid; gap: 2px; }
.msg { display: flex; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: var(--r-m); transition: background .15s; }
.msg:hover { background: var(--hover); }
.msg.is-new { animation: msgIn .45s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.msg-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.msg-head b { font-size: var(--fs-m); font-weight: 640; }
.msg-head time { font-size: var(--fs-xs); color: var(--text-3); }
.msg-body > p { font-size: var(--fs-m); line-height: 1.45; color: color-mix(in srgb, var(--text) 92%, transparent); }
.bot-ava { color: #fff; background: linear-gradient(140deg, #8F7CFF, #6A5CFF 55%, #C06BFF); }
.bot-ava .lucide { width: 17px; height: 17px; }
.reacts { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: var(--r-s); font: 600 var(--fs-s)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); background: var(--card-2); transition: background .15s, color .15s, box-shadow .15s; }
.react .lucide { width: 14px; height: 14px; }
.react:hover { background: var(--card-3); color: var(--text); }
.react.is-on { color: var(--c-square); background: color-mix(in srgb, var(--c-square) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-square) 50%, transparent); }
.react.is-on .lucide { fill: currentColor; }
.embeds { display: grid; gap: 6px; margin-top: 6px; }
.embed-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-m); text-align: left; background: var(--card-2); box-shadow: inset 3px 0 0 var(--c); transition: background .15s; animation: msgIn .45s var(--ease) backwards; animation-delay: var(--d); }
.embed-row:hover { background: var(--card-3); }
.embed-row .e-ico { display: grid; color: var(--c); }
.embed-row .e-ico .lucide { width: 16px; height: 16px; }
.embed-row .go { margin-left: auto; width: 14px; height: 14px; color: var(--text-3); }
.e-txt { display: grid; min-width: 0; line-height: 1.3; }
.e-txt b { font-size: var(--fs-s); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-txt small { font-size: var(--fs-s); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 14px 0 8px; }
.ask-empty .ava { --s: 48px; margin-bottom: 4px; }
.ask-empty .ava .lucide { width: 22px; height: 22px; }
.ask-empty h3 { font-size: var(--fs-l); font-weight: 650; letter-spacing: -.02em; }
.ask-empty .chips { justify-content: center; gap: 6px; margin-top: 6px; }
.ask-empty .chip { height: 30px; padding: 0 11px; font-size: var(--fs-s); }
.ask-scope { max-width: 300px; margin-top: 6px; font-size: var(--fs-s); line-height: 1.45; color: var(--text-3); text-wrap: balance; }
.typing { display: flex; align-items: center; gap: 8px; height: 24px; padding-left: 4px; font-size: var(--fs-s); color: var(--text-3); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: dots 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-3px); opacity: .4; } }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--brand-2); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mem-list { display: grid; gap: 2px; container-type: inline-size; }
/* name and actions on top; area, then a two-line bio across the full width */
.mem { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "ava name acts" "ava meta acts" "ava bio bio"; column-gap: 10px; align-items: center; padding: 9px 8px; margin: 0 -8px; border-radius: var(--r-m); transition: background .15s; }
.mem:hover { background: var(--hover); }
.mem > .ava { grid-area: ava; align-self: start; margin-top: 2px; }
.mem-main { display: contents; line-height: 1.3; }
.mem-main b { grid-area: name; min-width: 0; font-size: var(--fs-m); font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-main small { grid-area: meta; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 6px; font-size: var(--fs-s); line-height: 1.35; color: var(--text-3); }
.mem-bio { grid-area: bio; margin-top: 3px; font-size: var(--fs-s); line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.online-txt { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.online-txt::before, .online-key i { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-brand); }
.mem.is-idle > .ava { opacity: .55; }
.mem-acts { grid-area: acts; display: flex; align-items: center; gap: 2px; }
.hi-btn { gap: 5px; color: var(--c-people); background: color-mix(in srgb, var(--fill-people) 13%, transparent); }
.hi-btn:hover { background: color-mix(in srgb, var(--fill-people) 22%, transparent); }
.more-btn { color: var(--text-3); }
/* a narrow chat (the desktop side panel): "Say hi" moves under the bio so the name keeps its room */
@container (max-width: 300px) {
  .mem { grid-template-areas: "ava name more" "ava meta meta" "ava bio bio" "ava hi hi"; }
  .mem-acts { display: contents; }
  .mem .hi-btn { grid-area: hi; justify-self: start; margin-top: 7px; }
  .mem .more-btn { grid-area: more; }
}

.composer { width: 100%; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 9px; border-radius: var(--r-m); font-size: var(--fs-m); color: var(--text-3); text-align: left; background: var(--card-2); transition: box-shadow .2s; }
.composer:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent); }
.composer-ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-plus { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--card); background: var(--text-3); flex-shrink: 0; }
.composer-plus .lucide { width: 15px; height: 15px; stroke-width: 2.6; }
.composer-plus.bot { color: #fff; background: linear-gradient(140deg, #8F7CFF, #C06BFF); }
.composer-plus.bot .lucide { stroke-width: 2; }
.composer input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: var(--fs-m); color: var(--text); }
.composer input::placeholder { color: var(--text-3); }
.composer-send { width: 34px; height: 34px; border-radius: var(--r-s); display: grid; place-items: center; color: var(--text-3); transition: color .15s, background .15s; }
.composer-send:hover { color: var(--brand-2); background: var(--hover); }

/* ---------- Forecast (opens from the weather frame) ---------- */
/* --fc-w / --fc-h come from hud.js fitForecast(): the room left beside the For you card and above the action bar */
.forecast {
  position: absolute; z-index: 35; top: var(--hud-top); left: var(--gap); width: min(430px, calc(100% - var(--gap) * 2), var(--fc-w, 100vw));
  max-height: min(calc(100% - var(--hud-top) - var(--gap)), var(--fc-h, 100vh)); display: flex; flex-direction: column; overflow: hidden;
  animation: hudIn .35s var(--ease);
}
.fc-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px 18px; flex-shrink: 0; }
.fc-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-l); font-weight: 650; }
.fc-title .lucide { color: var(--c-weather); }
.fc-title:focus { outline: 0; }
.fc-body { position: relative; overflow-y: auto; padding: 0 18px 18px; isolation: isolate; }
.wx-full { position: relative; z-index: 1; }
.wx-where { display: flex; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--text-3); }
.wx-where .lucide { width: 14px; height: 14px; }
.wx-hero { display: flex; align-items: center; gap: 18px; padding: 6px 0 14px; }
.wx-hero .wx-icon { width: 96px; height: 96px; flex-shrink: 0; }
.wx-icon svg { width: 100%; height: 100%; overflow: visible; }
.wx-temp { font: 300 var(--fs-hero)/.92 var(--font); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.wx-cond { font-size: var(--fs-l); font-weight: 600; margin-top: 6px; }
.wx-hl { font-size: var(--fs-s); color: var(--text-3); font-variant-numeric: tabular-nums; }
/* six captioned tiles, three across (two on the narrowest screens): what each number is, then the number */
.wx-col-now { container-type: inline-size; }
.wx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
@container (max-width: 345px) { .wx-stats { gap: 6px; } .wx-stat { padding-right: 7px; } .wx-stat dd { gap: 5px; font-size: var(--fs-l); } .wx-stat dd .lucide { width: 14px; height: 14px; } }
@container (max-width: 300px) { .wx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wx-stat { min-width: 0; padding: 8px 9px 9px 11px; border-radius: var(--r-m); background: var(--card-2); }
.wx-stat dt { font-size: var(--fs-xs); font-weight: 560; line-height: 1.25; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-stat dd { display: flex; align-items: center; gap: 6px; margin: 3px 0 0; font-size: var(--fs-l); font-weight: 620; line-height: 1.2; font-variant-numeric: tabular-nums; }
.wx-stat dd > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-stat dd .lucide { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-3); }
.wx-stat dd small { font-size: var(--fs-s); font-weight: 560; color: var(--text-2); }
.wx-full .panel { padding: 14px; border-radius: var(--r-l); background: var(--card-2); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.wx-full .panel + .panel { margin-top: 10px; }
.wx-full .panel .label { margin-bottom: 12px; }
.hourly-scroll { overflow-x: auto; scrollbar-width: none; }
.hourly-scroll::-webkit-scrollbar { display: none; }
/* it fits down to ~34px an hour; narrower, it scrolls and fades at the edge that has more */
.hourly-scroll.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.hourly-scroll.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.hourly-scroll.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.hourly { min-width: 272px; }
.hourly-chart { position: relative; height: 66px; }
.hourly-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hourly-chart .pt { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--card-2); box-shadow: 0 0 0 2px var(--c-weather); }
.hourly-chart .pt b { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); font-size: var(--fs-s); font-weight: 620; font-variant-numeric: tabular-nums; }
.hourly-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 10px; }
.hr { display: grid; justify-items: center; gap: 6px; }
.hr-t { font: 500 var(--fs-xs)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }
.hr .lucide { width: 18px; height: 18px; }
.hr em { font: 500 var(--fs-xs)/1 var(--font); font-variant-numeric: tabular-nums; font-style: normal; color: var(--c-weather); min-height: 11px; }
.daily li { display: grid; grid-template-columns: 46px 20px 32px 30px 1fr 30px; align-items: center; gap: 8px; height: 34px; font-size: var(--fs-m); font-variant-numeric: tabular-nums; }
.daily li + li { border-top: 1px solid var(--line); }
.d-day { font-weight: 560; }
.daily .lucide { width: 18px; height: 18px; }
.d-pp { font: 500 var(--fs-xs)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--c-weather); }
.d-lo { color: var(--text-3); text-align: right; }
.d-hi { font-weight: 600; }
.d-bar { position: relative; height: 5px; border-radius: var(--r-xs); background: var(--card-3); }
.d-bar > span { position: absolute; top: 0; bottom: 0; border-radius: inherit; }
.d-now { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--card-2); }

.wx-sky { position: absolute; inset: 0 0 auto 0; height: 360px; z-index: 0; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
.wx-sky::before, .wx-sky::after { content: ""; position: absolute; border-radius: 50%; animation: drift 16s ease-in-out infinite alternate; will-change: transform; }
.wx-sky::before { width: 420px; height: 420px; right: -10%; top: -200px; background: radial-gradient(circle, var(--sky1, transparent), transparent 65%); }
.wx-sky::after { width: 340px; height: 340px; left: -10%; top: -80px; background: radial-gradient(circle, var(--sky2, transparent), transparent 65%); animation-delay: -6s; }
@keyframes drift { to { transform: translate(-24px, 20px) scale(1.1); } }
.wx-sky[data-sky^="clear-day"] { --sky1: rgba(255, 186, 80, .3); --sky2: rgba(92, 180, 255, .14); }
.wx-sky[data-sky^="clear-night"] { --sky1: rgba(123, 108, 255, .28); --sky2: rgba(50, 90, 210, .14); }
.wx-sky[data-sky^="cloudy"] { --sky1: rgba(150, 165, 195, .18); --sky2: rgba(92, 180, 255, .1); }
.wx-sky[data-sky^="rain"] { --sky1: rgba(80, 140, 255, .24); --sky2: rgba(60, 200, 220, .1); }
.wx-sky[data-sky^="snow"] { --sky1: rgba(190, 215, 255, .26); --sky2: rgba(160, 180, 255, .1); }
.wx-sky[data-sky^="storm"] { --sky1: rgba(150, 100, 255, .28); --sky2: rgba(80, 90, 160, .16); }
.wx-fx { position: absolute; inset: 0; }
.wx-fx i { position: absolute; display: block; }
.wx-fx[data-fx="stars"] i { width: var(--s); height: var(--s); border-radius: 50%; background: #fff; animation: twinkle 3.5s ease-in-out infinite; }
:root[data-theme="light"] .wx-fx[data-fx="stars"] i { background: var(--brand); }
@keyframes twinkle { 0%, 100% { opacity: .1; } 50% { opacity: .7; } }
.wx-fx[data-fx="rain"] i { top: -20px; width: 1.5px; height: 18px; border-radius: var(--r-xs); background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--c-weather) 70%, transparent)); animation: rainfall linear infinite; }
@keyframes rainfall { to { transform: translate(-30px, 460px); } }
.wx-fx[data-fx="snow"] i { top: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .8; animation: snowfall linear infinite; }
:root[data-theme="light"] .wx-fx[data-fx="snow"] i { background: var(--c-weather); opacity: .4; }
@keyframes snowfall { 50% { transform: translate(14px, 230px); } to { transform: translate(-6px, 460px); } }
.wx-fx.flash::after { content: ""; position: absolute; inset: 0; background: rgba(200, 190, 255, .3); opacity: 0; animation: lightning 7s infinite; }
@keyframes lightning { 0%, 92%, 96%, 100% { opacity: 0; } 93%, 95% { opacity: 1; } }
.si-sun { color: #FFC24B; }
.si-moon { color: #B9B2FF; }
.si-cloud { color: var(--text-2); }
.si-rain { color: var(--c-weather); }
.si-snow { color: #9FD0FF; }
.si-storm { color: var(--c-events); }
:root[data-theme="light"] .si-sun { color: #D98A00; }
:root[data-theme="light"] .si-moon { color: #6F62E8; }
:root[data-theme="light"] .si-snow { color: var(--c-weather); }
.wi-rays { stroke: var(--wi-ray); stroke-width: 3; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: spin 24s linear infinite; }
.wi-float { animation: float 6s ease-in-out infinite; }
.wi-float.back { animation-duration: 8s; animation-direction: reverse; opacity: .55; }
@keyframes float { 50% { transform: translateX(3px); } }
.wi-drop { stroke: var(--c-weather); stroke-width: 3; stroke-linecap: round; animation: drop 1.1s linear infinite; }
@keyframes drop { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
.wi-flake { fill: var(--wi-flake); animation: flake 2.6s linear infinite; }
@keyframes flake { 0% { transform: translateY(-4px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(3px, 12px); opacity: 0; } }
.wi-bolt { fill: var(--wi-bolt); animation: bolt 3.2s infinite; }
@keyframes bolt { 0%, 70%, 78%, 100% { opacity: 1; } 72%, 76% { opacity: .2; } }
.wi-fog { stroke: var(--cloud-b); stroke-width: 3; stroke-linecap: round; animation: fog 4s ease-in-out infinite alternate; }
@keyframes fog { to { transform: translateX(5px); } }
.wi-twinkle { fill: #fff; animation: twinkle 2.4s ease-in-out infinite; }
:root[data-theme="light"] .wi-twinkle { fill: #8F84FF; }

/* ---------- Right HUD: the "For you" list ---------- */
.feed {
  position: absolute; z-index: 25; top: var(--hud-top); right: var(--gap); bottom: var(--gap); width: calc(var(--hud-r) - var(--gap));
  display: flex; flex-direction: column; overflow: hidden; container: feed / inline-size;
}
/* At most two rows of controls above the list: the title (desktop) or the tabs, then the chips with the sort button.
   The head's parts sit straight in the grip's grid, so each layout can arrange them. */
.sheet-grip { flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title min" "chips sort"; align-items: center; }
.feed-head { display: contents; }
.sheet-top { grid-area: top; display: none; position: relative; align-items: center; justify-content: center; min-width: 0; }
.sheet-handle { display: grid; place-items: center; width: 100%; height: 24px; cursor: grab; }
.sheet-bar { width: 44px; height: 5px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--text-3) 60%, transparent); }
.sheet-map { display: none; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 10px; border-radius: 999px; font-size: var(--fs-m); font-weight: 620; color: var(--text); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.sheet-map .lucide { width: 16px; height: 16px; }
.sheet-size { display: none; position: absolute; right: 8px; top: 50%; translate: 0 -50%; color: var(--text-2); }
.feed-tabs { grid-area: tabs; display: none; }
.feed-title { grid-area: title; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 14px 0 8px 16px; font-size: var(--fs-l); font-weight: 650; letter-spacing: -.01em; }
.feed-title:focus { outline: 0; }
.feed-title .lucide { width: 18px; height: 18px; color: var(--text-2); }
.panel-min { grid-area: min; margin: 8px 8px 2px 0; color: var(--text-3); }
.feed.is-detail .panel-min { display: none; }
/* hidden to a chip (laptop, desktop, phone on its side): just a button that brings the list back */
.feed-restore { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 14px; font-size: var(--fs-m); font-weight: 620; white-space: nowrap; color: var(--text); }
.feed-restore > .lucide { width: 17px; height: 17px; color: var(--text-2); }
.feed-restore .restore-ico { display: grid; margin-left: 2px; color: var(--text-3); }
.feed-restore .restore-ico .lucide { width: 17px; height: 17px; }
.feed-restore:hover .restore-ico { color: var(--text); }

/* chips: one row that scrolls, with arrows (and fades) where there's more */
.chip-bar { grid-area: chips; position: relative; min-width: 0; }
.feed-chips { display: flex; gap: 6px; padding: 6px 12px 10px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 44px; touch-action: pan-x; }
.feed-chips::-webkit-scrollbar { display: none; }
.chip-bar.can-next .feed-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 14px)); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 14px)); }
.chip-bar.can-prev .feed-chips { -webkit-mask-image: linear-gradient(90deg, transparent 14px, #000 64px); mask-image: linear-gradient(90deg, transparent 14px, #000 64px); }
.chip-bar.can-prev.can-next .feed-chips { -webkit-mask-image: linear-gradient(90deg, transparent 14px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 14px)); mask-image: linear-gradient(90deg, transparent 14px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 14px)); }
.chip-arrow { position: absolute; z-index: 1; top: 9px; width: 28px; height: 28px; border-radius: 50%; display: none; place-items: center; color: var(--text); background: var(--card-3); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-2); transition: background .15s; }
.chip-arrow::before { content: ""; position: absolute; inset: -8px; }
.chip-arrow:hover { background: color-mix(in srgb, var(--text) 16%, var(--card-3)); }
.chip-arrow .lucide { width: 16px; height: 16px; stroke-width: 2.4; }
.chip-arrow.is-prev { left: 6px; }
.chip-arrow.is-next { right: 6px; }
.chip-bar.can-prev .is-prev, .chip-bar.can-next .is-next { display: grid; }
.fchip {
  --c: var(--brand-2);
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px 0 9px; border-radius: 999px; flex-shrink: 0;
  font-size: var(--fs-s); font-weight: 560; white-space: nowrap; color: var(--text-2); background: var(--card-2); transition: background .15s, color .15s, box-shadow .15s, opacity .15s;
}
.fchip::before { content: ""; position: absolute; inset: -5px -3px; } /* a 44px-tall touch target */
.fchip > .lucide { width: 15px; height: 15px; color: var(--c); }
.fchip b { font: 500 var(--fs-xs)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-3); }
.fchip:hover { color: var(--text); background: var(--card-3); }
.fchip.is-all { padding: 0 12px; }
.fchip.is-all.is-on { color: var(--bg); background: var(--text); }
.fchip.is-all.is-on b { color: color-mix(in srgb, var(--bg) 65%, var(--text)); }
/* picked: tinted, with a ring in its color */
.fchip.is-on:not(.is-all) { color: var(--text); background: color-mix(in srgb, var(--c) 18%, var(--card-2)); box-shadow: inset 0 0 0 1.5px var(--c); }
.fchip.is-on:not(.is-all) b { color: var(--text-2); }
/* hidden from the map and list: hollow, grey icon (reads without color too) */
.fchip.is-off, .fchip.is-all:not(.is-on) { color: var(--text-3); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.fchip.is-off > .lucide { color: var(--text-3); }
.fchip.is-off:hover, .fchip.is-all:not(.is-on):hover { color: var(--text-2); background: var(--hover); }
.fchip .dot { margin: 0 -2px 0 -1px; } /* after the count, inside the chip: never on its edge or over the text */
/* sort and news sources: one button at the end of the chip row */
.sort-btn { grid-area: sort; position: relative; align-self: start; width: 38px; height: 34px; margin: 6px 10px 0 0; border-radius: var(--r-m); display: grid; place-items: center; color: var(--text-2); background: var(--card-2); transition: background .15s, color .15s; }
.sort-btn::before { content: ""; position: absolute; inset: -5px -4px; }
.sort-btn:hover { color: var(--text); background: var(--card-3); }
.sort-btn .lucide { width: 17px; height: 17px; }
.sort-btn.is-on, .sort-btn[aria-expanded="true"] { color: var(--brand-2); background: color-mix(in srgb, var(--brand) var(--tint), var(--card-2)); }
.menu.sort-menu { position: fixed; left: auto; width: 236px; z-index: 45; }
.sort-menu button > span { flex: 1; min-width: 0; }
.sort-menu .m-check { width: 16px; height: 16px; color: var(--brand-2); }

.feed-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 6px 10px; border-top: 1px solid var(--line); overscroll-behavior: contain; position: relative; }
/* sample content: a small pill in the list's top corner, beside the first heading */
.feed-list::before { content: var(--sample, none); position: absolute; z-index: 1; top: 8px; right: 12px; height: 20px; padding: 0 7px; border-radius: var(--r-s); font: 700 var(--fs-xs)/20px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.feed-list:not(:has(> .feed-sec:first-child)):not(:has(> .feed-new:first-child + .feed-sec)) { padding-top: 34px; } /* the new-things pill doesn't count */
.feed-sec { padding: 10px 10px 4px; font: 650 var(--fs-xs)/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 9px 10px; border-radius: var(--r-m); text-align: left; transition: background .15s, box-shadow .15s; }
.row:hover, .row.is-hot { background: var(--hover); }
.row.is-active { background: color-mix(in srgb, var(--c) 13%, transparent); box-shadow: inset 3px 0 0 var(--c); }
.row.is-arriving { animation: rowIn .6s var(--ease), freshRow 2.6s var(--ease); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes freshRow { 0%, 35% { background: color-mix(in srgb, var(--c) 14%, transparent); } }
/* the row icon takes the marker's shape, so the list teaches the map */
.row-ico { position: relative; width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-m); color: var(--c); background: color-mix(in srgb, var(--fill, var(--c)) var(--tint), var(--card-2)); }
.row-ico .lucide { width: 18px; height: 18px; }
.row-ico[data-shape="alert"] { color: var(--on-c); background: var(--fill, var(--c)); }
.row-ico[data-shape="cal"] { padding-top: 7px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--c); overflow: hidden; }
.row-ico[data-shape="cal"]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--c); }
.row-ico[data-shape="pin"] { border-radius: 50% 50% 50% 6px; }
.row-ico[data-shape="tag"] { border-radius: 19px 8px 8px 19px; }
.row-ico[data-shape="circle"] { border-radius: 50%; }
.row-ico[data-shape="dot"] { border-radius: 50% 50% 50% 6px; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 3px; line-height: 1.35; }
.row-main b { font-size: var(--fs-m); font-weight: 560; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-main small { font-size: var(--fs-s); color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-variant-numeric: tabular-nums; }
.row-end { display: grid; justify-items: end; gap: 4px; flex-shrink: 0; max-width: 92px; }
.row-val { font: 650 var(--fs-s)/1.2 var(--font); font-variant-numeric: tabular-nums; color: var(--text); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92px; }
.feed-list .empty { padding: 36px 12px; }
.feed-foot { padding: 12px 12px 4px; font-size: var(--fs-xs); text-align: center; color: var(--text-3); }

/* the chat as tabs inside the panel (smaller screens) */
.feed .social { display: none; flex: 1; min-height: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; margin: 0; max-height: none; height: auto; border-top: 1px solid var(--line); }
.feed .social .social-head, .feed .social .social-peek { display: none !important; }
.feed .social .social-body { padding-top: 10px; }
.feed[data-view]:not([data-view="foryou"]) .social { display: flex; }
.feed[data-view]:not([data-view="foryou"]) .feed-head, .feed[data-view]:not([data-view="foryou"]) .feed-list,
.feed[data-view]:not([data-view="foryou"]) .feed-detail { display: none !important; }

/* one item, opened, inside the same panel */
.feed-detail { display: none; flex: 1; min-height: 0; flex-direction: column; }
.feed.is-detail .feed-head, .feed.is-detail .feed-chips, .feed.is-detail .feed-list { display: none; }
.feed.is-detail .feed-detail { display: flex; animation: detIn .32s var(--ease); }
@keyframes detIn { from { opacity: 0; transform: translateX(14px); } }
.det-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.det-bar { display: flex; align-items: center; gap: 2px; padding: 8px 8px 7px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.det-bar .icon-btn { width: 36px; height: 36px; }
.det-kind { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 0 0 4px; overflow: hidden; font-size: var(--fs-s); font-weight: 650; color: var(--c); white-space: nowrap; }
.det-kind .lucide { width: 15px; height: 15px; }
.det-kind-word { flex-shrink: 0; }
.det-kind em { min-width: 0; font-style: normal; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.det-kind em::before { content: "·"; margin-right: 6px; color: var(--text-3); }
.det-pos { padding: 0 4px; font: 500 var(--fs-xs)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }
.det-sum { display: none; align-items: center; gap: 12px; padding: 12px 14px 4px; touch-action: pan-y; transition: transform .16s var(--ease), opacity .16s; }
.det-sum.out-left { transform: translateX(-30px); opacity: 0; }
.det-sum.out-right { transform: translateX(30px); opacity: 0; }
.det-sum-main { flex: 1; min-width: 0; display: grid; gap: 3px; line-height: 1.3; }
.det-sum-main b { font-size: var(--fs-l); font-weight: 650; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.det-sum-main small { font-size: var(--fs-s); color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.det-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.det-body { display: grid; gap: 14px; padding: 18px 18px 20px; }
.det-title { font-size: var(--fs-xl); line-height: 1.25; font-weight: 650; letter-spacing: -.02em; text-wrap: pretty; }
.det-title:focus { outline: 0; }
.det-quote { font-size: var(--fs-xl); font-weight: 560; line-height: 1.45; letter-spacing: -.01em; }
.det-where { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 8px 12px 8px 10px; border-radius: var(--r-m); font-size: var(--fs-s); font-weight: 560; text-align: left; color: var(--text-2); background: var(--card-2); transition: background .15s, color .15s; }
.det-where span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det-where .lucide { width: 15px; height: 15px; color: var(--c); }
.det-where:hover { color: var(--text); background: var(--card-3); }
.det-lede { font-size: var(--fs-l); font-weight: 560; line-height: 1.55; }
.det-text { display: grid; gap: 12px; max-width: 64ch; font-size: var(--fs-l); line-height: 1.6; color: var(--text-2); }
.det-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.det-facts > span { display: grid; align-content: start; gap: 4px; padding: 10px 12px; border-radius: var(--r-m); background: var(--card-2); min-width: 0; }
.det-facts b { font-size: var(--fs-m); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.det-facts b.is-free { color: var(--c); } /* the item's own colour: blue means for sale */
.det-facts b.is-pay { color: var(--c); }
.det-facts small { font: 650 var(--fs-xs)/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.det-cta { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.det-cta .btn { flex: 1; min-width: 0; height: 44px; overflow: hidden; }
.btn-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-cta .icon-btn { width: 44px; height: 44px; flex-shrink: 0; }
.btn-kind { color: var(--on-c); background: var(--fill, var(--c)); }
.btn-kind:hover { background: color-mix(in srgb, var(--fill, var(--c)) 86%, white); }
.btn-kind.is-done { color: var(--text-2); background: var(--card-3); }
.save-toggle.is-on .lucide { fill: var(--brand-2); color: var(--brand-2); }
.det-person { display: flex; align-items: center; gap: 10px; }
.det-person > div { display: grid; line-height: 1.3; min-width: 0; }
.det-person b { display: flex; align-items: center; gap: 6px; font-size: var(--fs-m); font-weight: 650; }
.det-person small { display: flex; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--text-3); }
.det-person small .lucide { width: 13px; height: 13px; }
.det-rating { display: inline-flex; align-items: center; gap: 4px; }
.det-rating .lucide { color: var(--sun-b); fill: currentColor; }
.det-route { display: grid; gap: 7px; padding: 12px; border-radius: var(--r-m); font-size: var(--fs-m); background: var(--card-2); }
.det-route span { display: flex; align-items: center; gap: 9px; }
.det-route .lucide { width: 15px; height: 15px; color: var(--text-3); }
.det-price { font-size: var(--fs-2xl); letter-spacing: -.03em; }
.type-pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-s); font: 600 var(--fs-xs)/1 var(--font); color: var(--text-2); background: var(--card-3); }
.type-pill .lucide { width: 12px; height: 12px; color: var(--c-people); }

/* ---------- The action bar (a game's hotbar) ---------- */
.hotbar {
  position: absolute; z-index: 20; bottom: calc(var(--gap) + 4px);
  left: calc(var(--hud-l) + (100% - var(--hud-l) - var(--hud-r)) / 2); transform: translateX(-50%);
  display: flex; gap: 6px; padding: 7px; border-radius: var(--r-l); transition: opacity .25s, transform .3s var(--ease);
}
.hk {
  --hk: var(--brand-2);
  position: relative; overflow: hidden; width: 64px; height: 58px; border-radius: var(--r-m); flex-shrink: 0;
  display: grid; place-items: center; align-content: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 -2px 0 rgba(0, 0, 0, .22);
  transition: transform .18s var(--ease), background .15s, color .15s, box-shadow .15s;
}
:root[data-theme="light"] .hk { box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -2px 0 rgba(20, 22, 30, .08); }
.hk .lucide { width: 21px; height: 21px; color: var(--hk); transition: transform .25s var(--spring); }
/* the number key, as a small keycap (only where there's a keyboard and a mouse) */
.hk kbd { display: none; position: absolute; top: 4px; left: 4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: var(--r-xs); font: 650 var(--fs-xs)/16px var(--mono); text-align: center; color: var(--text-2); background: var(--card-3); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28); }
@media (hover: hover) and (pointer: fine) { .hk kbd { display: block; } }
/* short phones: the whole bar folds into this one button */
.hk-more { display: none; width: 52px; height: 52px; border-radius: var(--r-l); place-items: center; color: #fff; background: var(--brand); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.hk-more .lucide { width: 24px; height: 24px; stroke-width: 2.4; transition: transform .25s var(--spring); }
.hotbar.is-open .hk-more .lucide { transform: rotate(45deg); }
.hk:hover { color: var(--text); background: var(--card-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hk) 50%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 0 18px -6px color-mix(in srgb, var(--hk) 35%, transparent); }
.hk:hover .lucide { transform: translateY(-1px) scale(1.08); }
.hk:active { transform: translateY(1px) scale(.97); }
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
.hk::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: conic-gradient(rgba(0, 0, 0, .42) var(--sweep), transparent 0); opacity: 0; }
.hk.is-cooling::after { animation: cooldown .8s linear; }
@keyframes cooldown { from { --sweep: 360deg; opacity: 1; } to { --sweep: 0deg; opacity: 1; } }

/* ---------- Palette ---------- */
.palette { position: fixed; inset: 0; z-index: 140; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; visibility: hidden; }
.palette.is-open { visibility: visible; }
.palette-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
:root[data-theme="light"] .palette-scrim { background: rgba(30, 31, 35, .35); }
.palette.is-open .palette-scrim { opacity: 1; }
.palette-box { position: relative; width: min(580px, 100%); max-height: 66vh; display: flex; flex-direction: column; border-radius: var(--r-l); overflow: hidden; background: var(--card); box-shadow: var(--shadow-lg); opacity: 0; transform: scale(.97); transition: opacity .2s var(--ease), transform .25s var(--ease); }
.palette.is-open .palette-box { opacity: 1; transform: none; }
.palette-input { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-input > .lucide { width: 19px; height: 19px; color: var(--text-3); }
.palette-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: var(--fs-l); }
.palette-input input::placeholder { color: var(--text-3); }
.palette-list { overflow: auto; padding: 8px; }
.pal-group + .pal-group { margin-top: 6px; }
.pal-label { padding: 10px 10px 6px; }
.pal-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-s); text-align: left; cursor: pointer; }
.pal-item.is-active { background: var(--active); }
.pal-ico { display: grid; color: var(--c); }
.pal-ico .lucide { width: 19px; height: 19px; }
.pal-txt { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.pal-txt b { font-weight: 540; font-size: var(--fs-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-txt small { color: var(--text-3); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-note { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: var(--fs-m); color: var(--text-3); }
.pal-note .lucide { width: 16px; height: 16px; }

/* ---------- Dialogs ---------- */
.modal-layer { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal-layer.is-open { visibility: visible; }
.modal-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); opacity: 0; transition: opacity .25s; }
:root[data-theme="light"] .modal-scrim { background: rgba(30, 31, 35, .4); }
.modal-layer.is-open .modal-scrim { opacity: 1; }
.modal { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-lg); opacity: 0; transform: scale(.96); transition: opacity .25s var(--ease), transform .3s var(--ease); }
.modal-layer.is-open .modal { opacity: 1; transform: none; }
.modal-x { position: absolute; right: 12px; top: 12px; z-index: 2; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 6px; }
.modal-head h2 { flex: 1; font-size: var(--fs-xl); font-weight: 640; letter-spacing: -.02em; }
.modal-head .m-ico { display: grid; color: var(--c, var(--brand-2)); }
.modal-head .m-ico .lucide { width: 22px; height: 22px; }
.auth { display: grid; justify-items: center; text-align: center; padding: 34px 28px 26px; }
.auth-logo { width: 54px; height: 54px; margin-bottom: 16px; }
.auth h2 { font-size: var(--fs-xl); font-weight: 640; letter-spacing: -.03em; }
.auth > p { margin-top: 6px; color: var(--text-2); font-size: var(--fs-m); max-width: 320px; text-wrap: balance; }
.form { display: grid; gap: 14px; padding: 14px 20px 20px; }
.field { display: grid; gap: 7px; }
.field > span, .field > legend { font-size: var(--fs-s); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.field > legend { margin-bottom: 7px; }
.input { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 13px; border-radius: var(--r-m); background: var(--card-2); transition: box-shadow .2s; }
.input:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, var(--brand)) 60%, transparent); }
.input .lucide { width: 17px; height: 17px; color: var(--text-3); }
.input input, .input select { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: var(--fs-m); appearance: none; }
.input select { cursor: pointer; }
.input input::placeholder { color: var(--text-3); }
.input > .lucide-chevron-down { margin-left: -28px; pointer-events: none; }
.input textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: var(--fs-m); resize: none; padding: 10px 0; }
.input.tall { height: auto; align-items: flex-start; }
.input.tall .lucide { margin-top: 13px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.stepper { display: flex; align-items: center; height: 44px; border-radius: var(--r-m); background: var(--card-2); }
.stepper button { width: 40px; height: 100%; font-size: var(--fs-xl); color: var(--text-2); }
.stepper output { min-width: 22px; text-align: center; font-weight: 620; font-variant-numeric: tabular-nums; }
.pay-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay input { position: absolute; opacity: 0; pointer-events: none; }
.pay span { display: grid; place-items: center; height: 42px; border-radius: var(--r-m); cursor: pointer; font-weight: 620; font-variant-numeric: tabular-nums; background: var(--card-2); transition: background .2s, box-shadow .2s, color .2s; }
.pay input:checked + span { color: var(--c-rides); background: color-mix(in srgb, var(--c-rides) 13%, transparent); box-shadow: inset 0 0 0 1.5px var(--c-rides); }
.pay input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 4px; font-size: var(--fs-m); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, var(--brand)); flex-shrink: 0; }
.reasons { display: grid; gap: 4px; }
.modal-ride { --accent: var(--c-rides); }
.modal-ride .btn-primary { color: var(--on-warm); background: var(--fill-people); }
.modal-market { --accent: var(--c-market); }
.modal-market .btn-primary { color: var(--on-c); background: var(--c-market); }
.rows { display: grid; gap: 2px; padding: 8px 12px 16px; }
.rows .row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px; border-radius: var(--r-m); text-align: left; width: 100%; }
.rows button.row:hover, .rows .row[role="switch"]:hover { background: var(--hover); }
.rows .row > .lucide { width: 20px; height: 20px; color: var(--text-3); }
.rows .row > div { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.rows .row b { font-weight: 560; font-size: var(--fs-m); }
.rows .row small { font-size: var(--fs-s); color: var(--text-3); }
.sw { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--card-3); transition: background .25s; flex-shrink: 0; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.sw.is-on { background: var(--fill, var(--c, var(--brand))); }
.sw.is-on::after { transform: translateX(14px); }
.explore { padding: 8px 20px 20px; display: grid; gap: 14px; }
.field-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: var(--r-m); background: var(--card-2); transition: box-shadow .2s; }
.field-search:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 60%, transparent); }
.field-search .lucide { width: 18px; height: 18px; color: var(--text-3); }
.field-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: var(--fs-l); }
.field-search input::placeholder { color: var(--text-3); }
.explore-results:empty { display: none; }
.explore-results { display: grid; gap: 2px; margin: -6px -8px 0; }
.explore-results .row { min-height: 48px; }
.explore-results .row:hover { background: var(--hover); }
.explore-results .row > .lucide { width: 18px; height: 18px; color: var(--text-3); }
.explore-results .row > div { flex: 1; display: grid; line-height: 1.3; }
.explore-results .row small { font-size: var(--fs-s); color: var(--text-3); }
.explore-status { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: var(--fs-m); color: var(--text-3); }
.explore-status .lucide { width: 16px; height: 16px; }
.explore .chips .chip .lucide { color: var(--brand-2); }
.explore-tip { display: flex; align-items: center; gap: 7px; }
.explore-tip .lucide { width: 15px; height: 15px; }
.fine { font-size: var(--fs-s); line-height: 1.45; color: var(--text-3); }
.prose { display: grid; gap: 12px; padding: 10px 22px 4px; font-size: var(--fs-m); line-height: 1.55; color: var(--text-2); }
.about { padding: 0 22px 22px; font-size: var(--fs-s); line-height: 1.5; color: var(--text-3); }
.photo-pick { position: relative; display: grid; place-items: center; width: 76px; height: 76px; flex-shrink: 0; border-radius: var(--r-l); overflow: hidden; cursor: pointer; background: var(--card-2); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .2s; }
.photo-pick:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent, var(--brand)) 60%, transparent); }
.photo-pick:focus-within { box-shadow: 0 0 0 2px var(--brand-2); }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-empty { display: grid; justify-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 560; color: var(--text-3); pointer-events: none; }
.photo-empty .lucide { width: 22px; height: 22px; }
.photo-pick.has-photo .photo-empty { display: none; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ---------- Toasts & tooltip ---------- */
/* where they sit is worked out from what's on screen (util.js placeToasts): over open map, never over what you're reading */
.toasts {
  position: fixed; left: var(--tx, 50%); bottom: var(--ty, calc(96px + env(safe-area-inset-bottom))); z-index: 165; transform: translateX(-50%);
  display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: min(460px, var(--tw, calc(100vw - 32px)), calc(100vw - 24px));
  transition: left .3s var(--ease), bottom .3s var(--ease), top .3s var(--ease);
}
.toasts[data-at="top"] { bottom: auto; top: var(--ty); }
.toasts[data-at="screen"] { bottom: auto; top: calc(env(safe-area-inset-top) + 12px); }
.toasts[data-at="top"] .toast:not(.is-out), .toasts[data-at="screen"] .toast:not(.is-out) { animation-name: toastInTop; }
@keyframes toastInTop { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: var(--r-m); font-size: var(--fs-m); font-weight: 520; color: var(--text); background: var(--card); box-shadow: var(--shadow-lg); animation: toastIn .45s var(--spring) both; }
.toast > .lucide { flex-shrink: 0; width: 18px; height: 18px; color: var(--c, var(--brand-2)); }
.toast { max-width: 100%; min-width: 0; }
.toast > span { min-width: 0; overflow-wrap: anywhere; } /* a long word or link wraps instead of running off the screen */
.toast-act { flex-shrink: 0; }
.toast.is-out { animation: toastOut .3s var(--ease) both; }
.toast-act { margin-left: 4px; height: 28px; padding: 0 10px; border-radius: var(--r-s); font-size: var(--fs-s); font-weight: 600; color: var(--brand-2); background: var(--card-2); }
.toast-act:hover { background: var(--card-3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.tip { position: fixed; z-index: 170; left: 0; top: 0; pointer-events: none; max-width: 260px; padding: 7px 10px; border-radius: var(--r-s); font-size: var(--fs-s); font-weight: 600; line-height: 1.35; color: #F2F3F5; background: #0B0C0E; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .6); opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.95); transition: opacity .12s, transform .12s var(--ease); }
.tip.is-on { opacity: 1; transform: translate(var(--tx), var(--ty)); }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Layouts ----------
   desktop ≥1280 (rail, chat under the weather) · laptop 1024–1279 (iPad landscape) · tablet 700–1023 (iPad portrait)
   phone <700 · phone landscape (short screens). js/util.js LAYOUTS mirrors these queries. */
@media (min-width: 1600px) { .stage { --hud-l: 330px; --hud-r: 412px; } }
@media (max-width: 1439.98px) { .stage { --hud-l: 284px; --hud-r: 364px; } .hk { width: 60px; height: 56px; } }
@media (min-width: 1280px) and (max-height: 760px) {
  .wx-tip { display: none; }
  .social.is-open { height: 300px; }
}

/* menus line up with the panels under them: the place menu with the weather card, updates with the For you panel */
@media (min-width: 700px) {
  .place-wrap, .bell-wrap { position: static; }
  .menu { top: calc(100% + var(--gap)); }
  #place-menu { width: 284px; }
  .menu.notes { right: 0; width: max(340px, calc(var(--hud-r) - var(--gap))); }
}
@media (min-width: 1280px) { #place-menu { width: calc(var(--hud-l) - var(--gap)); } }

/* everything below desktop: no rail (places live in the place menu), and the chat is tabs in the For you panel */
@media (max-width: 1279.98px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .mobile-only { display: flex !important; }
  .stage { --hud-l: 0px; --hud-r: 392px; }
  .hud-left { bottom: auto; width: 284px; }
  /* the panel's first row is its tabs (with the hide button at the end); the title would only repeat them */
  .sheet-grip { grid-template-areas: "tabs min" "chips sort"; }
  .feed-title { display: none; }
  .feed-tabs { container: tabs / inline-size; display: flex; gap: 2px; min-width: 0; padding: 8px 4px 2px 8px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
  .feed-tabs::-webkit-scrollbar { display: none; }
  .feed-tabs [role="tab"] { position: relative; flex: 1 1 auto; min-width: 0; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border-radius: var(--r-m); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; color: var(--text-3); transition: background .15s, color .15s; }
  .feed-tabs [role="tab"]:hover { color: var(--text-2); background: var(--hover); }
  .feed-tabs [role="tab"].is-on { color: var(--text); background: var(--active); }
  .feed-tabs .lucide { width: 15px; height: 15px; }
  /* a new-things dot after the label (it takes its own room), gone on the tab you're looking at */
  .feed-tabs .has-dot:not(.is-on)::after { content: ""; flex-shrink: 0; width: 7px; height: 7px; margin-left: -1px; border-radius: 50%; background: var(--c-new); }
  .feed.is-detail .feed-tabs { display: none; }
  .explore-here { left: auto; right: calc(var(--hud-r) + var(--gap)); transform: none; }
}
/* the four tabs always fit: when the row is narrow, only the open tab keeps its icon */
@container tabs (max-width: 330px) { .feed-tabs [role="tab"]:not(.is-on) .lucide { display: none; } }
@media (min-width: 1024px) and (max-width: 1279.98px) and (max-height: 820px) { .wx-tip { display: none; } }

/* laptop and desktop: the list hides to a chip in its corner (and the map gets the room); the weather card folds the same way */
@media (min-width: 1024px) {
  .stage[data-sheet="collapsed"] { --hud-r: 0px; }
  .feed[data-sheet="collapsed"] { bottom: auto; width: auto; container-type: normal; border-radius: var(--r-l); }
  .feed[data-sheet="collapsed"] > :not(.feed-restore) { display: none !important; }
  .feed[data-sheet="collapsed"] .feed-restore { display: flex; }
  .stage[data-sheet="collapsed"] .explore-here { right: auto; left: calc(var(--hud-l) + (100% - var(--hud-l)) / 2); transform: translateX(-50%); }
  .hud-wx .wx-size { display: grid; position: absolute; top: 10px; right: 8px; color: var(--text-3); }
  .hud-wx .wxh-head { padding-right: 34px; }
  .stage[data-wx="min"] .hud-wx { align-self: flex-start; display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: var(--r-l); }
  .stage[data-wx="min"] .hud-wx .wxh-head, .stage[data-wx="min"] .hud-wx .wx-bars, .stage[data-wx="min"] .hud-wx .wx-tip, .stage[data-wx="min"] .hud-wx .wxh-go { display: none; }
  .stage[data-wx="min"] .wxh-main { width: auto; margin: 0; padding: 0 6px 0 0; gap: 8px; }
  .stage[data-wx="min"] .wxh-icon { width: 40px; height: 40px; }
  .stage[data-wx="min"] .wxh-temp { font-size: var(--fs-2xl); font-weight: 400; }
  .stage[data-wx="min"] .wxh-now { line-height: 1.15; }
  .stage[data-wx="min"] .wx-size { position: static; }
}

/* below laptop: the weather is a compact card, the For you panel is a sheet */
@media (max-width: 1023.98px) {
  .stage { --hud-r: 0px; }
  .vignette { display: none; }
  .hud-left { width: auto; }
  .hud-wx { padding: 6px 12px 6px 6px; border-radius: var(--r-l); }
  .hud-wx .wxh-head, .hud-wx .wx-bars, .hud-wx .wx-tip, .hud-wx .wxh-go { display: none; }
  .wxh-main { width: auto; margin: 0; padding: 0; gap: 8px; }
  .wxh-icon { width: 40px; height: 40px; }
  .wxh-temp { font-size: var(--fs-2xl); font-weight: 400; }
  .wxh-now { line-height: 1.15; }
  .wxh-load { margin: 2px; }
  .feed { transition: height .35s var(--ease); }
  .feed.is-dragging { transition: none; user-select: none; }
  /* handle row, tabs, then chips with the sort button */
  .sheet-grip { touch-action: none; grid-template-areas: "top top" "tabs tabs" "chips sort"; }
  .sheet-top { display: flex; }
  .panel-min { display: none; }
  /* a tapped marker opens as a small card: the summary and the main action */
  .feed[data-sheet="card"] .det-sum { display: flex; }
  .feed[data-sheet="card"] .det-scroll { display: none; }
  .feed[data-sheet="card"] .det-cta { border-top: 0; background: none; }
  .leaflet-bottom.leaflet-right { right: 0; }
}

/* tablet (iPad portrait): weather card top-left, For you as a floating card on the right, actions bottom-left */
@media (min-width: 700px) and (max-width: 1023.98px) {
  .stage { --bar-h: 56px; --card-w: clamp(360px, 46vw, 400px); --peek: 138px; --card-h: 248px; }
  .search-pill { flex: 1 1 auto; min-width: 180px; max-width: 360px; }
  .icon-btn { width: 44px; height: 44px; }
  .feed { --sheet-top: calc(var(--hud-top)); top: auto; bottom: var(--gap); right: var(--gap); width: var(--card-w); height: var(--peek); border-radius: var(--r-xl); }
  .feed[data-sheet="card"] { height: var(--card-h); }
  .feed[data-sheet="half"] { height: 55dvh; }
  .feed[data-sheet="full"] { height: calc(100% - var(--hud-top) - var(--gap)); }
  /* a handle you can see, and an arrow beside it that grows the card to full height (and back) */
  .sheet-top { height: 36px; }
  .sheet-handle { height: 36px; }
  .icon-btn.sheet-size { display: grid; width: 44px; height: 36px; }
  .hotbar { left: var(--gap); bottom: var(--gap); transform: none; padding: 6px; gap: 5px; }
  .hk { width: 56px; height: 52px; font-size: var(--fs-xs); }
  /* the map buttons stay in one place, just left of the card, whatever its height */
  .map-ctrls { right: calc(var(--card-w) + var(--gap) * 2); bottom: calc(var(--gap) * 2 + 64px); }
  .explore-here { top: calc(var(--hud-top) + 4px); right: auto; left: 50%; transform: translateX(-50%); }
  .map-key { right: calc(var(--card-w) + var(--gap) * 2 + 54px); bottom: calc(var(--gap) * 2 + 64px); }
  .menu.notes { width: var(--card-w); }
}

/* phone: map first; the For you sheet pulls up from the bottom */
@media (max-width: 699.98px) {
  .stage { --gap: 12px; --bar-h: 48px; --hud-top: calc(env(safe-area-inset-top) + var(--gap) + var(--bar-h)); --peek: 188px; --card-h: 236px; }
  .topbar { top: calc(env(safe-area-inset-top) + var(--gap)); padding: 0 4px 0 4px; gap: 0; border-radius: var(--r-l); }
  .place-wrap, .bell-wrap { position: static; }
  .place-btn { padding: 0 6px; gap: 7px; }
  .place-txt small { display: none; }
  .search-pill { flex: 0 0 auto; width: 44px; height: 44px; margin: 0 0 0 auto; padding: 0; justify-content: center; background: none; box-shadow: none; }
  .search-ph, .search-pill kbd { display: none; }
  .top-end { gap: 0; }
  .top-end .icon-btn { width: 44px; height: 44px; }
  .hide-phone { display: none !important; }
  .menu, .menu.notes { left: 0; right: 0; top: calc(100% + 8px); width: auto; }
  .hud-left { top: calc(var(--hud-top) + 8px); }
  .hud-wx { padding: 2px 12px 2px 2px; border-radius: var(--r-xl); }
  .wxh-icon { width: 34px; height: 34px; }
  .wxh-now { display: flex; align-items: baseline; gap: 6px; }
  .wxh-temp { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.03em; }
  .wxh-cond { font-size: var(--fs-s); margin: 0; color: var(--text-2); }
  .wxh-now small { display: none; }
  .wxh-rain { height: 22px; padding: 0 6px; }
  /* "Explore this area" gets its own row, centered under the weather */
  .explore-here { top: calc(var(--hud-top) + 58px); left: 0; right: 0; margin: 0 auto; width: fit-content; transform: none; height: 40px; padding: 0 16px 0 13px; }
  .feed {
    --sheet-top: calc(env(safe-area-inset-top) + 64px);
    top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 22px 22px 0 0;
    height: calc(var(--peek) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  }
  .feed[data-sheet="card"] { height: calc(var(--card-h) + env(safe-area-inset-bottom)); }
  .feed[data-sheet="half"] { height: 50dvh; }
  .feed[data-sheet="full"] { height: calc(100dvh - var(--sheet-top)); }
  .sheet-handle { height: 22px; }
  .feed-tabs { padding: 0 8px; }
  .feed-tabs [role="tab"] { height: 44px; }
  /* resting: the tabs, the chips and one whole row (a one-line title, no section heading) */
  .feed[data-sheet="peek"] .feed-list { overflow: hidden; padding-top: 4px; }
  .feed[data-sheet="peek"] .feed-sec, .feed[data-sheet="peek"] .feed-list::before { display: none; }
  .feed[data-sheet="peek"] .row-main b { -webkit-line-clamp: 1; }
  /* full screen: the handle turns into a clear way back to the map */
  .feed[data-sheet="full"] .sheet-handle { height: 44px; }
  .feed[data-sheet="full"] .sheet-bar { display: none; }
  .feed[data-sheet="full"] .sheet-map { display: inline-flex; }
  /* all five actions, centered over the sheet; the map buttons sit above them on the right */
  .hotbar { left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - var(--gap) * 2); bottom: calc(var(--peek) + env(safe-area-inset-bottom) + var(--gap)); transform: none; padding: 4px; gap: 4px; border-radius: var(--r-l); }
  .hk { flex: 0 1 64px; min-width: 0; width: 64px; height: 52px; font-size: var(--fs-xs); border-radius: var(--r-m); }
  .stage:not([data-sheet="peek"]) .hotbar, .stage.is-panning .hotbar { opacity: 0; pointer-events: none; transform: translateY(12px); }
  .map-ctrls { right: var(--gap); bottom: calc(var(--peek) + env(safe-area-inset-bottom) + var(--gap) + 80px); gap: 8px; }
  .ctl-zoom { display: none; }
  .icon-btn.ctl { width: 44px; height: 44px; }
  .stage:not([data-sheet="peek"]) .map-ctrls { opacity: 0; pointer-events: none; }
  .map-key { left: var(--gap); right: var(--gap); width: auto; transform-origin: bottom center; }
  .forecast { position: fixed; inset: 0; z-index: 60; width: auto; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .fc-bar .icon-btn { width: 44px; height: 44px; }
  .leaflet-bottom.leaflet-right { bottom: calc(var(--peek) + env(safe-area-inset-bottom) + var(--gap) + 60px); }
  .det-title { font-size: var(--fs-xl); }
  @supports (height: 100dvh) { .feed[data-sheet="full"] { height: calc(100dvh - var(--sheet-top)); } }
}
@media (min-width: 560px) and (max-width: 699.98px) {
  .feed { left: max(0px, calc(50% - 290px)); right: max(0px, calc(50% - 290px)); }
}
/* short phones: more map — the sheet rests at just its tabs and chips, and the action bar folds into one "+" */
@media (max-width: 699.98px) and (max-height: 700px) and (orientation: portrait) {
  .stage { --peek: 118px; }
  .hk-more { display: grid; }
  .hotbar { left: var(--gap); right: auto; margin: 0; bottom: calc(var(--peek) + env(safe-area-inset-bottom) + var(--gap) + 6px); flex-direction: column-reverse; align-items: stretch; }
  .hotbar:not(.is-open) .hk { display: none; }
  .hotbar.is-open .hk { width: auto; height: 46px; flex: none; grid-auto-flow: column; justify-content: start; align-content: center; gap: 10px; padding: 0 18px 0 13px; font-size: var(--fs-m); }
  .map-ctrls { bottom: calc(var(--peek) + env(safe-area-inset-bottom) + var(--gap) + 6px); }
  .leaflet-bottom.leaflet-right { bottom: calc(var(--peek) + env(safe-area-inset-bottom)); }
}

/* small phones (320–374px) */
@media (max-width: 374.98px) {
  .join-btn { width: 44px; padding: 0; }
  .join-btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .join-btn > .lucide { display: block; width: 18px; height: 18px; }
  .place-txt b { font-size: var(--fs-m); }
  .wxh-cond { display: none; }
  .hk { height: 50px; font-size: var(--fs-xs); }
}

/* phone on its side: the For you panel on the left, the map on the right */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023.98px) {
  .stage { --gap: 8px; --bar-h: 44px; --panel-w: min(45vw, 360px); --hud-top: calc(var(--gap) + var(--bar-h)); }
  .feed { top: var(--gap); bottom: var(--gap); left: calc(var(--gap) + env(safe-area-inset-left)); right: auto; width: var(--panel-w); height: auto !important; border-radius: var(--r-l); padding-bottom: 0; }
  /* not a sheet here: tabs and a hide button on top, no handle */
  .sheet-grip { touch-action: auto; grid-template-areas: "tabs min" "chips sort"; }
  .sheet-top { display: none; }
  .panel-min { display: grid; width: 44px; height: 44px; margin: 6px 6px 0 0; }
  .feed-tabs { padding: 6px 2px 0 6px; }
  /* hidden: a chip in the bottom corner, and the top bar and weather slide back to the left edge */
  .feed[data-sheet="collapsed"] { top: auto; bottom: var(--gap); width: auto; height: auto !important; container-type: normal; border-radius: var(--r-l); }
  .feed[data-sheet="collapsed"] > :not(.feed-restore) { display: none !important; }
  .feed[data-sheet="collapsed"] .feed-restore { display: flex; }
  .feed .det-sum { display: none !important; }
  .feed .det-scroll { display: block !important; }
  .topbar { top: var(--gap); left: calc(var(--panel-w) + var(--gap) * 2 + env(safe-area-inset-left)); right: calc(var(--gap) + env(safe-area-inset-right)); height: var(--bar-h); transition: left .3s var(--ease); }
  .place-txt small, .search-ph, .search-pill kbd { display: none; }
  .search-pill { flex: 0 0 auto; width: 44px; min-width: 0; max-width: 44px; margin: 0 0 0 auto; padding: 0; justify-content: center; background: none; box-shadow: none; }
  .hud-left { top: calc(var(--gap) * 2 + var(--bar-h)); left: calc(var(--panel-w) + var(--gap) * 2 + env(safe-area-inset-left)); transition: left .3s var(--ease); }
  .stage[data-sheet="collapsed"] .topbar, .stage[data-sheet="collapsed"] .hud-left { left: calc(var(--gap) + env(safe-area-inset-left)); }
  .hud-wx { padding: 2px 10px 2px 2px; }
  .wxh-icon { width: 30px; height: 30px; }
  .wxh-temp { font-size: var(--fs-xl); font-weight: 600; }
  .wxh-now small { display: none; }
  .hotbar { left: auto; right: calc(var(--gap) + env(safe-area-inset-right)); bottom: var(--gap); transform: none !important; padding: 4px; gap: 4px; opacity: 1 !important; pointer-events: auto !important; }
  .hk { width: 54px; height: 44px; font-size: var(--fs-xs); gap: 2px; }
  .hk .lucide { width: 18px; height: 18px; }
  .map-ctrls, .stage[data-sheet] .map-ctrls { right: calc(var(--gap) + env(safe-area-inset-right)); bottom: calc(var(--gap) + 58px); opacity: 1 !important; pointer-events: auto !important; }
  .ctl-zoom { display: none; }
  .explore-here { top: calc(var(--gap) * 2 + var(--bar-h)); left: auto; right: calc(var(--gap) + env(safe-area-inset-right)); margin: 0; transform: none; }
  .map-key { left: calc(var(--panel-w) + var(--gap) * 2); right: auto; bottom: var(--gap); max-height: calc(100% - var(--gap) * 2); }
  .stage[data-sheet="collapsed"] .map-key { left: var(--gap); bottom: calc(var(--gap) + 52px); }
  .menu.notes { left: 0; right: 0; width: auto; }
  .forecast { position: fixed; inset: 0; z-index: 60; width: auto; max-height: none; border-radius: 0; }
  .leaflet-bottom.leaflet-right { bottom: 0; }
}

/* bigger touch targets where fingers are the pointer (44px or more) */
@media (pointer: coarse) {
  .react { height: 34px; padding: 0 11px; }
  .icon-btn.sm { width: 38px; height: 38px; }
  .menu button, .notes-head button { height: 44px; }
  .social-tabs [role="tab"] { height: 44px; }
  .feed-tabs [role="tab"] { height: 44px; }
  .explore-here { height: 44px; }
  .panel-min { width: 44px; height: 44px; }
}

/* ---- v8 map: new rules for this workstream go directly below ---- */
/* the key mostly sits over the For you list (placeKey() in map.js): solid, so the list's text doesn't show through */
.map-key { background: var(--card); }
/* offline, the offline banner is the only message: no "Map unavailable" on top of it */
html.is-offline .map-down { display: none; }
/* phones (both ways up) and iPads held upright: a small © in the top-right corner that opens the credits on tap
   (a 44px target; markers' titles keep off it); the key spells them out too */
@media (max-width: 1023.98px) {
  #map .leaflet-bottom.leaflet-right { top: calc(var(--hud-top) + 8px); bottom: auto; right: calc(var(--gap) + env(safe-area-inset-right)); }
  .stage:has(#explore-here:not([hidden])) #map .leaflet-bottom.leaflet-right { top: calc(var(--hud-top) + 54px); }
  #map .leaflet-control-attribution {
    position: relative; display: grid; place-items: center; min-width: 32px; height: 32px; margin: 0; padding: 0 !important; border-radius: var(--r-m);
    font-size: 0 !important; color: var(--text-3) !important; background: color-mix(in srgb, var(--card) 72%, transparent) !important; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer;
  }
  #map .leaflet-control-attribution::before { content: "©"; font: 600 var(--fs-s)/1 var(--font); }
  #map .leaflet-control-attribution::after { content: ""; position: absolute; inset: -6px; }
  #map .leaflet-control-attribution:not(.is-open) a { visibility: hidden; }
  /* open, it drops below the weather chip that shares its row */
  #map .leaflet-control-attribution.is-open { display: block; height: auto; max-width: min(300px, calc(100vw - 32px)); margin-top: 46px; padding: 7px 10px !important; border-radius: var(--r-m); font-size: var(--fs-xs) !important; line-height: 1.45; cursor: auto; background: var(--card) !important; }
  #map .leaflet-control-attribution.is-open::before, #map .leaflet-control-attribution.is-open::after { display: none; }
}
/* phone on its side: the key beside its buttons, two columns */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023.98px) {
  .map-key { width: 352px; padding-top: 8px; }
  .key-grid li { min-height: 38px; }
}
/* phone: the key is a short strip over the resting For you sheet (two rows you swipe sideways), so the markers and
   the action bar above it stay in view to compare */
@media (max-width: 699.98px) {
  .map-key { bottom: calc(var(--gap) + env(safe-area-inset-bottom)); max-height: none; overflow: hidden; padding: 8px 0 4px; }
  .key-head { padding: 0 10px; }
  .key-grid {
    grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 150px; gap: 0 6px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding: 0 10px; padding: 0 10px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .key-grid::-webkit-scrollbar { display: none; }
  .key-grid li { scroll-snap-align: start; }
  .key-switch { width: calc(100% - 20px); min-height: 40px; margin: 2px 10px 0; padding: 4px 2px; }
  .key-foot { display: none; } /* the © button in the corner has the credits */
  .key-grid li { gap: 4px; min-height: 40px; }
  .key-mk { width: 50px; }
  .key-txt b { font-size: var(--fs-s); }
  .key-txt small { font-size: var(--fs-xs); }
  .key-mk .shape-tag { scale: .66; }
  .key-intro { display: none; }
}
@media (max-width: 374.98px) {
  .key-mk { width: 46px; }
  .key-mk .mk { scale: .92; }
  .key-mk .shape-tag { scale: .62; }
}

/* ---- v8 shell: new rules for this workstream go directly below ---- */
/* the weather card's fold button only exists where the card is big (laptop and desktop) */
.wx-size { display: none; }
/* search: keys to use with a keyboard and mouse; a plain Cancel on touch screens */
.pal-cancel { display: none; flex-shrink: 0; height: 44px; padding: 0 2px 0 8px; font-size: var(--fs-l); font-weight: 560; color: var(--brand-2); }
.palette-foot { display: none; align-items: center; gap: 16px; flex-shrink: 0; padding: 9px 16px; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--text-3); }
.palette-foot > span { display: inline-flex; align-items: center; gap: 4px; }
.palette-foot kbd { min-width: 20px; padding: 3px 5px; text-align: center; box-shadow: inset 0 -1px 0 var(--line-2); }
.palette-foot kbd + span { margin-left: 3px; }
@media (hover: hover) and (pointer: fine) { .palette-foot { display: flex; } }
@media (pointer: coarse) {
  .search-pill kbd, .pal-esc { display: none; }
  .pal-cancel { display: block; }
}
/* a message resting on the top bar gets an edge, so it reads as its own thing */
.toasts[data-at="top"] .toast { box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-2); }
/* the item's Previous / Next show their keys (K / J) in a corner inside the button, like the action bar's numbers */
@media (hover: hover) and (pointer: fine) {
  .icon-btn[data-step]::after { position: absolute; right: 3px; bottom: 3px; min-width: 14px; height: 14px; padding: 0 2px; border-radius: var(--r-xs); font: 650 10px/14px var(--mono); text-align: center; color: var(--text-2); background: var(--card-3); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28); pointer-events: none; }
  .det-step .icon-btn[data-step] { width: 44px; } /* room beside the arrow for its key */
  .icon-btn[data-step="-1"]::after { content: "K"; }
  .icon-btn[data-step="1"]::after { content: "J"; }
}

/* ---- v8 item: new rules for this workstream go directly below ---- */
/* "Live" has one look everywhere: a small tag with a pulsing dot, in the events colour (only events go live;
   red stays for safety alerts and errors) */
:root { --c-live: var(--c-events); }
.live-tag {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 6px; border-radius: var(--r-s); flex-shrink: 0;
  font: 700 var(--fs-xs)/1 var(--font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: middle;
  color: var(--c-live); background: color-mix(in srgb, var(--c-live) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-live) 38%, transparent);
}
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: livePulse 1.8s var(--ease) infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-live) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 5px transparent; } }
.is-offline .live-tag::before { animation: none; }
.det-kind .live-tag { margin-left: 2px; }

/* list rows: a claimed deal shows its code on the right; countdowns never wrap */
.row-main small [data-ends], .row-code { white-space: nowrap; }
.row-code { display: inline-flex; align-items: center; gap: 4px; max-width: 120px; padding: 5px 7px; border-radius: var(--r-s); font: 650 var(--fs-xs)/1 var(--mono); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.row-end:has(.row-code) { max-width: 130px; }
.row-code .lucide { width: 13px; height: 13px; }
.row-end .live-tag { margin-top: 1px; }
.row-main b { text-wrap: pretty; } /* no lone "km" on a second line */

/* "2 new · Show": new arrivals wait here instead of pushing the rows down */
.feed-new { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; height: 0; overflow: visible; padding: 0; pointer-events: none; }
.feed-new button { top: 6px; } /* it floats over the rows (no height of its own), so they never move when it comes or goes */
.feed-new button {
  position: relative; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px;
  font-size: var(--fs-s); font-weight: 600; color: #fff; background: var(--brand); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 80%, transparent);
  animation: newPillIn .4s var(--spring);
}
.feed-new button::before { content: ""; position: absolute; inset: -5px -2px; } /* a 44px tall target */
.feed-new button .lucide { width: 15px; height: 15px; }
.feed-new b { font-weight: 700; }
.feed-new b::before { content: "·"; margin-right: 6px; opacity: .7; }
.feed-new button:hover { background: color-mix(in srgb, var(--brand) 86%, white); }
@keyframes newPillIn { from { opacity: 0; transform: translateY(-8px) scale(.9); } }

/* empty list: the reason, then what fixes it; a kind with nothing in it looks quiet */
.empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
/* empty: a dashed outline and a grey icon (hidden-by-you chips have a solid one), so "nothing here" never looks like "off" */
.fchip.is-empty:not(.is-on) { color: var(--text-3); background: transparent; box-shadow: none; outline: 1px dashed var(--line-2); outline-offset: -1px; }
.fchip.is-empty:not(.is-on) > .lucide { color: var(--text-3); }
.fchip.is-empty:not(.is-on):focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.fchip.is-empty b { opacity: .7; }

/* the item: title first, then the facts you'd decide on */
.det-back { flex-shrink: 0; }
.det-step { display: flex; align-items: center; flex-shrink: 0; margin-left: 8px; }
.det-step .icon-btn:disabled { opacity: .3; cursor: default; background: none; transform: none; }
.det-kicker { display: flex; align-items: center; gap: 6px; margin-bottom: -6px; font: 650 var(--fs-xs)/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--c); }
.det-kicker .lucide { width: 14px; height: 14px; }
.det-photo { height: 200px; background: var(--card-2); }
.det-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* two or four tiles; an odd one out takes the whole row */
.det-facts > span:last-child:nth-child(odd) { grid-column: 1 / -1; }
.det-facts b.is-soon { color: var(--c); }
.det-facts .nowrap { white-space: nowrap; }
.det-text p:first-child { font-size: var(--fs-l); font-weight: 560; line-height: 1.55; color: var(--text); }
.det-route span:last-child { color: var(--text-2); font-size: var(--fs-s); }

/* a claimed deal: the code, the shop and the time left, for as long as the deal runs */
.coupon {
  display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-l);
  border: 1.5px dashed color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--card-2));
}
/* only right after claiming, and small enough to stay inside the panel */
.coupon.is-new { animation: couponIn .45s var(--spring); }
@keyframes couponIn { 40% { transform: scale(1.03); } }
.coupon-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coupon-label { display: inline-flex; align-items: center; gap: 6px; font: 650 var(--fs-xs)/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.coupon-label .lucide { width: 15px; height: 15px; }
.coupon-left { font-size: var(--fs-s); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.coupon-code { font: 700 var(--fs-2xl)/1.1 var(--mono); letter-spacing: .08em; color: var(--text); user-select: all; -webkit-user-select: all; }
.coupon small { font-size: var(--fs-s); line-height: 1.4; color: var(--text-3); }
.btn-kind.is-coupon { color: var(--text); background: color-mix(in srgb, var(--c) 12%, var(--card-2)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); }
.btn-kind.is-coupon:hover { background: color-mix(in srgb, var(--c) 20%, var(--card-2)); }
.btn-kind.is-coupon .lucide { color: var(--c); }
.btn-kind.is-coupon b { font-family: var(--mono); letter-spacing: .05em; }

/* a post's thread */
.det-thread { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.det-thread:focus { outline: 0; }
.det-reply { display: flex; gap: 10px; }
.det-reply > div { display: grid; gap: 2px; min-width: 0; font-size: var(--fs-m); line-height: 1.45; color: var(--text-2); }
.det-reply p:first-child { display: flex; align-items: baseline; gap: 8px; }
.det-reply b { font-size: var(--fs-m); font-weight: 650; color: var(--text); }
.det-reply time { font-size: var(--fs-s); color: var(--text-3); }
.det-thread-more { font-size: var(--fs-s); color: var(--text-3); }

/* the card over the map: one clear way in ("Details", a tap or a swipe up), and it's as tall as what's on it */
.det-more { display: none; }
.det-cta .det-more { flex: 0 0 auto; padding: 0 14px 0 12px; }
@keyframes sumIn { from { transform: translateX(var(--from, 30px)); opacity: 0; } }
.det-sum.in-right { --from: 30px; animation: sumIn .22s var(--ease); }
.det-sum.in-left { --from: -30px; animation: sumIn .22s var(--ease); }
@media (max-width: 1023.98px) {
  .feed[data-sheet="card"] .det-wrap, .feed[data-sheet="card"] .det-sum { touch-action: none; } /* the card's gestures are ours */
  .feed[data-sheet="card"] .det-sum { cursor: pointer; }
  .feed[data-sheet="card"] .det-cta .icon-btn { display: none; }
  .feed[data-sheet="card"] .det-more { display: inline-flex; }
  .feed[data-sheet="card"] .sheet-handle span { width: 44px; background: var(--text-3); opacity: .7; }
}

/* laptops and desktops: the item panel ends where the item ends (no empty band above the button) */
@media (min-width: 1024px) {
  .feed.is-detail { bottom: auto; max-height: calc(100% - var(--hud-top) - var(--gap)); }
  .feed.is-detail .feed-detail, .feed.is-detail .det-wrap, .feed.is-detail .det-scroll { flex: 0 1 auto; }
}

/* a phone on its side: little height, so a tighter item with the facts right under the title */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023.98px) {
  .det-body { gap: 10px; padding: 12px 14px 16px; }
  .det-title { font-size: var(--fs-l); line-height: 1.3; }
  .det-quote { font-size: var(--fs-l); }
  .det-kicker { margin-bottom: -4px; }
  .det-price { font-size: var(--fs-xl); }
  .det-facts { gap: 6px; }
  .det-facts > span { gap: 3px; padding: 7px 10px; border-radius: var(--r-m); }
  .det-facts b { font-size: var(--fs-m); }
  .det-photo { height: 120px; }
  .det-cta { padding: 8px 10px; }
}
/*  */
/*  */

/* ---- v8 chat: new rules for this workstream go directly below ---- */
/* Ask: your questions on the right in a tinted bubble, answers on the left; the time once per stretch */
.ask-chat { display: flex; flex-direction: column; gap: 6px; min-height: 100%; justify-content: flex-end; }
.ask-clear { align-self: center; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; margin-bottom: auto; border-radius: 999px; font-size: var(--fs-s); font-weight: 560; color: var(--text-3); }
.ask-clear:hover { color: var(--text); background: var(--hover); }
.ask-clear .lucide { width: 13px; height: 13px; }
.ask-time { align-self: center; margin: 10px 0 2px; font-size: var(--fs-xs); font-weight: 560; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bubble-me {
  align-self: flex-end; max-width: 82%; padding: 8px 13px; border-radius: 18px 18px 6px 18px; font-size: var(--fs-m); line-height: 1.45;
  overflow-wrap: anywhere; color: var(--text); background: color-mix(in srgb, var(--brand) 24%, var(--card-2));
}
.bubble-me.is-new { animation: msgIn .35s var(--ease); }
.bot-msg { padding: 4px 8px; }
.bot-msg:hover { background: none; }
.bot-msg .ava { --s: 30px; }
.bot-msg .ava .lucide { width: 15px; height: 15px; }
.bot-msg .msg-body > p { padding-top: 5px; }
.ask-act { width: fit-content; max-width: 100%; margin-top: 8px; color: var(--on-c); background: var(--fill, var(--c)); }
.ask-act:hover { background: color-mix(in srgb, var(--fill, var(--c)) 86%, white); }
.ask-sugs-in { gap: 6px; margin-top: 8px; }
.ask-sugs-in .chip, .ask-sugs .chip { height: 30px; padding: 0 11px; font-size: var(--fs-s); flex-shrink: 0; }
/* questions to try, above the input: one row that scrolls sideways */
.ask-sugs-slot:empty { display: none; }
.ask-sugs { display: flex; gap: 6px; margin: 0 -10px 8px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.ask-sugs::-webkit-scrollbar { display: none; }
.ask-sugs .chip .lucide { width: 14px; height: 14px; color: var(--brand-2); }

/* Town square: sort, your own posts, your replies, labelled buttons */
.sq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 6px; font-size: var(--fs-s); font-weight: 560; color: var(--text-3); }
.sq-list .msg { padding: 10px 8px; }
.sq-list .msg:focus { outline: 0; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand-2) 55%, transparent); }
.sq-list .msg.is-mine { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.you-ava { color: #fff; background: linear-gradient(140deg, #8F7CFF, #6A5CFF 55%, #C06BFF); }
.you-ava .lucide { width: 16px; height: 16px; }
.sq-replies { display: grid; gap: 4px; margin: 4px 0 2px; padding-left: 10px; border-left: 2px solid var(--line-2); }
.sq-replies li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font-size: var(--fs-s); line-height: 1.4; color: var(--text-2); }
.sq-replies b { font-weight: 640; color: var(--text); }
.sq-replies time { font-size: var(--fs-xs); color: var(--text-3); }
.reacts .react > span:empty { display: none; }

/* People: a full-width note with "Make me visible", and what the green dot means */
.ppl-note { display: grid; gap: 10px; padding: 12px; margin-bottom: 8px; border-radius: var(--r-m); background: var(--card-2); }
.ppl-note p { display: flex; align-items: flex-start; gap: 9px; font-size: var(--fs-s); line-height: 1.45; color: var(--text-2); }
.ppl-note p .lucide { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; color: var(--text-3); }
.ppl-note-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ppl-note .btn { color: var(--brand-2); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.ppl-note .btn:hover { background: color-mix(in srgb, var(--brand) 26%, transparent); }
:root[data-theme="light"] .ppl-note .btn { background: color-mix(in srgb, var(--brand) 9%, var(--card)); }
.online-key { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--text-3); }
.mem-none { padding: 20px 4px; font-size: var(--fs-s); color: var(--text-3); text-align: center; }
.mem-blocked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mem-blocked .label { width: 100%; }
.blk { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 9px; border-radius: 999px; font-size: var(--fs-s); color: var(--text-2); background: var(--card-2); }
.blk .lucide { width: 13px; height: 13px; color: var(--text-3); }
.blk button { height: 24px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-s); font-weight: 600; color: var(--brand-2); }
.blk button:hover { background: var(--hover); }
.modal-menu .person-head .ava { --s: 40px; }
.person-head > div { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.person-head small { font-size: var(--fs-s); color: var(--text-3); }
.modal-menu .rows { padding-top: 6px; }
.modal-menu .rows .row > .lucide { color: var(--text-2); }

/* Accounts aren't here yet: say so, and what works without one */
.soon-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin-bottom: 10px; border-radius: 999px; font-size: var(--fs-s); font-weight: 620; color: var(--brand-2); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.soon-tag .lucide { width: 13px; height: 13px; }
.soon-now { width: 100%; display: grid; gap: 8px; margin: 18px 0 16px; padding: 14px; border-radius: var(--r-l); text-align: left; background: var(--card-2); }
.soon-now b { font-size: var(--fs-s); font-weight: 640; }
.soon-now ul { display: grid; gap: 7px; }
.soon-now li { display: flex; align-items: center; gap: 9px; font-size: var(--fs-m); color: var(--text-2); }
.soon-now li .lucide { width: 16px; height: 16px; color: var(--brand-2); }
.soon-now small { font-size: var(--fs-s); color: var(--text-3); }

/* Forms: the fields scroll, the submit button stays in view */
.modal-layer { bottom: auto; top: var(--vv-top, 0px); height: var(--vv-h, 100%); }
.modal-form { display: flex; flex-direction: column; overflow: hidden; max-height: calc(var(--vv-h, 100dvh) - 32px); }
.modal-form .modal-head { flex-shrink: 0; padding-bottom: 10px; }
.modal-form .form { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 16px; }
.form-foot { flex-shrink: 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
/* long values shrink inside their box instead of widening the form */
.form .field { min-width: 0; grid-template-columns: minmax(0, 1fr); align-content: start; }
.form .input input, .form .input select { width: 100%; }
.field-pair { display: grid; gap: 14px; }
.field > legend em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-3); }
.field-hint, .field-err { display: flex; align-items: center; gap: 6px; font-size: var(--fs-s); line-height: 1.35; color: var(--text-3); }
.field-hint .lucide, .field-err .lucide { width: 14px; height: 14px; flex-shrink: 0; }
.field-err { font-weight: 560; color: var(--c-alert); }
.field.is-err .input, .field.is-err .stepper { box-shadow: 0 0 0 1.5px var(--c-alert); }
.field.is-err .pay span, .field.is-err .opt span { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c-alert) 70%, transparent); }
.field.is-err .check input[type="checkbox"] { outline: 2px solid var(--c-alert); outline-offset: 1px; }
.input-act { flex-shrink: 0; height: 30px; margin-right: -6px; padding: 0 10px; border-radius: var(--r-s); font-size: var(--fs-s); font-weight: 600; color: var(--accent, var(--brand-2)); background: color-mix(in srgb, var(--accent, var(--brand)) 13%, transparent); }
.input-act:hover { background: color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent); }
.form .input select { padding-right: 28px; text-overflow: ellipsis; }
.form .input select:invalid, .form .input select:has(option[value=""]:checked) { color: var(--text-3); }
.form .input > .lucide-chevron-down { margin-left: -34px; }
.cat-ico { display: grid; }
.sell-top { display: flex; align-items: flex-end; gap: 12px; }
.sell-top .field { flex: 1; min-width: 0; }
.price-row { align-items: start; }
.price-row .free-sw { margin-top: 24px; } /* level with the price box, even when an error shows under it */
.cur { flex-shrink: 0; min-width: 17px; font-weight: 600; font-size: var(--fs-m); color: var(--text-3); }
.input.is-off { opacity: .55; }
.free-sw { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 4px; font-size: var(--fs-m); font-weight: 560; cursor: pointer; }
.free-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.free-sw input:checked + .sw { background: var(--accent, var(--brand)); }
.free-sw input:checked + .sw::after { transform: translateX(14px); }
.free-sw input:focus-visible + .sw { outline: 2px solid var(--brand-2); outline-offset: 2px; }
/* small choices as pills: a listing's condition, a post's kind */
.cond-opts, .type-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: var(--fs-m); font-weight: 560; color: var(--text-2); background: var(--card-2); transition: background .15s, color .15s, box-shadow .15s; }
.opt span:hover { color: var(--text); background: var(--card-3); }
.opt .lucide { width: 14px; height: 14px; color: var(--c-people); }
.opt input:checked + span { color: var(--text); background: color-mix(in srgb, var(--accent, var(--brand)) 15%, var(--card-2)); box-shadow: inset 0 0 0 1.5px var(--accent, var(--brand)); }
.opt input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.modal-post { --accent: var(--c-people); }
.modal-post .btn-primary { color: var(--on-warm); background: var(--fill-people); }
.reply-to { display: grid; gap: 3px; margin: 0; padding: 10px 12px; border-radius: var(--r-m); font-size: var(--fs-m); line-height: 1.45; color: var(--text-2); background: var(--card-2); box-shadow: inset 3px 0 0 var(--c-people); }
.reply-to b { font-size: var(--fs-s); color: var(--text); }
.guest-note { display: flex; align-items: flex-start; gap: 7px; }
.guest-note .lucide { width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; }
@media (pointer: coarse) { .opt span { height: 40px; } }

/* your own thing, just posted: the card says it's live */
.mine-live { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--brand-2); }
.mine-live .lucide { width: 14px; height: 14px; }

/* phones: forms are sheets from the bottom, as tall as they need (and the keyboard allows) */
@media (max-width: 699.98px) {
  .modal-form { align-self: end; width: calc(100% + 32px); max-width: none; margin: 0 -16px -16px; border-radius: 22px 22px 0 0; max-height: calc(var(--vv-h, 100dvh) - env(safe-area-inset-top) - 12px); transform: translateY(24px); }
  .modal-layer.is-open .modal-form { transform: none; }
}
/* a phone on its side: full height, short fields side by side, the button always there */
@media (orientation: landscape) and (max-height: 500px) {
  .modal-layer:has(.modal-form) { padding: 8px; }
  .modal-form { width: min(640px, 100%); height: calc(var(--vv-h, 100dvh) - 16px); max-height: none; border-radius: var(--r-l); }
  .modal-form .modal-head { padding: 12px 16px 6px; }
  .modal-form .form { gap: 12px; padding: 8px 16px 14px; }
  .form-foot { padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
  .form-foot .btn-block { height: 40px; }
  #sell-form, #ride-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #sell-form > .sell-top, #sell-form > .fine, #ride-form > .field-pair, #ride-form > fieldset { grid-column: 1 / -1; }
  #sell-form > label.field:has(textarea) { grid-column: 2; grid-row: 3 / span 2; }
  #ride-form > .field:has(.check) { grid-column: 2; grid-row: 2; align-self: end; }
  #sell-form textarea { min-height: 96px; }
  .photo-pick { width: 64px; height: 64px; }
}
/* fingers: the chat's and the forms' small buttons answer to at least 44px, without looking bigger */
@media (pointer: coarse) {
  .hi-btn, .ppl-note .btn, .ask-act, .react, .sq-head .seg button, .ask-clear, .blk button, .input-act, .more-btn, .form-foot .btn, .opt span, .pay span, .chip[data-sug] { position: relative; }
  .hi-btn::after, .ppl-note .btn::after, .ask-act::after { content: ""; position: absolute; inset: -6px -2px; }
  .react::after { content: ""; position: absolute; inset: -5px -3px; }
  .sq-head .seg button::after { content: ""; position: absolute; inset: -10px 0; }
  .ask-clear::after, .input-act::after { content: ""; position: absolute; inset: -7px -2px; }
  .more-btn::after { content: ""; position: absolute; inset: -3px; }
  .form-foot .btn::after { content: ""; position: absolute; inset: -4px 0; } /* 40px tall in landscape */
  .opt span::after, .pay span::after { content: ""; position: absolute; inset: -2px; }
  .form .check { min-height: 44px; }
  /* suggestion chips: a little taller, rows a little apart, so neighbours never share a hit area */
  .chip[data-sug] { height: 36px; }
  .chip[data-sug]::after { content: ""; position: absolute; inset: -4px -3px; }
  .ask-empty .chips, .ask-sugs-in { gap: 8px 6px; }
  .ask-sugs { padding-block: 4px; margin-bottom: 4px; } /* the hit areas stay inside the sideways scroller */
  .mem-blocked { row-gap: 10px; }
  .blk { height: 36px; }
  .blk button { height: 30px; }
  .blk button::after { content: ""; position: absolute; inset: -7px -2px; }
}

/* ---- v8 places: new rules for this workstream go directly below ---- */
/* the name always fits; the region and "approx." show only when there's room (otherwise they wrap out of sight) */
.place-txt { flex-wrap: wrap; height: 22px; overflow: hidden; row-gap: 10px; }
.place-txt b { line-height: 22px; }

/* the live dot by the place name pulses only while live data is arriving */
.place-btn:not([data-live="on"]) .live-dot::after { animation: none; opacity: 0; }
.place-btn[data-live="wait"] .live-dot { background: color-mix(in srgb, var(--c-brand) 40%, var(--text-3)); }
.place-btn[data-live="off"] .live-dot { background: var(--text-3); }

/* first visit: the splash becomes a blurred map behind the questions */
.splash > * { transition: opacity .3s var(--ease); }
.splash.is-glass { background: color-mix(in srgb, var(--bg) 38%, transparent); backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); }
.splash.is-asking > * { opacity: 0; }
.splash.is-asking ~ .modal-layer .modal-scrim { background: color-mix(in srgb, var(--bg) 20%, transparent); }

/* the welcome: what MinBy is, that it's sample content, and the location question */
.modal-welcome { width: min(420px, 100%); }
.welcome { display: grid; gap: 14px; padding: 22px 24px 14px; }
.welcome-brand { display: flex; align-items: center; gap: 9px; font: 680 var(--fs-l)/1 var(--font); letter-spacing: -.01em; }
.welcome-brand svg { width: 30px; height: 30px; }
.welcome h2 { font-size: var(--fs-xl); font-weight: 650; line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.welcome h2:focus, .explore-head h2:focus { outline: none; }
.welcome-list { display: grid; gap: 10px; }
.welcome-list li { display: flex; align-items: center; gap: 12px; }
.welcome-list .lucide { width: 36px; height: 36px; padding: 9px; border-radius: var(--r-m); color: var(--brand-2); background: color-mix(in srgb, var(--brand) var(--tint), var(--card-2)); }
.welcome-list span { display: grid; font-size: var(--fs-s); line-height: 1.35; color: var(--text-3); }
.welcome-list b { font-size: var(--fs-m); font-weight: 600; color: var(--text); }
.welcome-sample { display: flex; align-items: center; gap: 8px; font-size: var(--fs-s); line-height: 1.4; color: var(--text-3); }
.welcome-pill { flex-shrink: 0; padding: 4px 8px; border-radius: 999px; font: 650 var(--fs-xs)/1 var(--font); letter-spacing: .02em; color: var(--text-2); background: var(--card-3); }
.welcome-ask { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.welcome-ask h3 { font-size: var(--fs-l); font-weight: 640; letter-spacing: -.01em; }
.welcome-ask > p { font-size: var(--fs-m); line-height: 1.45; color: var(--text-2); }
.welcome-btns { display: grid; gap: 8px; margin-top: 10px; }
.consent-more summary { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--fs-s); color: var(--text-3); cursor: pointer; list-style: none; }
.consent-more summary::-webkit-details-marker { display: none; }
.consent-more summary:hover { color: var(--text-2); }
.consent-more summary .lucide { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.consent-more[open] summary .lucide { transform: rotate(90deg); }
.consent-more ul { display: grid; gap: 6px; padding: 0 0 6px 18px; list-style: disc; font-size: var(--fs-s); line-height: 1.45; color: var(--text-3); }
@media (max-height: 700px) {
  .welcome { gap: 11px; padding-top: 18px; }
  .welcome h2 { font-size: var(--fs-xl); }
  .welcome-list .lucide { width: 32px; height: 32px; padding: 7px; }
}
/* phone on its side: what MinBy is on the left, the question beside it, nothing to scroll */
@media (max-height: 500px) and (min-width: 560px) {
  .modal-welcome { width: min(780px, 100%); }
  .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; align-items: start; padding: 16px 22px 10px; }
  .welcome > * { grid-column: 1; }
  .welcome .welcome-ask { grid-column: 2; grid-row: 1 / 5; padding: 2px 0 0 24px; border-top: 0; border-left: 1px solid var(--line-2); }
  .welcome-list { gap: 8px; }
}

/* "Where to?" stays pinned near the top, so the field never moves while results arrive */
.modal-explore { align-self: start; margin-top: min(9vh, 88px); }
@media (max-width: 699.98px), (max-height: 560px) { .modal-explore { margin-top: env(safe-area-inset-top); } }
.explore-lead { padding: 0 20px; font-size: var(--fs-m); line-height: 1.45; color: var(--text-2); }
.explore-idle { display: grid; gap: 16px; }
.explore-sec { display: grid; gap: 9px; }
.explore .chip { position: relative; height: 36px; }
.explore .chip::before { content: ""; position: absolute; inset: -4px 0; } /* 44px to tap */
.explore-status { min-height: 40px; }
.explore-status.is-error { flex-wrap: wrap; row-gap: 4px; }
.explore-status.is-error > span { flex: 1 1 220px; }
.explore-status .btn { position: relative; margin-left: 24px; }
.explore-status .btn::before { content: ""; position: absolute; inset: -3px 0; }
.explore-empty { display: grid; gap: 8px; padding: 6px 8px 2px; }
.explore-empty p { display: flex; align-items: center; gap: 8px; font-size: var(--fs-m); font-weight: 560; }
.explore-empty p .lucide { width: 17px; height: 17px; color: var(--text-3); }
.explore-empty small { font-size: var(--fs-s); color: var(--text-3); }
.explore-empty .chips { margin-top: 2px; }
.explore-locate .lucide { width: 16px; height: 16px; }

/* settings: label on the left, its control on the right (stacked on narrow phones) */
.settings { display: grid; gap: 2px; padding: 6px 12px 2px; }
.set-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 8px; min-height: 56px; padding: 6px 8px; }
.set-row > .lucide { width: 20px; height: 20px; color: var(--text-3); }
.set-label { font-size: var(--fs-m); font-weight: 560; }
.set-seg button { height: 34px; padding: 0 12px; }
.set-seg button::before { content: ""; position: absolute; inset: -5px -1px; } /* 44px to tap */
.set-select { position: relative; display: flex; align-items: center; }
.set-select select { width: 100%; min-width: 172px; height: 40px; padding: 0 36px 0 12px; border: 0; border-radius: var(--r-m); font-size: var(--fs-m); background: var(--card-2); appearance: none; -webkit-appearance: none; cursor: pointer; }
.set-select .lucide { position: absolute; right: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
@media (pointer: coarse) { .set-select select { height: 44px; } }
.rows.set-links { margin: 4px 12px 0; padding: 8px 0 10px; border-top: 1px solid var(--line); }
.set-links .row > .lucide-chevron-right { width: 16px; height: 16px; }
@media (max-width: 479.98px) {
  .set-row { grid-template-columns: 20px minmax(0, 1fr); }
  .set-row > .seg, .set-row > .set-select { grid-column: 2; }
  .set-seg { display: flex; }
  .set-seg button { flex: 1; }
}

/* place badges: one letter gets a bigger glyph; an icon when there's no safe code */
.rail-place .is-one { font-size: var(--fs-l); }
.rail-place .lucide { width: 20px; height: 20px; }
.menu .m-dot .is-one { font-size: var(--fs-xs); }
.menu .m-dot .is-three { font-size: var(--fs-xs); letter-spacing: -.02em; }
.menu .m-dot .lucide { width: 13px; height: 13px; }
.menu .m-sub { margin-left: auto; font-size: var(--fs-s); font-weight: 500; color: var(--text-2); }
.menu-empty { padding: 2px 10px 8px; font-size: var(--fs-s); color: var(--text-3); }

/* phones, first visit: the For you sheet pulls up */
.swipe-hint {
  position: absolute; z-index: 35; left: var(--gap); bottom: var(--hint-bottom, 220px); max-width: calc(100% - var(--gap) * 2 - 56px);
  display: flex; align-items: center; gap: 8px; padding: 9px 15px 9px 11px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-size: var(--fs-m); font-weight: 600; color: #fff; background: var(--brand); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .55);
  animation: hintIn .5s var(--spring) both;
}
.swipe-hint .lucide { width: 17px; height: 17px; animation: hintUp 1.3s var(--ease) infinite; }
.swipe-hint.is-out { animation: hintOut .3s var(--ease) both; }
.feed.is-nudged { animation: sheetNudge 1.5s var(--ease) .4s 2; }
@keyframes hintIn { from { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes hintOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes hintUp { 50% { transform: translateY(-3px); } }
@keyframes sheetNudge { 0%, 70%, 100% { translate: 0 0; } 30% { translate: 0 -14px; } }

/* ---- v8 weather: new rules for this workstream go directly below ---- */
/* weather art: a fine outline on clouds (light mode only, where a pale cloud meets a pale card) */
.wi-cloud { stroke: var(--cloud-edge); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
:root[data-theme="light"] .wi-float.back { opacity: .85; }
/* the forecast's own tip stays; the short-screen rules above only mean to trim the card */
.fc-body .wx-tip { display: flex; }

/* the card shows rain once: the full card has its rain bar, the compact card its umbrella chip */
@media (min-width: 1280px) { .hud-wx .wxh-rain { display: none; } }
/* laptops and landscape iPads get the compact card too (the full one covered ~280×240 of map) */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .hud-left { width: auto; }
  .hud-wx { padding: 6px 14px 6px 6px; border-radius: var(--r-l); }
  .hud-wx .wxh-head, .hud-wx .wx-bars, .hud-wx .wx-tip, .hud-wx .wxh-go { display: none; }
  .wxh-main { width: auto; margin: 0; padding: 0; gap: 8px; }
  .wxh-icon { width: 40px; height: 40px; }
  .wxh-temp { font-size: var(--fs-2xl); font-weight: 400; }
  .wxh-now { line-height: 1.15; }
  .wxh-load { margin: 2px; }
}

/* iPad portrait: the forecast takes the room beside the For you card, above the map buttons and actions (hud.js fits it) */
@media (min-width: 700px) and (max-width: 1023.98px) {
  .forecast { width: min(400px, calc(100% - var(--gap) * 2), var(--fc-w, 100vw)); max-height: min(calc(100% - var(--hud-top) - var(--gap)), var(--fc-h, 100vh)); }
}

/* the weather failed: still chip-sized, one line and a Retry */
.wxh-fail { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 10px; font-size: var(--fs-s); font-weight: 580; color: var(--text-2); white-space: nowrap; }
.wxh-fail > .lucide { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3); }
.wxh-retry { position: relative; flex-shrink: 0; margin-left: auto; height: 30px; padding: 0 12px; border-radius: 999px; font-size: var(--fs-s); font-weight: 640; color: var(--c-weather); background: color-mix(in srgb, var(--c-weather) 14%, transparent); transition: background .15s; }
.wxh-retry::before { content: ""; position: absolute; inset: -7px -4px; }
.wxh-retry:hover { background: color-mix(in srgb, var(--c-weather) 24%, transparent); }
@media (max-width: 1279.98px) { .wxh-fail { margin: 0; padding-left: 6px; } }
@media (max-width: 699.98px) { .wxh-fail { min-height: 34px; gap: 7px; font-size: var(--fs-s); } .wxh-retry { height: 26px; padding: 0 10px; } .wxh-retry::before { inset: -9px -4px; } }

/* full screen on phones: a solid page, not the map showing through */
@media (max-width: 699.98px), (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023.98px) {
  .forecast { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* a phone on its side: now on the left (it stays put), the next hours and days scroll on the right */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023.98px) {
  .forecast { width: auto; max-height: none; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .fc-bar { padding-top: 6px; padding-bottom: 0; }
  .fc-body { padding-bottom: 14px; }
  .wx-full { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
  .wx-col-now { position: sticky; top: 0; }
  .wx-hero { gap: 14px; padding: 4px 0 10px; }
  .wx-hero .wx-icon { width: 62px; height: 62px; }
  .wx-temp { font-size: var(--fs-hero); }
  .wx-cond { font-size: var(--fs-l); margin-top: 4px; }
  .wx-hl { font-size: var(--fs-s); }
  .fc-body .wx-tip { margin-top: 0; padding: 7px 10px; }
  .wx-stats { margin: 8px 0 0; gap: 6px; }
  .wx-stat { padding: 6px 9px 7px; }
  .wx-stat dd { margin-top: 1px; font-size: var(--fs-m); }
  .wx-col-more { padding-top: 4px; }
}

/* offline: one calm banner with a Retry, under the top bar */
.net-banner {
  position: absolute; z-index: 30; top: calc(var(--hud-top) + 2px);
  left: calc(var(--hud-l) + (100% - var(--hud-l) - var(--hud-r)) / 2); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - var(--gap) * 2); padding: 6px 6px 6px 13px; border-radius: var(--r-l);
  background: var(--panel); box-shadow: var(--shadow-panel); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25);
  animation: pillIn .35s var(--spring);
}
.net-banner[hidden] { display: none; }
.net-banner > .lucide { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-2); }
.net-txt { display: grid; min-width: 0; line-height: 1.25; }
.net-txt b { font-size: var(--fs-m); font-weight: 650; }
.net-txt small { font-size: var(--fs-s); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-retry { position: relative; flex-shrink: 0; margin-left: auto; height: 34px; padding: 0 14px; border-radius: var(--r-m); font-size: var(--fs-s); font-weight: 640; color: #fff; background: var(--brand); transition: filter .15s; }
.net-retry::before { content: ""; position: absolute; inset: -5px -3px; }
.net-retry:hover { filter: brightness(1.1); }
.net-retry.is-busy { opacity: .65; cursor: progress; }
.net-retry.is-no { animation: nudge .4s var(--ease); }
@keyframes nudge { 20%, 60% { translate: -3px 0; } 40%, 80% { translate: 3px 0; } }
/* below desktop the top-left holds the weather card: the banner sits top-right of the map, like "Explore this area" */
@media (max-width: 1279.98px) { .net-banner { left: auto; right: calc(var(--hud-r) + var(--gap)); max-width: calc(100% - var(--hud-r) - 264px); transform: none; } }
/* phones: full width under the top bar; the weather chip steps down below it */
@media (max-width: 699.98px) {
  .net-banner { top: calc(var(--hud-top) + 8px); left: var(--gap); right: var(--gap); max-width: none; }
  html.is-offline .hud-left { translate: 0 54px; }
}
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023.98px) {
  .net-banner { top: calc(var(--gap) * 2 + var(--bar-h)); left: calc(var(--panel-w) + var(--gap) * 2 + env(safe-area-inset-left)); right: auto; max-width: calc(100% - var(--panel-w) - var(--gap) * 3 - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  html.is-offline .hud-left { translate: 0 54px; }
}
/* offline, nothing pretends to be live: grey "live" dot and markers, no pulsing, no exploring */
html.is-offline .live-dot { background: var(--text-3); }
html.is-offline .live-dot::after { display: none; }
html.is-offline .mk.is-live { filter: grayscale(1); opacity: .7; }
html.is-offline .mk.is-live .mk-dot { animation: none; }
html.is-offline .live-tag { filter: grayscale(1); opacity: .75; }
html.is-offline .explore-here { display: none; }
/* the map without its images: a quiet dotted ground under the markers instead of a flat grey void */
html.is-offline #map { background-image: radial-gradient(var(--line-2) 1.2px, transparent 1.6px); background-size: 18px 18px; }

/* ---- v8 style: new rules for this workstream go directly below ---- */
/* fingers: every control answers to at least 44px (invisible padding where it shouldn't look bigger),
   and neighbours never share a hit area */
@media (pointer: coarse) {
  .place-btn, .join-btn, .wxh-main, .search-pill, .det-where { position: relative; }
  .place-btn::before { content: ""; position: absolute; inset: -2px 0; }
  .join-btn::before { content: ""; position: absolute; inset: -6px 0; }
  .wxh-main::before { content: ""; position: absolute; inset: -5px 0; }
  .search-pill::before { content: ""; position: absolute; inset: -3px 0; }
  .det-where::before { content: ""; position: absolute; inset: -5px 0; }
  .icon-btn:not(.sm) { width: 44px; height: 44px; }
  .icon-btn.sm::before { content: ""; position: absolute; inset: -3px; }
  .det-bar { padding-block: 4px 3px; }
  .composer-send { width: 44px; height: 44px; margin-right: -4px; }
  .stepper button { width: 44px; }
  .seg-sm button { min-width: 44px; }
  .social-foot { padding-top: 6px; }
}
/* phone: the weather chip is a 44px button (its card clips anything drawn outside it) */
@media (max-width: 699.98px) { .wxh-main { min-height: 40px; } }
/* the chips' "more" arrow keeps clear of the sort button's target */
.chip-arrow.is-next { right: 10px; }
/* iPad: the card's top row (handle and size arrow) is a full 44px */
@media (min-width: 700px) and (max-width: 1023.98px) {
  .stage { --peek: 146px; }
  .sheet-top, .sheet-handle, .icon-btn.sheet-size { height: 44px; }
}
/* the key: the calendar tile is the tallest marker; a little smaller there so neighbours don't touch */
.key-mk .shape-cal { scale: .88; }
/* place badges in menus: room for a three-letter code at 11px */
.menu .m-dot, .menu .m-dot svg { width: 26px; height: 26px; }
.menu .m-dot .is-three { letter-spacing: -.04em; }
/*  */
/*  */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .wx-fx, .you::before, .you::after, .live-dot::after, .mk.is-active .mk-dot::after { display: none; }
}

/* ---- v8 fixes: rules from the re-audit fixes ---- */
/* your own item: Edit takes only its width, and "Cancel ride" / "Remove" is never cut to a vague "Cancel…" */
.det-cta .det-edit { flex: 0 0 auto; padding: 0 14px 0 12px; }
.det-cta .det-undo { flex: 1 0 auto; }
/* a picked chip with nothing in it still reads as empty: grey and dashed, with only a faint ring to say it's picked */
.fchip.is-empty.is-on { color: var(--text-3); background: transparent; box-shadow: none; outline: 1.5px dashed color-mix(in srgb, var(--c) 55%, var(--line-2)); outline-offset: -1.5px; }
.fchip.is-empty.is-on > .lucide { color: var(--text-3); }
/* the resting phone sheet hides the list's corner, so "Sample" sits beside the handle: the first thing seen says it's a demo */
@media (max-width: 699.98px) {
  .feed[data-sheet="peek"] .sheet-top::after { content: var(--sample, none); position: absolute; right: 14px; top: 50%; translate: 0 -50%; height: 16px; padding: 0 6px; border-radius: var(--r-xs); font: 700 10px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
}
.row-votes { display: inline-flex; align-items: center; gap: 3px; }
.row-votes .lucide { width: 15px; height: 15px; color: var(--text-3); }
/* laptops: the weather card is always compact, so its size arrow had nothing to do (and sat on the rain chip) */
@media (min-width: 1024px) and (max-width: 1279.98px) { .hud-wx .wx-size { display: none; } }
/* desktop, compact card: the rain chip is the card's rain (the full card has its bar), the arrow has its own room */
@media (min-width: 1280px) {
  .stage[data-wx="min"] .hud-wx .wxh-rain { display: inline-flex; }
  .stage[data-wx="min"] .hud-wx .wx-size { flex-shrink: 0; margin-left: 4px; }
  /* the forecast takes the whole left column: no slice of the chat card showing under it */
  .forecast { height: calc(100% - var(--hud-top) - var(--gap)); }
  .stage.is-fc-open .hud-left > .social { visibility: hidden; }
}
/* a menu opened over a panel: the panel under it steps back, so two panels never look stacked and misaligned */
@media (min-width: 700px) {
  .hud-wx { transition: opacity .18s var(--ease); }
  .feed > * { transition: opacity .18s var(--ease); }
  .stage:has(#place-menu:not([hidden])) .hud-wx { opacity: 0; pointer-events: none; }
  /* the list fades under the updates menu (the panel itself stays, so no half row peeks out below the menu) */
  .stage:has(#notes:not([hidden])) .feed > * { opacity: .12; }
}
/* markers drop in first; their titles follow once each head has landed (never a title pointing at nothing) */
.mk.is-drop .mk-label { animation: labelIn .25s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 28ms + .42s); }
@keyframes labelIn { from { opacity: 0; } }
/* far away, a post's speck can still be tapped (a small target, so it never steals a tap from a real marker) */
.mk.is-speck .mk-hit { pointer-events: auto !important; left: calc(var(--hx) - 11px); top: calc(var(--hy) - 11px); width: 22px; height: 22px; }
.you-vague .you.is-approx { display: none; }
/* a hovered marker's title is drawn over a neighbour's: that one steps aside while the hover lasts */
.mk.lbl-hush .mk-label { opacity: 0; }
/* the place names' tiles overlap by a hair too: at half-step zooms a name crossing two tiles stays whole */
.tiles-labels img.leaflet-tile { width: 256.5px !important; height: 256.5px !important; }
/* an empty list says why even in the resting phone sheet (its message starts at the top, not below the fold) */
@media (max-width: 699.98px) { .feed[data-sheet="peek"] .feed-list .empty { padding-top: 6px; } }
