/* ==========================================================================
   SIGNAL | Modern Google Material Design 3 UI System
   Crisp Light Mode (Default) + Optional Dark Mode
   ========================================================================== */

:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --surface-3: #e8eaed;
  --surface-hover: #f1f3f4;
  --border: #dadce0;
  --border-subtle: #e8eaed;

  --text: #202124;
  --text-secondary: #5f6368;
  --text-muted: #70757a;

  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-soft: #e8f0fe;
  --primary-ink: #174ea6;

  --live: #d93025;
  --live-hover: #b31412;
  --live-soft: #fce8e6;
  --live-ink: #a50e0e;

  --green: #188038;
  --green-soft: #e6f4ea;
  --green-ink: #137333;

  --amber: #e37400;
  --amber-soft: #fef7e0;
  --amber-ink: #b06000;

  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(60, 64, 67, 0.08);
  --shadow-sm: 0 1px 3px rgba(60, 64, 67, 0.12), 0 1px 2px rgba(60, 64, 67, 0.08);
  --shadow-md: 0 4px 12px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08);
  --shadow-lg: 0 12px 32px rgba(60, 64, 67, 0.16), 0 2px 6px rgba(60, 64, 67, 0.08);

  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --map-bg: #eef4fc;
  --map-land: #ffffff;
  --map-stroke: #c6dafc;
  --map-grid: rgba(26, 115, 232, 0.09);
}

