/* ===== Carried over from the original page ===== */
.radar-note { margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: rgba(76, 195, 217, .07); border-radius: 0 6px 6px 0; font-size: 12.5px; line-height: 1.45; color: var(--fg); max-width: 75ch; }
.radar-note b { color: var(--accent); font-weight: 600; }
.btn-share, .btn-gear { display: inline-flex; align-items: center; gap: 6px; }
.btn-share svg, .btn-gear svg { flex: none; margin-top: -1px; }
.snap { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(3, 6, 9, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.snap[hidden] { display: none !important; }
.snap-box { position: relative; width: min(440px, 100%); max-height: 100%; overflow: auto; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.snap-img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); -webkit-touch-callout: default; }
.snap-x { position: absolute; top: 4px; right: 6px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.snap-x:hover { color: var(--fg); }
.snap-box .snap-img { margin-top: 26px; }
.snap-hint { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
.snap-hint:empty { display: none; }
.snap-actions { display: flex; gap: 8px; margin-top: 12px; }
.snap-actions .btn { flex: 1; padding: 11px 12px; font-size: 14px; text-align: center; text-decoration: none; }
.snap-actions .btn-solid { background: var(--accent); border-color: var(--accent); color: #062026; }
@media (display-mode: standalone) and (pointer: coarse) {
  :root { --pwa-top: 22px; }
  body { padding-top: calc(env(safe-area-inset-top, 0px) + var(--pwa-top)); }
  .home-banner { padding-top: var(--pwa-top); }
}
.install-tip { position: relative; margin: 10px 0 2px; padding: 10px 34px 11px 12px; border-radius: 9px; background: #e8f7fa; color: #0a1a20; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.install-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.install-tip .it-k { font-weight: 600; white-space: nowrap; }
.install-tip .it-ico { vertical-align: -2px; margin: 0 1px; }
.install-tip .it-install { display: block; margin-top: 8px; padding: 8px 14px; border: 0; border-radius: 7px; background: #0a1a20; color: #e8f7fa; font: 600 13px/1 var(--font-body); cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .install-tip { animation: tip-in .3s ease-out; } }
.update-pill { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1500; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--accent); color: #062026; font: 600 13px/1 var(--font-body); white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.5); cursor: pointer; }
@media (max-width: 760px) { .update-pill { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 1101px) {
  .col-side .card-feed { flex: 1 1 0; min-height: 420px; }
  .col-side .card-feed .feed { flex: 1 1 0; min-height: 0; max-height: none; }
}
.al-legend { position: absolute; right: 10px; top: 10px; z-index: 500; max-width: 240px; background: rgba(10,15,20,.9); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.al-head { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 10px; background: none; border: 0; color: var(--muted); font: 600 10px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; text-align: left; }
.al-n { font: 600 10px/1 var(--font-mono); color: var(--fg); background: var(--panel-2); border-radius: 4px; padding: 2px 5px; }
.al-chev { margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); flex: none; }
.al-legend.is-closed .al-chev { transform: rotate(-135deg); }
.al-rows { display: grid; gap: 4px; padding: 0 10px 9px; max-height: 42vh; overflow-y: auto; }
.al-legend.is-closed .al-rows { display: none; }
.al-sw { width: 16px; height: 10px; border-radius: 2px; display: inline-block; flex: none; vertical-align: -1px; box-sizing: border-box; }
.al-fill { background: var(--c); opacity: .8; }
.al-hatch { background: repeating-linear-gradient(45deg, var(--c) 0 3px, transparent 3px 6px); border: 1px solid var(--c); }
.al-outline { border: 2px solid var(--c); }
.leaflet-tooltip.zone-tip, .zone-pop .leaflet-popup-content { line-height: 1.6; }
@media (max-width: 760px) { .al-legend { top: 8px; right: 8px; max-width: 210px; } .al-head { padding: 7px 9px; } }
.ob-flood { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.fl-k { font: 600 10px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 2px; }
.fl-n { font: 600 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); }
.fl-warn { color: #ff8a8a; border-color: #5a2020; }
.fl-watch { color: #ffd27a; border-color: #5a4515; }
.fl-none { color: var(--muted); }
.fl-more { margin-left: auto; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.fl-more:hover { text-decoration: underline; }
.region { scroll-margin-top: 96px; }
@media (max-width: 760px) { .region { scroll-margin-top: calc(58px + env(safe-area-inset-top, 0px) + var(--pwa-top, 0px)); } }
@keyframes flood-flash { 50% { box-shadow: 0 0 0 3px var(--c); background: rgba(24, 201, 100, .16); } }
.agroup.is-flashing { animation: flood-flash .7s ease-in-out 4; }

/* ===== One place instead of two ===== */
.regions { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { #listLoc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; } #listLoc > .empty { grid-column: 1 / -1; } }
.obs.is-one { grid-template-columns: minmax(0, 1fr); }
.ob-empty { grid-column: 1 / -1; }
.ob-empty .btn, .empty .btn { margin-right: 6px; }
.home-banner.is-ext { background: #8a3a00; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #062026; }
.btn-accent:hover { border-color: #fff; }
.btn-big { width: 100%; padding: 13px 14px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:disabled { opacity: .6; cursor: progress; }
.sw-siren { border: 2px dashed #fff; border-radius: 2px; }
.map-tip-line { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.map-tip-line b { color: var(--fg); font-weight: 600; }

/* Location bar in the header */
.loc-bar { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; min-width: 0; padding-top: 2px; }
.loc-k { font: 600 11px/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); flex: none; }
.loc-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; min-width: 0; padding: 2px; }
.loc-chips::-webkit-scrollbar { display: none; }
.loc-chip, .loc-add {
  flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px;
  font: 600 13px/1 var(--font-body); color: var(--fg); background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; white-space: nowrap;
}
.loc-chip:hover, .loc-add:hover { border-color: var(--accent); }
.loc-chip.is-on { background: var(--accent); border-color: var(--accent); color: #062026; }
.loc-chip.is-on::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; opacity: .7; }
.loc-st { font-weight: 500; opacity: .7; font-size: 11px; }
.loc-add { color: var(--accent); background: transparent; border-style: dashed; }
.loc-bar.is-empty .loc-add { background: var(--accent); color: #062026; border-style: solid; padding: 9px 14px; }
.loc-chip:focus-visible, .loc-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Map: your place and city dots */
.leaflet-tooltip.town-mine { color: #062026; background: var(--accent); border-color: var(--accent); font-weight: 600; font-size: 12px; }
.leaflet-marker-icon.city { pointer-events: auto; cursor: pointer; outline: none; }
.city-dot { position: absolute; left: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: #e3ebf0; border: 1.5px solid #0a0f14; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.city:hover .city-dot, .city.is-open .city-dot, .city:focus-visible .city-dot { background: var(--accent); transform: scale(1.25); }
.city-lab {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: none; align-items: center; gap: 4px;
  padding: 3px 4px 3px 7px; border-radius: 6px; background: rgba(10,15,20,.92); border: 1px solid var(--line); color: var(--fg);
  font: 500 12px/1.2 var(--font-body); white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.city:hover .city-lab, .city.is-open .city-lab, .city.is-pinned .city-lab, .city:focus-visible .city-lab { display: inline-flex; }
.city-lab button { font: 600 11px/1 var(--font-body); border-radius: 4px; cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); padding: 4px 6px; display: inline-flex; align-items: center; }
.city-lab button:hover { color: var(--fg); border-color: var(--accent); }
.city-go { color: var(--accent) !important; }
.city-unpin { display: none !important; }
.city-go { display: none !important; }
.city:hover .city-go, .city.is-open .city-go { display: inline-flex !important; }
.city.is-pinned .city-lab { border-color: var(--accent-dim); }
.city.is-pinned .city-pin { color: var(--accent); border-color: var(--accent-dim); background: rgba(76,195,217,.12); }
.city.is-pinned:not(:hover):not(.is-open) .city-lab { padding-right: 4px; }
.city.is-confirm .city-unpin { display: inline-flex !important; color: #ffb4a8; border-color: #5a2a2a; }
.city.is-confirm .city-go { display: none !important; }
@media (pointer: coarse) {
  .city-lab { font-size: 13px; padding: 4px 5px 4px 8px; gap: 6px; }
  .city-lab button { padding: 7px 9px; font-size: 12px; }
  .city:hover:not(.is-open):not(.is-pinned) .city-lab { display: none; } /* no sticky hover on touch */
}

/* Conditions: next hours */
.hourly { margin-top: 10px; }
.hr-k { font: 600 10px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.hr-k span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.hr-strip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.hr { flex: none; min-width: 52px; padding: 6px 5px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); text-align: center; font-family: var(--font-mono); }
.hr-t { font-size: 10px; color: var(--muted); }
.hr-w { font-size: 12.5px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.hr-p { font-size: 10.5px; color: #8fd0ff; min-height: 13px; }
.hr.is-breezy { border-color: #5a4515; }
.hr.is-breezy .hr-w { color: #ffd27a; }
.hr.is-ts { border-color: #5a2020; background: #2a1215; }
.hr.is-ts .hr-w { color: #ff8a8a; }

/* Sheets (location picker, alert settings) */
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 16px; background: rgba(3, 6, 9, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet[hidden] { display: none !important; }
.sheet-box { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; padding: 18px 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.sheet-wide { width: min(620px, 100%); }
.sheet-box h2 { font-size: 26px; padding-right: 36px; }
.sheet-box h3 { margin: 0 0 6px; font: 600 15px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.sheet-x { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.sheet-x:hover { color: var(--fg); background: var(--panel-2); }
.sheet-lead { margin: 6px 0 14px; color: var(--muted); font-size: 13.5px; }
.sheet-fine { margin: 14px 0 0; font-size: 11.5px; color: var(--muted); }
.gps-msg { margin: 8px 0 0; padding: 8px 10px; border-radius: 7px; background: #2a1d0b; border: 1px solid #5a4515; color: #ffd27a; font-size: 12.5px; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ac { position: relative; }
.ac-in, .browse select {
  width: 100%; padding: 12px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--fg);
  font: 500 16px/1.2 var(--font-body); /* 16px keeps iPhone from zooming in */ -webkit-appearance: none; appearance: none;
}
.ac-in:focus, .browse select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.ac-list { list-style: none; margin: 4px 0 0; padding: 4px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); max-height: 300px; overflow: auto; }
.ac-item { padding: 10px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ac-item small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.ac-item:hover, .ac-item.is-sel { background: rgba(76,195,217,.14); }
.ac-none { padding: 10px; color: var(--muted); font-size: 13px; }
.browse { margin-top: 12px; font-size: 13px; }
.browse summary { cursor: pointer; color: var(--accent); }
.browse-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 8px; }
.browse select { padding: 10px; font-size: 16px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 24px; }
.saved { margin-top: 18px; }
.saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.saved-row { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); overflow: hidden; }
.saved-row.is-on { border-color: var(--accent); }
.saved-go { flex: 1; text-align: left; padding: 10px 12px; background: none; border: 0; color: var(--fg); font: inherit; cursor: pointer; }
.saved-go b { font-weight: 600; }
.saved-go small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.saved-row.is-on .saved-go small { color: var(--accent); }
.saved-x { width: 44px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.saved-x:hover { color: #ff8a8a; }

/* Alert settings */
.set { padding: 14px 0; border-top: 1px solid var(--line); }
.set:first-of-type { border-top: 0; padding-top: 6px; }
.set-fine { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.set-k { font: 600 11px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.set-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.set-row input[type=range] { flex: 1 1 140px; accent-color: var(--accent); }
.set-state { font-size: 13px; flex: 1 1 200px; }
.cty-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cty-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 10px; border-radius: 999px; background: rgba(76,195,217,.14); border: 1px solid var(--accent); color: var(--fg); font-size: 13px; font-weight: 600; }
.cty-chip button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--accent); font-size: 18px; line-height: 1; cursor: pointer; }
.cty-chip button:hover { background: rgba(255,255,255,.08); }
.cty-near-wrap { margin-bottom: 10px; }
.cty-near { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; max-height: 180px; overflow: auto; }
.cty-opt { padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: 500 12.5px/1.1 var(--font-body); cursor: pointer; }
.cty-opt small { color: var(--muted); font-size: 11px; }
.cty-opt.is-on { background: var(--accent); border-color: var(--accent); color: #062026; }
.cty-opt.is-on small { color: #0d3b44; }
.ac-small .ac-in { padding: 10px 12px; }
.snd { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.snd-opt { text-align: left; padding: 10px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); font: inherit; cursor: pointer; }
.snd-opt b { display: block; font-size: 13.5px; }
.snd-opt small { color: var(--muted); font-size: 11.5px; }
.snd-opt.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: rgba(76,195,217,.1); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { padding: 8px 11px; border: 0; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--font-body); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.is-on { background: var(--accent); color: #062026; }
.extra { display: grid; gap: 4px; }
.ex { display: flex; gap: 9px; align-items: flex-start; padding: 7px 4px; font-size: 13.5px; cursor: pointer; }
.ex input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.ex small { color: var(--warn); font-size: 11px; margin-left: 4px; }
.sheet-actions { margin-top: 6px; }

/* Alert status floater */
.astat { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1400; max-width: calc(100vw - 92px); }
.astat-pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 8px 12px 8px 10px; border-radius: 999px;
  background: rgba(17, 25, 33, .96); border: 1px solid var(--line); color: var(--fg); font: 600 12px/1 var(--font-body);
  box-shadow: 0 6px 20px rgba(0,0,0,.5); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.astat-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.astat-txt { overflow: hidden; text-overflow: ellipsis; }
.astat-c, .astat-age { color: var(--muted); font-weight: 500; }
.astat-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(60,207,122,.2); }
.astat[data-level="info"] .astat-dot { background: var(--ok); }
.astat[data-level="warn"] .astat-dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(255,176,32,.2); }
.astat[data-level="bad"] .astat-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,59,59,.25); }
@media (prefers-reduced-motion: no-preference) { .astat[data-level="ok"] .astat-dot, .astat[data-level="info"] .astat-dot { animation: astat-pulse 2.4s ease-in-out infinite; } }
@keyframes astat-pulse { 50% { box-shadow: 0 0 0 5px rgba(60,207,122,.08); } }
.astat-panel {
  position: absolute; left: 0; bottom: calc(100% + 8px); width: min(340px, calc(100vw - 32px)); padding: 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.6);
}
.astat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.astat-head b { font: 600 15px/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.astat-x { width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.astat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; line-height: 1.4; }
.astat-list li { display: flex; gap: 8px; align-items: flex-start; }
.as-ico { flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--font-body); }
.as-ok .as-ico { background: rgba(60,207,122,.18); color: var(--ok); }
.as-ok .as-ico::before { content: "✓"; }
.as-info .as-ico { background: rgba(135,151,166,.2); color: var(--muted); }
.as-info .as-ico::before { content: "i"; }
.as-warn .as-ico { background: rgba(255,176,32,.2); color: var(--warn); }
.as-warn .as-ico::before { content: "!"; }
.as-bad .as-ico { background: rgba(255,59,59,.22); color: #ff8a8a; }
.as-bad .as-ico::before { content: "!"; }
.astat-a { margin-left: 2px; padding: 3px 7px; border-radius: 5px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: 600 11.5px/1.2 var(--font-body); cursor: pointer; }
.astat-actions { display: flex; gap: 6px; margin-top: 12px; }
.astat-actions .btn { flex: 1; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px) + var(--pwa-top, 0px)); transform: translateX(-50%); z-index: 2050;
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 24px); padding: 10px 8px 10px 14px; border-radius: 12px;
  background: #e8f7fa; color: #0a1a20; font-size: 13px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.toast[hidden] { display: none !important; }
.toast-t { flex: 1; }
.toast-b { flex: none; padding: 7px 11px; border: 0; border-radius: 7px; background: #0a1a20; color: #e8f7fa; font: 600 12.5px/1 var(--font-body); cursor: pointer; }
.toast-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: #0a1a20; font-size: 18px; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: tip-in .25s ease-out; } }

/* Phones */
@media (max-width: 760px) {
  .loc-bar { order: 3; margin: 0 -16px; padding: 0 16px; }
  .loc-k { display: none; }
  .loc-chip, .loc-add { padding: 9px 12px; font-size: 13.5px; }
  .siren-ctl { flex-wrap: wrap; }
  .map-tip-line { font-size: 11px; }
  .sheet { place-items: end stretch; padding: 0; }
  .sheet-box { width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px)); border-bottom: 0; }
  .sheet-box h2 { font-size: 23px; }
  @media (prefers-reduced-motion: no-preference) { .sheet:not([hidden]) .sheet-box { animation: sheet-up .25s ease-out; } }
  .browse-row { grid-template-columns: 1fr 1fr; }
  .browse-row .btn { grid-column: 1 / -1; padding: 11px; }
  .astat { left: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 84px); }
  .astat-pill { padding: 10px 13px 10px 11px; font-size: 12.5px; }
  .astat .astat-c { display: none; }
  .card-obs { order: 1; }
  #regionLoc { order: 6; }
  .obs.is-one { grid-template-columns: minmax(0, 1fr); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 380px) { .astat-age { display: none; } }
@media (max-width: 760px) {
  .toast { top: auto; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  #sPass, [data-s="sPass"] { white-space: normal; }
}
.cities-far .city:not(.is-pinned):not(.is-open) { display: none; }

/* Radar bar: the frame time keeps the same width on every frame (the "latest" tag holds its space when hidden),
   so the loop never re-wraps the bar. */
.frame-time { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.frame-time .lg { display: inline-block; min-width: 23ch; }
.ft-tag { font: 600 10px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 3px 5px; border-radius: 3px; background: var(--accent-dim); color: #bfeef7; }
.ft-tag[data-off] { visibility: hidden; }
@media (max-width: 760px) {
  .map-bar input[type=range] { flex: 1 1 0; min-width: 60px; }
  .frame-time { flex: none; min-width: 0; }
  .frame-time .sh { display: inline-block; min-width: 8ch; text-align: right; }
  .layer-toggles { flex-basis: 100%; }
}

/* ===== Touch ergonomics (phones and tablets). Taps land reliably at ~40px; desktop keeps its compact sizes. ===== */
@media (pointer: coarse) {
  a, button, label, summary, input, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  /* Header */
  .siren-ctl .btn, .loc-gear, .loc-chip, .loc-add { min-height: 40px; }
  .loc-chip, .loc-add { display: inline-flex; align-items: center; }
  .loc-more { min-height: 40px; }
  button.help-link { padding: 12px 6px; margin: -12px -6px; }
  /* Chips: map view, wind/gust, feed filters */
  .chip { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; }
  /* Map */
  .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; }
  .layer-toggles label { min-height: 36px; }
  .layer-toggles input { width: 18px; height: 18px; }
  .map-bar input[type=range] { height: 36px; }
  .map-bar .btn-icon { width: 40px; height: 36px; }
  .leaflet-marker-icon.city::before { content: ""; position: absolute; inset: -10px; } /* bigger invisible hit area around each city dot */
  .al-head { min-height: 36px; }
  .layer-tip-x { width: 40px; height: 40px; top: 0; right: 0; }
  /* Cards */
  details > summary { padding: 9px 0; }
  .fl-more, #gfxLink { padding: 9px 0; }
  .astat-pill { min-height: 40px; }
  .x-pick, .x-more { min-height: 40px; }
  /* A little press feedback, since the browser's own tap flash is off */
  .btn:active, .chip:active, .loc-chip:active, .loc-add:active, .x-pick:active, .astat-pill:active { transform: scale(.97); }
}
/* Small labels on phones: 11px is the smallest that stays readable at arm's length */
@media (max-width: 760px) {
  .stat dt, .hr-k, .hr-t, .fl-k, .al-head, .tally span { font-size: 11px; }
}
/* Safety net: no stray wide element can ever make a phone page scroll sideways. */
@media (max-width: 760px) { body { overflow-x: clip; } }

/* ===== Alert ticker: pinned to the very top, scrolls your counties' active alerts ===== */
.aticker {
  position: sticky; top: 0; z-index: 1001; display: flex; align-items: stretch;
  margin: calc(-1 * (env(safe-area-inset-top, 0px) + var(--pwa-top, 0px))) -16px 0;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--pwa-top, 0px));
  background: #a30d0d; color: #fff; text-decoration: none; border-bottom: 1px solid #ff6b5b;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.aticker[hidden] { display: none !important; }
.tk-k {
  flex: none; display: flex; align-items: center; gap: 7px; padding: 0 12px 0 16px; background: #6d0606;
  font: 600 12px/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
}
.tk-ico { flex: none; }
.aticker.has-warn .tk-ico { color: #ffd34d; }
.tk-n { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #fff; color: #8a0b0b; font: 700 11px/1 var(--font-mono); letter-spacing: 0; }
.tk-view {
  flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex; align-items: center; height: 34px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.tk-track { display: flex; flex: none; white-space: nowrap; will-change: transform; }
.tk-copy { display: flex; flex: none; }
.tk-seg { display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; font: 500 13.5px/1 var(--font-body); border-right: 1px solid rgba(255,255,255,.45); }
.tk-where { font-weight: 700; letter-spacing: .01em; }
.tk-ev { opacity: .95; }
.tk-warn { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 12.5px; opacity: 1; }
.tk-dot { opacity: .6; }
.aticker:hover .tk-view, .aticker:focus-visible .tk-view { background: rgba(0,0,0,.08); }
.aticker:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
/* Reduced motion: no scrolling; swipe the strip instead */
.aticker.is-still .tk-view { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
.aticker.is-still .tk-view::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .aticker.has-warn .tk-ico { animation: tk-pulse 1.6s ease-in-out infinite; } }
@keyframes tk-pulse { 50% { opacity: .35; } }

/* Everything else that pins to the top sits below the ticker */
html.has-tk .home-banner { top: var(--tk-h, 0px); padding-top: 0; }
html.has-tk .topbar { top: var(--tk-h, 0px); }
html.has-tk .region { scroll-margin-top: calc(96px + var(--tk-h, 0px)); }
html.has-tk .toast { top: calc(14px + var(--tk-h, 0px)); }
html.has-tk body.tip-open .update-pill { top: calc(12px + var(--tk-h, 0px)); }
@media (max-width: 760px) {
  .tk-k { padding: 0 10px 0 16px; }
  .tk-view { height: 32px; }
  .tk-seg { font-size: 13px; padding: 0 14px; }
  .tk-warn { font-size: 12px; }
  html.has-tk .topbar { top: auto; }
  html.has-tk .region { scroll-margin-top: calc(58px + var(--tk-h, 0px)); }
  html.has-tk .toast { top: auto; }
}
