/* Khagol Mandal Sky — planetarium-dark first, light and red night-vision themes */
@font-face { font-family: 'Mukta'; font-weight: 400; font-display: swap; src: url(/fonts/mukta-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mukta'; font-weight: 500; font-display: swap; src: url(/fonts/mukta-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: 'Mukta'; font-weight: 700; font-display: swap; src: url(/fonts/mukta-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: 'Mukta'; font-weight: 400; font-display: swap; src: url(/fonts/mukta-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Mukta'; font-weight: 500; font-display: swap; src: url(/fonts/mukta-devanagari-500-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: 'Mukta'; font-weight: 700; font-display: swap; src: url(/fonts/mukta-devanagari-700-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: 'Tiro Marathi'; font-weight: 400; font-display: swap; src: url(/fonts/tiro-devanagari-marathi-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Tiro Marathi'; font-weight: 400; font-display: swap; src: url(/fonts/tiro-devanagari-marathi-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+200C-200D, U+25CC; }

:root {
  --ink: #08122a;        /* night sky */
  --dome: #0f1d3d;       /* surfaces */
  --dome-2: #16284f;     /* raised */
  --line: #253a6b;       /* hairlines */
  --star: #e9eef7;       /* text */
  --dim: #9aa8c4;        /* secondary text */
  --accent: #7cb0f5;     /* celestial blue */
  --accent-ink: #08122a;
  --brand: #a11f1f;      /* Khagol Mandal maroon */
  --brand-text: #f08a7c;
  --good: #6fd3a0; --warn: #f2c14e; --bad: #f07b6b;
  --twilight: #2b4a8a;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset;
  --r-s: 8px; --r-m: 14px; --r-l: 22px;
  --font-ui: 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Tiro Marathi', 'Mukta', Georgia, serif;
  --fs-0: .8125rem; --fs-1: .9375rem; --fs-2: 1.0625rem; --fs-3: 1.3125rem; --fs-4: 1.75rem; --fs-5: 2.375rem;
  --rail-w: 232px; --top-h: 58px; --nav-h: 64px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ink: #eef2f9; --dome: #ffffff; --dome-2: #e4eaf5; --line: #c9d3e6;
  --star: #0e1a33; --dim: #4c5b7a; --accent: #2a62c9; --accent-ink: #ffffff;
  --brand: #9b1b1b; --brand-text: #9b1b1b; --good: #17855a; --warn: #a86d00; --bad: #c0392b; --twilight: #b9c9ea;
  color-scheme: light;
}
/* Night vision: everything in dim red so eyes stay dark-adapted */
:root[data-night="1"] {
  --ink: #000000; --dome: #120202; --dome-2: #1c0404; --line: #3d0b0b;
  --star: #ff4d3d; --dim: #a8322a; --accent: #ff3b2f; --accent-ink: #000;
  --brand: #7a0d0d; --brand-text: #ff4d3d; --good: #ff4d3d; --warn: #d63a2e; --bad: #ff6a5a; --twilight: #2a0606;
  color-scheme: dark;
}
:root[data-night="1"] .obj-dot, :root[data-night="1"] .strip-legend i, :root[data-night="1"] .cal-dots i, :root[data-night="1"] .type-dot { background: var(--star) !important; border-color: var(--star) !important; box-shadow: none !important; }
:root[data-night="1"] img:not(.keep-color) { filter: grayscale(1) sepia(1) saturate(6) hue-rotate(-50deg) brightness(.55); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--star); font-family: var(--font-ui); font-size: var(--fs-2); line-height: 1.5; -webkit-font-smoothing: antialiased; }
:lang(mr) body, body:lang(mr) { line-height: 1.65; }
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -.005em; }
h1 { font-size: var(--fs-5); }
h2 { font-size: var(--fs-4); }
h3 { font-size: var(--fs-3); }
p { margin: 0 0 .75em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--dim); }
.small { font-size: var(--fs-0); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--star); min-width: 0; }
.brand-badge { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
:root[data-night="1"] .brand-badge { background: #2a0505; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-display); font-size: 1.15rem; white-space: nowrap; }
.brand-name small { font-family: var(--font-ui); font-size: .72rem; color: var(--dim); letter-spacing: .01em; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--star); cursor: pointer; }
.icon-btn:hover { background: var(--dome); }
.icon-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.icon-btn svg, .loc-chip svg, .rail svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.loc-chip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--dome); cursor: pointer; font-size: var(--fs-1); max-width: 40vw; }
.loc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-chip svg { width: 18px; height: 18px; }

