@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  --bg-base: #0f1419;
  --bg-elevated: #1a2332;
  --bg-card: rgba(26, 35, 50, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-muted: rgba(255, 255, 255, 0.12);

  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.25);
  --accent-gust: #fbbf24;
  --success: #4ade80;
  --chart-fill: rgba(56, 189, 248, 0.35);
  --chart-gust: rgba(251, 191, 36, 0.9);
  --chart-speed-line: #38bdf8;
  --chart-speed-fill: rgba(56, 189, 248, 0.25);
  --chart-gust-line: #fbbf24;
  --chart-gust-fill: rgba(251, 191, 36, 0.9);
  --chart-forecast-overlay-speed-line: rgba(148, 163, 184, 0.78);
  --chart-forecast-overlay-gust-line: rgba(180, 120, 92, 0.9);
  --chart-forecast-direction-fill: rgba(203, 213, 225, 0.16);
  --chart-forecast-direction-stroke: rgba(148, 163, 184, 0.42);
  --chart-forecast-overlay-divider: rgba(226, 232, 240, 0.26);

  --compass-ring: rgba(255, 255, 255, 0.08);
  --compass-arrow: #ffffff;
  --compass-side-indicator: #64738B;

  --radius: 5px;
  --radius-sm: 5px;
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;

  --ease: 0.2s ease;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.35);
  --widget-footer-bg: rgba(0, 0, 0, 0.25);
  --chart-axis-color: #94a3b8;
  --chart-grid-color: rgba(255, 255, 255, 0.06);
  --chart-container-bg: rgba(0, 0, 0, 0.2);
}

/* ===== TFR warning banner ===== */
.tfr-warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.2) 100%);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
}

.tfr-warning a {
  color: #f87171;
  font-weight: 600;
  margin-left: 0.25em;
}

.tfr-warning a:hover {
  text-decoration: underline;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  padding: var(--space-md);
  text-align: center;
}

/* ===== Widgets layout ===== */
#widgets-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  max-width: 380px;
  margin: 0 auto;
  text-align: left;
}

.station-widget-shell {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wx-section-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Station widget card ===== */
.widget-wrapper {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}

.widget-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.widget-header {
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
  color: var(--text-primary);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  text-align: left;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border-subtle);
}

.widget-title {
  flex: 1;
  min-width: 0;
}

.forecast-model-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.forecast-model-caption {
  opacity: 0.78;
}

.forecast-model-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 12px 0 0;
  margin: 0;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 7px) calc(50% - 1px), calc(100% - 3px) calc(50% - 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.forecast-model-select:focus {
  outline: none;
  color: var(--text-secondary);
}

.widget-collapse-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  transition: color var(--ease);
  flex-shrink: 0;
  box-shadow: none;
}

.widget-collapse-toggle:hover {
  color: var(--text-primary);
}

.widget-collapse-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

.widget-collapse-icon {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--ease);
  margin-top: -2px;
}

.widget-wrapper.is-collapsed .widget-collapse-icon {
  transform: rotate(-135deg);
  margin-top: 1px;
}

.widget-wrapper.is-collapsed .widget-header {
  border-bottom: none;
}

.widget-subheader {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 2px var(--space-md) var(--space-xs);
  text-align: left;
}

/* ===== Weather widget content ===== */
.weather-widget {
  background: transparent;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.weather-widget[hidden] {
  display: none !important;
}

.widget-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: var(--space-md);
}

/* ===== Compass ===== */
.compass-container {
  margin: 0;
  padding: 0;
}

.compass-container svg {
  width: 116px;
  height: 116px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.compass {
  background: radial-gradient(circle at center, var(--compass-ring) 0%, transparent 72%);
}

.cardinal-text {
  font-size: 12px;
  font-weight: 700;
  fill: var(--text-primary);
  font-family: inherit;
}

.numeric-text {
  font-size: 7px;
  fill: var(--text-secondary);
  font-family: inherit;
}

.arrow-group .arrow {
  fill: #ffffff !important;
  filter: drop-shadow(0 1px 3px rgba(255, 255, 255, 0.25));
  transition: fill var(--ease);
}

.west-percentage,
.north-percentage,
.south-percentage {
  font-size: 8px;
  font-family: inherit;
}

.west-percentage {
  fill: var(--compass-side-indicator);
  text-anchor: end;
  dominant-baseline: middle;
}

.north-percentage,
.south-percentage {
  fill: var(--compass-side-indicator);
  text-anchor: middle;
  dominant-baseline: middle;
}

.west-arrow,
.north-arrow,
.south-arrow {
  fill: var(--compass-side-indicator);
}

.compass line {
  stroke: var(--text-muted);
  stroke-width: 0.5;
}

/* ===== Wind info ===== */
.wind-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 108px;
  padding: 4px 0 2px;
}

.wind-info--primary-only {
  justify-content: center;
  min-height: auto;
}

.wind-info--primary-only .wind-primary {
  margin-top: 0;
  transform: translateY(0);
}

.wind-primary {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: -4px;
  transform: translateY(22px);
}

.wind-info .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-align: center;
}

.wind-info .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}

.wind-secondary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  justify-content: center;
  column-gap: 10px;
  row-gap: 0;
  width: max-content;
  margin: 0 auto;
  padding: 5px 8px;
  background: transparent;
  border: none;
  transform: translate(4px, -5px);
}

.wind-secondary-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  min-width: 20px;
}

.wind-secondary-label {
  display: block;
  font-size: 7.8px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7b8798;
  white-space: nowrap;
}

.wind-secondary-value {
  display: block;
  font-size: 15.6px;
  line-height: 1.1;
  font-weight: 600;
  color: #7b8798;
  white-space: nowrap;
}

.wind-secondary-suffix {
  font-size: 0.5em;
  position: relative;
  top: -0.45em;
}

