:root {
  color-scheme: light;
  --bg: #edf4f8;
  --ink: #121a24;
  --ink-faint: #526375;
  --muted: #435568;
  --line: rgba(54, 76, 98, 0.22);
  --panel: #ffffff;
  --panel-soft: #f7fafb;
  --blue: #356fb7;
  --green: #347d62;
  --gold: #b36b1f;
  --red: #b6463f;
  --wx-cloud: #5f7383;
  --wx-cloud-soft: #7f92a0;
  --wx-drizzle: #2f79a8;
  --wx-rain: #2767ad;
  --wx-rain-heavy: #174d8f;
  --wx-snow: #3f789b;
  --wx-fog: #687b89;
  --wx-sun: #b86d00;
  --wx-moon: #5e758a;
  --wx-bolt: #c97900;
  --wx-storm-edge: rgba(18, 26, 36, 0.72);
  --shadow: 0 18px 45px rgba(29, 48, 58, 0.14);
  --body-bg-gradient: linear-gradient(180deg, rgba(241, 247, 251, 0.94), rgba(226, 236, 242, 0.97));
  --page-bg:
    var(--body-bg-gradient),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80");
  --sky-page-bg: var(--page-bg);
  --sky-page-bg-color: var(--bg);
  --app-viewport-height: 100vh;
  --app-viewport-width: 100vw;
  --sky-viewport-overscan: 360px;
  --btn-bg: #152026;
  --btn-fg: #ffffff;
  --glass-heavy: rgba(250, 253, 255, 0.9);
  --glass-mid: rgba(250, 253, 255, 0.82);
  --glass-light: rgba(250, 253, 255, 0.76);
  --glass-search: rgba(250, 253, 255, 0.82);
  --glass-result: rgba(250, 253, 255, 0.94);
  --stage-ribbon-bg: rgba(250, 253, 255, 0.78);
  --stage-ribbon-icon-bg: rgba(53, 111, 183, 0.12);
  --hero-glass-heavy: rgba(250, 253, 255, 0.86);
  --hero-glass-light: rgba(250, 253, 255, 0.72);
  --hero-shadow: 0 24px 62px rgba(31, 55, 78, 0.16);
  --summary-chip-bg: rgba(250, 253, 255, 0.48);
  --summary-chip-border: rgba(85, 104, 124, 0.16);
  --summary-rain-bg: rgba(228, 240, 253, 0.58);
  --summary-rain-border: rgba(78, 126, 180, 0.28);
  --summary-dry-bg: rgba(232, 246, 237, 0.56);
  --summary-dry-border: rgba(76, 139, 104, 0.24);
  --for-you-card-bg: rgba(250, 253, 255, 0.58);
  --for-you-card-border: rgba(54, 76, 98, 0.18);
  --for-you-plan-bg:
    linear-gradient(135deg, rgba(52, 125, 98, 0.12), rgba(53, 111, 183, 0.08)),
    rgba(255, 255, 255, 0.50);
  --for-you-away-bg:
    linear-gradient(135deg, rgba(53, 111, 183, 0.13), rgba(52, 125, 98, 0.07)),
    rgba(255, 255, 255, 0.52);
  --for-you-action-bg:
    linear-gradient(135deg, rgba(53, 111, 183, 0.12), rgba(199, 216, 226, 0.16)),
    rgba(255, 255, 255, 0.48);
  --for-you-text: var(--ink);
  --for-you-muted: var(--muted);
  --for-you-accent: var(--blue);
  --for-you-plan-btn-bg: rgba(255, 255, 255, 0.52);
  --for-you-plan-btn-fg: var(--ink);
  --for-you-text-shadow: none;
  --border-glass: rgba(22, 36, 50, 0.15);
  --border-glass-md: rgba(22, 36, 50, 0.19);
  --welcome-ambient-bg: rgba(250, 253, 255, 0.76);
  --welcome-ambient-fg: rgba(18, 31, 42, 0.88);
  --welcome-ambient-border: rgba(22, 36, 50, 0.16);
  --welcome-ambient-shadow: 0 8px 18px rgba(29, 48, 58, 0.08);
  --welcome-ambient-text-shadow: none;
  --welcome-kicker-fg: #1f745c;
  --welcome-headline-fg: #111a24;
  --welcome-sub-fg: #263d51;
  --welcome-moments-fg: #334b5f;
  --welcome-copy-shadow: 0 1px 12px rgba(255, 255, 255, 0.40);
  --daily-secondary: var(--muted);
  --daily-secondary-strong: var(--muted);
  --daily-section-meta: var(--muted);
  --daily-rain-detail: var(--muted);
  --daily-low-color: var(--ink);
  --daily-condition-opacity: 0.78;
  --daily-low-opacity: 0.55;
  --daily-row-border: var(--border-glass);
  --daily-track-bg: var(--border-glass);
  --daily-text-shadow: none;
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.08) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, var(--hero-glass-heavy), var(--hero-glass-light));
  --hero-card-overlay:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 100%);
  --hero-panel-bg: var(--glass-mid);
  --status-card-bg: var(--glass-heavy);
  --status-card-border: var(--blue);
  --status-error-bg: var(--glass-heavy);
  --status-error-border: var(--red);
  --loading-chip-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)),
    var(--glass-mid);
  --content-wash:
    radial-gradient(ellipse 62% 42% at 50% 18%, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34) 45%, transparent 78%),
    radial-gradient(ellipse 58% 36% at 50% 50%, rgba(245, 250, 254, 0.42), rgba(245, 250, 254, 0.18) 52%, transparent 82%),
    radial-gradient(ellipse 54% 28% at 50% 82%, rgba(245, 250, 254, 0.30), rgba(245, 250, 254, 0.10) 50%, transparent 80%);
  --welcome-stage-wash:
    linear-gradient(180deg, rgba(246, 251, 254, 0.30), rgba(246, 251, 254, 0.20) 48%, rgba(232, 242, 248, 0.28) 100%),
    radial-gradient(ellipse 74% 58% at 50% 38%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.26) 48%, rgba(255, 255, 255, 0.10) 78%, transparent 100%);
  --sky-veil:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.34), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(235, 243, 249, 0.28));
  --scroll-track: rgba(23, 44, 66, 0.08);
  --scroll-thumb: rgba(23, 44, 66, 0.30);
  --scroll-thumb-hover: rgba(23, 44, 66, 0.44);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1a20;
    --ink: #dde8ed;
    --ink-faint: #8fa7b3;
    --muted: #7a96a2;
    --line: #243540;
    --panel: #162028;
    --panel-soft: #1c2c36;
    --wx-cloud: #9fb3c1;
    --wx-cloud-soft: #c7d4dc;
    --wx-drizzle: #9cd7ff;
    --wx-rain: #74b8ff;
    --wx-rain-heavy: #4a9cff;
    --wx-snow: #b9ecff;
    --wx-fog: #9fb0bb;
    --wx-sun: #f6b94d;
    --wx-moon: #b7c9d7;
    --wx-bolt: #ffdc4c;
    --wx-storm-edge: rgba(8, 12, 20, 0.72);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    --body-bg-gradient: linear-gradient(180deg, rgba(10, 20, 28, 0.94), rgba(8, 16, 22, 0.97));
    --btn-bg: #c8d8e0;
    --btn-fg: #0e1a20;
    --glass-heavy: rgba(22, 32, 40, 0.92);
    --glass-mid: rgba(22, 32, 40, 0.82);
    --glass-light: rgba(18, 28, 36, 0.80);
    --glass-search: rgba(20, 30, 38, 0.88);
    --glass-result: rgba(24, 36, 44, 0.95);
    --stage-ribbon-bg: rgba(22, 32, 40, 0.54);
    --stage-ribbon-icon-bg: rgba(255, 255, 255, 0.08);
    --hero-glass-heavy: rgba(22, 32, 40, 0.78);
    --hero-glass-light: rgba(18, 28, 36, 0.60);
    --hero-shadow: 0 24px 66px rgba(0, 0, 0, 0.18);
    --summary-chip-bg: rgba(17, 27, 35, 0.58);
    --summary-chip-border: rgba(255, 255, 255, 0.10);
    --summary-rain-bg: rgba(28, 55, 78, 0.52);
    --summary-rain-border: rgba(116, 184, 255, 0.24);
    --summary-dry-bg: rgba(31, 70, 54, 0.46);
    --summary-dry-border: rgba(103, 181, 137, 0.24);
    --for-you-card-bg: rgba(9, 16, 24, 0.78);
    --for-you-card-border: rgba(232, 244, 252, 0.16);
    --for-you-plan-bg:
      linear-gradient(135deg, rgba(103, 181, 137, 0.18), rgba(116, 184, 255, 0.11)),
      rgba(9, 16, 24, 0.80);
    --for-you-away-bg:
      linear-gradient(135deg, rgba(116, 184, 255, 0.18), rgba(103, 181, 137, 0.10)),
      rgba(9, 16, 24, 0.82);
    --for-you-action-bg:
      linear-gradient(135deg, rgba(116, 184, 255, 0.16), rgba(199, 216, 226, 0.08)),
      rgba(9, 16, 24, 0.78);
    --for-you-text: rgba(246, 250, 253, 0.96);
    --for-you-muted: rgba(210, 226, 236, 0.82);
    --for-you-accent: #9ecaff;
    --for-you-plan-btn-bg: rgba(240, 247, 252, 0.90);
    --for-you-plan-btn-fg: #101820;
    --for-you-text-shadow: 0 1px 12px rgba(0, 0, 0, 0.36);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-md: rgba(255, 255, 255, 0.10);
    --welcome-ambient-bg: linear-gradient(135deg, rgba(14, 24, 34, 0.76), rgba(23, 36, 48, 0.62));
    --welcome-ambient-fg: rgba(245, 250, 253, 0.94);
    --welcome-ambient-border: rgba(234, 246, 255, 0.22);
    --welcome-ambient-shadow:
      0 10px 24px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --welcome-ambient-text-shadow: 0 1px 9px rgba(0, 0, 0, 0.38);
    --welcome-kicker-fg: #66d3ae;
    --welcome-headline-fg: rgba(244, 250, 253, 0.98);
    --welcome-sub-fg: rgba(231, 242, 248, 0.90);
    --welcome-moments-fg: rgba(216, 231, 239, 0.78);
    --welcome-copy-shadow: 0 2px 16px rgba(0, 0, 0, 0.46);
    --content-wash: transparent;
    --welcome-stage-wash:
      linear-gradient(180deg, rgba(4, 8, 15, 0.20), rgba(4, 8, 15, 0.12) 48%, rgba(4, 8, 15, 0.18) 100%),
      radial-gradient(ellipse 74% 58% at 50% 38%, rgba(8, 12, 20, 0.44), rgba(8, 12, 20, 0.22) 54%, rgba(8, 12, 20, 0.10) 82%, transparent 100%);
    --sky-veil: transparent;
    --scroll-track: rgba(255, 255, 255, 0.10);
    --scroll-thumb: rgba(255, 255, 255, 0.28);
    --scroll-thumb-hover: rgba(255, 255, 255, 0.38);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1a20;
  --ink: #dde8ed;
  --ink-faint: #8fa7b3;
  --muted: #7a96a2;
  --line: #243540;
  --panel: #162028;
  --panel-soft: #1c2c36;
  --wx-cloud: #9fb3c1;
  --wx-cloud-soft: #c7d4dc;
  --wx-drizzle: #9cd7ff;
  --wx-rain: #74b8ff;
  --wx-rain-heavy: #4a9cff;
  --wx-snow: #b9ecff;
  --wx-fog: #9fb0bb;
  --wx-sun: #f6b94d;
  --wx-moon: #b7c9d7;
  --wx-bolt: #ffdc4c;
  --wx-storm-edge: rgba(8, 12, 20, 0.72);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --body-bg-gradient: linear-gradient(180deg, rgba(10, 20, 28, 0.94), rgba(8, 16, 22, 0.97));
  --btn-bg: #c8d8e0;
  --btn-fg: #0e1a20;
  --glass-heavy: rgba(22, 32, 40, 0.92);
  --glass-mid: rgba(22, 32, 40, 0.82);
  --glass-light: rgba(18, 28, 36, 0.80);
  --glass-search: rgba(20, 30, 38, 0.88);
  --glass-result: rgba(24, 36, 44, 0.95);
  --stage-ribbon-bg: rgba(22, 32, 40, 0.54);
  --stage-ribbon-icon-bg: rgba(255, 255, 255, 0.08);
  --hero-glass-heavy: rgba(22, 32, 40, 0.78);
  --hero-glass-light: rgba(18, 28, 36, 0.60);
  --hero-shadow: 0 24px 66px rgba(0, 0, 0, 0.18);
  --summary-chip-bg: rgba(17, 27, 35, 0.58);
  --summary-chip-border: rgba(255, 255, 255, 0.10);
  --summary-rain-bg: rgba(28, 55, 78, 0.52);
  --summary-rain-border: rgba(116, 184, 255, 0.24);
  --summary-dry-bg: rgba(31, 70, 54, 0.46);
  --summary-dry-border: rgba(103, 181, 137, 0.24);
  --for-you-card-bg: rgba(9, 16, 24, 0.78);
  --for-you-card-border: rgba(232, 244, 252, 0.16);
  --for-you-plan-bg:
    linear-gradient(135deg, rgba(103, 181, 137, 0.18), rgba(116, 184, 255, 0.11)),
    rgba(9, 16, 24, 0.80);
  --for-you-away-bg:
    linear-gradient(135deg, rgba(116, 184, 255, 0.18), rgba(103, 181, 137, 0.10)),
    rgba(9, 16, 24, 0.82);
  --for-you-action-bg:
    linear-gradient(135deg, rgba(116, 184, 255, 0.16), rgba(199, 216, 226, 0.08)),
    rgba(9, 16, 24, 0.78);
  --for-you-text: rgba(246, 250, 253, 0.96);
  --for-you-muted: rgba(210, 226, 236, 0.82);
  --for-you-accent: #9ecaff;
  --for-you-plan-btn-bg: rgba(240, 247, 252, 0.90);
  --for-you-plan-btn-fg: #101820;
  --for-you-text-shadow: 0 1px 12px rgba(0, 0, 0, 0.36);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-md: rgba(255, 255, 255, 0.10);
  --welcome-ambient-bg: linear-gradient(135deg, rgba(14, 24, 34, 0.76), rgba(23, 36, 48, 0.62));
  --welcome-ambient-fg: rgba(245, 250, 253, 0.94);
  --welcome-ambient-border: rgba(234, 246, 255, 0.22);
  --welcome-ambient-shadow:
    0 10px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --welcome-ambient-text-shadow: 0 1px 9px rgba(0, 0, 0, 0.38);
  --welcome-kicker-fg: #66d3ae;
  --welcome-headline-fg: rgba(244, 250, 253, 0.98);
  --welcome-sub-fg: rgba(231, 242, 248, 0.90);
  --welcome-moments-fg: rgba(216, 231, 239, 0.78);
  --welcome-copy-shadow: 0 2px 16px rgba(0, 0, 0, 0.46);
  --content-wash: transparent;
  --welcome-stage-wash:
    linear-gradient(180deg, rgba(4, 8, 15, 0.20), rgba(4, 8, 15, 0.12) 48%, rgba(4, 8, 15, 0.18) 100%),
    radial-gradient(ellipse 74% 58% at 50% 38%, rgba(8, 12, 20, 0.44), rgba(8, 12, 20, 0.22) 54%, rgba(8, 12, 20, 0.10) 82%, transparent 100%);
  --sky-veil: transparent;
  --scroll-track: rgba(255, 255, 255, 0.10);
  --scroll-thumb: rgba(255, 255, 255, 0.28);
  --scroll-thumb-hover: rgba(255, 255, 255, 0.38);
}

:root[data-sky="clear-day"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.42), rgba(255, 233, 139, 0.16) 40%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, rgba(250, 254, 255, 0.82), rgba(206, 233, 249, 0.58));
  --hero-card-overlay:
    radial-gradient(circle at 16% 14%, rgba(255, 220, 95, 0.26), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(88, 132, 168, 0.13));
  --hero-panel-bg: rgba(250, 254, 255, 0.62);
  --status-card-bg: linear-gradient(135deg, rgba(250, 254, 255, 0.88), rgba(219, 241, 253, 0.74));
  --status-card-border: rgba(53, 111, 183, 0.78);
  --status-error-bg: linear-gradient(135deg, rgba(255, 249, 243, 0.92), rgba(255, 231, 223, 0.76));
  --loading-chip-bg: linear-gradient(135deg, rgba(250, 254, 255, 0.72), rgba(224, 242, 252, 0.56));
}

:root[data-sky="partly-cloudy-day"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.36), rgba(210, 232, 245, 0.18) 44%, transparent 74%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, rgba(248, 253, 255, 0.78), rgba(215, 233, 245, 0.58));
  --hero-card-overlay:
    radial-gradient(circle at 22% 14%, rgba(255, 236, 156, 0.20), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(94, 128, 155, 0.12));
  --hero-panel-bg: rgba(248, 253, 255, 0.60);
  --status-card-bg: linear-gradient(135deg, rgba(250, 254, 255, 0.86), rgba(225, 238, 247, 0.72));
  --status-card-border: rgba(70, 120, 170, 0.72);
  --status-error-bg: linear-gradient(135deg, rgba(255, 249, 243, 0.9), rgba(255, 232, 224, 0.74));
  --loading-chip-bg: linear-gradient(135deg, rgba(250, 254, 255, 0.70), rgba(226, 239, 248, 0.54));
}