html[data-theme="dark"] {
  --bg: #0b101b;
  --surface: #171c26;
  --surface-2: #282a2c;
  --surface-3: #333537;
  --surface-hover: #2d2f31;
  --border: #3c4043;
  --border-subtle: #2d2f31;

  --text: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #80868b;

  --primary: #8ab4f8;
  --primary-hover: #aecbfa;
  --primary-soft: rgba(138, 180, 248, 0.15);
  --primary-ink: #aecbfa;

  --live: #f28b82;
  --live-hover: #ee675c;
  --live-soft: rgba(242, 139, 130, 0.16);
  --live-ink: #f6aea9;

  --green: #81c995;
  --green-soft: rgba(129, 201, 149, 0.16);
  --green-ink: #81c995;

  --amber: #fdd663;
  --amber-soft: rgba(253, 214, 99, 0.15);
  --amber-ink: #fde293;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  --map-bg: #17191c;
  --map-land: #26292e;
  --map-stroke: #3c4043;
  --map-grid: rgba(138, 180, 248, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
}

body {
  min-height: 100vh;
  position: relative;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

#app {
  overflow-x: clip;
  max-width: 100%;
}

/* Layered Ambient Aurora Mesh + Subtle Signal Dot Grid Background */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    radial-gradient(ellipse 68% 54% at 10% -6%, rgba(26, 115, 232, 0.22) 0%, rgba(26, 115, 232, 0.06) 45%, transparent 72%),
    radial-gradient(ellipse 58% 48% at 92% 4%, rgba(6, 182, 212, 0.18) 0%, rgba(56, 189, 248, 0.05) 48%, transparent 74%),
    radial-gradient(ellipse 52% 46% at 18% 58%, rgba(99, 102, 241, 0.11) 0%, transparent 70%),
    radial-gradient(ellipse 56% 50% at 88% 92%, rgba(244, 63, 94, 0.09) 0%, rgba(245, 158, 11, 0.05) 42%, transparent 72%),
    linear-gradient(160deg, #f3f7fe 0%, #f8fafc 48%, #f1f5fb 100%);
  transform: translateZ(0);
  animation: bgAuroraFloat 22s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  background-image: radial-gradient(rgba(26, 115, 232, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 92% 82% at 50% 24%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 92% 82% at 50% 24%, #000 35%, transparent 100%);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 68% 55% at 12% -8%, rgba(59, 130, 246, 0.26) 0%, rgba(37, 99, 235, 0.08) 46%, transparent 74%),
    radial-gradient(ellipse 58% 48% at 90% 6%, rgba(6, 182, 212, 0.20) 0%, rgba(14, 165, 233, 0.05) 48%, transparent 74%),
    radial-gradient(ellipse 55% 48% at 16% 62%, rgba(124, 58, 237, 0.16) 0%, transparent 72%),
    radial-gradient(ellipse 54% 48% at 88% 94%, rgba(244, 63, 94, 0.12) 0%, transparent 70%),
    linear-gradient(160deg, #0b101b 0%, #101522 50%, #0d121d 100%);
}

html[data-theme="dark"] body::after {
  background-image: radial-gradient(rgba(138, 180, 248, 0.16) 1px, transparent 1px);
}

@keyframes bgAuroraFloat {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.04) translate3d(-1%, 1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }

.icon-svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.icon-svg.sm { width: 14px; height: 14px; }
.icon-svg.lg { width: 20px; height: 20px; }

img.country-flag {
  width: 18px !important;
  height: 13px !important;
  object-fit: cover !important;
  border-radius: 3px;
  display: inline-block !important;
  vertical-align: -2px;
  margin-right: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

img.country-flag.lg {
  width: 22px !important;
  height: 16px !important;
  border-radius: 4px;
  vertical-align: -3px;
}

/* ==========================================================================
   LOCAL AUTO-LOCATION WEATHER, AIR QUALITY & WIND UTILITY TOP BAR
   ========================================================================== */
.env-topbar {
  position: relative;
  z-index: 90;
  background: linear-gradient(90deg, #0f172a 0%, #152238 55%, #0f172a 100%);
  color: #e2e8f0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.76rem;
}

html[data-theme="dark"] .env-topbar {
  background: linear-gradient(90deg, #080d18 0%, #111827 55%, #080d18 100%);
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.env-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 24px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.env-items {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.env-items::-webkit-scrollbar {
  display: none;
}

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #e2e8f0;
}

.env-pill strong {
  color: #ffffff;
  font-weight: 600;
}

.env-pill-muted {
  color: #94a3b8;
}

.env-lbl {
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.env-sub {
  color: #cbd5e1;
  font-size: 0.74rem;
}

.env-humidity {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #93c5fd;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.env-humidity svg {
  width: 12px;
  height: 12px;
}

.env-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.env-ico svg {
  width: 13px;
  height: 13px;
}

.env-ico-loc { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }
.env-ico-weather { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.env-ico-wind { background: rgba(6, 182, 212, 0.22); color: #67e8f9; }
.env-ico-aqi.aqi-good { background: rgba(34, 197, 94, 0.22); color: #86efac; }
.env-ico-aqi.aqi-moderate { background: rgba(250, 204, 21, 0.22); color: #fde047; }
.env-ico-aqi.aqi-sensitive { background: rgba(249, 115, 22, 0.24); color: #fdba74; }
.env-ico-aqi.aqi-poor { background: rgba(239, 68, 68, 0.24); color: #fca5a5; }

.env-aqi-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.env-aqi-dot.aqi-good { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.28); }
.env-aqi-dot.aqi-moderate { background: #facc15; box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.28); }
.env-aqi-dot.aqi-sensitive { background: #f97316; box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.28); }
.env-aqi-dot.aqi-poor { background: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28); }

.env-auto-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
  border: 1px solid rgba(147, 197, 253, 0.25);
}

.env-sep {
  width: 1px;
  height: 14px;
  background: rgba(148, 163, 184, 0.25);
  flex-shrink: 0;
}

.env-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.env-unit-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.env-unit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.env-map-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.24);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.env-map-link:hover {
  background: #1a73e8;
  color: #ffffff;
}

.env-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.env-quick-temp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.78rem;
}

.env-more-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.env-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.env-more-btn:hover,
.env-more-wrap.open .env-more-btn {
  background: #1a73e8;
  border-color: #60a5fa;
  color: #ffffff;
}

.env-more-caret {
  transition: transform 0.18s ease;
}

.env-more-wrap.open .env-more-caret {
  transform: rotate(180deg);
}

.env-more-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(560px, calc(100vw - 24px));
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.env-more-wrap.open .env-more-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.env-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.env-panel-loc {
  display: flex;
  align-items: center;
  gap: 8px;
}

.env-panel-loc div {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.env-panel-loc strong {
  font-family: var(--font-display);
  font-size: 0.94rem;
  color: var(--text);
}

.env-panel-loc small {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.env-gps-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.14s ease;
}

.env-gps-btn:hover {
  filter: brightness(0.95);
}

.env-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.env-metric-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.env-metric-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.env-metric-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.env-metric-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.env-metric-extra {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.env-city-search-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.env-city-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.env-city-search-ico {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  display: inline-flex;
  pointer-events: none;
}

.env-city-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
}

.env-city-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.env-city-results {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.env-city-option {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}

.env-city-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.env-city-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 8px;
}

@media (max-width: 780px) {
  .env-topbar-inner {
    padding: 5px 10px;
    gap: 6px;
    min-height: 36px;
    flex-wrap: nowrap;
  }
  .env-left-group {
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }
  .env-pill-loc {
    min-width: 0;
    overflow: hidden;
  }
  .env-pill-loc strong {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .env-city-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .env-country-suffix {
    display: none;
  }
  .env-ico {
    width: 20px;
    height: 20px;
  }
  .env-quick-temp {
    font-size: 0.74rem;
    gap: 4px;
    flex-shrink: 0;
  }
  .env-more-btn {
    padding: 3px 8px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }
  .env-more-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 42px;
    width: auto;
    max-height: calc(100dvh - 54px);
    overflow-y: auto;
    padding: 14px;
  }
  .env-metrics-grid {
    grid-template-columns: 1fr;
  }
  .env-map-link {
    display: none;
  }
}

/* ==========================================================================
   TOP NAVIGATION BAR (Google Material 3 App Bar)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary-ink);
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: visible;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger .nav-caret {
  transition: transform 0.18s ease;
  margin-left: -2px;
}

.nav-dropdown.open .nav-dropdown-trigger {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-dropdown.open .nav-dropdown-trigger.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.nav-dropdown.open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 248px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  pointer-events: none;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-dropdown-item:hover {
  background: var(--surface-hover);
}

.nav-dropdown-item.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.nav-dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-dropdown-item.active .nav-dropdown-icon {
  background: var(--surface);
  color: var(--primary-ink);
}

.nav-dropdown-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nav-dropdown-text strong {
  font-size: 0.87rem;
  font-weight: 600;
}

.nav-dropdown-text small {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-btn.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-weight: 600;
}

.nav-btn.nav-live {
  background: var(--live-soft);
  color: var(--live-ink);
  font-weight: 600;
}

.nav-btn.nav-live:hover {
  background: var(--live);
  color: #ffffff;
}

.nav-btn.nav-admin {
  color: var(--amber-ink);
}
.nav-btn.nav-admin.active {
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-actions .user-pill span:last-child {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1320px) and (min-width: 769px) {
  .topbar-inner {
    padding: 0 14px;
    gap: 10px;
  }
  .brand-badge {
    display: none;
  }
  .brand-wordmark {
    font-size: 1.12rem;
  }
  .nav-btn {
    padding: 7px 10px;
    font-size: 0.82rem;
    gap: 5px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .topbar-actions .user-pill span:last-child {
    max-width: 88px;
  }
  .topbar-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 1060px) and (min-width: 769px) {
  .nav-btn {
    padding: 6px 8px;
    font-size: 0.78rem;
  }
  .nav-btn .icon-svg:not(.nav-caret) {
    display: none;
  }
  .topbar-actions .user-pill span:last-child {
    display: none;
  }
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.user-pill:hover { background: var(--surface-3); }

.avatar-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

/* ==========================================================================
   BUTTONS (Material 3 Filled / Tonal / Outlined)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.btn:hover {
  background: var(--surface-hover);
  box-shadow: var(--shadow-xs);
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
}
html[data-theme="dark"] .btn-primary { color: #062e6f; }
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-tonal {
  background: var(--primary-soft);
  color: var(--primary-ink);
  border-color: transparent;
  font-weight: 600;
}
.btn-tonal:hover { filter: brightness(0.96); }

.btn-live {
  background: #d93025;
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
}
.btn-live:hover {
  background: #b31412;
  box-shadow: 0 2px 10px rgba(217, 48, 37, 0.28);
}

.btn-success {
  background: var(--green-soft);
  color: var(--green-ink);
  border-color: transparent;
  font-weight: 600;
}

.btn-danger {
  background: var(--live-soft);
  color: var(--live-ink);
  border-color: transparent;
  font-weight: 600;
}
.btn-danger:hover {
  background: #d93025;
  color: #ffffff;
}

.btn-amber {
  background: var(--amber-soft);
  color: var(--amber-ink);
  border-color: transparent;
  font-weight: 600;
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-xs { padding: 5px 10px; font-size: 0.74rem; }

/* ==========================================================================
   MAIN LAYOUT & TYPOGRAPHY
   ========================================================================== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  min-height: calc(100vh - 130px);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.muted { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }

/* ==========================================================================
   HERO SECTION (Google Clean Showcase)
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-player-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #0d1117;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  border: 1.5px solid rgba(245, 180, 0, 0.52);
  box-shadow: 0 6px 22px rgba(245, 180, 0, 0.12), var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-player-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 180, 0, 0.78);
  box-shadow: 0 12px 32px rgba(245, 180, 0, 0.18), var(--shadow-lg);
}

.hero-player-card > canvas,
.hero-player-card > img,
.hero-player-card > video,
.hero-player-card > iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 38%, rgba(0, 0, 0, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px;
  color: #ffffff;
}

.hero-slider-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.78);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px);
}

.hero-slide-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.hero-slide-dot:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-slide-dot.active {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #ffffff;
  transform: scale(1.08);
}

.hero-slide-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-slide-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.plan-card.pro {
  border-color: var(--primary);
  box-shadow: 0 8px 26px rgba(26, 115, 232, 0.14);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--surface) 42%);
}

.hero-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.hero-side h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-side h1 span { color: var(--primary); }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi-box {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.kpi-lbl {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-live {
  background: #d93025;
  color: #ffffff;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.badge-offline {
  background: var(--surface-2);
  color: var(--text-secondary);
}

.badge-cyan {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.badge-green {
  background: var(--green-soft);
  color: var(--green-ink);
}

.badge-amber {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.badge-red {
  background: var(--live-soft);
  color: var(--live-ink);
}

.badge-dark {
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.badge-featured-gold {
  background: rgba(20, 24, 36, 0.82);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.48);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   SEARCH & FILTER BAR (Google Pill Search + Chips)
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrap .input {
  width: 100%;
  padding-left: 40px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border-color: transparent;
}

.search-wrap .input:focus {
  background: var(--surface);
  border-color: var(--primary);
}

.input, select.input, textarea.input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.chip.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
  border-color: transparent;
  font-weight: 600;
}

/* ==========================================================================
   CAMERA GRID (YouTube / Google TV Clean Cards)
   ========================================================================== */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 305px), 1fr));
  gap: 20px;
}

.cam-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cam-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.cam-card.is-featured {
  border: 1.5px solid rgba(245, 180, 0, 0.5);
  box-shadow: 0 4px 18px rgba(245, 180, 0, 0.1), var(--shadow-xs);
}

.cam-card.is-featured:hover {
  border-color: rgba(245, 180, 0, 0.78);
  box-shadow: 0 10px 26px rgba(245, 180, 0, 0.16), var(--shadow-md);
}

.cam-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  overflow: hidden;
}

.cam-thumb > canvas,
.cam-thumb > img,
.cam-thumb > video,
.cam-thumb > iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cam-aerial-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.cam-card:hover .cam-aerial-img,
.hero-player-card:hover .cam-aerial-img {
  transform: scale(1.06);
}

.cam-thumb-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.cam-thumb-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 12px 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 500;
  color: #ffffff;
}

.cam-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.cam-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.cam-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   INTERACTIVE WORLD MAP (Real Google Maps Layer + Material 3 Controls)
   ========================================================================== */
.map-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 0;
  box-shadow: var(--shadow-md);
}

.real-map-canvas {
  width: 100%;
  height: 560px;
  background: #e5e3df;
}

.leaflet-pane.leaflet-popup-pane {
  z-index: 1100 !important;
}

.picker-map-canvas {
  width: 100%;
  height: 290px;
  z-index: 1;
  background: #e5e3df;
}

.map-floating-controls {
  position: absolute;
  top: 14px;
  left: 54px;
  z-index: 450;
  display: flex;
  gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.map-layer-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.map-layer-btn:hover { color: var(--text); background: var(--surface-hover); }
.map-layer-btn.active { background: var(--primary); color: #ffffff; }

.map-floating-right {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 450;
  display: flex;
  gap: 8px;
}

.gmap-live-pin {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gmap-live-pin .pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d93025;
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.gmap-live-pin.offline .pin-dot {
  background: #5f6368;
}

.gmap-live-pin.picker .pin-dot {
  width: 16px;
  height: 16px;
  background: #1a73e8;
}

.gmap-live-pin .pin-ring {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(217, 48, 37, 0.35);
  animation: gmapPulse 1.9s infinite ease-out;
}

.gmap-live-pin.picker .pin-ring {
  background: rgba(26, 115, 232, 0.35);
}

@keyframes gmapPulse {
  0% { transform: scale(0.5); opacity: 0.95; }
  100% { transform: scale(1.9); opacity: 0; }
}

.leaflet-popup-content-wrapper {
  border-radius: 18px !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.28) !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}

.leaflet-popup-tip {
  background: var(--surface) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 312px !important;
  font-family: var(--font-sans) !important;
}

.leaflet-container a.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  width: 26px !important;
  height: 26px !important;
  line-height: 24px !important;
  border-radius: 50% !important;
  background: rgba(15, 23, 42, 0.72) !important;
  color: #ffffff !important;
  z-index: 10 !important;
  font-size: 16px !important;
}

.map-popup-video-wrap {
  position: relative;
  width: 100%;
  height: 176px;
  background: #0a0e17;
  overflow: hidden;
  cursor: pointer;
}

.map-popup-video-wrap img.popup-live-media,
.map-popup-video-wrap video.popup-live-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: liveCamPan 14s ease-in-out infinite alternate;
  transform-origin: center center;
}

@keyframes liveCamPan {
  0% { transform: scale(1.04) translate(0%, 0%); }
  50% { transform: scale(1.14) translate(-2.5%, -1.5%); }
  100% { transform: scale(1.08) translate(2.5%, 1.5%); }
}

.map-popup-hud-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.map-popup-hud-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 12px 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.84));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #e2e8f0;
  pointer-events: none;
}

.map-popup-play-pill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  background: rgba(0, 0, 0, 0.25);
}

.map-popup-video-wrap:hover .map-popup-play-pill {
  opacity: 1;
}

.map-popup-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.world-map-svg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

/* ==========================================================================
   WATCH ROOM & LIVE CHAT
   ========================================================================== */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 22px;
  align-items: start;
}

.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b0f17;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.player-stage video,
.player-stage canvas,
.player-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.player-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 6;
}