.td-spread-marine {
  color: #4fc3f7 !important;
}

/* ===== Chart ===== */
.chart-container {
  --chart-height: 165px;
  --chart-margin-top: var(--space-sm);
  width: 100%;
  height: var(--chart-height);
  margin-top: var(--chart-margin-top);
  background: var(--chart-container-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
}

/* ===== Widget footer: station link + update timer (outside below card) ===== */
.widget-footer-outer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  margin-top: 6px;
  padding: 2px var(--space-sm) 0;
  font-size: 10px;
  color: var(--text-muted);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  gap: 10px;
}

.station-widget-shell .widget-wrapper,
.station-widget-shell .widget-footer-outer {
  width: 100%;
  max-width: 100%;
}

.mf-footlink {
  flex: 1 1 0;
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--success);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.status-dot.status-stale {
  background: var(--warning, #f59e0b);
  box-shadow: 0 0 6px var(--warning, #f59e0b);
}

.mf-footlink {
  cursor: help;
  position: relative;
}

.mf-footlink .status-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  pointer-events: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.mf-footlink .status-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 14px;
  border: 5px solid transparent;
  border-top-color: rgba(15, 23, 42, 0.95);
}

.mf-footlink:hover .status-tooltip {
  display: block;
}

.widget-footer-outer[hidden] {
  display: none !important;
}

/* Legacy (if still used anywhere) */
.widget-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  background: var(--widget-footer-bg);
  min-height: 36px;
  box-sizing: border-box;
  flex-shrink: 0;
}


.widget-forecast-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
}

.widget-forecast-toggle-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.widget-forecast-toggle-input {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.52);
  border-radius: 2px;
  background: #000000;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.55);
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease);
}

.widget-forecast-toggle:hover .widget-forecast-toggle-text {
  color: var(--text-secondary);
}

.widget-forecast-toggle-input:checked {
  border-color: rgba(56, 189, 248, 0.9);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.96), rgba(14, 165, 233, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(186, 230, 253, 0.18),
    0 0 8px rgba(56, 189, 248, 0.2);
}

.widget-forecast-toggle-input:checked::after {
  content: '';
  display: block;
  width: 3px;
  height: 7px;
  margin: 1px 0 0 4px;
  border: solid rgba(240, 249, 255, 0.96);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

html.theme-light .widget-forecast-toggle-input {
  border-color: rgba(100, 116, 139, 0.45);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

html.theme-light .widget-forecast-toggle-input:checked {
  border-color: rgba(3, 105, 161, 0.85);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.92), rgba(2, 132, 199, 0.95));
  box-shadow:
    inset 0 0 0 1px rgba(240, 249, 255, 0.16),
    0 0 8px rgba(2, 132, 199, 0.18);
}

.widget-forecast-toggle-input:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.5);
  outline-offset: 2px;
}


.blinkdot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: var(--success);
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px var(--success);
}

.mf-footlink a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 10px;
  transition: color var(--ease);
}

.mf-footlink a:hover {
  color: var(--accent);
}

/* ===== Tide chart widget ===== */
#tideChartWidget {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}

#tideChartWidget:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

#tideChartWidget .widget-header {
  border-bottom: 1px solid var(--border-subtle);
}

#tideChartContainer {
  width: 100%;
  height: 200px;
  background: var(--chart-container-bg);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: var(--space-sm);
  overflow: hidden;
}

#tideChart {
  width: 100% !important;
  height: 100% !important;
}

/* ===== Horizontal rules ===== */
.tide-section-divider {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 8px;
}

.tide-section-divider hr {
  margin: 6px 0;
}

hr {
  width: 80px;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-muted), transparent);
  margin: var(--space-sm) 0;
}

/* ===== YouTube iframes ===== */
iframe {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 360px;
  width: 100%;
  transition: transform var(--ease), box-shadow var(--ease);
}

#wx-section-video1 iframe,
#wx-section-video2 iframe,
#wx-section-video3 iframe,
#wx-section-video4 iframe,
#wx-section-cheetah iframe {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

iframe:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ===== Fog cam ===== */
#fog {
  width: 100%;
  max-width: 360px;
  height: 280px;
  background-image: url('https://fog.today/current.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto;
  transition: transform var(--ease), box-shadow var(--ease);
}

#fog:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

#fog-link {
  display: inline-block;
}

/* ===== Slideshow ===== */
#slideshow {
  width: 100%;
  max-width: 360px;
  height: 220px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-sm);
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}

#slideshow:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

#slideshow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  border-radius: var(--radius-sm);
}

/* ===== Forecast thumbnail ===== */
.thumbnail {
  max-width: 360px;
  margin: 0 auto;
}

.thumbnail p {
  margin: 0;
}

.thumbnail a {
  display: block;
}

.mfforcast {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}

.mfforcast:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

#wx-section-forecast {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

#forecastWidget {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.forecast-profiler-widget {
  margin: 0 auto;
}

.forecast-widget-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forecast-chart-shell {
  width: 100%;
  height: 296px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--chart-container-bg);
  padding: 8px 8px 4px;
  box-sizing: border-box;
  touch-action: pan-y;
  -ms-touch-action: pan-y;
}

.forecast-chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
}

.forecast-scroll-wrap {
  display: flex;
  align-items: center;
  padding: 2px 0 4px;
}

.forecast-scroll-slider {
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

.forecast-scroll-slider:disabled {
  opacity: 0.4;
  cursor: default;
}

.forecast-scroll-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(14, 165, 233, 0.34)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.forecast-scroll-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.5);
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(125, 211, 252, 0.95) 45%, rgba(2, 132, 199, 0.95) 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

.forecast-scroll-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(14, 165, 233, 0.34)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.forecast-scroll-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.5);
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(125, 211, 252, 0.95) 45%, rgba(2, 132, 199, 0.95) 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

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