main { padding: 16px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; outline: none; }

.rail { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--dome); border-top: 1px solid var(--line); }
.rail > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--dim); font-size: .76rem; }
.rail > a[aria-current="page"] { color: var(--star); }
.rail > a[aria-current="page"] svg { stroke: var(--accent); }
.rail-extra { display: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--rail-w) 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .rail { position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); display: flex; flex-direction: column; padding: 16px 10px; gap: 2px; border-top: 0; border-right: 1px solid var(--line); background: transparent; overflow-y: auto; }
  .rail > a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--r-s); font-size: var(--fs-1); color: var(--star); }
  .rail > a:hover { background: var(--dome); }
  .rail > a[aria-current="page"] { background: var(--dome-2); }
  .rail > a[data-nav="more"] { display: none; }
  .rail-extra { display: flex; flex-direction: column; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .rail-extra a { padding: 8px 12px 8px 46px; color: var(--dim); text-decoration: none; border-radius: var(--r-s); font-size: var(--fs-1); }
  .rail-extra a:hover, .rail-extra a[aria-current="page"] { color: var(--star); background: var(--dome); }
  main { padding: 24px 32px 48px; width: 100%; }
}

/* ---------- generic blocks ---------- */
.page-head { margin: 4px 0 18px; }
.page-head p { color: var(--dim); max-width: 62ch; margin-top: 6px; }
.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: var(--fs-3); }
.section-head a { font-size: var(--fs-1); white-space: nowrap; }
.panel { background: var(--dome); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; }
.grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--dome-2); color: var(--star); cursor: pointer; text-decoration: none; font-size: var(--fs-1); font-weight: 500; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: var(--fs-0); }
.btn[disabled] { opacity: .5; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--star); cursor: pointer; font-size: var(--fs-0); text-decoration: none; }
.chip[aria-pressed="true"], .chip.on { background: var(--star); color: var(--ink); border-color: var(--star); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 10px; background: var(--dome-2); color: var(--dim); }
.tag.good { color: var(--good); } .tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: var(--fs-0); color: var(--dim); }
.input, select.input, textarea.input { min-height: 42px; padding: 8px 12px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--ink); color: var(--star); width: 100%; }
textarea.input { min-height: 90px; resize: vertical; }
.list { list-style: none; padding: 0; margin: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; color: var(--star); text-decoration: none; }
.list-link:hover .ll-title { color: var(--accent); }
.ll-title { font-weight: 500; }
.ll-sub { font-size: var(--fs-0); color: var(--dim); }
.empty { padding: 20px; border: 1px dashed var(--line); border-radius: var(--r-m); color: var(--dim); }
.note { font-size: var(--fs-0); color: var(--dim); border-left: 2px solid var(--line); padding-left: 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--fs-1); margin: 0; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; }
.prose { max-width: 66ch; }
.prose p { line-height: 1.65; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-1); text-decoration: none; margin-bottom: 10px; }

/* ---------- Tonight hero ---------- */
.hero { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr minmax(320px, 440px); gap: 32px; } .hero .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .hero .facts { grid-template-columns: repeat(4, 1fr); } }
.hero-title { margin-bottom: 4px; }
.hero-title h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.hero-date { color: var(--dim); font-size: var(--fs-1); }
.dome-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; margin: 0 auto; }
.dome-wrap canvas { width: 100%; height: 100%; display: block; border-radius: 50%; cursor: pointer; }
.dome-open { position: absolute; right: 4%; bottom: 4%; }
.verdict { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0 4px; }
.verdict-word { font-family: var(--font-display); font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1; }
.verdict-score { font-size: var(--fs-1); color: var(--dim); padding-bottom: 4px; }
.verdict-word.s-excellent, .verdict-word.s-good { color: var(--good); }
.verdict-word.s-fair { color: var(--warn); }
.verdict-word.s-poor, .verdict-word.s-none { color: var(--bad); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; margin-top: 14px; }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--dome); padding: 10px 12px; }
.fact b { display: block; font-size: var(--fs-2); font-weight: 500; }
.fact span { font-size: var(--fs-0); color: var(--dim); }

