:root {
  color-scheme: dark;
  --site-width: 1180px;
  --site-gutter: 28px;
  --hero-top-padding: 168px;
  --page-top-padding: 186px;
  --bg: #07111f;
  --bg-2: #091726;
  --card: rgba(12, 24, 42, 0.86);
  --card-border: rgba(136, 186, 255, 0.14);
  --text: #eef5ff;
  --muted: #9fb4cb;
  --copy: #d7e4f4;
  --copy-strong: #eef5ff;
  --field-bg: rgba(10, 24, 42, 0.36);
  --field-border: rgba(164, 194, 231, 0.18);
  --field-border-focus: rgba(111, 255, 210, 0.42);
  --field-text: #eef5ff;
  --field-placeholder: #8ea5c0;
  --accent: #6fffd2;
  --accent-2: #74a7ff;
  --warm: #ffd18b;
  --danger: #ff8aa7;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.6;
  background:
    radial-gradient(circle at 20% 10%, rgba(87, 125, 255, 0.18), transparent 26%),
    radial-gradient(circle at 80% 12%, rgba(111, 255, 210, 0.13), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(255, 209, 139, 0.07), transparent 28%),
    linear-gradient(180deg, #050b15 0%, var(--bg) 48%, #04080f 100%);
  color: var(--text);
  overflow-x: clip;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef4ff;
  --bg-2: #e3ecf9;
  --card: rgba(255,255,255,0.82);
  --card-border: rgba(30, 54, 92, 0.12);
  --text: #0f213b;
  --muted: #42556f;
  --copy: #243a58;
  --copy-strong: #0f213b;
  --field-bg: rgba(255, 255, 255, 0.96);
  --field-border: rgba(67, 91, 128, 0.22);
  --field-border-focus: rgba(76, 126, 240, 0.45);
  --field-text: #0f213b;
  --field-placeholder: #6d7f99;
  --accent: #0fbf98;
  --accent-2: #4c7ef0;
  --warm: #c2862f;
  --danger: #d64b6a;
  --shadow: 0 24px 70px rgba(24, 41, 66, 0.12);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 20% 10%, rgba(79, 127, 255, 0.12), transparent 26%),
    radial-gradient(circle at 80% 12%, rgba(15, 191, 152, 0.10), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(194, 134, 47, 0.07), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 48%, #e9f1fb 100%);
}

html[data-theme="light"] .stars::before,
html[data-theme="light"] .stars::after {
  opacity: 0.18;
}

html[data-theme="light"] .topbar {
  background: rgba(255,255,255,0.78);
  border-color: rgba(30,54,92,0.08);
  box-shadow: 0 18px 55px rgba(24,41,66,0.10);
}

html[data-theme="light"] .theme-switch {
  background: rgba(10, 24, 42, 0.04);
  border-color: rgba(30,54,92,0.08);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -140%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  z-index: 100;
  transition: transform 160ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

.page-shell {
  display: grid;
  gap: 14px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--text);
}

.breadcrumbs span[aria-hidden="true"] {
  opacity: 0.5;
}

.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 700;
}

.page-toc a:hover,
.page-toc a:focus-visible {
  color: var(--text);
  border-color: rgba(111,255,210,0.32);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.12) inset, 0 0 18px rgba(111,255,210,0.08);
}

.section-head-tight {
  padding-top: 0;
}

.tight-heading {
  margin-bottom: 0;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.honeypot input {
  width: 1px;
  height: 1px;
}

.site-search {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.site-search .search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.site-search input[type="search"] {
  min-height: 48px;
}

.site-search-results {
  display: grid;
  gap: 8px;
  position: relative;
}

.search-busy {
  position: relative;
  padding-left: 20px;
}

.search-busy::before,
.loading-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.22);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

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

.loading-live .stat-card strong,
.loading-live .chance-box strong,
.loading-live .window-card strong,
.loading-live .city-score strong,
.loading-live .result-score strong {
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.28), rgba(255,255,255,0.12));
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 0 50%; }
  100% { background-position: 200% 50%; }
}