.forecast-resource-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.76rem;
  text-decoration: none;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.forecast-resource-link:hover {
  color: var(--text-primary);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

.forecast-windy-shell {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--chart-container-bg);
}

.forecast-windy-frame {
  display: block;
  width: 100%;
  max-width: none;
  height: 384px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.forecast-windy-frame:hover {
  transform: none;
  box-shadow: none;
}

.fog-today-widget {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  overflow: hidden;
}

.fog-today-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.fog-today-link {
  display: block;
}

.fog-today-head {
  text-align: left;
}

.fog-today-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
}

.fog-today-subtitle {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.fog-today-image-shell {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  justify-content: center;
}

.fog-today-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.fog-today-footer {
  display: flex;
  justify-content: flex-start;
}

.fog-today-cta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--ease), opacity var(--ease);
}

.fog-today-widget:hover .fog-today-cta {
  color: #7dd3fc;
}

.fog-today-widget:hover .fog-today-image-shell {
  border-color: rgba(56, 189, 248, 0.28);
}

html.theme-light .fog-today-subtitle {
  color: #475569;
}

html.theme-light .fog-today-image-shell {
  background: rgba(248, 250, 252, 0.82);
  border-color: rgba(148, 163, 184, 0.22);
}

html.theme-light .fog-today-widget:hover .fog-today-cta {
  color: #0284c7;
}

/* ===== Center links ===== */
center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

center a {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--ease);
  min-width: 100px;
  text-align: center;
}

center a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}

/* ===== Info page ===== */
.info-page #wx-page-content {
  max-width: 980px;
  margin: 0 auto;
}

.info-page #widgets-container.info-page-stack {
  width: 100%;
  max-width: 980px;
  align-items: stretch;
}

.info-card {
  max-width: 100%;
}

.info-card-body {
  gap: 12px;
}

.info-card-body p,
.info-card-body li {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.info-card-body code {
  font-size: 0.9em;
  color: var(--text-primary);
}

.info-card-kicker {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.info-contact-card .info-card-body {
  align-items: flex-start;
}

.info-contact-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.info-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-primary) !important;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--ease), border-color var(--ease), background var(--ease), color var(--ease);
}

.info-contact-link:hover,
.info-contact-link:active {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent) !important;
}

html.theme-light .info-card-body p,
html.theme-light .info-card-body li {
  color: #334155;
}

html.theme-light .info-contact-link {
  border-color: rgba(3, 105, 161, 0.22);
  background: rgba(3, 105, 161, 0.08);
  color: #0f172a !important;
}

html.theme-light .info-contact-link:hover,
html.theme-light .info-contact-link:active {
  border-color: rgba(2, 132, 199, 0.38);
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1 !important;
}

.compass-page #wx-page-content,
.sandbox-page #wx-page-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1180px;
}

.compass-page #widgets-container.compass-page-stack,
.sandbox-page #widgets-container.sandbox-page-stack {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.compass-page .widget-wrapper,
.sandbox-page .widget-wrapper {
  max-width: none;
}

.compass-page-body,
.sandbox-widget-body {
  gap: 20px;
}

.sandbox-widget-body {
  gap: 12px;
}

.compass-page-copy,
.sandbox-widget-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compass-page-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: center;
}

.compass-canvas-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.14);
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.08), rgba(0, 0, 0, 0.2) 54%), #121b28;
  padding: 20px;
}

.compass-canvas-shell canvas {
  display: block;
  width: 100%;
  max-width: 580px;
  height: auto;
  background: transparent;
}

.compass-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.compass-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.18);
}

.compass-control label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.compass-control-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.compass-control-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.compass-slider-input {
  width: 100%;
  accent-color: var(--accent);
}

.compass-number-input {
  width: 110px;
  border-radius: 10px;
  border: 1px solid var(--border-muted);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}

.profiler-chart-stage {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.profiler-graphic-shell {
  position: relative;
  border-radius: 0;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.18);
  padding: 0;
  overflow: hidden;
}

.profiler-plot-shell {
  flex: 1;
  min-width: 0;
}

.profiler-plot-shell svg {
  display: block;
  width: 100%;
  height: auto;
}