/* Night strip: sunset → sunrise timeline */
.strip { margin-top: 16px; }
.strip svg { width: 100%; height: auto; display: block; overflow: visible; }
.strip-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-0); color: var(--dim); margin-top: 6px; }
.strip-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* Object rows (planets, best targets) */
.objs { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.obj { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--dome); color: var(--star); text-decoration: none; }
.obj:hover { background: var(--dome-2); }
.obj-dot { width: 26px; height: 26px; border-radius: 50%; justify-self: center; box-shadow: 0 0 12px rgba(255,255,255,.15); }
.obj-name { font-weight: 500; }
.obj-sub { font-size: var(--fs-0); color: var(--dim); }
.obj-when { text-align: right; font-size: var(--fs-0); color: var(--dim); }
.obj-when b { display: block; color: var(--star); font-size: var(--fs-1); font-weight: 500; }
.obj.below { opacity: .55; }

/* Cards (content) */
.card { display: block; background: var(--dome); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; color: var(--star); text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.card-body { padding: 14px 16px; }
.card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.card-img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--dome-2); }
.event-date { display: grid; place-items: center; width: 54px; min-width: 54px; height: 58px; border-radius: var(--r-s); background: var(--dome-2); line-height: 1.05; }
.event-date b { font-size: 1.35rem; font-weight: 500; }
.event-date span { font-size: .72rem; color: var(--dim); }
.event-row { display: flex; gap: 14px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); color: var(--star); text-decoration: none; }
.event-row:first-child { border-top: 0; }
.event-type { font-size: .72rem; color: var(--dim); }
.event-row .ll-title { line-height: 1.3; }

.apod { display: grid; gap: 0; }
@media (min-width: 760px) { .apod { grid-template-columns: 1.1fr 1fr; } .apod .card-img { aspect-ratio: auto; height: 100%; min-height: 260px; } }
.apod-text { max-height: 9.5em; overflow: hidden; position: relative; }
.apod-text.open { max-height: none; }

.news-item { padding: 12px 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; }
.news-item a { color: var(--star); text-decoration: none; font-weight: 500; }
.news-item a:hover { color: var(--accent); }
.news-meta { font-size: var(--fs-0); color: var(--dim); margin-top: 2px; }