.player-brand-watermark {
  position: absolute;
  right: 16px;
  bottom: 60px;
  z-index: 7;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  background: rgba(11, 16, 27, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  color: #ffffff;
  user-select: none;
}

.player-wm-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.player-wm-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.85);
  color: #ffffff;
}

@media (max-width: 520px) {
  .player-brand-watermark {
    right: 10px;
    bottom: 48px;
    padding: 4px 8px 4px 6px;
  }
  .player-wm-name {
    font-size: 0.7rem;
  }
  .player-wm-tag {
    display: none;
  }
}

.live-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 28px 16px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 7, 15, 0.88) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-edge-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  position: relative;
  overflow: hidden;
}

.live-edge-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #1a73e8 0%, #d93025 100%);
}

.live-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
}

.live-ctrl-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}

.live-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.player-reactions-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-emoji {
  position: absolute;
  bottom: 24px;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: #202124;
  box-shadow: var(--shadow-sm);
  animation: floatUp 2.1s ease-out forwards;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  100% { transform: translateY(-210px) scale(1.1); opacity: 0; }
}

.watch-info-card {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.chat-panel {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
  padding: 7px 11px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.chat-author { font-weight: 600; margin-right: 6px; }
.chat-author.role-admin { color: var(--amber-ink); }
.chat-author.role-broadcaster { color: var(--primary); }
.chat-author.role-user { color: var(--green-ink); }
.chat-author.role-guest { color: var(--text-secondary); }

.chat-form {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  background: var(--surface);
}

/* ==========================================================================
   USER PANEL & ADMIN PANEL (Google Cloud Console / Workspace Style)
   ========================================================================== */
.panel-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 22px;
  align-items: start;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 84px;
  box-shadow: var(--shadow-xs);
}

.side-tab {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
}

.side-tab-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.side-tab:hover { background: var(--surface-hover); color: var(--text); }
.side-tab.active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }

