/* Primitive → semantic → component tokens. Scene palettes are driven by real solar time and season. */
:root {
  --ink-100: oklch(98% 0.012 220);
  --ink-200: oklch(89% 0.018 220);
  --ink-400: oklch(72% 0.025 220);
  --night-900: oklch(18% 0.035 255);
  --night-800: oklch(24% 0.04 255);
  --ice-300: oklch(85% 0.045 220);
  --sun-300: oklch(89% 0.12 90);
  --text: var(--ink-100);
  --text-muted: oklch(91% 0.018 220 / .76);
  --surface: oklch(95% 0.025 220 / .09);
  --surface-hover: oklch(95% 0.025 220 / .15);
  --surface-solid: oklch(23% 0.035 255 / .96);
  --line: oklch(95% 0.025 220 / .17);
  --chart-color: oklch(90% 0.085 90);
  --focus: oklch(90% 0.12 90);
  --sky-top: oklch(43% 0.07 230);
  --sky-middle: oklch(52% 0.08 220);
  --sky-bottom: oklch(30% 0.055 240);
  --season-glow: oklch(78% 0.08 180 / .24);
  --land-back: oklch(29% 0.045 220 / .55);
  --land-front: oklch(19% 0.035 240 / .82);
  --radius-small: 12px;
  --radius-medium: 20px;
  --radius-large: 30px;
  --shadow: 0 20px 60px oklch(12% 0.03 250 / .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; min-width: 320px; overflow-x: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:not(:disabled), a { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
svg { flex-shrink: 0; }
::selection { background: var(--focus); color: var(--night-900); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.app {
  position: relative;
  min-height: 100dvh;
  color: var(--text);
  background: linear-gradient(165deg, var(--sky-top), var(--sky-middle) 45%, var(--sky-bottom));
  transition: background 900ms ease, color 250ms ease;
  isolation: isolate;
  overflow-x: clip;
}
.app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 15%, oklch(16% 0.03 250 / .08) 60%, oklch(14% 0.03 250 / .38));
}
.app[data-season='spring'] { --season-glow: oklch(83% 0.09 155 / .28); --chart-color: oklch(91% 0.1 115); }
.app[data-season='summer'] { --season-glow: oklch(80% 0.12 190 / .28); --chart-color: oklch(91% 0.13 95); }
.app[data-season='autumn'] { --season-glow: oklch(75% 0.13 55 / .3); --chart-color: oklch(86% 0.15 65); }
.app[data-season='winter'] { --season-glow: oklch(83% 0.07 230 / .3); --chart-color: oklch(88% 0.09 220); }
.app[data-phase='dawn'] { --sky-top: oklch(48% 0.075 305); --sky-middle: oklch(60% 0.11 35); --sky-bottom: oklch(35% 0.07 280); }
.app[data-phase='day'][data-season='spring'] { --sky-top: oklch(48% 0.07 205); --sky-middle: oklch(57% 0.075 180); --sky-bottom: oklch(34% 0.07 190); }
.app[data-phase='day'][data-season='summer'] { --sky-top: oklch(43% 0.11 235); --sky-middle: oklch(52% 0.105 215); --sky-bottom: oklch(29% 0.07 235); }
.app[data-phase='day'][data-season='autumn'] { --sky-top: oklch(46% 0.07 70); --sky-middle: oklch(53% 0.095 55); --sky-bottom: oklch(31% 0.065 45); }
.app[data-phase='day'][data-season='winter'] { --sky-top: oklch(43% 0.065 240); --sky-middle: oklch(55% 0.06 220); --sky-bottom: oklch(32% 0.05 245); }
.app[data-phase='dusk'] { --sky-top: oklch(35% 0.08 290); --sky-middle: oklch(49% 0.13 35); --sky-bottom: oklch(25% 0.07 280); }
.app[data-phase='night'] { --sky-top: oklch(17% 0.055 275); --sky-middle: oklch(25% 0.075 260); --sky-bottom: oklch(13% 0.04 260); }
.app[data-kind='overcast'], .app[data-kind='fog'] { --sky-top: oklch(38% 0.025 235); --sky-middle: oklch(45% 0.028 225); --sky-bottom: oklch(25% 0.025 235); }
.app[data-kind='rain'], .app[data-kind='thunder'] { --sky-top: oklch(29% 0.045 245); --sky-middle: oklch(36% 0.05 230); --sky-bottom: oklch(18% 0.04 250); }

.style-light {
  --text: oklch(23% 0.035 245);
  --text-muted: oklch(30% 0.03 240 / .76);
  --surface: oklch(98% 0.015 210 / .58);
  --surface-hover: oklch(98% 0.015 210 / .8);
  --surface-solid: oklch(97% 0.015 210 / .97);
  --line: oklch(28% 0.035 240 / .15);
  --focus: oklch(42% 0.12 240);
  --chart-color: oklch(48% 0.13 45);
}
.style-light.app {
  --sky-top: oklch(72% 0.055 220);
  --sky-middle: oklch(78% 0.045 205);
  --sky-bottom: oklch(61% 0.045 220);
}
.style-light.app::before { background: linear-gradient(180deg, oklch(98% 0.01 220 / .08), transparent 60%, oklch(98% 0.01 220 / .16)); }
.style-light .atmosphere { opacity: .52; }
.style-dark { --sky-top: oklch(17% 0.045 270); --sky-middle: oklch(23% 0.055 255); --sky-bottom: oklch(13% 0.035 255); }

.atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -2; transition: opacity 400ms ease; }
.weather-canvas { position: absolute; inset: 0; }
.sky-aurora { position: absolute; width: 90vmax; height: 90vmax; right: -35vmax; top: -45vmax; border-radius: 50%; background: radial-gradient(circle, var(--season-glow), transparent 66%); opacity: .9; }
.cloud { position: absolute; width: 44vw; height: 10vw; min-height: 80px; border-radius: 50%; background: radial-gradient(ellipse, oklch(96% 0.015 220 / .2), transparent 68%); filter: blur(16px); opacity: .5; transform: translate3d(0,0,0); }
.cloud-one { left: -12vw; top: 18%; animation: cloud-drift 34s ease-in-out infinite alternate; }
.cloud-two { right: -14vw; top: 42%; animation: cloud-drift-two 42s ease-in-out infinite alternate; }
.cloud-three { left: 20vw; top: 68%; opacity: .25; animation: cloud-drift 50s ease-in-out infinite alternate-reverse; }
.app[data-kind='clear'] .cloud { opacity: .18; }
.app[data-kind='overcast'] .cloud, .app[data-kind='rain'] .cloud, .app[data-kind='thunder'] .cloud { opacity: .85; }
.mist { position: absolute; inset: 45% -10% 0; background: linear-gradient(180deg, transparent, oklch(89% 0.018 220 / .24), oklch(89% 0.018 220 / .08)); filter: blur(12px); animation: mist-breathe 8s ease-in-out infinite alternate; }
.heat-haze { position: absolute; inset: 40% 0 0; opacity: .13; background: repeating-linear-gradient(178deg, transparent 0 18px, oklch(96% 0.04 90 / .35) 20px, transparent 23px); animation: heat-move 6s ease-in-out infinite alternate; }
.landscape { position: absolute; left: -10%; width: 120%; height: 34vh; bottom: -16vh; border-radius: 50% 50% 0 0; transform: rotate(-3deg); }
.landscape-back { background: var(--land-back); bottom: -12vh; left: 20%; transform: rotate(7deg); }
.landscape-front { background: var(--land-front); }

.page-shell { width: calc(100% - 80px); max-width: 1440px; margin-inline: auto; }
.site-header { position: relative; z-index: 10; height: 92px; width: calc(100% - 80px); max-width: 1440px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 20px; font-weight: 650; letter-spacing: .22em; }
.brand small { font-size: 9px; letter-spacing: .2em; color: var(--text-muted); }
.brand-mark { position: relative; width: 31px; height: 31px; display: inline-block; transform: rotate(45deg); }
.brand-mark i { position: absolute; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50% 50% 50% 2px; }
.brand-mark i:nth-child(1) { left: 0; top: 0; }
.brand-mark i:nth-child(2) { right: 0; top: 0; transform: rotate(90deg); }
.brand-mark i:nth-child(3) { right: 0; bottom: 0; transform: rotate(180deg); }
.brand-mark i:nth-child(4) { left: 0; bottom: 0; transform: rotate(270deg); }
.desktop-nav { display: flex; gap: 40px; margin-left: 7vw; }
.desktop-nav a { position: relative; min-height: 44px; display: grid; place-items: center; font-size: 14px; color: var(--text-muted); transition: color 180ms ease; }
.desktop-nav a::after { content: ''; position: absolute; bottom: 5px; left: 0; right: 100%; height: 1px; background: currentColor; transition: right 180ms ease; }
.desktop-nav a:hover { color: var(--text); }
.desktop-nav a:hover::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.city-trigger { display: flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; transition: background 180ms ease, transform 180ms ease; }
.city-trigger:hover { background: var(--surface-hover); }
.city-trigger:active { transform: scale(.97); }
.city-trigger span { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: transparent; transition: background 180ms ease, transform 180ms ease, color 180ms ease; }
.icon-button:hover { background: var(--surface-hover); }
.icon-button:active { transform: scale(.93); }
.icon-button.bordered { border: 1px solid var(--line); background: var(--surface); }
.is-favorite { color: var(--sun-300); }

.status-banner { position: relative; z-index: 8; max-width: 760px; margin: 16px auto -8px; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--shadow); font-size: 14px; }
.status-banner span { flex: 1; }
.status-banner button { min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--surface-hover); }
.status-banner button:last-child { width: 36px; padding: 0; display: grid; place-items: center; }

