/* MeteoStack: every weather model, one stack.
   Map-first chrome: dark glass over full-bleed maps.
   Type: Geist (display + UI) · Geist Mono (data) */

:root, [data-theme="storm"] {
  --bg: #0b0e14;
  --bg-2: #0f131b;
  --surface: #131821;
  --surface-2: #1a202b;
  --line: #262e3c;
  --line-soft: #1c2330;
  --text: #eef2f8;
  --muted: #98a3b6;
  --faint: #818b9b;
  --accent: #47c4ff;
  --accent-2: #ffb547;
  --accent-ink: #031420;
  --good: #4fe0a0;
  --warn: #ffc24a;
  --bad: #ff6378;
  --glow: 0 0 0 1px rgba(255,255,255,.04), 0 24px 60px -24px rgba(0,0,0,.7);
  --grad: radial-gradient(1100px 480px at 85% -12%, rgba(71,196,255,.10), transparent 60%), radial-gradient(800px 420px at -5% 10%, rgba(255,181,71,.05), transparent 60%);
  --rain-0: #1a2232;
  color-scheme: dark;
}
[data-theme="paper"] {
  --bg: #f4f1ea; --bg-2: #ece8de; --surface: #fffdf8; --surface-2: #f7f3ea;
  --line: #ddd6c6; --line-soft: #e8e2d4; --text: #18191d; --muted: #5d5a52; --faint: #696661;
  --accent: #1d4ed8; --accent-2: #c2410c; --accent-ink: #fff;
  --good: #15803d; --warn: #b45309; --bad: #b91c1c;
  --glow: 0 1px 0 rgba(0,0,0,.04), 0 12px 40px -18px rgba(40,30,10,.25);
  --grad: radial-gradient(1000px 400px at 0% 0%, rgba(29,78,216,.06), transparent 60%);
  --rain-0: #ebe6da;
  color-scheme: light;
}
[data-theme="monsoon"] {
  --bg: #04181a; --bg-2: #062124; --surface: #0a2a2d; --surface-2: #0f3539;
  --line: #17474c; --line-soft: #11393d; --text: #e3fbf5; --muted: #8fc2b8; --faint: #75a39b;
  --accent: #7cf5c8; --accent-2: #3fd0ff; --accent-ink: #032019;
  --good: #7cf5c8; --warn: #ffd166; --bad: #ff7b7b;
  --glow: 0 0 0 1px rgba(124,245,200,.15), 0 20px 60px -20px rgba(124,245,200,.25);
  --grad: radial-gradient(1200px 500px at 20% -20%, rgba(124,245,200,.12), transparent 60%), radial-gradient(800px 400px at 100% 10%, rgba(63,208,255,.10), transparent 60%);
  --rain-0: #0c3134;
  color-scheme: dark;
}
[data-theme="aurora"] {
  --bg: #0b0816; --bg-2: #110c22; --surface: #160f2c; --surface-2: #1e1638;
  --line: #2e2452; --line-soft: #241c43; --text: #f1ecff; --muted: #a99cd0; --faint: #8b81ac;
  --accent: #a6ff8f; --accent-2: #d17bff; --accent-ink: #0b1a05;
  --good: #a6ff8f; --warn: #ffd36b; --bad: #ff7aa8;
  --glow: 0 0 0 1px rgba(209,123,255,.2), 0 20px 70px -20px rgba(166,255,143,.25);
  --grad: radial-gradient(900px 420px at 0% 0%, rgba(166,255,143,.12), transparent 60%), radial-gradient(900px 500px at 100% 0%, rgba(209,123,255,.18), transparent 60%);
  --rain-0: #1d1636;
  color-scheme: dark;
}
[data-theme="petrichor"] {
  --bg: #17120f; --bg-2: #1d1713; --surface: #231c17; --surface-2: #2b231d;
  --line: #3d3128; --line-soft: #32281f; --text: #f3e9df; --muted: #bfa996; --faint: #9d8b79;
  --accent: #e8875a; --accent-2: #9fbf7a; --accent-ink: #1f0e05;
  --good: #9fbf7a; --warn: #e8b85a; --bad: #e85a5a;
  --glow: 0 0 0 1px rgba(232,135,90,.18), 0 20px 60px -20px rgba(232,135,90,.25);
  --grad: radial-gradient(1000px 420px at 10% -10%, rgba(232,135,90,.10), transparent 60%), radial-gradient(700px 400px at 100% 0%, rgba(159,191,122,.08), transparent 60%);
  --rain-0: #2b231d;
  color-scheme: dark;
}
[data-theme="terminal"] {
  --bg: #000; --bg-2: #050805; --surface: #070b07; --surface-2: #0c120c;
  --line: #163016; --line-soft: #0f220f; --text: #b8ffcc; --muted: #5fbf7a; --faint: #428d58;
  --accent: #39ff88; --accent-2: #ffe14d; --accent-ink: #001a08;
  --good: #39ff88; --warn: #ffe14d; --bad: #ff4d4d;
  --glow: 0 0 0 1px rgba(57,255,136,.25), 0 0 40px -10px rgba(57,255,136,.25);
  --grad: none;
  --rain-0: #0a160a;
  color-scheme: dark;
}
[data-theme="terminal"] body, [data-theme="terminal"] .display { font-family: var(--mono) !important; font-style: normal !important; }