.loading-live .chance-fill,
.loading-live .bar {
  opacity: 0.45;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  min-height: 42px;
  min-width: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(7,17,31,0.82);
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0,0,0,0.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: rgba(111,255,210,0.12);
  border-color: rgba(111,255,210,0.30);
}

.field-hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.field-hint.error {
  color: var(--danger);
}

.field-error {
  min-height: 1.15em;
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: -2px;
}

.stars::before,
.stars::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 30% 10%, rgba(255,255,255,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 15%, rgba(255,255,255,.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 90% 30%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 25% 70%, rgba(255,255,255,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 60% 40%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 75%, rgba(255,255,255,.7) 0 1px, transparent 1.5px);
  opacity: 0.55;
}

.stars::after { opacity: 0.28; filter: blur(1px); }

.hero,
main,
.footer {
  width: min(var(--site-width), calc(100vw - var(--site-gutter)));
  margin: 0 auto;
}

.hero { padding: var(--hero-top-padding) 0 18px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 12px 16px;
  width: min(var(--site-width), calc(100vw - var(--site-gutter)));
  margin: 0 auto;
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  border-radius: 24px;
  background: rgba(7, 17, 31, 0.78);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 55px rgba(0,0,0,0.28);
  backdrop-filter: blur(18px);
  flex-wrap: wrap;
}

body.subpage .topbar {
  top: 8px;
  padding: 8px 10px 10px;
  gap: 8px 10px;
  border-radius: 18px;
}

body.subpage .brand {
  gap: 8px;
  font-size: 0.95rem;
}

body.subpage .brand-mark {
  width: 30px;
  height: 30px;
}

body.subpage .nav-links {
  gap: 8px;
}

body.subpage .nav-links a {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.9rem;
}

body.subpage .theme-switch {
  padding: 3px;
  gap: 4px;
}

body.subpage .theme-pill {
  min-width: 28px;
  min-height: 28px;
  padding: 0 5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  order: 1;
}
.brand:hover,
.brand:focus-visible {
  color: var(--text);
  text-shadow: 0 0 16px rgba(111,255,210,0.18);
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  border: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}

.nav-links {
  display: flex;
  gap: 10px;
  color: var(--muted);
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  order: 3;
  width: 100%;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: none;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--text);
  border-color: rgba(111,255,210,0.34);
  background: linear-gradient(135deg, rgba(111,255,210,0.14), rgba(116,167,255,0.10));
  box-shadow: 0 0 0 1px rgba(111,255,210,0.12) inset, 0 0 18px rgba(111,255,210,0.10);
  transform: translateY(-1px);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: var(--accent);
  box-shadow: 0 0 14px rgba(111,255,210,0.45);
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.theme-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  order: 2;
  margin-left: auto;
}

.theme-pill {
  min-height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 1rem;
  display: grid;
  place-items: center;
}

.theme-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.theme-icon-moon {
  border-radius: 50%;
  background: currentColor;
}

.theme-icon-moon::after {
  content: "";
  position: absolute;
  inset: 0 0 0 40%;
  border-radius: 50%;
  background: var(--card);
}

.theme-icon-sun {
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 -8px 0 -6px currentColor,
    0 8px 0 -6px currentColor,
    -8px 0 0 -6px currentColor,
    8px 0 0 -6px currentColor,
    5.6px 5.6px 0 -6px currentColor,
    -5.6px -5.6px 0 -6px currentColor,
    5.6px -5.6px 0 -6px currentColor,
    -5.6px 5.6px 0 -6px currentColor;
}

.theme-icon-device {
  width: 17px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: transparent;
}

.theme-icon-device::before,
.theme-icon-device::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: currentColor;
}

.theme-icon-desktop::before {
  top: -4px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
}

.theme-icon-desktop::after {
  bottom: -4px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
}

.theme-icon-mobile {
  width: 12px;
  height: 18px;
  border-radius: 4px;
}

.theme-icon-mobile::before {
  inset: 1.5px 2px 3px;
  border: 1.5px solid currentColor;
  border-radius: 2.5px;
  background: transparent;
}

.theme-icon-mobile::after {
  bottom: -4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
}

.theme-pill.active {
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), #97ffe0);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset;
}