/* Sky map page */
.sky-page { margin: -16px -16px 0; }
@media (min-width: 900px) { .sky-page { margin: -24px -32px -48px; } }
.sky-stage { position: relative; height: calc(100dvh - var(--top-h) - var(--nav-h) - env(safe-area-inset-bottom) - env(safe-area-inset-top)); min-height: 380px; background: #000; overflow: hidden; touch-action: none; }
@media (min-width: 900px) { .sky-stage { height: calc(100dvh - var(--top-h)); } }
.sky-stage canvas { width: 100%; height: 100%; display: block; }
.sky-toolbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.sky-toolbar > * { pointer-events: auto; }
.sky-toolbar .chip { background: color-mix(in srgb, var(--ink) 70%, transparent); backdrop-filter: blur(6px); }
.sky-toolbar .chip[aria-pressed="true"] { background: var(--star); }
.sky-time { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 22px; background: color-mix(in srgb, var(--ink) 78%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); }
.sky-time input[type=range] { flex: 1; accent-color: var(--accent); }
.sky-time .t { min-width: 92px; text-align: center; font-size: var(--fs-0); }
.sky-info { position: absolute; left: 10px; right: 10px; bottom: 64px; max-width: 420px; padding: 12px 14px; border-radius: var(--r-m); background: var(--dome); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.sky-info[hidden] { display: none; }
.sky-info h3 { font-size: 1.2rem; }
.sky-close { position: absolute; top: 6px; right: 6px; }
.sky-compass { position: absolute; right: 10px; top: 54px; }

/* Constellation atlas */
.atlas-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.atlas-tools .input { flex: 1 1 220px; }
.con-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.con-tile { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--r-m); background: var(--dome); border: 1px solid var(--line); text-decoration: none; color: var(--star); }
.con-tile:hover { border-color: var(--accent); }
.con-tile canvas { width: 100%; aspect-ratio: 1; display: block; }
.con-tile .ll-sub { line-height: 1.3; }
.con-chart { width: 100%; max-width: 520px; aspect-ratio: 1; display: block; border-radius: var(--r-m); background: var(--ink); border: 1px solid var(--line); }
.detail { display: grid; gap: 20px; }
@media (min-width: 900px) { .detail { grid-template-columns: minmax(300px, 480px) 1fr; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--star); border-bottom-color: var(--accent); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-h { font-size: .72rem; color: var(--dim); text-align: center; padding: 4px 0; }
.cal-d { min-height: 54px; padding: 4px; border-radius: 6px; background: var(--dome); font-size: .78rem; position: relative; border: 1px solid transparent; cursor: pointer; text-align: left; color: var(--star); }
.cal-d.out { opacity: .35; }
.cal-d.today { border-color: var(--accent); }
.cal-d.sel { background: var(--dome-2); border-color: var(--star); }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 3px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-moon { position: absolute; top: 4px; right: 4px; font-size: .7rem; color: var(--dim); }
.t-moon { --c: #c9c3b2; } .t-eclipse { --c: #f07b6b; } .t-conj { --c: #7cb0f5; } .t-occ { --c: #b89cf5; } .t-opp { --c: #f2c14e; } .t-elong { --c: #f2c14e; } .t-meteor { --c: #6fd3a0; } .t-season { --c: #9aa8c4; } .t-club { --c: #f08a7c; } .t-super { --c: #e9eef7; }
.cal-dots i[class^="t-"] { background: var(--c); }
.type-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); margin-right: 6px; }

/* Quiz */
.quiz-opt { display: block; width: 100%; text-align: left; padding: 12px 14px; margin: 6px 0; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--dome); cursor: pointer; color: var(--star); }
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 15%, var(--dome)); }
.quiz-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 15%, var(--dome)); }
.badge { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--r-s); border: 1px solid var(--line); }
.badge.earned { border-color: var(--warn); }

/* Ask */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: var(--dome); border: 1px solid var(--line); white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--dome-2); }

/* Toast + sheet */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--star); color: var(--ink); padding: 10px 16px; border-radius: 20px; font-size: var(--fs-1); transition: .25s; pointer-events: none; z-index: 60; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sheet { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--dome); color: var(--star); padding: 20px; width: min(520px, calc(100vw - 24px)); max-height: 86dvh; }
.sheet::backdrop { background: rgba(0,0,0,.55); }
.sheet h2 { font-size: var(--fs-3); margin-bottom: 12px; }
.city-list { max-height: 46dvh; overflow-y: auto; margin: 8px 0; }
.city-list button { display: block; width: 100%; text-align: left; padding: 10px 8px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; color: var(--star); }
.city-list button:hover { background: var(--dome-2); }

.install-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-m); background: var(--dome-2); border: 1px solid var(--line); margin-bottom: 16px; }
.offline-note { font-size: var(--fs-0); color: var(--warn); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .more-grid { grid-template-columns: repeat(3, 1fr); } }
.more-grid a { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-m); background: var(--dome); border: 1px solid var(--line); color: var(--star); text-decoration: none; min-height: 92px; }
.more-grid a:hover { border-color: var(--accent); }
.more-grid b { font-weight: 500; }
.more-grid span { font-size: var(--fs-0); color: var(--dim); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--dim); font-weight: 400; font-size: var(--fs-0); border-top: 0; }
.scroll-x { overflow-x: auto; }