:root[data-sky="overcast-day"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(245, 250, 253, 0.28), rgba(186, 202, 213, 0.18) 45%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(241, 247, 250, 0.76), rgba(203, 216, 225, 0.62));
  --hero-card-overlay:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(70, 88, 102, 0.14));
  --hero-panel-bg: rgba(246, 250, 252, 0.58);
  --status-card-bg: linear-gradient(135deg, rgba(247, 251, 253, 0.84), rgba(210, 221, 229, 0.74));
  --status-card-border: rgba(91, 112, 130, 0.70);
  --status-error-bg: linear-gradient(135deg, rgba(255, 248, 244, 0.9), rgba(246, 224, 219, 0.74));
  --loading-chip-bg: linear-gradient(135deg, rgba(247, 251, 253, 0.68), rgba(215, 225, 232, 0.56));
}

:root[data-sky="rain-day"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(234, 243, 248, 0.24), rgba(120, 144, 159, 0.18) 44%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(234, 243, 249, 0.70), rgba(172, 190, 202, 0.64));
  --hero-card-overlay:
    radial-gradient(circle at 18% 14%, rgba(201, 226, 241, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(39, 76, 103, 0.17));
  --hero-panel-bg: rgba(240, 247, 251, 0.54);
  --status-card-bg: linear-gradient(135deg, rgba(240, 248, 252, 0.82), rgba(188, 205, 217, 0.72));
  --status-card-border: rgba(47, 121, 168, 0.76);
  --status-error-bg: linear-gradient(135deg, rgba(255, 248, 244, 0.88), rgba(242, 220, 216, 0.72));
  --loading-chip-bg: linear-gradient(135deg, rgba(240, 248, 252, 0.64), rgba(190, 207, 219, 0.54));
}

:root[data-sky="snow-day"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.38), rgba(219, 238, 248, 0.18) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, rgba(254, 255, 255, 0.82), rgba(223, 238, 247, 0.66));
  --hero-card-overlay:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.26), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(86, 125, 149, 0.12));
  --hero-panel-bg: rgba(254, 255, 255, 0.66);
  --status-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(226, 239, 247, 0.76));
  --status-card-border: rgba(63, 120, 155, 0.66);
  --status-error-bg: linear-gradient(135deg, rgba(255, 250, 247, 0.9), rgba(247, 228, 224, 0.74));
  --loading-chip-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(226, 239, 247, 0.56));
}

:root[data-sky="thunder-day"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(230, 237, 242, 0.24), rgba(79, 96, 112, 0.20) 44%, transparent 74%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(218, 228, 236, 0.68), rgba(125, 143, 157, 0.62));
  --hero-card-overlay:
    radial-gradient(circle at 20% 12%, rgba(255, 221, 92, 0.16), transparent 27%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(32, 42, 58, 0.20));
  --hero-panel-bg: rgba(230, 238, 243, 0.52);
  --status-card-bg: linear-gradient(135deg, rgba(235, 243, 248, 0.80), rgba(152, 169, 181, 0.70));
  --status-card-border: rgba(183, 118, 31, 0.82);
  --status-error-bg: linear-gradient(135deg, rgba(255, 246, 239, 0.88), rgba(239, 216, 208, 0.72));
  --loading-chip-bg: linear-gradient(135deg, rgba(235, 243, 248, 0.62), rgba(156, 173, 185, 0.52));
}

:root[data-sky="clear-night"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(158, 186, 230, 0.16), rgba(37, 66, 118, 0.10) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(120, 153, 210, 0.13), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(16, 27, 43, 0.78), rgba(9, 20, 40, 0.58));
  --hero-card-overlay:
    radial-gradient(circle at 18% 12%, rgba(185, 211, 255, 0.13), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
  --hero-panel-bg: rgba(17, 29, 45, 0.54);
  --status-card-bg: linear-gradient(135deg, rgba(17, 29, 45, 0.82), rgba(9, 20, 39, 0.68));
  --status-card-border: rgba(111, 145, 207, 0.74);
  --status-error-bg: linear-gradient(135deg, rgba(44, 29, 31, 0.82), rgba(55, 23, 30, 0.68));
  --loading-chip-bg: linear-gradient(135deg, rgba(17, 29, 45, 0.70), rgba(9, 20, 39, 0.54));
}

:root[data-sky="partly-cloudy-night"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(137, 160, 205, 0.14), rgba(38, 53, 87, 0.10) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(110, 139, 195, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(17, 27, 43, 0.78), rgba(11, 22, 46, 0.58));
  --hero-card-overlay:
    radial-gradient(circle at 20% 14%, rgba(178, 202, 244, 0.11), transparent 31%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.17));
  --hero-panel-bg: rgba(18, 29, 45, 0.54);
  --status-card-bg: linear-gradient(135deg, rgba(18, 29, 45, 0.82), rgba(12, 23, 47, 0.68));
  --status-card-border: rgba(105, 135, 194, 0.70);
  --status-error-bg: linear-gradient(135deg, rgba(44, 29, 31, 0.82), rgba(55, 23, 30, 0.68));
  --loading-chip-bg: linear-gradient(135deg, rgba(18, 29, 45, 0.70), rgba(12, 23, 47, 0.54));
}

:root[data-sky="overcast-night"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(118, 132, 154, 0.12), rgba(31, 40, 56, 0.12) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(127, 145, 170, 0.10), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(22, 29, 40, 0.80), rgba(15, 22, 34, 0.62));
  --hero-card-overlay:
    radial-gradient(circle at 18% 12%, rgba(178, 190, 208, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.20));
  --hero-panel-bg: rgba(24, 33, 45, 0.56);
  --status-card-bg: linear-gradient(135deg, rgba(24, 33, 45, 0.84), rgba(15, 22, 34, 0.70));
  --status-card-border: rgba(126, 144, 163, 0.62);
  --status-error-bg: linear-gradient(135deg, rgba(45, 30, 32, 0.84), rgba(56, 23, 30, 0.70));
  --loading-chip-bg: linear-gradient(135deg, rgba(24, 33, 45, 0.72), rgba(15, 22, 34, 0.56));
}

:root[data-sky="rain-night"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(111, 132, 165, 0.11), rgba(18, 28, 43, 0.12) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(105, 130, 166, 0.10), rgba(255, 255, 255, 0.015)),
    linear-gradient(135deg, rgba(16, 24, 36, 0.82), rgba(9, 14, 24, 0.66));
  --hero-card-overlay:
    radial-gradient(circle at 18% 12%, rgba(138, 167, 204, 0.09), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.22));
  --hero-panel-bg: rgba(17, 27, 41, 0.58);
  --status-card-bg: linear-gradient(135deg, rgba(18, 28, 42, 0.86), rgba(9, 14, 24, 0.72));
  --status-card-border: rgba(116, 184, 255, 0.55);
  --status-error-bg: linear-gradient(135deg, rgba(45, 29, 32, 0.84), rgba(57, 23, 30, 0.70));
  --loading-chip-bg: linear-gradient(135deg, rgba(18, 28, 42, 0.74), rgba(9, 14, 24, 0.58));
  --daily-secondary: rgba(222, 236, 244, 0.84);
  --daily-secondary-strong: rgba(238, 247, 252, 0.92);
  --daily-section-meta: rgba(198, 218, 230, 0.84);
  --daily-rain-detail: rgba(178, 216, 232, 0.88);
  --daily-low-color: rgba(238, 247, 252, 0.90);
  --daily-condition-opacity: 1;
  --daily-low-opacity: 0.78;
  --daily-row-border: rgba(235, 246, 255, 0.13);
  --daily-track-bg: rgba(235, 246, 255, 0.16);
  --daily-text-shadow: 0 1px 12px rgba(0, 0, 0, 0.30);
}

:root[data-sky="snow-night"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(157, 178, 215, 0.13), rgba(34, 48, 78, 0.11) 42%, transparent 72%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(148, 174, 214, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(18, 30, 50, 0.82), rgba(14, 24, 40, 0.64));
  --hero-card-overlay:
    radial-gradient(circle at 18% 12%, rgba(221, 235, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
  --hero-panel-bg: rgba(20, 34, 56, 0.56);
  --status-card-bg: linear-gradient(135deg, rgba(20, 34, 56, 0.84), rgba(14, 24, 40, 0.70));
  --status-card-border: rgba(185, 236, 255, 0.50);
  --status-error-bg: linear-gradient(135deg, rgba(45, 30, 32, 0.84), rgba(56, 23, 30, 0.70));
  --loading-chip-bg: linear-gradient(135deg, rgba(20, 34, 56, 0.72), rgba(14, 24, 40, 0.56));
}

:root[data-sky="thunder-night"] {
  --launch-spotlight-bg: radial-gradient(ellipse at center, rgba(91, 95, 125, 0.12), rgba(16, 16, 24, 0.15) 42%, transparent 74%);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 214, 92, 0.06), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(15, 17, 25, 0.86), rgba(7, 8, 14, 0.72));
  --hero-card-overlay:
    radial-gradient(circle at 21% 13%, rgba(255, 220, 76, 0.10), transparent 29%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.24));
  --hero-panel-bg: rgba(18, 21, 31, 0.60);
  --status-card-bg: linear-gradient(135deg, rgba(18, 21, 31, 0.88), rgba(8, 9, 15, 0.74));
  --status-card-border: rgba(255, 220, 76, 0.58);
  --status-error-bg: linear-gradient(135deg, rgba(47, 28, 30, 0.86), rgba(60, 21, 29, 0.72));
  --loading-chip-bg: linear-gradient(135deg, rgba(18, 21, 31, 0.76), rgba(8, 9, 15, 0.60));
  --daily-secondary: rgba(226, 235, 242, 0.84);
  --daily-secondary-strong: rgba(241, 246, 250, 0.93);
  --daily-section-meta: rgba(201, 214, 224, 0.84);
  --daily-rain-detail: rgba(183, 215, 228, 0.88);
  --daily-low-color: rgba(241, 246, 250, 0.90);
  --daily-condition-opacity: 1;
  --daily-low-opacity: 0.80;
  --daily-row-border: rgba(242, 247, 255, 0.13);
  --daily-track-bg: rgba(242, 247, 255, 0.16);
  --daily-text-shadow: 0 1px 12px rgba(0, 0, 0, 0.32);
}

:root[data-sky="clear-night"],
:root[data-sky="partly-cloudy-night"],
:root[data-sky="overcast-night"],
:root[data-sky="rain-night"],
:root[data-sky="snow-night"],
:root[data-sky="thunder-night"] {
  --welcome-ambient-bg: linear-gradient(135deg, rgba(14, 24, 34, 0.78), rgba(23, 36, 48, 0.64));
  --welcome-ambient-fg: rgba(245, 250, 253, 0.95);
  --welcome-ambient-border: rgba(234, 246, 255, 0.24);
  --welcome-ambient-shadow:
    0 10px 24px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  --welcome-ambient-text-shadow: 0 1px 9px rgba(0, 0, 0, 0.40);
  --welcome-kicker-fg: #66d3ae;
  --welcome-headline-fg: rgba(244, 250, 253, 0.98);
  --welcome-sub-fg: rgba(231, 242, 248, 0.90);
  --welcome-moments-fg: rgba(216, 231, 239, 0.78);
  --welcome-copy-shadow: 0 2px 16px rgba(0, 0, 0, 0.48);
}

:root[data-theme="light"][data-sky-tone="bright"] {
  --ink-faint: #465b6c;
  --muted: #31495d;
  --border-glass: rgba(21, 43, 64, 0.20);
  --border-glass-md: rgba(21, 43, 64, 0.24);
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(218, 240, 252, 0.62));
  --hero-card-overlay:
    radial-gradient(circle at 18% 13%, rgba(255, 239, 142, 0.30), transparent 31%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(75, 127, 170, 0.12));
  --hero-panel-bg: rgba(255, 255, 255, 0.64);
  --status-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.90), rgba(225, 243, 253, 0.76));
  --status-card-border: rgba(51, 113, 187, 0.78);
  --loading-chip-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(225, 243, 253, 0.58));
}

:root[data-theme="light"][data-sky="clear-day"],
:root[data-theme="light"][data-sky="partly-cloudy-day"] {
  --ink-faint: #465b6c;
  --muted: #31495d;
  --border-glass: rgba(21, 43, 64, 0.20);
  --border-glass-md: rgba(21, 43, 64, 0.24);
}

:root[data-theme="light"][data-sky-tone="warm"] {
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 245, 229, 0.28), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, rgba(255, 250, 239, 0.80), rgba(238, 215, 196, 0.60));
  --hero-card-overlay:
    radial-gradient(circle at 20% 13%, rgba(255, 171, 84, 0.30), transparent 32%),
    linear-gradient(180deg, rgba(255, 239, 210, 0.10), rgba(145, 91, 69, 0.13));
  --hero-panel-bg: rgba(255, 250, 239, 0.62);
  --status-card-bg: linear-gradient(135deg, rgba(255, 250, 241, 0.88), rgba(238, 218, 201, 0.74));
  --status-card-border: rgba(181, 105, 42, 0.78);
  --loading-chip-bg: linear-gradient(135deg, rgba(255, 250, 241, 0.70), rgba(238, 218, 201, 0.54));
}

:root[data-theme="light"][data-sky-tone="hazy"] {
  --hero-card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, rgba(250, 253, 253, 0.78), rgba(218, 228, 232, 0.62));
  --hero-card-overlay:
    radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(92, 112, 124, 0.13));
  --hero-panel-bg: rgba(250, 253, 253, 0.60);
  --status-card-bg: linear-gradient(135deg, rgba(250, 253, 253, 0.86), rgba(218, 228, 232, 0.74));
  --status-card-border: rgba(91, 120, 138, 0.70);
  --loading-chip-bg: linear-gradient(135deg, rgba(250, 253, 253, 0.68), rgba(218, 228, 232, 0.54));
}

:root[data-theme="dark"][data-sky-tone="twilight"] {
  --hero-card-bg:
    linear-gradient(145deg, rgba(210, 150, 170, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(24, 29, 50, 0.80), rgba(35, 31, 49, 0.62));
  --hero-card-overlay:
    radial-gradient(circle at 21% 14%, rgba(250, 168, 117, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
  --hero-panel-bg: rgba(27, 31, 51, 0.56);
  --status-card-bg: linear-gradient(135deg, rgba(27, 31, 51, 0.84), rgba(35, 31, 49, 0.70));
  --status-card-border: rgba(190, 126, 153, 0.62);
  --loading-chip-bg: linear-gradient(135deg, rgba(27, 31, 51, 0.72), rgba(35, 31, 49, 0.56));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: var(--app-viewport-height, 100dvh);
  background: var(--sky-page-bg-color);
  background-color: var(--sky-page-bg-color);
}

body {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: var(--app-viewport-height, 100dvh);
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--sky-page-bg-color);
  background-color: var(--sky-page-bg-color);
  color: var(--ink);
}

html[data-sky] {
  background: var(--sky-page-bg-color);
  background-color: var(--sky-page-bg-color);
}

html[data-sky] body {
  background: var(--sky-page-bg-color);
  background-color: var(--sky-page-bg-color);
}

#skyCanvas {
  position: fixed;
  top: calc(-1 * (var(--sky-viewport-overscan, 360px) + env(safe-area-inset-top, 0px)));
  right: 0;
  bottom: calc(-1 * (var(--sky-viewport-overscan, 360px) + env(safe-area-inset-bottom, 0px)));
  left: 0;
  height: auto;
  min-height: calc(var(--app-viewport-height, 100dvh) + (var(--sky-viewport-overscan, 360px) * 2) + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--sky-page-bg);
  background-size: cover;
  background-color: var(--sky-page-bg-color);
  transition: background 1.5s;
}

#skyCanvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--welcome-stage-wash);
  opacity: 0;
  transition: opacity 1.2s ease;
}

#skyCanvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--sky-veil);
  opacity: 0;
  transition: opacity 1.5s;
}

:root[data-welcome] #skyCanvas::before {
  opacity: 1;
}

:root[data-theme="light"][data-sky$="-day"] #skyCanvas::after {
  opacity: var(--sky-veil-opacity, 0.62);
}

:root[data-theme="dark"][data-sky$="-night"] #skyCanvas::after {
  opacity: var(--sky-veil-opacity, 0.08);
}

#skyCanvas svg {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sky-star {
  animation: sky-twinkle linear infinite;
}

@keyframes sky-twinkle {
  0%, 100% { opacity: var(--op, 0.5); }
  50% { opacity: calc(var(--op, 0.5) * 0.2); }
}

.sky-sun-rays {
  transform-origin: 0 0;
  animation: sky-rays 150s linear infinite;
}

@keyframes sky-rays {
  to { transform: rotate(360deg); }
}

.sky-shoot {
  opacity: 0;
  animation: sky-shoot 16s ease-in infinite;
}

@keyframes sky-shoot {
  0% { opacity: 0; transform: translate(64px, -28px); }
  2.5% { opacity: 0.9; }
  6% { opacity: 0; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(0, 0); }
}

.sky-moon-glow {
  animation: sky-moon-pulse 5s ease-in-out infinite;
}

@keyframes sky-moon-pulse {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.24; }
}