.theme-pill:hover,
.theme-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.45);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.16) inset, 0 0 18px rgba(111,255,210,0.14);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy, .hero-panel, .card {
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.hero-copy, .hero-panel {
  border-radius: 28px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  line-height: 0.95;
  max-width: 11ch;
  margin-bottom: 18px;
}

.lede {
  max-width: 58ch;
  color: var(--copy);
  line-height: 1.7;
  font-size: 1.05rem;
}

.hero-copy p,
.card p,
.page-card p,
.page-card li,
.info-card p,
.compare-list span,
.footer-card p {
  max-width: 65ch;
}

.hero-actions, .planner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, filter 0.18s ease;
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), #97ffe0);
  color: #07111f;
}
.button.secondary {
  color: var(--text);
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.45);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.18) inset, 0 12px 28px rgba(0, 0, 0, 0.22);
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 14px 30px rgba(111,255,210,0.16);
}

.button:disabled,
button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(111,255,210,0.08);
  border-color: rgba(111,255,210,0.55);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.22) inset, 0 0 18px rgba(111,255,210,0.16);
}

.nav-links a,
.preset-chip,
.search-result,
.city-list-item,
.calendar-day,
.calendar-best-item,
.toggle {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  text-shadow: 0 0 16px rgba(111,255,210,0.25);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.meta-pill {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.06);
}
.meta-pill strong { color: var(--text); }

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--copy-strong);
  font-weight: 800;
}
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(111,255,210,0.13);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stat-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.stat-card.accent {
  background: linear-gradient(180deg, rgba(116,167,255,0.18), rgba(111,255,210,0.09));
}
.stat-card span, .window-times span, .card-head p, .muted { color: var(--muted); }
.stat-card strong {
  display: block;
  margin: 10px 0 2px;
  font-size: 2rem;
  line-height: 1;
}
.stat-card small { color: var(--copy); }