.profiler-legend {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 28px;
  min-width: 28px;
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.58rem;
  font-weight: 600;
  text-align: center;
  line-height: 0.95;
  padding: 6px 3px;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.profiler-legend-max,
.profiler-legend-min {
  display: block;
  line-height: 0.95;
}

.profiler-inversion-inline {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  margin: 2px 0 -2px;
}

.profiler-inversion-label,
.profiler-inversion-unit {
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profiler-inversion-value {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.profiler-inversion-unit[hidden] {
  display: none;
}

.profiler-scrubber-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 8px 8px;
  margin-top: 8px;
  background: #101722;
}

.profiler-date-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.profiler-scrubber-labels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
}

.profiler-scrubber-labels span {
  text-align: center;
  color: var(--text-primary);
}

.profiler-history-slider {
  width: 100%;
  appearance: none;
  height: 18px;
  border-radius: 999px;
  background: #101722;
  border: 1px solid rgba(125, 211, 252, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34);
}

.profiler-history-slider::-webkit-slider-thumb {
  appearance: none;
  width: 60px;
  height: 16px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0 18px,
      rgba(255, 255, 255, 0.12) 18px 21px,
      rgba(255, 255, 255, 0) 21px 33px
    ),
    linear-gradient(180deg, rgba(26, 36, 52, 0.98), rgba(15, 23, 36, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: grab;
  margin-top: 0;
}

.profiler-history-slider::-moz-range-thumb {
  width: 60px;
  height: 16px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0 18px,
      rgba(255, 255, 255, 0.12) 18px 21px,
      rgba(255, 255, 255, 0) 21px 33px
    ),
    linear-gradient(180deg, rgba(26, 36, 52, 0.98), rgba(15, 23, 36, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: grab;
}

.profiler-history-slider::-moz-range-track {
  height: 18px;
  border-radius: 999px;
  background: #101722;
  border: 1px solid rgba(125, 211, 252, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34);
}

.profiler-legend-bar {
  flex: 1;
  width: 2px;
  min-height: 112px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e5413b 0%, #ff882e 14%, #ffde4a 30%, #5fe15c 50%, #00dbb8 66%, #00aaff 82%, #143ddd 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.profiler-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.profiler-chart-top-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.profiler-chart-top-control .forecast-model-select {
  min-width: 112px;
}

.profiler-source-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease;
}

.profiler-source-link:hover,
.profiler-source-link:active {
  color: var(--text-primary);
}

.profiler-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
  color: var(--text-primary);
  font-size: 0.83rem;
  line-height: 1.45;
}

.profiler-flow-shell {
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background:
    radial-gradient(circle at 14% 18%, rgba(56, 189, 248, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(12, 18, 30, 0.96), rgba(7, 12, 20, 0.94));
  padding: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.profiler-flow-shell canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
}

.profiler-error-state {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

html.theme-light .compass-control {
  background: rgba(255, 255, 255, 0.72);
}

html.theme-light .compass-number-input {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
}

html.theme-light .profiler-scrubber-labels {
  color: #475569;
}

html.theme-light .profiler-scrubber-labels span:nth-child(2) {
  color: #0f172a;
}

html.theme-light .profiler-history-slider {
  background: #101722;
  border-color: rgba(14, 165, 233, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(148, 163, 184, 0.14);
}

html.theme-light .profiler-history-slider::-moz-range-track {
  background: #101722;
  border-color: rgba(14, 165, 233, 0.22);
}

html.theme-light .profiler-flow-shell {
  border-color: rgba(2, 132, 199, 0.14);
  background:
    radial-gradient(circle at 14% 18%, rgba(2, 132, 199, 0.10), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.86));
}

@media (max-width: 760px) {
  .profiler-chart-stage {
    flex-direction: column;
    gap: 4px;
  }

  .profiler-legend {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border: 0;
    background: transparent;
    font-size: 0.54rem;
  }

  .profiler-graphic-shell {
    padding: 0;
  }

  .profiler-scrubber-wrap {
    gap: 0;
    padding: 0 0 8px;
    margin-top: 8px;
  }

  .profiler-inversion-inline {
    font-size: 0.94rem;
  }

  .profiler-inversion-label,
  .profiler-inversion-unit {
    font-size: 0.68rem;
  }

  .profiler-inversion-value {
    font-size: 0.94rem;
  }

  .profiler-date-footer {
    margin-top: 6px;
    font-size: 0.72rem;
  }

  .profiler-scrubber-labels {
    font-size: 0.78rem;
  }

  .profiler-source-row {
    gap: 10px;
    font-size: 0.82rem;
  }

  .profiler-chart-top-control {
    font-size: 0.82rem;
  }

  .profiler-warning {
    font-size: 0.78rem;
  }

  .profiler-legend-bar {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 2px;
    background: linear-gradient(90deg, #143ddd 0%, #00aaff 18%, #00dbb8 34%, #5fe15c 50%, #ffde4a 70%, #ff882e 86%, #e5413b 100%);
  }
}

@media (max-width: 920px) {
  .compass-page-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-toggle-dock {
    gap: 12px;
    padding: var(--space-sm) var(--space-md) var(--space-lg);
  }

  .page-toggle-dock .theme-toggle-wrap,
  .page-toggle-dock .temp-toggle-wrap {
    width: 100%;
  }

  .info-contact-actions,
  .profiler-source-row {
    align-items: stretch;
  }

  .profiler-widget .profiler-chart-stage {
    margin-left: calc(var(--space-md) * -1);
    margin-right: calc(var(--space-md) * -1);
  }

  .profiler-legend {
    padding: 2px 5px;
    font-size: 0.5rem;
  }

  .profiler-graphic-shell {
    padding: 0;
  }

  .profiler-scrubber-labels {
    font-size: 0.72rem;
  }

  .profiler-legend-bar {
    height: 2px;
  }

  .profiler-chart-top-control .forecast-model-select {
    min-width: 96px;
  }

  .profiler-flow-shell {
    padding: 10px;
  }

  .compass-canvas-shell {
    padding: 14px;
  }

  .compass-control {
    padding: 16px;
  }
}

a:link,
a:visited {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover,
a:active {
  color: var(--accent);
}

/* ===== Widget entrance ===== */
@keyframes fadeIn {
  from {
    opacity: 0.6;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.widget-wrapper {
  animation: fadeIn 0.4s ease forwards;
}

.widget-wrapper:nth-child(1) { animation-delay: 0s; }
.widget-wrapper:nth-child(2) { animation-delay: 0.06s; }
.widget-wrapper:nth-child(3) { animation-delay: 0.12s; }
.widget-wrapper:nth-child(4) { animation-delay: 0.18s; }
.widget-wrapper:nth-child(5) { animation-delay: 0.24s; }

@media (max-width: 1179px) {
  .wind-primary {
    transform: translateY(11px);
  }

  .wx-section-wrap[data-wx-section-id="video4"] + .wx-section-wrap[data-wx-section-id="forecast"] {
    margin-top: 18px;
  }

  .widget-forecast-toggle-text {
    font-size: 7px;
  }
}

@media (min-width: 1180px) {
  #wx-page-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 480px));
    gap: 36px;
    max-width: 996px;
    margin: 0 auto;
    align-items: start;
    justify-content: center;
    justify-items: stretch;
  }

  #wx-page-content > br {
    display: none;
  }

  #wx-page-content > .tfr-warning,
  #wx-page-content > .wx-section-wrap[data-wx-section-id="slideshow"],
  #wx-page-content > .wx-section-wrap[data-wx-section-id="forecast"],
  #wx-page-content > .wx-section-wrap[data-wx-section-id="bayareafog"],
  #wx-page-content > .wx-section-wrap[data-wx-section-id="links"] {
    grid-column: 1 / -1;
  }

  #widgets-container {
    display: contents;
  }

  .station-widget-shell {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .station-widget-shell .widget-wrapper {
    max-width: 100%;
  }

  .station-widget-shell .widget-header {
    padding: 13px 15px;
    font-size: 0.77rem;
  }

  .station-widget-shell .widget-collapse-toggle {
    width: 18px;
    height: 18px;
  }

  .station-widget-shell .weather-widget {
    padding: 24px;
  }

  .info-page #wx-page-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 980px;
  }

  .info-page #widgets-container.info-page-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .info-page .info-card:first-child,
  .info-page .info-contact-card {
    grid-column: 1 / -1;
  }

  .station-widget-shell .widget-content {
    gap: 24px;
  }

  .station-widget-shell .compass-container svg {
    width: 170px;
    height: 170px;
  }

  .station-widget-shell .cardinal-text {
    font-size: 12px;
  }

  .station-widget-shell .numeric-text {
    font-size: 9px;
  }

  .station-widget-shell .west-percentage,
  .station-widget-shell .north-percentage,
  .station-widget-shell .south-percentage {
    font-size: 7px;
  }

  .station-widget-shell .wind-info {
    min-height: 156px;
  }

  .station-widget-shell .wind-info .label {
    font-size: 14px;
  }

  .station-widget-shell .wind-info .value {
    font-size: 2.45rem;
  }

  .station-widget-shell .wind-secondary-label {
    font-size: 10px;
  }

  .station-widget-shell .wind-secondary-value {
    font-size: 20px;
  }

  .station-widget-shell .chart-container {
    --chart-height: 180px;
    --chart-margin-top: 18px;
    height: var(--chart-height);
    margin-top: var(--chart-margin-top);
    padding: 6px 10px 10px;
  }

  .station-widget-shell .widget-footer-outer {
    margin-top: 10px;
    padding: 4px 12px 0;
    font-size: 12px;
  }

  .station-widget-shell .mf-footlink a {
    font-size: 12px;
  }

  .wx-section-wrap[data-wx-section-id="tide"] {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    margin-top: 0;
    justify-self: stretch;
  }

  .wx-section-wrap[data-wx-section-id="forecast"] {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    justify-self: stretch;
  }

  .wx-section-wrap[data-wx-section-id="video1"],
  .wx-section-wrap[data-wx-section-id="video2"],
  .wx-section-wrap[data-wx-section-id="video3"],
  .wx-section-wrap[data-wx-section-id="video4"],
  .wx-section-wrap[data-wx-section-id="cheetah"] {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    justify-self: stretch;
  }

  .wx-section-wrap[data-wx-section-id="video1"] br,
  .wx-section-wrap[data-wx-section-id="video2"] br,
  .wx-section-wrap[data-wx-section-id="video3"] br,
  .wx-section-wrap[data-wx-section-id="video4"] br,
  .wx-section-wrap[data-wx-section-id="cheetah"] br {
    display: none;
  }

  #wx-section-video1,
  #wx-section-video2,
  #wx-section-video3,
  #wx-section-video4,
  #wx-section-cheetah {
    width: 100%;
  }

  #wx-section-video1 iframe,
  #wx-section-video2 iframe,
  #wx-section-video3 iframe,
  #wx-section-video4 iframe,
  #wx-section-cheetah iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .wx-section-wrap[data-wx-section-id="tide"] .tide-section-divider {
    display: none;
  }

  #forecastWidget {
    max-width: 100%;
    margin: 0;
  }

  .forecast-profiler-widget {
    max-width: 100%;
    margin: 0;
  }

  #forecastWidget .widget-header {
    padding: 13px 15px;
    font-size: 0.77rem;
  }

  .forecast-model-label {
    font-size: 0.58rem;
  }

  .forecast-widget-body {
    padding: 18px;
    gap: 16px;
  }

  .forecast-chart-shell {
    height: 336px;
  }

  .forecast-windy-frame {
    height: 432px;
  }

  #wx-section-bayareafog {
    width: 100%;
  }

  #wx-section-bayareafog .fog-today-widget {
    max-width: 100%;
    margin: 0;
  }

  #wx-section-bayareafog .fog-today-body {
    gap: 18px;
    padding: 24px 20px 18px;
  }

  #wx-section-bayareafog .fog-today-title {
    font-size: 1.7rem;
  }

  #wx-section-bayareafog .fog-today-subtitle {
    font-size: 1rem;
  }

  #wx-section-bayareafog .fog-today-image-shell {
    padding: 0;
  }

  #wx-section-bayareafog .fog-today-image {
    width: min(100%, 760px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
  }

  #wx-section-bayareafog .fog-today-footer {
    padding-top: 2px;
  }

  #wx-section-bayareafog .fog-today-cta {
    font-size: 0.95rem;
  }

  #tideChartWidget {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #tideChartWidget .widget-header {
    padding: 13px 15px;
    font-size: 0.77rem;
  }

  #tideChartContainer {
    height: 430px;
    padding: 10px;
  }

  #widgets-container > p {
    grid-column: 1 / -1;
  }
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
  body {
    padding: var(--space-sm);
  }

  .widget-wrapper,
  #tideChartWidget,
  #fog,
  #slideshow,
  iframe {
    max-width: 100%;
  }

  .compass-container svg {
    width: 100px;
    height: 100px;
  }

  .wind-info .value {
    font-size: 1.3rem;
  }

  .chart-container {
    --chart-height: 155px;
    height: var(--chart-height);
  }

  #tideChartContainer {
    height: 220px;
  }

  #fog {
    height: 240px;
  }

  #slideshow {
    height: 180px;
  }
}