.sky-cloud {
  animation: sky-cloud-drift ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes sky-cloud-drift {
  from { transform: translateX(-32px); }
  to   { transform: translateX(32px); }
}

.sky-rain-atmosphere,
.sky-rain-curtain,
.sky-rain-foreground {
  pointer-events: none;
}

.sky-rain-sheet {
  animation: sky-rain-sheet-drift ease-in-out infinite alternate;
  transform-origin: center;
  will-change: transform, opacity;
}

.sky-rain-layer {
  animation-name: sky-rain-layer-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform-box: view-box;
  transform-origin: 0 0;
  will-change: transform;
}

.sky-rain-streak {
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

@keyframes sky-rain-sheet-drift {
  from { transform: translateX(calc(var(--rain-drift, 24px) * -0.12)); }
  to   { transform: translateX(calc(var(--rain-drift, 24px) * 0.22)); }
}

@keyframes sky-rain-layer-fall {
  from { transform: translateY(0); }
  to   { transform: translateY(var(--rain-distance, 1200px)); }
}

.sky-snow {
  animation: sky-snow-fall linear infinite;
}

@keyframes sky-snow-fall {
  from { transform: translateY(-10px) translateX(0); opacity: 0; }
  8%   { opacity: 0.85; }
  92%  { opacity: 0.7; }
  to   { transform: translateY(105vh) translateX(var(--drift, 20px)); opacity: 0; }
}

.sky-lightning {
  animation: sky-lightning-flash 10s ease infinite;
}

@keyframes sky-lightning-flash {
  0%, 82%, 100% { opacity: 0; }
  84% { opacity: 0.55; }
  86% { opacity: 0; }
  88% { opacity: 0.3; }
  90% { opacity: 0; }
}

button,
input,
select,
textarea {
  font: inherit;
}

/* iOS Safari zooms the viewport when focused text controls render below 16px. */
input:not([type="range"]),
select,
textarea {
  font-size: 1rem;
}

button {
  cursor: pointer;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.shell.has-status:not(.mode-welcome) {
  padding-top: 84px;
}

.shell.has-status:not(.mode-welcome).search-open {
  padding-top: 210px;
}

.shell::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: -10vh;
  bottom: -10vh;
  left: 50%;
  width: min(1360px, 88vw);
  transform: translateX(-50%);
  pointer-events: none;
  background: var(--content-wash);
  -webkit-mask-image: radial-gradient(ellipse 68% 58% at 50% 38%, #000 0%, rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.24) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 68% 58% at 50% 38%, #000 0%, rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.24) 72%, transparent 100%);
}

.search,
.saved-row,
.hero,
.panel,
.status,
.loading-chip,
.insight-band,
.map-panel {
  backdrop-filter: blur(18px);
}

.topbar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 0px));
  left: max(14px, calc((100vw - 1120px) / 2));
  z-index: 80;
  display: block;
  padding: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
  will-change: transform, opacity;
}

.shell.chrome-tucked:not(.menu-open) .topbar {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-18px, calc(-100% - max(18px, env(safe-area-inset-top, 0px))), 0) scale(0.94);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-lockup-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 48px;
  filter: drop-shadow(0 10px 18px rgba(20, 42, 52, 0.14));
}
.brand-lockup-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-lockup-copy {
  min-width: 0;
}
.brand-wordmark {
  font-weight: 950;
}
.brand-cast {
  color: var(--green);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.18rem, 2.2vw, 1.45rem);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.app-version {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  vertical-align: middle;
  opacity: 0.5;
}

h2 {
  font-size: 1rem;
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.app-menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--glass-heavy);
  color: var(--ink);
  box-shadow:
    0 10px 28px rgba(13, 27, 38, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.app-menu-toggle:focus {
  outline: none;
}

.app-menu-toggle:focus-visible {
  outline: 3px solid rgba(74, 127, 205, 0.34);
  outline-offset: 3px;
}

.app-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.app-menu-toggle span + span {
  margin-top: 4px;
}

.app-menu-toggle[aria-expanded="true"] {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 12px 30px rgba(13, 27, 38, 0.16);
}

.app-menu {
  position: absolute;
  top: 56px;
  left: 0;
  width: min(372px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--border-glass-md);
  border-radius: 18px;
  background: var(--glass-heavy);
  box-shadow: 0 24px 70px rgba(10, 24, 34, 0.24);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: auto;
}

.app-menu .brand-lockup {
  margin-bottom: 12px;
}

.app-menu .actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.app-menu .icon-button {
  width: 100%;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-glass-md);
  border-radius: 8px;
  background: var(--glass-light);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(29, 48, 58, 0.1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.search-popover {
  display: none;
}

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  background: var(--glass-search);
  box-shadow: var(--shadow);
}

.search input {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  padding: 13px 14px;
  background: var(--panel-soft);
  color: var(--ink);
  outline: 1px solid transparent;
  touch-action: manipulation;
}

.search input:focus {
  outline-color: var(--blue);
}

.search button,
.result-button,
.map-mode,
.play-button {
  border: 0;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 800;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.search-close {
  min-width: 42px;
  font-size: 1.2rem;
  line-height: 1;
}

.search button[type="submit"] {
  padding: 0 18px;
}
.search-locate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
  opacity: 0.75;
}
.search-locate:hover {
  opacity: 1;
}
.search-locate svg {
  width: 18px;
  height: 18px;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.result-button {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  background: var(--glass-result);
  color: var(--ink);
  border: 1px solid var(--border-glass);
  text-align: left;
}

.result-button small {
  color: var(--muted);
  font-weight: 700;
}

.saved-row {
  min-width: 0;
  margin: 0;
}

.place-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  background: var(--stage-ribbon-bg);
  color: var(--ink);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  text-align: left;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.place-switcher[hidden] {
  display: none;
}
.place-switcher:hover {
  border-color: var(--blue);
}
.place-switcher-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--stage-ribbon-icon-bg);
  color: var(--blue);
  flex-shrink: 0;
}
.place-switcher-icon svg {
  width: 17px;
  height: 17px;
}
.place-switcher-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.place-switcher-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
  font-weight: 850;
}
.place-switcher-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.place-switcher-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.status {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--status-card-bg);
  color: var(--status-card-text, var(--muted));
  border-left: 4px solid var(--status-card-border);
}

.status.error {
  background: var(--status-error-bg);
  border-left-color: var(--status-error-border);
  color: var(--red);
}

.loading-chip {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: min(340px, calc(100vw - 40px));
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--border-glass-md);
  border-radius: 999px;
  background: var(--loading-chip-bg);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 34px rgba(20, 34, 48, 0.13);
  pointer-events: none;
}

.loading-chip[hidden] {
  display: none !important;
}

.loading-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loading-chip-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(53, 111, 183, 0.34);
  animation: loading-chip-pulse 1.25s ease-in-out infinite;
}

.welcome-loading {
  display: none;
  margin: 8px auto 0;
}

.mode-welcome .welcome-loading:not([hidden]) {
  display: inline-flex;
}

.shell:not(.mode-welcome) .welcome-loading,
.shell:not(.mode-welcome) .welcome-ambient-label,
.mode-welcome .launch-loading {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.launch-loading {
  margin-top: 14px;
}

@keyframes loading-chip-pulse {
  0% {
    opacity: 0.62;
    transform: scale(0.84);
    box-shadow: 0 0 0 0 rgba(53, 111, 183, 0.34);
  }

  55% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(53, 111, 183, 0);
  }

  100% {
    opacity: 0.62;
    transform: scale(0.84);
    box-shadow: 0 0 0 0 rgba(53, 111, 183, 0);
  }
}

.launch-stage {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: clamp(360px, 58svh, 620px);
  padding: clamp(72px, 11vh, 120px) 12px clamp(40px, 7vh, 82px);
  margin-bottom: 8px;
  text-align: center;
}

.launch-stage::before {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 6%;
  left: 50%;
  width: min(760px, 88vw);
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--launch-spotlight-bg);
  pointer-events: none;
}

.launch-place-row,
.launch-current,
.launch-alert,
.launch-stage .summary,
.for-you-today {
  position: relative;
  z-index: 1;
}

.launch-place-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: min(620px, 92vw);
}

.launch-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: min(520px, 88vw);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 850;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.36);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.launch-location:not(:disabled) {
  cursor: pointer;
}

.launch-location:not(:disabled):hover {
  color: var(--ink);
}

:root[data-theme="dark"] .launch-location,
:root[data-theme="dark"] .hero-range {
  color: rgba(229, 242, 249, 0.84);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.50);
}

.launch-current {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: clamp(4px, 0.8vw, 8px);
  margin-top: 14px;
}

.launch-main-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 24px);
}

.launch-stage .now-temp {
  margin: 0;
  text-shadow: 0 20px 60px rgba(12, 24, 36, 0.18);
}

.hero-range {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.94rem, 1.9vw, 1.14rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-shadow: 0 10px 26px rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

.launch-stage .summary {
  max-width: 840px;
  margin-top: 20px;
  color: var(--ink);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.28);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  min-height: 0;
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  background: var(--hero-card-bg);
  box-shadow: var(--hero-shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--hero-card-overlay);
  mix-blend-mode: screen;
}

.hero-copy,
.today-glance {
  position: relative;
  z-index: 1;
}

.now-temp {
  font-size: clamp(4.8rem, 17vw, 11rem);
  line-height: 0.86;
  font-weight: 900;
}

.hero-icon {
  flex-shrink: 0;
  width: clamp(64px, 10vw, 110px);
  height: clamp(64px, 10vw, 110px);
}

.hero-icon svg {
  width: 100%;
  height: 100%;
}