.chance-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  display: grid;
  gap: 14px;
}
.chance-box p { margin-bottom: 4px; color: var(--muted); }
.chance-box strong { font-size: 2.2rem; }
.chance-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.chance-bar span {
  display: block;
  height: 100%;
  width: 30%;
  border-radius: inherit;
  background: linear-gradient(90deg, #66ffd1, #7da5ff, #ffcf83);
}

.forecast-note {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.forecast-note strong {
  font-size: 1.05rem;
}

.forecast-note p {
  margin: 0;
  line-height: 1.55;
}

.calendar-card {
  display: grid;
  gap: 13px;
}

.calendar-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.calendar-top h3 { margin-bottom: 4px; }

.calendar-actions { display: flex; gap: 8px; }

.calendar-legend,
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0 2px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.legend-swatch,
.legend-moon {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-swatch.low { background: #55647a; }
.legend-swatch.medium { background: #f1b44c; }
.legend-swatch.high { background: #61d8a4; }
.legend-swatch.very-high { background: #8c7bff; }
.legend-moon.new { background: #f2f2f2; box-shadow: 0 0 0 2px rgba(255,255,255,0.08); }
.legend-moon.full { background: #ffe08a; box-shadow: 0 0 0 2px rgba(255,224,138,0.15); }

.forecast-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day {
  min-height: 90px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 6px;
  overflow: hidden;
  min-width: 0;
}

.calendar-day.outside {
  opacity: 0.3;
  cursor: default;
}

.calendar-day.low { background: linear-gradient(180deg, rgba(85,100,122,0.28), rgba(255,255,255,0.03)); }
.calendar-day.medium { background: linear-gradient(180deg, rgba(241,180,76,0.26), rgba(255,255,255,0.03)); }
.calendar-day.high { background: linear-gradient(180deg, rgba(97,216,164,0.22), rgba(255,255,255,0.03)); }
.calendar-day.very-high { background: linear-gradient(180deg, rgba(140,123,255,0.24), rgba(255,255,255,0.03)); }
.calendar-day.today { box-shadow: 0 0 0 2px rgba(111,255,210,0.55) inset; }
.calendar-day.selected { box-shadow: 0 0 0 2px rgba(255,255,255,0.7) inset, 0 0 0 1px rgba(111,255,210,0.18); }

.calendar-day:not(.outside):hover,
.calendar-day:not(.outside):focus-visible,
.calendar-best-item:hover,
.calendar-best-item:focus-visible,
.toggle:hover,
.toggle:focus-within {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.42);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.16) inset, 0 0 20px rgba(111,255,210,0.12);
}

.calendar-day:not(.outside):hover,
.calendar-day:not(.outside):focus-visible {
  background: rgba(255,255,255,0.06);
}

.calendar-day-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.calendar-day-top strong { font-size: 0.9rem; }

.calendar-score {
  font-size: 0.8rem;
  color: var(--copy-strong);
}

.calendar-day-label {
  display: block;
  color: var(--copy-strong);
  font-size: 0.84rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}

.calendar-moon {
  align-self: end;
  justify-self: start;
  min-height: 14px;
  font-size: 0.72rem;
  color: var(--muted);
}

.calendar-moon.new { color: var(--copy-strong); }
.calendar-moon.full { color: var(--warm); }

.calendar-details-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.calendar-details, .calendar-best {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.calendar-details h4, .calendar-best h4 { margin-bottom: 8px; }

.calendar-detail-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calendar-detail-grid div {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.calendar-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.calendar-detail-grid strong { font-size: 0.94rem; }

.calendar-best-list { display: grid; gap: 6px; }

.calendar-best-item {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.calendar-best-item:hover,
.calendar-best-item:focus-visible {
  background: rgba(111,255,210,0.06);
}

.calendar-best-item strong { display: block; margin-bottom: 4px; }

.calendar-best-item span { color: var(--muted); font-size: 0.84rem; }

.section { padding: 28px 0 0; }
.section-head { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0; }

.forecast-layout, .map-layout, .alerts-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}
.card {
  border-radius: 24px;
  padding: 20px;
}

.window-card { display: grid; gap: 18px; align-content: start; }
.window-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.window-times div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.window-times strong { display: block; margin-top: 8px; font-size: 1.1rem; }

.timeline-card { min-height: 100%; }
.card-head p { margin-bottom: 0; }
.timeline {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 280px;
  margin-top: 18px;
}
.hour {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-self: end;
}
.bar-wrap {
  width: 100%;
  min-height: 210px;
  display: flex;
  align-items: end;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px;
}
.bar {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(111,255,210,0.95), rgba(116,167,255,0.95), rgba(255,209,139,0.95));
  box-shadow: 0 0 20px rgba(111,255,210,0.12);
}
.hour small { color: var(--muted); }
.hour strong { font-size: 0.95rem; }

.grid-3 {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.city-score {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.city-score strong { display: block; font-size: 1.4rem; margin: 8px 0; }

.planner-card { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; }
.planner-form, .alert-form { display: grid; gap: 14px; }
.contact-form { display: grid; gap: 14px; }

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

.preset-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.preset-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.preset-section-head strong { font-size: 0.98rem; }

.preset-section-head span { color: var(--muted); font-size: 0.9rem; }
label { display: grid; gap: 8px; color: var(--copy-strong); font-weight: 700; }
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.search-button { min-height: 46px; }
.search-results {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  position: relative;
  border-radius: 16px;
  background: rgba(3, 10, 18, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
}
.search-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
}
.search-result:hover { border-color: rgba(111,255,210,0.28); }
.search-result:focus-visible {
  outline: 2px solid rgba(111,255,210,0.8);
  outline-offset: 2px;
}
.search-result:hover,
.search-result:focus-visible {
  transform: translateY(-1px);
  background: rgba(111,255,210,0.06);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.16) inset, 0 0 18px rgba(111,255,210,0.10);
}
.search-result small { color: var(--muted); }
input[type="text"], input[type="number"], input[type="email"], input[type="url"], select, textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: var(--field-text);
  padding: 0 14px;
}
textarea { padding: 12px 14px; min-height: 112px; resize: vertical; }
select { appearance: none; }
input[type="range"] { width: 100%; }

input::placeholder,
textarea::placeholder {
  color: var(--field-placeholder);
  opacity: 1;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 4px rgba(111, 255, 210, 0.12);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.preset-chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.preset-chip.active {
  border-color: rgba(111,255,210,0.8);
  background: linear-gradient(135deg, rgba(111,255,210,0.22), rgba(116,167,255,0.16));
  color: #eafff9;
  box-shadow: 0 0 0 4px rgba(111,255,210,0.12) inset, 0 0 0 1px rgba(111,255,210,0.2);
}

.preset-chip.active::before {
  content: '✓ ';
}

.preset-chip:hover,
.preset-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.5);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.16) inset, 0 0 18px rgba(111,255,210,0.14);
}

.result-panel {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(116,167,255,0.15), rgba(111,255,210,0.08));
  border: 1px solid rgba(255,255,255,0.08);
}
.result-score span { color: var(--muted); }
.result-score strong { display: block; font-size: 2.5rem; margin-top: 8px; }
.bullet-list { margin: 14px 0 0 0; padding-left: 20px; color: var(--copy); }
.bullet-list li + li { margin-top: 8px; }

.map-card { overflow: hidden; }
.map-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.map-badge {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(111,255,210,0.12);
  border: 1px solid rgba(111,255,210,0.2);
  color: #b8ffe9;
  white-space: nowrap;
}
.map-toolbar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-filter {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-weight: 700;
}
.map-filter.active {
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), #97ffe0);
  border-color: transparent;
}
.map-filter:hover,
.map-filter:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.4);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.16) inset, 0 0 18px rgba(111,255,210,0.10);
}
.map-metrics {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--muted);
  font-size: 0.86rem;
}
.map-canvas {
  position: relative;
  margin-top: 18px;
  height: 360px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(116,167,255,0.14), transparent 30%),
    linear-gradient(180deg, rgba(8,20,39,0.5), rgba(8,20,39,0.84));
  border: 1px solid rgba(255,255,255,0.06);
}
.map-night {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(10,18,35,0.12), transparent 30%),
    linear-gradient(180deg, rgba(2,6,14,0.12), rgba(2,6,14,0.36));
  opacity: 0.9;
}
.map-silhouette {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: drop-shadow(0 0 18px rgba(111,255,210,0.05));
}
.land {
  position: absolute;
  display: block;
  background: linear-gradient(180deg, rgba(208,224,245,0.24), rgba(164,187,217,0.08));
  border: 1px solid rgba(190,209,232,0.12);
  border-radius: 50% 40% 44% 56% / 46% 52% 48% 54%;
  transform: rotate(-8deg);
}
.land.north-america { left: 7%; top: 24%; width: 26%; height: 22%; transform: rotate(-14deg) skewX(-6deg); }
.land.greenland { left: 33%; top: 15%; width: 9%; height: 11%; transform: rotate(10deg); }
.land.europe { left: 47%; top: 28%; width: 12%; height: 14%; transform: rotate(6deg); }
.land.asia { left: 60%; top: 18%; width: 30%; height: 24%; transform: rotate(10deg) skewX(4deg); }
.land.south-america { left: 24%; top: 54%; width: 12%; height: 22%; transform: rotate(-22deg); }
.land.africa { left: 47%; top: 47%; width: 14%; height: 20%; transform: rotate(-4deg); }
.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100% 24%, 16% 100%;
  opacity: 0.5;
}
.map-grid::after {
  content: "90°N  70°N  50°N  30°N  10°N  10°S";
  position: absolute;
  left: 14px;
  top: 12px;
  color: rgba(233,244,255,0.3);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}