/* ===== Light theme (class on html only) ===== */
html.theme-light {
  --bg-base: #e8ecf1;
  --bg-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.98);
  --border-subtle: rgba(0, 0, 0, 0.1);
  --border-muted: rgba(0, 0, 0, 0.15);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --accent: #0369a1;
  --accent-soft: rgba(3, 105, 161, 0.15);
  --compass-ring: rgba(0, 0, 0, 0.08);
  --compass-arrow: #0f172a;
  --compass-side-indicator: #94A3B8;
  --widget-footer-bg: rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --chart-axis-color: #475569;
  --chart-grid-color: rgba(0, 0, 0, 0.1);
  --chart-speed-line: #0284c7;
  --chart-speed-fill: rgba(2, 132, 199, 0.3);
  --chart-gust-line: #b45309;
  --chart-gust-fill: rgba(180, 83, 9, 0.85);
  --chart-forecast-overlay-speed-line: rgba(148, 163, 184, 0.74);
  --chart-forecast-overlay-gust-line: rgba(154, 102, 78, 0.88);
  --chart-forecast-direction-fill: rgba(148, 163, 184, 0.12);
  --chart-forecast-direction-stroke: rgba(100, 116, 139, 0.72);
  --chart-forecast-overlay-divider: rgba(71, 85, 105, 0.28);
  --chart-container-bg: #ffffff;
}