.summary {
  max-width: 720px;
  margin-top: 18px;
  color: var(--ink);
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 750;
  text-wrap: balance;
}
.summary.summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: min(860px, 94vw);
  margin-top: 18px;
  font-size: 0.96rem;
  font-weight: 800;
  text-wrap: wrap;
}
.summary-strip-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 38px;
  max-width: min(100%, 330px);
  padding: 8px 12px;
  border: 1px solid var(--summary-chip-border);
  border-radius: 999px;
  background: var(--summary-chip-bg);
  box-shadow: 0 12px 34px rgba(27, 45, 62, 0.08);
  appearance: none;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  backdrop-filter: blur(14px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.summary-strip-item:focus-visible {
  outline: 3px solid rgba(74, 127, 205, 0.34);
  outline-offset: 3px;
}
.summary-strip-item b {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.summary-strip-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-strip-item.is-rain,
.summary-strip-item.is-snow {
  border-color: var(--summary-rain-border);
  background: var(--summary-rain-bg);
}
.summary-strip-item.is-dry {
  border-color: var(--summary-dry-border);
  background: var(--summary-dry-bg);
}
.summary-strip-cue {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.launch-shortcuts[hidden] {
  display: none;
}
.launch-shortcuts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: min(720px, 94vw);
  margin-top: 10px;
}
.launch-shortcuts button {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--summary-chip-border);
  border-radius: 999px;
  background: var(--summary-chip-bg);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  backdrop-filter: blur(14px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.launch-shortcuts button:hover,
.launch-shortcuts button:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.for-you-today[hidden] {
  display: none;
}
.for-you-today {
  display: grid;
  gap: 7px;
  width: min(720px, 94vw);
  margin-top: 12px;
  text-align: left;
}
.for-you-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: var(--for-you-text);
  text-shadow: var(--for-you-text-shadow);
}
.for-you-head span,
.for-you-head strong,
.for-you-head small {
  display: block;
  min-width: 0;
}
.for-you-head strong {
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}
.for-you-head small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--for-you-muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.for-you-plan-btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(53, 111, 183, 0.25);
  border-radius: 999px;
  background: var(--for-you-plan-btn-bg);
  color: var(--for-you-plan-btn-fg);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 950;
  backdrop-filter: blur(14px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.for-you-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.for-you-today.is-single .for-you-grid {
  grid-template-columns: minmax(0, min(100%, 420px));
}
.for-you-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 98px;
  padding: 11px;
  border: 1px solid var(--for-you-card-border);
  border-radius: 8px;
  background: var(--for-you-card-bg);
  box-shadow: 0 14px 34px rgba(27, 45, 62, 0.10);
  color: var(--for-you-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  backdrop-filter: blur(16px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.for-you-card:hover,
.for-you-card:focus-visible,
.for-you-plan-btn:hover,
.for-you-plan-btn:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.for-you-card.is-plan {
  border-color: rgba(52, 125, 98, 0.28);
  background: var(--for-you-plan-bg);
}
.for-you-card.is-plan.is-caution {
  border-color: rgba(201, 152, 55, 0.34);
  background:
    linear-gradient(135deg, rgba(201, 152, 55, 0.13), rgba(53, 111, 183, 0.07)),
    rgba(255, 255, 255, 0.42);
}
.for-you-card.is-plan.is-watch {
  border-color: rgba(200, 85, 85, 0.32);
  background:
    linear-gradient(135deg, rgba(200, 85, 85, 0.12), rgba(53, 111, 183, 0.07)),
    rgba(255, 255, 255, 0.42);
}
.for-you-card.is-away {
  border-color: rgba(53, 111, 183, 0.30);
  background: var(--for-you-away-bg);
}
.for-you-card.is-weather.is-rain,
.for-you-card.is-weather.is-snow {
  border-color: var(--summary-rain-border);
  background: var(--summary-rain-bg);
}
.for-you-card.is-interruption {
  border-color: rgba(201, 152, 55, 0.36);
  background:
    linear-gradient(135deg, rgba(201, 152, 55, 0.14), rgba(255, 255, 255, 0.16)),
    rgba(255, 255, 255, 0.42);
}
.for-you-card.is-interruption.is-rain,
.for-you-card.is-interruption.is-watch {
  border-color: rgba(200, 85, 85, 0.32);
  background:
    linear-gradient(135deg, rgba(200, 85, 85, 0.12), rgba(201, 152, 55, 0.09)),
    rgba(255, 255, 255, 0.42);
}
.for-you-card.is-action {
  border-color: rgba(53, 111, 183, 0.25);
  background: var(--for-you-action-bg);
}
.for-you-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--for-you-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}
.for-you-kicker span,
.for-you-kicker em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.for-you-kicker em {
  max-width: 54%;
  color: var(--for-you-accent);
  font-style: normal;
}
.for-you-card strong {
  display: block;
  min-width: 0;
  color: var(--for-you-text);
  font-size: 0.93rem;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.for-you-body {
  display: block;
  min-width: 0;
  color: var(--for-you-text);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.for-you-card small {
  align-self: end;
  min-width: 0;
  overflow: hidden;
  color: var(--for-you-muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-glance {
  display: grid;
  gap: 18px;
}

.glance-kicker {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 7px;
}

.glance-title {
  max-width: 900px;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 850;
  line-height: 1.08;
  text-wrap: balance;
}

.glance-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.glance-signal,
.daylight-card,
.insight,
.panel {
  border: 1px solid var(--border-glass);
  border-radius: 8px;
}

.glance-signal,
.daylight-card {
  background: var(--hero-panel-bg);
}

.insight,
.panel {
  background: var(--glass-mid);
}

.glance-signal {
  position: relative;
  min-height: 116px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.glance-signal-optional {
  display: none;
}

.glance-signal-optional.is-visible {
  display: block;
}

.glance-signals.has-humidity {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.glance-signal > span,
.daylight-head span,
.section-head span,
.hour-card span,
.day-meta,
.insight span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.glance-signal.has-tip {
  cursor: help;
  position: relative;
}

.glance-signal.has-tip::before {
  display: none;
}

.glance-signal.has-tip > span {
  text-decoration: underline dotted var(--border-glass-md);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.glance-signal.has-tip:hover > span {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

.glance-signal > span,
.daylight-head span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.glance-signal > span svg,
.daylight-head span svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.glance-signal strong {
  display: block;
  margin-top: 7px;
  font-size: 1.38rem;
}

.air-quality-card,
.glance-signal-optional.is-visible.air-quality-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.air-quality-card::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--air-card-glow, rgba(36, 180, 107, 0.26)) 0%, transparent 67%);
  opacity: 0.48;
  pointer-events: none;
  z-index: 0;
}

.air-quality-card.air-good { --air-card-accent: #24b46b; --air-card-glow: rgba(36, 180, 107, 0.34); }
.air-quality-card.air-moderate { --air-card-accent: #e3b72f; --air-card-glow: rgba(227, 183, 47, 0.34); }
.air-quality-card.air-sensitive { --air-card-accent: #ef8a2f; --air-card-glow: rgba(239, 138, 47, 0.38); }
.air-quality-card.air-unhealthy { --air-card-accent: #df4f55; --air-card-glow: rgba(223, 79, 85, 0.40); }
.air-quality-card.air-very-unhealthy { --air-card-accent: #9a62d0; --air-card-glow: rgba(154, 98, 208, 0.40); }
.air-quality-card.air-hazardous { --air-card-accent: #8d3150; --air-card-glow: rgba(141, 49, 80, 0.42); }

#humiditySignal.air-quality-card > span:first-child {
  position: relative;
  z-index: 1;
}

#humiditySignal.air-quality-card #humidity {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1;
  align-items: center;
  min-height: 88px;
  margin-top: 8px;
}

#humiditySignal.air-quality-card #humidityContext {
  position: relative;
  z-index: 1;
  margin-top: 8px;
}

.air-visual {
  display: grid;
  grid-template-columns: minmax(56px, 0.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
}

.air-orb {
  position: relative;
  display: block;
  width: min(68px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background:
    conic-gradient(var(--air-accent) var(--air-level), rgba(116, 131, 150, 0.20) 0),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.10) 32%, transparent 54%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26) inset,
    0 8px 24px var(--air-glow);
}

.air-orb::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.22) 28%, transparent 48%),
    radial-gradient(circle at 50% 55%, var(--air-accent), rgba(255, 255, 255, 0.18) 72%);
  opacity: 0.92;
}

.air-orb-core,
.air-orb-mist {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.air-orb-core {
  border: 1px solid rgba(255, 255, 255, 0.30);
}

.air-orb-mist {
  background:
    linear-gradient(112deg, transparent 14%, rgba(255, 255, 255, 0.28) 34%, transparent 52%),
    linear-gradient(292deg, transparent 20%, rgba(255, 255, 255, 0.18) 48%, transparent 66%);
  opacity: 0.58;
  mix-blend-mode: screen;
}

.air-visual-copy {
  min-width: 0;
  align-self: center;
}

.air-visual-copy b,
.air-visual-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.air-visual-copy b {
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.26rem);
  font-weight: 900;
  line-height: 1.02;
  white-space: normal;
}

.air-visual-copy em {
  margin-top: 7px;
  color: var(--muted);
  font-size: clamp(0.78rem, 1.45vw, 0.9rem);
  font-style: normal;
  font-weight: 850;
  line-height: 1.1;
  white-space: normal;
}

.glance-signal small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.wind-dial-value {
  margin-top: 8px;
  font-size: 1rem;
}

.wind-dial {
  position: relative;
  display: block;
  width: min(92px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  color: var(--ink);
}

.wind-dial-ring {
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  border: 1px solid rgba(180, 210, 232, 0.20);
  background: repeating-conic-gradient(rgba(184, 207, 226, 0.24) 0deg 1.4deg, transparent 1.4deg 6deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}

.wind-dial-cardinal {
  position: absolute;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
}

.wind-dial-cardinal.is-n {
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
}

.wind-dial-cardinal.is-e {
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
}

.wind-dial-cardinal.is-s {
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
}

.wind-dial-cardinal.is-w {
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
}

.wind-dial-pointer {
  position: absolute;
  inset: 0;
  transform: rotate(var(--wind-dir, 0deg));
  transform-origin: 50% 50%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.24));
}

.wind-dial-pointer svg {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 24px;
  height: 36px;
  color: var(--ink);
  transform: translateX(-50%);
}

.wind-dial-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  line-height: 1;
  pointer-events: none;
}

.wind-dial-center b {
  font-size: 1.28rem;
  font-weight: 950;
  letter-spacing: 0;
}

.wind-dial-center em,
.wind-dial-direction {
  color: var(--ink);
  font-style: normal;
  font-weight: 850;
}

.wind-dial-center em {
  margin-top: 1px;
  font-size: 0.78rem;
}

.wind-dial-direction {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  text-transform: uppercase;
  white-space: nowrap;
}

#windSignal small {
  margin-top: 5px;
  text-align: center;
}

.daylight-card {
  --uv-accent: rgba(166, 177, 188, 0.42);
  --uv-dot: rgba(122, 143, 162, 0.98);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.daylight-card.uv-moderate {
  --uv-accent: rgba(221, 186, 73, 0.42);
  --uv-dot: rgba(201, 154, 38, 0.98);
}

.daylight-card.uv-high {
  --uv-accent: rgba(223, 139, 54, 0.44);
  --uv-dot: rgba(201, 107, 36, 0.98);
}

.daylight-card.uv-very-high,
.daylight-card.uv-extreme {
  --uv-accent: rgba(203, 78, 85, 0.42);
  --uv-dot: rgba(190, 60, 79, 0.98);
}

.daylight-head,
.daylight-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daylight-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.daylight-head strong {
  color: var(--ink);
  font-size: 0.98rem;
  text-align: right;
}

.daylight-context {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.daylight-arc {
  position: relative;
  height: clamp(168px, 20vw, 202px);
  padding-top: 68px;
  overflow: visible;
  border-radius: 7px;
  cursor: crosshair;
  touch-action: pan-y;
}

.daylight-plot {
  position: relative;
  height: 100%;
  min-height: 112px;
  overflow: visible;
  border-radius: 7px;
}

.daylight-plot svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.daylight-arc:focus-visible {
  outline: 2px solid rgba(91, 141, 220, 0.86);
  outline-offset: 3px;
}

.daylight-horizon {
  stroke: var(--border-glass-md);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.daylight-night-arc {
  fill: none;
  stroke: rgba(81, 101, 121, 0.22);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.daylight-fill,
.daylight-uv-band {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.daylight-fill {
  stroke: rgba(129, 151, 172, 0.34);
  stroke-width: 6;
}

.daylight-uv-band {
  stroke: var(--uv-dot);
  stroke-width: 6;
  opacity: 0.9;
  filter: drop-shadow(0 0 7px var(--uv-accent));
}

.daylight-uv-band[hidden] {
  display: none;
}

.daylight-scrub-guide {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: 0.34;
  vector-effect: non-scaling-stroke;
}

.daylight-scrub-guide[hidden] {
  display: none;
}

.daylight-now-marker[hidden] {
  display: none;
}

.daylight-now-badge {
  position: absolute;
  top: -9px;
  left: var(--now-x, 50%);
  z-index: 2;
  min-width: 34px;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 60, 110, 0.18);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.daylight-now-badge[hidden] {
  display: none;
}

.daylight-now,
.daylight-uv,
.daylight-now-glow {
  position: absolute;
  left: var(--sun-x, 50%);
  top: var(--sun-y, 50%);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
}

.daylight-now-glow {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(5px);
}

.daylight-now-glow.is-day {
  background: rgba(232, 177, 58, 0.26);
}

.daylight-now {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--panel);
  background: var(--panel);
  box-shadow: 0 4px 12px rgba(12, 24, 36, 0.18);
}

.daylight-arc.is-scrubbing .daylight-now {
  transform: translate(-50%, -50%) scale(1.08);
}

.daylight-now.is-day {
  background: var(--sun);
  border-color: rgba(255, 255, 255, 0.82);
}

.daylight-now.is-night {
  background: var(--card-strong);
}

.daylight-uv {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--panel);
  background: var(--uv-dot);
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px var(--uv-accent));
}

.daylight-readout {
  min-width: 156px;
}

.daylight-readout.graph-callout {
  z-index: 3;
  max-width: calc(100% - 4px);
}

.daylight-readout .callout-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.daylight-readout .callout-main strong {
  font: inherit;
}

.daylight-readout #daylightReadoutMeta {
  color: var(--muted);
}

.daylight-times span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.daylight-times span:nth-child(2) {
  text-align: center;
  justify-items: center;
}

.daylight-times span:nth-child(3) {
  text-align: right;
  justify-items: end;
}

.daylight-times b {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daylight-times strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.insights-section {
  margin: -2px 0 20px;
  padding: 0 8px 2px;
}

.briefing[hidden] {
  display: none;
}
.briefing {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.briefing.briefing-stack {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}
.briefing-panel,
.plan-briefing {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.briefing-spark {
  color: var(--blue);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.briefing-spark svg {
  display: block;
  width: 1em;
  height: 1em;
}
.briefing-spark.spin {
  display: inline-block;
  animation: briefing-spin 1.4s linear infinite;
}
@keyframes briefing-spin {
  to { transform: rotate(360deg); }
}

/* CTA: enable / brief-me button */
.briefing-cta {
  padding: 0;
  border: 0;
  background: transparent;
}
.briefing-enable {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.briefing-enable:hover {
  border-color: var(--blue);
}
.briefing-enable .briefing-spark {
  font-size: 1.1rem;
}
.briefing-enable-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.briefing-enable-copy strong {
  font-weight: 800;
}
.briefing-enable-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 2px;
}

/* Loading / download progress */
.briefing-progress-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--ink);
}
.briefing-progress-head em {
  margin-left: auto;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.briefing-bar {
  height: 5px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.briefing-bar i {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.25s ease;
}

/* Generated / streaming text */
.briefing-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.briefing-row .briefing-spark {
  margin-top: 2px;
}
.briefing-copy {
  flex: 1;
  min-width: 0;
}
.briefing-copy strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 850;
}
.briefing-copy p {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}
.briefing-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}
.briefing-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.briefing-tag svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.75;
}
.briefing-body {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
}
.briefing-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--blue);
  animation: briefing-blink 1s steps(2) infinite;
}
@keyframes briefing-blink {
  50% { opacity: 0; }
}
.briefing-act {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}
.briefing-act:hover {
  color: var(--ink);
  border-color: var(--blue);
}
.briefing-compat {
  display: block;
}
.briefing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 24px;
}
.briefing-link {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}
.briefing-link:hover {
  border-color: var(--blue);
}
.briefing-copy-ok {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}
.briefing-err {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted);
}
.briefing-err .briefing-act {
  width: auto;
  padding: 0 12px;
  margin-left: auto;
}
.plan-briefing {
  display: grid;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(53, 111, 183, 0.10), rgba(52, 125, 98, 0.08)),
    var(--panel-soft);
  border-color: rgba(53, 111, 183, 0.22);
}
.plan-briefing-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-briefing-spark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(53, 111, 183, 0.12);
  color: var(--blue);
  font-size: 0.82rem;
  flex: 0 0 auto;
}
.plan-briefing-head strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 850;
}
.plan-briefing-head small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 1px;
}
.plan-briefing-lead {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.32;
}
.plan-briefing-list {
  display: grid;
  gap: 8px;
}
.plan-briefing-item {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(54, 76, 98, 0.20);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.plan-briefing-item:hover {
  border-color: rgba(53, 111, 183, 0.34);
  transform: translateY(-1px);
}
.plan-briefing-item.is-good {
  border-left-color: var(--green);
}
.plan-briefing-item.is-caution {
  border-left-color: var(--gold);
}
.plan-briefing-item.is-watch {
  border-left-color: var(--red);
}
.plan-briefing-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.plan-briefing-item-head strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 850;
}
.plan-briefing-item-head small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 1px;
}
.plan-briefing-item-head em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}
.plan-briefing-item-reason {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}
.plan-briefing-more {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(53, 111, 183, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}
.plan-pulse[hidden] {
  display: none;
}
.plan-pulse {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.next-plan-card,
.main-plan-briefing {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink);
}
.next-plan-card {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  overflow: hidden;
  border-color: rgba(53, 111, 183, 0.24);
  background:
    linear-gradient(135deg, rgba(53, 111, 183, 0.12), rgba(52, 125, 98, 0.08)),
    var(--panel-soft);
}
.next-plan-card.is-good {
  border-color: rgba(52, 125, 98, 0.30);
}
.next-plan-card.is-caution {
  border-color: rgba(201, 152, 55, 0.34);
  background:
    linear-gradient(135deg, rgba(201, 152, 55, 0.12), rgba(53, 111, 183, 0.07)),
    var(--panel-soft);
}
.next-plan-card.is-watch {
  border-color: rgba(200, 85, 85, 0.34);
  background:
    linear-gradient(135deg, rgba(200, 85, 85, 0.12), rgba(53, 111, 183, 0.07)),
    var(--panel-soft);
}
.next-plan-kicker,
.next-plan-title,
.next-plan-actions,
.main-plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.next-plan-kicker {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}
.next-plan-kicker span {
  color: var(--blue);
}
.next-plan-kicker em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-plan-title {
  align-items: flex-start;
  justify-content: space-between;
}
.next-plan-title strong {
  min-width: 0;
  font-size: 1rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.next-plan-title span {
  flex: 0 1 auto;
  max-width: 45%;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: right;
}
.next-plan-card p,
.main-plan-briefing p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}
.next-plan-card p span {
  color: var(--muted);
  font-weight: 700;
}
.next-plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.next-plan-metrics span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(54, 76, 98, 0.12);
}
.next-plan-metrics b,
.next-plan-metrics strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-plan-metrics b {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
}
.next-plan-metrics strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 900;
}
.next-plan-actions {
  flex-wrap: wrap;
}
.next-plan-actions button,
.plan-pulse-more {
  min-height: 31px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.next-plan-actions button {
  padding: 6px 11px;
  border: 1px solid rgba(53, 111, 183, 0.24);
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
}
.next-plan-actions button:first-child {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.next-plan-actions button:hover,
.next-plan-actions button:focus-visible,
.plan-pulse-more:hover,
.plan-pulse-more:focus-visible,
.plan-pulse-brief-item:hover,
.plan-pulse-brief-item:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.main-plan-briefing {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}
.main-plan-spark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(53, 111, 183, 0.12);
  color: var(--blue);
  font-size: 0.82rem;
}
.main-plan-head strong,
.main-plan-head small {
  display: block;
}
.main-plan-head strong {
  font-size: 0.92rem;
  font-weight: 850;
}
.main-plan-head small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.plan-pulse-brief-list {
  display: grid;
  gap: 7px;
}
.plan-pulse-brief-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(54, 76, 98, 0.16);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.30);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.plan-pulse-brief-item.is-good {
  border-left-color: var(--green);
}
.plan-pulse-brief-item.is-caution {
  border-left-color: var(--gold);
}
.plan-pulse-brief-item.is-watch {
  border-left-color: var(--red);
}
.plan-pulse-brief-item span,
.plan-pulse-brief-item strong,
.plan-pulse-brief-item small {
  display: block;
  min-width: 0;
}
.plan-pulse-brief-item strong {
  font-size: 0.86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.plan-pulse-brief-item small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.plan-pulse-brief-item em {
  max-width: 15rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
}
.plan-pulse-more {
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid rgba(53, 111, 183, 0.24);
  background: rgba(53, 111, 183, 0.10);
  color: var(--blue);
}
@media (max-width: 480px) {
  .next-plan-title {
    display: grid;
    gap: 3px;
  }
  .next-plan-title span {
    max-width: none;
    text-align: left;
  }
  .next-plan-metrics {
    grid-template-columns: 1fr;
  }
  .plan-pulse-brief-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .plan-pulse-brief-item em {
    max-width: none;
    text-align: left;
  }
}

/* ---------- Ask the forecast (Q&A) ---------- */
.ai-ask[hidden] {
  display: none;
}
.ai-ask {
  margin-bottom: 12px;
}
.ai-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
}
.ai-section-title strong {
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-section-title span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}
.memory-section-title {
  align-items: center;
}
.memory-section-title span {
  margin-left: auto;
}
.memory-manage-btn {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(91, 141, 220, 0.26);
  border-radius: 999px;
  background: rgba(91, 141, 220, 0.10);
  color: var(--ink);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.memory-manage-btn:hover,
.memory-manage-btn:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.best-window-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.best-window-card {
  display: block;
  min-height: 88px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.best-window-card:hover {
  border-color: var(--blue);
}
.best-window-card:disabled {
  opacity: 0.55;
  cursor: default;
}
.best-window-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.best-window-top {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}
.best-window-copy strong {
  font-size: 0.9rem;
  font-weight: 850;
  min-width: 0;
}
.best-window-badge {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}
.best-window-copy em {
  color: var(--ink);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
}
.best-window-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}
.memory-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.memory-empty-inline {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}
.memory-group-title {
  margin: 3px 0 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.memory-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(91, 141, 220, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 141, 220, 0.13), rgba(91, 141, 220, 0.04));
}
.memory-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.memory-main strong {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.memory-actions button,
.ask-memory-btn {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}
.memory-actions button:hover,
.ask-memory-btn:hover {
  border-color: var(--blue);
}
.memory-backdrop {
  z-index: 313;
}
.day-sheet.memory-sheet {
  z-index: 314;
  max-width: 620px;
}
.memory-sheet-head {
  margin-bottom: 12px;
}
.memory-sheet-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(91, 141, 220, 0.12);
  color: var(--blue);
  flex-shrink: 0;
}
.memory-sheet-icon svg {
  width: 25px;
  height: 25px;
}
.memory-sheet-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.memory-sheet-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.memory-sheet-summary:empty {
  display: none;
}
.memory-summary-stat {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(91, 141, 220, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.memory-summary-stat strong,
.memory-summary-stat span {
  display: block;
}
.memory-summary-stat strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1;
}
.memory-summary-stat span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.memory-sheet-body {
  display: grid;
  gap: 14px;
}
.global-memory-group {
  display: grid;
  gap: 7px;
}
.global-memory-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}
.global-memory-group-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-memory-group-title small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.global-memory-list {
  margin-bottom: 0;
}
.global-memory-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 11px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(91, 141, 220, 0.12), rgba(255, 255, 255, 0.03)),
    var(--panel-soft);
}
.global-memory-card.is-here {
  border-color: rgba(29, 122, 87, 0.32);
  background:
    linear-gradient(135deg, rgba(29, 122, 87, 0.12), rgba(91, 141, 220, 0.05)),
    var(--panel-soft);
}
.global-memory-card.is-past {
  border-color: rgba(129, 151, 172, 0.18);
  background: rgba(255, 255, 255, 0.03);
}
.global-memory-main {
  gap: 3px;
}
.global-memory-main .global-memory-kicker {
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.global-memory-card.is-here .global-memory-kicker {
  color: var(--green);
}
.global-memory-card.is-past .global-memory-kicker {
  color: var(--muted);
}
.global-memory-main strong {
  font-size: 0.98rem;
}
.global-memory-main em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-memory-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.global-memory-card.is-past .global-memory-actions {
  opacity: 0.88;
}
.memory-empty-state {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(91, 141, 220, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.memory-empty-state strong {
  font-size: 1rem;
  font-weight: 950;
}
.memory-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}
.memory-empty-state button,
.memory-new-btn {
  justify-self: start;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(91, 141, 220, 0.34);
  border-radius: 999px;
  background: rgba(91, 141, 220, 0.13);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}
.memory-new-btn {
  margin-top: 2px;
}
.memory-empty-state button:hover,
.memory-empty-state button:focus-visible,
.memory-new-btn:hover,
.memory-new-btn:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.memory-edit-backdrop {
  z-index: 323;
}
.day-sheet.memory-edit-sheet {
  z-index: 324;
  max-width: 620px;
}
.memory-edit-head {
  margin-bottom: 12px;
}
.memory-edit-body {
  display: grid;
  gap: 12px;
}
.memory-edit-form {
  display: grid;
  gap: 12px;
}
.memory-edit-field {
  display: grid;
  gap: 6px;
}
.memory-edit-field span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.memory-edit-field input,
.memory-edit-field select {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: var(--panel-soft);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  outline: 1px solid transparent;
}
.memory-edit-field input:focus,
.memory-edit-field select:focus {
  border-color: var(--blue);
  outline-color: rgba(91, 141, 220, 0.38);
}
.memory-edit-place-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.memory-edit-place-row button,
.memory-edit-actions button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.memory-edit-place-row button:hover,
.memory-edit-place-row button:focus-visible,
.memory-edit-actions button:hover,
.memory-edit-actions button:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.memory-edit-place-results {
  display: grid;
  gap: 7px;
  margin-top: -4px;
}
.memory-edit-place-results[hidden] {
  display: none;
}
.memory-edit-place-results p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}
.memory-edit-place-results button {
  display: grid;
  gap: 2px;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid rgba(91, 141, 220, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.memory-edit-place-results button:hover,
.memory-edit-place-results button:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.memory-edit-place-results strong {
  font-size: 0.88rem;
  font-weight: 900;
}
.memory-edit-place-results span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 9px;
}
.memory-edit-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(91, 141, 220, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(91, 141, 220, 0.10), rgba(255, 255, 255, 0.03)),
    var(--panel-soft);
}
.memory-edit-preview p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}
.memory-edit-preview div {
  min-width: 0;
}
.memory-edit-preview span,
.memory-edit-preview strong {
  display: block;
}
.memory-edit-preview span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.memory-edit-preview strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-edit-preview.is-warning {
  border-color: rgba(212, 88, 69, 0.26);
  background: rgba(212, 88, 69, 0.08);
}
.memory-edit-preview.is-loading {
  border-color: rgba(91, 141, 220, 0.26);
}
.memory-edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.memory-edit-save {
  border-color: rgba(91, 141, 220, 0.34) !important;
  background: rgba(91, 141, 220, 0.14) !important;
}
.memory-edit-actions button:disabled {
  opacity: 0.55;
  cursor: default;
}
#memoryDetailBackdrop {
  z-index: 321;
  background: transparent;
}
.day-sheet.memory-detail-sheet {
  z-index: 322;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.16),
    0 -18px 52px rgba(0, 0, 0, 0.24);
}
.memory-detail-head {
  margin-bottom: 12px;
}
.memory-detail-body {
  display: grid;
  gap: 18px;
}
.memory-detail-panel {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.memory-detail-panel:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.memory-detail-title {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}
.memory-detail-title strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}
.memory-detail-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}
.memory-detail-facts {
  display: grid;
  gap: 0;
  margin: 0;
}
.memory-detail-facts div {
  display: grid;
  grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(91, 141, 220, 0.14);
}
.memory-detail-facts dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.memory-detail-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}
.memory-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.memory-detail-actions button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}
.memory-detail-actions button:first-child {
  border-color: rgba(91, 141, 220, 0.34);
  background: rgba(91, 141, 220, 0.14);
}
.memory-detail-actions button:last-child {
  margin-left: auto;
}
.memory-detail-actions button:hover,
.memory-detail-actions button:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.ask-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ask-chip:hover {
  border-color: var(--blue);
}
.ask-template-chip::before {
  content: "+";
  margin-right: 6px;
  color: var(--blue);
  font-weight: 950;
}
.ask-chip:disabled {
  opacity: 0.5;
  cursor: default;
}
.ask-helper {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.35;
}
.ask-clarify {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.ask-clarify-chip {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
}
.ask-clarify-chip.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.ask-clarify-chip:hover {
  border-color: var(--blue);
}
.ask-clarify-chip.primary:hover,
.ask-clarify-chip.primary:focus-visible {
  border-color: var(--blue);
}
.ask-clarify-chip:disabled {
  opacity: 0.55;
  cursor: default;
}
.ask-confirm {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid rgba(91, 141, 220, 0.20);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(91, 141, 220, 0.10), rgba(52, 125, 98, 0.06)),
    rgba(255, 255, 255, 0.24);
}
.ask-confirm-head strong,
.ask-confirm-head small {
  display: block;
}
.ask-confirm-head strong {
  font-size: 0.9rem;
  font-weight: 900;
}
.ask-confirm-head small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}
.ask-confirm-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
.ask-confirm-facts div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(54, 76, 98, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
}
.ask-confirm-facts dt,
.ask-confirm-facts dd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-confirm-facts dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}
.ask-confirm-facts dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}
.ask-confirm p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
}
.ask-confirm-actions {
  margin-top: 0;
}
@media (max-width: 420px) {
  .ask-confirm-facts {
    grid-template-columns: 1fr;
  }
}
.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  scroll-margin-bottom: 84px;
}
.ask-form.is-drafting input {
  border-color: rgba(91, 141, 220, 0.72);
  box-shadow: 0 0 0 3px rgba(91, 141, 220, 0.16);
}
.ask-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--panel-soft);
  color: var(--ink);
  outline: 1px solid transparent;
}
.ask-form input:focus {
  outline-color: var(--blue);
  border-color: var(--blue);
}
.ask-form input:disabled {
  opacity: 0.6;
}
.ask-send {
  width: 42px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ask-send:focus {
  outline: none;
}
.ask-send:focus-visible {
  outline: 3px solid rgba(91, 141, 220, 0.36);
  outline-offset: 2px;
}
.ask-send:disabled {
  opacity: 0.5;
  cursor: default;
}
.ai-sheet.sheet-keyboard-active .ask-form {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 -2px;
  padding: 8px 2px 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), var(--glass-heavy) 28%),
    var(--bg);
}
.ask-exchange {
  margin-top: 11px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.ask-q {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.ask-a {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
}
.ask-exchange-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.ask-show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(91, 141, 220, 0.32);
  border-radius: 999px;
  background: rgba(91, 141, 220, 0.14);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ask-show:hover,
.ask-show:focus-visible {
  background: rgba(91, 141, 220, 0.22);
  outline: none;
}
.ask-memory-btn.primary {
  border-color: rgba(91, 141, 220, 0.36);
  background: rgba(91, 141, 220, 0.14);
}
.ask-memory-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(36, 180, 107, 0.12);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}
.ask-exchange.answering .ask-a::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--blue);
  animation: briefing-blink 1s steps(2) infinite;
}
.ask-err {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--red);
}
.ask-thread {
  margin: 11px 0;
  display: grid;
  gap: 9px;
}