.map-focus-ring {
  position: absolute;
  inset: 18px 14px 18px 14px;
  border-radius: 40px;
  border: 1px solid rgba(111,255,210,0.18);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.06) inset, 0 0 30px rgba(111,255,210,0.04);
}
.aurora-band {
  position: absolute;
  inset: 46px 40px auto 40px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(111,255,210,0.32), rgba(116,167,255,0.18) 48%, transparent 70%);
  filter: blur(2px);
  opacity: 0.95;
  transform: translateY(18px);
}
.aurora-band::before {
  content: "";
  position: absolute;
  inset: 18px 10% 18px 10%;
  border-radius: 50%;
  border: 1px solid rgba(111,255,210,0.42);
  box-shadow: 0 0 30px rgba(111,255,210,0.12);
}
.map-region {
  position: absolute;
  color: rgba(233,244,255,0.38);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(0,0,0,0.35);
}
.region-north-america { left: 10%; top: 62%; }
.region-greenland { left: 33%; top: 40%; }
.region-nordics { left: 55%; top: 34%; }
.region-siberia { left: 75%; top: 44%; }
.map-canvas[data-focus="nordics"] .region-nordics,
.map-canvas[data-focus="north-america"] .region-north-america,
.map-canvas[data-focus="iceland"] .region-greenland,
.map-canvas[data-focus="global"] .map-region {
  color: #edf8ff;
}
.map-canvas[data-focus="nordics"] .map-focus-ring,
.map-canvas[data-focus="north-america"] .map-focus-ring,
.map-canvas[data-focus="iceland"] .map-focus-ring {
  border-color: rgba(111,255,210,0.35);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.10) inset, 0 0 36px rgba(111,255,210,0.08);
}
.city-pin {
  position: absolute;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(4, 10, 18, 0.72);
  border: 1px solid rgba(255,255,255,0.1);
  color: #eef5ff;
  font-size: 0.86rem;
  transform: translate(-50%, -50%);
}
.city-pin::before {
  content: "";
  position: absolute;
  left: 50%; top: 100%;
  width: 8px; height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -2px);
  background: var(--accent);
  box-shadow: 0 0 16px rgba(111,255,210,0.5);
}
.city-pin.sweden { left: 58%; top: 44%; }
.city-pin.norway { left: 52%; top: 36%; }
.city-pin.iceland { left: 34%; top: 42%; }
.city-pin.canada { left: 16%; top: 32%; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
}
.legend i { display: inline-block; margin-right: 8px; vertical-align: middle; }
.legend-glow { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px rgba(111,255,210,0.5); }
.legend-line { width: 14px; height: 3px; border-radius: 999px; background: var(--accent-2); }

