@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --surface-3: #edf0e9;
  --text: #1d2923;
  --muted: #78837b;
  --faint: #a7b0a8;
  --line: #e6eae3;
  --accent: #62876c;
  --accent-strong: #456d50;
  --accent-soft: #e4eee4;
  --hero-a: #dce8d8;
  --hero-b: #edf0de;
  --hero-text: #263b2d;
  --shadow: 0 18px 48px rgba(43, 65, 48, .08);
  --small-shadow: 0 8px 24px rgba(43, 65, 48, .055);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: 'DM Sans', system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111713;
  --surface: #1a221c;
  --surface-2: #202a22;
  --surface-3: #29342b;
  --text: #edf3ed;
  --muted: #a1afa3;
  --faint: #758276;
  --line: #303c32;
  --accent: #9bc5a2;
  --accent-strong: #b1d6b6;
  --accent-soft: #293d2e;
  --hero-a: #293d31;
  --hero-b: #2a3427;
  --hero-text: #eff7ed;
  --shadow: 0 18px 48px rgba(0, 0, 0, .18);
  --small-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --bg: #111713;
    --surface: #1a221c;
    --surface-2: #202a22;
    --surface-3: #29342b;
    --text: #edf3ed;
    --muted: #a1afa3;
    --faint: #758276;
    --line: #303c32;
    --accent: #9bc5a2;
    --accent-strong: #b1d6b6;
    --accent-soft: #293d2e;
    --hero-a: #293d31;
    --hero-b: #2a3427;
    --hero-text: #eff7ed;
    --shadow: 0 18px 48px rgba(0, 0, 0, .18);
    --small-shadow: 0 8px 24px rgba(0, 0, 0, .14);
  }
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); transition: background .25s ease, color .25s ease; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--accent-strong); }
.is-hidden { display: none !important; }

.app-shell { width: min(1120px, calc(100% - 64px)); margin: 0 auto; padding: 0 0 36px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); font-family: Manrope, sans-serif; font-size: 25px; font-weight: 800; letter-spacing: -1.5px; }
.brand-period, .heading-dot { color: var(--accent); }
.brand-mark { width: 27px; height: 27px; position: relative; display: flex; align-items: center; gap: 3px; justify-content: center; transform: rotate(-17deg); }
.brand-mark span { display: block; width: 5px; border-radius: 9px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 12px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 23px; }
.brand-mark span:nth-child(3) { height: 16px; opacity: .75; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .avatar-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: var(--surface); cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.icon-button:hover, .avatar-button:hover { transform: translateY(-2px); background: var(--surface-2); }
.icon-button svg { width: 19px; height: 19px; color: var(--muted); }
.avatar-button { border: 0; color: #f7fff8; background: #6b8f72; font-weight: 700; }

.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 50px 0 28px; }
.eyebrow, .section-kicker { margin: 0 0 11px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
h1, h2, p { margin-top: 0; }
h1 { margin: 0; font: 800 clamp(36px, 5vw, 54px)/1.04 Manrope, sans-serif; letter-spacing: -2.8px; }
.mobile-break { display: none; }
.subheading { margin: 13px 0 0; color: var(--muted); font-size: 15px; }
.date-pill { flex: 0 0 auto; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; padding: 11px 15px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 100px; font-size: 12px; box-shadow: var(--small-shadow); }
.date-dot { width: 7px; height: 7px; border-radius: 50%; background: #83a989; box-shadow: 0 0 0 4px color-mix(in srgb, #83a989 15%, transparent); }

.search-section { position: relative; display: flex; gap: 12px; align-items: center; z-index: 5; }
.search-wrap { height: 56px; flex: 1; display: flex; align-items: center; gap: 13px; padding: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--small-shadow); transition: border-color .2s ease, box-shadow .2s ease; }
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.search-icon { color: var(--muted); flex: 0 0 auto; }
.search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 14px; }
.search-wrap input::placeholder { color: var(--faint); }
.search-hint { padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); font-size: 9px; letter-spacing: .6px; white-space: nowrap; }
.clear-search { width: 25px; height: 25px; border: 0; background: var(--surface-3); color: var(--muted); border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }
.location-button { height: 56px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .18s ease, background .18s ease; }
.location-button:hover { transform: translateY(-2px); }
.location-button svg { width: 17px; height: 17px; }
.search-results { position: absolute; top: 64px; left: 0; width: min(580px, 100%); max-height: 320px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); z-index: 20; }
.search-result { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.search-result:hover, .search-result:focus-visible { background: var(--surface-2); }
.result-pin { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent-strong); }
.result-copy { display: flex; flex-direction: column; gap: 3px; }
.result-copy strong { font-size: 13px; }
.result-copy small { color: var(--muted); font-size: 11px; }
.search-message { padding: 16px; color: var(--muted); font-size: 12px; }