/* BROADCAST STUDIO */
.studio-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
}

.studio-monitor {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
}

.studio-monitor.on-air {
  border-color: #d93025;
  box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.18);
}

.studio-monitor video,
.studio-monitor canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vu-meter {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.vu-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #188038, #f9ab00, #d93025);
  transition: width 0.08s linear;
}

.code-box {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* DATA TABLES */
.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table th {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--surface-2);
}
.data-table th:first-child { border-radius: 10px 0 0 10px; }
.data-table th:last-child { border-radius: 0 10px 10px 0; }
.data-table tr:hover td { background: var(--surface-hover); }

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(32, 33, 36, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-card.wide { max-width: 740px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-head h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.35rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--surface-hover); }

/* TOASTS (Google Snackbar) */
.toast-root {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #202124;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
}

.toast.error { background: #b31412; }
.toast.success { background: #137333; }

@keyframes slideIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* FOOTER: Shared Single-Source Multi-Column Component */
.footer {
  margin-top: 32px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text-secondary);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(170px, 1fr));
  gap: 32px 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  width: fit-content;
}

.footer-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 42ch;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.footer-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 24%, transparent);
  flex-shrink: 0;
}

.footer-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-tech-badges span {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a,
.footer-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--primary);
}

.footer-links a.active {
  color: var(--primary);
  font-weight: 600;
}

/* Official Footer Partners Strip */
.footer-partners {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.footer-partners-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.footer-partners-label svg {
  color: var(--primary);
}

.footer-partners-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.partner-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #0f2b4c;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.partner-logo-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.partner-ohrid-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.partner-ohrid-wordmark {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 500;
  color: #0f2b4c;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.partner-ohrid-wordmark strong {
  font-weight: 800;
}