.city-list { display: grid; gap: 10px; margin-top: 12px; }
.city-list-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.city-list-item:hover,
.city-list-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.28);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.14) inset, 0 0 18px rgba(111,255,210,0.10);
}
.city-list-item strong { display: block; }
.city-list-item span { color: var(--muted); font-size: 0.94rem; }

.webcam-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.webcam-card {
  display: grid;
  gap: 14px;
}

.webcam-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.webcam-top > div,
.compare-head > div,
.calendar-top > div,
.preset-section-head > div,
.tour-submissions-head > div,
.footer-bottom > div {
  min-width: 0;
}

.webcam-link { white-space: nowrap; }

.webcam-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.webcam-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.webcam-note { margin-bottom: 0; }

.cam-list {
  display: grid;
  gap: 10px;
}

.cam-item {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.cam-item:hover,
.cam-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.28);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.14) inset, 0 0 18px rgba(111,255,210,0.10);
}

.cam-item strong { display: block; }
.cam-item span { color: var(--muted); font-size: 0.94rem; }

.tours-layout {
  display: grid;
  gap: 16px;
}

.tours-intro {
  display: grid;
  gap: 10px;
}

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

.tour-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.tour-region {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
}

.tour-link {
  width: fit-content;
}

.tour-submissions-card {
  display: grid;
  gap: 14px;
}

.tour-submissions-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.tour-submissions {
  display: grid;
  gap: 10px;
}

.tour-submission-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.tour-submission-item strong { display: block; }
.tour-submission-item span,
.tour-submission-item p { color: var(--muted); }
.tour-submission-item p { margin: 6px 0 0; line-height: 1.5; }

.alerts-layout { align-items: start; }
.toggle-row {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-weight: 600;
}
.watch-card { min-height: 100%; }
.watchlist { display: grid; gap: 10px; margin: 12px 0 10px; }
.watch-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.watch-item strong { display: block; margin-bottom: 4px; }
.small { font-size: 0.92rem; }

.learn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.info-card {
  display: grid;
  gap: 12px;
  align-self: stretch;
  height: 100%;
  overflow: clip;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  cursor: pointer;
  touch-action: manipulation;
}

.info-card > p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.4em;
}

.info-card.expanded {
  grid-column: 1 / -1;
  transform: scale(1.01);
  border-color: rgba(111,255,210,0.26);
  box-shadow: 0 32px 80px rgba(0,0,0,0.30), 0 0 0 1px rgba(111,255,210,0.08) inset;
}