html.theme-light .arrow-group .arrow {
  fill: #0f172a !important;
}

html.theme-light .compass-container svg {
  filter: none;
}

html.theme-light .compass {
  background: none;
}

html.theme-light .cardinal-text,
html.theme-light .numeric-text {
  text-shadow: none;
}

/* Light theme: ensure all text and UI are readable */
html.theme-light .wind-info .value {
  color: #0f172a;
}

html.theme-light .wind-info .label {
  color: #475569;
}

html.theme-light .wind-secondary-metrics {
  background: transparent;
  border: none;
}

html.theme-light .wind-secondary-label {
  color: #64748b;
}

html.theme-light .wind-secondary-value {
  color: #64748b;
}

html.theme-light .widget-footer,
html.theme-light .widget-footer-outer {
  color: #334155;
}

html.theme-light .mf-footlink a {
  color: #0369a1;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html.theme-light .mf-footlink a:hover {
  color: #0284c7;
}

html.theme-light .chart-container,
html.theme-light #tideChartContainer {
  background: #ffffff !important;
}

html.theme-light .chart-container canvas,
html.theme-light #tideChartContainer canvas {
  background: #ffffff !important;
}

/* Light theme: tide chart line/fill (same vars used by JS) */

html.theme-light .cardinal-text {
  fill: #0f172a;
}

html.theme-light .numeric-text {
  fill: #334155;
}

html.theme-light .compass line {
  stroke: #64748b;
}

html.theme-light .west-percentage {
  fill: #334155;
}

html.theme-light .north-percentage,
html.theme-light .south-percentage {
  fill: #475569;
}

/* Footer/center links (Windy, TFRs, Admin, etc.) */
html.theme-light center a,
html.theme-light .theme-toggle-wrap label,
html.theme-light .temp-toggle-label,
html.theme-light .temp-toggle-unit {
  color: #0369a1;
}

html.theme-light center a:hover {
  color: #0284c7;
}

/* TFR warning in light mode */
html.theme-light .tfr-warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
  border-color: rgba(220, 38, 38, 0.5);
  color: #1e293b;
}

html.theme-light .tfr-warning a {
  color: #dc2626;
}

/* Theme toggle at bottom of page */
.page-toggle-dock {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.theme-toggle-wrap {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.page-toggle-dock .theme-toggle-wrap,
.page-toggle-dock .temp-toggle-wrap {
  margin: 0;
  padding: 0;
}

.theme-toggle-wrap label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.temp-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.temp-toggle-label,
.temp-toggle-unit {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.temp-toggle-unit {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wx-temp-value {
  white-space: nowrap;
}

.theme-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-muted);
  border-radius: 13px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}

.theme-toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--ease), background var(--ease);
}

.theme-toggle input:checked + .theme-toggle-slider::before {
  transform: translateX(22px);
  background: var(--accent);
}

.theme-toggle input:focus-visible + .theme-toggle-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Marine Layer Widget ──────────────────────────────────────── */

.ml-widget { max-width: 100%; }

