/* ===== Theme tokens ===== */
:root, [data-theme="dark"] {
  --bg: #0a0a0a; --bg2: #141414; --card: #1a1a1a; --card2: #242424; --line: rgba(255, 255, 255, .1);
  --text: #ededed; --muted: #9b9b9b; --accent: #38bdf8; --accent2: #a78bfa; --good: #22c55e;
  --glass: rgba(18, 18, 18, .88); --shadow: 0 10px 30px rgba(0, 0, 0, .5); --chart: #ededed;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f6fb; --bg2: #e8eef7; --card: #ffffff; --card2: #f3f6fb; --line: rgba(15, 23, 42, .1);
  --text: #0f172a; --muted: #5b6a85; --accent: #0284c7; --accent2: #7c3aed; --good: #16a34a;
  --glass: rgba(255, 255, 255, .92); --shadow: 0 10px 30px rgba(15, 23, 42, .14); --chart: #0f172a;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; --top: calc(60px + env(safe-area-inset-top)); --bottom: 0px; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
[hidden] { display: none !important; }

/* ===== Top bar ===== */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); padding: env(safe-area-inset-top) 16px 0; display: flex; align-items: center; gap: 18px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); z-index: 1000; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: -.3px; }
.tabs { display: flex; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 12px; }
.tabs a { padding: 7px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 40px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--muted); }
.loc-name { position: absolute; left: 36px; right: 12px; pointer-events: none; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search.typing .loc-name, .search:has(input:not(:placeholder-shown)) .loc-name { display: none; }
.search:not(.typing) input::placeholder { color: transparent; }
.results { position: absolute; top: 46px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 5; }
.results button { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; background: none; border-bottom: 1px solid var(--line); color: var(--text); }
.results button:hover { background: var(--card2); }
.res-h { padding: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.top-actions { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg2); display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.icon-btn:hover { border-color: var(--accent); }
#favBtn.on { color: #fbbf24; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 600; }
.btn.ghost { background: var(--bg2); color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 6px 10px; font-size: 13px; margin-top: 8px; width: 100%; }
body.loading .brand svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ===== Alert banner ===== */
.alert-banner { position: fixed; top: var(--top); left: 0; right: 0; z-index: 900; display: flex; gap: 12px; align-items: center; padding: 8px 16px; background: color-mix(in srgb, var(--ac) 22%, var(--bg)); border-bottom: 2px solid var(--ac); cursor: pointer; font-size: 14px; }
.alert-banner b { color: var(--ac); filter: brightness(1.25); }
[data-theme="light"] .alert-banner b { filter: brightness(.7); }
.alert-banner span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.alert-banner em { font-style: normal; color: var(--muted); }
body:has(.alert-banner:not([hidden])) { --banner: 38px; }

/* ===== Views ===== */
main { position: fixed; top: calc(var(--top) + var(--banner, 0px)); bottom: var(--bottom); left: 0; right: 0; }
.view { position: absolute; inset: 0; }
.view.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

/* ===== Radar view ===== */
#map { position: absolute; inset: 0; background: var(--bg); }
.leaflet-container { font: inherit; background: var(--bg); }
.leaflet-control-zoom a { background: var(--card) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13.5px; }
.leaflet-control-scale-line { background: var(--glass); color: var(--text); border-color: var(--muted); }
.radar-tiles { image-rendering: auto; }
.home-pin span { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent); }
.storm-pin { display: flex; align-items: center; gap: 4px; color: #fff; text-shadow: 0 1px 3px #000; font-size: 13px; white-space: nowrap; }
.storm-pin span { font-size: 24px; animation: spin 3s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(-360deg); } }
.fire-pin { font-size: 18px; filter: drop-shadow(0 1px 2px #000); }
.tbub div { display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 9px; color: #0b1020; font-weight: 700; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.4); width: max-content; }
.tbub i { font-style: normal; display: inline-block; }
.tbub small { font-weight: 600; opacity: .8; }
.qp { min-width: 200px; } .qp-top { display: flex; gap: 10px; align-items: center; } .qp-t { font-size: 28px; font-weight: 800; line-height: 1; }
.qp-row { margin-top: 4px; color: var(--muted); }

.fab { position: absolute; top: 14px; right: 14px; z-index: 1100; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); box-shadow: var(--shadow); display: grid; place-items: center; }
.panel { position: absolute; z-index: 1200; top: 14px; right: 70px; width: 360px; max-height: calc(100% - 110px); overflow-y: auto; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; transform: translateX(calc(100% + 90px)); transition: transform .25s ease; }
body.panel-open .panel { transform: none; }
.panel-handle { display: none; }
.panel-h { margin: 16px 2px 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.rp-card { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 6px; border-radius: 12px; }
.rp-card:hover { background: var(--card2); }
.rp-temp { font-size: 34px; font-weight: 800; line-height: 1; } .rp-cond { color: var(--muted); font-size: 13px; }
.rp-main { flex: 1; } .rp-side { text-align: right; font-size: 12.5px; color: var(--muted); }
.rp-next { font-size: 13px; padding: 6px 8px; color: var(--muted); }
.layer-list { display: grid; gap: 4px; }
.layer { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.layer:hover { background: var(--card2); }
.layer input { display: none; }
.layer b { display: block; font-size: 14px; } .layer small { color: var(--muted); font-size: 12px; }
.sw { flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; transition: .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.layer input:checked + .sw { background: var(--accent); }
.layer input:checked + .sw::after { left: 19px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 10px; }
.seg button { flex: 1 0 auto; border: 0; background: none; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.slider { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.slider input { flex: 1; max-width: 200px; accent-color: var(--accent); }

.timeline { position: absolute; z-index: 1100; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(760px, calc(100% - 28px)); display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.timeline.hidden { display: none; }
.tl-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--bg2); font-size: 20px; display: grid; place-items: center; line-height: 1; }
.tl-btn.play { background: var(--accent); color: #fff; width: 40px; height: 40px; border-radius: 50%; }
#tlRange { flex: 1; accent-color: var(--accent); min-width: 60px; }
.tl-time { display: flex; flex-direction: column; min-width: 78px; text-align: right; line-height: 1.15; }
.tl-time small { color: var(--muted); font-size: 11.5px; }
.tl-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.tl-legend i { width: 90px; height: 8px; border-radius: 4px; }

/* ===== Cards & forecast page ===== */
.fc-grid, .dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; max-width: 1480px; margin: 0 auto; padding: 20px; }
.card, .widget { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.card h3, .widget h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.card h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.empty { color: var(--muted); padding: 10px 2px; font-size: 14px; } .empty.ok { color: var(--good); }

.hero { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.hero-main { display: flex; align-items: center; gap: 14px; }
.hero-temp { font-size: 76px; font-weight: 800; line-height: .95; letter-spacing: -3px; }
.hero-cond { font-size: 18px; font-weight: 600; color: var(--muted); }
.hero-side { display: grid; gap: 3px; font-size: 14.5px; text-align: right; }
.hero-loc { font-size: 20px; font-weight: 700; }

.alert-list { display: grid; gap: 8px; }
.alert-card { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); border-left: 5px solid var(--ac); background: color-mix(in srgb, var(--ac) 10%, var(--card)); border-radius: 12px; padding: 10px 12px; }
.alert-card span { font-size: 13px; color: var(--muted); } .alert-card small { color: var(--muted); font-size: 11.5px; }
.alert-detail .ad-head { display: flex; justify-content: space-between; align-items: center; border-left: 5px solid var(--ac); padding-left: 10px; font-size: 18px; }
.alert-detail .ad-head span { font-size: 12.5px; color: var(--muted); }
.ad-headline { font-weight: 600; } .ad-text { white-space: pre-wrap; font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg2); padding: 12px; border-radius: 10px; }

.nc-msg { font-weight: 600; margin-bottom: 10px; }
.nc-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.nc-bars div { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.nc-bars i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 40%, transparent)); }
.nc-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.tile-k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tile-v { font-size: 20px; font-weight: 700; margin-top: 2px; } .tile-s { font-size: 12px; color: var(--muted); }

.hr-scroll { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.hr-chart { display: block; }
.t-line { fill: none; stroke: #f59e0b; stroke-width: 2.5; stroke-linejoin: round; }
.t-dot { fill: #f59e0b; } .t-lbl { fill: var(--chart); font-size: 12px; font-weight: 700; text-anchor: middle; }
.pop-bar { fill: color-mix(in srgb, var(--accent) 45%, transparent); }
.hr-cells { display: flex; }
.hr-cell { width: 64px; flex: none; text-align: center; font-size: 12.5px; display: grid; justify-items: center; gap: 2px; }
.hr-cell.midnight { border-left: 1px dashed var(--line); }
.hr-time { font-weight: 600; } .hr-pop { color: var(--accent); font-weight: 600; font-size: 11.5px; }
.hr-wind { color: var(--muted); font-size: 11.5px; } .hr-wind i { font-style: normal; display: inline-block; margin-right: 2px; }
.legend-row { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.lg-line { display: inline-block; width: 14px; height: 3px; background: #f59e0b; margin-right: 5px; vertical-align: middle; }
.lg-bar { display: inline-block; width: 10px; height: 10px; background: color-mix(in srgb, var(--accent) 45%, transparent); margin-right: 5px; vertical-align: middle; border-radius: 2px; }

.daily { display: grid; }
.day-row { border-bottom: 1px solid var(--line); }
.day-row summary { display: grid; grid-template-columns: 74px 38px 56px 46px 1fr 46px 40px; align-items: center; gap: 8px; padding: 6px 2px; cursor: pointer; list-style: none; }
.day-row summary::-webkit-details-marker { display: none; }
.d-name { font-weight: 600; display: grid; line-height: 1.15; } .d-name small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.d-pop { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.d-lo { color: var(--muted); text-align: right; } .d-hi { font-weight: 700; }
.d-bar { position: relative; height: 6px; background: var(--card2); border-radius: 3px; }
.d-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.tag { font-size: 10px; padding: 1px 6px; border-radius: 6px; background: var(--card2); color: var(--muted); }
.day-detail { padding: 4px 4px 12px; font-size: 13.5px; } .day-detail p { margin: 4px 0; }
.kv-row { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; }

.aqi { display: flex; align-items: center; gap: 14px; }
.aqi-num { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: color-mix(in srgb, var(--c) 25%, transparent); color: var(--c); border: 2px solid var(--c); }
.aqi-scale { position: relative; height: 6px; border-radius: 3px; margin: 14px 0; background: linear-gradient(90deg, #22c55e 0 17%, #eab308 17% 33%, #f97316 33% 50%, #ef4444 50% 67%, #a855f7 67% 100%); }
.aqi-scale i { position: absolute; top: -4px; width: 4px; height: 14px; background: var(--text); border-radius: 2px; }
.kv-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 10px; font-size: 13px; } .kv-grid span { color: var(--muted); }
.sun-row { display: flex; gap: 30px; margin-bottom: 6px; }
.moon { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.moon-ico { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at calc(100% - var(--p)) 50%, #1e293b 55%, transparent 56%), #e2e8f0; box-shadow: inset 0 0 0 1px var(--line); }

.scroll-box { max-height: 480px; overflow-y: auto; }
.nws-p { padding: 8px 0; border-bottom: 1px solid var(--line); } .nws-p span { float: right; font-weight: 700; } .nws-p p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.afd { white-space: pre-wrap; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 8px 0 0; }
.model-chart { width: 100%; height: 260px; display: block; }
.model-chart .grid { stroke: var(--line); } .model-chart .axis { fill: var(--muted); font-size: 12px; }
.model-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; margin: 10px 0 6px; }
.model-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sources ul { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; }

/* ===== Dashboard ===== */
#dashboard { max-width: 1480px; margin: 0 auto; }
.dash-bar { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 0; }
.dash-bar h2 { margin: 0; font-size: 22px; }
.dash-actions { display: flex; gap: 8px; }
.dash-hint { padding: 6px 20px 0; margin: 0; display: none; } .editing .dash-hint { display: block; }
.dash-grid { grid-auto-flow: row dense; align-items: start; }
.widget { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.w-s { grid-column: span 3; } .w-m { grid-column: span 4; } .w-l { grid-column: span 6; } .w-xl { grid-column: span 12; }
.w-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.w-head h3 { flex: 1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-grip { display: none; color: var(--muted); letter-spacing: -2px; cursor: grab; }
.w-tools { display: flex; gap: 4px; }
.w-btn { min-width: 28px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.edit-only { display: none; }
.editing .edit-only, .editing .w-grip { display: grid; }
.editing .w-head { cursor: grab; }
.editing .widget { outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -2px; }
.w-ghost { opacity: .35; }
.w-body { padding: 12px 14px 14px; min-width: 0; }
.w-img { width: 100%; height: auto; display: block; border-radius: 10px; cursor: zoom-in; background: var(--bg2); min-height: 80px; }
.mini-map { height: 320px; border-radius: 12px; overflow: hidden; }
.widget .hero-temp { font-size: 56px; }
.widget .hero { flex-direction: column; align-items: flex-start; } .widget .hero-side { text-align: left; }
.w-s .tiles, .w-m .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.link-list { display: grid; column-gap: 18px; }
.link-list a { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; }
.w-xl .link-list, .w-l .link-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.link-list a span { color: var(--muted); }
.link-row { display: flex; gap: 14px; margin-top: 8px; font-size: 13.5px; }
.big-link { display: block; padding: 18px; text-align: center; background: var(--card2); border-radius: 12px; font-weight: 700; }
.storm h4 { margin: 0; } .storm + .storm { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.storm .w-img { margin-top: 8px; }

/* catalog */
.catalog h4 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.catalog h4:first-child { margin-top: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.cat-item { text-align: left; border: 1px solid var(--line); background: var(--card2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.cat-item:hover { border-color: var(--accent); }
.cat-item span { font-size: 12px; color: var(--accent); } .cat-item.used span { color: var(--muted); }
.custom-form { margin-top: 18px; display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--card2); }
.custom-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.custom-form input { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }

/* ===== Modal / lightbox / toast ===== */
.modal { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-box { width: min(820px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.modal-box header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-box h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 16px 18px 22px; overflow-y: auto; }
.modal-body h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 2100; background: rgba(0, 0, 0, .9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox button { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; color: #fff; background: rgba(255,255,255,.12); }
#toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 96px); transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 2200; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.bottomnav { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; }
  .w-s, .w-m { grid-column: span 6; } .w-l { grid-column: span 12; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-legend { display: none; }
}
@media (max-width: 760px) {
  body { --top: calc(56px + env(safe-area-inset-top)); --bottom: calc(62px + env(safe-area-inset-bottom)); }
  .topbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .brand span, .tabs { display: none; }
  .search { max-width: none; margin-left: 0; height: 38px; }
  .icon-btn { width: 36px; height: 36px; }
  #favBtn { display: none; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottom); padding-bottom: env(safe-area-inset-bottom); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 1000; }
  .bottomnav a { flex: 1; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .bottomnav a.active { color: var(--accent); }
  .fc-grid, .dash-grid { padding: 12px; gap: 12px; }
  .span-4, .span-5, .span-6, .span-7, .span-8, .w-s, .w-m, .w-l, .w-xl { grid-column: span 12; }
  .hero-temp { font-size: 64px; } .hero-side { text-align: left; }
  .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 72%; border-radius: 20px 20px 0 0; transform: translateY(105%); padding-top: 6px; }
  .panel-handle { display: grid; place-items: center; height: 22px; cursor: pointer; } .panel-handle span { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
  .timeline { bottom: 12px; gap: 6px; padding: 6px 8px; }
  .tl-btn:not(.play) { display: none; }
  .day-row summary { grid-template-columns: 60px 34px 48px 40px 1fr 40px; } .tag { display: none; }
  .kv-grid { grid-template-columns: auto 1fr; }
  .alert-banner { font-size: 13px; }
  .modal { padding: 0; align-items: end; } .modal-box { max-height: 92vh; border-radius: 20px 20px 0 0; }
  .leaflet-control-zoom { display: none; }
}

/* =====================================================================
   v2 radar screen (MapLibre): header card, crosshair, dock, sheets, pins
   ===================================================================== */
#map { position: absolute; inset: 0; background: #080808; }
[data-theme="light"] #map { background: #dfe6ee; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-bottom-right { bottom: 168px; }

.crosshair { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); pointer-events: none; z-index: 5; }
.crosshair i { position: absolute; background: rgba(255,255,255,.9); box-shadow: 0 0 2px rgba(0,0,0,.9); border-radius: 1px; }
.crosshair i:nth-child(1) { left: 22px; top: 0; width: 2px; height: 15px; }
.crosshair i:nth-child(2) { left: 22px; bottom: 0; width: 2px; height: 15px; }
.crosshair i:nth-child(3) { top: 22px; left: 0; height: 2px; width: 15px; }
.crosshair i:nth-child(4) { top: 22px; right: 0; height: 2px; width: 15px; }
[data-theme="light"] .crosshair i { background: rgba(15,23,42,.75); box-shadow: none; }

/* header card */
.wx-card { position: absolute; z-index: 20; top: 12px; left: 12px; width: 452px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 8px 12px 4px; }
.wx-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; }
.wx-ic { width: 40px; height: 40px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 10px; }
.wx-ic:hover { background: var(--card2); } .wx-ic.on { color: var(--accent); }
.wx-loc { border: 0; background: none; font-size: 19px; font-weight: 600; color: var(--text); display: flex; justify-content: center; align-items: center; gap: 10px; min-width: 0; }
.wx-loc > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-mini { display: none; align-items: center; gap: 4px; font-weight: 700; }
.wx-body { display: grid; grid-template-columns: 108px 66px 78px minmax(0, 1fr); align-items: center; gap: 8px; padding: 2px 0; }
.wx-ring { position: relative; width: 108px; height: 108px; color: var(--text); }
.ring { width: 108px; height: 108px; display: block; }
.ring-tag text { font: 800 10px Inter, system-ui, sans-serif; text-anchor: middle; fill: #0b1020; }
.wx-now { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.wx-now b { font-size: 31px; font-weight: 700; letter-spacing: -1px; }
.wx-now span { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; padding-top: 3px; }
.wx-hls { display: grid; gap: 10px; justify-items: center; }
.hl { display: grid; justify-items: center; gap: 1px; }
.hl span { padding: 1px 9px; border-radius: 999px; font-weight: 800; font-size: 15px; color: #0b1020; }
.hl small { color: var(--muted); font-size: 13px; }
.wx-cond { display: grid; justify-items: center; color: var(--accent); font-weight: 600; font-size: 14px; }
.wx-cond span { display: flex; align-items: center; gap: 2px; }
.wx-days { display: flex; gap: 8px; justify-content: space-around; border-left: 1.5px dashed var(--line); padding-left: 8px; }
.wx-day { display: grid; justify-items: center; gap: 1px; min-width: 64px; }
.wx-day b { font-size: 13px; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.wx-day span { font-size: 14px; font-weight: 700; white-space: nowrap; } .wx-day em { font-style: normal; color: var(--muted); font-weight: 500; }
.wx-day i { width: 60px; height: 5px; border-radius: 3px; margin-top: 2px; }
.wx-grab { display: block; margin: 0 auto; width: 70px; height: 14px; border: 0; background: none; padding: 5px 0; }
.wx-grab span { display: block; height: 4px; border-radius: 2px; background: var(--muted); opacity: .45; }
.wx-card.collapsed .wx-body { display: none; }
.wx-card.collapsed .wx-mini { display: inline-flex; }

/* bottom dock */
.dock { position: absolute; z-index: 20; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(640px, calc(100% - 24px)); display: grid; gap: 8px; }
.dock-main { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; padding: 0 12px 4px; }
.legend-bar { height: 5px; margin: 0 -12px 6px; transition: opacity .2s; }
.dock-row { display: flex; align-items: center; gap: 10px; }
.src-btn { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); font-size: 17px; font-weight: 500; padding: 4px 0; min-width: 0; text-align: left; }
.src-btn > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-thumb, .opt-thumb.us { flex: none; width: 52px; height: 34px; border-radius: 9px; border: 1.5px solid var(--line); background: radial-gradient(circle at 30% 45%, #fd0000 0 8%, #fdf802 14%, #01c501 24%, transparent 42%), radial-gradient(circle at 72% 60%, #fdf802 0 6%, #02fd02 16%, transparent 36%), radial-gradient(circle at 55% 25%, #02fd02 0 10%, transparent 26%), #3b4b3a; }
.time-pill { flex: none; border: 1.5px solid var(--line); border-bottom: 3px solid #8b5cf6; border-radius: 12px; padding: 3px 12px; display: grid; text-align: center; line-height: 1.1; min-width: 96px; }
.time-pill b { font-size: 17px; font-weight: 600; } .time-pill small { font-size: 10.5px; color: var(--muted); }
.play-btn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--text); display: grid; place-items: center; }
.play-btn:disabled { opacity: .35; }
#tlRange { width: 100%; accent-color: #8b5cf6; height: 14px; margin: 2px 0 0; display: block; }
.toolbar { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 4px; }
.toolbar button { flex: 1; border: 0; background: none; display: grid; justify-items: center; gap: 1px; padding: 6px 0 4px; border-radius: 12px; font-size: 10.5px; color: var(--muted); }
.toolbar button svg { color: var(--text); }
.toolbar button:hover { background: var(--card2); }

/* sheets (Layers, Map style, Radar, Places) */
.sheet { position: fixed; inset: 0; z-index: 1500; pointer-events: none; }
.sheet-box { position: absolute; top: calc(var(--top) + 10px); right: 12px; bottom: 12px; width: 410px; background: #15181f; color: var(--text); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.55); display: flex; flex-direction: column; transform: translateX(115%); transition: transform .25s ease; pointer-events: auto; }
[data-theme="light"] .sheet-box { background: #ffffff; }
.sheet.open .sheet-box { transform: none; }
.sheet-grab { display: none; }
.sheet-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 12px 12px 6px; }
.sheet-head h3 { grid-column: 2; margin: 0; text-align: center; font-size: 19px; }
.sheet-x { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: 17px; }
.sheet-body { overflow-y: auto; padding: 0 0 22px; -webkit-overflow-scrolling: touch; }
.sheet-sub { padding: 16px 18px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.lrow { display: grid; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid var(--line); padding-right: 16px; }
.lrow-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); font-size: 17px; padding: 15px 12px 15px 18px; text-align: left; cursor: default; }
.lrow-main[data-exp] { cursor: pointer; }
.chev { font-style: normal; font-size: 26px; color: var(--muted); transition: transform .2s; line-height: .6; }
.lrow-main.open .chev { transform: rotate(90deg); }
.lrow-opts { grid-column: 1 / -1; padding: 0 18px 14px; display: grid; gap: 8px; }
.tg { cursor: pointer; } .tg input { display: none; }
.tg span { display: block; width: 58px; height: 34px; border-radius: 17px; background: #3a3f4b; position: relative; transition: .2s; }
.tg span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tg input:checked + span { background: #8b5cf6; } .tg input:checked + span::after { left: 27px; }
[data-theme="light"] .tg span { background: #cbd5e1; }
.sheet-foot { padding: 14px 18px 0; }
.opt-list { display: grid; padding: 4px 10px; }
.opt-row { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--text); text-align: left; padding: 10px 8px; border-radius: 12px; }
.opt-row:hover { background: var(--card2); }
.opt-row > span:nth-child(2) { flex: 1; display: grid; } .opt-row small { color: var(--muted); }
.opt-row i { font-style: normal; color: #8b5cf6; font-weight: 800; font-size: 18px; visibility: hidden; } .opt-row.on i { visibility: visible; }
.opt-thumb { flex: none; width: 56px; height: 38px; border-radius: 9px; border: 1.5px solid var(--line); }
.opt-thumb.global { background: radial-gradient(circle at 40% 50%, #7dd3fc 0 10%, #0284c7 22%, transparent 42%), radial-gradient(circle at 75% 35%, #38bdf8 0 8%, transparent 26%), #22324a; }
.opt-thumb.off { background: var(--card2); }
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 6px 16px; }
.style-card { border: 2px solid var(--line); border-radius: 14px; background: var(--card2); color: var(--text); padding: 8px; display: grid; gap: 4px; text-align: left; }
.style-card.on { border-color: #8b5cf6; } .style-card small { color: var(--muted); font-size: 11.5px; }
.style-thumb { height: 72px; border-radius: 9px; border: 1px solid var(--line); }
.style-thumb.auto { background: linear-gradient(120deg, #1b1f27 50%, #e8ecf1 50%); }
.style-thumb.dark { background: linear-gradient(135deg, #14171d, #2b313c); }
.style-thumb.light { background: linear-gradient(135deg, #f1f4f8, #cfd8e3); }
.style-thumb.streets { background: linear-gradient(35deg, transparent 46%, #f6c56b 46% 50%, transparent 50%), linear-gradient(120deg, transparent 60%, #ffffff 60% 63%, transparent 63%), #e9e4d8; }
.style-thumb.satellite { background: radial-gradient(circle at 30% 40%, #5b7b3a, transparent 40%), radial-gradient(circle at 70% 70%, #1f3c5a, transparent 50%), #3a5230; }
.place-list { border-bottom: 1px solid var(--line); }
.place-row { display: flex; border-top: 1px solid var(--line); }
.place-main { flex: 1; display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--text); padding: 12px 6px 12px 18px; font-size: 16px; text-align: left; min-width: 0; }
.place-main:hover { background: var(--card2); }
.place-star { color: #f5a524; font-size: 18px; } .place-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-temp { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.place-del { border: 0; background: none; color: var(--muted); padding: 0 18px; font-size: 15px; }
.btn.wide { display: block; width: calc(100% - 36px); margin: 16px 18px 0; padding: 12px; }

/* map pins and popups */
.home-dot { width: 18px; height: 18px; border-radius: 50%; background: #3b82f6; border: 3px solid #fff; box-shadow: 0 0 0 7px rgba(59,130,246,.3); }
.place-pin { cursor: pointer; margin-top: -18px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.pc { display: grid; justify-items: center; line-height: .85; pointer-events: none; }
.pc b { font-size: 30px; font-weight: 900; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.pc small { font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000; }
.pc-h b { color: #3b82f6; } .pc-l b { color: #ef4444; }
.iss-pin, .storm-pin { display: flex; align-items: center; gap: 4px; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; font-size: 13px; white-space: nowrap; cursor: pointer; }
.iss-pin span { font-size: 22px; } .storm-pin span { font-size: 26px; display: inline-block; animation: spin 3s linear infinite; }
.wind-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tbub { pointer-events: none; }
.wx-pop .maplibregl-popup-content { background: var(--card); color: var(--text); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 13.5px; border: 1px solid var(--line); }
.wx-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .wx-pop.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .wx-pop.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--card); }
.wx-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip, .wx-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .wx-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--card); }
.wx-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--card); }
.wx-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--card); }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 2px 8px; }
.qp-name { font-weight: 700; margin-bottom: 4px; font-size: 15px; }
.qp-btns { display: flex; gap: 6px; margin-top: 10px; } .qp-btns .btn { flex: 1; width: auto; margin: 0; }

@media (max-width: 760px) {
  .wx-card { top: 8px; left: 8px; right: 8px; width: auto; padding: 4px 8px 2px; border-radius: 18px; }
  .wx-loc { font-size: 17px; }
  .wx-body { grid-template-columns: 94px 56px 60px minmax(0, 1fr); gap: 4px; }
  .wx-ring, .ring { width: 94px; height: 94px; }
  .wx-now b { font-size: 27px; }
  .hl span { font-size: 13.5px; padding: 1px 7px; } .hl small { font-size: 12px; }
  .wx-cond .wxi { width: 48px; height: 48px; } .wx-cond { font-size: 13px; }
  .wx-days { gap: 2px; padding-left: 4px; } .wx-day { min-width: 0; } .wx-day .wxi { width: 32px; height: 32px; }
  .wx-day span { font-size: 12.5px; } .wx-day i { width: 44px; } .wx-day b { font-size: 11.5px; }
  .dock { bottom: 8px; width: calc(100% - 16px); gap: 6px; }
  .src-btn { font-size: 15px; } .src-thumb { width: 44px; height: 30px; }
  .time-pill { min-width: 84px; padding: 2px 8px; } .time-pill b { font-size: 15px; }
  .maplibregl-ctrl-bottom-right { bottom: 150px; }
  .sheet-box { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 86%; border-radius: 22px 22px 0 0; transform: translateY(105%); padding-bottom: env(safe-area-inset-bottom); }
  .sheet-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
}
@media (max-width: 380px) { .wx-day:nth-child(2) { display: none; } }

/* settings sheet */
.set-pad { padding: 8px 16px; }
.seg.big { padding: 4px; border-radius: 14px; } .seg.big button { padding: 10px; font-size: 15px; border-radius: 10px; }
.seg.big button.on { background: #8b5cf6; color: #fff; }
.set-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; padding: 14px 18px; font-size: 16px; }
.set-row:hover:not(.static) { background: var(--card2); }
.set-row > span { flex: 1; display: grid; gap: 2px; } .set-row b { font-weight: 500; } .set-row small { color: var(--muted); font-size: 12.5px; }
.set-note { margin: 0; padding: 8px 18px 4px; font-size: 13px; color: var(--muted); }
.set-ver { text-align: center; color: var(--muted); font-size: 12.5px; margin: 20px 0 0; }
.set-text { padding: 4px 18px; font-size: 15px; line-height: 1.55; }
.sheet-back { border: 0; background: none; color: var(--accent); font-size: 15px; padding: 2px 18px 6px; }
@media (max-width: 760px) { .toolbar button span { font-size: 9.5px; } }
.m-only { display: none !important; }
@media (max-width: 760px) {
  .d-only { display: none !important; }
  .m-only { display: grid !important; }
  body[data-view="radar"] { --bottom: 0px; }
  body[data-view="radar"] .bottomnav { display: none; }
  .dock { bottom: calc(8px + env(safe-area-inset-bottom)); }
}

/* MyRadar-inspired branding: purple accent, wordmark, monospace nav */
:root, [data-theme="dark"] { --accent: #a78bfa; --brand: #8b5cf6; }
[data-theme="light"] { --accent: #7c3aed; --brand: #7c3aed; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: var(--text); }
.wordmark b { font-weight: 800; background: linear-gradient(90deg, #c4b5fd, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs { background: none; padding: 0; gap: 2px; }
.tabs a { font-family: 'Space Mono', ui-monospace, monospace; font-size: 13px; letter-spacing: .02em; border-radius: 0; padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); }
.tabs a.active { background: none; box-shadow: none; color: var(--text); border-bottom-color: var(--brand); }
.tabs a:hover { color: var(--text); }
.btn { background: var(--brand); }
.tl-btn.play, .layer input:checked + .sw { background: var(--brand); }
.sheet-sub, .card h3, .widget h3, .panel-h { font-family: 'Space Mono', ui-monospace, monospace; letter-spacing: .06em; }
.home-dot { background: var(--brand); box-shadow: 0 0 0 7px rgba(139,92,246,.3); }
@media (max-width: 760px) { #unitBtn, #themeBtn { display: none; } }

/* ===== v2.1: plans, ads, route weather, hail, dashboard pages ===== */
.tier-badge { display: inline-block; vertical-align: middle; font: 700 9.5px/1 Inter, sans-serif; letter-spacing: .06em; padding: 3px 5px; border-radius: 5px; margin-left: 4px; }
.t-plus { background: rgba(56,189,248,.18); color: #38bdf8; } .t-pro { background: rgba(139,92,246,.22); color: #c4b5fd; }
[data-theme="light"] .t-pro { color: #6d28d9; } [data-theme="light"] .t-plus { color: #0369a1; }
.tg.locked span { opacity: .45; }
.pc-reason { margin: 4px 16px 6px; padding: 10px 12px; border-radius: 12px; background: rgba(139,92,246,.15); font-size: 14px; }
.price-grid { display: grid; gap: 10px; padding: 8px 14px; }
.price-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--card2); }
.price-card.hot { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.price-card.cur { outline: 2px solid var(--good); }
.pc-head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.pc-pop { font-size: 11px; background: var(--brand); color: #fff; padding: 3px 8px; border-radius: 99px; }
.pc-price { font-size: 28px; font-weight: 800; } .pc-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.price-card ul { margin: 6px 0 10px; padding-left: 18px; font-size: 13.5px; } .price-card li { margin: 3px 0; }
.pc-bill { margin: 6px 14px 2px; } .pc-save { font-size: 10.5px; color: var(--good); margin-left: 4px; }
.pc-sub { font-size: 12.5px; color: var(--good); font-weight: 600; margin: -2px 0 4px; }
.price-card.pack { margin: 2px 14px 6px; }
.btn.wide { width: 100%; } .btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
/* ads */
.ad { position: relative; border: 1px dashed var(--line); border-radius: 14px; background: var(--card); overflow: hidden; display: grid; place-items: center; }
.ad-label { position: absolute; top: 4px; left: 8px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad ins { width: 100%; }
.house-ad { border: 0; background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(56,189,248,.14)); width: 100%; height: 100%; display: grid; place-content: center; gap: 2px; padding: 16px 10px 10px; text-align: center; color: var(--text); }
.house-ad span { font-size: 12.5px; color: var(--muted); }
a.house-ad { text-decoration: none; }
/* cross-promo house ads (ClaimSheet, DialCheck) */
.house-claim, .house-dial { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; text-align: left; place-content: stretch; padding: 18px 14px 12px; }
.house-claim { background: linear-gradient(135deg, rgba(34,197,94,.20), rgba(56,189,248,.12)); }
.house-dial { background: linear-gradient(135deg, rgba(242,165,22,.22), rgba(56,189,248,.10)); }
.house-claim img { width: 132px; height: auto; aspect-ratio: 400 / 260; object-fit: cover; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.ha-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: rgba(242,165,22,.9); color: #1a1204; }
.ha-text { display: grid; gap: 3px; }
.ha-text b { font-size: 15px; line-height: 1.25; color: var(--text); }
.ha-text em { font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--text); opacity: .9; margin-top: 2px; }
.ad-box .house-claim, .ad-tall .house-claim, .ad-box .house-dial, .ad-tall .house-dial { grid-template-columns: 1fr; justify-items: center; text-align: center; align-content: center; }
.ad-box .house-claim img { width: auto; height: 108px; max-width: 100%; }
.ad-box .house-claim, .ad-box .house-dial { gap: 8px; padding: 20px 12px 10px; }
.ad-box .ha-text b { font-size: 14px; }
.ad-box .house-claim .ha-text > span { font-size: 12px; }
.ad-tall .house-claim img { width: 100%; max-width: 260px; }
.ad-tall .house-claim img { max-width: 100%; }
.ad-banner { min-height: 90px; } .ad-inline { min-height: 250px; grid-column: span 4; } .ad-box { width: 300px; height: 250px; }
.ad-row:empty { display: none; }
.ad-float { position: absolute; z-index: 15; left: 12px; bottom: 16px; }
.ad-float:empty { display: none; }
@media (max-width: 1180px) { .ad-float { display: none; } }
@media (max-width: 760px) {
  .ad-float { display: block; left: 50%; transform: translateX(-50%); bottom: calc(158px + env(safe-area-inset-bottom)); }
  .ad-float .ad-box { width: 320px; height: 50px; } .ad-float .house-ad { padding: 12px 8px 4px; } .ad-float .house-ad b { font-size: 13px; } .ad-float .house-ad span { display: none; }
  .ad-float .house-claim, .ad-float .house-dial { grid-template-columns: auto 1fr; gap: 8px; padding: 8px 8px 4px; text-align: left; justify-items: start; }
  .ad-float .house-claim img { width: 56px; max-width: 56px; box-shadow: none; border-radius: 6px; }
  .ad-float .ha-icon { display: grid !important; width: 32px; height: 32px; font-size: 16px; }
  .ad-float .ha-text { display: grid !important; } .ad-float .ha-text b { font-size: 12.5px; } .ad-float .ha-text em { display: none; } .ad-float .ha-icon svg { width: 18px; height: 18px; }
  .ad-float .ad .xp-ad.xp-box { min-height: 0; height: 50px; border-radius: 12px; } .ad-float .ad .xp-ad .xp-body { max-width: none; padding: 6px 12px; gap: 1px; } .ad-float .xp-s, .ad-float .xp-tag, .ad-float .xp-phone, .ad-float .xp-adlabel { display: none; } .ad-float .xp-h { font-size: 13.5px; } .ad-float .xp-cta { margin: 0; padding: 0; background: none; box-shadow: none; font-size: 11.5px; color: #fff; opacity: .85; }
  .ad-inline { grid-column: 1 / -1; min-height: 120px; }
  #toolPlaces { display: none; }
}
/* route weather */
.rt-form { display: grid; gap: 8px; padding: 10px 16px; position: relative; }
.rt-f { display: grid; gap: 3px; position: relative; font-size: 12px; color: var(--muted); }
.rt-f input, .rt-f select, .rt-ev input, .rt-ev select { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font: inherit; font-size: 15px; }
.rt-res { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; }
.rt-res button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 12px; color: var(--text); }
.rt-swap { position: absolute; right: 22px; top: 44px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); }
.rt-ev { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .rt-ev label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.rt-nets { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips button, .chips a { border: 1px solid var(--line); background: var(--card2); color: var(--text); border-radius: 99px; padding: 6px 11px; font-size: 13px; }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rt-sum { margin: 6px 16px; padding: 12px 14px; border-radius: 14px; background: var(--card2); border-left: 5px solid var(--sv); display: grid; gap: 3px; }
.rt-sum b { font-size: 16px; } .rt-sum span { font-size: 13px; color: var(--muted); } .rt-sum em { font-style: normal; color: #f87171; font-size: 13px; }
.rt-warn { margin: 6px 16px; padding: 10px 12px; border-radius: 12px; background: rgba(239,68,68,.15); font-size: 13px; }
.rt-best { padding: 0 2px; } .rt-bars { display: flex; align-items: flex-end; gap: 3px; height: 56px; padding: 0 16px; }
.rt-bar { flex: 1; border: 0; border-radius: 4px 4px 0 0; opacity: .7; padding: 0; } .rt-bar.on, .rt-bar:hover { opacity: 1; outline: 2px solid var(--text); }
.rt-bars-l { display: flex; justify-content: space-between; padding: 4px 16px 0; font-size: 11.5px; color: var(--muted); }
.rt-list { margin-top: 8px; }
.rt-row { display: grid; grid-template-columns: 74px 70px 1fr; gap: 8px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); border-left: 4px solid var(--sv); }
.rt-row.k-charger { background: rgba(34,197,94,.07); } .rt-row.k-end, .rt-row.k-start { background: var(--card2); }
.rt-time { display: grid; } .rt-time b { font-size: 13.5px; } .rt-time small { font-size: 11px; color: var(--muted); }
.rt-wx { display: flex; align-items: center; gap: 2px; } .rt-wx b { font-size: 16px; }
.rt-info { display: grid; gap: 1px; min-width: 0; } .rt-place { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-info small { font-size: 12px; color: var(--muted); } .rt-ev { color: #4ade80 !important; } .rt-alert { color: #f87171 !important; font-weight: 600; }
.rt-links { display: flex; gap: 12px; font-size: 12.5px; margin-top: 2px; }
.route-chip { position: absolute; z-index: 21; left: 50%; transform: translateX(-50%); bottom: 170px; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); color: var(--text); font-size: 13.5px; font-weight: 600; max-width: calc(100% - 24px); }
.route-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-chip [data-clear] { border: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--card2); }
@media (max-width: 760px) { .route-chip { top: 172px; bottom: auto; } }
.route-pin { display: flex; align-items: center; gap: 1px; padding: 2px 7px 2px 3px; border-radius: 99px; background: var(--card); border: 2px solid #22c55e; box-shadow: var(--shadow); font-size: 12.5px; cursor: pointer; }
.route-pin .wxi { width: 22px; height: 22px; } .route-pin.sv1 { border-color: #eab308; } .route-pin.sv2 { border-color: #f97316; } .route-pin.sv3 { border-color: #ef4444; }
.route-pin.k-charger { background: #052e16; color: #fff; } .rp-ev { font-style: normal; }
.route-pin.k-end, .route-pin.k-start { transform: scale(1.12); }
/* hail history */
.locked-card { display: grid; gap: 10px; justify-items: start; padding: 4px 0; } .locked-card p { margin: 0; }
.hh-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.hh-sum div { background: var(--card2); border-radius: 12px; padding: 10px; display: grid; } .hh-sum b { font-size: 19px; } .hh-sum small { color: var(--muted); font-size: 11.5px; }
.hh-list { max-height: 300px; overflow: auto; }
.hh-row { display: grid; grid-template-columns: 30px 56px 110px 1fr; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.hh-dot { width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #a5f3fc 45%, #67e8f9); justify-self: center; }
@media (max-width: 760px) { .hh-sum { grid-template-columns: repeat(2, 1fr); } .hh-row { grid-template-columns: 26px 50px 1fr; } .hh-row span:last-child { grid-column: 2 / -1; color: var(--muted); } }
/* dashboard pages, layouts, extra widgets */
.dash-pages { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.dp { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.dp.on { background: var(--brand); border-color: var(--brand); color: #fff; } .dp.add { padding: 7px 12px; } .dp i { font-style: normal; opacity: .8; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 4px; background: var(--card2); } .tpl small { color: var(--muted); }
.tpl-btns { display: flex; gap: 6px; margin-top: 6px; } .btn.small { padding: 6px 10px; font-size: 13px; }
.spag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; } .spag-grid h4 { margin: 0 0 6px; }
.chips.links a { color: var(--text); }
.scales { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; } .scales h4 { margin: 0 0 4px; font-size: 13px; }
table.scale { width: 100%; border-collapse: collapse; font-size: 12.5px; } .scale th { text-align: left; color: var(--muted); font-weight: 600; } .scale td, .scale th { padding: 3px 4px; border-top: 1px solid var(--line); }
.scale i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 760px) {
  .dash-bar { flex-wrap: wrap; gap: 8px; } .dash-actions { width: 100%; justify-content: flex-end; }
  .fc-grid .ad-row .ad-banner { min-height: 60px; }
}
/* card following the crosshair */
.wx-card { transition: opacity .2s; } .wx-card.busy { opacity: .72; }
.wx-xh { vertical-align: -1px; margin-right: 6px; color: var(--accent); }
.wx-card #wxHome { color: var(--accent); }
/* tall ad under Sun & Moon, model toggles */
.stack .ad-tall { width: 100%; min-height: 600px; }
@media (max-width: 1180px) { .stack .ad-tall { min-height: 250px; } }
.model-legend { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.mtg { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card2); color: var(--text); border-radius: 99px; padding: 5px 11px; font-size: 13.5px; transition: opacity .15s; }
.mtg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.mtg:hover { border-color: var(--accent); }
.mtg.off { opacity: .4; } .mtg.off i { background: transparent !important; outline: 1.5px solid var(--muted); }
.mtg.reset { border-style: dashed; color: var(--accent); }
/* radar site picker */
.site-pick { display: grid; gap: 10px; }
.site-pick select, .site-ctl select { width: 100%; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font: inherit; font-size: 14px; }
.lrow-inline { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.site-ctl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.seg.small button { padding: 5px 9px; font-size: 12.5px; }
.legend-bar.vel { background: linear-gradient(90deg, #00e000, #007a00, #555, #7a0000, #ff3030) !important; }
.opt-thumb.site { background: radial-gradient(circle at 50% 50%, #8b5cf6 0 18%, transparent 19%), conic-gradient(from 0deg, #22c55e33, #22c55e 30deg, transparent 31deg), #0b1020; }
/* crosshair steps aside while a popup is open */
body.popup-open .crosshair { opacity: 0; }
.crosshair { transition: opacity .15s; }
.maplibregl-popup { z-index: 30; }
/* Doppler radar widget */
.dop-map { height: 380px; border-radius: 12px; overflow: hidden; background: var(--bg2); }
.dop-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.dop-bar .muted { margin-left: auto; }
.dop-tip { background: rgba(12,12,12,.8) !important; color: #e9d5ff !important; border: 0 !important; box-shadow: none !important; font: 700 10.5px Inter, sans-serif; padding: 1px 4px !important; }
.dop-tip::before { display: none; }
@media (max-width: 760px) { .dop-map { height: 300px; } .dop-bar .muted { display: none; } }
/* the 16-day list spans two rows so the next widget fills the space beside it */
@media (min-width: 761px) { .dash-grid .w-tall { grid-row: span 2; } }
.dop-map .leaflet-control-zoom a { width: 34px; height: 34px; line-height: 34px; font-size: 20px; background: var(--card); color: var(--text); border-color: var(--line); }
.dop-map.zooming { outline: 2px solid var(--brand); outline-offset: -2px; }
.dop-bar .w-btn { width: auto; padding: 0 10px; }
/* marine */
.wave-dir { font-style: normal; display: inline-block; margin-left: 2px; font-size: 11px; }
.mar-note { padding: 8px 12px; border-radius: 10px; background: rgba(234,179,8,.14); font-size: 13px; margin-bottom: 10px; }
.mar-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; }
.mar-grid > section { min-width: 0; }
.mar-grid h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mar-now { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.mar-tile { background: var(--card2); border-radius: 12px; padding: 10px; display: grid; gap: 1px; }
.mar-tile small { color: var(--muted); font-size: 11.5px; } .mar-tile b { font-size: 19px; } .mar-tile span { font-size: 12px; color: var(--muted); }
.mar-days { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.mar-days th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; } .mar-days td, .mar-days th { padding: 5px 4px; border-top: 1px solid var(--line); }
.mar-days small { color: var(--muted); }
.mar-arr { font-style: normal; display: inline-block; color: var(--accent); }
.mar-chart { width: 100%; height: 120px; display: block; } .mar-chart.tide { height: 90px; }
.mar-chart .grid { stroke: var(--line); } .mar-chart .axis { fill: var(--muted); font-size: 10px; }
.mar-tides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.mar-tides div { background: var(--card2); border-radius: 10px; padding: 7px 9px; display: grid; font-size: 12.5px; border-left: 3px solid #22d3ee; }
.mar-tides div.lo { border-left-color: #64748b; } .mar-tides small { color: var(--muted); }
.mar-zone p { margin: 6px 0; font-size: 13.5px; line-height: 1.45; }
@media (max-width: 900px) { .mar-grid { grid-template-columns: minmax(0, 1fr); } .mar-now, .mar-tides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .mar-days { font-size: 12.5px; } .mar-days td, .mar-days th { padding: 5px 2px; } }
/* minimize button + minimized pill */
.wx-top { grid-template-columns: 40px minmax(0, 1fr) 40px 36px; }
.wx-min { width: 36px; }
.wx-card.collapsed { width: auto; max-width: min(360px, calc(100% - 24px)); padding: 4px 10px; border-radius: 99px; right: auto; }
.wx-card.collapsed .wx-top { grid-template-columns: minmax(0, 1fr); }
.wx-card.collapsed .wx-ic, .wx-card.collapsed .wx-grab { display: none; }
.wx-card.collapsed .wx-loc { font-size: 15px; gap: 8px; cursor: pointer; padding: 2px 4px; }
.wx-card.collapsed .wx-mini { order: -1; font-size: 17px; }
.wx-card.collapsed .wx-loc::after { content: '+'; font-size: 18px; color: var(--muted); margin-left: 2px; }
@media (max-width: 760px) { .wx-card.collapsed { right: auto; left: 8px; } }
/* marine extras */
.mar-outlook { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; display: grid; gap: 2px; border-left: 5px solid; }
.mar-outlook span { font-size: 12.5px; color: var(--muted); }
.mar-outlook.good { background: rgba(34,197,94,.12); border-color: #22c55e; } .mar-outlook.fair { background: rgba(234,179,8,.12); border-color: #eab308; }
.mar-outlook.rough { background: rgba(249,115,22,.14); border-color: #f97316; } .mar-outlook.bad { background: rgba(239,68,68,.15); border-color: #ef4444; }
.mar-alerts { display: grid; gap: 6px; margin-bottom: 10px; } .mar-alerts div { background: rgba(239,68,68,.14); border-radius: 10px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.mar-now.one { grid-template-columns: repeat(4, 1fr); }
.mar-cam { grid-column: 1 / -1; }
.cam-strip { max-width: 100%; overflow-x: auto; border-radius: 10px; background: #000; -webkit-overflow-scrolling: touch; }
.cam-strip img { height: 180px; display: block; max-width: none; }
.cam-pop .cam-strip img { height: 120px; }
.mar-links { margin-top: 12px; }
.mar-days-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mar-now { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.mar-cam { margin-top: 14px; }
.mar-cam h4 { margin-bottom: 6px; }
/* Hide plan badges on features the current plan already includes */
body[data-plan="pro"] .tier-badge, body[data-plan="plus"] .tier-badge.t-plus { display: none; }
/* lightning flash (blooms and fades) */
.ltg-flash { width: 64px; height: 64px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0%, rgba(220,230,255,.75) 18%, rgba(180,205,255,.25) 55%, rgba(180,205,255,0) 70%);
  animation: ltg-flash 1.1s ease-out forwards; }
@keyframes ltg-flash { 0% { opacity: 0; transform: scale(.2); } 12% { opacity: 1; } 25% { transform: scale(1.15); } 35% { opacity: .9; } 100% { opacity: 0; transform: scale(1); } }
.tbub .road-chip { padding: 2px 7px; border-radius: 8px; color: #fff; font-size: 11.5px; box-shadow: 0 1px 3px rgba(0,0,0,.35); white-space: nowrap; }
.qp-prods { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; } .qp-prods .btn { flex: 1 0 auto; }
.qp-tilt { margin: 4px 0 6px; } .qp-tilt button[disabled] { opacity: .35; }
/* collapsible layer groups */
.lgroup-head { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); padding: 14px 16px 14px 18px; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.lgroup-head span:first-child { flex: 1; }
.lgroup-head .chev { transition: transform .2s; font-style: normal; color: var(--muted); }
.lgroup.open .lgroup-head .chev { transform: rotate(90deg); }
.lgroup-body { display: none; }
.lgroup.open .lgroup-body { display: block; }
.lgroup.pro .lgroup-head { background: rgba(139,92,246,.10); }
.lsub { padding-top: 12px; }
.radome-ico { vertical-align: -3px; color: #a78bfa; }

/* Layers sheet, matched to the app: pill tabs, picture cards, radar list */
.lpills { display: flex; gap: 4px; margin: 4px 16px 10px; background: var(--bg2); padding: 4px; border-radius: 999px; }
.lpills button { flex: 1; border: 0; background: none; color: var(--muted); font: 600 14px Inter, sans-serif; padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.lpills button.on { background: #8b5cf6; color: #fff; }
.lcards { display: grid; gap: 10px; padding: 0 16px 6px; }
.lcard { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card2); color: var(--text); text-align: left; cursor: pointer; }
.lcard.on { border: 2.5px solid #8b5cf6; padding: 8.5px; }
.lthumb { flex: none; width: 108px; height: 68px; border-radius: 10px; border: 1px solid var(--line); background: #262626 center / cover no-repeat; display: grid; place-items: center; }
.lthumb i { font-style: normal; font-size: 26px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.ltext { display: grid; gap: 3px; min-width: 0; } .ltext b { font-size: 16px; } .ltext small { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.llock { margin-left: auto; font-size: 18px; color: #10b981; }
.rsearch { padding: 0 16px 8px; } .rsearch input { width: 100%; box-sizing: border-box; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 0 12px; font: inherit; }
.rpack { display: grid; gap: 3px; margin: 0 16px 8px; width: calc(100% - 32px); text-align: left; border: 1px solid #8b5cf6; background: color-mix(in srgb, #8b5cf6 12%, var(--card2)); color: var(--text); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.rpack small { color: var(--muted); }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; padding: 11px 18px; cursor: pointer; }
.srow .radome-ico { flex: none; color: #8b5cf6; } .srow > span:nth-of-type(1) { flex: 1; display: grid; } .srow small { color: var(--muted); }
.srow i { font-style: normal; color: #8b5cf6; font-weight: 800; visibility: hidden; } .srow.on i { visibility: visible; } .srow.on { background: color-mix(in srgb, #8b5cf6 10%, transparent); }
.style-card { position: relative; } .style-card .llock { position: absolute; top: 12px; right: 12px; }
.style-thumb { background-size: cover; background-position: center; }
.style-thumb.proDark { background: linear-gradient(135deg, #050505, #1c1c1c); }
.style-thumb.proLight { background: linear-gradient(135deg, #ffffff, #e5e7eb); }

/* Free while testing: keep plan badges visible, and show the chip in the top bar */
body.free-testing .tier-badge { display: inline-block !important; }
.test-chip { flex: none; border: 1px solid color-mix(in srgb, #10b981 55%, transparent); background: color-mix(in srgb, #10b981 16%, transparent); color: #34d399; font: 700 12px Inter, sans-serif; padding: 5px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
[data-theme="light"] .test-chip { color: #047857; }
.test-chip .tc-short, .test-chip .tc-tiny { display: none; }
@media (max-width: 1180px) { .test-chip .tc-long { display: none; } .test-chip .tc-short { display: inline; } }
@media (max-width: 760px) { .test-chip { padding: 4px 8px; font-size: 11px; } .test-chip .tc-short { display: none; } .test-chip .tc-tiny { display: inline; } }

/* Split screen: radar on top, a second map below that moves with it */
body.split #view-radar #map { bottom: 50%; }
#map2 { position: absolute; left: 0; right: 0; top: 50%; bottom: 0; border-top: 2px solid #8b5cf6; display: none; background: #080808; }
body.split #map2 { display: block; }
.pane2-pick { position: absolute; z-index: 5; top: 10px; left: 50%; transform: translateX(-50%); border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); color: var(--text); font: 600 13px Inter, sans-serif; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
#toolSplit.on, #toolSplit.on svg { color: #8b5cf6; }
body.split .crosshair { top: 25%; }

/* Account sign-in */
.acct p { margin: 0 0 12px; }
.acct-in { width: 100%; box-sizing: border-box; font-size: 17px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); }
.acct-in.code { font-size: 26px; letter-spacing: 8px; text-align: center; font-weight: 700; }
.acct .btn.wide { width: 100%; margin: 12px 0 0; }

/* photo cross-promo cards inside ad slots */
.ad .xpromo-slot { display: block; justify-self: stretch; align-self: stretch; width: 100%; } .ad .xp-ad { border-radius: 14px; height: 100%; } .ad-box .xp-ad { min-height: 250px; } .ad-banner .xp-ad { min-height: 150px; }
.tdwr-tag { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #1a1204; background: #fbbf24; border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.hs-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 6px; font-size: 12px; } .hs-legend span { display: inline-flex; align-items: center; gap: 4px; } .hs-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.nc-radar { margin: -2px 0 8px; font-size: 13.5px; padding: 6px 10px; border-radius: 10px; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.3); } .nc-radar small { color: var(--muted); }
.hk-lbl { display: grid; gap: 6px; font-size: 13px; color: var(--muted); } .hk-lbl input { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; } .hk-place { padding: 6px 0; font-size: 14px; } .hk-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 8px 0; } .mars-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