.info-card-details {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.info-card-details p {
  margin: 0;
  line-height: 1.7;
  color: var(--copy);
}

.info-card-details strong {
  color: var(--copy-strong);
}

.info-card-details[hidden] {
  display: none;
}

.info-card:hover,
.info-card:focus-within {
  border-color: rgba(111,255,210,0.20);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.08) inset, 0 0 20px rgba(111,255,210,0.08);
  transform: translateY(-2px) scale(1.01);
}

.info-card.expanded:hover,
.info-card.expanded:focus-within {
  transform: scale(1.02);
}

.compare-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.compare-card {
  display: grid;
  gap: 14px;
}

.compare-card.winner {
  border-color: rgba(111,255,210,0.32);
  background: linear-gradient(180deg, rgba(111,255,210,0.08), rgba(255,255,255,0.03));
}

.compare-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.compare-badge {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(111,255,210,0.14);
  border: 1px solid rgba(111,255,210,0.18);
  color: #b8ffe9;
  font-size: 0.9rem;
  white-space: nowrap;
}

.muted-badge {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: var(--muted);
}

.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.compare-list li {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.compare-list strong {
  display: block;
  margin-bottom: 4px;
}

.compare-list span {
  color: var(--muted);
  line-height: 1.55;
}

.compare-list li:hover,
.compare-list li:focus-within {
  border-color: rgba(111,255,210,0.28);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.12) inset, 0 0 18px rgba(111,255,210,0.08);
}
.info-card p { color: var(--copy); line-height: 1.7; margin-bottom: 0; }

.footer {
  padding: 30px 0 34px;
  color: var(--muted);
}

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

.footer-grid section {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.footer-card {
  display: block;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.footer-card:hover,
.footer-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111,255,210,0.34);
  background: rgba(111,255,210,0.06);
  box-shadow: 0 0 0 1px rgba(111,255,210,0.12) inset, 0 0 18px rgba(111,255,210,0.10);
}

.footer-card h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1rem;
}

.footer-card p {
  margin-bottom: 0;
  line-height: 1.6;
  color: var(--muted);
}

.footer-grid h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1rem;
}

.footer-grid p {
  margin-bottom: 0;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 20px));
  z-index: 90;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.1fr 0.9fr;
  padding: 16px;
  border-radius: 22px;
  background: rgba(7, 17, 31, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
}

.html[data-theme="light"] .consent-banner,
html[data-theme="light"] .consent-banner {
  background: rgba(255,255,255,0.96);
  border-color: rgba(30,54,92,0.10);
}

.consent-copy p { margin-bottom: 0; color: var(--muted); }

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.consent-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--copy);
  font-weight: 700;
}

.consent-option input { width: 16px; height: 16px; }

/* Wider desktops get a little more breathing room. */
@media (min-width: 1440px) {
  :root {
    --site-width: 1520px;
    --site-gutter: 32px;
    --hero-top-padding: 168px;
    --page-top-padding: 200px;
  }

  .hero-grid {
    gap: 28px;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 30px;
  }

  .section {
    padding-top: 32px;
  }
}

@media (min-width: 1800px) {
  :root {
    --site-width: 1680px;
    --site-gutter: 36px;
    --page-top-padding: 208px;
  }

  .hero-grid {
    gap: 32px;
  }

  .page-main {
    padding-top: 186px;
  }
}

.page-main {
  width: min(var(--site-width), calc(100vw - var(--site-gutter)));
  margin: 0 auto;
  padding: var(--page-top-padding) 0 28px;
  display: grid;
  gap: 16px;
}

body.subpage .page-main {
  padding-top: calc(var(--page-top-padding) + 12px);
}

.page-hero {
  display: grid;
  gap: 12px;
  padding: 28px;
}

.page-hero h1 { margin-bottom: 0; }
.page-hero .lede { margin-bottom: 0; max-width: 70ch; }

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

.page-card {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.page-card h2,
.page-card h3 { margin-bottom: 0; }

.page-card p,
.page-card li { color: var(--copy); line-height: 1.7; }

.page-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.page-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

.contact-status {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.03);
}