.ml-hero {
  text-align: center;
  padding: 16px 12px 12px;
}
.ml-hero-depth {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.ml-hero-number {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}
.ml-hero-unit {
  font-size: 0.95rem;
  opacity: 0.6;
  font-weight: 500;
}
.ml-hero-label {
  font-size: 2rem;
  font-weight: 600;
}
.ml-hero-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.ml-status-green .ml-hero-number,
.ml-status-green .ml-hero-label { color: #4caf50; }
.ml-status-yellow .ml-hero-number { color: #ffc107; }
.ml-status-red .ml-hero-number { color: #f44336; }
.ml-status-gray .ml-hero-number,
.ml-status-gray .ml-hero-label { color: rgba(255,255,255,0.5); }

.ml-hero-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.5;
}
.ml-conf-badge {
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}
.ml-conf-high { background: rgba(76,175,80,0.2); color: #81c784; }
.ml-conf-medium { background: rgba(255,193,7,0.2); color: #ffd54f; }
.ml-conf-low { background: rgba(244,67,54,0.15); color: #ef9a9a; }

/* Assessment */
.ml-assessment {
  margin: 0 12px 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(255,255,255,0.15);
  font-size: 0.82rem;
  line-height: 1.45;
}
.ml-assessment p { margin: 0; }
.ml-assessment.ml-status-green { border-left-color: #4caf50; }
.ml-assessment.ml-status-yellow { border-left-color: #ffc107; }
.ml-assessment.ml-status-red { border-left-color: #f44336; }
.ml-assess-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.ml-status-green .ml-assess-dot { background: #4caf50; }
.ml-status-yellow .ml-assess-dot { background: #ffc107; }
.ml-status-red .ml-assess-dot { background: #f44336; }
.ml-status-gray .ml-assess-dot { background: rgba(255,255,255,0.3); }
.ml-assess-sub {
  margin-top: 4px !important;
  opacity: 0.65;
  font-size: 0.78rem;
}

/* Station cards */
.ml-stations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px 12px;
}
.ml-station-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 10px 12px;
}
.ml-station-card.has-ml {
  border-color: rgba(255,193,7,0.2);
}
.ml-stn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ml-stn-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ml-stn-id {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}
.ml-stn-location {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.48);
  line-height: 1.2;
}
.ml-stn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.ml-dot-active { background: #ffc107; }
.ml-dot-clear { background: #4caf50; }
.ml-stn-clouds {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2px;
}
.ml-stn-base {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffd54f;
  margin-bottom: 2px;
}
.ml-stn-wx {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  opacity: 0.55;
}
/* Section headers with explanations */
.ml-section-header {
  padding: 10px 14px 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}
.ml-section-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2px;
}
.ml-section-desc {
  display: block;
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}

.ml-stn-wind {
  font-size: 0.72rem;
  opacity: 0.5;
  margin-top: 1px;
}
.ml-spread-marine {
  color: #4fc3f7 !important;
  font-weight: 600;
  opacity: 1 !important;
}
.ml-stn-time {
  font-size: 0.68rem;
  opacity: 0.4;
  margin-top: 3px;
}

.ml-station-map-card {
  margin: 0 12px 12px;
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.ml-station-map {
  display: block;
  width: 100%;
  height: clamp(340px, 54vw, 520px);
  background: linear-gradient(180deg, rgba(8,17,29,0.68), rgba(8,17,29,0.22));
}
.ml-station-map .leaflet-control-zoom {
  border: none;
  box-shadow: 0 12px 26px rgba(0,0,0,0.24);
}
.ml-station-map .leaflet-control-zoom a {
  background: rgba(15,23,42,0.92);
  color: #e2e8f0;
  border: 1px solid rgba(148,163,184,0.28);
}
.ml-station-map .leaflet-control-zoom a:hover {
  background: rgba(30,41,59,0.98);
  color: #ffffff;
}
.ml-station-map .leaflet-control-attribution {
  background: rgba(8,17,29,0.72);
  color: rgba(226,232,240,0.74);
  font-size: 10px;
  padding: 2px 6px;
}
.ml-station-map .leaflet-control-attribution a {
  color: #cbd5e1;
}
.ml-map-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 500;
  pointer-events: none;
}
.ml-map-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  max-width: min(100%, 420px);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8,17,29,0.78);
  border: 1px solid rgba(148,163,184,0.24);
  box-shadow: 0 12px 24px rgba(2,6,23,0.28);
}
.ml-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(248,250,252,0.9);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.ml-map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(248,250,252,0.92);
  background: #94a3b8;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(15,23,42,0.36);
}
.ml-map-legend-dot.marine-air {
  background: #38bdf8;
  border-color: #d7f4ff;
}
.ml-map-legend-dot.not-marine {
  background: #facc15;
  border-color: #fff7cc;
}
.leaflet-tooltip.ml-map-tooltip {
  background: transparent;
  border: none;
  color: #ffffff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0;
  border-radius: 0;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.95),
    0 0 10px rgba(0,0,0,0.65);
}
.leaflet-tooltip.ml-map-tooltip:before {
  display: none;
}
.leaflet-popup.ml-map-popup .leaflet-popup-content-wrapper {
  background: rgba(8,17,29,0.9);
  color: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(2,6,23,0.32);
}
.leaflet-popup.ml-map-popup .leaflet-popup-content {
  margin: 10px 12px;
  line-height: 1.45;
  font-size: 12px;
}
.leaflet-popup.ml-map-popup .leaflet-popup-tip {
  background: rgba(8,17,29,0.9);
 }
.leaflet-popup.ml-map-popup strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* Sounding panel */
.ml-sounding-panel {
  margin: 0 12px 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.ml-snd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.ml-snd-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ml-snd-current {
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255,255,255,0.56);
}
.ml-snd-time {
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.5;
  white-space: nowrap;
}
.ml-snd-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.ml-snd-stat { text-align: center; flex: 1; }
.ml-snd-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff6b35;
}
.ml-snd-lbl {
  display: block;
  font-size: 0.65rem;
  opacity: 0.45;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.ml-snd-none {
  font-size: 0.8rem;
  opacity: 0.5;
  margin: 0;
}
.ml-snd-note {
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.58);
  margin: 0;
}
.ml-temp-profile {
  margin-top: 6px;
}
.ml-temp-profile canvas {
  display: block;
  width: 100%;
  height: 270px;
}

.ml-profiler-panel {
  margin: 0 12px 12px;
  padding: 10px 14px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.ml-profiler-site-link,
.ml-profiler-links a {
  color: #8ec6ff;
  text-decoration: none;
}
.ml-profiler-site-link:hover,
.ml-profiler-site-link:active,
.ml-profiler-links a:hover,
.ml-profiler-links a:active {
  color: #b9dcff;
}
.ml-profiler-image-link {
  display: block;
  margin-top: 8px;
}
.ml-profiler-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(9,16,27,0.85);
}
.ml-profiler-links {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.74rem;
}

/* Temp profile canvas */
.ml-temp-profile {
  width: 100%;
  margin-top: 4px;
}
.ml-temp-profile canvas {
  width: 100%;
  height: 200px;
  border-radius: 6px;
}

/* SST row */
.ml-sst-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 0.82rem;
}
.ml-sst-label {
  font-weight: 600;
  opacity: 0.7;
}
.ml-sst-val {
  font-weight: 700;
  color: #4fc3f7;
}
.ml-sst-air {
  opacity: 0.5;
  font-size: 0.75rem;
}
.ml-sst-time {
  margin-left: auto;
  opacity: 0.5;
  font-size: 0.72rem;
  white-space: nowrap;
}
.ml-buoy-timeline {
  margin-top: -2px;
}

/* Trend chart */
.ml-timeline {
  margin: 0 12px 12px;
}
.ml-timeline-header {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.7;
}
.ml-timeline canvas {
  width: 100%;
  height: 160px;
  border-radius: 6px;
}
.ml-gradient-note {
  margin: -2px 12px 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.ml-gradient-note p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.58);
}
.ml-gradient-note p + p {
  margin-top: 8px;
}
.ml-gradient-note strong {
  color: rgba(255,255,255,0.82);
  font-weight: 600;
}

/* Mobile */
@media (max-width: 760px) {
  .ml-stations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0 8px 8px;
  }
  .ml-station-card { padding: 8px 10px; }
  .ml-stn-id { font-size: 0.75rem; }
  .ml-stn-location { font-size: 0.66rem; }
  .ml-stn-clouds { font-size: 0.72rem; }
  .ml-hero-number { font-size: 2.2rem; }
  .ml-assessment { margin: 0 8px 8px; font-size: 0.78rem; }
  .ml-sounding-panel { margin: 0 8px 8px; }
  .ml-profiler-panel { margin: 0 8px 8px; }
  .ml-timeline { margin: 0 8px 8px; }
  .ml-gradient-note {
    margin: -2px 8px 8px;
    padding: 9px 10px;
  }
  .ml-gradient-note p {
    font-size: 0.69rem;
  }
  .ml-station-map-card { margin: 0 8px 8px; }
  .ml-station-map { height: 320px; }
  .ml-map-overlay {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .ml-map-legend {
    gap: 8px 10px;
    padding: 8px 10px;
  }
  .ml-map-legend-item { font-size: 10px; }
  .leaflet-tooltip.ml-map-tooltip {
    font-size: 10px;
  }
  .ml-sst-row { flex-wrap: wrap; }
  .ml-sst-time {
    width: 100%;
    margin-left: 0;
  }
  .ml-snd-stats { gap: 10px; }
  .ml-snd-val { font-size: 0.95rem; }
  .ml-snd-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ml-snd-time {
    width: 100%;
    white-space: normal;
  }
  .ml-snd-current {
    font-size: 0.66rem;
  }
  .ml-temp-profile canvas {
    height: 240px;
  }
  .ml-profiler-links { flex-wrap: wrap; gap: 10px; }
}

/* Light theme */
.theme-light .ml-hero-depth {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .ml-status-green .ml-hero-number,
.theme-light .ml-status-green .ml-hero-label { color: #2e7d32; }
.theme-light .ml-status-yellow .ml-hero-number { color: #f9a825; }
.theme-light .ml-status-red .ml-hero-number { color: #c62828; }
.theme-light .ml-station-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .ml-station-card.has-ml { border-color: rgba(249,168,37,0.3); }
.theme-light .ml-assessment {
  background: rgba(0,0,0,0.02);
}
.theme-light .ml-sounding-panel {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .ml-station-map-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .ml-gradient-note {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .ml-gradient-note p {
  color: rgba(15,23,42,0.68);
}
.theme-light .ml-gradient-note strong {
  color: rgba(15,23,42,0.84);
}
.theme-light .ml-snd-note {
  color: rgba(15,23,42,0.62);
}
.theme-light .ml-snd-current {
  color: rgba(15,23,42,0.58);
}
.theme-light .ml-stn-clouds { color: rgba(0,0,0,0.6); }
.theme-light .ml-stn-base { color: #e65100; }
.theme-light .ml-station-map {
  background: linear-gradient(180deg, rgba(226,232,240,0.72), rgba(255,255,255,0.4));
}
.theme-light .ml-station-map .leaflet-control-zoom a {
  background: rgba(255,255,255,0.94);
  color: #0f172a;
  border-color: rgba(15,23,42,0.12);
}
.theme-light .ml-station-map .leaflet-control-attribution {
  background: rgba(255,255,255,0.84);
  color: rgba(15,23,42,0.66);
}
.theme-light .ml-station-map .leaflet-control-attribution a {
  color: #1d4ed8;
}
.theme-light .ml-map-legend {
  background: rgba(255,255,255,0.9);
  border-color: rgba(15,23,42,0.08);
}
.theme-light .ml-map-legend-item { color: rgba(15,23,42,0.82); }
.theme-light .leaflet-popup.ml-map-popup .leaflet-popup-content-wrapper,
.theme-light .leaflet-popup.ml-map-popup .leaflet-popup-tip {
  background: rgba(255,255,255,0.96);
  color: #0f172a;
}
.theme-light .ml-hero-note,
.theme-light .ml-stn-location { color: rgba(0,0,0,0.48); }
.theme-light .ml-profiler-panel {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .ml-profiler-image {
  border-color: rgba(0,0,0,0.08);
  background: rgba(225,232,241,0.9);
}
.theme-light .ml-profiler-site-link,
.theme-light .ml-profiler-links a {
  color: #1c5f96;
}