@media (max-width: 560px) {
  .best-window-grid {
    grid-template-columns: 1fr;
  }

  .memory-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .memory-actions {
    justify-content: flex-start;
  }

  .memory-sheet-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .global-memory-main em {
    white-space: normal;
  }

  .memory-edit-grid {
    grid-template-columns: 1fr;
  }

  .memory-edit-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .memory-sheet-summary {
    grid-template-columns: 1fr;
  }

  .memory-section-title {
    flex-wrap: wrap;
  }

  .memory-section-title span {
    margin-left: 0;
  }

  .memory-edit-place-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Planner launcher (main view) + sheet ---------- */
.ai-launcher[hidden] {
  display: none;
}
.ai-launcher {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin-bottom: 4px;
  padding: 11px 2px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-glass);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.ai-launcher:hover {
  color: var(--blue);
}
.ai-launcher-spark {
  color: var(--blue);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.ai-launcher-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.ai-launcher-copy strong {
  font-weight: 800;
  font-size: 0.95rem;
}
.ai-launcher-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 1px;
}
.ai-launcher-chev {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.ai-sheet-head {
  margin-bottom: 4px;
}
.ai-sheet-spark {
  color: var(--blue);
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}
.ai-sheet-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.ai-trust-note {
  margin: 8px 0 10px;
  padding: 9px 11px;
  border: 1px solid rgba(91, 141, 220, 0.2);
  border-radius: 10px;
  background: rgba(91, 141, 220, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.35;
}
/* Inside the sheet the briefing/ask sit flush — no card chrome competition */
.ai-sheet .briefing {
  margin-top: 12px;
}
.ai-sheet .ai-ask {
  margin-bottom: 0;
}

/* ---------- Place switcher sheet ---------- */
.place-sheet-head {
  margin-bottom: 12px;
}
.place-sheet-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--blue);
  flex-shrink: 0;
}
.place-sheet-icon svg {
  width: 24px;
  height: 24px;
}
.place-sheet-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.place-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.place-save-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 60px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.place-save-button[hidden] {
  display: none;
}
.place-save-button:not(:disabled):hover {
  border-color: var(--blue);
}
.place-save-button.is-saved {
  border-color: rgba(29, 122, 87, 0.48);
  background: var(--panel-soft);
  color: var(--green);
}
.place-save-button:disabled {
  cursor: default;
}
.place-save-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--gold);
}
.place-save-button.is-saved .place-save-icon {
  color: var(--green);
}
.place-save-icon svg {
  width: 22px;
  height: 22px;
}
.place-save-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.place-save-copy strong,
.place-save-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-save-copy strong {
  font-size: 0.95rem;
  font-weight: 850;
}
.place-save-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.place-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
  gap: 8px;
}
.place-item-main {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.place-item.active .place-item-main {
  border-color: rgba(29, 122, 87, 0.55);
  box-shadow: inset 3px 0 0 var(--green);
}
.place-item-main:hover {
  border-color: var(--blue);
}
.place-item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--panel-soft);
}
.place-item-icon svg {
  width: 26px;
  height: 26px;
}
.place-item-icon:empty::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.place-item-copy {
  min-width: 0;
}
.place-item-copy strong,
.place-item-copy span,
.place-item-temp {
  display: block;
}
.place-item-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
  font-weight: 850;
}
.place-item-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.place-item-temp {
  font-size: 1rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.place-item-temp:empty {
  display: none;
}
.place-item-remove {
  width: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 900;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.place-item-remove:hover {
  color: var(--red);
  border-color: rgba(190, 56, 56, 0.45);
}
.place-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.place-empty strong {
  color: var(--ink);
}
.place-welcome-button {
  align-self: center;
  margin: 12px auto 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.52;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.place-welcome-button:hover,
.place-welcome-button:focus-visible {
  color: var(--ink);
  opacity: 0.82;
}

.insight-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.insight {
  position: relative;
  min-height: 86px;
  padding: 14px 22px 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.insight strong {
  display: block;
  margin-top: 7px;
  line-height: 1.25;
}

.insight:not(:first-child) {
  padding-left: 18px;
}

.insight:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 10px;
  bottom: 14px;
  width: 1px;
  background: var(--border-glass);
}

.panel {
  margin-bottom: 18px;
  padding: 18px;
  background: var(--glass-heavy);
  box-shadow: 0 12px 32px rgba(29, 48, 58, 0.1);
}

.hourly-panel {
  padding: 0 8px 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.daily-panel {
  padding: 0 8px 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
  text-align: right;
}

.hourly-panel .section-head {
  margin-bottom: 0;
  padding: 0 0 11px;
  border-bottom: 1px solid var(--border-glass);
}

.daily-panel .section-head {
  margin-bottom: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--daily-row-border);
}

.daily-panel .section-head span {
  color: var(--daily-section-meta);
  text-shadow: var(--daily-text-shadow);
}

.hourly {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 56px;
  gap: 0;
  overflow-x: auto;
  padding: 12px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hourly::-webkit-scrollbar {
  height: 6px;
}

.hourly::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--scroll-track);
}

.hourly::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--scroll-thumb);
}

.hourly::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

.hour-card {
  position: relative;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.14s ease;
}

.hour-card:focus-visible {
  outline: 3px solid rgba(74, 127, 205, 0.36);
  outline-offset: -2px;
}

.hour-card .rain-bar {
  width: 30px;
  margin-top: 4px;
}

.hour-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 0;
  bottom: 14px;
  width: 1px;
  background: var(--border-glass);
}

.hour-card.current {
  background: rgba(91, 140, 255, 0.12);
}

.hour-card.has-plan-memory {
  background: rgba(91, 141, 220, 0.08);
}

.hour-card.current.has-plan-memory {
  background: rgba(91, 141, 220, 0.16);
}

.hour-card .hour-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.hour-card.current .hour-label {
  color: var(--blue);
}