.contact-status strong {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.contact-status span {
  color: var(--muted);
  line-height: 1.5;
}

.contact-status.success {
  border-color: rgba(111,255,210,0.26);
  background: linear-gradient(180deg, rgba(111,255,210,0.14), rgba(255,255,255,0.03));
}

.contact-status.success strong { color: var(--accent); }

.contact-status.error {
  border-color: rgba(255,138,167,0.22);
  background: linear-gradient(180deg, rgba(255,138,167,0.12), rgba(255,255,255,0.03));
}

.contact-status.error strong { color: var(--danger); }

.contact-form select,
.contact-form textarea,
.contact-form input {
  width: 100%;
}

@media (max-width: 980px) {
  .hero-grid, .forecast-layout, .map-layout, .webcam-layout, .tours-layout, .alerts-layout, .planner-card, .learn-grid {
    grid-template-columns: 1fr;
  }
  .compare-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .tour-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-grid { grid-template-columns: 1fr; }
  .contact-split { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hero, main, .footer { width: min(100vw - 18px, 1180px); }
  .topbar {
    width: min(100vw - 18px, 1180px);
    top: 8px;
    padding: 10px 12px 12px;
    border-radius: 18px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .brand { flex: 0 0 auto; min-width: 0; }
  .nav-links {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 0.92rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: 8px 0 0;
    scrollbar-width: none;
  }
  .nav-links a {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .theme-switch {
    order: 2;
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 2px;
  }
  .theme-pill { flex: 0 0 auto; min-width: 30px; min-height: 30px; padding: 0 6px; }
  body.mobile-topbar-compact .topbar {
    padding: 8px 10px 7px;
    border-radius: 18px;
    gap: 10px;
  }
  body.mobile-topbar-compact .theme-switch {
    gap: 3px;
    padding: 1px;
  }
  body.mobile-topbar-compact .theme-pill {
    min-width: 28px;
    min-height: 28px;
    padding: 0 5px;
  }
  body.mobile-topbar-compact .nav-links {
    gap: 8px;
    font-size: 0.84rem;
  }
  body.mobile-topbar-compact .nav-links a {
    padding: 5px 9px;
  }
  .hero-copy, .hero-panel, .card { padding: 16px; border-radius: 18px; }
  .hero { padding-top: 118px; }
  .hero-grid { gap: 14px; }
  .section { padding-top: 20px; }
  .window-times { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; min-height: 220px; }
  .bar-wrap { min-height: 150px; }
  .bar { border-radius: 10px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card strong { font-size: 1.7rem; }
  .chance-box strong { font-size: 1.8rem; }
  .result-score strong { font-size: 2rem; }
  .compare-head { flex-direction: column; align-items: start; }
  .compare-badge { font-size: 0.82rem; }
  .city-score strong { font-size: 1.2rem; }
  .city-list-item { flex-direction: column; align-items: start; }
  .map-canvas { height: 300px; }
  .learn-grid { gap: 10px; }
  .calendar-top { flex-direction: column; align-items: start; }
  .calendar-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; font-size: 0.72rem; }
  .calendar-day { min-height: 72px; padding: 8px; border-radius: 14px; }
  .forecast-calendar { gap: 6px; }
  .calendar-details-wrap { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
  h1 { max-width: 9ch; }
}

@media (max-width: 1120px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav-links {
    flex: 0 0 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 8px;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .theme-switch {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .hero-copy, .hero-panel, .card { padding: 14px; }
  .hero-actions, .planner-actions { gap: 8px; }
  .button { min-height: 42px; padding: 0 14px; }
  .meta-row { gap: 8px; }
  .meta-pill { padding: 8px 10px; }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-canvas { height: 260px; }
  .compare-list li, .watch-item, .search-result { padding: 12px; }
  .calendar-legend { grid-template-columns: 1fr; }
  .calendar-weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 0.68rem; }
  .calendar-day { min-height: 66px; padding: 7px; }
  .calendar-detail-grid { grid-template-columns: 1fr; }
  .tour-submission-item { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: start; }
  .page-main { padding-top: 138px; }
  .page-hero, .page-card { padding: 16px; border-radius: 18px; }
}
