/* =========================================================
   Webcam Vista — dark, video-first, mobile-first
   ========================================================= */
:root {
  --bg: #090d16;
  --bg-2: #0d1320;
  --surface: #121a29;
  --surface-2: #182234;
  --line: #1f2a3f;
  --line-2: #2a3752;
  --ink: #edf1f8;
  --ink-2: #c4cddd;
  --muted: #8592a9;
  --brand: #ff3b5c;
  --brand-ink: #fff;
  --accent: #5b8cff;
  --gold: #ffc542;
  --day: #ffd166;
  --dusk: #ff9e5e;
  --night: #8fa8ff;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --head-h: 56px;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-d: Manrope, Inter, system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --topbar-bg: rgba(9, 13, 22, .86);
  --map-filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6);
  --map-bg: #0e1422;
  color-scheme: dark;
}
/* light theme: follows the system unless the visitor picked one (data-theme set before first paint) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  --bg: #f5f6fa;
  --bg-2: #eceff5;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --line: #e2e6ee;
  --line-2: #cdd4e1;
  --ink: #0c1120;
  --ink-2: #364055;
  --muted: #687288;
  --accent: #2f6bff;
  --gold: #f5b400;
  --day: #b97c00;
  --dusk: #d9631a;
  --night: #4058d0;
  --shadow: 0 10px 30px rgba(20, 30, 60, .12);
  --topbar-bg: rgba(245, 246, 250, .86);
  --map-filter: none;
  --map-bg: #e9edf3;
  color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-2: #eceff5;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --line: #e2e6ee;
  --line-2: #cdd4e1;
  --ink: #0c1120;
  --ink-2: #364055;
  --muted: #687288;
  --accent: #2f6bff;
  --gold: #f5b400;
  --day: #b97c00;
  --dusk: #d9631a;
  --night: #4058d0;
  --shadow: 0 10px 30px rgba(20, 30, 60, .12);
  --topbar-bg: rgba(245, 246, 250, .86);
  --map-filter: none;
  --map-bg: #e9edf3;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-d); letter-spacing: -.02em; line-height: 1.15; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 12px; height: var(--head-h); }
.logo { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line-2); stroke: none; }
.logo-sun { animation: sunrise 3.2s ease-in-out infinite alternate; transform-origin: 32px 28px; }
@keyframes sunrise { from { transform: translateY(3px); } to { transform: translateY(-1px); } }
.logo-text { font: 500 19px var(--font-d); letter-spacing: -.045em; color: var(--ink); }
.logo-text b { font-weight: 800; }
.search { display: none; align-items: center; gap: 8px; flex: 1; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--line-2); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 9px 0; outline: none; }
.search input::placeholder { color: var(--muted); }
.mainnav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.mainnav a, .icon-btn { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500; background: none; border: 0; cursor: pointer; }
.mainnav a:hover, .icon-btn:hover, .mainnav a.on { background: var(--surface); color: var(--ink); }
.mainnav a span { display: none; }
.catbar { border-top: 1px solid var(--line); }
.catbar-in { display: flex; gap: 4px; overflow-x: auto; padding: 7px var(--gutter); scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.catbar-in::-webkit-scrollbar { display: none; }
.catbar a { display: flex; gap: 6px; white-space: nowrap; color: var(--ink-2); padding: 5px 11px; border-radius: 99px; font-size: 14px; font-weight: 500; }
.catbar a:hover { background: var(--surface); color: var(--ink); }
.catbar a.on { background: var(--ink); color: var(--bg); }
/* mobile search opens as a full row under the bar */
body.search-open .search { display: flex; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--head-h) + 6px); max-width: none; z-index: 5; box-shadow: var(--shadow); }