.partner-logo-picture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.partner-logo-img {
  display: block;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.partner-logo-taxiohrid {
  height: 26px;
}

.partner-card-koditek {
  padding: 6px 14px;
}

.partner-logo-koditek {
  height: 76px;
  width: 112px;
  max-width: 112px;
  object-fit: cover;
  object-position: center;
}

html[data-theme="dark"] .partner-logo-card {
  background: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .partner-logo-card:hover {
  background: #ffffff;
  border-color: var(--primary);
}

@media (max-width: 640px) {
  .footer-partners {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 0;
    gap: 12px;
  }

  .footer-partners-logos {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }

  .partner-logo-card {
    width: 100%;
    padding: 6px 10px;
    height: 44px;
  }

  .partner-ohrid-mark {
    width: 26px;
    height: 26px;
  }

  .partner-ohrid-wordmark {
    font-size: 0.86rem;
  }

  .partner-logo-taxiohrid {
    height: 22px;
  }

  .partner-logo-koditek {
    height: 64px;
    width: 96px;
  }
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.footer-mail:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.footer-top-btn:hover {
  background: var(--primary-soft);
  color: var(--primary-ink);
  border-color: var(--primary);
}

/* ==========================================================================
   SHARE MODAL HELPERS & MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.share-networks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.copy-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   RESPONSIVE & MOBILE OPTIMIZATION
   ========================================================================== */
button, a, .chip, .cam-card, .hero-player-card, .user-pill {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.table-wrap {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1080px) {
  .hero-grid,
  .watch-layout,
  .studio-grid,
  .panel-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-grid > *,
  .watch-layout > *,
  .studio-grid > *,
  .panel-layout > *,
  .world-map-shell > *,
  .news-hero-card > * {
    min-width: 0;
    max-width: 100%;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .side-tab { width: auto; white-space: nowrap; flex-shrink: 0; }
  .chat-panel { height: 430px; }
}

@media (max-width: 768px) {
  /* Battery & GPU friendly static aurora on mobile */
  body::before {
    animation: none;
  }

  /* Prevent iOS Safari zoom on input focus */
  .input,
  select.input,
  textarea.input {
    font-size: 16px;
  }

  .topbar {
    overflow-x: clip;
  }

  /* Slim single-row mobile topbar (nav moves to thumb-friendly bottom bar) */
  .topbar-inner {
    height: 56px;
    padding: 0 12px;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
  }

  .main-nav {
    display: none;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-wordmark {
    font-size: 1.06rem;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 6px;
    flex-shrink: 0;
  }

  .topbar-actions .icon-btn {
    width: 34px;
    height: 34px;
  }

  .topbar-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  .topbar-actions .user-pill {
    padding: 3px 10px 3px 3px;
    gap: 6px;
  }

  .topbar-actions .user-pill span:last-child {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Fixed frosted-glass mobile bottom navigation bar */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
  }

  .mob-nav-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 14px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .mob-nav-btn .icon-svg {
    width: 19px;
    height: 19px;
  }

  .mob-nav-btn.active {
    background: var(--primary-soft);
    color: var(--primary-ink);
  }

  .mob-nav-btn.mob-nav-live {
    background: var(--live-soft);
    color: var(--live-ink);
  }

  .mob-nav-btn.mob-nav-live:active {
    background: var(--live);
    color: #ffffff;
  }

  .main-content {
    padding: 14px 12px 28px;
  }

  .section-title {
    font-size: 1.28rem;
  }

  /* Hero section */
  .hero-grid {
    gap: 16px;
    margin-bottom: 18px;
  }

  .hero-side {
    padding: 18px;
    gap: 14px;
    border-radius: var(--radius-lg);
  }

  .hero-side h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .kpi-strip {
    gap: 8px;
  }

  .kpi-box {
    padding: 11px 12px;
    border-radius: var(--radius-md);
  }

  .kpi-val {
    font-size: 1.22rem;
  }

  /* Filter bar with horizontally scrollable chips */
  .filter-bar {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 18px;
    border-radius: var(--radius-lg);
  }

  .search-wrap {
    min-width: 100%;
  }

  #region-select {
    flex: 1 1 150px;
    min-width: 0;
  }

  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .chip-row::-webkit-scrollbar { display: none; }

  .chip {
    flex-shrink: 0;
    padding: 7px 13px;
    font-size: 0.8rem;
  }

  /* Forms & Panels */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
  }

  .card-title {
    font-size: 1rem;
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .plan-cards-grid {
    grid-template-columns: 1fr;
  }

  /* World Map */
  .real-map-canvas {
    height: 60vh;
    min-height: 360px;
    max-height: 480px;
  }

  .map-card {
    border-radius: var(--radius-lg);
  }

  .map-floating-controls {
    top: 10px;
    left: 50px;
    right: 10px;
    width: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .map-floating-controls::-webkit-scrollbar { display: none; }

  .map-layer-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .map-floating-right {
    top: auto;
    bottom: 14px;
    right: 10px;
  }

  /* Watch Room */
  .player-stage {
    border-radius: var(--radius-lg);
  }

  .watch-info-card {
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .watch-info-card h1 {
    font-size: 1.2rem !important;
  }

  .chat-panel {
    height: 380px;
    border-radius: var(--radius-lg);
  }

  /* Tables */
  .data-table th,
  .data-table td {
    padding: 9px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Modals & Toasts */
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-card {
    padding: 18px;
    border-radius: 20px;
    max-height: 88dvh;
  }

  .toast-root {
    left: 12px;
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    width: 100%;
    text-align: center;
  }

  /* Footer with clearance for fixed mobile bottom nav */
  .footer-container {
    padding: 28px 16px calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-badge {
    display: none;
  }

  /* Compact avatar-only user pill on phones so topbar never overflows */
  .topbar-actions .user-pill {
    padding: 2px;
    gap: 0;
  }

  .topbar-actions .user-pill span:last-child {
    display: none;
  }

  .share-networks-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .copy-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .main-content {
    padding: 12px 10px 36px;
  }

  /* Prevent hero overlay text from clipping on narrow phones */
  .hero-player-card {
    aspect-ratio: 4 / 3;
    min-height: 255px;
    border-radius: var(--radius-lg);
  }

  .hero-overlay {
    padding: 12px 14px;
  }

  .hero-overlay h2 {
    font-size: 1.12rem !important;
    line-height: 1.25;
  }

  .hero-overlay .badge {
    padding: 3px 8px;
    font-size: 0.66rem;
  }

  .hero-slider-controls {
    gap: 4px;
    padding: 3px 6px;
  }

  .hero-slide-dot,
  .hero-slide-arrow {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  /* Single column clean camera cards */
  .camera-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Compact watch player HUD & controls */
  .player-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
  }

  #watch-telemetry,
  #watch-live-utc {
    display: none;
  }

  .live-player-controls {
    padding: 18px 10px 8px;
  }

  .live-controls-row {
    gap: 6px;
  }

  .live-ctrl-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  /* Leaflet map popup width on small screens */
  .leaflet-popup-content {
    width: min(272px, calc(100vw - 56px)) !important;
  }

  .map-popup-video-wrap {
    height: 144px;
  }
}


/* ==========================================================================
   Institutional, Legal, Contact Pages & Cookie Consent Banner
   ========================================================================== */
.legal-page {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 24px;
}

.legal-hero {
  padding: 28px 30px;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-ink);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.legal-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.2;
}

.legal-subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 76ch;
}

.legal-meta {
  margin-top: 12px;
  font-size: 0.85rem;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-section {
  padding: 24px 28px;
  line-height: 1.7;
}

.legal-section h2 {
  margin: 22px 0 8px;
  font-size: 1.2rem;
  color: var(--text);
}

.legal-section h2:first-child {
  margin-top: 0;
}

.legal-section h3 {
  margin: 16px 0 6px;
  font-size: 1.02rem;
}

.legal-section p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-section a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.legal-stat {
  padding: 20px;
  text-align: center;
}

.legal-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.contact-list {
  list-style: none;
  padding-left: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-nav {
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  font-size: 0.9rem;
}

.legal-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.legal-nav a:hover {
  text-decoration: underline;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 960px;
  margin: 0 auto;
  z-index: 1200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
  flex: 1 1 320px;
}

.cookie-banner-text a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 780px) {
  .contact-grid,
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
  .legal-hero,
  .legal-section {
    padding: 18px;
  }
  .cookie-banner {
    bottom: 72px;
  }
}


/* ==========================================================================
   Editorial Guides & Homepage FAQ Section (SEO & AdSense Publisher Content)
   ========================================================================== */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.guide-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.1);
}

.guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-card-title {
  margin: 4px 0 0;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--text);
}

.guide-card-summary {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.guide-card-footer a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
}

.guide-card-footer a:hover {
  text-decoration: underline;
}

.home-editorial {
  margin-top: 28px;
  padding: 26px 28px;
}

.home-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.home-editorial h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.home-editorial p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.65;
}

.home-editorial a {
  color: var(--primary);
  text-decoration: underline;
}

.faq-list h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.faq-list details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--surface-2);
}

.faq-list summary {
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
}

.faq-list details p {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 820px) {
  .home-editorial-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .home-editorial {
    padding: 20px;
  }
}

/* ==========================================================================
   About & Contact Icons + Daily World News Hub (Full SEO Material 3 UI)
   ========================================================================== */
.legal-heading-icon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.legal-heading-icon .icon-svg {
  color: var(--primary);
}

.contact-channel-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
}