.saved-places { margin: 24px 0 4px; }
.compact-heading { margin-bottom: 11px; }
.saved-chips { display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 7px; scrollbar-width: thin; }
.saved-chip { flex: 0 0 auto; padding: 9px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.saved-chip.active { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); }

.empty-state { min-height: 405px; padding: 48px 20px 36px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; }
.empty-art { width: 160px; height: 118px; position: relative; margin-bottom: 22px; }
.sun-core { position: absolute; width: 66px; height: 66px; left: 46px; top: 7px; border-radius: 50%; background: linear-gradient(145deg, #f5d88d, #eabf70); box-shadow: 0 0 0 13px rgba(235, 194, 117, .13), 0 12px 30px rgba(210, 166, 91, .2); }
.cloud { position: absolute; background: #d9e3d7; border-radius: 50px; box-shadow: 0 9px 18px rgba(76, 105, 83, .1); }
.cloud-one { width: 91px; height: 30px; left: 9px; top: 73px; }
.cloud-one::before, .cloud-two::before { content: ''; position: absolute; bottom: 9px; left: 17px; width: 38px; height: 38px; border-radius: 50%; background: inherit; }
.cloud-one::after { content: ''; position: absolute; width: 28px; height: 28px; right: 14px; bottom: 8px; border-radius: 50%; background: inherit; }
.cloud-two { width: 70px; height: 25px; left: 82px; top: 89px; opacity: .78; }
.cloud-two::before { width: 28px; height: 28px; left: 14px; }
.empty-state h2 { margin: 0 0 8px; font: 700 22px Manrope, sans-serif; letter-spacing: -.8px; }
.empty-state p { max-width: 390px; margin: 0 0 19px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.primary-button { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 19px; border: 0; border-radius: 13px; background: var(--accent-strong); color: white; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 7px 17px color-mix(in srgb, var(--accent-strong) 18%, transparent); transition: transform .18s ease, filter .18s ease; }
.primary-button:hover { transform: translateY(-2px); filter: brightness(1.05); }
.primary-button:active { transform: translateY(0) scale(.98); }
.primary-button svg { width: 17px; height: 17px; }

.weather-content { padding-top: 28px; animation: content-in .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes content-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.hero-card { min-height: 325px; position: relative; overflow: hidden; padding: 27px 31px 22px; border-radius: var(--radius-xl); color: var(--hero-text); background: linear-gradient(125deg, var(--hero-a), var(--hero-b)); box-shadow: var(--shadow); isolation: isolate; }
.hero-card::before { content: ''; position: absolute; z-index: -1; right: -90px; top: -160px; width: 440px; height: 440px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--hero-text) 9%, transparent); box-shadow: 0 0 0 30px color-mix(in srgb, var(--hero-text) 3%, transparent), 0 0 0 65px color-mix(in srgb, var(--hero-text) 2%, transparent); }
.hero-card::after { content: ''; position: absolute; z-index: -1; left: -120px; bottom: -230px; width: 420px; height: 420px; border-radius: 50%; background: color-mix(in srgb, var(--hero-text) 4%, transparent); filter: blur(3px); }
.hero-card.weather-rain { --hero-a: #cbd9d8; --hero-b: #dce3e1; --hero-text: #283b3e; }
.hero-card.weather-storm { --hero-a: #7c8b91; --hero-b: #a7b5b3; --hero-text: #fff; }
.hero-card.weather-snow { --hero-a: #d8e5ec; --hero-b: #e9eef0; --hero-text: #33434b; }
.hero-card.weather-clear { --hero-a: #e8dfbd; --hero-b: #e7e9cf; --hero-text: #3b3c2c; }
:root[data-theme="dark"] .hero-card.weather-rain { --hero-a: #273c43; --hero-b: #2a3939; --hero-text: #e7f2f0; }
:root[data-theme="dark"] .hero-card.weather-storm { --hero-a: #303944; --hero-b: #3a4148; --hero-text: #f0f3f5; }
:root[data-theme="dark"] .hero-card.weather-snow { --hero-a: #31404a; --hero-b: #38464c; --hero-text: #edf6fa; }
:root[data-theme="dark"] .hero-card.weather-clear { --hero-a: #49432f; --hero-b: #454833; --hero-text: #faf5dc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .hero-card.weather-rain { --hero-a: #273c43; --hero-b: #2a3939; --hero-text: #e7f2f0; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .hero-card.weather-storm { --hero-a: #303944; --hero-b: #3a4148; --hero-text: #f0f3f5; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .hero-card.weather-snow { --hero-a: #31404a; --hero-b: #38464c; --hero-text: #edf6fa; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .hero-card.weather-clear { --hero-a: #49432f; --hero-b: #454833; --hero-text: #faf5dc; }
}
.hero-topline, .hero-main, .hero-bottom { position: relative; z-index: 1; }
.hero-topline { display: flex; justify-content: space-between; align-items: flex-start; }
.location-line { display: flex; align-items: center; gap: 9px; font: 700 18px Manrope, sans-serif; letter-spacing: -.4px; }
.location-line svg { width: 17px; height: 17px; opacity: .7; }
.save-place-button { width: 28px; height: 28px; display: grid; place-items: center; margin-left: 2px; border: 1px solid color-mix(in srgb, var(--hero-text) 17%, transparent); border-radius: 50%; color: var(--hero-text); background: color-mix(in srgb, var(--hero-text) 5%, transparent); font-size: 18px; cursor: pointer; }
.save-place-button.saved { color: #bc8b36; background: rgba(255, 255, 255, .3); }
.hero-updated { margin: 6px 0 0 26px; color: color-mix(in srgb, var(--hero-text) 65%, transparent); font-size: 10px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--hero-text) 15%, transparent); border-radius: 100px; color: color-mix(in srgb, var(--hero-text) 75%, transparent); font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.live-pill span { width: 6px; height: 6px; border-radius: 50%; background: #78a77b; box-shadow: 0 0 0 4px rgba(120, 167, 123, .15); }
.hero-main { min-height: 174px; display: flex; align-items: center; justify-content: space-between; padding: 17px 5px 10px 25px; }
.temperature { font: 600 clamp(76px, 10vw, 110px)/.92 Manrope, sans-serif; letter-spacing: -8px; }
.temperature sup { font-size: .38em; vertical-align: top; margin-left: 3px; line-height: 1.9; letter-spacing: -2px; }
.condition { margin: 12px 0 0 5px; font: 700 17px Manrope, sans-serif; }
.feels-like { margin: 5px 0 0 5px; color: color-mix(in srgb, var(--hero-text) 68%, transparent); font-size: 11px; }
.weather-illustration { width: 215px; height: 160px; position: relative; margin-right: 37px; flex: 0 0 auto; filter: drop-shadow(0 15px 18px rgba(69, 82, 58, .12)); }
.weather-orb { position: absolute; width: 105px; height: 105px; right: 24px; top: 5px; border-radius: 50%; background: linear-gradient(145deg, #fff0b7, #eec66f); box-shadow: 0 0 0 15px rgba(255,255,255,.13), 0 0 0 31px rgba(255,255,255,.07); }
.weather-cloud { position: absolute; bottom: 27px; height: 55px; border-radius: 45px; background: linear-gradient(145deg, #fff, #e5e9dc); box-shadow: 0 15px 20px rgba(62, 84, 65, .12); }
.weather-cloud::before, .weather-cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.weather-cloud::before { width: 74px; height: 74px; left: 25px; bottom: 10px; }
.weather-cloud::after { width: 53px; height: 53px; right: 17px; bottom: 7px; }
.cloud-a { width: 170px; right: 0; }
.cloud-b { width: 100px; height: 31px; bottom: 15px; left: 3px; opacity: .7; transform: scale(.72); }
.hero-card.weather-rain .weather-orb, .hero-card.weather-storm .weather-orb { opacity: .25; }
.hero-card.weather-rain .weather-cloud, .hero-card.weather-storm .weather-cloud { background: linear-gradient(145deg, #eef2ee, #c3cfce); }
.hero-card.weather-snow .weather-orb { opacity: .55; }
.hero-bottom { min-height: 50px; display: flex; align-items: center; gap: 22px; padding: 10px 8px 0 25px; border-top: 1px solid color-mix(in srgb, var(--hero-text) 13%, transparent); }
.hero-stat { display: flex; align-items: center; gap: 7px; color: color-mix(in srgb, var(--hero-text) 74%, transparent); font-size: 11px; }
.hero-stat > span { font-size: 9px; font-weight: 700; opacity: .65; }
.hero-stat strong { color: var(--hero-text); font-size: 11px; font-weight: 700; }
.hero-stat svg { width: 17px; height: 17px; opacity: .7; }
.hero-divider { height: 20px; width: 1px; background: color-mix(in srgb, var(--hero-text) 18%, transparent); }
.wide-stat { margin-left: 5px; }

.forecast-section, .sun-section { margin-top: 34px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font: 700 20px Manrope, sans-serif; letter-spacing: -.7px; }
.section-heading .section-kicker { margin-bottom: 5px; font-size: 9px; }
.section-aside { margin-bottom: 2px; color: var(--muted); font-size: 10px; }
.hourly-card, .daily-card, .sun-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--small-shadow); }
.hourly-card { display: grid; grid-auto-columns: minmax(71px, 1fr); grid-auto-flow: column; overflow-x: auto; scrollbar-width: thin; padding: 17px 12px 15px; }
.hour-item { min-width: 0; display: flex; align-items: center; flex-direction: column; gap: 9px; padding: 3px 5px; border-right: 1px solid var(--line); }
.hour-item:last-child { border-right: 0; }
.hour-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.weather-symbol { min-height: 27px; display: grid; place-items: center; font-size: 23px; line-height: 1; }
.hour-temp { font: 700 15px Manrope, sans-serif; }
.hour-rain { display: flex; align-items: center; gap: 3px; color: #6a9db5; font-size: 9px; }
.hour-rain svg { width: 11px; height: 11px; }
.daily-card { padding: 7px 18px; }
.day-row { min-height: 58px; display: grid; grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.day-row:last-child { border: 0; }
.day-name { color: var(--text); font-size: 11px; font-weight: 700; }
.day-name small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.day-weather { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.day-weather .weather-symbol { min-height: auto; font-size: 19px; }
.day-rain { color: #6a9db5; font-size: 9px; }
.temp-range { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 10px; }
.temp-range strong { color: var(--text); font-size: 11px; }
.range-track { height: 5px; min-width: 36px; overflow: hidden; border-radius: 99px; background: linear-gradient(90deg, #b5d1ce, #e2c783); }
.range-track span { display: block; width: 60%; height: 100%; border-radius: inherit; background: var(--accent); opacity: .7; }

.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.detail-card { min-height: 127px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--small-shadow); }
.detail-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.detail-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; color: var(--accent-strong); background: var(--accent-soft); }
.detail-icon svg { width: 16px; height: 16px; }
.detail-value { margin-top: 13px; font: 700 22px Manrope, sans-serif; letter-spacing: -.8px; }
.detail-note { margin-top: 4px; color: var(--muted); font-size: 9px; }
.sun-card { padding: 21px 25px 17px; }
.sun-times { display: flex; justify-content: space-between; }
.sun-times > div { display: flex; flex-direction: column; gap: 4px; }
.sun-times span { color: var(--muted); font-size: 10px; }
.sun-times strong { font: 700 17px Manrope, sans-serif; }
.sunset-time { text-align: right; }
.sun-arc-wrap { height: 83px; position: relative; overflow: hidden; margin: 9px 4px 0; }
.sun-arc { position: absolute; left: 8%; right: 8%; bottom: -79px; height: 155px; border: 1.5px dashed color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.sun-path { position: absolute; left: 8%; right: 8%; bottom: -79px; height: 155px; border-top: 2px solid color-mix(in srgb, #e6bd70 45%, transparent); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.sun-indicator { position: absolute; top: 5px; left: 50%; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; background: #eabf69; box-shadow: 0 0 0 6px rgba(234,191,105,.16), 0 0 22px rgba(234,191,105,.35); transform: translateX(-50%); transition: left .5s ease; }
.sun-indicator span { width: 5px; height: 5px; border-radius: 50%; background: white; }
.sun-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.data-credit { margin: 30px 0 10px; color: var(--faint); text-align: center; font-size: 9px; }
.data-credit a { color: var(--accent); text-decoration: none; }
.data-credit a:hover { text-decoration: underline; }

.app-footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; margin-top: 38px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; }
.text-button { padding: 5px 0; border: 0; color: var(--accent-strong); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.text-button:hover { text-decoration: underline; }

.modal { width: min(440px, calc(100% - 30px)); max-height: min(85vh, 690px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 30px 100px rgba(0,0,0,.24); }
.modal::backdrop { background: rgba(13, 22, 16, .46); backdrop-filter: blur(5px); }
.modal-card { padding: 25px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.modal-header h2 { margin: 0; font: 800 25px Manrope, sans-serif; letter-spacing: -1px; }
.close-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.setting-group { margin: 20px 0; }
.setting-group > label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; }
.setting-group select { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--text); }
.setting-help { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.segmented-control button { min-height: 37px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.segmented-control button.selected { color: var(--accent-strong); background: var(--surface); box-shadow: 0 2px 7px rgba(0,0,0,.06); font-weight: 700; }
.modal-actions { margin-top: 25px; }
.full-button { width: 100%; }
.manage-place-list { display: flex; flex-direction: column; gap: 7px; }
.manage-place-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.manage-place-row button { width: 31px; height: 31px; border: 0; border-radius: 9px; color: #b26c62; background: var(--surface-2); cursor: pointer; }
.empty-manage { padding: 18px 8px; color: var(--muted); text-align: center; font-size: 12px; }
.about-copy { color: var(--muted); font-size: 12px; line-height: 1.7; }
.muted-copy { color: var(--faint); font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + var(--safe-bottom)); z-index: 100; max-width: min(440px, calc(100% - 32px)); padding: 12px 17px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--surface); box-shadow: var(--shadow); font-size: 12px; text-align: center; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.loading-sheen { position: relative; overflow: hidden; color: transparent !important; border-radius: 7px; background: var(--surface-3); }
.loading-sheen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-100%); animation: sheen 1.2s infinite; }
@keyframes sheen { to { transform: translateX(100%); } }

@media (max-width: 760px) {
  .app-shell { width: min(100% - 34px, 590px); padding-bottom: calc(16px + var(--safe-bottom)); }
  .topbar { height: 70px; }
  .brand { font-size: 23px; }
  .topbar-actions { gap: 7px; }
  .icon-button, .avatar-button { width: 39px; height: 39px; }
  .welcome-row { padding: 34px 0 21px; align-items: flex-start; }
  h1 { font-size: clamp(34px, 9vw, 44px); letter-spacing: -2.1px; }
  .subheading { max-width: 260px; margin-top: 9px; font-size: 12px; }
  .date-pill { display: none; }
  .search-section { flex-direction: column; align-items: stretch; gap: 9px; }
  .search-wrap { width: 100%; height: 54px; padding: 0 15px; }
  .location-button { height: 46px; width: 100%; }
  .search-results { top: 59px; width: 100%; }
  .saved-places { margin-top: 21px; }
  .weather-content { padding-top: 22px; }
  .hero-card { min-height: 300px; padding: 22px 19px 17px; border-radius: 25px; }
  .location-line { font-size: 15px; }
  .hero-updated { margin-left: 25px; font-size: 9px; }
  .live-pill { padding: 6px 8px; font-size: 8px; }
  .hero-main { min-height: 167px; padding: 10px 0 7px 9px; }
  .temperature { font-size: clamp(76px, 22vw, 100px); letter-spacing: -6px; }
  .condition { font-size: 15px; margin-top: 8px; }
  .feels-like { font-size: 10px; }
  .weather-illustration { width: 133px; height: 128px; margin-right: -6px; transform: scale(.82); transform-origin: right center; }
  .weather-orb { width: 82px; height: 82px; right: 13px; top: 1px; }
  .weather-cloud { bottom: 27px; height: 44px; }
  .weather-cloud::before { width: 58px; height: 58px; }
  .weather-cloud::after { width: 40px; height: 40px; }
  .cloud-a { width: 132px; }
  .hero-bottom { gap: 13px; padding: 10px 0 0 8px; }
  .hero-stat { gap: 5px; font-size: 10px; }
  .hero-stat strong { font-size: 10px; }
  .hero-stat svg { width: 14px; height: 14px; }
  .wide-stat { margin-left: 0; }
  .forecast-section, .sun-section { margin-top: 28px; }
  .section-heading h2 { font-size: 18px; }
  .hourly-card { grid-auto-columns: 67px; padding: 15px 8px 13px; border-radius: 18px; }
  .daily-card { padding: 5px 11px; border-radius: 18px; }
  .day-row { min-height: 59px; grid-template-columns: .9fr 1.05fr 1fr; gap: 6px; }
  .day-row .day-weather { display: none; }
  .day-row .day-rain { display: block; text-align: center; }
  .day-name { font-size: 11px; }
  .temp-range { gap: 6px; }
  .range-track { min-width: 42px; }
  .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .detail-card { min-height: 115px; padding: 13px; border-radius: 16px; }
  .detail-value { margin-top: 10px; font-size: 20px; }
  .sun-card { padding: 18px 17px 15px; border-radius: 18px; }
  .app-footer { min-height: 61px; gap: 12px; font-size: 9px; }
}

@media (max-width: 390px) {
  .app-shell { width: calc(100% - 26px); }
  .hero-card { padding-left: 15px; padding-right: 15px; }
  .hero-main { padding-left: 3px; }
  .temperature { font-size: 74px; }
  .weather-illustration { width: 111px; margin-right: -12px; transform: scale(.72); }
  .hero-bottom { gap: 9px; }
  .hero-stat { gap: 4px; }
  .hero-stat strong { font-size: 9px; }
  .hero-divider { margin: 0 1px; }
  .range-track { min-width: 30px; }
  .day-row { grid-template-columns: .9fr .9fr 1.15fr; }
}

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

.button-spinner { width: 13px; height: 13px; display: inline-block; border: 2px solid rgba(255,255,255,.38); border-top-color: white; border-radius: 50%; animation: button-spin .7s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
