:root {
  color-scheme: light;
  --ink: #273e5b;
  --secondary: #526782;
  --blue: #3c628e;
  --sky: #eaf3ff;
  --line: #dee7f0;
  --surface: #fff;
  --radius: 24px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f5f8fc; color: var(--ink); font-size: 14px; line-height: 1.6; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .5; }
button { border: 0; background: none; }
a { color: inherit; text-decoration: none; }
button, a, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #4978ab; outline-offset: 4px; }
button { transition: background .18s ease, color .18s ease; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -80px; left: 20px; background: white; padding: 12px; z-index: 30; }
.skip-link:focus { top: 8px; }
.app-shell { max-width: 1320px; padding: 0 48px; margin: auto; }
.site-header { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; line-height: 1.35; letter-spacing: 1px; }
.brand small { display: block; font-size: 11px; font-weight: 500; letter-spacing: 1.3px; margin-top: 4px; color: var(--secondary); }
.brand-symbol { width: 47px; height: 47px; background: #e2edfa; border-radius: 17px; display: grid; place-items: center; font-size: 35px; color: #6685ac; padding-bottom: 7px; }
nav { display: flex; gap: 30px; align-self: stretch; margin-left: 50px; }
.nav-button { padding: 0 3px; position: relative; color: var(--secondary); }
.nav-button.active { font-weight: 650; color: var(--ink); }
.nav-button.active::after { content: ""; position: absolute; bottom: 23px; left: 25%; right: 25%; height: 3px; background: #7c9ec5; border-radius: 5px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.unit-toggle { display: flex; background: #e9eef5; padding: 4px; border-radius: 12px; }
.unit-toggle button { width: 39px; height: 32px; border-radius: 8px; font-size: 13px; font-weight: 650; }
.unit-toggle [aria-pressed="true"] { background: white; box-shadow: 0 2px 5px #21385612; }
.icon-button { width: 40px; min-height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.icon-button:hover { background: #e4edf8; }
.toolbar { display: flex; align-items: center; gap: 18px; margin: 27px 0; }
.location-search { position: relative; flex: 1; max-width: 468px; }
#search-form { display: flex; align-items: center; gap: 12px; background: white; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; min-height: 48px; }
#search-form > svg { width: 19px; color: var(--secondary); }
#city-search { min-width: 0; flex: 1; border: 0; outline: none; color: var(--ink); background: transparent; height: 44px; font-size: 13px; }
#city-search::placeholder { color: #61738b; }
.search-submit { font-size: 12px; color: var(--blue); min-height: 40px; }
.text-button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 9px; white-space: nowrap; font-size: 13px; border-radius: 10px; }
.text-button:hover { background: #e9f0f9; }
.text-button svg { width: 18px; }
.source-badge { margin-left: auto; background: #e8edf6; color: #4d637f; font-size: 11px; padding: 5px 11px; border-radius: 20px; white-space: nowrap; }
.source-badge.live { background: #e0efe7; color: #2b664a; }
.search-results { position: absolute; z-index: 20; background: white; border: 1px solid var(--line); box-shadow: 0 14px 40px #2d476c1c; border-radius: 16px; top: 56px; left: 0; right: 0; padding: 8px; max-height: 350px; overflow-y: auto; }
.search-results button { width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.search-results button:hover { background: #eef4fc; }
.search-results button span { color: var(--secondary); font-size: 12px; }
.search-results p { margin: 10px 12px; font-size: 13px; color: var(--secondary); }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 24px; }
.today-column, .forecast-column { min-width: 0; }
.sky-scene { min-height: 365px; background: #e4effe; border-radius: var(--radius); padding: 30px 32px 24px; position: relative; overflow: hidden; isolation: isolate; }
.sky-scene::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse at 68% 22%, #f8fcff 0, transparent 65%); }
.city-heading { display: flex; justify-content: space-between; gap: 15px; position: relative; z-index: 2; }
h1, h2, p { margin-top: 0; }
.city-heading h1 { font-size: 29px; line-height: 1.3; font-weight: 650; margin-bottom: 9px; letter-spacing: 1px; }
.city-pin { font-size: 22px; margin-left: 12px; color: #587ba4; }
.city-heading p { font-size: 12px; color: var(--secondary); margin: 0; }
.scene-tag { align-self: flex-start; font-size: 11px; color: #46688f; border: 1px solid #b4c9e3; padding: 4px 11px; border-radius: 30px; }
.current-weather { display: flex; position: relative; min-height: 206px; align-items: center; }
.temperature-block { z-index: 2; min-width: 45%; padding-top: 3px; }
.temperature { font-size: 100px; font-weight: 350; letter-spacing: -4px; line-height: 1.1; display: flex; }
.temperature .degree { font-size: 59px; letter-spacing: 0; align-self: flex-start; padding-top: 7px; margin-left: 4px; font-weight: 350; }
.condition-line { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-top: 11px; }
#current-condition { font-weight: 600; }
.condition-dot { width: 3px; height: 3px; background: #577594; border-radius: 50%; }
#feels-like { color: #49627e; font-size: 13px; }
.high-low { font-size: 12px; color: #49627e; margin: 10px 0 0; }
.hero-art { position: absolute; right: -33px; top: -65px; width: 330px; height: 330px; pointer-events: none; }
.hero-icon { width: 100%; height: 100%; filter: drop-shadow(1px 13px 15px #956d2120); animation: float-sky 7s ease-in-out infinite; }
@keyframes float-sky { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
.sky-message { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; margin-top: 3px; }
.sky-message p { margin: 0; color: #3f5b7d; font-size: 12px; }
.message-spark { color: #597da4; font-size: 21px; }
.scene-horizon { position: absolute; z-index: -1; bottom: -110px; left: -30%; height: 195px; width: 130%; background: #f5f9ff; border-radius: 50% 50% 0 0; transform: rotate(-4deg); }
.hourly-section { background: white; border-radius: var(--radius); padding: 22px 23px 13px; margin-top: 22px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 17px; }
.section-heading h2 { font-size: 15px; font-weight: 650; margin: 0; }
.section-heading > span { font-size: 11px; color: var(--secondary); }
.scroll-actions { display: flex; gap: 5px; }
.scroll-actions .icon-button { min-height: 28px; width: 31px; font-size: 18px; border: 1px solid var(--line); border-radius: 9px; }
.hourly-strip { display: flex; overflow: auto; scrollbar-width: thin; scrollbar-color: #cfdbeb transparent; gap: 8px; padding: 0 0 12px; }
.hour-item { min-width: 71px; padding: 11px 7px 8px; display: flex; align-items: center; flex-direction: column; border-radius: 16px; }
.hour-item:first-child { background: #edf3fc; }
.hour-time { font-size: 11px; color: var(--secondary); white-space: nowrap; }
.hour-item canvas { width: 58px; height: 58px; margin: 4px 0; }
.hour-temp { font-weight: 650; font-size: 15px; }
.rain-chance { font-size: 10px; color: #4c719c; margin-top: 5px; min-height: 16px; }
.details-section { padding: 26px 3px 0; }
.weather-details { display: grid; grid-template-columns: repeat(4, 1fr); background: white; border-radius: 18px; padding: 21px 0; }
.detail-item { padding: 0 20px; border-right: 1px solid var(--line); }
.detail-item:last-child { border-right: 0; }
.detail-label { color: var(--secondary); display: flex; gap: 7px; align-items: center; font-size: 11px; white-space: nowrap; }
.detail-label svg { width: 16px; height: 16px; color: #6687ad; }
.detail-value { font-size: 24px; font-weight: 550; margin: 8px 0 1px; line-height: 1.3; white-space: nowrap; }
.detail-value small { font-size: 12px; font-weight: 400; margin-left: 4px; }
.detail-note { font-size: 10px; color: var(--secondary); }
.daily-section { background: #fff; border-radius: var(--radius); padding: 25px 22px 18px; }
.daily-section .section-heading { margin-bottom: 18px; }
.calendar-mark { font-size: 20px !important; color: #6b88ae !important; }
.daily-row { display: grid; grid-template-columns: 45px 52px minmax(0, 1fr) 63px; align-items: center; gap: 4px; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.daily-row:last-child { border: 0; }
.daily-day { font-size: 12px; font-weight: 550; }
.daily-day small { display: block; font-size: 10px; font-weight: 400; color: var(--secondary); }
.daily-row canvas { width: 52px; height: 52px; }
.daily-description { font-size: 11px; }
.daily-description small { display: block; font-size: 10px; color: #4c719c; }
.daily-temps { display: flex; justify-content: flex-end; gap: 10px; font-size: 13px; font-weight: 600; }
.daily-temps span:first-child { color: var(--secondary); font-weight: 400; }
.daily-footnote { text-align: center; color: var(--secondary); font-size: 10px; padding-top: 12px; margin: 0; }
.sun-section { padding: 21px 23px 16px; background: #f3efe8; border-radius: var(--radius); margin-top: 22px; }
.sun-section .section-heading { margin-bottom: 8px; }
.sun-section .section-heading svg { color: #8b734a; }
.sun-arc { position: relative; height: 71px; overflow: hidden; margin: 4px 5px 0; }
.arc-track { position: absolute; width: 190px; height: 136px; border: 1px dashed #ac936c; border-radius: 50%; top: 9px; left: 50%; transform: translateX(-50%); }
.arc-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #d8c7ac; }
.mini-sun { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #e9bb55; left: calc(50% + 64px); top: 31px; box-shadow: 1px 4px 9px #ab804c22; }
.sun-times { display: flex; justify-content: space-between; margin-top: 8px; }
.sun-times span { display: block; font-size: 10px; color: #70604a; }
.sun-times strong { font-size: 16px; font-weight: 550; }
.sun-section p { margin: 13px 0 0; font-size: 10px; color: #70604a; text-align: center; }
.data-notice { margin-top: 26px; display: flex; align-items: center; gap: 8px; color: var(--secondary); font-size: 11px; }
.notice-dot { background: #8d9fb9; height: 5px; width: 5px; border-radius: 50%; flex-shrink: 0; }
.data-notice button { color: #3c628e; font-size: 11px; padding: 8px; text-decoration: underline; text-underline-offset: 4px; }
.attributions { color: var(--secondary); font-size: 10px; overflow-wrap: anywhere; }
.attributions p { margin: 4px 0; }
.attributions a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer { margin-top: 25px; border-top: 1px solid var(--line); padding: 23px 0 28px; display: flex; justify-content: space-between; gap: 20px; color: var(--secondary); font-size: 11px; }
.site-footer > div { display: flex; align-items: center; gap: 20px; }
.site-footer button { color: #3c628e; font-size: 11px; padding: 0; min-height: 32px; }
.footer-dot { margin: 0 6px; }
.notification, .error-banner { padding: 13px 17px; border-radius: 12px; margin-bottom: 18px; font-size: 13px; }
.notification { background: #e8eff8; color: #38597d; }
.error-banner { background: #ffede8; color: #963e28; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.error-banner button { font-size: 12px; text-decoration: underline; min-height: 32px; flex-shrink: 0; }
.setup-panel { background: #e8f0fa; padding: 24px; border-radius: 18px; margin-top: 22px; display: flex; gap: 28px; align-items: center; }
.setup-panel > div:first-child { flex: 1; }
.setup-panel h2 { font-size: 18px; margin-bottom: 12px; }
.setup-panel p { font-size: 12px; color: #425e7e; max-width: 75ch; margin-bottom: 10px; }
.setup-panel pre { font-size: 12px; background: #f9fcff; padding: 15px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.setup-panel code { font-size: 12px; }
.setup-actions { display: flex; flex-direction: column; gap: 18px; min-width: 148px; font-size: 12px; }
.setup-actions a { text-align: center; text-decoration: underline; text-underline-offset: 4px; }
.primary-button { background: #3e6590; color: white; padding: 11px 20px; border-radius: 12px; }
.primary-button:hover { background: #2c5078; }
.collection-heading { padding: 40px 4px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.collection-heading h1 { font-size: 30px; font-weight: 600; margin-bottom: 9px; }
.collection-heading p { color: var(--secondary); margin: 0; font-size: 13px; }
.collection-count { color: var(--secondary); font-size: 11px; }
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.collection-item { background: #e8f1fe; border-radius: 23px; padding: 20px; text-align: center; overflow: hidden; }
.collection-item:nth-child(4n + 2) { background: #ecedf8; }
.collection-item:nth-child(4n + 3) { background: #e5f0f4; }
.collection-item:nth-child(4n) { background: #e8edf2; }
.collection-item canvas { width: 100%; aspect-ratio: 1; max-width: 230px; }
.collection-item h2 { margin: 0 0 5px; font-size: 16px; font-weight: 600; }
.collection-item p { margin: 0; font-size: 11px; color: var(--secondary); }
.collection-note { color: var(--secondary); margin: 25px 0 0; font-size: 12px; }
@media (min-width: 1450px) { .app-shell { padding-top: 18px; } }
@media (max-width: 1100px) {
  .app-shell { padding: 0 28px; }
  .dashboard { grid-template-columns: minmax(0, 1fr) 302px; gap: 20px; }
  .sky-scene { padding: 26px; }
  .hero-art { width: 285px; height: 285px; right: -47px; top: -34px; }
  .detail-item { padding: 0 14px; }
  .daily-section { padding: 22px 17px 17px; }
  .daily-row { grid-template-columns: 42px 48px minmax(0, 1fr) 62px; }
  .daily-row canvas { width: 48px; height: 48px; }
  nav { margin-left: 0; }
}
@media (max-width: 880px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); }
  .forecast-column { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  .sun-section { margin-top: 0; align-self: start; }
  .daily-row { grid-template-columns: 58px 62px minmax(0, 1fr) 75px; }
  .hero-art { right: 22px; top: -58px; width: 330px; height: 330px; }
  .sky-scene { min-height: 357px; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .collection-count { display: none; }
}
@media (max-width: 580px) {
  .app-shell { padding: 0 18px; }
  .site-header { min-height: 90px; gap: 10px; flex-wrap: wrap; padding: 17px 0 0; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-symbol { width: 37px; height: 37px; font-size: 29px; border-radius: 13px; }
  .brand small { font-size: 9px; margin-top: 2px; }
  .header-actions { gap: 6px; margin-left: auto; }
  .unit-toggle { padding: 3px; }
  .unit-toggle button { width: 31px; height: 30px; }
  .header-actions .icon-button { width: 35px; }
  nav { order: 3; width: 100%; gap: 25px; height: 43px; }
  .nav-button { font-size: 12px; padding: 0; }
  .nav-button.active::after { bottom: 0; left: 0; right: 0; height: 2px; }
  .toolbar { flex-wrap: wrap; gap: 5px 10px; margin: 19px 0 16px; }
  .location-search { width: 100%; max-width: none; flex: auto; }
  #search-form { min-height: 46px; }
  #city-search { font-size: 12px; }
  .text-button { min-height: 36px; padding-left: 2px; font-size: 11px; }
  .source-badge { font-size: 10px; padding: 4px 9px; }
  .refresh { width: 30px; min-height: 32px; }
  .refresh svg { width: 17px; }
  .sky-scene { min-height: 335px; padding: 23px 22px 20px; border-radius: 22px; }
  .city-heading h1 { font-size: 25px; }
  .city-heading p { font-size: 10px; }
  .city-pin { font-size: 18px; margin-left: 8px; }
  .scene-tag { font-size: 9px; padding: 4px 9px; }
  .current-weather { min-height: 200px; }
  .temperature { font-size: 82px; letter-spacing: -3px; }
  .temperature .degree { font-size: 48px; padding-top: 4px; }
  .hero-art { width: 232px; height: 232px; right: -43px; top: -8px; }
  .condition-line { gap: 7px; font-size: 12px; margin-top: 10px; }
  #feels-like { font-size: 10px; }
  .high-low { font-size: 10px; }
  .sky-message p { font-size: 10px; max-width: 29ch; }
  .message-spark { font-size: 18px; }
  .hourly-section { padding: 19px 17px 9px; margin-top: 18px; }
  .section-heading h2 { font-size: 14px; }
  .hour-item { min-width: 63px; }
  .hour-item canvas { width: 52px; height: 52px; }
  .details-section { padding-top: 22px; }
  .section-heading > span { font-size: 10px; }
  .weather-details { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .detail-item { padding: 18px; }
  .detail-item:nth-child(2) { border-right: 0; }
  .detail-item:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .detail-value { font-size: 26px; }
  .dashboard { gap: 18px; }
  .forecast-column { display: flex; flex-direction: column; gap: 18px; }
  .daily-section { padding: 22px; }
  .daily-row { grid-template-columns: 50px 56px minmax(0, 1fr) 78px; padding: 9px 0; }
  .daily-row canvas { width: 52px; height: 52px; }
  .daily-description { font-size: 12px; }
  .daily-temps { font-size: 14px; gap: 14px; }
  .sun-section { width: 100%; padding: 21px 23px; }
  .sun-arc { height: 82px; }
  .arc-track { width: 230px; height: 164px; }
  .mini-sun { left: calc(50% + 80px); top: 38px; }
  .data-notice { flex-wrap: wrap; gap: 4px 8px; font-size: 10px; margin-top: 17px; }
  .data-notice button { font-size: 10px; padding-left: 13px; }
  .site-footer { flex-direction: column; gap: 6px; font-size: 10px; margin-top: 18px; padding: 18px 0; }
  .site-footer > div { justify-content: space-between; }
  .site-footer button { font-size: 10px; }
  .setup-panel { padding: 19px; flex-direction: column; align-items: stretch; gap: 8px; }
  .setup-panel h2 { font-size: 16px; }
  .setup-actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .collection-heading { padding: 27px 0 23px; }
  .collection-heading h1 { font-size: 24px; max-width: 11ch; }
  .collection-heading p { font-size: 11px; }
  .collection-grid { gap: 12px; }
  .collection-item { padding: 14px 10px; border-radius: 19px; }
  .collection-item h2 { font-size: 14px; }
  .collection-item p { font-size: 10px; }
  .collection-note { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
