:root {
  color-scheme: dark;
  --bg: #06101a;
  --surface: #0b1723;
  --surface-2: #0f1e2c;
  --line: rgba(255,255,255,.09);
  --text: #f4f8fb;
  --muted: #91a3b5;
  --cyan: #5bd6ee;
  --cyan-soft: rgba(91,214,238,.13);
  --blue: #4f8cff;
  --green: #6ee7ad;
  --yellow: #ffd65a;
  --amber: #ff9d45;
  --red: #ff5b63;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(0,0,0,.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; background: radial-gradient(circle at 55% 20%, rgba(47,121,155,.12), transparent 31rem), var(--bg); }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(6,16,26,.9); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, #79e8f5, #448cff); color: #03131e; font-weight: 900; letter-spacing: -.06em; box-shadow: 0 8px 28px rgba(67,168,221,.25); }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 15px; letter-spacing: .01em; }
.brand-copy small { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .08em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.service-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #748292; box-shadow: 0 0 0 4px rgba(116,130,146,.12); }
.service-status[data-state="online"] .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(110,231,173,.12); }
.service-status[data-state="offline"] .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255,91,99,.12); }
.location-button { border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 12px; min-height: 40px; padding: 0 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; max-width: 280px; }
.location-button:hover { background: rgba(255,255,255,.06); }
.location-button svg { width: 17px; fill: none; stroke: var(--cyan); stroke-width: 1.7; }
.location-button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-content { width: min(1760px, 100%); margin: 0 auto; padding: 28px; }
.welcome-view { min-height: calc(100vh - 129px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); align-items: center; gap: 8vw; padding: 6vh 7vw; }
.welcome-copy { max-width: 700px; }
.welcome-symbol { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: var(--cyan-soft); border: 1px solid rgba(91,214,238,.2); margin-bottom: 30px; }
.welcome-symbol svg { width: 44px; fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.welcome-copy h1 { font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; margin: 0 0 24px; max-width: 800px; }
.welcome-copy p { font-size: clamp(17px, 2vw, 22px); line-height: 1.55; color: #b7c4d0; max-width: 660px; margin: 0 0 34px; }
.primary-button, .secondary-button, .save-button, .map-button, .play-button, .icon-button { border: 0; cursor: pointer; transition: .18s ease; }
.primary-button { background: linear-gradient(135deg, #70e4f1, #4d9cff); color: #05131c; font-weight: 800; border-radius: 12px; padding: 11px 17px; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary-button.large { min-height: 52px; padding-inline: 24px; }
.secondary-button { background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 12px; padding: 10px 15px; }
.secondary-button:hover { background: rgba(255,255,255,.09); }
.secondary-button.compact { padding: 8px 12px; font-size: 13px; }
.full-width { width: 100%; }
.promise-list { border-left: 1px solid var(--line); padding-left: 48px; display: grid; gap: 10px; }
.promise-list > div { display: grid; grid-template-columns: 84px 1fr; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.promise-list strong { color: var(--cyan); font-size: 12px; letter-spacing: .15em; }
.promise-list span { color: #d5dfe7; font-size: 18px; }
.loading-view { min-height: calc(100vh - 129px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.loading-view h1 { margin: 20px 0 6px; font-size: 30px; }
.loading-view p { color: var(--muted); max-width: 520px; line-height: 1.6; }
.loading-pulse { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(91,214,238,.15); border-top-color: var(--cyan); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.button-row { display: flex; gap: 10px; margin-top: 12px; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; margin: 4px 0 22px; }
.dashboard-head p { color: var(--muted); margin: 0 0 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .11em; }
.dashboard-head h1 { margin: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.035em; }
.head-actions { display: flex; gap: 8px; }
.save-button { background: transparent; color: var(--muted); padding: 8px 10px; }
.save-button.saved { color: var(--yellow); }
.dashboard-grid { display: grid; grid-template-columns: minmax(300px, 340px) minmax(520px, 1fr) minmax(300px, 360px); gap: 16px; align-items: start; }
.summary-column, .events-column { display: grid; gap: 16px; }
.panel, .map-panel { background: linear-gradient(180deg, rgba(15,30,44,.96), rgba(9,22,34,.96)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel { padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 25px; margin-bottom: 16px; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.classification { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 9px; font-size: 9px; letter-spacing: .11em; font-weight: 800; }
.classification.observed { color: var(--green); background: rgba(110,231,173,.11); border: 1px solid rgba(110,231,173,.17); }
.classification.forecast { color: #8fb5ff; background: rgba(79,140,255,.12); border: 1px solid rgba(79,140,255,.18); }
.now-temperature { font-size: 72px; font-weight: 760; letter-spacing: -.075em; line-height: .9; margin: 7px 0 14px; }
.panel h2 { margin: 0 0 9px; font-size: 21px; letter-spacing: -.025em; }
.panel p { font-size: 13px; line-height: 1.55; margin: 0; }
.muted { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 22px -20px 0; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-grid > div { background: var(--surface); padding: 14px 20px; display: grid; gap: 4px; }
.metric-grid span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.metric-grid strong { font-size: 14px; }
.source-line { color: #71879b; margin-top: 13px !important; font-size: 10px !important; }
.next-panel h2 { font-size: 25px; }
.rain-window { margin-top: 20px; padding: 14px; border-radius: 12px; background: rgba(79,140,255,.09); border: 1px solid rgba(79,140,255,.13); display: grid; gap: 4px; }
.rain-window span, .rain-window small { color: #91a9c3; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.rain-window strong { font-size: 15px; }
.confidence-row { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.confidence { text-transform: capitalize; }
.confidence.high { color: var(--green); }.confidence.medium { color: var(--yellow); }.confidence.low { color: var(--amber); }
.map-panel { min-height: 710px; display: grid; grid-template-rows: auto 1fr auto; }
.map-head { padding: 18px 18px 16px; display: flex; align-items: end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.map-head h2 { margin: 5px 0 2px; font-size: 20px; }.map-head p { margin: 0; color: var(--muted); font-size: 11px; }
.live-label { color: var(--green); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; }
.live-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(110,231,173,.09); }
.map-actions { display: flex; gap: 6px; }
.map-button { min-width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.055); border: 1px solid var(--line); color: #dce7ef; }
.map-button:hover { background: rgba(255,255,255,.1); }.map-button.recenter { padding: 0 11px; font-size: 11px; }
.radar-map { min-height: 580px; position: relative; overflow: hidden; background: #14222d; touch-action: none; cursor: grab; isolation: isolate; }
.radar-map.dragging { cursor: grabbing; }
.map-tiles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.base-tiles { z-index: 1; filter: saturate(.55) brightness(.67) contrast(1.08); }
.radar-tiles { z-index: 2; opacity: .82; mix-blend-mode: screen; }
.map-tiles img.tile-error { visibility: hidden; }
.map-location-marker { position: absolute; z-index: 5; width: 0; height: 0; pointer-events: none; }
.map-location-marker span { position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 4px solid #2d91ff; box-shadow: 0 0 0 8px rgba(45,145,255,.18), 0 4px 14px rgba(0,0,0,.4); transform: translate(-50%, -50%); }
.map-attribution { position: absolute; z-index: 8; right: 8px; bottom: 7px; background: rgba(4,11,17,.75); color: #aab7c2; font-size: 9px; padding: 4px 6px; border-radius: 6px; backdrop-filter: blur(8px); }
.map-attribution a { text-decoration: none; }.map-attribution a:hover { text-decoration: underline; }
.map-unavailable { position: absolute; z-index: 8; left: 50%; top: 20px; transform: translateX(-50%); background: rgba(5,15,23,.9); border: 1px solid var(--line); color: #c9d4dd; border-radius: 10px; padding: 9px 12px; font-size: 11px; }
.radar-controls { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(6,16,25,.96); }
.radar-controls.disabled { opacity: .55; }
.play-button { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: var(--cyan-soft); color: var(--cyan); border: 1px solid rgba(91,214,238,.18); }
.play-button.playing { background: rgba(110,231,173,.12); color: var(--green); }
.play-button:disabled { cursor: not-allowed; }
.radar-timeline { flex: 1; display: grid; gap: 6px; }
.radar-timeline input { width: 100%; accent-color: var(--cyan); }
.radar-timeline > div { display: flex; justify-content: space-between; align-items: center; color: #71879b; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.radar-timeline strong { color: #dce6ed; font-size: 11px; }
.events-panel { padding-bottom: 8px; }
.calm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.event-list { display: grid; margin: 0 -20px; }
.event-item { padding: 17px 20px 18px; border-top: 1px solid var(--line); position: relative; }
.event-item::before { content: ''; position: absolute; left: 0; top: 17px; bottom: 17px; width: 3px; border-radius: 3px; background: var(--blue); }
.event-item.yellow::before { background: var(--yellow); }.event-item.amber::before { background: var(--amber); }.event-item.red::before { background: var(--red); }
.event-label { font-size: 9px; letter-spacing: .1em; color: #8fb5ff; font-weight: 800; }.event-item.official .event-label { color: var(--yellow); }
.event-item h3 { font-size: 15px; margin: 6px 0; }.event-item p { color: #9cafbf; font-size: 11px; }
.event-item > div { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; color: #71879b; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.confidence-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }
.confidence-hero strong { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 17px; background: rgba(255,214,90,.1); color: var(--yellow); }
.confidence-hero.high strong { color: var(--green); background: rgba(110,231,173,.1); }.confidence-hero.low strong { color: var(--amber); background: rgba(255,157,69,.1); }
.confidence-hero span { color: #c4d0da; font-size: 13px; line-height: 1.45; }
.technical-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.technical-details summary { cursor: pointer; color: #8297aa; font-size: 11px; }
.technical-details div { padding-top: 10px; display: grid; gap: 8px; }
.technical-details p { display: grid; gap: 2px; }.technical-details p span { color: #71879b; font-size: 9px; text-transform: uppercase; }.technical-details p strong { font-size: 10px; font-weight: 500; color: #aab9c6; }
.location-dialog { width: min(560px, calc(100vw - 24px)); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; color: var(--text); background: #0a1723; padding: 20px; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.location-dialog::backdrop { background: rgba(0,7,13,.72); backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 18px; }
.dialog-head h2 { margin: 0 0 4px; font-size: 24px; }.dialog-head p { margin: 0; color: var(--muted); font-size: 12px; }
.icon-button { width: 35px; height: 35px; background: rgba(255,255,255,.05); border-radius: 10px; font-size: 24px; color: #b7c4ce; }
.location-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.search-field { display: flex; gap: 8px; align-items: center; background: #07121c; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.search-field:focus-within { border-color: rgba(91,214,238,.45); box-shadow: 0 0 0 3px rgba(91,214,238,.08); }
.search-field svg { width: 18px; fill: none; stroke: #6f879a; stroke-width: 1.8; }
.search-field input { min-width: 0; width: 100%; height: 44px; border: 0; outline: 0; color: var(--text); background: transparent; }
.saved-locations { margin: 18px 0 4px; }.saved-locations > p { color: #75899b; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }.saved-locations > div { display: flex; flex-wrap: wrap; gap: 6px; }
.saved-locations button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #c3d0da; border-radius: 999px; padding: 7px 10px; cursor: pointer; font-size: 11px; }
.location-results { display: grid; gap: 3px; margin-top: 12px; max-height: 320px; overflow: auto; }
.location-results button { text-align: left; border: 0; background: transparent; color: var(--text); border-radius: 10px; padding: 11px 12px; cursor: pointer; display: grid; gap: 3px; }
.location-results button:hover { background: rgba(255,255,255,.055); }.location-results strong { font-size: 13px; }.location-results span { color: var(--muted); font-size: 10px; }
.form-message { min-height: 18px; margin: 10px 2px 0; color: #8ea2b4; font-size: 11px; }
@media (max-width: 1180px) {
  .dashboard-grid { grid-template-columns: minmax(290px, 330px) 1fr; }
  .events-column { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .map-panel { min-height: 650px; }.radar-map { min-height: 520px; }
}
@media (max-width: 800px) {
  .topbar { height: 64px; padding: 0 14px; }.service-status { display: none; }.location-button { max-width: 170px; }
  .main-content { padding: 16px; }.welcome-view { min-height: calc(100vh - 96px); grid-template-columns: 1fr; gap: 45px; padding: 5vh 4vw; }
  .promise-list { border-left: 0; border-top: 1px solid var(--line); padding: 15px 0 0; }.promise-list > div { padding: 14px 0; grid-template-columns: 72px 1fr; }.promise-list span { font-size: 15px; }
  .dashboard-head { align-items: center; }.dashboard-head h1 { font-size: 27px; }.dashboard-grid { grid-template-columns: 1fr; }
  .summary-column { grid-template-columns: 1fr 1fr; }.map-column { grid-row: 2; }.events-column { grid-column: auto; grid-template-columns: 1fr 1fr; }
  .map-panel { min-height: 620px; }.radar-map { min-height: 490px; }
}
@media (max-width: 620px) {
  .brand-copy small { display: none; }.location-button { max-width: 145px; font-size: 12px; }.topbar-actions { gap: 6px; }
  .main-content { padding: 12px; }.dashboard-head { margin: 8px 2px 14px; }.dashboard-head p { font-size: 9px; }.dashboard-head h1 { font-size: 23px; }#change-location-main { display: none; }
  .summary-column, .events-column { grid-template-columns: 1fr; }.now-temperature { font-size: 64px; }
  .map-head { align-items: center; padding: 14px; }.map-head p { display: none; }.map-actions .recenter { display: none; }
  .map-panel { min-height: 535px; border-radius: 15px; }.radar-map { min-height: 410px; }
  .panel { border-radius: 15px; padding: 18px; }.metric-grid { margin-inline: -18px; }.metric-grid > div { padding-inline: 18px; }
  .event-list { margin-inline: -18px; }.event-item { padding-inline: 18px; }
  .location-dialog { padding: 16px; }.location-search { grid-template-columns: 1fr; }.location-search .primary-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.radar-crosscheck { display:inline-flex; margin-top:.55rem; padding:.28rem .55rem; border-radius:999px; font-size:.76rem; font-weight:700; letter-spacing:.01em; border:1px solid var(--border); background:rgba(255,255,255,.06); }
.radar-crosscheck.fresh { color:#9df3c4; border-color:rgba(91,218,151,.34); background:rgba(41,157,101,.13); }
.radar-crosscheck.delayed { color:#ffd98c; border-color:rgba(232,178,72,.35); background:rgba(190,127,28,.13); }
.radar-crosscheck.unavailable { color:var(--muted); }

.secondary-button:disabled { opacity:.65; cursor:wait; }

.classification.delayed { color:#ffd98c; border-color:rgba(232,178,72,.35); background:rgba(190,127,28,.13); }

/* World explorer link and accessibility polish. */
.globe-link { display:flex; align-items:center; gap:7px; border:1px solid rgba(91,214,238,.25); background:rgba(91,214,238,.075); color:#d9faff; border-radius:10px; text-decoration:none; min-height:42px; padding:0 12px; font-size:12px; white-space:nowrap; }
.globe-link span:first-child { font-size:20px; line-height:1; }
.welcome-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.welcome-actions a { min-height:52px; display:inline-flex; align-items:center; text-decoration:none; padding-inline:20px; }
.dashboard-globe-link { display:inline-flex; align-items:center; text-decoration:none; white-space:nowrap; }
:where(button,a,input,summary):focus-visible { outline:3px solid #8cecf9; outline-offset:3px; }
.classification { font-size:10px; letter-spacing:.05em; }
.source-line, .technical-details summary, .map-head p { font-size:11px!important; }
.location-button,.map-button,.icon-button { min-height:44px; }
.map-button { min-width:44px; height:44px; }
@media(max-width:620px){.globe-link { min-width:42px; padding:0 10px; justify-content:center; }.globe-link span:last-child { display:none; }.location-button { max-width:116px; }.head-actions{gap:5px}.dashboard-globe-link{padding:8px;font-size:11px;}.welcome-actions a,.welcome-actions button { width:100%;justify-content:center; }}

@media (max-width: 620px) {
  .dashboard-head { flex-wrap: wrap; gap: 10px; }
  .head-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .head-actions > button, .head-actions > a { min-height: 44px; }
  .save-button { white-space: nowrap; }
  .globe-link { min-width: 44px; min-height: 44px; }
}
