/* PlayaCams — Caribbean-modern UI. Light/dark via prefers-color-scheme. */
:root {
  --bg: #f4f7f8;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef3f5;
  --glass: rgba(255, 255, 255, .82);
  --text: #0c1c26;
  --text-2: #4a5d68;
  --muted: #6b7f8a;
  --line: rgba(12, 28, 38, .09);
  --brand: #0d9488;
  --brand-2: #0284c7;
  --brand-ink: #ffffff;
  --brand-soft: rgba(13, 148, 136, .1);
  --sand: #f6ead7;
  --live: #16a34a;
  --warn: #d97706;
  --off: #94a3b8;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(12, 28, 38, .06), 0 1px 1px rgba(12, 28, 38, .04);
  --shadow: 0 10px 30px -12px rgba(12, 28, 38, .25), 0 2px 6px rgba(12, 28, 38, .06);
  --shadow-lg: 0 30px 80px -20px rgba(4, 20, 30, .45);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --top: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07131b;
    --bg-2: #0b1a24;
    --surface: #0f212d;
    --surface-2: #142a38;
    --glass: rgba(11, 26, 36, .84);
    --text: #e8f1f4;
    --text-2: #b3c4cc;
    --muted: #8aa0ab;
    --line: rgba(232, 241, 244, .09);
    --brand: #2dd4bf;
    --brand-2: #38bdf8;
    --brand-ink: #04211e;
    --brand-soft: rgba(45, 212, 191, .12);
    --live: #22c55e;
    --warn: #f59e0b;
    --off: #64748b;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1320px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Icons */
.i { width: 20px; height: 20px; flex: none; }
.i--sm { width: 16px; height: 16px; }
.i--xs { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar__inner { height: var(--top); display: flex; align-items: center; gap: 20px; width: min(1320px, 100% - 32px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; flex: none; }
.brand:hover { color: inherit; }
.brand b { color: var(--brand); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav__link { padding: 8px 12px; border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.nav__link:hover { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { background: var(--brand-soft); color: var(--brand); }
.topbar__end { display: flex; align-items: center; gap: 8px; flex: none; }
.clock, .lang { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-2); padding: 7px 10px; border-radius: 999px; }
.clock { font-variant-numeric: tabular-nums; }
.lang { border: 1px solid var(--line); }
.lang:hover { background: var(--surface-2); }

/* ---------- Alert bar ---------- */
.alert-bar { background: linear-gradient(90deg, #b45309, #dc2626); color: #fff; font-size: .9rem; font-weight: 600; }
.alert-bar[data-level="watch"] { background: linear-gradient(90deg, #b45309, #d97706); }
.alert-bar[data-level="info"] { background: linear-gradient(90deg, #0369a1, #0d9488); }
.alert-bar__inner { width: min(1320px, 100% - 32px); margin-inline: auto; padding: 9px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.alert-bar a { text-decoration: underline; text-underline-offset: 2px; }
.alert-bar a:hover { color: #fff; opacity: .85; }
.alert-bar svg { width: 22px; height: 22px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: #08303a var(--hero) center/cover no-repeat; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 24, 34, .25) 0%, rgba(4, 24, 34, .55) 55%, var(--bg) 100%), linear-gradient(90deg, rgba(4, 24, 34, .55), rgba(4, 24, 34, 0) 70%); }
.hero__inner { padding: clamp(36px, 7vw, 84px) 0 clamp(70px, 9vw, 110px); display: grid; gap: 28px; }
.hero__inner--split { grid-template-columns: minmax(0, 1fr) 360px; align-items: end; }
.hero--compact .hero__inner { padding-bottom: 60px; }
.hero__copy { max-width: 760px; }
.hero h1 { text-shadow: 0 2px 30px rgba(0, 0, 0, .35); margin-bottom: .35em; }
.hero .lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255, 255, 255, .92); max-width: 680px; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.notfound .eyebrow { background: var(--brand-soft); color: var(--brand); }
.hero .crumbs { margin-bottom: 14px; }
.hero .crumbs a, .hero .crumbs span { color: rgba(255, 255, 255, .88); }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; display: inline-block; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

/* Weather strip (home) */
.wx-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 900px; }
.wx-chip { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; transition: background .2s, transform .2s; }
.wx-chip:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-2px); }
.wx-chip__icon { grid-row: span 2; width: 40px; height: 40px; }
.wx-chip__icon svg { width: 40px; height: 40px; }
.wx-chip__name { font-size: .78rem; font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-chip__temp { font-size: 1.2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wx-chip__temp small { font-size: .72rem; font-weight: 600; opacity: .8; margin-left: 4px; }
.wx-chip.has-alert { border-color: #fbbf24; box-shadow: 0 0 0 1px #fbbf24 inset; }

/* ---------- Explorer (map + list) ---------- */
.explorer { position: relative; margin-top: -56px; z-index: 5; display: grid; grid-template-columns: 380px minmax(0, 1fr); height: min(720px, calc(100vh - var(--top) - 40px)); min-height: 520px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.page-cam .explorer { margin-top: 0; }
.explorer__panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.explorer__controls { padding: 16px; display: grid; gap: 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.explorer__controls > * { min-width: 0; }
.explorer__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.explorer__list { overflow-y: auto; padding: 8px; flex: 1; overscroll-behavior: contain; }
.explorer__map { position: relative; min-width: 0; }
.map { position: absolute; inset: 0; background: #aadaff; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--muted); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--brand); background: var(--surface); }
.search input { border: 0; outline: 0; background: none; flex: 1; font: inherit; color: var(--text); min-width: 0; height: 100%; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text-2); transition: all .15s; }
button.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip--ghost.is-on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip--sm { padding: 3px 9px; font-size: .74rem; cursor: default; background: var(--surface-2); border-color: transparent; }
.chip--sun { color: #b45309; background: rgba(245, 158, 11, .12); }
.chip--link { cursor: pointer; }
.chip--link:hover { border-color: var(--brand); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { width: 36px; height: 21px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .2s; }
.switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--live); border-color: var(--live); }
.switch input:checked + .switch__track::after { transform: translateX(15px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand); outline-offset: 2px; }

/* list rows */
.row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; align-items: center; border: 1px solid transparent; }
.row:hover, .row.is-hover { background: var(--surface-2); }
.row.is-active { border-color: var(--brand); background: var(--brand-soft); }
.row__img { position: relative; width: 88px; aspect-ratio: 16/10; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.row__img img { width: 100%; height: 100%; object-fit: cover; }
.row__title { font-weight: 700; font-size: .93rem; line-height: 1.25; margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.row__meta .st { flex: none; }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); }

.map-tools { position: absolute; top: 12px; right: 12px; z-index: 500; display: flex; gap: 8px; }
.map-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .84rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); }
.map-btn:hover { color: var(--brand); }
.map-btn.is-on { background: var(--text); color: var(--bg); }
.map-count { position: absolute; left: 12px; bottom: 12px; z-index: 500; padding: 6px 12px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .8rem; font-weight: 700; box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 8px; }

/* status dot */
.st { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--off); vertical-align: middle; }
.st--online { background: var(--live); }
.st--uncertain { background: var(--warn); }

/* ---------- Leaflet markers ---------- */
.leaflet-container { font-family: var(--font); background: #a8d5e2; }
.cam-pin { width: 38px; height: 38px; position: relative; }
.cam-pin__b { position: absolute; inset: 0; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: #64748b; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .45); border: 2.5px solid #fff; transition: transform .15s; }
.cam-pin svg { position: absolute; inset: 9px; width: 20px; height: 20px; color: #fff; }
.cam-pin--online .cam-pin__b { background: linear-gradient(135deg, #14b8a6, #0284c7); }
.cam-pin--uncertain .cam-pin__b { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cam-pin--featured { transform: scale(1.12); }
.cam-pin--online::after { content: ''; position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; animation: pulse 2s infinite; }
.cam-pin.is-hover .cam-pin__b, .cam-pin:hover .cam-pin__b { transform: rotate(-45deg) scale(1.15); }
.cam-pin--off { opacity: .75; }
.cluster { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .92rem; background: linear-gradient(135deg, #0d9488, #0369a1); border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 6px rgba(13, 148, 136, .25), 0 8px 18px -6px rgba(0, 0, 0, .5); }
.leaflet-tooltip.cam-tip { background: var(--surface); color: var(--text); border: 0; border-radius: 10px; box-shadow: var(--shadow); padding: 6px 10px; font-weight: 600; font-size: .82rem; }
.leaflet-tooltip.cam-tip::before { display: none; }
.leaflet-control-zoom a { border-radius: 10px !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-attribution { font-size: 10px; background: var(--glass) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--line); }
}

/* ---------- Sections & cards ---------- */
.section { padding: clamp(36px, 5vw, 64px) 0 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__head h2 { margin: 0; }
.section__head h2 a:hover { color: var(--brand); }
.section__desc { max-width: 760px; margin-top: -8px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--brand); white-space: nowrap; }
.grid { display: grid; gap: 18px; }
.grid--cams { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--regions { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--surface); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); display: block; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__media .badge { position: absolute; top: 10px; left: 10px; }
.card__play { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #0c1c26; opacity: 0; transform: translateY(6px); transition: all .2s; box-shadow: var(--shadow); }
.card__play svg { width: 18px; height: 18px; margin-left: 2px; }
.card:hover .card__play, .card__media:focus-visible .card__play { opacity: 1; transform: none; }
.card__body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.card__title { font-size: 1rem; margin: 0; }
.card__meta { font-size: .82rem; color: var(--muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; background: rgba(15, 23, 42, .72); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--off); }
.badge--online { background: rgba(22, 163, 74, .92); }
.badge--online .dot { background: #fff; animation: blink 1.6s infinite; }
.badge--uncertain .dot { background: #fbbf24; }
.badge--offline .dot { background: #94a3b8; }
@keyframes blink { 50% { opacity: .35; } }

.region-card { position: relative; display: block; aspect-ratio: 16/10; border-radius: var(--r-lg); overflow: hidden; color: #fff; box-shadow: var(--shadow); isolation: isolate; }
.region-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; z-index: -2; }
.region-card:hover img { transform: scale(1.06); }
.region-card:hover { color: #fff; }
.region-card__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(4, 20, 30, .78)); }
.region-card__body { position: absolute; left: 18px; right: 18px; bottom: 16px; display: grid; gap: 4px; }
.region-card__name { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.region-card__meta { font-size: .86rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; opacity: .95; }
.region-card__meta .live-dot { margin-left: 4px; }

/* Index of all cams */
.index { columns: 4 240px; column-gap: 28px; }
.index__col { break-inside: avoid; margin-bottom: 26px; }
.index__col h3 { font-size: 1.1rem; margin-bottom: 6px; }
.index__area { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 4px; }
.index ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.index li { font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.index li a:hover { text-decoration: underline; }

.pill-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* FAQ */
.faq { max-width: 860px; padding-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 10px; font-size: .84rem; font-weight: 600; }
.crumbs li { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.crumbs li + li::before { content: '/'; opacity: .5; margin-right: 2px; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Weather card ---------- */
.wx-card { background: var(--glass); color: var(--text); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); min-height: 200px; }
.hero .wx-card { align-self: end; }
.wx-card__skeleton { display: grid; gap: 12px; }
.wx-card__skeleton span { height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.wx-card__skeleton span:first-child { height: 56px; width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.wx-top { display: flex; align-items: center; gap: 14px; }
.wx-top__icon svg { width: 72px; height: 72px; }
.wx-top__temp { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wx-top__temp small { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.wx-top__desc { font-weight: 700; font-size: .95rem; }
.wx-top__place { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.wx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.wx-stat { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.wx-stat dt { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 4px; }
.wx-stat dd { margin: 2px 0 0; font-weight: 750; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wx-stat dd small { font-weight: 600; color: var(--muted); font-size: .72rem; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.wx-day { text-align: center; font-size: .78rem; font-weight: 600; color: var(--text-2); padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); }
.wx-day svg { width: 32px; height: 32px; margin: 0 auto; }
.wx-day b { color: var(--text); }
.wx-alerts { display: grid; gap: 6px; margin-top: 12px; }
.wx-alert { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: .82rem; font-weight: 650; background: rgba(245, 158, 11, .14); color: #92400e; }
.wx-alert--warning { background: rgba(220, 38, 38, .12); color: #991b1b; }
.wx-alert--info { background: rgba(2, 132, 199, .1); color: #075985; }
@media (prefers-color-scheme: dark) {
  .wx-alert { color: #fcd34d; } .wx-alert--warning { color: #fca5a5; } .wx-alert--info { color: #7dd3fc; }
}
.wx-alert svg { width: 20px; height: 20px; flex: none; }
.wx-err { color: var(--muted); font-size: .9rem; }
.wx-src { font-size: .7rem; color: var(--muted); margin: 10px 0 0; }

/* Weather icon animation */
.wxi-sun-rays { transform-origin: 32px 32px; animation: spin 24s linear infinite; }
.wxi-cloud { animation: drift 6s ease-in-out infinite; }
.wxi-drop { animation: drop 1.2s linear infinite; }
.wxi-drop:nth-of-type(2) { animation-delay: .4s; }
.wxi-drop:nth-of-type(3) { animation-delay: .8s; }
.wxi-bolt { animation: flash 2.4s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 50% { transform: translateX(2px); } }
@keyframes drop { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
@keyframes flash { 0%, 80%, 100% { opacity: 1; } 85% { opacity: .2; } 90% { opacity: 1; } 95% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Modal player ---------- */
.modal { padding: 0; border: 0; background: transparent; max-width: min(1100px, 100vw - 32px); width: 100%; max-height: calc(100vh - 32px); color: var(--text); }
.modal::backdrop { background: rgba(3, 12, 18, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__inner { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.modal__title { font-size: 1.25rem; margin: 0 0 2px; }
.modal__sub { margin: 0; font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal__sub a:hover { text-decoration: underline; }
.modal__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.modal__feeds { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.modal__feeds .label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.modal__actions { display: flex; gap: 8px; }
.modal__wx { padding: 12px 18px 16px; overflow-y: auto; }
.modal__wx .wx-card { box-shadow: none; padding: 0; background: none; border: 0; min-height: 0; backdrop-filter: none; }
.modal__wx .wx-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.modal__wx .wx-days, .modal__wx .wx-top__icon svg { display: none; }
.modal__wx .wx-top__icon svg.show { display: block; width: 48px; height: 48px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 700; font-size: .9rem; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); color: var(--brand-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--sm { height: 32px; padding: 0 12px; font-size: .8rem; border-radius: 10px; }
.feed-btn { height: 30px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.feed-btn.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.feed-btn .st { width: 7px; height: 7px; }

/* Player */
.player { position: relative; aspect-ratio: 16/9; background: #000; width: 100%; overflow: hidden; }
.player iframe, .player video, .player img.mjpeg { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.player--page { border-radius: var(--r-lg); box-shadow: var(--shadow); background: #000 var(--poster) center/cover no-repeat; }
.player--page.is-playing { background-image: none; }
.player__start { position: absolute; inset: 0; margin: auto; width: max-content; height: 64px; padding: 0 26px 0 20px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .95); color: #0c1c26; font-weight: 800; font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); transition: transform .2s; }
.player__start:hover { transform: scale(1.05); }
.player__start svg { width: 26px; height: 26px; }
.player__msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: #e2e8f0; background: radial-gradient(circle at 50% 40%, #12303f, #050d13); }
.player__msg > div { max-width: 440px; display: grid; gap: 14px; justify-items: center; }
.player__msg svg.big { width: 46px; height: 46px; opacity: .7; }
.player__msg p { margin: 0; font-weight: 600; }
.player__spin { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #2dd4bf; animation: spin 0.9s linear infinite; pointer-events: none; }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.player-bar p { margin: 0; }

/* ---------- Camera page ---------- */
.cam-page { padding-top: 22px; }
.cam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.cam-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: 8px; }
.h1-sub { display: block; font-size: .5em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.cam-head__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.cam-head__meta span { display: inline-flex; align-items: center; gap: 5px; }
.cam-head__meta a:hover { text-decoration: underline; }
.cam-side { display: grid; gap: 16px; position: sticky; top: calc(var(--top) + 16px); }
.prose { margin-top: 28px; max-width: 760px; }
.prose p { color: var(--text-2); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-weight: 600; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 16px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.minimap { height: 220px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 44px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.brand--footer { margin-bottom: 12px; }
.footer__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.footer__base { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem; z-index: 1000; transition: all .25s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.notfound { min-height: 50vh; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .explorer { grid-template-columns: 320px minmax(0, 1fr); }
  .wx-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cam-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .hero__inner--split { grid-template-columns: 1fr; }
  .cam-layout { grid-template-columns: 1fr; }
  .cam-side { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --top: 56px; }
  .nav { display: none; }
  .topbar__inner { justify-content: space-between; }
  .wx-strip { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .wx-strip::-webkit-scrollbar { display: none; }
  .wx-chip { flex: 0 0 150px; scroll-snap-align: start; }
  .hero__inner { padding-bottom: 76px; }
  .explorer { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 56vh auto; height: auto; min-height: 0; margin-top: -52px; border-radius: var(--r); }
  .explorer__panel { display: contents; }
  .explorer__controls { order: 1; padding: 12px; border-bottom: 1px solid var(--line); min-width: 0; }
  .alert-bar__inner { flex-wrap: nowrap; font-size: .82rem; padding: 7px 0; }
  .alert-bar__inner strong { display: none; }
  .alert-bar__inner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
  .explorer__map { order: 2; height: 56vh; min-height: 340px; }
  .explorer__list { order: 3; max-height: none; display: flex; overflow-x: auto; overflow-y: hidden; gap: 10px; padding: 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .explorer__list::-webkit-scrollbar { display: none; }
  .explorer__list .row { flex: 0 0 78%; grid-template-columns: 84px minmax(0, 1fr); scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface); }
  .explorer__list .empty { flex: 1; }
  .grid--cams { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
  .card__play { opacity: 1; transform: none; width: 34px; height: 34px; }
  .modal { max-width: 100vw; margin: auto 0 0; max-height: 92vh; }
  .modal__inner { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .modal[open] { animation: sheet .25s ease-out; }
  .modal__wx .wx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal__actions { width: 100%; }
  .modal__actions .btn { flex: 1; justify-content: center; }
  .clock span { display: inline; }
  .footer__grid { grid-template-columns: 1fr; }
  .index { columns: 1; }
  .section__head { flex-wrap: wrap; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 420px) {
  .clock { display: none; }
}