.hour-memory {
  max-width: 58px;
  margin: -1px 0 1px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(91, 141, 220, 0.16);
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Colored temps use OKLCH: its lightness is perceptually uniform, so a single
   theme-aware lightness gives every hue (incl. green, which washed out in HSL)
   the same contrast on the light/dark glass. Hue is set inline per temp.
   Browsers without OKLCH simply fall back to the inherited ink color. */
:root { --temp-text-l: 0.50; }
:root[data-theme="dark"] { --temp-text-l: 0.80; }

.hour-card .hour-temp {
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: oklch(var(--temp-text-l) 0.13 var(--t-h, 230));
}

.hour-card .hour-rain {
  min-height: 0.95em;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hour-icon {
  width: 24px;
  height: 24px;
  margin: 1px 0;
}

.hour-icon svg {
  width: 100%;
  height: 100%;
}

.weather-icon-with-badge {
  position: relative;
  overflow: visible;
}

.storm-potential-badge {
  position: absolute;
  right: -7px;
  bottom: -5px;
  z-index: 2;
  display: grid !important;
  place-items: center;
  width: 18px;
  height: 20px;
  border: 1px solid rgba(245, 181, 61, 0.88);
  border-radius: 7px 7px 8px 8px;
  background: rgba(20, 27, 38, 0.94);
  color: #ffd95a !important;
  box-shadow: 0 5px 14px rgba(177, 103, 18, 0.24), 0 0 0 2px rgba(255, 255, 255, 0.74);
  font-size: 0;
}

:root[data-theme="dark"] .storm-potential-badge {
  background: rgba(8, 12, 20, 0.96);
  box-shadow: 0 5px 18px rgba(245, 181, 61, 0.22), 0 0 0 2px rgba(12, 18, 28, 0.78);
}

.storm-potential-badge svg {
  width: 16px !important;
  height: 18px !important;
  filter: drop-shadow(0 0 3px rgba(255, 217, 90, 0.36));
}

.sheet-icon .storm-potential-badge {
  right: -4px;
  bottom: -5px;
  width: 19px;
  height: 21px;
}

.rain-bar {
  width: 100%;
  height: 5px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.rain-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.daily {
  display: grid;
  gap: 0;
  --daily-label-col: 176px;
  --daily-rain-col: 72px;
}

.day-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.day-label > div {
  min-width: 0;
}

.day-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.day-icon svg {
  width: 100%;
  height: 100%;
}

.day-icon .storm-potential-badge {
  right: -6px;
  bottom: -5px;
}

.day-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--daily-label-col) minmax(0, 1fr) var(--daily-rain-col);
  gap: 18px;
  align-items: center;
  min-height: 66px;
  /* Uniform left gutter on every row so the current-day accent bar lives in the
     gutter instead of shifting Today's content out of line with the others. */
  padding: 12px 0 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--daily-row-border);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.day-row.current::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  bottom: 13px;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.day-name {
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

/* The icon already carries the condition, so keep the repeated word quiet. */
.day-row .day-meta {
  color: var(--daily-secondary);
  font-size: 0.76rem;
  text-shadow: var(--daily-text-shadow);
}

.day-condition,
.day-precip-note,
.day-memory {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-condition {
  color: var(--daily-secondary-strong);
  opacity: var(--daily-condition-opacity);
}

.day-memory {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 1;
}

.day-precip-note {
  color: var(--daily-secondary);
  font-size: 0.68rem;
  font-weight: 850;
  opacity: 0.92;
}

.day-temps {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.day-low,
.day-high {
  font-size: 1.02rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 2.6ch;
}

.day-low {
  color: var(--daily-low-color);
  text-align: right;
  opacity: var(--daily-low-opacity);
  text-shadow: var(--daily-text-shadow);
}

.day-high {
  text-align: left;
}

.temp-track {
  flex: 1;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  background: var(--daily-track-bg);
  overflow: hidden;
}

:root[data-theme="light"][data-sky-tone="bright"] .temp-track,
:root[data-theme="light"][data-sky="clear-day"] .temp-track,
:root[data-theme="light"][data-sky="partly-cloudy-day"] .temp-track {
  background: rgba(28, 58, 84, 0.20);
}

.temp-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.day-rain {
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-self: end;
  width: var(--daily-rain-col);
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.day-rain span {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
}

.day-rain small {
  color: var(--daily-rain-detail);
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: var(--daily-text-shadow);
}

.map-panel {
  padding: 0 8px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  margin-bottom: 22px;
}

.map-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border-glass);
}

.map-toolbar p,
.map-credit {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

/* The inline map is a tap-to-open preview; the immersive view carries the full
   controls, timeline and attribution, so the glimpse itself stays chrome-free. */
.map-panel .map-toolbar,
.map-panel .timeline,
.map-panel .map-credit,
.map-panel .map-legend {
  display: none;
}

/* Subtle affordance that the preview opens the full-screen map on tap. */
.map-expand-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(8, 12, 18, 0.5);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(2, 6, 12, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}
.map-expand-hint svg {
  width: 16px;
  height: 16px;
}

/* Attribution stays in the immersive HUD so it remains available when the inline
   map chrome is hidden. */
.imm-credit {
  justify-self: end;
  max-width: 100%;
  margin: 0;
  padding: 0 3px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.58);
}
.imm-credit a {
  color: inherit;
  text-decoration: underline;
}

/* ── Immersive map ─────────────────────────────────────────── */
.immersive-map {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: transparent;
  --imm-safe-top: env(safe-area-inset-top, 0px);
  --imm-hud-x: 18px;
  --imm-hud-top: max(18px, calc(var(--imm-safe-top) + 14px));
  --imm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --imm-bottom-x: 18px;
  --imm-rail-bottom: max(18px, calc(var(--imm-safe-bottom) + 18px));
  --imm-control-bg: rgba(8, 12, 18, 0.68);
  --imm-control-bg-strong: rgba(8, 12, 18, 0.78);
  --imm-control-border: rgba(255, 255, 255, 0.14);
}

body.map-immersive-active #mapLegend {
  display: none;
}

.immersive-map .tile-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.immersive-map .tile-map:active { cursor: grabbing; }

.immersive-map .map-loading {
  position: absolute;
  top: calc(var(--imm-hud-top) + 62px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,14,24,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 10;
  white-space: nowrap;
}

.immersive-map .map-legend {
  position: absolute;
  top: var(--imm-hud-top);
  right: var(--imm-hud-x);
  bottom: auto;
  left: auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  grid-template-areas:
    "title title"
    "scale labels"
    "note note";
  gap: 7px 8px;
  width: 144px;
  max-width: calc(100vw - (var(--imm-hud-x) * 2) - 58px);
  padding: 8px 9px 9px;
  border-radius: 14px;
  border: 0;
  background: rgba(8, 12, 18, 0.40);
  color: #fff;
  box-shadow: 0 12px 30px rgba(2, 6, 12, 0.16);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.immersive-map .map-legend strong {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.legend-header {
  grid-area: title;
  display: flex;
  align-items: center;
  min-width: 0;
}

.immersive-map .legend-scale {
  grid-area: scale;
  display: flex;
  flex-direction: column-reverse;
  width: 8px;
  height: 116px;
  border-color: rgba(255, 255, 255, 0.16);
}

.immersive-map .legend-scale i {
  flex: 1 1 0;
  width: 100%;
}

.immersive-map .legend-labels {
  grid-area: labels;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.62rem;
}

.legend-note {
  grid-area: note;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.2;
}

.imm-top-hud {
  position: absolute;
  top: var(--imm-hud-top);
  left: var(--imm-hud-x);
  right: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(100% - (var(--imm-hud-x) * 2));
  z-index: 20;
  pointer-events: none;
}

.imm-top-hud > * {
  pointer-events: auto;
}

.imm-control-stack {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.imm-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10,14,22,0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(255,255,255,0.92);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.imm-btn:hover { background: rgba(20,28,44,0.92); border-color: rgba(255,255,255,0.3); }
.imm-btn.imm-close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.16rem;
  line-height: 1;
  border-radius: 999px;
  background: var(--imm-control-bg-strong);
}

.imm-btn.imm-place-switch {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  background: var(--imm-control-bg-strong);
}
.imm-place-switch svg {
  width: 24px;
  height: 24px;
}

.storm-impact-card {
  align-self: start;
  display: grid;
  gap: 8px;
  width: min(306px, calc(100vw - (var(--imm-hud-x) * 2) - 58px));
  max-height: min(48vh, 440px);
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 12, 18, 0.70);
  color: #fff;
  box-shadow: 0 18px 46px rgba(2, 6, 12, 0.28);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.storm-impact-card[hidden] {
  display: none;
}

.storm-impact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.storm-impact-head span {
  overflow: hidden;
  color: rgba(134, 217, 185, 0.92);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storm-impact-close {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.storm-impact-card h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
}

.storm-impact-card p {
  margin: 0;
  color: rgba(233, 243, 248, 0.72);
  font-size: 0.77rem;
  font-weight: 760;
  line-height: 1.32;
}

.storm-impact-list {
  display: grid;
  gap: 7px;
}

.storm-impact-row {
  display: grid;
  grid-template-columns: minmax(50px, auto) minmax(0, 1fr);
  grid-template-areas:
    "eta name"
    "eta detail";
  gap: 2px 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 3px solid rgba(134, 217, 185, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.storm-impact-row[data-tone="possible"] {
  border-left-color: rgba(244, 196, 83, 0.88);
}

.storm-impact-row[data-tone="nearby"],
.storm-impact-row[data-tone="miss"] {
  border-left-color: rgba(132, 184, 236, 0.80);
}

.storm-impact-row > span {
  grid-area: eta;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 48px;
  min-height: 42px;
  padding: 5px 6px;
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.34);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 950;
  text-align: center;
}

.storm-impact-row > span small {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.storm-impact-row strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.8rem;
  font-weight: 930;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storm-impact-row em {
  grid-area: detail;
  color: rgba(231, 243, 250, 0.66);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1.2;
}

.imm-bottom-hud {
  position: absolute;
  left: var(--imm-bottom-x);
  right: var(--imm-bottom-x);
  bottom: var(--imm-rail-bottom);
  z-index: 20;
  display: grid;
  gap: 7px;
  pointer-events: none;
}

.imm-bottom-hud > * {
  pointer-events: auto;
}

.imm-timeline {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 2px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.imm-timeline::before {
  display: none;
}
.imm-slider-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
}

.imm-timeline .imm-play-button {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(8, 12, 18, 0.54);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(2, 6, 12, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

@media (hover: hover) and (pointer: fine) {
  .imm-timeline .imm-play-button:hover {
    background: rgba(8, 12, 18, 0.68);
  }
}

.imm-timeline .imm-play-button.is-playing {
  background: rgba(8, 12, 18, 0.64);
}

.imm-timeline .imm-play-button:active {
  transform: scale(0.96);
}
.imm-timeline .imm-play-button:focus {
  outline: none;
}
.imm-timeline .imm-play-button:focus-visible {
  outline: 3px solid rgba(255,255,255,0.48);
  outline-offset: 3px;
}
.imm-play-button svg {
  width: 20px;
  height: 20px;
}
.imm-play-button .imm-pause-icon {
  display: none;
}
.imm-play-button.is-playing .imm-play-icon {
  display: none;
}
.imm-play-button.is-playing .imm-pause-icon {
  display: block;
}
.imm-timeline input[type=range] {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 48px;
  --range-track-bg: rgba(8, 12, 18, 0.22);
  --range-progress-color: rgba(255, 255, 255, 0.9);
  --range-thumb-bg: #fff;
  --timeline-radar-bg: rgba(86, 172, 235, 0.42);
  --timeline-forecast-bg: rgba(239, 183, 74, 0.34);
  --range-thumb-shadow:
    0 7px 18px rgba(2, 6, 12, 0.28),
    0 0 0 9px rgba(8, 12, 18, 0.14);
}

.imm-now-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.86);
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.58);
}

.imm-now-marker[hidden] {
  display: none;
}

.imm-now-marker span {
  padding: 1px 5px 2px;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.46);
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1;
}

.imm-now-marker::after {
  content: "";
  display: block;
  width: 2px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(8, 12, 18, 0.24);
}

.imm-time-bubble {
  position: absolute;
  left: clamp(84px, var(--time-bubble-left, 100%), calc(100% - 84px));
  top: -49px;
  z-index: 4;
  display: grid;
  gap: 2px;
  width: max-content;
  min-width: 142px;
  max-width: min(238px, calc(100vw - 34px));
  padding: 8px 11px 9px;
  transform: translateX(-50%) translateY(5px) scale(0.98);
  transform-origin: 50% 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 2px solid rgba(86, 172, 235, 0.82);
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.78);
  color: #fff;
  box-shadow: 0 14px 36px rgba(2, 6, 12, 0.28);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  visibility: hidden;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.imm-time-bubble[data-source="forecast"] {
  border-top-color: rgba(239, 183, 74, 0.86);
}

.imm-time-bubble[hidden] {
  display: none;
}

.imm-time-bubble.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  visibility: visible;
}

.imm-time-bubble strong,
.imm-time-bubble span {
  display: block;
}

.imm-time-bubble strong {
  overflow: visible;
  text-overflow: clip;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: normal;
}

.imm-time-bubble span {
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.imm-frame-time {
  position: absolute;
  right: 2px;
  top: -2px;
  z-index: 1;
  min-width: 0;
  max-width: 56vw;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.map-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-mode {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-glass);
  box-shadow: none;
}

.map-mode.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.map-wrap {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-glass-md);
  background: #dce6eb;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
}

#weatherMap {
  height: 340px;
  width: 100%;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
#weatherMap:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}
#weatherMap:active {
  cursor: grabbing;
}

.tile-map {
  position: relative;
  overflow: hidden;
}

.tile-layer,
.marker-layer,
.tile-sublayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tile-layer img {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  -webkit-user-drag: none;
}

#baseTileLayer[data-map-theme="light"] img {
  filter: grayscale(0.85) saturate(0.35) brightness(1.06) contrast(0.92);
}

#baseTileLayer[data-map-theme="dark"] img {
  filter: saturate(0.82) brightness(0.9) contrast(1.04);
}

#immersiveBaseTiles img {
  filter: none;
}

/* Opacity lives on the sublayer pane (set per frame in JS) so the NOAA
   cross-fade works and radar shows at a steady 0.78. */
.weather-layer img {
  mix-blend-mode: normal;
  image-rendering: auto; /* smooth bilinear upscale for capped radar tiles, never blocky */
}
.weather-layer {
  z-index: 10;
}
.label-layer {
  z-index: 15;
}
.label-layer img {
  opacity: 0.96;
  mix-blend-mode: normal;
}
.marker-layer {
  z-index: 20;
}

.impact-layer {
  position: absolute;
  inset: 0;
  z-index: 19;
  overflow: hidden;
  pointer-events: none;
}

.impact-track-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.impact-cell-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.impact-cell-polygon {
  fill: rgba(27, 135, 255, 0.22);
  stroke: rgba(248, 253, 255, 0.98);
  stroke-width: 3.4;
  stroke-linejoin: round;
  stroke-dasharray: 8 6;
  filter:
    drop-shadow(0 3px 8px rgba(2, 6, 12, 0.68))
    drop-shadow(0 0 18px rgba(27, 135, 255, 0.52));
}

.impact-track-line {
  stroke: rgba(134, 217, 185, 0.84);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 8;
  filter: drop-shadow(0 2px 8px rgba(2, 6, 12, 0.42));
}

.impact-target {
  position: absolute;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(134, 217, 185, 0.42) 0 20%, rgba(134, 217, 185, 0.12) 35%, transparent 58%);
  box-shadow:
    0 0 0 7px rgba(8, 12, 18, 0.20),
    0 0 28px rgba(134, 217, 185, 0.42);
}

.impact-target::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(134, 217, 185, 0.62);
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  min-width: 74px;
  max-width: 130px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.75rem;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 10px 28px rgba(21, 32, 38, 0.24);
}

.map-marker.is-active-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  max-width: 178px;
  padding-inline: 10px;
  white-space: nowrap;
}

.map-marker.has-impact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  max-width: 190px;
  padding-inline: 10px;
  white-space: nowrap;
}

.map-marker.is-active-place span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-marker.has-impact span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-marker.is-active-place strong {
  flex: 0 0 auto;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.map-marker small {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.map-marker.is-impact-likely {
  background: #173f35;
  color: #f4fff9;
  box-shadow:
    0 10px 28px rgba(2, 6, 12, 0.30),
    0 0 0 3px rgba(134, 217, 185, 0.30);
}

.map-marker.is-impact-possible {
  background: #453417;
  color: #fff7df;
  box-shadow:
    0 10px 28px rgba(2, 6, 12, 0.30),
    0 0 0 3px rgba(244, 196, 83, 0.28);
}

.map-marker.is-impact-nearby {
  background: #19344c;
  color: #edf7ff;
  box-shadow:
    0 10px 28px rgba(2, 6, 12, 0.28),
    0 0 0 3px rgba(132, 184, 236, 0.24);
}

.map-marker.is-impact-likely::after { background: #173f35; }
.map-marker.is-impact-possible::after { background: #453417; }
.map-marker.is-impact-nearby::after { background: #19344c; }

.map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--btn-bg);
}

.map-loading {
  position: absolute;
  inset: 14px auto auto 14px;
  z-index: 500;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--glass-heavy);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(29, 48, 58, 0.16);
}

.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 510;
  width: min(310px, calc(100% - 28px));
  padding: 10px 12px 11px;
  border-radius: 8px;
  background: var(--glass-heavy);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(29, 48, 58, 0.18);
}

.map-legend strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.legend-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(21, 32, 38, 0.12);
  border-radius: 999px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.map-legend .legend-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 760;
  line-height: 1.18;
}

.immersive-map .map-legend .legend-note {
  color: rgba(255, 255, 255, 0.66);
}

.timeline {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 0 2px;
}

.play-button {
  min-height: 34px;
  padding: 0 14px;
  background: var(--blue);
}

.timeline input[type="range"] {
  width: 100%;
  --range-track-bg: rgba(52, 73, 94, 0.18);
  --range-progress-color: var(--green);
  --range-thumb-bg: var(--panel);
  --range-thumb-shadow: 0 2px 7px rgba(19, 31, 40, 0.20), 0 0 0 4px rgba(52, 125, 98, 0.14);
}

.timeline input[type="range"],
.imm-timeline input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 34px;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  touch-action: pan-x;
}

.imm-timeline input[type="range"] {
  height: 48px;
}

.timeline input[type="range"]:focus,
.imm-timeline input[type="range"]:focus {
  outline: none;
}

.timeline input[type="range"]:focus-visible::-webkit-slider-thumb,
.imm-timeline input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(91, 128, 210, 0.55);
  outline-offset: 3px;
}

.timeline input[type="range"]:focus-visible::-moz-range-thumb,
.imm-timeline input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 3px solid rgba(91, 128, 210, 0.55);
  outline-offset: 3px;
}

.timeline input[type="range"]::-webkit-slider-runnable-track,
.imm-timeline input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--range-progress-color) 0%,
      var(--range-progress-color) var(--range-progress, 0%),
      var(--range-track-bg) var(--range-progress, 0%),
      var(--range-track-bg) 100%
    );
}

.timeline input[type="range"]::-webkit-slider-thumb,
.imm-timeline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 0;
  border-radius: 50%;
  background: var(--range-thumb-bg);
  box-shadow: var(--range-thumb-shadow);
}

.timeline input[type="range"]::-moz-range-track,
.imm-timeline input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--range-track-bg);
}

.timeline input[type="range"]::-moz-range-progress,
.imm-timeline input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--range-progress-color);
}

.timeline input[type="range"]::-moz-range-thumb,
.imm-timeline input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--range-thumb-bg);
  box-shadow: var(--range-thumb-shadow);
}

.imm-timeline input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  box-shadow: none;
  background:
    linear-gradient(
      90deg,
      var(--range-progress-color) 0%,
      var(--range-progress-color) var(--range-progress, 0%),
      transparent var(--range-progress, 0%),
      transparent 100%
    ),
    linear-gradient(
      90deg,
      var(--timeline-radar-bg) 0%,
      var(--timeline-radar-bg) var(--timeline-now, 100%),
      var(--timeline-forecast-bg) var(--timeline-now, 100%),
      var(--timeline-forecast-bg) 100%
    );
}

.imm-timeline input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border: 2px solid rgba(255,255,255,0.88);
}

.imm-timeline input[type="range"]::-moz-range-track,
.imm-timeline input[type="range"]::-moz-range-progress {
  height: 4px;
}

.imm-timeline input[type="range"]::-moz-range-track {
  background:
    linear-gradient(
      90deg,
      var(--timeline-radar-bg) 0%,
      var(--timeline-radar-bg) var(--timeline-now, 100%),
      var(--timeline-forecast-bg) var(--timeline-now, 100%),
      var(--timeline-forecast-bg) 100%
    );
}

.imm-timeline input[type="range"]::-moz-range-progress {
  background: var(--range-progress-color);
}

.imm-timeline input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.88);
}