.contact-channel-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.news-page {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 24px;
}

.news-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.news-breadcrumb a {
  color: var(--primary);
  font-weight: 500;
}

.news-breadcrumb a:hover {
  text-decoration: underline;
}

.news-masthead {
  padding: 26px 28px;
  margin-bottom: 0;
}

.news-masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.news-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
}

.news-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.news-subtitle {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 78ch;
}

.news-kpi-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.news-filter-bar {
  margin-bottom: 0;
}

.news-period-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-region {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  padding: 2px 9px;
}

/* Lead Hero News Card */
.news-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.news-hero-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.news-hero-card .news-card-media {
  aspect-ratio: auto;
  min-height: 290px;
  height: 100%;
}

.news-hero-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.news-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.26;
  margin: 0;
}

.news-hero-title a:hover,
.news-card-title a:hover {
  color: var(--primary);
}

.news-hero-summary {
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 0;
}

.news-hero-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.news-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}

.news-byline time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Editorial News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.news-card {
  padding: 0;
  margin-bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.news-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1a73e8 0%, #0ea5e9 100%);
}

.news-card-media.news-cat-weather-climate {
  background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
}
.news-card-media.news-cat-travel-cities {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
}
.news-card-media.news-cat-technology {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
}
.news-card-media.news-cat-science-nature {
  background: linear-gradient(135deg, #0f766e 0%, #16a34a 100%);
}

.news-card-media img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-media img,
.news-hero-card:hover .news-card-media img {
  transform: scale(1.03);
}

.news-fallback-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.94);
  text-align: center;
}

.news-fallback-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.news-fallback-cat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.news-fallback-src {
  font-size: 0.76rem;
  opacity: 0.85;
}

.news-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
}

.news-source {
  font-weight: 600;
  color: var(--text);
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
  color: var(--text);
}

.news-card-summary {
  font-size: 0.86rem;
  line-height: 1.58;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.news-read-link {
  color: var(--primary);
  font-weight: 600;
}

.news-read-link:hover {
  text-decoration: underline;
}

.news-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}

.news-ext-link:hover {
  color: var(--primary);
}

.news-empty {
  text-align: center;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.news-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* News Article Detail */
.news-detail-figure {
  padding: 0;
  overflow: hidden;
  margin: 0;
}

.news-detail-figure img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.news-detail-figure figcaption {
  padding: 10px 18px;
  font-size: 0.78rem;
  border-top: 1px solid var(--border-subtle);
}

.news-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 4px;
}

.news-detail-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.news-detail-cta-row a.btn {
  text-decoration: none;
}

.news-detail-cta-row a.btn-primary {
  color: #ffffff;
}
html[data-theme="dark"] .news-detail-cta-row a.btn-primary {
  color: #062e6f;
}

.news-share-row {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.news-share-row a.btn {
  text-decoration: none;
  color: var(--text);
}

/* Matched Live Cameras Strip & Related News */
.news-cams-strip,
.news-faq-card {
  margin-bottom: 0;
}

.news-live-cams-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.news-mini-cam {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  text-decoration: none !important;
  color: var(--text) !important;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.news-mini-cam:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.news-mini-cam-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.news-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.news-related-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  text-decoration: none !important;
  color: var(--text) !important;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: border-color 0.15s ease;
}

.news-related-item:hover {
  border-color: var(--primary);
}

/* Explore Homepage Daily News Preview Strip */
.home-news-strip {
  margin-top: 26px;
  margin-bottom: 0;
  padding: 22px 24px;
}

.home-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.home-news-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.home-news-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.home-news-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.home-news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-news-title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.38;
  font-weight: 600;
}

.home-news-title a:hover {
  color: var(--primary);
}

@media (max-width: 900px) {
  .news-hero-card {
    grid-template-columns: 1fr;
  }
  .news-hero-card .news-card-media {
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  .news-masthead {
    padding: 18px;
  }
  .news-hero-body {
    padding: 18px;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WORLD MAP LIVE LAYERS SIDEBAR (Hurricanes, Major Cities Temps, Radar, Cams)
   ========================================================================== */
.world-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 16px;
  align-items: stretch;
}

.world-map-stage {
  min-width: 0;
}

.world-map-tall {
  height: 620px;
}

.map-layers-panel {
  margin-bottom: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 622px;
  overflow-y: auto;
}

.map-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.map-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
}

.map-panel-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.live-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 3px var(--green-soft);
}

#btn-refresh-map-layers.is-spinning svg {
  animation: mapSpin 0.8s linear infinite;
}

@keyframes mapSpin {
  to { transform: rotate(360deg); }
}