/* ---------- live / phase chips ---------- */
.chip-live { display: inline-flex; align-items: center; gap: 5px; background: var(--brand); color: #fff; font: 700 10.5px/1 var(--font); letter-spacing: .08em; padding: 5px 7px; border-radius: 6px; }
.chip-live i, .dot-live { width: 6px; height: 6px; border-radius: 50%; background: #fff; display: inline-block; animation: blink 1.4s infinite; }
.dot-live { background: var(--brand); margin-right: 7px; vertical-align: 1px; }
.chip-live.off { background: #3a4459; } .chip-live.off i { animation: none; opacity: .5; }
@keyframes blink { 50% { opacity: .25; } }
.chip-phase { display: inline-flex; align-items: center; gap: 5px; background: rgba(9, 13, 22, .72); backdrop-filter: blur(6px); color: #fff; font: 600 11px/1 var(--font); padding: 4px 8px; border-radius: 6px; }
.chip-phase b { font-size: 12px; }
.ph-day b { color: var(--day); } .ph-sunrise b, .ph-sunset b { color: var(--dusk); } .ph-night b { color: var(--night); }
.chip-feat { background: var(--gold); color: #2b1d00; font: 700 11px/1 var(--font); padding: 5px 8px; border-radius: 6px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cards ---------- */
.card { display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius); }
.card-img { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); isolation: isolate; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .3s; }
.card-img::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
.card-img .chip-live { position: absolute; top: 8px; left: 8px; }
.card-img .chip-phase { position: absolute; bottom: 8px; left: 8px; }
.card-img .chip-feat { position: absolute; top: 8px; right: 8px; }
.card:hover .card-img img { transform: scale(1.04); }
.card-featured .card-img::after { box-shadow: inset 0 0 0 2px var(--gold); }
.card-body { padding: 9px 2px 4px; }
.card-title { font: 600 14.5px/1.3 var(--font-d); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .card-title { color: var(--accent); }
.card-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flag { margin-right: 5px; }

/* grids: 2 columns on phones, growing with width */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.grid .ph-t { display: none; }

/* ---------- rails (horizontal scroll rows) ---------- */
.rail { margin: 30px 0 4px; }
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rail-head h2 { margin: 0; font-size: 20px; }
.rail-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.rail-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.see-all { color: var(--ink-2); font-size: 13.5px; font-weight: 600; padding: 6px 10px; border-radius: 9px; white-space: nowrap; }
.see-all:hover { background: var(--surface); color: var(--ink); }
.rail-btn { display: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.rail-btn:hover:not(:disabled) { background: var(--surface-2); }
.rail-btn:disabled { opacity: .3; cursor: default; }
.rail.no-scroll .rail-btn { display: none !important; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }

/* ---------- chips row (categories / cities) ---------- */
.chips-row { display: flex; gap: 8px; overflow-x: auto; margin: 18px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 4px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; transition: background .15s, border-color .15s; }
.chip em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on em { color: #4b5568; }

/* ---------- home ---------- */
.home-intro { padding: 22px 0 16px; display: grid; gap: 16px; }
.home-intro h1 { font-size: clamp(28px, 7vw, 48px); margin: 0 0 6px; font-weight: 800; letter-spacing: -.04em; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--ink-2); font-size: 14px; }
.stat-sun { color: var(--day); }
.hero-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 5px 5px 5px 14px; color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; padding: 8px 0; }
.hero-search button { border: 0; background: var(--brand); color: var(--brand-ink); font: 700 14px var(--font); border-radius: 10px; padding: 10px 16px; cursor: pointer; }
.hero-search button:hover { filter: brightness(1.08); }

.hero-mosaic { display: grid; gap: 12px; }
.hero-main { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--surface); margin: 0 calc(-1 * var(--gutter)); border-radius: 0; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.hero-main:hover img { transform: scale(1.03); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 13, 22, .45) 0%, transparent 28%, transparent 45%, rgba(9, 13, 22, .92) 100%); }
.hero-chips { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.hero-chips .chip-feat { margin-left: auto; }
.hero-text { color: #fff; position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.hero-place { color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 500; }
.hero-text strong { font: 800 clamp(20px, 5.5vw, 34px)/1.1 var(--font-d); letter-spacing: -.03em; }
.btn-watch { display: none; align-self: flex-start; margin-top: 8px; background: #fff; color: #0a0e17; font: 700 14px var(--font); padding: 10px 16px; border-radius: 11px; }
.hero-side { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-side::-webkit-scrollbar { display: none; }
.hero-side > * { scroll-snap-align: start; }
.card-compact .card-title { -webkit-line-clamp: 1; font-size: 14px; }
.card-compact .ph-t { display: none; }

.block { margin: 34px 0 0; }
.country-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.country-grid a { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-weight: 600; font-size: 14px; min-width: 0; }
.country-grid a span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-grid a:hover { border-color: var(--line-2); background: var(--surface-2); }
.country-grid em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; font-weight: 500; }
.flag-lg { font-size: 20px; line-height: 1; }

/* ---------- listing pages ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 16px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--ink); }
.page-head { margin: 4px 0 0; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(24px, 6vw, 38px); font-weight: 800; letter-spacing: -.035em; }
.chips-left { margin-top: 14px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 20px; }
.side-col { display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.minimap { height: 220px; border-radius: 10px; background: var(--surface-2); }
.pager { display: flex; gap: 6px; margin: 28px 0 0; flex-wrap: wrap; }
.pager a { min-width: 38px; text-align: center; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.pager a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.about { margin-top: 30px; color: var(--ink-2); max-width: 760px; }
.about h2 { color: var(--ink); font-size: 18px; margin: 0 0 8px; }
.about .crumbs { white-space: normal; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- camera page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; margin: 0 calc(-1 * var(--gutter)); overflow: hidden; }
.player iframe, .player video, .player > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.player:fullscreen > img { object-fit: contain; }
.jpeg-note { position: absolute; bottom: 10px; right: 10px; display: flex; align-items: center; background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px); color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 8px; }
.player-error::after { content: 'Stream temporarily unavailable'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .75); }
.watch-info { padding-top: 14px; }
.title-row { display: flex; flex-direction: column; gap: 12px; }
.title-row h1 { margin: 0; font-size: clamp(21px, 5.4vw, 30px); font-weight: 800; letter-spacing: -.03em; }
.actions { display: flex; gap: 8px; }
.act { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.act:hover { background: var(--surface-2); color: var(--ink); }
.act svg { width: 17px; height: 17px; }
.act[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: #2b1d00; }
.act[aria-pressed=true] svg { fill: currentColor; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.meta-row .chip-phase { background: var(--surface); border: 1px solid var(--line); padding: 5px 9px; }
.meta-link { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.meta-link:hover { color: var(--ink); border-color: var(--line-2); }
.weather-chip { display: none; font-size: 13px; color: var(--ink-2); padding: 4px 4px; }
.weather-chip.on { display: inline-flex; }
.sponsor-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(90deg, rgba(255, 197, 66, .14), rgba(255, 197, 66, .04)); border: 1px solid rgba(255, 197, 66, .35); border-radius: var(--radius); padding: 14px 16px; margin-top: 18px; }
.sponsor-box small { display: block; color: var(--gold); font-weight: 600; font-size: 12px; }
.sponsor-box strong { font-family: var(--font-d); }
.btn { display: inline-block; background: var(--ink); color: var(--bg); padding: 9px 15px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.btn-ghost { display: inline-block; border: 1px solid var(--line-2); padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--surface); }
.watch-side { display: flex; flex-direction: column; gap: 16px; }
.upnext h2 { font-size: 17px; margin: 0 0 12px; }
.un-item { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 11px; padding: 6px; margin: 0 -6px; border-radius: 12px; }
.un-item:hover { background: var(--surface); }
.un-img { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface); }
.un-img img { width: 100%; height: 100%; object-fit: cover; }
.un-img .chip-phase { position: absolute; bottom: 5px; left: 5px; padding: 3px 5px; }
.un-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.un-txt strong { font: 600 14px/1.3 var(--font-d); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.un-txt small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* weather panel */
.w-main { display: flex; align-items: center; gap: 12px; }
.w-ico { font-size: 38px; line-height: 1; }
.w-temp { font: 800 38px/1 var(--font-d); letter-spacing: -.04em; }
.w-txt { display: flex; flex-direction: column; font-weight: 600; }
.w-txt small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.w-grid span { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.w-grid small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.skeleton { height: 70px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- affiliates ---------- */
.aff { margin-top: 22px; }
.aff h2 { margin: 0 0 12px; font-size: 18px; }
.aff-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.aff-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, transform .15s; }
.aff-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.aff-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.aff-item strong { display: block; font-size: 14px; line-height: 1.25; }
.aff-item small { color: var(--muted); font-size: 12.5px; }

/* ---------- ads ---------- */
.ad-slot { display: flex; justify-content: center; align-items: center; position: relative; }
.ad-slot:empty { display: none; }
.ad-filled { padding-top: 16px; }
.ad-filled::before { content: 'Advertisement'; position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #5d6880; }
.ad-leader { margin: 20px auto; max-width: 970px; }
.ad-top { margin: 12px auto 0; }
.ad-side { width: 100%; }
.ad-side.sticky { position: static; }
.ad-feed { grid-column: 1 / -1; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 10px 12px; }
.ad-slot img { border-radius: 8px; height: auto; max-width: 100%; }
.ad-slot a { display: block; max-width: 100%; }

/* ---------- map ---------- */
.map-page { margin-top: 2px; }
.map-filters { margin-top: 10px; }
.bigmap { height: calc(100svh - 190px); min-height: 420px; margin: 12px calc(-1 * var(--gutter)) 0; z-index: 1; background: var(--surface); }
/* dark-mode tiles without a paid provider */
.leaflet-tile-pane { filter: var(--map-filter); }
.leaflet-container { background: var(--map-bg); font-family: var(--font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 10px; }
.leaflet-bar a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: var(--topbar-bg) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.cam-pin span { display: grid; place-items: center; width: 32px; height: 32px; background: var(--surface); border: 2px solid var(--brand); border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); font-size: 15px; }
.pop img { width: 230px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; margin-bottom: 8px; }
.pop b { display: block; font-family: var(--font-d); } .pop small { color: var(--muted); }

/* ---------- footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 56px; padding: 36px 0 20px; color: var(--muted); }
.footer-in { display: grid; gap: 28px; }
.footer-brand p { max-width: 460px; font-size: 14px; }
.footer h4 { color: var(--ink); margin: 0 0 10px; font-size: 14px; }
.footer-in > div:not(.footer-brand) a { display: block; padding: 3px 0; font-size: 14px; }
.footer a:hover { color: var(--ink); }
.footer-legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); font-weight: 600; padding: 10px 16px; border-radius: 10px; z-index: 2000; transition: .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   ≥ 600px  — large phones / small tablets
   ========================================================= */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 16px; }
  .grid .ph-t { display: inline; }
  .rail-track { grid-auto-columns: 300px; gap: 16px; }
  .hero-side { grid-auto-columns: 280px; }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .aff-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .title-row { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .title-row h1 { flex: 1; }
  .actions { flex-shrink: 0; }
  .btn-watch { display: inline-block; }
}

/* =========================================================
   ≥ 900px — tablets landscape / laptops
   ========================================================= */
@media (min-width: 900px) {
  :root { --head-h: 64px; }
  .search { display: flex; }
  .search-toggle { display: none; }
  body.search-open .search { position: static; box-shadow: none; }
  .mainnav a span { display: inline; }
  .rail-btn { display: inline-grid; place-items: center; }
  .home-intro { padding: 30px 0 20px; }
  .home-intro .hero-search { display: none; }   /* header search is visible on desktop */
  .hero-mosaic { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
  .hero-main { margin: 0; border-radius: 20px; aspect-ratio: auto; min-height: 380px; }
  .hero-main img { position: absolute; inset: 0; }
  .hero-text { left: 26px; bottom: 24px; right: 26px; }
  .hero-chips { top: 18px; left: 18px; right: 18px; }
  .hero-side { grid-auto-flow: row; grid-template-columns: 1fr 1fr; grid-auto-columns: auto; margin: 0; padding: 0; overflow: visible; gap: 14px 14px; align-content: start; }
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
  .ad-side.sticky { position: sticky; top: calc(var(--head-h) + 60px); }
  .watch { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 20px; align-items: start; }
  .player { margin: 0; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
  .watch-side { position: sticky; top: calc(var(--head-h) + 52px); max-height: calc(100vh - var(--head-h) - 70px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
  .watch-side .ad-side.sticky { position: static; }
  .bigmap { margin: 12px 0 0; border-radius: 18px; height: calc(100vh - 230px); }
  .footer-in { grid-template-columns: 2fr 1fr 1fr; }
}

/* ≥ 1280px — wide desktop: 4–5 cards per row */
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail-track { grid-auto-columns: calc((100% - 4 * 16px) / 5); }
  .watch { grid-template-columns: minmax(0, 1fr) 380px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- theme toggle ---------- */
.theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; } :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; } }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
html.theme-anim, html.theme-anim * { transition: background-color .25s, color .25s, border-color .25s !important; }

/* ---------- rich page text (descriptions with auto-links) ---------- */
.prose { line-height: 1.7; }
.prose h2 { font-size: 19px; margin: 22px 0 8px; color: var(--ink); }
.prose h3 { font-size: 16px; margin: 18px 0 6px; color: var(--ink); }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.see-more { color: var(--accent); font-weight: 600; }
.h1-icon { margin-right: 10px; }
.chips-block { margin-top: 14px; }
.chips-title { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.chips-block .chips-row { margin-top: 6px; }
.faq { margin-top: 28px; max-width: 760px; }
.faq h2 { font-size: 18px; margin: 0 0 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }

/* ---------- live conditions (snow report / waves) ---------- */
.cond h3 { display: flex; align-items: center; gap: 8px; }
.cond[data-kind=snow] h3::before { content: '❄'; color: var(--accent); }
.cond[data-kind=marine] h3::before { content: '≋'; color: var(--accent); font-weight: 800; }
.cond-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cond-stat { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.cond-stat b { display: block; font: 700 17px/1.2 var(--font-d); color: var(--ink); white-space: nowrap; }
.cond-stat small { color: var(--muted); font-size: 11.5px; }
.cond-bars { display: flex; gap: 6px; align-items: flex-end; margin-top: 14px; height: 86px; }
.cb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.cb i { display: block; width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.cb.fc i { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 45%, transparent) 0 4px, color-mix(in srgb, var(--accent) 20%, transparent) 4px 8px); }
.cb.today i { background: var(--accent); }
.cb small { font-size: 11px; color: var(--muted); }
.cb.today small { color: var(--ink); font-weight: 700; }
.cb-v { font-size: 10px; color: var(--ink-2); white-space: nowrap; }
.cond-src { font-size: 11px; margin: 10px 0 0; }
.meta-row .chip-phase { background: var(--surface-2); color: var(--ink); backdrop-filter: none; border: 1px solid var(--line); }

/* ---------- service pages & forms ---------- */
.static-page { max-width: 760px; }
.static-page .prose { color: var(--ink-2); margin-top: 8px; }
.static-page .prose strong { color: var(--ink); }
.site-form { display: grid; gap: 14px; margin: 26px 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.site-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.site-form label small { font-weight: 400; color: var(--muted); }
.site-form input, .site-form textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; width: 100%; }
.site-form input:focus, .site-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.f-row { display: grid; gap: 14px; }
@media (min-width: 600px) { .f-row { grid-template-columns: 1fr 1fr; } }
.btn-primary { justify-self: start; border: 0; background: var(--brand); color: #fff; font: 700 15px var(--font); padding: 11px 22px; border-radius: 11px; cursor: pointer; }
.btn-primary:hover { filter: brightness(1.08); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: 12px; margin: 14px 0; font-weight: 600; }
.notice.ok { background: color-mix(in srgb, #12a150 16%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, #12a150 40%, transparent); }
.notice.err { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.contact-card p { margin: 6px 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center; }
.footer-pages { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-pages a:hover { color: var(--ink); }

/* ---------- map clusters ---------- */
.cam-cluster { display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--brand) 30%, transparent); }
.cam-cluster span { display: grid; place-items: center; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; background: var(--brand); color: #fff; font: 800 13px var(--font-d); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { transition: transform .3s ease-out, opacity .3s ease-in; }
.side-map .minimap { height: 300px; }
.side-map h3 { display: flex; justify-content: space-between; align-items: baseline; }
.side-map h3 a { font: 600 13px var(--font); color: var(--accent); }
/* empty ad slots take no space; a sidebar with nothing in it disappears */
.side-col .ad-slot:not(.ad-filled) { display: none; }
@media (min-width: 900px) {
  .layout:not(:has(.side-col > :not(.ad-slot:not(.ad-filled)))) { grid-template-columns: minmax(0, 1fr); }
  .layout:not(:has(.side-col > :not(.ad-slot:not(.ad-filled)))) .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
