:root {
  --bg: #0b1020;
  --bg-elev: #121836;
  --card: #131a2e;
  --card2: #182140;
  --line: #243052;
  --text: #e5e7eb;
  --muted: #8b93a7;
  --accent: #7aa2ff;
  --accent-2: #7aa2ff;
  --ex: #22c55e;
  --good: #84cc16;
  --fair: #eab308;
  --poor: #f97316;
  --bad: #b94a4a;
  --legacy: #8b7355;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: Inter, system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1280px, calc(100% - 2rem)); margin: 0 auto; }
@media (min-width: 1600px) {
  .wrap { width: min(1400px, calc(100% - 2.5rem)); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.75);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--text); }
@media (max-width: 520px) {
  .site-header .inner { padding: 0.45rem 0; gap: 0.5rem; flex-wrap: wrap; }
  .brand { font-size: 0.95rem; gap: 0.4rem; }
  .brand img { width: 28px; height: 28px; }
  .nav { gap: 0.55rem; font-size: 0.82rem; width: 100%; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
  color: #fff;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(91, 157, 255, 0.35);
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}
.btn-legacy {
  background: linear-gradient(135deg, #a67c52, #6e5340);
  box-shadow: 0 10px 28px rgba(166, 124, 82, 0.3);
}

.hero {
  padding: 4.5rem 0 3rem;
  animation: rise 0.7s ease both;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.panel h3 { margin-top: 0; }
.muted { color: var(--muted); }

.section { padding: 2.5rem 0; }
.section h2 { margin: 0 0 0.75rem; font-size: 1.6rem; }
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
}
.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.15rem;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(91,157,255,0.35); }

.legacy {
  margin: 2rem 0 4rem;
  border: 1px dashed rgba(166, 124, 82, 0.55);
  background: linear-gradient(135deg, rgba(166,124,82,0.12), rgba(22,32,51,0.6));
}
.legacy-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2c29a;
  border: 1px solid rgba(226,194,154,0.4);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.console-shell { padding: 1.5rem 0 3rem; }
.console-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}
.user-chip img { width: 32px; height: 32px; border-radius: 50%; }

.grid-2 {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.form-row { margin-bottom: 0.75rem; }
.form-row label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
input, select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.55rem 0.7rem;
  color-scheme: dark;
}
select option,
select optgroup {
  background: #0f172a;
  color: #e2e8f0;
}
/* Must come after input{width:100%} so checkboxes stay inline with labels */
.form-row.check-row label,
label.check-inline {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0;
  cursor: pointer;
  width: auto;
}
.form-row.check-row input[type="checkbox"],
label.check-inline input[type="checkbox"],
input[type="checkbox"] {
  width: 1.1rem !important;
  max-width: 1.1rem !important;
  height: 1.1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  accent-color: #3b82f6;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}
th { color: var(--muted); font-weight: 600; }
.score-pill {
  display: inline-block;
  min-width: 2.5rem;
  text-align: center;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
  font-size: 0.85rem;
}
.score-good { background: rgba(62,207,142,0.2); color: var(--good); }
.score-fair { background: rgba(240,180,41,0.2); color: var(--warn); }
.score-bad { background: rgba(240,113,120,0.2); color: var(--bad); }

.alert {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(240,113,120,0.15);
  border: 1px solid rgba(240,113,120,0.35);
}
.alert-ok {
  background: rgba(62,207,142,0.12);
  border-color: rgba(62,207,142,0.35);
}

.location-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .location-container { grid-template-columns: 1fr; }
}
#map {
  height: 500px;
  width: 100%;
  border-radius: 12px;
  z-index: 1;
  background: #1a2338;
}
.leaflet-tile-pane { filter: brightness(0.85) contrast(1.05); }
.leaflet-tile-pane.wbh-tiles-loading { opacity: 0; }
.leaflet-tile-pane.wbh-tiles-ready {
  opacity: 1;
  transition: opacity 0.25s ease;
}
.field-error {
  color: #fca5a5;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.form-row input[aria-invalid="true"],
.form-row select[aria-invalid="true"] {
  border-color: rgba(248, 113, 113, 0.7);
}
.badge-day {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warn);
  border: 1px solid rgba(240,180,41,0.45);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.25rem;
}
.row-day { opacity: 0.55; }
.support-panel { text-align: left; }
.kofi-wrap { margin-top: 0.75rem; }
.footer-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-support {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.kofi-fallback img { vertical-align: middle; }

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

.factor-card {
  margin: 0.85rem 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
}
.factor-card h4 { margin: 0 0 0.65rem; font-size: 0.95rem; }
.oq-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 0 0.55rem;
}
.oq-section-head h4 { margin: 0; flex: 1 1 auto; }
.oq-max-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}
.oq-info {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid #64748b;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.oq-info-pop {
  position: fixed;
  z-index: 5000;
  max-width: 260px;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #1f2a4d;
  border: 1px solid #3b4a7a;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
  display: none;
}
.oq-total-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(34, 197, 94, 0.08);
  font-size: 0.9rem;
}
.oq-total-bar.oq-total-warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.08);
}
.oq-total-hint {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: #fbbf24;
}
.oq-total-hint[hidden] { display: none !important; }
.oq-row.oq-cols {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
.oq-cell-k {
  display: none;
}
.oq-loc-card h4 { margin-bottom: 0.35rem; }
@media (max-width: 700px) {
  .oq-cell-k { display: inline; margin-right: 0.25rem; }
  .oq-row.oq-cols { display: none; }
}
.factor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
}
@media (max-width: 700px) {
  .factor-grid { grid-template-columns: 1fr; }
}
.factor-grid label { font-size: 0.85rem; color: var(--muted); }
.factor-grid input[type="number"],
.factor-grid select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
}
.factor-grid .factor-weight { grid-column: 1 / -1; }
.factor-grid .weight-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.factor-grid .weight-row input[type="range"] {
  flex: 1;
  width: auto;
  margin: 0;
}
.factor-grid .weight-val {
  min-width: 5.5rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.factor-grid .check-row {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
}
.preview-chart {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.35rem 0.5rem;
  align-items: stretch;
}
.preview-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 13px !important;
  line-height: 1.2;
  color: var(--muted);
  padding: 6px 0 1.1rem;
}
.preview-plot { min-width: 0; }
.preview-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 110px;
  padding: 6px 4px 0;
  background: rgba(0,0,0,0.2);
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
}
.preview-bars span {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 2px 2px 0 0;
}
.preview-x {
  display: flex;
  gap: 2px;
  padding: 6px 6px 4px;
  border: 1px solid var(--line);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 0 10px 10px;
  background: rgba(0,0,0,0.15);
  font-size: 14px !important;
  color: var(--muted);
  overflow: visible;
}
.preview-x span {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible;
  font-size: 13px !important;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}