.map-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-layer-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.map-layer-toggle:hover {
  border-color: var(--primary);
}

.map-layer-toggle.checked {
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
}

.map-layer-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.map-toggle-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.map-toggle-check svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.map-layer-toggle.checked .map-toggle-check {
  background: var(--primary);
  border-color: var(--primary);
}

.map-layer-toggle.checked .map-toggle-check svg {
  opacity: 1;
  transform: scale(1);
}

.map-toggle-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.map-toggle-ico.ico-cam { background: var(--live-soft); color: var(--live-ink); }
.map-toggle-ico.ico-storm { background: rgba(234, 88, 12, 0.14); color: #ea580c; }
.map-toggle-ico.ico-temp { background: var(--primary-soft); color: var(--primary-ink); }
.map-toggle-ico.ico-radar { background: rgba(6, 182, 212, 0.14); color: #0891b2; }

.map-toggle-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.22;
}

.map-toggle-info strong {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
}

.map-toggle-info small {
  font-size: 0.71rem;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 2px;
  border-top: 1px solid var(--border-subtle);
}

.map-unit-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.map-unit-switch button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.map-unit-switch button.active {
  background: var(--primary);
  color: #ffffff;
}

.map-side-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

#map-cities-panel-section {
  flex: 1;
}

.map-side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.map-side-heading span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-side-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.map-cities-scroll {
  overflow-y: auto;
  max-height: 175px;
  padding-right: 3px;
}

.map-calm-box {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 26%, transparent);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.76rem;
}

.map-calm-box strong {
  color: var(--green-ink);
}

.map-storm-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.map-storm-row:hover {
  border-color: #ea580c;
  background: var(--surface-hover);
}

.map-storm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #ea580c;
}