.hero { min-height: calc(100dvh - 92px); padding-top: 34px; padding-bottom: 32px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-meta { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 5px 20px; }
.place-line { font-size: 13px; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: oklch(84% 0.14 150); box-shadow: 0 0 0 4px oklch(84% 0.14 150 / .12); }
.live-dot.refreshing { animation: pulse-opacity 1s ease-in-out infinite; }
.local-clock { grid-row: span 2; font-variant-numeric: tabular-nums; font-weight: 250; letter-spacing: -.055em; line-height: .9; }
.local-clock > span { font-size: clamp(36px, 4.4vw, 66px); }
.local-clock small { font-size: clamp(16px, 1.7vw, 24px); color: var(--text-muted); letter-spacing: -.02em; }
.hero-meta p { margin: 0; font-size: 13px; color: var(--text-muted); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; gap: 24px; flex: 1; padding: 20px 0 8px; }
.hero-copy { position: relative; z-index: 2; }
.season-stamp { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); letter-spacing: .12em; }
.season-stamp span { color: var(--text); font-size: 11px; letter-spacing: .24em; }
.season-stamp i { width: 34px; height: 1px; background: var(--line); }
.temperature-lockup { display: flex; align-items: center; margin-left: -10px; }
.current-temperature { font-family: 'Avenir Next', 'Helvetica Neue', 'PingFang SC', sans-serif; font-size: clamp(138px, 18vw, 276px); line-height: .9; font-weight: 200; letter-spacing: -.09em; font-variant-numeric: tabular-nums; text-shadow: 0 8px 50px oklch(15% 0.03 250 / .12); }
.temperature-side { margin: 28px 0 0 34px; display: flex; flex-direction: column; align-items: flex-start; }
.temperature-side strong { font-size: clamp(23px, 2.2vw, 34px); font-weight: 450; letter-spacing: .05em; white-space: nowrap; }
.temperature-side > span { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.high-low { display: flex; gap: 24px; margin: 4px 0 0 8px; }
.high-low span { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.weather-note { max-width: 480px; margin: 22px 0 0 8px; font-size: 15px; line-height: 1.75; color: var(--text-muted); }
.celestial-panel { position: relative; height: min(44vw, 510px); min-height: 360px; display: grid; place-items: center; }
.celestial-orb { position: absolute; width: min(26vw, 350px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 36% 30%, oklch(98% 0.07 90 / .9), oklch(86% 0.12 75 / .5) 38%, oklch(80% 0.11 60 / .08) 68%, transparent 70%); filter: blur(.2px); animation: orb-breathe 6s ease-in-out infinite alternate; }
.celestial-orb::before { content: ''; position: absolute; inset: 21%; border-radius: 50%; background: radial-gradient(circle at 38% 30%, #fff7d6, #ffdba0 70%); box-shadow: 0 0 80px #ffdc9f55; }
.celestial-orb.night { background: radial-gradient(circle, oklch(78% 0.06 240 / .24), transparent 67%); }
.celestial-orb.night::before { background: radial-gradient(circle at 35% 30%, #f1f5f5, #b9c9dc 70%); box-shadow: 0 0 80px #b8ceff33; }
.celestial-orb.night span { position: absolute; z-index: 1; width: 29%; height: 29%; left: 29%; top: 24%; border-radius: 50%; background: oklch(38% 0.055 260 / .55); }
.celestial-orb.dawn::before, .celestial-orb.dusk::before { background: radial-gradient(circle at 38% 30%, #fff0d0, #efa685 70%); }
.orbital-ring { position: absolute; width: min(34vw, 450px); aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; transform: rotate(-20deg) scaleY(.46); }
.ring-two { width: min(40vw, 520px); opacity: .5; transform: rotate(35deg) scaleY(.56); }
.weather-glyph { position: relative; z-index: 2; filter: drop-shadow(0 20px 30px oklch(15% 0.03 250 / .2)); animation: glyph-float 5s ease-in-out infinite alternate; }
.scene-caption { position: absolute; bottom: 12%; font-size: 10px; letter-spacing: .34em; color: var(--text-muted); }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; }
.quick-actions { display: flex; gap: 8px; }
.primary-button, .secondary-button { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 999px; padding: 0 20px; font-size: 14px; font-weight: 550; transition: transform 180ms ease, background 180ms ease; }
.primary-button { color: oklch(22% 0.03 250); background: var(--ink-100); }
.primary-button:hover { background: #fff; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); }
.secondary-button:hover { background: var(--surface-hover); }
.primary-button:active, .secondary-button:active { transform: scale(.97); }
.update-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.update-note small { margin-left: 10px; letter-spacing: .08em; }

.metrics-section { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-card { min-width: 0; padding: 28px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.metric-card:first-child { padding-left: 0; }
.metric-card:last-child { border-right: 0; }
.metric-icon { height: 28px; margin-bottom: 24px; color: var(--text-muted); }
.metric-icon svg { width: 21px; height: 21px; stroke-width: 1.5; }
.metric-card > span { font-size: 12px; color: var(--text-muted); }
.metric-card > strong { margin-top: 7px; font-size: clamp(20px, 1.8vw, 27px); font-weight: 400; letter-spacing: -.03em; white-space: nowrap; }
.metric-card > small { margin-top: 8px; font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.forecast-section { padding-top: 110px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 32px; }
.section-kicker { display: block; margin-bottom: 12px; font-size: 10px; letter-spacing: .28em; color: var(--text-muted); }
.section-heading h2, .dialog-header h2 { margin: 0; font-size: clamp(28px, 3vw, 44px); line-height: 1.15; font-weight: 400; letter-spacing: -.035em; }
.section-heading > p { margin: 0 0 5px; font-size: 13px; color: var(--text-muted); }
.hourly-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-large); background: var(--surface); backdrop-filter: blur(18px); box-shadow: inset 0 1px 0 oklch(98% 0.01 220 / .08); }
.hourly-summary { display: flex; align-items: baseline; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-muted); }
.hourly-summary strong { color: var(--text); font-size: 24px; font-weight: 450; }
.hourly-summary .rain-prob { margin-left: auto; }
.hourly-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.hourly-chart-wrap { position: relative; width: 280vw; padding: 10px 16px 14px; }
.temperature-chart { display: block; width: 100%; height: 150px; overflow: visible; }
.chart-temp { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.hourly-items { display: grid; grid-template-columns: repeat(24, 1fr); }
.hour-item { min-width: 0; min-height: 88px; padding: 8px 0 4px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; border-radius: 12px; background: transparent; color: var(--text-muted); font-size: 11px; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.hour-item:hover, .hour-item.is-selected { color: var(--text); background: var(--surface-hover); }
.hour-item:active { transform: scale(.95); }
.hour-rain { min-height: 16px; color: oklch(86% 0.08 220); font-size: 10px; }
.style-light .hour-rain { color: oklch(43% 0.11 235); }

.daily-section { padding-bottom: 110px; }
.daily-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 48px; align-items: start; }
.daily-list { border-top: 1px solid var(--line); }
.day-row { display: grid; grid-template-columns: 90px minmax(140px, 1fr) 62px minmax(180px, 1.2fr) 96px; align-items: center; gap: 18px; min-height: 88px; border-bottom: 1px solid var(--line); }
.day-date { display: flex; flex-direction: column; gap: 5px; }
.day-date strong { font-size: 15px; font-weight: 500; }
.day-date span { color: var(--text-muted); font-size: 11px; }
.day-condition { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.day-rain { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.day-range { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.day-range strong { text-align: right; font-weight: 550; }
.range-track { position: relative; height: 3px; border-radius: 99px; background: var(--line); }
.range-track i { position: absolute; top: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, oklch(76% 0.1 220), var(--chart-color)); }
.day-sun { display: flex; flex-direction: column; gap: 7px; }
.day-sun span { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.solar-column { display: grid; gap: 16px; }
.sun-arc-card, .daylight-note { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-medium); background: var(--surface); backdrop-filter: blur(18px); }
.sun-arc-heading { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); }
.sun-arc-heading strong { color: var(--text); font-weight: 450; font-variant-numeric: tabular-nums; }
.sun-arc-card > svg { display: block; width: 100%; margin-top: 12px; }
.sun-arc-base { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 4; }
.sun-arc-progress { fill: none; stroke: url(#sunArcGradient); stroke-width: 2; stroke-linecap: round; }
.sun-arc-horizon { stroke: var(--line); }
.sun-arc-orb { transition: transform 800ms ease; }
.sun-times { display: flex; align-items: center; justify-content: space-between; }
.sun-times > span { display: grid; grid-template-columns: auto auto; gap: 2px 6px; align-items: center; }
.sun-times small { color: var(--text-muted); font-size: 10px; }
.sun-times strong { grid-column: 2; font-size: 13px; font-weight: 450; }
.sun-moon { color: var(--text-muted); }
.daylight-note > span { font-size: 11px; color: var(--text-muted); }
.daylight-note > strong { display: block; margin-top: 7px; font-size: 24px; font-weight: 350; }
.daylight-note p { margin: 12px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.7; }

.site-footer { min-height: 180px; padding: 36px 0 44px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr auto; gap: 32px; align-items: center; }
.footer-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.footer-brand .brand-mark { width: 25px; height: 25px; transform: rotate(45deg) scale(.8); }
.footer-brand strong { font-size: 15px; letter-spacing: .12em; }
.footer-brand p { grid-column: 1 / -1; margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }
.footer-meta p { margin: 4px 0; color: var(--text-muted); font-size: 11px; line-height: 1.6; }
.text-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: transparent; color: var(--text-muted); font-size: 12px; }
.text-button:hover { color: var(--text); }
.text-button.danger { color: oklch(72% 0.15 25); }
.mobile-nav { display: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: oklch(10% 0.03 260 / .64); backdrop-filter: blur(10px); animation: backdrop-in 180ms ease-out; }
.dialog { width: 100%; max-width: 640px; max-height: min(88dvh, 850px); overflow-y: auto; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-large); color: var(--text); background: var(--surface-solid); box-shadow: 0 30px 100px oklch(8% 0.03 260 / .45); animation: dialog-in 240ms cubic-bezier(.22,1,.36,1); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 26px; }
.dialog-header h2 { font-size: 28px; }
.search-field { min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.search-field:focus-within { border-color: var(--focus); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 15px; }
.search-field input::placeholder { color: var(--text-muted); }
.clear-search { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: transparent; }
.clear-search:hover { background: var(--surface-hover); }
.locate-row { width: 100%; min-height: 66px; margin-top: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; text-align: left; border-radius: 16px; background: var(--surface); transition: background 180ms ease; }
.locate-row:hover { background: var(--surface-hover); }
.locate-row > span { flex: 1; display: grid; gap: 4px; }
.locate-row strong { font-size: 14px; font-weight: 500; }
.locate-row small { font-size: 11px; color: var(--text-muted); }
.city-results { min-height: 200px; padding-top: 12px; }
.city-group h3 { display: flex; align-items: center; gap: 6px; margin: 20px 6px 8px; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: .08em; }
.city-result { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.city-result.is-current { background: var(--surface); }
.city-select { flex: 1; min-width: 0; min-height: 66px; display: flex; align-items: center; gap: 12px; padding: 10px 8px; text-align: left; background: transparent; }
.city-select:hover { background: var(--surface-hover); }
.city-select > span { flex: 1; min-width: 0; display: grid; gap: 4px; }
.city-select strong { font-size: 15px; font-weight: 500; }
.city-select small { overflow: hidden; color: var(--text-muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.city-select em { font-size: 10px; font-style: normal; color: var(--text-muted); }
.favorite-button { width: 44px; }
.search-status { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-muted); font-size: 13px; text-align: center; }
.city-empty { min-height: 220px; display: grid; place-content: center; justify-items: center; color: var(--text-muted); text-align: center; }
.city-empty p { font-size: 13px; line-height: 1.8; }
.loader-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: currentColor; animation: pulse-opacity 1s ease-in-out infinite; }

.setting-group { padding: 20px 0; border-top: 1px solid var(--line); }
.setting-label { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 14px; }
.setting-label strong, .setting-row strong { font-size: 14px; font-weight: 500; }
.setting-label span, .setting-row span { color: var(--text-muted); font-size: 11px; text-align: right; }
.segmented-control { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface); }
.segmented-control.three { grid-template-columns: repeat(3, 1fr); }
.segmented-control button { min-height: 42px; border-radius: 10px; background: transparent; color: var(--text-muted); font-size: 13px; transition: background 180ms ease, color 180ms ease; }
.segmented-control button.active { color: var(--text); background: var(--surface-hover); box-shadow: 0 2px 12px oklch(10% 0.03 250 / .12); }
.season-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.season-option { position: relative; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; background: transparent; font-size: 12px; }
.season-option.active { background: var(--surface-hover); border-color: var(--text-muted); }
.season-option > svg { position: absolute; top: 5px; right: 5px; }
.season-swatch { width: 20px; height: 20px; border-radius: 50% 50% 50% 3px; background: linear-gradient(135deg, #a7cbb3, #e7b7c4); transform: rotate(-20deg); }
.season-option.summer .season-swatch { background: linear-gradient(135deg, #68b8cd, #c7d983); }
.season-option.autumn .season-swatch { background: linear-gradient(135deg, #d9ac59, #bd6f51); }
.season-option.winter .season-swatch { background: linear-gradient(135deg, #9db8d1, #e0e8ed); }
.season-option.auto .season-swatch { background: conic-gradient(#a7cbb3, #68b8cd, #d9ac59, #9db8d1, #a7cbb3); }
.setting-row { min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); }
.setting-row > div { display: grid; gap: 5px; }
.setting-row span { text-align: left; }
.switch { position: relative; width: 50px; height: 44px; flex-shrink: 0; background: transparent; }
.switch::before { content: ''; position: absolute; width: 46px; height: 26px; left: 2px; top: 9px; border-radius: 99px; background: var(--surface-hover); border: 1px solid var(--line); transition: background 180ms ease; }
.switch span { position: absolute; z-index: 1; width: 20px; height: 20px; top: 12px; left: 5px; border-radius: 50%; background: var(--text-muted); transition: transform 180ms ease, background 180ms ease; }
.switch.is-on::before { background: oklch(65% 0.1 180 / .5); }
.switch.is-on span { transform: translateX(20px); background: var(--text); }
.storage-note { padding: 18px; border-radius: 14px; background: var(--surface); }
.storage-note > strong { font-size: 12px; }
.storage-note p { margin: 8px 0; color: var(--text-muted); font-size: 11px; line-height: 1.7; }
.settings-actions { display: flex; justify-content: space-between; gap: 12px; }
.location-notice { max-width: 480px; text-align: center; }
.location-illustration { position: relative; width: 90px; height: 90px; margin: 0 auto 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.location-illustration span { position: absolute; inset: -10px; border: 1px dashed var(--line); border-radius: 50%; animation: slow-spin 18s linear infinite; }
.location-notice h2 { margin: 0 0 18px; font-size: 30px; font-weight: 400; }
.location-notice > p { color: var(--text-muted); font-size: 13px; line-height: 1.8; }
.location-notice .privacy-small { font-size: 11px; }
.notice-actions { display: grid; gap: 10px; margin-top: 24px; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 10px 12px 10px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface-solid); box-shadow: var(--shadow); font-size: 13px; animation: toast-in 220ms ease-out; }
.toast button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: transparent; }

.loading-scene, .empty-state { min-height: calc(100dvh - 92px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.skeleton { border-radius: 14px; background: linear-gradient(100deg, var(--surface) 20%, var(--surface-hover) 45%, var(--surface) 70%); background-size: 220% 100%; animation: skeleton-wave 1.5s linear infinite; }
.skeleton-meta { width: 260px; height: 26px; }
.skeleton-temperature { width: min(620px, 80%); height: 220px; margin-top: 50px; }
.skeleton-copy { width: min(430px, 70%); height: 24px; margin-top: 30px; }
.loading-label { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--text-muted); font-size: 13px; }
.empty-state { align-items: center; text-align: center; }
.empty-state h1 { margin: 22px 0 8px; font-weight: 400; }
.empty-state p { color: var(--text-muted); }
.empty-state > div { display: flex; gap: 10px; margin-top: 20px; }
.skip-link { position: fixed; z-index: 80; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 16px; border-radius: 8px; background: var(--surface-solid); }
.skip-link:focus { transform: translateY(0); }
.spin { animation: slow-spin 1s linear infinite; }

@keyframes cloud-drift { to { transform: translate3d(16vw, -2vh, 0); } }
@keyframes cloud-drift-two { to { transform: translate3d(-18vw, 3vh, 0); } }
@keyframes mist-breathe { to { opacity: .45; transform: translate3d(3%,0,0); } }
@keyframes heat-move { to { opacity: .25; transform: translate3d(0,-8px,0); } }
@keyframes orb-breathe { to { transform: scale(1.045); opacity: .85; } }
@keyframes glyph-float { to { transform: translate3d(0,-10px,0); } }
@keyframes pulse-opacity { 50% { opacity: .3; } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes skeleton-wave { to { background-position-x: -220%; } }

.animations-off *, .animations-off *::before, .animations-off *::after { animation-play-state: paused !important; }

@media (min-width: 701px) {
  .hourly-chart-wrap { width: max(100%, 1120px); }
}

@media (max-width: 1180px) {
  .metrics-section { grid-template-columns: repeat(3, 1fr); }
  .metric-card { border-bottom: 1px solid var(--line); }
  .metric-card:nth-child(3) { border-right: 0; }
  .metric-card:nth-child(n+4) { border-bottom: 0; }
  .metric-card:first-child { padding-left: 20px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); }
  .current-temperature { font-size: clamp(130px, 18vw, 210px); }
  .temperature-side { margin-left: 22px; }
  .daily-layout { grid-template-columns: 1fr; }
  .solar-column { grid-template-columns: 1fr 1fr; }
  .day-row { grid-template-columns: 80px minmax(130px, 1fr) 60px minmax(170px, 1.2fr); }
  .day-sun { display: none; }
}

@media (max-width: 820px) {
  .page-shell, .site-header { width: calc(100% - 40px); }
  .desktop-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .celestial-panel { position: absolute; right: -50px; top: 180px; width: 380px; height: 380px; min-height: 0; opacity: .55; z-index: -1; }
  .celestial-orb { width: 300px; }
  .orbital-ring { width: 350px; }
  .ring-two { width: 390px; }
  .hero-copy { padding-top: 60px; }
  .current-temperature { font-size: clamp(140px, 28vw, 210px); }
  .hero { min-height: 780px; }
  .day-row { grid-template-columns: 74px minmax(120px, 1fr) 54px minmax(150px, 1fr); gap: 12px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .footer-meta { grid-row: 2; grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 76px; }
  .page-shell, .site-header { width: calc(100% - 32px); }
  .site-header { height: 72px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 8px; }
  .brand-mark { transform: rotate(45deg) scale(.82); margin-right: -3px; }
  .header-actions { gap: 2px; }
  .header-icon { display: none; }
  .city-trigger { padding: 0 11px; }
  .city-trigger > svg:last-child { display: none; }
  .city-trigger span { max-width: 86px; font-size: 13px; }
  .hero { min-height: calc(100dvh - 72px); padding-top: 24px; padding-bottom: 22px; }
  .hero-meta { grid-template-columns: 1fr auto; }
  .place-line { font-size: 11px; max-width: 180px; }
  .hero-meta p { max-width: 190px; font-size: 11px; line-height: 1.6; }
  .local-clock > span { font-size: 32px; }
  .local-clock small { font-size: 14px; }
  .hero-grid { padding: 0; }
  .hero-copy { padding-top: 44px; }
  .season-stamp { font-size: 10px; }
  .season-stamp span { font-size: 9px; }
  .temperature-lockup { margin: 10px 0 0 -5px; align-items: flex-start; }
  .current-temperature { font-size: clamp(112px, 38vw, 164px); line-height: .95; }
  .temperature-side { margin: 17px 0 0 18px; }
  .temperature-side > svg { width: 50px; height: 50px; }
  .temperature-side strong { margin-top: 4px; font-size: 21px; }
  .temperature-side > span { font-size: 12px; }
  .high-low { gap: 15px; margin-top: 8px; }
  .high-low span { font-size: 12px; }
  .weather-note { margin-top: 16px; font-size: 13px; line-height: 1.65; max-width: 310px; }
  .celestial-panel { top: 190px; right: -115px; width: 320px; height: 320px; opacity: .42; }
  .celestial-orb { width: 250px; }
  .weather-glyph svg { width: 110px; height: 110px; }
  .orbital-ring { width: 290px; }
  .ring-two { width: 320px; }
  .scene-caption { display: none; }
  .hero-bottom { align-items: flex-end; }
  .quick-actions { gap: 6px; }
  .quick-actions .secondary-button { padding: 0 15px; }
  .update-note { max-width: 110px; flex-wrap: wrap; justify-content: flex-end; gap: 5px; text-align: right; font-size: 10px; }
  .update-note small { display: none; }
  .status-banner { width: calc(100% - 32px); margin-top: 10px; font-size: 12px; }
  .metrics-section { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .metric-card { padding: 22px 20px; }
  .metric-card:first-child { padding-left: 20px; }
  .metric-card:nth-child(2n) { border-right: 0; }
  .metric-card:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-card:nth-child(n+4) { border-bottom: 1px solid var(--line); }
  .metric-card:nth-child(n+5) { border-bottom: 0; }
  .metric-icon { margin-bottom: 16px; }
  .metric-card > strong { font-size: 22px; }
  .forecast-section { padding-top: 72px; }
  .section-heading { align-items: flex-start; margin-bottom: 24px; }
  .section-heading h2 { font-size: 28px; }
  .section-heading > p { display: none; }
  .hourly-shell { width: calc(100% + 16px); border-radius: 20px 0 0 20px; border-right: 0; }
  .hourly-summary { padding: 16px 18px; gap: 10px; }
  .hourly-summary strong { font-size: 20px; }
  .hourly-summary > span:nth-child(3) { display: none; }
  .hourly-chart-wrap { width: 680vw; padding-inline: 12px; }
  .temperature-chart { height: 132px; }
  .daily-section { padding-bottom: 72px; }
  .daily-layout { gap: 28px; }
  .day-row { grid-template-columns: 54px 1fr auto; grid-template-rows: auto auto; gap: 4px 10px; padding: 15px 0; min-height: 96px; }
  .day-date { grid-row: 1 / 3; }
  .day-condition { grid-column: 2; font-size: 12px; }
  .day-condition svg { width: 32px; height: 32px; }
  .day-rain { grid-column: 3; grid-row: 1; }
  .day-range { grid-column: 2 / 4; grid-row: 2; }
  .solar-column { grid-template-columns: 1fr; }
  .sun-arc-card, .daylight-note { padding: 22px; }
  .site-footer { padding-bottom: 110px; grid-template-columns: 1fr; gap: 20px; }
  .footer-meta { grid-row: auto; grid-column: auto; }
  .site-footer > .text-button { justify-self: start; }
  .mobile-nav { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); min-height: 66px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-solid); backdrop-filter: blur(20px); box-shadow: 0 12px 40px oklch(8% 0.03 250 / .28); }
  .mobile-nav a, .mobile-nav button { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 17px; background: transparent; color: var(--text-muted); font-size: 10px; }
  .mobile-nav a:active, .mobile-nav button:active { background: var(--surface-hover); color: var(--text); }
  .modal-backdrop { padding: 12px; align-items: end; }
  .dialog { max-height: 91dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px; }
  .dialog-header h2 { font-size: 25px; }
  .setting-label { display: grid; gap: 5px; }
  .setting-label span { text-align: left; }
  .season-options { gap: 5px; }
  .season-option { min-height: 66px; }
  .settings-actions { flex-wrap: wrap; }
  .notice-backdrop { align-items: center; }
  .location-notice { padding: 28px 22px; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); font-size: 12px; }
  .skeleton-temperature { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 全局基础（原 src/index.css） ---------- */
:root {
  font-family: 'Avenir Next', 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}
html, body, #app { min-height: 100%; }
body { font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
