/* SinkAlert — themes change ground + accent only; flag colours are fixed because they carry meaning. */
:root, body[data-theme="cyber"] {
  --bg: #0b1520; --bg-grad: linear-gradient(160deg, #0b1520 0%, #0f2233 100%); --panel: #111f2c; --panel-2: #0c1822;
  --ink: #e4eef4; --ink-2: #9fb3c0; --muted: #6b8292; --rule: #203342; --accent: #00d0e6;
}
body[data-theme="amber"]   { --bg: #070707; --bg-grad: linear-gradient(160deg, #070707, #14100a); --panel: #141009; --panel-2: #0e0b07; --ink: #f3e7d3; --ink-2: #c7b395; --muted: #8a7a62; --rule: #2a2216; --accent: #ffa028; }
body[data-theme="matrix"]  { --bg: #050b07; --bg-grad: linear-gradient(160deg, #050b07, #0a160d); --panel: #0b160e; --panel-2: #08110a; --ink: #d9f5de; --ink-2: #93c49d; --muted: #5f8a68; --rule: #16301c; --accent: #39ff7a; }
body[data-theme="magenta"] { --bg: #120a14; --bg-grad: linear-gradient(160deg, #120a14, #1d0f22); --panel: #1b1020; --panel-2: #140b18; --ink: #f4e6f5; --ink-2: #c6a9cb; --muted: #8d7192; --rule: #33203a; --accent: #ff4fd8; }
body[data-theme="slate"]   { --bg: #16191d; --bg-grad: linear-gradient(160deg, #16191d, #1e2227); --panel: #1f2328; --panel-2: #191c20; --ink: #e8ebee; --ink-2: #aab2ba; --muted: #75808a; --rule: #2d333a; --accent: #8fb3d9; }
body[data-theme="paper"]   { --bg: #f3f6f7; --bg-grad: linear-gradient(160deg, #f3f6f7, #e7eef0); --panel: #fbfcfc; --panel-2: #eef3f4; --ink: #13222c; --ink-2: #4a5a63; --muted: #74838b; --rule: #d5dee2; --accent: #1b5e8c; }
:root {
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #9085e9;   /* score parts (categorical, fixed order) */
  --f0: #0ca30c; --f1: #fab219; --f2: #ec835a; --f3: #d03b3b;         /* flags: green / yellow / orange / red */
  --y67: #3987e5; --y68: #d95926; --now: var(--ink); --fc: var(--accent);
  --tide: #a593ff;
  --capx: #5b86ff; --caps: #4fc0ff; --capm: #7fd6c4;   /* TMD warnings: rain blues (very heavy / heavy / lesser), apart from the flag colours */   /* tide forecast: violet, clear of every theme's accent and of the flag colours */
  /* fonts = the landing page's (user's pick 2026-09-24): headings Mitr, text Sarabun. Numbers use Sarabun too: its digits are
     all the same width, and .num / tables add tabular-nums, so columns still line up. --code is only for code in the docs */
  --sans: "Sarabun", "Leelawadee UI", Tahoma, sans-serif;
  --mono: "Sarabun", "Leelawadee UI", Tahoma, sans-serif;
  --head: "Mitr", "Leelawadee UI", Tahoma, sans-serif;
  --code: ui-monospace, Consolas, "Courier New", monospace;
}
body[data-theme="paper"] { --y67: #2a78d6; --y68: #eb6834; --tide: #5b3fd0; --capx: #2447d6; --caps: #1c8fd6; --capm: #1f9e88; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg-grad); background-color: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--sans); padding: 0 16px 28px; }
.wrap { max-width: 1240px; margin: 0 auto; display: grid; gap: 16px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar */
.top { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between;
  padding-block: 16px 10px; border-bottom: 1px solid var(--rule); }
.top h1 { font: 600 21px/1.25 var(--head); }
.top h1 span { color: var(--accent); white-space: nowrap; }
.top .sub { font-size: 12.5px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; gap: 6px; align-items: center; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--panel-2); font-size: 12.5px; color: var(--ink-2); }
.pill.bad { border-color: var(--f3); color: #ffb4b4; }
body[data-theme="paper"] .pill.bad { color: var(--f3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--f0); }
.dot.bad { background: var(--f3); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; min-width: 0; }
.card h2 { font: 500 15.5px/1.35 var(--head); display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.card h2 small { font-weight: 400; font-size: 12.5px; color: var(--muted); }

.scroll-x { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font: 500 11.5px var(--mono); letter-spacing: .5px; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
td .main { font: 600 16px var(--mono); white-space: nowrap; }
td .sm { font-size: 12px; color: var(--muted); }
tr.dim td { opacity: .55; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.tabs button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 8px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 18px; height: 3px; border-radius: 2px; background: var(--c); display: inline-block; }
.sw.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 9px); }
.sw.dot { background: repeating-linear-gradient(90deg, var(--c) 0 2.5px, transparent 2.5px 5.5px); }
.chart { width: 100%; height: auto; display: block; }

.two { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.rain-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.rain-row:last-child { border-bottom: 0; }
.rain-row .v { font: 600 16px var(--mono); text-align: right; }
.rain-row .s { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.rain-row.heavy .v { color: var(--f1); } .rain-row.very_heavy .v { color: var(--f3); }

.note { font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.theme-bar { display: flex; gap: 10px; justify-content: center; padding-top: 6px; }
.theme-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule); cursor: pointer; padding: 0; }
.theme-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
footer { border-top: 1px solid var(--rule); padding-top: 10px; display: grid; gap: 8px; }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.foot-credit { color: #b88a3e; letter-spacing: .5px; }
.foot-credit a { color: inherit; }
/* index1.php: pointer to the full-screen map */
.newmap-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px;
  padding: 10px 12px 10px 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--panel); font-size: 14px; color: var(--ink-2); }
.newmap-bar b { color: var(--ink); }
.newmap-bar a { flex: none; padding: 6px 14px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
.newmap-bar a:hover { filter: brightness(1.1); }
.foot-credit a:hover { text-decoration: underline; }

#tip { position: fixed; z-index: 20; pointer-events: none; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; box-shadow: 0 8px 20px rgba(0,0,0,.35); max-width: 260px; }
#tip .r { display: flex; justify-content: space-between; gap: 12px; } #tip b { font-family: var(--mono); }
.loading { opacity: .6; transition: opacity .2s; }


/* how-it-works (docs/how-it-works.md) */
.how-link { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.doc summary { cursor: pointer; list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary h2 { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.doc summary h2::before { content: "▸"; color: var(--accent); transition: transform .15s; }
.doc details[open] summary h2::before { transform: rotate(90deg); }
.md { font-size: 14px; line-height: 1.7; color: var(--ink-2); max-width: 980px; margin-top: 12px; }
.md h3 { font: 500 16px/1.4 var(--head); color: var(--ink); margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--rule); }
.md p { margin: 6px 0; max-width: 78ch; }
.md b { color: var(--ink); }
.md ul, .md ol { margin: 6px 0; padding-left: 20px; max-width: 80ch; } .md li { margin: 3px 0; } .md li ul { margin: 2px 0; }
.md blockquote { margin: 0 0 8px; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0; background: var(--panel-2); color: var(--ink); }
.md table { border-collapse: collapse; font-size: 13px; margin: 8px 0; min-width: 100%; }
.md th, .md td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.md th { color: var(--muted); font-weight: 500; font-size: 12px; }
.md a { color: var(--accent); }
.md code { font: 12.5px var(--code); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .doc summary h2::before { transition: none; } }


/* ── SinkAlert components ── */
.code { font: 500 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--f2); } .down { color: var(--f0); } .flat { color: var(--muted); }
.warn { color: var(--f2); }
.lv-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--c); color: var(--c); white-space: nowrap; }

/* summary */
.summary { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 16px; }
.sum-head { font-size: 15px; line-height: 1.55; margin-bottom: 12px; }
.sum-head b { font-family: var(--mono); }
.lv-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lv-tile { display: grid; gap: 2px; text-align: left; padding: 10px 10px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--rule); border-top: 4px solid var(--c); background: var(--panel-2); color: var(--ink); }
.lv-tile:hover { border-color: var(--c); }
.lv-tile .k { font-size: 12.5px; color: var(--ink-2); }
.lv-tile .v { font: 600 26px/1.1 var(--mono); color: var(--c); }
.lv-tile .s { font-size: 11px; color: var(--muted); }
.sum-i h3 { font: 500 14.5px var(--head); margin-bottom: 6px; }
.sum-i p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.sum-i b { color: var(--ink); font-family: var(--mono); }

/* map */
.map-tools { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.tabs button.tog[aria-pressed="false"] { opacity: .45; }   /* off = faded (no strike-through) */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
#map { height: 620px; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel-2); z-index: 0; }
.map-side { max-height: 620px; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; padding: 10px; background: var(--panel-2); }
.map-side h3 { font: 500 14px var(--head); margin-bottom: 8px; display: flex; justify-content: space-between; }
.side-row { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; width: 100%; text-align: left; cursor: pointer; background: transparent;
  border: 0; border-left: 3px solid var(--c); padding: 6px 8px; margin-bottom: 6px; color: var(--ink); border-radius: 0 6px 6px 0; }
.side-row:hover { background: var(--panel); }
/* a station new in the list blinks for 5 minutes (app.js renderSide); the list's own chime button */
.side-row.fresh { animation: side-new 1.4s ease-in-out infinite; }
@keyframes side-new { 50% { background: rgba(224, 50, 43, .28); } }
.side-chip { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #e0322b; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.side-new { margin-left: 8px; font-size: 12px; font-weight: 700; color: #ff6b5e; }
.side-snd { margin-left: 6px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--muted); font: inherit; font-size: 11px; line-height: 20px; cursor: pointer; }
.side-snd[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .side-row.fresh { animation: none; background: rgba(224, 50, 43, .18); } }
/* airport news: one line, rain started / stopped at an airport (app.js renderAirNews) */
.air-news { display: flex; align-items: center; gap: 8px; max-width: min(640px, calc(100vw - 32px)); padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 6px 18px rgba(0, 0, 0, .28); font-size: 13px; color: var(--ink-2); }
.air-news[hidden] { display: none; }
.air-news .an-ic { display: inline-flex; flex: none; width: 18px; height: 18px; color: var(--accent); }
.air-news .an-ic svg { width: 18px; height: 18px; }
.an-txt { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-txt b { color: var(--ink); font-weight: 600; }
.an-on { color: #58a6ff; font-weight: 600; }
.an-off { color: var(--muted); }
.an-n { flex: none; padding: 0 6px; border: 0; background: none; color: var(--muted); font-size: 11.5px; cursor: pointer; }
.an-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.an-x:hover, .an-n:hover { color: var(--ink); }
.air-news.pop { animation: an-pop 1s ease-in-out 5; }
@keyframes an-pop { 50% { border-color: #58a6ff; box-shadow: 0 0 0 3px rgba(88, 166, 255, .55), 0 0 22px rgba(88, 166, 255, .5); } }
@media (prefers-reduced-motion: reduce) { .air-news.pop { animation: none; border-color: #58a6ff; } }
.mapcard .air-news { margin: 0 0 10px; }
.side-row .nm { font-size: 13px; font-weight: 600; }
.side-row .pc { font-weight: 600; color: var(--c); }
.side-row .wh, .side-row .wy { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.side-row .tm { grid-column: 1 / -1; font-size: 11px; color: var(--muted); } .side-row .tm.old { color: var(--f2); }
.side-asof { font-size: 11px; color: var(--muted); margin: -4px 0 8px; }
.side-row .wy { color: var(--ink-2); }
.dotl { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.4); }
.dam-ic { display: inline-block; width: 11px; height: 11px; background: var(--c); border: 1.5px solid #111; box-shadow: 0 0 0 1px #fff; }
.dam-ic.sm { width: 7px; height: 7px; border-width: 1px; }   /* medium reservoirs */
.dam-ic.sm.hy { width: 9px; height: 9px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #1E6FE0; }   /* the three above Hat Yai: a link to HYFlood */
.tri { display: inline-block; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid var(--c);
  filter: drop-shadow(0 0 1px #000); }
/* Leaflet in the page's theme */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); }
.leaflet-popup-content { margin: 12px 14px; font: 13px/1.5 var(--sans); }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-2); }
.leaflet-tooltip { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); font: 12.5px var(--sans); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.leaflet-tooltip-top:before { border-top-color: var(--rule); }
.leaflet-container { font-family: var(--sans); }
.leaflet-bar a { background: var(--panel); color: var(--ink); border-bottom-color: var(--rule); }
.leaflet-control-attribution { background: var(--panel) !important; color: var(--muted); opacity: .85; }
.leaflet-control-attribution a { color: var(--ink-2); }
.pop-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pop-s { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.pop-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pop table { font-size: 12.5px; }
.pop td { padding: 3px 6px 3px 0; border-bottom: 1px solid var(--rule); }
.pop td:first-child { color: var(--muted); white-space: nowrap; }
body.mapui .leaflet-popup-content { max-height: var(--pop-max, none); overflow-y: auto; overscroll-behavior: contain; }
.cap-t { display: inline-block; font-weight: 600; font-size: 12px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--capc); color: var(--capc); background: color-mix(in srgb, var(--capc) 14%, transparent); }
.cap-t.x { --capc: var(--capx); } .cap-t.s { --capc: var(--caps); } .cap-t.m { --capc: var(--capm); }
.cap-sw { display: inline-block; width: 16px; height: 11px; border-radius: 2px; border: 1.5px dashed var(--capc); background: color-mix(in srgb, var(--capc) 25%, transparent); vertical-align: -1px; }
.cap-sw.x { --capc: var(--capx); } .cap-sw.s { --capc: var(--caps); } .cap-sw.m { --capc: var(--capm); }
.cap-a { padding: 10px 0; border-bottom: 1px solid var(--rule); } .cap-a:last-child { border-bottom: 0; }
.cap-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; } .cap-h small { color: var(--muted); }
.cap-p { margin: 6px 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.cap-a details { font-size: 13px; color: var(--ink-2); } .cap-a summary { cursor: pointer; color: var(--muted); }
.cap-sum { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.pop .go-st { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--muted); }
.pop .go-st:hover, .pop .go-st:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.pop .go-st .dotl { width: 8px; height: 8px; margin-right: 4px; vertical-align: 0; }
.pop .go-st small { color: var(--muted); }
.route-lag { background: var(--panel); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 6px;
  font: 600 11px/1.6 var(--sans); white-space: nowrap; transform: translate(-50%, -50%); width: max-content !important; height: auto !important; }
.pop .tide-note { color: var(--muted); font-size: 11px; line-height: 1.4; margin-top: 2px; }
.pop .tide-rise { font-size: 11.5px; line-height: 1.4; margin-top: 3px; }
.pop ul { margin: 6px 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.pop-btn { margin-top: 4px; width: 100%; padding: 7px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; font-weight: 600; }

/* % of bank bar */
.pbar { display: inline-block; width: 90px; height: 7px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--rule); position: relative; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.pbar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.pbar.none { width: auto; height: auto; border: 0; background: none; font-size: 12px; color: var(--muted); }

/* watch list */
.watch { margin-top: 10px; }
.watch tbody tr { cursor: pointer; }
.watch tbody tr:hover td { background: var(--panel-2); }
.watch td.nm { font-weight: 600; min-width: 10rem; }
.watch td.sm { font-size: 12.5px; color: var(--ink-2); min-width: 9rem; }
.watch td.pc { white-space: nowrap; }
.watch td.why { font-size: 12.5px; color: var(--ink-2); min-width: 16rem; }
.watch td small { color: var(--muted); }
button.more { margin-top: 10px; background: transparent; border: 1px solid var(--rule); border-radius: 8px; padding: 7px 14px; color: var(--accent); cursor: pointer; }

/* hotspots */
.hot { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.hs { border: 1px solid var(--rule); border-top: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); display: grid; gap: 6px; align-content: start; }
.hs-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hs-h h3 { font: 500 14.5px/1.35 var(--head); }
.hs-st { display: grid; gap: 2px; }
.hs-row { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; grid-template-areas: "c n i" "b b t"; gap: 0 8px; align-items: center;
  width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px dashed var(--rule); padding: 5px 0; cursor: pointer; color: var(--ink); }
.hs-row:last-child { border-bottom: 0; }
.hs-row .c { grid-area: c; font: 500 12px var(--mono); color: var(--ink-2); }
.hs-row .n { grid-area: n; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-row i { grid-area: i; width: 9px; height: 9px; border-radius: 50%; }
.hs-row .b { grid-area: b; display: flex; align-items: center; font-size: 12.5px; }
.hs-row .t { grid-area: t; font-size: 12px; white-space: nowrap; }
.hs-why { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.hs-m { margin: 0; font-size: 11.5px; color: var(--muted); }
.hs-m a { color: var(--accent); }

/* provinces */
.provs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pv { border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 8px; padding: 7px 10px; background: var(--panel-2); }
.pv-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-h b { margin-right: auto; font-size: 14px; }
.cn { display: inline-flex; align-items: center; gap: 3px; font: 600 12px var(--mono); color: var(--c); }
.cn i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pv-s { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.pv-s .o5 { color: var(--f3); } .pv-s .o4 { color: var(--f1); } .pv-s .dw { color: var(--f2); }
.pv-calm { grid-column: 1 / -1; margin: 4px 0 0; }

/* dams */
.dams td.sm { font-size: 12.5px; color: var(--ink-2); }
.dams .r, .dwr .r { text-align: right; }
.dams td.dbar { white-space: nowrap; min-width: 210px; }
.db { display: inline-block; position: relative; width: 150px; height: 9px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--rule); vertical-align: middle; margin-right: 8px; }
.db i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; }
.db em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.db s { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.badge { font: 500 10.5px var(--mono); padding: 0 5px; border-radius: 4px; border: 1px solid var(--rule); color: var(--muted); vertical-align: 1px; }

/* rain outlook + warnings + DWR */
.ol { margin: 6px 0; font-size: 13.5px; line-height: 1.6; }
.chip { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); white-space: nowrap; }
.chip.heavy { border-color: var(--f1); color: var(--f1); } .chip.very_heavy { border-color: var(--f3); color: var(--f3); }
.sub3 { font: 500 14px var(--head); margin: 14px 0 6px; }
.warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); max-height: 360px; overflow: auto; }
.warns li { border-left: 2px solid var(--rule); padding-left: 8px; line-height: 1.5; }
.warns .num { color: var(--muted); margin-right: 4px; }
.dwr-sum { margin: 0 0 8px; font-size: 13.5px; } .dwr-sum b { font-family: var(--mono); }
.dwr td.sm { font-size: 12.5px; color: var(--ink-2); }

/* station modal */
.st-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.62); display: grid; place-items: center; padding: 16px; }
.st-box { width: min(980px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px;
  padding: 14px 16px; display: grid; gap: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.st-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.st-head h3 { font: 500 17.5px/1.3 var(--head); }
.st-sub { font-size: 13px; color: var(--ink-2); }
.st-x { background: transparent; border: 1px solid var(--rule); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; color: var(--ink); flex: none; }
.st-nums { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.st-nums b { color: var(--ink); }
.st-why { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
svg .gl { stroke: var(--rule); stroke-width: 1; }
svg text { fill: var(--ink-2); font: 11px var(--mono); }
#stm-chart { touch-action: pan-y; }
body.modal-open { overflow: hidden; }

/* ── tablets / phones ── */
@media (max-width: 1100px) {
  .summary { grid-template-columns: 1fr 1fr 1fr; }
  .sum-lv { grid-column: 1 / -1; }
  .map-wrap { grid-template-columns: 1fr; }
  .map-side { max-height: 320px; }
}
@media (max-width: 760px) {
  .summary { grid-template-columns: 1fr; }
  .lv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lv-tile .s { font-size: 10.5px; line-height: 1.3; }
  #map { height: 460px; }
  .two { grid-template-columns: 1fr; }
  .tabs button { padding: 7px 13px; min-height: 36px; }
  .theme-bar { gap: 16px; } .theme-swatch { width: 32px; height: 32px; }
  /* watch list and dams: one card per row */
  .watch thead, .dams thead { display: none; }
  .watch, .watch tbody, .dams, .dams tbody { display: block; }
  .watch tr, .dams tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .watch td, .dams td { display: block; border: 0; padding: 0; min-width: 0 !important; }
  .watch td[data-label="สถานี"], .watch td[data-label="ลำน้ำ · พื้นที่"], .watch td.why, .watch td.pc,
  .dams td[data-label="เขื่อน"], .dams td[data-label="% ความจุ"] { grid-column: 1 / -1; }
  .watch td[data-label]:not([data-label="สถานะ"]):not([data-label="สถานี"])::before,
  .dams td[data-label]:not([data-label="เขื่อน"])::before { content: attr(data-label); display: block; font: 500 11.5px var(--mono); color: var(--muted); }
  .dams .r { text-align: left; }
  .db { width: calc(100% - 70px); }
}
@media (max-width: 420px) { .lv-tile .v { font-size: 22px; } }

/* OSM tiles are light: invert them for the dark themes so the flag colours stand out */
body:not([data-theme="paper"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.35); }
body[data-theme="paper"] .leaflet-tile-pane { filter: saturate(.45) brightness(1.03); }
.sum-head .rec { margin-top: 6px; font-size: 13.5px; color: var(--f2); }
.sum-head .rec b { color: var(--f3); }

/* Mekong (MRC) */
.mekong { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.mk { border: 1px solid var(--rule); border-top: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); display: grid; gap: 4px; }
.mk-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.mk-h .lv-chip { margin-left: auto; }
.mk-v { font-size: 13px; color: var(--ink-2); } .mk-v .big { font: 600 22px var(--mono); color: var(--ink); } .mk-v small { color: var(--muted); }
.mk-spark { width: 100%; height: auto; display: block; }
.mk-s { font-size: 12px; color: var(--muted); } .mk-w { font-size: 12.5px; color: var(--c); }
.mk-note { grid-column: 1 / -1; margin: 0; }
.mk-ic { display: inline-block; width: 11px; height: 11px; background: var(--c); border: 1.5px solid #111; box-shadow: 0 0 0 1px #fff; transform: rotate(45deg); }
.st-why li.bt { color: var(--muted); list-style: '— '; }
.sum-note b { color: var(--ink); }

/* status changes */
.changes { display: grid; gap: 4px; margin-top: 10px; }
.ch-row { display: grid; grid-template-columns: 3.2rem 1.2rem minmax(11rem, 1.2fr) auto minmax(12rem, 2fr); gap: 4px 12px; align-items: center;
  width: 100%; text-align: left; border: 0; border-left: 5px solid var(--c); border-radius: 0 8px 8px 0; padding: 9px 10px;
  background: var(--panel-2); background: color-mix(in srgb, var(--c) 7%, var(--panel)); cursor: pointer; color: var(--ink); }
.ch-row.up { --c: var(--f3); } .ch-row.down { --c: var(--f0); }
.ch-row:hover { background: color-mix(in srgb, var(--c) 15%, var(--panel)); }
.ch-t { color: var(--muted); font-size: 12.5px; }
.ch-a { font-size: 13px; }
.ch-a { color: var(--c); font-weight: 700; }
#chtabs button[data-k="up"] b { color: var(--f3); } #chtabs button[data-k="down"] b { color: var(--f0); }
.ch-n { font-weight: 600; font-size: 13.5px; } .ch-n small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.ch-s { display: flex; align-items: center; gap: 6px; white-space: nowrap; } .ch-s i { font-style: normal; color: var(--muted); }
.ch-w { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 760px) {
  .ch-row { grid-template-columns: 3rem 1rem minmax(0, 1fr); }
  .ch-s, .ch-w { grid-column: 3; }
}

/* topic tabs: sticky under the header; each tab is a button so it reads as clickable; badge dot = worst level in that topic */
.tabnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; margin: -6px -16px 0; min-width: 0;   /* grid item: must not grow to the menu's full width */
 
  background: var(--bg); border-bottom: 1px solid var(--rule); }   /* solid: backdrop-filter on a sticky bar mis-paints in Chromium */
.tabbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 16px; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button { flex: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
  padding: 8px 14px; min-height: 40px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-bottom-width: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transition: border-color .12s, color .12s, background-color .12s, transform .12s; }
.tabbar button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tabbar button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; transform: none; box-shadow: none; }
.tabbar button:focus-visible { outline-offset: 2px; }
.tb-b { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--rule);
  font-size: 11.5px; font-weight: 600; color: var(--ink-2); line-height: 1.5; }
.tb-b i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tb-b[style] .num { color: var(--c); }
/* narrow screens: ‹ › scroll the bar; each shows only when there is more menu on that side */
.tb-arr { position: absolute; top: 0; bottom: 0; z-index: 1; width: 52px; border: 0; cursor: pointer; display: flex; align-items: center;
  font: 600 26px/1 var(--sans); color: var(--accent); padding: 0 10px 4px; }
.tb-arr.l { left: 0; justify-content: flex-start; background: linear-gradient(90deg, var(--bg) 60%, transparent); }
.tb-arr.r { right: 0; justify-content: flex-end; background: linear-gradient(270deg, var(--bg) 60%, transparent); }
.tb-arr:hover { color: var(--ink); }
.back-btn { justify-self: start; margin-bottom: 8px; border: 1px solid var(--rule); background: var(--panel-2); color: var(--ink); border-radius: 8px;
  padding: 6px 14px; font-size: 13.5px; cursor: pointer; }
.back-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .tabbar button { transition: none; } .tabbar button:hover { transform: none; } }
.panel { display: grid; gap: 16px; min-width: 0; }
.card { scroll-margin-top: 76px; }
.doc > h2 { margin-bottom: 0; }
@media (max-width: 760px) {
  .tabbar { gap: 6px; padding-block: 8px; }
  .tabbar button { padding: 7px 12px; font-size: 13.5px; }
}

/* rain radar (RainViewer) controls, shown only while the layer is on */
.radar-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; padding: 8px 12px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--panel-2); font-size: 12.5px; color: var(--ink-2); }
.rv-play { min-height: 34px; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; }
.rv-play[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.rv-play:disabled { opacity: .5; cursor: default; }
#rvrange { flex: 1 1 180px; min-width: 120px; accent-color: var(--accent); }
.rv-time b { color: var(--ink); }
.rv-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.rv-scale { display: inline-block; width: 120px; height: 8px; border-radius: 4px; border: 1px solid var(--rule);
  background: linear-gradient(90deg, #88ddee, #36bae5, #0088bf, #005b8e, #004768, #ffee00, #ffaa00, #ff8100, #f23600, #ff9fff); }   /* RainViewer scheme 2, sampled from its tiles */
.rv-note { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) { #rvrange { flex-basis: 100%; order: 3; } .rv-time { order: 2; } .rv-leg { order: 4; } .rv-note { order: 5; } }

/* alerts: header button, settings dialog, popups */
.top-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.alert-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--panel); color: var(--ink-2); font-size: 13px; }
.alert-btn:hover { border-color: var(--accent); color: var(--accent); }
.alert-btn.on { border-color: var(--f3); color: var(--ink); background: color-mix(in srgb, var(--f3) 14%, var(--panel)); }
.alert-btn.on svg { color: var(--f3); }
.al-box { width: min(520px, 100%); }
.al-sw { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; padding: 3px 0; }
.al-sw input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.al-sw small { color: var(--muted); }
.al-f { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px 10px; margin: 0; display: grid; gap: 4px; }
.al-f legend, .al-f > label { font-size: 12.5px; color: var(--ink-2); padding: 0 4px; }
.al-f input[type=text] { font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--panel-2); color: var(--ink); width: 100%; }
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.al-chips:empty { display: none; }
.al-chip { border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; }
.al-act { display: flex; gap: 8px; }
@keyframes alb-in { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (max-width: 760px) { .top-r { justify-content: flex-start; } }

/* alert banner (top, one line; tap to open the list) */
.alb { position: fixed; z-index: 900; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(600px, calc(100vw - 24px));
  background: var(--panel); border: 1px solid var(--c); border-radius: 26px; box-shadow: 0 14px 34px rgba(0,0,0,.45); animation: alb-in .25s ease-out; }
.alb.open { border-radius: 16px; }
.alb-bar { display: flex; align-items: center; }
.alb-tg { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 16px; background: transparent; border: 0; color: var(--ink); cursor: pointer; text-align: left; font-size: 14px; }
.alb-bell { color: var(--c); display: inline-flex; flex: none; }
.alb-bell.ring { animation: ring 1s ease-in-out 3; transform-origin: 50% 10%; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(10deg); } 80% { transform: rotate(-6deg); } }
.alb-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alb-t b { color: var(--c); }
.alb-more { color: var(--muted); }
.alb-chev { color: var(--muted); transition: transform .15s; flex: none; }
.alb.open .alb-chev { transform: rotate(180deg); }
.alb-x { flex: none; width: 40px; height: 40px; margin-right: 4px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 50%; font-size: 15px; }
.alb-x:hover { background: var(--panel-2); }
.alb-body { border-top: 1px solid var(--rule); padding: 10px 16px 14px; display: grid; gap: 10px; }
.alb-list { display: grid; gap: 8px; max-height: min(52vh, 440px); overflow: auto; }
.alb-i { border-left: 4px solid var(--c); padding: 4px 0 6px 10px; display: grid; gap: 2px; font-size: 13px; }
.alb-ih { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; } .alb-ih b { font-size: 14px; } .alb-ih small { color: var(--muted); }
.alb-tm { margin-left: auto; color: var(--muted); font-size: 12px; }
.alb-is { color: var(--ink-2); } .alb-iw { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.alb-go { justify-self: start; margin-top: 2px; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 8px; padding: 3px 12px; font-size: 12.5px; cursor: pointer; }
.alb-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alb-act .sp { flex: 1; }
.alb-all { color: var(--f1); font-weight: 600; font-size: 13.5px; }
.alb-sh, .alb-cl { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 7px 14px; cursor: pointer; font-size: 13.5px; }
.alb-sh { border: 0; background: transparent; color: var(--ink-2); }
.alb-cl { border: 1px solid var(--rule); background: var(--panel-2); color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .alb, .alb-bell.ring { animation: none; } .alb-chev { transition: none; } }
@media (max-width: 760px) { .alb { top: calc(8px + env(safe-area-inset-top, 0px)); } .alb-tg { font-size: 13.5px; padding-left: 12px; } }

/* JAXA rain forecast steps (hourly) */
.nc-h { font-weight: 600; color: var(--ink); }
.nc-steps button { display: inline-flex; gap: 5px; align-items: baseline; }
.nc-steps button small { color: var(--muted); font-size: 11px; }
.nc-steps button[aria-pressed="true"] small { color: inherit; }
.nc-layer { transition: opacity .45s ease; }
.nc-model { font: inherit; font-size: 12.5px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 8px; padding: 5px 8px; max-width: 100%; }
.nc-model:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#ncrange { flex: 1 1 160px; min-width: 120px; accent-color: var(--accent); }
.fc-th { filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.fc-th-leg { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.fc-th-leg svg { vertical-align: middle; }   /* hourly forecast frames cross-fade while playing */
@media (prefers-reduced-motion: reduce) { .nc-layer { transition: none; } }
/* GSMaP Nowcast: JAXA's 10 fixed classes (0.1 0.5 1 2 3 5 10 15 20 25+ mm/hr) — one flat colour per class, like the tiles */
.nc-score { font-size: 12px; color: var(--accent); white-space: nowrap; text-decoration: none; }
.nc-score:hover { text-decoration: underline; }
.nc-scale { background: linear-gradient(90deg, #000096 0 10%, #0064ff 10% 20%, #00b4ff 20% 30%, #33db80 30% 40%, #9beb4a 40% 50%,
  #ffeb00 50% 60%, #ffb300 60% 70%, #ff6400 70% 80%, #eb1e00 80% 90%, #af0000 90% 100%); }
/* model forecast: the same colours blended between 0.3 1 2 4 7 10 15 20 30 50 mm in 3 h (FCPAL in app.js) */
.fc-scale { background: linear-gradient(90deg, #000096, #0064ff, #00b4ff, #33db80, #9beb4a, #ffeb00, #ffb300, #ff6400, #eb1e00, #af0000); }
/* a scale bar with its values underneath */
.rv-ticks { position: relative; display: inline-block; padding-bottom: 12px; }
.rv-ticks .rv-scale { display: block; width: 160px; }
.rv-ticks .tk { position: absolute; top: 12px; transform: translateX(-50%); font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-ticks .tk:first-of-type { transform: none; }
.rv-ticks .tk.end { transform: translateX(-100%); }
@media (max-width: 760px) { #ncrange { flex-basis: 100%; order: 3; } #nctime { order: 2; } .nc-steps { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .nc-steps button { flex: none; } }

/* satellite clouds (Himawari, src/cloud.php). True colour covers the map like a photo. The infrared and cloud-top pictures lie
   over the map: on the dark maps the grey of clear sky is pushed to black (contrast) and drops out (screen), so only the clouds
   light up; on the light map the infrared picture is inverted and multiplied, so clouds shade the map grey. */
body:not([data-theme="paper"]) .leaflet-cloud-pane[data-kind="ir"] { mix-blend-mode: screen; filter: contrast(1.6); }
body:not([data-theme="paper"]) .leaflet-cloud-pane[data-kind="snd"] { mix-blend-mode: screen; filter: contrast(1.4); }
body[data-theme="paper"] .leaflet-cloud-pane[data-kind="ir"] { mix-blend-mode: multiply; filter: invert(1) contrast(1.6); opacity: .6; }
body[data-theme="paper"] .leaflet-cloud-pane[data-kind="snd"] { opacity: .85; }
#clrange { flex: 1 1 160px; min-width: 120px; accent-color: var(--accent); }
.dam-reg { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.cl-scale { background: linear-gradient(90deg, #1e64ff, #00c8ff, #28d250, #ffe600, #ff8c00, #e60000); }
@media (max-width: 760px) { #clrange { flex-basis: 100%; order: 3; } #cltime { order: 2; } }
/* wind: speed colours (0 → 90+ km/h) and the streak canvas that sits over the map */
#wrange { flex: 1 1 160px; min-width: 120px; accent-color: var(--accent); }
.w-scale { background: linear-gradient(90deg, rgb(60,45,143), rgb(63,92,196) 11%, rgb(47,155,209) 22%, rgb(60,198,168) 33%, rgb(138,217,107) 44%, rgb(242,226,90) 61%, rgb(245,155,66) 78%, rgb(224,69,58)); }
.wind-cv { position: absolute; left: 0; top: 0; pointer-events: none; }
@media (max-width: 760px) { #wrange { flex-basis: 100%; order: 3; } #wtime { order: 2; } }

/* Mekong: reach headings + summary line */
.mk-sum { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: var(--ink-2); } .mk-sum b { color: var(--ink); font-family: var(--mono); }
.mk-g { grid-column: 1 / -1; font: 600 13px var(--sans); color: var(--muted); margin: 6px 0 -4px; letter-spacing: .3px; }

/* GISTDA satellite flood */
.sat-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; background: #008cc7; }
.freq-sw { display: inline-block; width: 40px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #0091b6, #2f6fe0, #f5a623, #e03a00, #9c0000); }
.sum-head .sat-line { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); } .sum-head .sat-line b { color: #2ea8e0; } .sum-head .sat-line a { color: var(--accent); }
.sat-head { margin: 0 0 10px; font-size: 14px; line-height: 1.7; } .sat-head b { font-family: var(--mono); color: #2ea8e0; }
.sat-head .alb-go { margin-left: 6px; vertical-align: 1px; }
.sat-pvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.sat-pv { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--rule); border-left: 4px solid #008cc7; border-radius: 8px; padding: 7px 10px; }
.sat-pv:hover { border-color: #008cc7; }
.sat-pv .num { font-weight: 600; color: #2ea8e0; } .sat-pv small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.sat-amp { margin-top: 4px; } .sat-amp tbody tr { cursor: pointer; } .sat-amp tbody tr:hover td { background: var(--panel-2); } .sat-amp .r { text-align: right; }
.pv-s .sat { color: #2ea8e0; }
body[data-theme="paper"] .sum-head .sat-line b, body[data-theme="paper"] .sat-head b, body[data-theme="paper"] .sat-pv .num, body[data-theme="paper"] .pv-s .sat { color: #00679a; }

.top h1 .logo { width: 30px; height: 30px; border-radius: 7px; vertical-align: -7px; margin-right: 8px; }
.top h1 .sep { font-style: normal; }
@media (max-width: 520px) { .top h1 .sep { display: none; } .top h1 span { display: block; margin-top: 2px; } }

/* airports (TMD METAR + TAF via NOAA AWC): purple = thunder forecast within 24 h, blue = rain, grey = none;
   own hues so they never read as a flood status; a ring pulses while it rains there now */
.air-ic { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c);
  border: 1.5px solid #111; box-shadow: 0 0 0 1px #fff; color: #fff; --c: #7d8790; }
.air-ic svg { width: 13px; height: 13px; display: block; }
.air-ic.ts { --c: #7f5af0; } .air-ic.ra { --c: #2f80ed; } .air-ic.no { --c: #7d8790; }
.air-ic.now::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--c); animation: air-now 1.8s ease-out infinite; pointer-events: none; }
@keyframes air-now { from { transform: scale(.75); opacity: .95; } to { transform: scale(1.45); opacity: 0; } }
.air-ic.sw { width: 16px; height: 16px; border-width: 1px; vertical-align: -3px; margin-right: 4px; }
.air-ic.sw svg { width: 10px; height: 10px; }
.air-chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--rule); }
.air-chip.ts { background: rgba(127,90,240,.18); color: #b9a4ff; border-color: rgba(127,90,240,.55); }
.air-chip.ra { background: rgba(47,128,237,.16); color: #8fbaff; border-color: rgba(47,128,237,.5); }
body[data-theme="paper"] .air-chip.ts { color: #4b2fb3; } body[data-theme="paper"] .air-chip.ra { color: #1a56a8; }
.air-fh { font-size: 12.5px; font-weight: 600; margin: 8px 0 4px; }
.air-fh small { font-weight: 400; color: var(--muted); }
.air-bar { position: relative; height: 10px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--rule); overflow: hidden; }
.air-bar i { position: absolute; top: 0; bottom: 0; }
.air-bar i.ra { background: #2f80ed; } .air-bar i.ts { background: #7f5af0; }
.air-ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 2px 0 4px; }
.pop ul.air-per { margin: 4px 0 6px; }
.air-raw { font-size: 11.5px; margin: 4px 0; }
.air-raw summary { cursor: pointer; color: var(--accent); }
.air-raw code { display: block; font-family: var(--code); white-space: pre-wrap; word-break: break-word; color: var(--ink-2); margin-top: 4px; }
.air-tbl { width: 100%; font-size: 13px; border-collapse: collapse; }
.air-tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.air-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.55; }
.air-tbl small { color: var(--muted); }
.air-go { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.air-go:hover { color: var(--accent); }
.ts-t { color: #b9a4ff; font-weight: 600; } .ra-t { color: #8fbaff; font-weight: 600; }
body[data-theme="paper"] .ts-t { color: #4b2fb3; } body[data-theme="paper"] .ra-t { color: #1a56a8; }
@media (prefers-reduced-motion: reduce) { .air-ic.now::after { animation: none; opacity: .8; transform: scale(1.2); } }