:root {
  --display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --serif: var(--display);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 14px;
  --r-sm: 9px;
  --wrap: 1240px;
  --top-h: 56px;
  /* floating map chrome */
  --glass: color-mix(in srgb, var(--bg) 70%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg) 86%, transparent);
  --glass-line: color-mix(in srgb, var(--text) 10%, transparent);
  --glass-shadow: 0 10px 34px -10px rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.04) inset;
}
[data-theme="paper"] { --glass-shadow: 0 10px 30px -12px rgba(40,30,10,.3); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); background-image: var(--grad); background-repeat: no-repeat;
  color: var(--text); font: 15px/1.55 var(--sans); min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .5em; font-family: var(--display); font-weight: 700; letter-spacing: -.015em; word-spacing: .05em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; }
.display em, em.display, h1 em { font-style: normal; color: var(--accent); }
.mono, .num { font-family: var(--mono); font-feature-settings: "tnum" 1, "zero" 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(150%) blur(16px); -webkit-backdrop-filter: saturate(150%) blur(16px);
  background: var(--glass-strong);
  border-bottom: 1px solid var(--glass-line);
}
.top .wrap { display: flex; align-items: center; gap: 14px; height: var(--top-h); max-width: none; padding: 0 18px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 750 1.12rem var(--display); letter-spacing: -.035em; flex-shrink: 0; }
.brand svg { width: 26px; height: 26px; }
.brand b { font-weight: 750; }
.brand span { color: var(--muted); font-weight: 450; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a { text-decoration: none; color: var(--muted); padding: 7px 11px; border-radius: 9px; font-size: .9rem; font-weight: 500; position: relative; }
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav a:first-child { color: var(--text); }
.nav a:first-child::after { content: ""; position: absolute; right: 4px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.top .spacer { flex: 1; }
.tools { display: flex; align-items: center; gap: 6px; }

.btn, .chip, select.chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  height: 36px; padding: 0 12px; border-radius: 10px; font: 500 .88rem var(--sans);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover, .chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.lg { height: 46px; padding: 0 20px; font-size: .98rem; border-radius: 12px; }
.chip svg, .btn svg { width: 16px; height: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); gap: 2px; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--muted); height: 28px; padding: 0 10px; border-radius: 7px; font: 500 .85rem var(--sans); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

/* Search */
.search { position: relative; flex: 1; max-width: 420px; min-width: 0; }
.search input {
  width: 100%; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); padding: 0 70px 0 36px; font: 15px var(--sans); outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
kbd { font: 500 .72rem var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); background: var(--bg-2); }
.results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--glow); max-height: 360px; overflow: auto;
}
.results li a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; }
.results li a small { color: var(--muted); }
.results li[aria-selected="true"] a, .results li a:hover { background: var(--surface-2); color: var(--text); }
.search.hero-search { max-width: none; margin: 0; }
.search.hero-search input { height: 54px; font-size: 1.05rem; border-radius: 14px; padding-left: 48px; box-shadow: var(--glow); }
.search.hero-search > svg { left: 17px; width: 20px; height: 20px; }

/* Theme menu */
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--glow);
}
.menu-pop[hidden] { display: none; }
.menu-pop h4 { margin: 6px 8px 8px; font: 600 .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.swatch { appearance: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--bg-2); cursor: pointer; color: var(--text); font: 500 .74rem var(--sans); text-align: left; }
.swatch i { display: block; height: 26px; border-radius: 6px; margin-bottom: 5px; }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.menu-pop .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; }
.menu-pop a.lang { display: block; padding: 7px 8px; border-radius: 8px; text-decoration: none; font-size: .9rem; }
.menu-pop a.lang:hover, .menu-pop a.lang[aria-current] { background: var(--surface-2); }