.map-storm-dot.sev-red { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22); }
.map-storm-dot.sev-orange { background: #ea580c; box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.22); }
.map-storm-dot.sev-amber { background: #d97706; }
.map-storm-dot.sev-cyan { background: #0284c7; }

.map-storm-row-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.map-storm-row-body strong {
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-storm-row-body small {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.map-city-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.map-city-row:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.map-city-row-left {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.map-city-row-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-city-row-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Full-Width Spacious Major World Cities Live Weather Board */
.map-cities-board {
  margin-top: 16px;
  margin-bottom: 0;
  padding: 20px 22px;
}

.map-cities-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.map-cities-board-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-cities-board-title svg {
  color: var(--primary);
}

.map-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
}

.map-city-card {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.map-city-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

.map-city-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-city-card-place {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.map-city-card-place div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.map-city-card-place strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-city-card-place small {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-city-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.map-city-card-cond {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.map-city-card-bottom .mono {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
}

.map-mini-temp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  color: #ffffff;
}

/* Map Temperature Pill Markers */
.map-temp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.14s ease;
}

.map-temp-pill:hover {
  transform: scale(1.08);
}

.map-temp-ico {
  display: inline-flex;
  align-items: center;
}

.map-temp-ico svg {
  width: 12px;
  height: 12px;
}

.map-temp-val {
  font-family: var(--font-mono);
}

.map-temp-city {
  font-weight: 600;
  opacity: 0.95;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.temp-freeze { background: linear-gradient(135deg, #2563eb, #0284c7); }
.temp-cool { background: linear-gradient(135deg, #0891b2, #0d9488); }
.temp-mild { background: linear-gradient(135deg, #16a34a, #059669); }
.temp-warm { background: linear-gradient(135deg, #d97706, #ea580c); }
.temp-hot { background: linear-gradient(135deg, #dc2626, #b91c1c); }

/* Map Weather & Storm Popups */
.map-weather-popup {
  padding: 12px 14px;
  color: var(--text);
}

.map-weather-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.map-weather-city {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.map-weather-big-temp {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
}

.map-weather-cond {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.8rem;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  margin-bottom: 8px;
}

.map-weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.map-weather-grid div {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.map-weather-grid span {
  font-size: 0.67rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.map-weather-grid strong {
  font-size: 0.78rem;
  color: var(--text);
}

/* Animated Hurricane / Cyclone Map Pin */
.map-storm-pin {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.storm-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid #dc2626;
  animation: stormPulse 1.8s ease-out infinite;
}

.storm-core {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.storm-spin-svg {
  animation: mapSpin 4.5s linear infinite;
}

@keyframes stormPulse {
  0% { transform: scale(0.75); opacity: 0.95; }
  100% { transform: scale(1.65); opacity: 0; }
}

@media (max-width: 1020px) {
  .world-map-shell {
    grid-template-columns: 1fr;
  }
  .map-layers-panel {
    max-height: none;
  }
  .map-toggles-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .map-toggles-list {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   LIVE CHAT LOGIN GATE & OFFICIAL GOOGLE SIGN-IN / REGISTER BUTTON
   ========================================================================== */
.chat-login-gate {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-login-gate-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chat-login-gate-actions {
  display: flex;
  gap: 8px;
}

.btn-google {
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #c6cacf;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.14);
}

html[data-theme="dark"] .btn-google {
  background: #131314;
  color: #e3e3e3;
  border-color: #8e918f;
}

html[data-theme="dark"] .btn-google:hover {
  background: #1f2022;
  border-color: #a8abb0;
}

.btn-google-full {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
  gap: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.avatar-img {
  object-fit: cover;
}

/* ==========================================================================
   GOOGLE ADSENSE STANDARD-DIMENSION AD BANNERS (728x90, 320x100, 300x250)
   ========================================================================== */
.watch-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-ad-slot {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px 0;
  display: flex;
  justify-content: center;
}

.top-ad-slot .ad-banner-wrap {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .top-ad-slot {
    padding: 10px 12px 0;
  }
}

.ad-banner-wrap {
  margin: 18px auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ad-banner-wrap.ad-kind-leaderboard,
.ad-banner-wrap.ad-kind-inarticle {
  max-width: min(728px, 100%);
}

.ad-banner-wrap.ad-kind-rectangle {
  max-width: min(300px, 100%);
  width: 100%;
  margin: 0 auto;
}

.ad-banner-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ad-disclosure {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.ad-sponsor-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.ad-sponsor-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.ad-banner-frame {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-2));
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Google AdSense Leaderboard: 728x90 Desktop / 320x100 Large Mobile Banner */
.ad-frame-leaderboard {
  width: 100%;
  max-width: min(728px, 100%);
  min-height: 90px;
}

/* Google AdSense In-Article Responsive Banner */
.ad-frame-inarticle {
  width: 100%;
  max-width: min(728px, 100%);
  min-height: 90px;
}

/* Google AdSense Medium Rectangle: 300x250 */
.ad-frame-rectangle {
  width: 100%;
  max-width: min(300px, 100%);
  min-height: 250px;
}

.ad-placeholder-inner {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ad-frame-rectangle .ad-placeholder-inner {
  flex-direction: column;
  text-align: center;
  justify-content: center;
  padding: 20px;
  min-height: 250px;
}

.ad-placeholder-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ad-placeholder-copy {
  min-width: 0;
}

.ad-frame-rectangle .ad-placeholder-left {
  flex-direction: column;
  gap: 10px;
}

.ad-badge-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  flex-shrink: 0;
}

.ad-placeholder-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.ad-placeholder-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ad-cta-link {
  text-decoration: none !important;
  flex-shrink: 0;
}

/* Hero & Watch Mobile Structural Helpers */
.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-top-left,
.hero-top-right {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-loc-line {
  font-size: 0.8rem;
  color: #a8c7fa;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.52rem;
  font-weight: 700;
  margin: 4px 0 8px;
  line-height: 1.2;
}

.hero-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.watch-top-bar {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.watch-top-meta {
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.watch-loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.watch-weather-badge {
  font-size: 0.74rem;
  padding: 4px 10px;
  white-space: normal;
  height: auto;
  max-width: 100%;
}

.watch-weather-badge > span {
  flex-wrap: wrap !important;
  row-gap: 2px;
}

.watch-main-col {
  min-width: 0;
  max-width: 100%;
}

.player-hud-left {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.live-controls-left,
.live-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.live-ctrl-utc {
  font-size: 0.75rem;
  color: #e2e8f0;
  white-space: nowrap;
}

.live-ctrl-feed-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .top-ad-slot {
    padding: 8px 12px 0;
  }

  .ad-banner-wrap {
    margin: 12px auto;
    gap: 4px;
  }

  .ad-banner-wrap.ad-kind-leaderboard,
  .ad-banner-wrap.ad-kind-inarticle {
    max-width: min(320px, 100%);
  }

  .ad-frame-leaderboard,
  .ad-frame-inarticle {
    max-width: 100%;
    min-height: 90px;
  }

  .ad-frame-leaderboard .ad-placeholder-inner,
  .ad-frame-inarticle .ad-placeholder-inner {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
    text-align: left;
  }

  .ad-frame-leaderboard .ad-placeholder-left,
  .ad-frame-inarticle .ad-placeholder-left {
    gap: 8px;
    justify-content: flex-start;
  }

  .ad-placeholder-title {
    font-size: 0.8rem;
  }

  .ad-placeholder-sub {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .ad-cta-link {
    padding: 6px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  /* Map Cities Board & Chips Mobile Fit */
  .map-cities-board {
    padding: 14px 12px;
    overflow: hidden;
  }

  .map-cities-board-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    width: 100%;
  }

  .map-cities-board-head > div {
    min-width: 0;
    max-width: 100%;
  }

  #map-cities-region-chips {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .map-cities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .map-city-card {
    padding: 10px;
    gap: 7px;
  }

  .map-city-card-place strong {
    font-size: 0.8rem;
  }

  .map-city-card-bottom {
    font-size: 0.68rem;
    padding-top: 6px;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  /* Hero Card Mobile Fit */
  .hero-overlay {
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.56) 0%, transparent 32%, rgba(0, 0, 0, 0.92) 100%);
  }

  .hero-res-badge,
  .hero-coords {
    display: none;
  }

  .hero-top-row .badge {
    font-size: 0.65rem;
    padding: 3px 7px;
  }

  .hero-loc-line {
    font-size: 0.72rem;
  }

  .hero-title {
    font-size: 1.06rem;
    margin: 3px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-slider-controls {
    padding: 3px 6px;
    gap: 4px;
  }

  .hero-slide-dot,
  .hero-slide-arrow {
    width: 22px;
    height: 22px;
    font-size: 0.66rem;
  }

  .hero-watch-btn {
    padding: 6px 11px;
    font-size: 0.74rem;
  }

  /* Watch Room Mobile Fit (Zero Overflow & Clean Controls) */
  .watch-coords {
    display: none;
  }

  .watch-top-bar {
    gap: 8px;
    margin-bottom: 10px;
  }

  .watch-weather-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .player-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
  }

  .player-hud .badge {
    font-size: 0.64rem;
    padding: 3px 7px;
    gap: 4px;
  }

  .player-hud-telemetry,
  .hud-watching-word {
    display: none;
  }

  .live-player-controls {
    padding: 16px 8px 8px;
    gap: 5px;
  }

  .live-controls-row {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .live-controls-left,
  .live-controls-right {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .live-ctrl-utc,
  .live-ctrl-feed-badge {
    display: none !important;
  }

  .live-ctrl-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    gap: 4px;
    white-space: nowrap;
  }

  .player-brand-watermark {
    right: 8px;
    bottom: 44px;
    padding: 3px 7px 3px 5px;
    gap: 4px;
  }

  .player-wm-name {
    font-size: 0.68rem;
  }

  .player-wm-tag {
    font-size: 0.54rem;
    padding: 1px 5px;
    display: inline-block;
  }
}

@media (max-width: 400px) {
  .topbar-inner {
    padding: 0 8px;
    gap: 6px;
  }

  .brand-wordmark {
    font-size: 0.96rem;
  }

  .topbar-actions .btn-sm {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  .ad-frame-leaderboard .ad-placeholder-inner,
  .ad-frame-inarticle .ad-placeholder-inner {
    padding: 8px 10px;
    gap: 6px;
  }

  .ad-placeholder-title {
    font-size: 0.76rem;
  }

  .ad-cta-link {
    padding: 5px 8px;
    font-size: 0.68rem;
  }
}