.preview-x span.preview-night-start {
  border-left: none;
  box-shadow: inset 2px 0 0 rgba(255,255,255,0.28);
  padding-left: 3px;
  font-weight: 700;
  font-size: 14px !important;
  color: #e2e8f0;
  z-index: 2;
}
.preview-bars span.preview-night-start {
  border-left: none;
  box-shadow: inset 2px 0 0 rgba(255,255,255,0.18);
}
.preview-unit {
  font-size: 14px !important;
  margin-top: 0.35rem;
}
.preview-table-wrap {
  overflow: visible;
  max-height: none;
  margin-top: 0.75rem;
}
.oq-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  vertical-align: middle;
}
.oq-badge[hidden] {
  display: none !important;
}
.oq-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(5.5rem, 0.7fr) minmax(7rem, 0.9fr);
  gap: 0.45rem 0.75rem;
  align-items: center;
  margin: 0.35rem 0;
}
.oq-label { font-size: 0.9rem; color: var(--text); }
.oq-cell { font-size: 0.8rem; color: var(--muted); margin: 0; }
.oq-cell input {
  width: 4.5rem;
  display: inline-block;
  margin: 0 0.25rem 0 0;
  padding: 0.35rem 0.45rem;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  /* Label full width; Points | Up to share one row 50/50 */
  .oq-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.55rem;
  }
  .oq-row > .oq-label {
    grid-column: 1 / -1;
  }
  .oq-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    min-width: 0;
  }
  .oq-cell-k {
    margin-right: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap; /* "UP TO %" must stay one line on narrow phones */
  }
  .oq-cell input {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

/* —— Design system: forecast —— */
.wrap-wide { width: min(1360px, calc(100% - 2rem)); margin: 0 auto; }
.tz-pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.25;
  white-space: normal;
  max-width: min(100%, 22rem);
}
.tz-pill .wbh-t-loc { color: var(--text); font-weight: 600; }
.tz-pill .wbh-t-utc,
.tz-pill .wbh-t-you { font-size: 11px; opacity: 0.9; }
.tz-pill b { color: var(--text); }
.wbh-t-loc { color: var(--text); }
.wbh-t-utc,
.wbh-t-you { font-size: 0.92em; opacity: 0.88; }
.sat-lic {
  display: inline;
}
.sat-lic summary {
  cursor: pointer;
  color: #93c5fd;
  display: inline;
  list-style: none;
}
.sat-lic summary::-webkit-details-marker { display: none; }
.sat-lic p {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  white-space: normal;
}
.loc-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.loc-pills a, .loc-pills button, .loc-pills span.pill-loc {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.loc-pills button { appearance: none; }
.loc-pills .on, .loc-pills span.on { background: #7aa2ff22; border-color: #7aa2ff; color: #c7d6ff; }

/* Forecast source switcher (same look as loc pills; one form = reliable mobile submit) */
.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
}
/* Keep night cards from jumping when the 5 source pills wrap on narrow phones */
@media (max-width: 420px) {
  .source-pills {
    min-height: 7.5rem;
  }
}
.source-pills-label { margin-right: 0.1rem; }
.source-pills-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.source-pills .pill-loc {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 14px;
  min-height: 44px; /* touch target — was ~28–30 px on some phones */
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  touch-action: manipulation;
}
.source-pills .pill-loc.on {
  background: #7aa2ff22;
  border-color: #7aa2ff;
  color: #c7d6ff;
}
.source-pills-cond {
  margin-left: 0.15rem;
  font-size: 0.78rem;
}
.forecast-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.forecast-head h2 { margin: 0; font-size: 22px; }
.forecast-head h2 small { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 8px; }

.night-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .night-grid { grid-template-columns: 1fr; } }
.card.night { padding: 22px; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card.night.best { border: 1.5px solid #22c55e; box-shadow: 0 0 0 4px #22c55e18, 0 10px 40px #22c55e14; }
.card.night .badge {
  position: absolute; top: -12px; left: 22px;
  background: #22c55e; color: #06210f; font-weight: 700; font-size: 12px;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .04em;
}
.card.night .top { display: flex; justify-content: space-between; align-items: flex-start; }
.card.night .date { font-size: 20px; font-weight: 700; }
.card.night .sub { color: var(--muted); font-size: 13px; }
.card.night .mid { display: flex; align-items: center; gap: 18px; margin: 16px 0; }
.card.night .wx { width: 56px; height: 56px; }
.card.night .win { font-size: 15px; }
.card.night .win b { font-size: 22px; display: block; }
.card.night .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.card.night .fact {
  background: var(--card2); border-radius: 10px; padding: 10px;
  display: flex; gap: 8px; align-items: center; font-size: 13px;
}
.card.night .fact i { width: 22px; height: 22px; flex: none; display: block; }
.card.night .fact b { display: block; font-size: 15px; }
.card.night .bar { display: flex; gap: 2px; height: 28px; align-items: flex-end; margin-top: 6px; }
.card.night .bar span { flex: 1; border-radius: 2px; min-width: 2px; }
.card.night .barl { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 4px; }

.no-window-banner {
  margin-top: 22px; padding: 14px 18px; border-radius: 12px;
  background: #b94a4a18; border: 1px solid #b94a4a55; color: #f3b4b4;
  display: none; gap: 12px; align-items: center;
}
.no-window-banner .banner-ico { width: 22px; height: 22px; flex: none; }

.meteogram-card { margin-top: 22px; padding: 18px 18px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.meteogram-leg { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 4px 6px 10px; }
.meteogram-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
#meteogram-svg { width: 100%; max-width: 1322px; height: auto; display: block; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-weight: 600; font-size: 13px; }
.p-ex { background: #22c55e22; color: var(--ex); }
.p-good { background: #84cc1622; color: var(--good); }
.p-fair { background: #eab30822; color: var(--fair); }
.p-poor { background: #f9731622; color: var(--poor); }
.p-bad { background: #b94a4a22; color: #e07a7a; }
.veto-why { font-size: 12px; color: #e07a7a; margin-left: 6px; }

.hourly-card { margin-top: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 100%; }
.hourly-scroll { width: 100%; max-width: 100%; max-height: 640px; overflow: auto; -webkit-overflow-scrolling: touch; }
.hourly-card table { width: 100%; min-width: 960px; border-collapse: separate; border-spacing: 0; }
.hourly-card th {
  position: sticky; top: 0; background: var(--card); text-align: left;
  font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; padding: 12px 14px; border-bottom: 1px solid var(--line); z-index: 2;
}
.hourly-card th small { text-transform: none; font-weight: 400; color: #5b647a; }
.hourly-card td { padding: 9px 14px; border-bottom: 1px solid #1d2642; vertical-align: middle; }
.hourly-card tr.nh td { background: #182140; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.hourly-card tr.nh .muted { font-weight: 400; }
.hourly-card tr.veto td { color: #7b8296; }
.hourly-card .ico { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.hourly-card .cb {
  display: inline-block; width: 70px; height: 6px; background: #243052;
  border-radius: 3px; margin-right: 8px; vertical-align: 2px; overflow: hidden;
}
.hourly-card .cb i { display: block; height: 100%; background: #cbd5e1; border-radius: 3px; }
.hourly-card .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: #0b1020; border: 1px solid var(--line); color: var(--muted);
}

.panel { background: var(--card); border: 1px solid var(--line); }

.satellite-card {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem 1rem;
  border-radius: 16px;
}
.satellite-card .sat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.satellite-card .sat-map {
  /* Match demo panel 4 map height so ±350 km fitBounds isn't overly wide */
  height: min(58vh, 520px);
  min-height: 300px;
  margin-top: 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  background: #070b16;
  border: 1px solid var(--line);
}
.satellite-card .sat-meta {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
}
.satellite-card .sat-attr {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  opacity: 0.85;
}
.satellite-card .sat-err {
  margin: 0.5rem 0 0;
  color: #fca5a5;
  font-size: 0.85rem;
}
.satellite-card .sat-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}
.satellite-card .sat-controls input[type="range"] {
  flex: 1 1 140px;
  min-width: 120px;
  accent-color: #7aa2ff;
}
.satellite-card .leaflet-container {
  background: #070b16;
  font: inherit;
}

/* Mobile: sat panel directly under night/simple summary, above long forecast table */
@media (max-width: 768px) {
  .forecast-section {
    display: flex;
    flex-direction: column;
  }
  .forecast-section > .forecast-head { order: 0; }
  .forecast-section > .muted { order: 1; }
  .forecast-section > #simple-view { order: 2; }
  .forecast-section > #standard-rail { order: 3; }
  .forecast-section > #expert-nights { order: 4; }
  .forecast-section > #satellite-card { order: 5; }
  .forecast-section > .forecast-disclaimer { order: 6; }
  .forecast-section > #seeing-panel { order: 7; }
  .forecast-section > #score-strip-card,
  .forecast-section > #meteogram-card { order: 8; }
  .forecast-section > #hourly-head,
  .forecast-section > .hourly-card { order: 9; }
  .satellite-card .sat-map {
    height: min(42vh, 360px);
    min-height: 220px;
  }
}

/* Sign-in + account pages */
.auth-shell { min-height: calc(100vh - 140px); display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.6rem; margin: 0 0 0.35rem; }
.auth-card .lead { margin: 0 0 1.25rem; }
.auth-card .btn { width: 100%; padding: 0.8rem 1.15rem; }
.btn-google { background: #fff; color: #1f2937; border: 1px solid rgba(0,0,0,0.08); }
.btn-google svg { width: 18px; height: 18px; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.82rem; margin: 1.15rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card input[type="email"] { padding: 0.75rem 0.85rem; font-size: 1rem; }
.auth-note { font-size: 0.82rem; margin-top: 1rem; }
.auth-sent { text-align: center; }
.auth-sent .big { font-size: 2.2rem; line-height: 1; margin-bottom: 0.5rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.method-list { list-style: none; padding: 0; margin: 0; }
.method-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.method-list li:last-child { border-bottom: 0; }
.method-list .btn { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.account-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }

/* Landing page */
.landing-hero { padding: 4rem 0 1.5rem; text-align: center; }
.landing-hero h1, .landing-hero p { margin-left: auto; margin-right: auto; }
.landing-hero p { max-width: 44rem; }
.landing-hero .hero-actions { justify-content: center; }
.landing-kicker { color: var(--accent) !important; font-size: 0.85rem !important; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.75rem; }
.shots-section { padding-top: 1rem; }
.shots { position: relative; margin-top: 1.25rem; }
.shots-track {
  display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; border-radius: var(--radius);
}
.shots-track::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 100%; margin: 0; scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.shot a { flex: 1; display: flex; align-items: center; justify-content: center; background: #0b1020; min-height: 260px; padding: 1rem; }
.shot img { display: block; max-width: 100%; max-height: 560px; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
.shot figcaption { padding: 0.9rem 1.15rem 1.1rem; display: flex; flex-direction: column; gap: 0.2rem; text-align: center; }
.shots-nav {
  position: absolute; top: 45%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(11,16,32,0.85); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.shots-nav:hover { border-color: var(--accent); color: var(--accent); }
.shots-prev { left: -14px; }
.shots-next { right: -14px; }
.shots-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; }
.shots-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.shots-dots button[aria-selected="true"] { background: var(--accent); width: 26px; border-radius: 999px; }
@media (max-width: 700px) {
  .shots-nav { display: none; }
  .shot a { min-height: 0; padding: 0.5rem; }
}
.watch-section { text-align: center; }
.landing-video {
  position: relative; width: 100%; max-width: 760px; margin: 1.25rem auto 0; aspect-ratio: 16 / 9;
  background: #0b1020; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
}
.landing-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.landing-video--placeholder { display: flex; align-items: center; justify-content: center; color: #8b93a7; font-size: 0.95rem; border-style: dashed; }
.watch-links { margin-top: 0.9rem; font-size: 0.95rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); padding: 1.15rem; display: flex; flex-direction: column; gap: 0.3rem; }
.steps li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; background: rgba(122,162,255,0.15); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 0.35rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