/* ---------- Generic blocks ---------- */
main { display: block; }
section { margin: 0 0 44px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 20px; }
.kicker { font: 600 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: inline-flex; align-items: center; gap: 8px; }
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 4px 0 0; color: var(--muted); max-width: 640px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem var(--mono); padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.hi { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.mid { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill.lo { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 18px 0 8px; }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 6px; color: var(--faint); }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1em 0 1.5em; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 500; }
pre, code { font-family: var(--mono); font-size: .86rem; }
pre { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 14px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
pre code { background: none; padding: 0; }

/* ---------- Ads ---------- */
.ad { margin: 0 auto 36px; min-height: 120px; text-align: center; }
.ad-label { display: block; font: 500 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }

/* ---------- Home ---------- */
.hero { padding: 56px 0 36px; text-align: center; position: relative; }
.hero h1 { font: 800 clamp(2.4rem, 6vw, 4.6rem)/.98 var(--display); letter-spacing: -.03em; word-spacing: .04em; margin-bottom: 16px; }
.hero h1 em { color: var(--accent); }
.hero .sub { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.hero .actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.home-hero { padding: 0; text-align: left; margin-bottom: 40px; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px 48px; align-items: end; padding-top: 44px; padding-bottom: 26px; }
.home-hero .sub { margin: 0; max-width: 580px; }
.home-hero .actions { justify-content: flex-start; }
.hero-act .fav-row { justify-content: flex-start; }
.hero-map { padding: 0 12px; }
.hero-map .mapstack.compact { --mp-h: min(74svh, 780px); border-radius: 20px; }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; }
.hero-cap { margin: 0; color: var(--muted); font-size: .9rem; max-width: 620px; }
.hero-cap b { color: var(--text); font-weight: 600; }
.hero-cap a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.hero-foot .model-rail { margin: 0; justify-content: flex-end; max-width: 560px; }
.model-rail { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px auto 0; max-width: 820px; }
.model-rail a { display: inline-flex; align-items: center; gap: 7px; font: 500 .8rem var(--mono); padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line-soft); text-decoration: none; color: var(--muted); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.model-rail a:hover { color: var(--text); border-color: var(--line); }
.demo { margin-top: 8px; text-align: left; }
.demo-frame { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--glow); padding: 18px; overflow: hidden; }
.demo-frame .demo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.demo-frame .demo-head strong { font: 700 1.5rem var(--display); letter-spacing: -.03em; }
.why .card h3 { display: flex; gap: 10px; align-items: center; }
.why .card h3 span { font: 600 .75rem var(--mono); color: var(--accent); }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.city-grid a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); text-decoration: none; }
.city-grid a:hover { border-color: var(--accent); }
.city-grid a small { color: var(--faint); font: .72rem var(--mono); }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pair-grid a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--surface); text-decoration: none; font: 500 .9rem var(--mono); }
.pair-grid a:hover { border-color: var(--accent); }
.pair-grid a i { font-style: normal; color: var(--faint); }
.fav-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.fav-row:empty { display: none; }

/* ---------- City ---------- */
.city-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; padding: 6px 0 30px; align-items: start; }
.city-hero h1 { font: 800 clamp(2.3rem, 5.6vw, 4.2rem)/.98 var(--display); margin: 0 0 8px; letter-spacing: -.03em; color: var(--muted); }
.city-hero h1 em { font-style: normal; color: var(--text); }
.city-hero .where { color: var(--muted); font-size: .95rem; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.city-hero .lead { font-size: 1.06rem; line-height: 1.6; max-width: 640px; color: color-mix(in srgb, var(--text) 92%, var(--muted)); }
.city-hero .lead strong { color: var(--text); }
.city-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.now { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 20px; position: relative; overflow: hidden; }
.now .t { font: 300 clamp(3.4rem, 8vw, 5rem)/1 var(--mono); letter-spacing: -.05em; display: flex; align-items: start; gap: 6px; }
.now .t small { font-size: .35em; color: var(--muted); margin-top: .35em; letter-spacing: 0; }
.now .wx-big { width: 72px; height: 72px; position: absolute; right: 18px; top: 18px; color: var(--accent); }
.now .range { color: var(--muted); font: .85rem var(--mono); margin: 6px 0 16px; }
.now dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.now dt { font: 500 .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.now dd { margin: 2px 0 0; font: 500 .98rem var(--mono); }
.next-rain { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); display: flex; gap: 12px; align-items: center; font-size: .92rem; }
.next-rain svg { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }
.next-rain b { display: block; }

.conf-meter { display: flex; gap: 3px; align-items: end; height: 16px; }
.conf-meter i { width: 5px; border-radius: 2px; background: var(--line); }
.conf-meter i.on { background: currentColor; }

/* Stack strip */
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 16px; }
.panel-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stack-wrap { position: relative; }
.stack-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 6px; }
.stack-grid { display: grid; grid-template-columns: 112px minmax(0, 1fr); position: relative; }
.stack-labels { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.stack-label { height: 26px; display: flex; align-items: center; gap: 7px; font: 500 .78rem var(--mono); white-space: nowrap; padding-right: 8px; cursor: pointer; user-select: none; }
.stack-label.off { opacity: .35; }
.stack-label.cons { font-weight: 700; color: var(--accent); }
.stack-label .tag { font-size: .6rem; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.stack-svg { display: block; }
.stack-axis text, .chart text { font: 10px var(--mono); fill: var(--muted); }
.legend-scale { display: flex; align-items: center; gap: 8px; font: .72rem var(--mono); color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend-scale .bar { height: 8px; width: 180px; border-radius: 4px; }
.tip {
  position: fixed; z-index: 80; pointer-events: none; min-width: 170px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); box-shadow: var(--glow);
  backdrop-filter: blur(10px); font: .78rem var(--mono); display: none;
}
.tip b { display: block; font: 600 .8rem var(--sans); margin-bottom: 6px; }
.tip div { display: flex; justify-content: space-between; gap: 14px; line-height: 1.6; }
.tip div span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tip .c { color: var(--accent); font-weight: 700; }

/* Daily strata */
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 104px; }
.day.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.day .dn { font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.day .dd { font: .7rem var(--mono); color: var(--faint); margin-top: -6px; }
.day .wx { width: 36px; height: 36px; color: var(--accent); }
.day .hi { font: 600 1.1rem var(--mono); }
.day .lo { font: .9rem var(--mono); color: var(--muted); }
.day .beads { width: 100%; height: 86px; }
.day .rain { width: 100%; }
.day .rain .bar { height: 6px; border-radius: 3px; background: var(--rain-0); overflow: hidden; }
.day .rain .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4f9dff, #8a5cff); border-radius: 3px; }
.day .rain small { font: .72rem var(--mono); color: var(--muted); display: flex; justify-content: space-between; margin-top: 4px; }
.day .pill { font-size: .62rem; padding: 1px 6px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: var(--line-soft); }
.chart .band { opacity: .16; }
.chart .now-line { stroke: var(--accent); stroke-dasharray: 3 4; }
.chart .day-sep { stroke: var(--line-soft); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font: .76rem var(--mono); color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chart-legend span.off { opacity: .35; }

/* Model table */
.mtable-wrap { overflow-x: auto; }
.mtable { width: 100%; border-collapse: collapse; font: .85rem var(--mono); min-width: 640px; }
.mtable th, .mtable td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.mtable th:first-child, .mtable td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.mtable thead th { color: var(--muted); font-weight: 500; font-size: .74rem; }
.mtable tr.cons td { color: var(--accent); font-weight: 600; }
.mtable td.wet { color: #6fb2ff; }
.mtable td.na { color: var(--faint); }

.callout { border-left: 3px solid var(--warn); background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; }
details.faq { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 550; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font: 400 1.2rem var(--mono); color: var(--muted); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 10px 0 0; color: var(--muted); max-width: 760px; }

.embed-cta { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }

/* Pro */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: var(--surface); }
.plan.pro { border-color: var(--accent); box-shadow: var(--glow); }
.plan .price { font: 700 2.4rem var(--display); letter-spacing: -.03em; margin: 8px 0 16px; }
.plan .price small { font: 500 .95rem var(--sans); color: var(--muted); letter-spacing: 0; }
.plan .plan-note { margin: -8px 0 16px; font-size: .88rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.plan li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px dashed var(--line-soft); font-size: .94rem; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.plan li.no::before { content: "–"; color: var(--faint); }
.field { display: flex; gap: 8px; flex-wrap: wrap; }
.field input { flex: 1; min-width: 220px; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); padding: 0 14px; font: 15px var(--mono); }
.note { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; font-size: .92rem; }
.note.ok { background: color-mix(in srgb, var(--good) 14%, transparent); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); }
.note.err { background: color-mix(in srgb, var(--bad) 14%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }

/* Widget builder */
.builder { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.builder label { display: block; font: 500 .78rem var(--mono); color: var(--muted); margin: 14px 0 6px; letter-spacing: .04em; text-transform: uppercase; }
.builder select, .builder input[type=text] { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); padding: 0 10px; font: 14px var(--sans); }
.preview-box { border: 1px dashed var(--line); border-radius: 16px; padding: 24px; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--line-soft) 40%, transparent) 10px 11px); min-height: 300px; display: flex; justify-content: center; }