.timeline strong {
  text-align: right;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.map-credit {
  margin-top: 9px;
  font-size: 0.72rem;
  line-height: 1.35;
  opacity: 0.68;
}

.map-credit a {
  color: var(--blue);
  font-weight: 850;
}

.metric-tip {
  position: fixed;
  z-index: 900;
  max-width: 240px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.metric-tip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: var(--ink);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.metric-tip-rich {
  width: min(340px, calc(100vw - 18px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  background: var(--glass-heavy);
  color: var(--ink);
  border: 1px solid var(--border-glass);
  box-shadow: 0 16px 42px rgba(24, 35, 45, 0.22);
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  pointer-events: auto;
}

.metric-tip-rich::before {
  background: var(--glass-heavy);
  border-left: 1px solid var(--border-glass);
  border-top: 1px solid var(--border-glass);
  clip-path: none;
  transform: translateX(-50%) rotate(45deg);
}

.air-tip {
  display: grid;
  gap: 11px;
  padding: 13px;
}

.air-tip-head {
  display: grid;
  gap: 3px;
}

.air-tip-kicker,
.air-tip-scale-title {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.air-tip-head strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.air-tip-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.air-tip-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.air-tip-stat {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
}

.air-tip-stat span,
.air-tip-stat em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.air-tip-stat strong {
  display: block;
  margin: 3px 0 2px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.05;
}

.air-tip-scale {
  display: grid;
  gap: 7px;
}

.air-tip-scale ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aqi-scale-row {
  display: grid;
  grid-template-columns: 10px 52px minmax(72px, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.aqi-scale-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--aqi-color);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.26);
}

.aqi-scale-row strong,
.aqi-scale-row b,
.aqi-scale-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aqi-scale-row strong {
  color: var(--ink);
  font-weight: 900;
}

.aqi-scale-row b {
  color: var(--ink);
  font-weight: 850;
}

.aqi-scale-row em {
  grid-column: 3 / -1;
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 22px, 1120px);
    padding-top: 10px;
  }

  .topbar {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 12px;
  }

  /* Four action icons need to fit beside the title on phones */
  .icon-button {
    width: 40px;
    height: 40px;
  }
  .actions {
    gap: 7px;
  }

  .search {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .shell:not(.mode-welcome).search-open .search-popover {
    top: calc(env(safe-area-inset-top, 0px) + 66px);
    left: 12px;
    width: auto;
  }

  .search button[type="submit"] {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .search-locate {
    min-height: 44px;
  }

  .launch-stage {
    min-height: clamp(330px, 54svh, 520px);
    padding: 68px 8px 34px;
  }

  .launch-current {
    gap: 3px;
    margin-top: 10px;
  }

  .launch-main-weather {
    gap: 10px;
  }

  .launch-stage .summary {
    margin-top: 14px;
    font-size: clamp(1.03rem, 5vw, 1.28rem);
  }
  .launch-loading {
    margin-top: 10px;
  }
  .launch-stage .summary.summary-strip {
    gap: 7px;
    font-size: 0.9rem;
  }
  .summary-strip-item {
    min-height: 34px;
    max-width: min(100%, 290px);
    padding: 7px 10px;
  }
  .summary-strip-item strong {
    font-size: 0.84rem;
  }
  .launch-shortcuts {
    width: min(100%, 94vw);
    margin-top: 9px;
  }
  .launch-shortcuts button {
    min-height: 31px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .for-you-today {
    width: min(100%, 94vw);
    margin-top: 10px;
  }
  .for-you-head {
    align-items: start;
  }
  .for-you-head small {
    max-width: 68vw;
  }
  .for-you-grid {
    display: grid;
    grid-auto-columns: minmax(218px, 78vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    justify-content: start;
    overflow-x: auto;
    padding: 1px 2px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .for-you-today.is-single .for-you-grid {
    grid-auto-columns: minmax(0, 100%);
  }
  .for-you-grid::-webkit-scrollbar {
    display: none;
  }
  .for-you-card {
    min-height: 98px;
    scroll-snap-align: start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 20px;
    border-radius: 16px;
  }

  .today-glance {
    align-self: stretch;
    gap: 14px;
  }

  .glance-title {
    font-size: clamp(1.18rem, 5.5vw, 1.5rem);
  }

  .glance-signals,
  .glance-signals.has-humidity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glance-signal {
    min-height: 104px;
    padding: 12px;
  }

  .daylight-head,
  .daylight-times {
    align-items: flex-start;
  }

  .daylight-readout {
    min-width: 144px;
  }

  .map-toolbar,
  .timeline {
    align-items: stretch;
  }

  .map-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .map-actions {
    justify-content: flex-start;
  }

  .timeline strong {
    grid-column: 1 / -1;
    text-align: left;
  }

  .map-panel {
    padding-inline: 4px;
  }

  .map-wrap {
    min-height: 320px;
    border-radius: 14px;
  }

  #weatherMap {
    height: 320px;
  }

  .timeline {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .map-legend {
    left: 10px;
    bottom: 10px;
    width: min(280px, calc(100% - 20px));
  }

  .insight-band {
    grid-template-columns: 1fr 1fr;
  }

  .insight:nth-child(2)::after,
  .insight:nth-child(4)::after {
    display: none;
  }

  .insight:nth-child(3),
  .insight:nth-child(4) {
    padding-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border-glass);
  }

  .insight:nth-child(4) {
    padding-left: 18px;
  }

  .hourly-panel {
    padding-inline: 4px;
  }

  .hourly {
    grid-auto-columns: 54px;
  }

  /* Keep the 10-day rows on a single tight line (no wrapping the temp track
     to a second row) so all 10 days are scannable with minimal scrolling. */
  .daily {
    --daily-label-col: clamp(136px, 40vw, 160px);
    --daily-rain-col: 54px;
  }

  .day-row {
    gap: 6px;
    min-height: 50px;
    padding: 8px 0 8px 10px;
  }

  .day-row .day-icon { width: 26px; height: 26px; }
  .day-row .day-label { gap: 8px; }
  .day-row .day-temps { gap: 6px; }
  .day-row .day-low,
  .day-row .day-high { font-size: 0.92rem; }
  .day-row .day-name { font-size: 0.92rem; }
}

@media (max-width: 480px) {
  .insight-band {
    grid-template-columns: 1fr;
  }

  .insight {
    min-height: 0;
    padding: 13px 0;
  }

  .insight:not(:first-child) {
    padding-left: 0;
    border-top: 1px solid var(--border-glass);
  }

  .insight:nth-child(3) {
    grid-column: auto;
  }

  .insight:nth-child(4) {
    padding-left: 0;
  }

  .insight:not(:last-child)::after {
    display: none;
  }

  .now-temp {
    font-size: 5rem;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .immersive-map {
    --imm-hud-x: 12px;
    --imm-bottom-x: 12px;
    --imm-hud-top: max(56px, calc(var(--imm-safe-top) + 14px));
    --imm-rail-bottom: max(28px, calc(var(--imm-safe-bottom) + 22px));
  }

  .imm-top-hud {
    gap: 6px;
  }

  .imm-control-stack {
    gap: 6px;
  }

  .imm-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 0.8rem;
    background: rgba(8, 12, 18, 0.62);
  }

  .imm-btn.imm-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .imm-btn.imm-place-switch {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .imm-place-switch svg {
    width: 23px;
    height: 23px;
  }

  .storm-impact-card {
    position: fixed;
    top: calc(var(--imm-hud-top) + 150px);
    left: var(--imm-hud-x);
    right: var(--imm-hud-x);
    width: auto;
    max-height: min(34vh, 320px);
    padding: 10px;
    border-radius: 14px;
  }

  .storm-impact-card h2 {
    font-size: 0.94rem;
  }

  .storm-impact-card p {
    font-size: 0.71rem;
  }

  .storm-impact-row {
    grid-template-columns: minmax(46px, auto) minmax(0, 1fr);
    padding: 8px 9px;
  }

  .immersive-map .map-loading {
    top: calc(var(--imm-hud-top) + 56px);
  }

  .imm-bottom-hud {
    gap: 5px;
    top: auto;
    bottom: var(--imm-rail-bottom);
  }

  .imm-timeline {
    gap: 10px;
  }

  .imm-frame-time {
    opacity: 0.82;
  }

  .immersive-map .map-legend {
    width: 134px;
    padding: 8px 8px 9px;
    background: rgba(8, 12, 18, 0.36);
  }

  .immersive-map .map-legend strong {
    margin-bottom: 0;
    font-size: 0.68rem;
  }

  .immersive-map .legend-scale {
    height: 104px;
  }

  .imm-credit {
    justify-self: end;
    margin-top: -2px;
    max-width: calc(100% - 62px);
    font-size: 0.52rem;
    opacity: 0.72;
  }

  .immersive-map .legend-labels {
    gap: 4px;
    font-size: 0.54rem;
  }

  .legend-note {
    font-size: 0.52rem;
  }
}

@media (max-width: 380px) {
  .imm-btn {
    padding: 0 8px;
    font-size: 0.76rem;
  }

  .imm-frame-time {
    min-width: 6ch;
  }
}

/* ---------- Day-detail bottom sheet ---------- */
.day-row {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.day-row:hover {
  background: rgba(43, 120, 194, 0.06);
  border-bottom-color: rgba(43, 120, 194, 0.32);
}
.day-row:active {
  transform: translateY(1px);
}
.day-row:focus-visible {
  outline: 2px solid rgba(43, 120, 194, 0.45);
  outline-offset: 3px;
  border-radius: 8px;
}

.hourly {
  cursor: pointer;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 12, 20, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sheet-backdrop.show {
  opacity: 1;
}

.day-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--sheet-keyboard-inset, 0px);
  z-index: 301;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  max-height: min(92vh, calc(var(--app-viewport-height, 100dvh) - 8px));
  overflow-y: auto;
  padding: 10px 20px 28px;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, var(--glass-heavy), var(--glass-mid)),
    var(--bg);
  border: 1px solid var(--border-glass);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -18px 52px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
  transform: translateY(101%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.day-sheet.sheet-keyboard-active {
  max-height: calc(var(--app-viewport-height, 100dvh) - 10px);
  padding-bottom: max(28px, calc(18px + env(safe-area-inset-bottom, 0px)));
}
.day-sheet.show {
  transform: translateY(0);
}

body.map-immersive-active .sheet-backdrop {
  z-index: 1100;
}

body.map-immersive-active .day-sheet {
  z-index: 1101;
}

body.map-immersive-active .day-sheet.show {
  transform: translateY(0);
}

.sheet-grabber {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 4px auto 14px;
}

.sheet-close {
  position: absolute;
  top: clamp(14px, calc(env(safe-area-inset-top, 0px) + 10px), 28px);
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--glass-light);
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 38px 0 0;
}
.sheet-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.sheet-icon svg {
  width: 100%;
  height: 100%;
}
.sheet-head-text h2 {
  font-size: 1.22rem;
  margin: 0;
}
.sheet-context {
  margin: 2px 0 0;
  color: var(--ink-faint);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
}
.sheet-context[hidden] {
  display: none;
}
.sheet-range {
  margin: 3px 0 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}
.sheet-range-sep {
  opacity: 0.4;
  margin: 0 5px;
  font-weight: 500;
}
#sheetLow {
  opacity: 0.55;
}

.sheet-summary {
  margin: 12px 0 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.4;
}

.sheet-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 14px 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  overflow: hidden;
}
.sheet-mode-btn {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sheet-mode-btn + .sheet-mode-btn {
  border-left: 1px solid var(--border-glass);
}
.sheet-mode-btn.active {
  background: var(--glass-heavy);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.sheet-day-nav {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin: -2px 0 12px;
}
.sheet-day-nav.is-rolling {
  grid-template-columns: minmax(68px, auto) minmax(0, 1fr) minmax(68px, auto);
}
.sheet-day-nav[hidden] {
  display: none;
}
.sheet-day-nav-btn {
  width: 38px;
  min-height: 34px;
  border: 1px solid var(--border-glass);
  border-radius: 9px;
  background: var(--glass-light);
  color: var(--ink);
  font: inherit;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sheet-day-nav.is-rolling .sheet-day-nav-btn {
  width: auto;
  padding: 0 11px;
  font-size: 0.78rem;
}
.sheet-day-nav-btn:disabled {
  opacity: 0.34;
  cursor: default;
}
.sheet-day-nav-btn:not(:disabled):hover,
.sheet-day-nav-btn:not(:disabled):focus-visible {
  border-color: var(--blue);
  outline: none;
}
.sheet-day-nav-label {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
}
.graph-metric[hidden] {
  display: none;
}
.graph-metric-tabs {
  display: inline-flex;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.graph-metric-btn {
  min-height: 34px;
  min-width: 40px;
  padding: 0 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.graph-metric-btn.active {
  background: transparent;
  color: var(--ink);
  border-bottom-color: var(--blue);
  box-shadow: none;
}
.graph-metric-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.graph-peak-sub {
  fill: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
}

/* Wrapper reserves space at the top for the floating callout so it rides
   ABOVE the chart — out of the path of your thumb while scrubbing. */
.sheet-graph-wrap {
  position: relative;
  padding-top: 48px;
  margin: 6px 0 18px;
  border-bottom: 1px solid var(--line);
}
.sheet-graph-wrap[hidden],
.sheet-hourly-list[hidden] {
  display: none;
}
.sheet-graph {
  margin-top: 0;
  padding-bottom: 8px;
}
.hourly-graph {
  width: 100%;
  height: auto;
  display: block;
}
.graph-axis {
  fill: var(--ink);
  opacity: 0.45;
  font-size: 9px;
  font-weight: 600;
}
.graph-peak {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 800;
}
.graph-now-line {
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
  opacity: 0.85;
}
.graph-day-line {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.32;
}
.graph-day-label {
  fill: var(--muted);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.graph-now-pill {
  fill: var(--blue);
}
.graph-now-label {
  fill: #fff;
  font-size: 8px;
  font-weight: 850;
}
.graph-memory-window {
  color: var(--blue);
  cursor: pointer;
  outline: none;
}
.graph-memory-band {
  fill: currentColor;
  opacity: 0.13;
  stroke: currentColor;
  stroke-width: 0.8;
  stroke-opacity: 0.42;
}
.graph-memory-edge {
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.68;
}
.graph-memory-label {
  fill: currentColor;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 2.2px;
  stroke-linejoin: round;
  pointer-events: none;
}
.graph-memory-hit {
  fill: transparent;
  pointer-events: all;
}
.graph-memory-window:focus-visible .graph-memory-band,
.graph-memory-window:hover .graph-memory-band {
  opacity: 0.20;
  stroke-opacity: 0.72;
}
.graph-memory-window:focus-visible .graph-memory-label,
.graph-memory-window:hover .graph-memory-label {
  fill: var(--ink);
}
.graph-memory-window-1 {
  color: #6aa2e8;
}
.graph-memory-window-2 {
  color: #7f8df6;
}
.graph-memory-window-3 {
  color: #4fa8bc;
}

.graph-callout {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.22;
  white-space: nowrap;
  max-width: calc(100% - 4px);
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-glass-md);
  background: var(--glass-heavy);
  color: var(--ink);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  transition: left 0.06s linear;
  z-index: 2;
}
.graph-callout::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: var(--pointer-x, 50%);
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--glass-heavy);
}
.graph-callout:empty {
  display: none;
}
.graph-callout.is-sun {
  min-width: 156px;
}
.callout-main {
  font-weight: 800;
  font-size: 0.92rem;
}
.callout-sub {
  font-size: 0.72rem;
  opacity: 0.82;
}
.sun-graph {
  --uv-accent: rgba(166, 177, 188, 0.42);
  --uv-dot: rgba(122, 143, 162, 0.98);
}

.sun-graph.uv-moderate {
  --uv-accent: rgba(221, 186, 73, 0.42);
  --uv-dot: rgba(201, 154, 38, 0.98);
}

.sun-graph.uv-high {
  --uv-accent: rgba(223, 139, 54, 0.44);
  --uv-dot: rgba(201, 107, 36, 0.98);
}

.sun-graph.uv-very-high,
.sun-graph.uv-extreme {
  --uv-accent: rgba(203, 78, 85, 0.42);
  --uv-dot: rgba(190, 60, 79, 0.98);
}

.sun-graph .daylight-horizon {
  stroke: var(--border-glass-md);
}
.sun-graph .daylight-night-arc {
  stroke: rgba(81, 101, 121, 0.22);
}
.sun-graph .daylight-fill {
  stroke: rgba(129, 151, 172, 0.34);
}
.sun-graph .daylight-uv-band {
  stroke: var(--uv-dot);
  filter: drop-shadow(0 0 7px var(--uv-accent));
}
.sun-graph .sun-uv-dot {
  fill: var(--uv-dot);
  stroke: var(--panel);
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 8px var(--uv-accent));
}
.sun-graph .daylight-now,
.sun-graph .daylight-now-glow,
.sun-graph .daylight-uv {
  pointer-events: none;
}

.sheet-hourly-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 8px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sheet-timeline-footer {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}
.sheet-timeline-footer[hidden] {
  display: none;
}
.sheet-now-jump {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 304;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(91, 141, 220, 0.38);
  border-radius: 999px;
  background: rgba(17, 25, 36, 0.84);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sheet-now-jump[hidden] {
  display: none;
}
.sheet-now-jump:focus-visible {
  outline: 2px solid rgba(91, 141, 220, 0.72);
  outline-offset: 3px;
}
body.map-immersive-active .sheet-now-jump {
  z-index: 1104;
}
.sheet-hour-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px 34px minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 11px 42px 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.sheet-hour-row:hover,
.sheet-hour-row:focus-visible,
.sheet-hour-row.is-expanded {
  background: rgba(255, 255, 255, 0.05);
}
.sheet-hour-row:focus-visible {
  outline: 2px solid rgba(91, 141, 220, 0.78);
  outline-offset: -2px;
}
.sheet-hour-row:last-child {
  border-bottom: 0;
}
.sheet-hour-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}
.sheet-day-divider {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 0 7px;
  background:
    linear-gradient(180deg, var(--glass-heavy), var(--glass-mid));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sheet-day-divider::before,
.sheet-day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sheet-hour-row.is-now {
  box-shadow: none;
}
.sheet-hour-row.is-plan-window {
  background:
    linear-gradient(90deg, rgba(91, 141, 220, 0.16), rgba(91, 141, 220, 0.05) 58%, transparent);
}
.sheet-hour-row.is-plan-window:hover,
.sheet-hour-row.is-plan-window:focus-visible,
.sheet-hour-row.is-plan-window.is-expanded {
  background:
    linear-gradient(90deg, rgba(91, 141, 220, 0.22), rgba(91, 141, 220, 0.08) 62%, transparent);
}
.sheet-hour-row.is-plan-window::before {
  background: var(--blue);
}
.sheet-hour-row.is-now::before {
  background: var(--blue);
}
.sheet-hour-row.is-rainy {
  border-color: var(--line);
}
.sheet-hour-row.is-rainy::before {
  background: rgba(74, 144, 217, 0.78);
}
.sheet-hour-row.is-windy {
  box-shadow: none;
}
.sheet-hour-row.is-windy::before {
  background: rgba(132, 121, 255, 0.70);
}
.sheet-hour-row.is-sunny {
  box-shadow: none;
}
.sheet-hour-row.is-sunny::before {
  background: rgba(244, 180, 64, 0.78);
}
.sheet-hour-row.is-stormy::before {
  background: rgba(238, 163, 43, 0.82);
}
.sheet-hour-row.has-alert.is-alert-warning::before {
  background: rgba(219, 77, 64, 0.90);
}
.sheet-hour-row.has-alert.is-alert-watch::before {
  background: rgba(225, 149, 45, 0.88);
}
.sheet-hour-row.has-alert.is-alert-advisory::before,
.sheet-hour-row.has-alert.is-alert-notice::before {
  background: rgba(179, 138, 62, 0.72);
}
.sheet-hour-row.is-windy.is-sunny {
  box-shadow: none;
}
.sheet-hour-row.is-rainy.is-now::before,
.sheet-hour-row.is-windy.is-now::before,
.sheet-hour-row.is-sunny.is-now::before,
.sheet-hour-row.is-stormy.is-now::before {
  background: var(--blue);
}
.sheet-hour-row.has-alert.is-now::before {
  background: rgba(219, 77, 64, 0.90);
}
.sheet-hour-row.has-alert.is-alert-watch.is-now::before {
  background: rgba(225, 149, 45, 0.88);
}
.sheet-hour-row.has-alert.is-alert-advisory.is-now::before,
.sheet-hour-row.has-alert.is-alert-notice.is-now::before {
  background: rgba(179, 138, 62, 0.72);
}
.sheet-hour-time,
.sheet-hour-signals {
  font-variant-numeric: tabular-nums;
}
.sheet-hour-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.sheet-now-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 2px 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.2;
}
.sheet-plan-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button.sheet-plan-badge:hover,
button.sheet-plan-badge:focus-visible {
  color: var(--ink);
  outline: none;
}
.sheet-hour-icon {
  width: 30px;
  height: 30px;
}
.sheet-hour-icon svg {
  width: 100%;
  height: 100%;
}
.sheet-hour-icon .storm-potential-badge {
  right: -8px;
  bottom: -5px;
}
.sheet-hour-main {
  display: flex;
  align-items: center;
  min-width: 0;
}
.sheet-hour-main strong {
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.sheet-hour-signals {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}
.sheet-hour-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.sheet-hour-chip.is-wet {
  border-color: rgba(74, 144, 217, 0.36);
  background: rgba(74, 144, 217, 0.12);
  color: var(--ink);
}
.sheet-hour-chip.is-wind {
  border-color: rgba(132, 121, 255, 0.32);
  background: rgba(132, 121, 255, 0.10);
  color: var(--ink);
}
.sheet-hour-chip.is-flag {
  border-color: rgba(244, 180, 64, 0.34);
  background: rgba(244, 180, 64, 0.12);
  color: var(--ink);
}
.sheet-hour-chip.is-storm {
  border-color: rgba(238, 163, 43, 0.44);
  background: rgba(238, 163, 43, 0.16);
  color: var(--ink);
}
.sheet-hour-chip.is-alert-warning {
  border-color: rgba(219, 77, 64, 0.44);
  background: rgba(219, 77, 64, 0.14);
  color: var(--ink);
}
.sheet-hour-chip.is-alert-watch {
  border-color: rgba(225, 149, 45, 0.42);
  background: rgba(225, 149, 45, 0.14);
  color: var(--ink);
}
.sheet-hour-chip.is-alert-advisory,
.sheet-hour-chip.is-alert-notice {
  border-color: rgba(179, 138, 62, 0.30);
  background: rgba(179, 138, 62, 0.10);
  color: var(--muted);
}
.sheet-hour-cue {
  position: absolute;
  top: 25px;
  right: 13px;
  width: 18px;
  height: 18px;
}
.sheet-hour-cue::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.16s ease, top 0.16s ease;
}
.sheet-hour-row.is-expanded .sheet-hour-cue::before {
  top: 7px;
  transform: rotate(225deg);
}
.sheet-hour-detail {
  grid-column: 1 / -1;
  margin: 8px 0 0 93px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}
.sheet-hour-detail[hidden] {
  display: none;
}
.sheet-hour-detail-condition {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}
.sheet-hour-detail p {
  margin: 0 0 13px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}
.sheet-hour-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sheet-hour-detail-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}
.sheet-hour-detail-grid small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.sheet-hour-detail-grid strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 900;
  white-space: nowrap;
}

.sheet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sheet-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.sheet-stat:not(:nth-child(3n + 1)) {
  border-left: 1px solid var(--line);
}
.sheet-stat:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}
.sheet-stat span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.55;
}
.sheet-stat strong {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .sheet-hour-row {
    grid-template-columns: 48px 30px 58px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 10px 34px 10px 12px;
  }
  .sheet-hour-icon {
    width: 28px;
    height: 28px;
  }
  .sheet-hour-main strong {
    font-size: 1.12rem;
  }
  .sheet-hour-signals {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .sheet-hour-chip {
    min-height: 24px;
    padding: 4px 7px;
    font-size: 0.68rem;
  }
  .sheet-hour-cue {
    top: 20px;
    right: 9px;
  }
  .sheet-hour-detail {
    grid-column: 1 / -1;
    margin-left: 0;
    padding-top: 16px;
  }
  .sheet-hour-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

/* ---------- Severe weather alerts ---------- */
.alert-bar[hidden] {
  display: none;
}

.alert-bar {
  --alert-accent: #d98324;
  --alert-glow: rgba(217, 131, 36, 0.20);
  --alert-wash: rgba(217, 131, 36, 0.12);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: min(640px, 100%);
  margin: 18px auto 0;
  padding: 9px 12px 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(195, 126, 68, 0.22);
  background:
    radial-gradient(circle at 8% 0%, var(--alert-glow), transparent 42%),
    linear-gradient(135deg, var(--alert-wash), rgba(255, 255, 255, 0.03)),
    var(--glass-light);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    inset 3px 0 0 var(--alert-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.alert-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 42%);
  pointer-events: none;
}
.alert-bar:hover {
  border-color: var(--alert-accent);
  transform: translateY(-1px);
}
.alert-bar.alert-severe {
  --alert-accent: #d45845;
  --alert-glow: rgba(212, 88, 69, 0.24);
  --alert-wash: rgba(212, 88, 69, 0.15);
}
.alert-bar.alert-moderate {
  --alert-accent: #d98324;
  --alert-glow: rgba(217, 131, 36, 0.22);
  --alert-wash: rgba(217, 131, 36, 0.13);
}
.alert-bar.alert-minor {
  --alert-accent: #c6a332;
  --alert-glow: rgba(198, 163, 50, 0.20);
  --alert-wash: rgba(198, 163, 50, 0.12);
}
.alert-bar-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--alert-accent);
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}
.alert-bar-icon svg {
  width: 17px;
  height: 17px;
}
.alert-bar-text {
  display: grid;
  gap: 1px;
  line-height: 1.15;
  min-width: 0;
}
.alert-bar-kicker {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.alert-bar-text strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alert-bar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.alert-bar-timing:empty {
  display: none;
}
.alert-bar-more {
  color: var(--alert-accent);
}
.alert-bar-more:empty {
  display: none;
}
.alert-bar-chevron {
  color: var(--alert-accent);
  font-size: 1.25rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.alert-sheet {
  --alert-accent: #d98324;
  --alert-glow: rgba(217, 131, 36, 0.12);
}
.alert-sheet.alert-severe {
  --alert-accent: #d45845;
  --alert-glow: rgba(212, 88, 69, 0.14);
}
.alert-sheet.alert-moderate {
  --alert-accent: #d98324;
  --alert-glow: rgba(217, 131, 36, 0.12);
}
.alert-sheet.alert-minor {
  --alert-accent: #c6a332;
  --alert-glow: rgba(198, 163, 50, 0.11);
}
.alert-sheet.alert-pulse .alert-sheet-head::before {
  animation: alert-rail-pulse 2.8s ease-in-out infinite;
}
.alert-sheet-head {
  position: relative;
  margin: 2px 0 14px;
  padding: 2px 38px 15px 14px;
  border-bottom: 1px solid var(--line);
}
.alert-sheet-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 16px;
  width: 3px;
  border-radius: 999px;
  background: var(--alert-accent);
}
@keyframes alert-rail-pulse {
  0%, 100% {
    opacity: 0.72;
    box-shadow: 0 0 0 rgba(212, 88, 69, 0);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(212, 88, 69, 0.22);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sky-rain-layer,
  .sky-rain-sheet {
    animation: none;
  }

  .loading-chip-dot {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .alert-sheet.alert-pulse .alert-sheet-head::before {
    animation: none;
  }
}
.alert-sheet-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
}
.alert-sheet-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--alert-accent);
  background: var(--alert-glow);
  flex-shrink: 0;
}
.alert-sheet-icon svg {
  width: 16px;
  height: 16px;
}
.alert-sheet-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.alert-sheet-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.08;
}
.alert-sheet-summary {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}
.alert-insight {
  margin: -2px 0 16px;
}
.alert-insight:empty {
  display: none;
}
.alert-insight-panel {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(195, 126, 68, 0.20);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, var(--alert-glow), transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    var(--glass-light);
  box-shadow:
    inset 3px 0 0 var(--alert-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.alert-insight-head {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}
.alert-insight-head span,
.alert-insight-fact span {
  color: var(--alert-accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.alert-insight-head strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.12;
}
.alert-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.alert-insight-fact {
  min-width: 0;
}
.alert-insight-fact strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.32;
}
.alert-insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.alert-insight-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(195, 126, 68, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
}
.alert-list {
  display: grid;
  gap: 0;
}
.alert-item {
  --alert-accent: #d98324;
  --alert-glow: rgba(217, 131, 36, 0.12);
  position: relative;
  overflow: hidden;
  padding: 0 0 16px 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.alert-item + .alert-item {
  padding-top: 16px;
}
.alert-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.alert-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 17px;
  width: 3px;
  border-radius: 999px;
  background: var(--alert-accent);
  opacity: 0.82;
}
.alert-item + .alert-item::before {
  top: 17px;
}
.alert-item:last-child::before {
  bottom: 1px;
}
.alert-item.alert-severe { --alert-accent: #d45845; --alert-glow: rgba(212, 88, 69, 0.14); }
.alert-item.alert-moderate { --alert-accent: #d98324; --alert-glow: rgba(217, 131, 36, 0.12); }
.alert-item.alert-minor { --alert-accent: #c6a332; --alert-glow: rgba(198, 163, 50, 0.11); }
.alert-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.alert-item-event {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
}
.alert-item-sev {
  flex-shrink: 0;
  color: var(--alert-accent);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.alert-item-when {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.35;
}
.alert-item-instruction {
  margin: 0;
  padding: 12px 13px 12px 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--alert-glow), rgba(255, 255, 255, 0.02)),
    var(--glass-light);
  border: 1px solid var(--border-glass);
  box-shadow: inset 3px 0 0 var(--alert-accent);
}
.alert-item-instruction strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--alert-accent);
  margin-bottom: 4px;
}
.alert-item-instruction p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-line;
}
.alert-item-area,
.alert-item-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.alert-item-area summary,
.alert-item-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
  opacity: 0.78;
  list-style: none;
}
.alert-item-area summary::-webkit-details-marker,
.alert-item-details summary::-webkit-details-marker {
  display: none;
}
.alert-item-area summary::after,
.alert-item-details summary::after {
  content: "›";
  color: var(--muted);
  font-size: 1.05rem;
  transform: rotate(90deg);
  transition: transform 0.16s ease;
}
.alert-item-area[open] summary::after,
.alert-item-details[open] summary::after {
  transform: rotate(-90deg);
}
.alert-item-area summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
}
.alert-item-area summary::after {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
}
.alert-item-area summary span {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.alert-item-area summary strong {
  grid-column: 1;
  max-width: calc(100% - 24px);
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alert-item-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alert-item-area p,
.alert-item-details p {
  margin: 8px 0 0;
  line-height: 1.5;
  white-space: pre-line;
  color: var(--muted);
}
.alert-item-sender {
  margin: 12px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  opacity: 0.5;
}

@media (max-width: 520px) {
  .alert-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px 10px;
  }
  .alert-bar-meta {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
  }
  .alert-bar-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
  .alert-item-head {
    display: grid;
    gap: 8px;
  }
  .alert-item-sev {
    justify-self: start;
  }
  .alert-insight-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Two-mode adaptive layout ---------- */

/* Search-toggle icon (browse mode only) */
.search-toggle svg {
  width: 20px;
  height: 20px;
}

/* BROWSE MODE (default): search collapses into the floating menu.
   The full search box only appears as a popover when requested. */
.shell.search-open .search-popover {
  display: block;
}

.shell:not(.mode-welcome).search-open .search-popover {
  position: fixed;
  z-index: 75;
  top: calc(max(14px, env(safe-area-inset-top, 0px)) + 58px);
  left: max(14px, calc((100vw - 1120px) / 2));
  width: min(420px, calc(100vw - 28px));
}

.shell:not(.mode-welcome) .eyebrow {
  display: none;
}

/* WELCOME / FIRST-RUN extras are hidden in browse mode */
.welcome,
.welcome-locate {
  display: none;
}

/* WELCOME MODE: search/location is the hero; weather chrome steps aside */
.mode-welcome .topbar,
.mode-welcome #forecastView,
.mode-welcome .alert-bar,
.mode-welcome .search-toggle {
  display: none;
}

.mode-welcome .search-popover {
  display: block;
  position: static;
  width: 100%;
  margin-bottom: 12px;
}

.mode-welcome .brand-lockup {
  min-width: 0;
}
.mode-welcome .app-menu h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 0.95;
}
.shell.mode-welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: min(720px, calc(100% - 32px));
  min-height: 100vh;
  min-height: 100svh;
  min-height: var(--app-viewport-height, 100svh);
  padding: max(30px, env(safe-area-inset-top, 0px)) 0 max(32px, env(safe-area-inset-bottom, 0px));
}
.shell.mode-welcome::before {
  display: none;
}
.mode-welcome .welcome {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  text-align: center;
  margin: 0 auto clamp(18px, 4svh, 30px);
}
.mode-welcome .welcome-locate {
  display: inline-flex;
  align-self: center;
}
.mode-welcome .search-popover {
  width: min(640px, 100%);
  margin: 0 auto;
}
.mode-welcome .search {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 20px 54px rgba(16, 33, 52, 0.16);
}
.mode-welcome .search-locate,
.mode-welcome .search-close {
  display: none;
}
.mode-welcome .search input {
  min-height: 50px;
  font-size: 1rem;
}
.mode-welcome .search button[type="submit"] {
  grid-column: auto;
  min-height: 50px;
  padding: 0 18px;
}

.welcome-brand-mark {
  display: grid;
  place-items: center;
  width: min(154px, 38vw);
  aspect-ratio: 136 / 150;
  height: auto;
  margin-bottom: 2px;
  filter: drop-shadow(0 18px 34px rgba(20, 42, 52, 0.16));
}
.welcome-brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}
.welcome-ambient-label {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(100%, 38ch);
  min-height: 31px;
  margin: 12px auto 0;
  padding: 7px 13px;
  border: 1px solid var(--welcome-ambient-border);
  border-radius: 999px;
  background: var(--welcome-ambient-bg);
  color: var(--welcome-ambient-fg);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  box-shadow: var(--welcome-ambient-shadow);
  text-shadow: var(--welcome-ambient-text-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.welcome-ambient-label:hover,
.welcome-ambient-label:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}
.welcome-ambient-label:active {
  transform: translateY(0);
}
.welcome-ambient-label:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.58);
  outline-offset: 3px;
}
.welcome-kicker {
  color: var(--welcome-kicker-fg);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: var(--welcome-copy-shadow);
}
.mode-welcome .welcome-brand {
  width: min(100%, 12.8ch);
  max-width: calc(100vw - 32px);
  color: var(--welcome-headline-fg);
  font-size: clamp(2.25rem, 9.7vw, 5.35rem);
  font-weight: 950;
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: normal;
  text-wrap: balance;
  white-space: normal;
  text-shadow: var(--welcome-copy-shadow);
}
.welcome-sub {
  color: var(--welcome-sub-fg);
  font-size: clamp(1rem, 3vw, 1.18rem);
  font-weight: 750;
  max-width: 28ch;
  margin: 0 auto;
  text-shadow: var(--welcome-copy-shadow);
}
.welcome-moments {
  max-width: 100%;
  margin-top: 8px;
  color: var(--welcome-moments-fg);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  opacity: 1;
  white-space: nowrap;
  text-shadow: var(--welcome-copy-shadow);
}