/* Footer */
.foot { border-top: 1px solid var(--line-soft); margin-top: 60px; padding: 40px 0 60px; color: var(--muted); font-size: .9rem; }
.foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.foot h2 { font: 600 .72rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 0 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 5px 0; }
.foot a { text-decoration: none; }
.foot .fine { margin-top: 30px; font-size: .8rem; color: var(--faint); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Rain ambience */
#rain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55; }
.top, main, .foot { position: relative; z-index: 1; }
.top { z-index: 40; }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line-soft), var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .city-hero { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .foot .cols { grid-template-columns: 1fr 1fr; }
  .embed-cta { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .top .wrap { gap: 8px; }
  .brand span, .brand b + span { display: none; }
  .search kbd { display: none; }
  .search input { padding-right: 12px; }
  .tools .hide-sm { display: none; }
  .stack-grid { grid-template-columns: 74px minmax(0, 1fr); }
  .stack-label .tag { display: none; }
  .now dl { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-top: 40px; }
  .panel { padding: 12px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #rain { display: none; }
}
@media print {
  .top, .ad, .foot, #rain, .embed-cta { display: none !important; }
}

/* Theme swatches */
.sw-storm { background: linear-gradient(135deg, #0a0f1c 50%, #5ee7ff 50%); }
.sw-paper { background: linear-gradient(135deg, #f4f1ea 50%, #1d4ed8 50%); }
.sw-monsoon { background: linear-gradient(135deg, #04181a 50%, #7cf5c8 50%); }
.sw-aurora { background: linear-gradient(135deg, #0b0816 50%, #d17bff 50%); }
.sw-petrichor { background: linear-gradient(135deg, #17120f 50%, #e8875a 50%); }
.sw-terminal { background: linear-gradient(135deg, #000 50%, #39ff88 50%); }
.city-hero > *, .builder > *, .grid > * { min-width: 0; }
@media (max-width: 640px) {
  .brand b { display: none; }
  .city-hero .where { font-size: .85rem; }
  .city-hero .where .mono { overflow-wrap: anywhere; }
}
.stack-label { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .stack-label { font-size: .7rem; gap: 5px; } }

/* ===================================================================== model maps */
:root, [data-theme="storm"] { --map-sea: #0f141c; --map-land: #1e2531; --map-coast: rgba(225,235,255,.55); --map-border: rgba(225,235,255,.25); --map-label: #f2f6ff; --map-halo: rgba(8,12,22,.85); --map-rainlabel: #8fd8ff; --map-isobar: rgba(255,255,255,.5); --map-light: 0; }
[data-theme="paper"] { --map-sea: #d9e2ea; --map-land: #f1ede4; --map-coast: rgba(40,40,50,.6); --map-border: rgba(40,40,50,.3); --map-label: #18191d; --map-halo: rgba(255,253,248,.92); --map-rainlabel: #1d4ed8; --map-isobar: rgba(30,30,40,.5); --map-light: 1; }
[data-theme="monsoon"] { --map-sea: #082427; --map-land: #133a3e; --map-coast: rgba(200,255,240,.5); --map-border: rgba(200,255,240,.22); --map-label: #ecfffa; --map-halo: rgba(3,20,22,.88); --map-rainlabel: #7cf5c8; }
[data-theme="aurora"] { --map-sea: #120d22; --map-land: #221a3c; --map-coast: rgba(235,225,255,.5); --map-border: rgba(235,225,255,.22); --map-label: #f6f2ff; --map-halo: rgba(11,8,22,.88); --map-rainlabel: #a6ff8f; }
[data-theme="petrichor"] { --map-sea: #1c1714; --map-land: #2e261f; --map-coast: rgba(255,235,215,.5); --map-border: rgba(255,235,215,.22); --map-label: #fbf2e9; --map-halo: rgba(23,18,15,.88); --map-rainlabel: #8fd0ff; }
[data-theme="terminal"] { --map-sea: #000; --map-land: #061206; --map-coast: rgba(57,255,136,.6); --map-border: rgba(57,255,136,.25); --map-label: #b8ffcc; --map-halo: rgba(0,0,0,.9); --map-rainlabel: #ffe14d; --map-isobar: rgba(57,255,136,.45); }

.maps-app { padding: 0; }
/* the map is the page: panels fill the viewport, every control floats over them on glass */
.mapstack { --mp-h: calc(100svh - var(--top-h)); --mp-top: 62px; position: relative; height: var(--mp-h); min-height: 480px; background: var(--map-sea); overflow: hidden; isolation: isolate; }
.mapstack.compact { --mp-h: 540px; min-height: 0; border-radius: 18px; border: 1px solid var(--line-soft); box-shadow: var(--glow); }
.mp-ui { display: contents; }
.mp-glass { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }

.mp-bar { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 6; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; }
.mp-bar > * { pointer-events: auto; }
.mp-models { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
.mp-chip { appearance: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 600 .84rem var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.mp-chip:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.mp-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--text) 11%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px var(--glass-line); }
.mp-chip .dot { width: 8px; height: 8px; }
.mp-chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent), 0 0 10px currentColor; }
.mp-chip[aria-pressed="false"] .dot { opacity: .4; }
.mp-chip svg { width: 15px; height: 15px; }
.mp-chip.agree[aria-pressed="true"] { color: var(--accent); }
.mp-tools { display: flex; align-items: center; gap: 6px; flex: none; pointer-events: none; }
.mp-tools > * { pointer-events: auto; }
.mp-tools .seg { height: 44px; padding: 4px; border-radius: 14px; align-items: center; }
.mp-tools .seg button { height: 34px; padding: 0 10px; border-radius: 10px; }
.mp-tools .seg svg { width: 17px; height: 17px; vertical-align: -3px; }
.mp-fly { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 5px 0 12px; border-radius: 14px; }
.mp-fly > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.mp-fly input { height: 34px; width: 190px; border: 0; background: transparent; color: var(--text); padding: 0 4px; font: .9rem var(--sans); outline: none; }
.mp-fly input::placeholder { color: var(--faint); }
.mp-fly button { appearance: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.mp-fly button:hover { color: var(--accent); }
.mp-fly button svg { width: 17px; height: 17px; }
.mp-fs { appearance: none; width: 44px; height: 44px; border-radius: 14px; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.mp-fs svg { width: 18px; height: 18px; }
.mp-fs:hover, .mp-fs[aria-pressed="true"] { color: var(--accent); }
.mapstack:fullscreen { --mp-h: 100vh; height: 100vh; border: 0; border-radius: 0; }
.mapstack.is-fs { position: fixed; inset: 0; z-index: 1000; --mp-h: 100svh; height: 100svh; min-height: 0; border: 0; border-radius: 0; }
html.mp-fs-lock, html.mp-fs-lock body { overflow: hidden; }

/* layer rail, right edge (icon over label) */
.mp-rail { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 16px; }
.mp-rail button { appearance: none; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 66px; padding: 9px 4px 7px; border-radius: 11px; font: 600 .64rem/1.15 var(--sans); letter-spacing: .01em; text-align: center; cursor: pointer; transition: background .15s, color .15s; }
.mp-rail button svg { width: 22px; height: 22px; flex: none; }
.mp-rail button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.mp-rail [data-layer][aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.mp-rail [data-toggle][aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.mp-rail hr { border: 0; height: 1px; background: var(--glass-line); margin: 4px 8px; }

.mp-stage { position: absolute; inset: 0; z-index: 0; display: grid; gap: 2px; background: color-mix(in srgb, var(--bg) 70%, #000); grid-auto-rows: minmax(0, 1fr); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; overflow: hidden; }
.mp-stage:active { cursor: grabbing; }
.mp-stage[data-mode="swipe"] { display: block; }
.mp-stage[data-mode="swipe"] .mp-panel { position: absolute; inset: 0; }
.mp-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--map-sea); }
.mp-panel canvas { position: absolute; left: 0; top: 0; display: block; }
.mp-fx { pointer-events: none; }
.mp-head { position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 10px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--glass-line); font: 700 .86rem var(--display); letter-spacing: -.01em; pointer-events: none; z-index: 2; }
.mp-head small { font: 500 .72rem var(--mono); color: var(--muted); letter-spacing: 0; }
/* panels under the floating bar keep their label clear of it */
.mp-stage[data-mode="swipe"] .mp-head,
.mp-stage[data-cols="1"] .mp-panel:nth-child(1) .mp-head,
.mp-stage[data-cols="2"] .mp-panel:nth-child(-n+2) .mp-head,
.mp-stage[data-cols="3"] .mp-panel:nth-child(-n+3) .mp-head { top: var(--mp-top); }
.mp-right .mp-head { left: auto; right: 88px; }
.mp-panel.is-loading .mp-head::after { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: transparent; animation: mp-spin .8s linear infinite; }
.mp-note { position: absolute; inset: auto 0 45% 0; text-align: center; color: var(--muted); font-size: .9rem; pointer-events: none; }
.mp-cross { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; }
.mp-cross i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 12px rgba(0,0,0,.4); }
.mp-cross span { position: absolute; left: 12px; top: -32px; white-space: nowrap; padding: 4px 8px; border-radius: 8px; background: var(--glass-strong); backdrop-filter: blur(8px); border: 1px solid var(--glass-line); font: 600 .8rem var(--mono); color: var(--text); }
.mp-divider { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 18px rgba(0,0,0,.4); z-index: 4; cursor: ew-resize; touch-action: none; }
.mp-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0b0e14; display: grid; place-items: center; font: 700 .85rem var(--mono); box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.mp-divider:focus-visible span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-swipe-pick { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; z-index: 5; padding: 5px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); font: 600 .74rem var(--mono); color: var(--muted); text-transform: uppercase; }
.mp-swipe-pick select { height: 30px; border-radius: 8px; border: 1px solid var(--glass-line); background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); font: 600 .84rem var(--sans); padding: 0 6px; }
.mp-swipe-pick option { background: var(--surface); }
.mp-empty { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; color: var(--muted); grid-column: 1 / -1; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: transparent; animation: mp-spin .8s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }

.mp-pop { position: absolute; left: 0; top: 0; z-index: 6; min-width: 270px; max-width: calc(100% - 16px); padding: 12px 12px 10px; border-radius: 14px; background: var(--glass-strong); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border: 1px solid var(--glass-line); box-shadow: 0 22px 60px -14px rgba(0,0,0,.6); cursor: default; }
.mp-pop-h { font: 600 .78rem var(--mono); color: var(--muted); margin: 0 22px 8px 0; }
.mp-pop table { width: 100%; border-collapse: collapse; font: .82rem var(--mono); margin-bottom: 10px; }
.mp-pop th, .mp-pop td { padding: 4px 6px; text-align: right; white-space: nowrap; }
.mp-pop tbody tr + tr { border-top: 1px solid var(--glass-line); }
.mp-pop thead th { color: var(--faint); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.mp-pop tbody th { text-align: left; font: 600 .84rem var(--sans); display: flex; align-items: center; gap: 6px; }
.mp-pop .btn { height: 34px; font-size: .84rem; width: 100%; justify-content: center; }
.mp-x { position: absolute; right: 6px; top: 4px; appearance: none; border: 0; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; line-height: 1; }

/* timeline: floating glass dock */
.mp-foot { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 6; border-radius: 16px; padding: 6px 14px 8px 6px; display: grid; gap: 2px; }
.mp-time { display: flex; align-items: center; gap: 4px; }
.mp-play, .mp-step { appearance: none; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); cursor: pointer; display: grid; place-items: center; font: 600 1.15rem var(--sans); }
.mp-step { width: 30px; height: 30px; background: transparent; color: var(--muted); }
.mp-step:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.mp-play { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.mp-play svg { width: 16px; height: 16px; }
.mp-play .i-pause, .mp-play[aria-pressed="true"] .i-play { display: none; }
.mp-play[aria-pressed="true"] .i-pause { display: block; }
.mp-track { position: relative; flex: 1; height: 44px; cursor: pointer; touch-action: none; margin: 0 4px 0 10px; }
.mp-days { position: absolute; left: 0; right: 0; bottom: 3px; height: 18px; }
.mp-days span { position: absolute; top: 0; height: 18px; border-left: 1px solid var(--glass-line); padding-left: 6px; font: 600 .7rem var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-transform: uppercase; letter-spacing: .02em; }
.mp-days span::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 10%, transparent); margin: 0 1px; }
.mp-now { position: absolute; top: -10px; width: 2px; height: 26px; background: var(--accent-2); border-radius: 1px; box-shadow: 0 0 8px var(--accent-2); }
.mp-knob { position: absolute; top: 2px; width: 2px; height: 32px; background: var(--accent); transform: translateX(-1px); pointer-events: none; }
.mp-knob span { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 9px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font: 700 .74rem var(--mono); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 80%, transparent); }
.mp-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .74rem; color: var(--muted); padding-left: 10px; }
.mp-lg-t { font-weight: 600; color: var(--text); }
.mp-lg-t small { font: 500 .72rem var(--mono); color: var(--faint); }
.mp-lg-bar { display: inline-flex; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--glass-line); }
.mp-lg-bar i { font: 700 .66rem var(--mono); font-style: normal; color: #0b0f19; padding: 2px 6px; min-width: 30px; text-align: center; }
.mp-lg-x { display: inline-flex; align-items: center; gap: 5px; }
.mp-lg-x svg { width: 14px; height: 14px; }
.mp-toast { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 8; padding: 10px 15px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: .86rem; font-weight: 500; box-shadow: 0 12px 34px rgba(0,0,0,.4); max-width: calc(100% - 32px); }
.mp-toast a { color: inherit; font-weight: 700; }
.mapstack.compact .mp-time .mp-step { display: none; }
.mapstack.compact .mp-rail button { width: 58px; }

.maps-copy { padding-top: 28px; }
.maps-head h1 { font: 800 clamp(2rem, 4.5vw, 3.3rem)/1 var(--display); margin: 6px 0 12px; letter-spacing: -.03em; }
.maps-lead { font-size: 1.08rem; color: var(--muted); max-width: 780px; }
.maps-runs { font: .78rem var(--mono); color: var(--faint); }
.maps-how { margin: 28px 0; }
.maps-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.maps-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.maps-links a { color: var(--muted); }
.maps-links a:hover { color: var(--accent); }
.maps-links h3 { font-size: .95rem; margin: 0 0 10px; }
.city-maps .mapstack { margin-top: 12px; }

@media (max-width: 760px) {
  .maps-app { padding: 0; }
  .mapstack { --mp-top: 54px; }
  .mapstack.compact { --mp-h: 480px; }
  .mp-bar { left: 6px; right: 6px; top: 6px; gap: 6px; }
  .mp-models { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; padding: 3px; border-radius: 12px; }
  .mp-models::-webkit-scrollbar { display: none; }
  .mp-chip { height: 32px; padding: 0 10px; font-size: .8rem; }
  .mp-tools .seg { height: 40px; padding: 3px; border-radius: 12px; }
  .mp-tools .seg button { height: 32px; padding: 0 7px; }
  .mp-fly { height: 40px; padding: 0 3px; border-radius: 12px; }
  .mp-fly input, .mp-fly > svg { display: none; }
  .mp-fly button { width: 32px; height: 32px; background: transparent; }
  .mp-fs { width: 40px; height: 40px; border-radius: 12px; }
  .mp-rail { right: 6px; padding: 3px; border-radius: 13px; }
  .mp-rail button, .mapstack.compact .mp-rail button { width: 44px; padding: 9px 0; }
  .mp-rail button span { display: none; }
  .mp-rail button svg { width: 20px; height: 20px; }
  .mp-right .mp-head { right: 60px; }
  .mp-foot { left: 6px; right: 6px; bottom: 6px; padding: 4px 8px 4px 4px; border-radius: 14px; }
  .mp-play { width: 38px; height: 38px; }
  .mp-days span { padding-left: 3px; font-size: .64rem; }
  .mp-legend { display: none; }
  .mp-swipe-pick { bottom: 70px; }
  .mp-toast { bottom: 76px; }
  .maps-links { grid-template-columns: 1fr; }
  .hero-map { padding: 0; }
  .hero-map .mapstack.compact { border-radius: 0; border-left: 0; border-right: 0; --mp-h: 72svh; }
  .hero-copy { grid-template-columns: minmax(0, 1fr); padding-top: 28px; padding-bottom: 18px; }
  .hero-foot .model-rail { justify-content: flex-start; }
}
}

/* ---------------------------------------------------------------- Studio */
.st-head { padding-top: 34px; padding-bottom: 18px; }
.st-head h1 { font: 800 clamp(2rem, 4.6vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; word-spacing: .04em; margin-bottom: 12px; }
.st-head h1 em { color: var(--accent); font-style: normal; }
.st-sub { color: var(--muted); max-width: 720px; margin: 0; }
.st-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 28px; align-items: start; padding-bottom: 40px; position: relative; }
.st-stage { position: sticky; top: calc(var(--top-h) + 14px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.st-frame { position: relative; max-width: 100%; height: calc(100svh - var(--top-h) - 110px); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #05070c; box-shadow: var(--glow), 0 0 0 1px var(--line); }
.st-frame canvas { display: block; width: 100%; height: 100%; }
.st-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); background: rgba(5,7,12,.86); }
.st-spin { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; animation: st-spin .8s linear infinite; opacity: 0; transition: opacity .2s; pointer-events: none; }
.studio.is-busy .st-spin { opacity: 1; }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-player { display: flex; align-items: center; gap: 12px; width: min(100%, 520px); }
.st-player input[type=range] { flex: 1; accent-color: var(--accent); }
.st-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.st-play svg { width: 22px; height: 22px; }
.st-play .i-pause, .st-play[aria-pressed="true"] .i-play { display: none; }
.st-play[aria-pressed="true"] .i-pause { display: block; }
.st-clock { color: var(--muted); font-size: .85rem; min-width: 84px; text-align: right; }
.st-panel { display: flex; flex-direction: column; gap: 14px; }
.st-group { border: 1px solid var(--line-soft); background: var(--surface); border-radius: var(--r); padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-group legend { font: 600 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding: 0 6px; display: flex; align-items: center; gap: 10px; }
.st-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.st-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: .82rem; color: var(--muted); }
.st-field select, .st-field input { width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; height: 38px; font: 500 .9rem var(--sans); color: var(--text); }
.st-field input { padding: 0 12px; border-radius: 10px; }
.st-seg { width: 100%; }
.st-seg button { flex: 1; }
.st-looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-look, .st-pack { position: relative; appearance: none; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); border-radius: 12px; padding: 6px 6px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 500 .74rem var(--sans); text-align: center; }
.st-look i { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 8px; background: radial-gradient(60% 50% at 50% 55%, var(--land) 0 46%, transparent 48%), var(--bg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); position: relative; }
.st-look i::after { content: ""; position: absolute; inset: 22% 20% 18%; border-radius: 45% 55% 50% 45%; border: 2px solid var(--line); }
.st-look[aria-pressed="true"], .st-pack[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.st-packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-pack-ic { display: flex; gap: 1px; padding: 4px 0 2px; }
.st-pack-ic img, .st-mask { width: 24px; height: 24px; }
.st-mask { display: block; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.st-hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; min-height: 1em; }
.st-hint:empty { display: none; }
.st-logo { position: relative; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-logo label.btn { cursor: pointer; }
.st-logo .st-lock { position: static; }
.st-pack .st-lock { top: -7px; right: -5px; }
.st-lock { display: none; position: absolute; top: 4px; right: 4px; font: 700 .6rem var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--accent-2); color: #1d1200; border-radius: 6px; padding: 2px 5px; }
[data-locked] .st-lock { display: block; }
.st-shuffle { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 8px; height: 24px; padding: 0 10px; font: 500 .74rem var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.st-accents { display: flex; gap: 8px; flex-wrap: wrap; }
.st-accents button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--c); cursor: pointer; font: 600 .62rem var(--sans); color: var(--muted); }
.st-accents button:first-child { width: auto; border-radius: 16px; padding: 0 10px; }
.st-accents button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.st-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.st-export { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 4px 0 0; }
.st-export .btn.primary { flex: 1; justify-content: center; }
.st-export .btn.primary svg { width: 18px; height: 18px; }
.st-progress { width: 100%; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.st-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); transition: width .2s; }
.st-progress span { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; font-size: .85rem; }
.st-result { display: flex; gap: 10px; align-items: center; width: 100%; flex-wrap: wrap; }
.st-note { font-size: .82rem; color: var(--muted); margin: 0; }
.st-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: var(--glow); font-size: .9rem; max-width: min(92vw, 520px); }
.st-seg button[data-pro-only] { position: relative; }
.st-seg .st-lock { top: -9px; right: -4px; }
.st-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.st-moods { display: flex; flex-wrap: wrap; gap: 6px; }
.st-moods .chip { position: relative; height: 32px; padding: 0 12px; font: 500 .82rem var(--sans); cursor: pointer; }
.st-moods .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.st-moods .st-lock { top: -9px; right: -4px; }
.st-edit { position: relative; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.st-edit summary { cursor: pointer; font-size: .88rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.st-edit .st-lock { position: static; }
.st-scenes { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-scenes li { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--bg-2); }
.st-scenes li.is-off { opacity: .55; }
.st-scenes li.is-off input[type=text] { display: none; }
.st-scenes b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-scenes input[type=text] { height: 34px; padding: 0 10px; border-radius: 9px; font: 500 .85rem var(--sans); color: var(--text); width: 100%; min-width: 0; }
.st-extras { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.st-extras-t { font: 600 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); width: 100%; }
.st-extras .btn { position: relative; }
.st-extras .st-lock { top: -9px; right: -4px; }
.st-post { width: 100%; min-height: 120px; padding: 10px 12px; border-radius: 10px; font: 500 .85rem/1.45 var(--sans); color: var(--text); resize: vertical; }
.st-copy { padding-bottom: 40px; }
.st-copy h3 span { color: var(--accent); margin-right: 6px; }
.st-countries { list-style: none; padding: 0; margin: 0 0 18px; columns: 4 180px; gap: 18px; }
.st-countries li { padding: 3px 0; break-inside: avoid; }
.st-countries a { color: var(--muted); text-decoration: none; }
.st-countries a:hover { color: var(--text); }
@media (max-width: 920px) {
  .st-app { grid-template-columns: minmax(0, 1fr); }
  .st-stage { position: static; }
  .st-frame { height: auto; width: min(100%, 420px); }

}
@media (max-width: 480px) {
  .st-looks { grid-template-columns: repeat(3, 1fr); }
  .st-row2 { grid-template-columns: 1fr; }
}
.studio [hidden] { display: none !important; }