.welcome-locate {
  align-items: center;
  gap: 8px;
  margin: 14px auto 0;
  padding: 12px 18px;
  border: 1px solid var(--border-glass-md);
  border-radius: 10px;
  background: var(--glass-light);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(29, 48, 58, 0.1);
}
.welcome-locate svg {
  width: 18px;
  height: 18px;
}
.welcome-locate:hover {
  border-color: var(--blue);
}

@media (max-width: 460px) {
  .shell.mode-welcome {
    width: min(100% - 24px, 720px);
  }
  .mode-welcome .welcome-brand {
    width: min(100%, 11.8ch);
    max-width: calc(100vw - 36px);
    font-size: clamp(2.05rem, 9.2vw, 2.55rem);
  }
  .welcome-moments {
    font-size: 0.74rem;
  }
}

@media (max-height: 660px) {
  .welcome-moments {
    display: none;
  }
  .welcome-brand-mark {
    height: 104px;
    transform: scale(0.88);
    transform-origin: bottom center;
    margin-bottom: -8px;
  }
}

/* ---------- Precipitation nowcast ---------- */
.nowcast[hidden] {
  display: none;
}
.nowcast {
  --nowcast-accent: #6faedc;
  --nowcast-glow: rgba(111, 174, 220, 0.2);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 18px;
  padding: 12px 14px 8px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, var(--nowcast-glow), transparent 36%),
    linear-gradient(135deg, rgba(91, 157, 210, 0.14), rgba(71, 184, 176, 0.06)),
    var(--glass-light);
  border: 1px solid rgba(117, 153, 184, 0.22);
  box-shadow:
    inset 2px 0 0 var(--nowcast-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nowcast::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 42%);
  pointer-events: none;
}
.nowcast-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 4px;
}
.nowcast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--nowcast-accent);
  background: rgba(117, 174, 220, 0.12);
}
.nowcast-icon svg {
  width: 17px;
  height: 17px;
}
.nowcast-copy {
  min-width: 0;
}
.nowcast-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}
.nowcast-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}
.nowcast-graph {
  width: 100%;
  margin-top: 2px;
}
.nowcast-svg {
  width: 100%;
  height: auto;
  display: block;
}
.nowcast-axis {
  fill: var(--muted);
  opacity: 0.78;
  font-size: 8.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.nowcast-base {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-opacity: 0.22;
}

@media (pointer: coarse) {
  .launch-location {
    min-height: 44px;
    padding: 0 8px;
  }

  .sheet-close {
    width: 44px;
    height: 44px;
  }

  .sheet-close {
    top: clamp(24px, calc(env(safe-area-inset-top, 0px) + 12px), 34px);
    right: max(10px, calc(env(safe-area-inset-right, 0px) + 10px));
  }

  .day-sheet.sheet-keyboard-active .sheet-close {
    top: clamp(28px, calc(env(safe-area-inset-top, 0px) + 12px), 36px);
  }

  .sheet-head {
    padding-right: 52px;
  }

  .sheet-mode-btn {
    min-height: 44px;
  }

  .graph-metric {
    min-height: 44px;
  }

  .graph-metric-tabs {
    gap: 4px;
  }

  .graph-metric-btn {
    min-width: 48px;
    min-height: 44px;
    padding: 0 10px;
  }

  .sheet-hour-row {
    min-height: 64px;
  }
}
