/* ─── Design tokens ───────────────────────────────────────── */
:root {
  --sidebar-w: 352px;
  --map-panel-border: 1px solid rgba(255, 255, 255, 0.1);
  --map-panel-radius: 6px;
  --map-panel-blur: 12px;
  --map-panel-surface: rgba(10, 12, 16, 0.82);
  --map-gold: #c9b46a;
  --map-gold-deep: #a89040;
  --msc-blue: #1f2593;
  --msc-blue-bright: #757de8;
  --msc-blue-soft: #949bf2;
  --msc-blue-hover: #2832a8;
  --msc-blue-pressed: #181f7a;
  --font-saira: "Saira", system-ui, sans-serif;
  --font-saira-cond: "Saira Condensed", "Saira", system-ui, sans-serif;
  --font-saira-cond-bold: 700;
  --legend-text-scale: 1;
  --map-legend-safe-bottom: 8px;
  --map-legend-h: 72px;
  --logo-scale: 1;
  --map-width-pct: 100;
  --map-height-pct: 100;
  --ui-stage-scale: 1;
  --ui-resolution-w: 100vw;
  --ui-resolution-h: 100vh;
  --map-header-h: clamp(58px, 11.2vh, 100px);
  --bg: #080a0e;
  --bg-elev: #0b0e13;
  --surface: #0e1117;
  --surface-2: #12161d;
  --surface-3: #171c24;
  --border: rgba(255, 255, 255, 0.07);
  --border-hi: rgba(255, 255, 255, 0.12);
  --text: #e6eaf0;
  --muted: #7a8494;
  --accent: #5eb4d4;
  --accent-2: #7a8fd4;
  --accent-bg: rgba(94, 180, 212, 0.1);
  --accent-border: rgba(94, 180, 212, 0.32);
  --red: #d97070;
  --input-bg: rgba(255, 255, 255, 0.035);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.3);
  --r-xl: 10px;
  --r-lg: 8px;
  --r-md: 6px;
  --r-sm: 4px;
  --gap: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-inter: "Inter", "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration: 120ms;
  --focus-ring: 0 0 0 2px var(--accent-bg);
}

/* ─── Reset ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
select,
input {
  font-family: inherit;
}

/* Font Awesome — base; scoped overrides below beat * { font-family } UI blocks */
.fa-solid,
.fas {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
}

.fa-regular,
.far {
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  font-style: normal;
}

.fa-brands,
.fab {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
  font-style: normal;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ui-stage-host {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.ui-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  will-change: transform;
}

/* ─── Shell ───────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100%;
  min-height: 0;
  gap: var(--gap);
  padding: var(--gap);
  background: var(--bg);
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  --sb-bg: #0a0d12;
  --sb-bg-2: #0f131a;
  --sb-card: #12171f;
  --sb-text: #e4e9f0;
  --sb-muted: #7d8796;
  --sb-border: rgba(255, 255, 255, 0.07);
  --sb-hover: rgba(255, 255, 255, 0.045);
  --sb-active: rgba(31, 37, 147, 0.14);
  --sb-accent: var(--msc-blue-bright);
  --sb-accent-warm: var(--msc-blue-bright);
  --sb-focus: rgba(117, 125, 232, 0.26);
  --sb-ease: 0.15s ease;
  display: flex;
  flex-direction: column;
  background: var(--sb-bg);
  color: var(--sb-text);
  border: 1px solid var(--sb-border);
  border-radius: 0;
  overflow: hidden;
  min-height: 0;
  box-shadow: none;
  font-family: var(--font-inter);
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

.sidebar button,
.sidebar select,
.sidebar input,
.sidebar label,
.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar p {
  font-family: var(--font-inter);
}

.sidebar select optgroup {
  font-weight: 700;
  font-style: normal;
  color: var(--sb-muted);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 0;
  flex-shrink: 0;
  background: var(--sb-bg);
}

.sidebar-header::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 99px;
  background: var(--msc-blue);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sb-text);
  line-height: 1.2;
}

.sidebar-sub {
  display: none;
}

/* ─── Tab navigation ──────────────────────────────────────── */
.sidebar-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--sb-border);
  flex-shrink: 0;
  background: var(--sb-bg);
}

.sidebar-nav__tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sb-muted);
  font-family: var(--font-inter);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 7px 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  transition:
    color var(--sb-ease),
    background var(--sb-ease),
    border-color var(--sb-ease);
}

.sidebar-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  opacity: 0.88;
}

.sidebar-nav__tab.is-active .sidebar-nav__icon {
  opacity: 1;
  color: var(--sb-accent-warm);
}

.sidebar-nav__label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.sidebar-nav__tab:hover {
  color: var(--sb-text);
  background: var(--sb-hover);
}

.sidebar-nav__tab.is-active {
  color: var(--sb-text);
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.28);
  font-weight: 600;
}

.sidebar-nav__tab.is-active::before {
  content: none;
}

.sidebar-nav__tab:focus-visible {
  outline: 1px solid #52525b;
  outline-offset: -1px;
}

/* ─── Scroll body & panels ────────────────────────────────── */
.sidebar-body {
  flex: 1;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 184, 204, 0.28) transparent;
}

.sidebar-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: auto;
  overflow: visible;
  padding: 10px 10px 18px;
}

.sidebar-panel.is-active {
  display: flex;
}

.sidebar-panel[data-sidebar-panel="labels"].is-active::before,
.sidebar-panel[data-sidebar-panel="discussions"].is-active::before {
  content: attr(data-sidebar-panel);
  display: block;
  margin: 4px 2px 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sb-accent);
}

.sidebar-panel[data-sidebar-panel="labels"].is-active::before {
  content: "Labels";
}

.sidebar-panel[data-sidebar-panel="discussions"].is-active::before {
  content: "Discussions";
}

.sidebar-panel::-webkit-scrollbar {
  width: 6px;
}
.sidebar-panel::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-panel::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 0;
}

/* ─── Forecast actions ────────────────────────────────────── */
.forecast-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 2px 0 0;
  border-bottom: 0;
}

.forecast-actions--compact {
  padding-top: 10px;
}

.forecast-actions .btn-primary {
  flex: 1 1 auto;
  width: auto;
  margin: 0;
}

.forecast-actions .btn-secondary {
  flex: 0 0 auto;
}

.save-map-size {
  margin-top: 8px;
}

.map-capture-guide {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.map-capture-guide.is-on {
  opacity: 1;
}

#map-container.is-exporting .map-capture-guide {
  opacity: 0;
  transition: none;
}

.map-capture-guide__line {
  position: absolute;
  width: 0;
  border-left: 2px dashed #ffe14a;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

.map-capture-guide__line[hidden] {
  display: none !important;
}

.map-export-placeholder {
  position: fixed;
  z-index: 80;
  overflow: hidden;
  pointer-events: none;
  background: #0d1520;
}

.map-export-placeholder canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#map-container.is-exporting {
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.sidebar-section {
  border: 1px solid var(--sb-border);
  background: var(--sb-card);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section > .field,
.sidebar-section > .field-row,
.sidebar-section > .toggle-grid,
.sidebar-section > .control-block,
.sidebar-section > .control-stack {
  margin-bottom: 0;
}

/* ─── Accordions ──────────────────────────────────────────── */
.sidebar-accordion {
  border: 1px solid var(--sb-border);
  background: var(--sb-card);
  border-radius: 10px;
  overflow: hidden;
}

.sidebar-accordion__trigger {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sb-text);
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  transition: background var(--sb-ease);
}

.sidebar-accordion__trigger:hover {
  background: var(--sb-hover);
}

.sidebar-accordion__trigger-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-accordion__title {
  font-weight: 600;
  flex: 0 0 auto;
}

.sidebar-subheading {
  margin: 14px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sb-muted);
  border-top: 1px solid var(--sb-border, rgba(255, 255, 255, 0.08));
  padding-top: 10px;
}

.sidebar-accordion__badge {
  font-size: 11px;
  font-weight: 400;
  color: var(--sb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sidebar-accordion__chevron {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-right: 1px solid var(--sb-muted);
  border-bottom: 1px solid var(--sb-muted);
  transform: rotate(45deg);
  transition: transform var(--sb-ease);
}

.sidebar-accordion.is-open .sidebar-accordion__chevron {
  transform: rotate(-135deg);
}

.sidebar-accordion__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 12px;
}

.sidebar-accordion__body[hidden] {
  display: none;
}

.sidebar .control-stack,
.sidebar .control-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar .control-block + .control-block {
  padding-top: 12px;
  margin-top: 2px;
  border-top: 1px solid var(--sb-border);
}

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

.sidebar .color-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sidebar .color-row__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sidebar .color-row__item label,
.sidebar .color-row__item .field-row-label {
  margin-bottom: 0;
}

.sidebar .color-row .color-swatch {
  width: 100%;
  height: 28px;
}

.sidebar .field,
.sidebar .field-row {
  margin-bottom: 0;
}

.sidebar .sidebar-accordion__body > .field,
.sidebar .sidebar-accordion__body > .field-row,
.sidebar .sidebar-accordion__body > .toggle-grid,
.sidebar .sidebar-accordion__body > .control-block,
.sidebar .sidebar-accordion__body > .control-stack,
.sidebar .control-block > .field,
.sidebar .control-block > .field-row,
.sidebar .control-block > .toggle-grid,
.sidebar .control-stack > .field,
.sidebar .control-stack > .field-row,
.sidebar .control-stack > .toggle-grid {
  margin-bottom: 0;
}

.sidebar .field-row .field {
  margin-bottom: 0;
}

.sidebar .field-row {
  gap: 10px;
}

.product-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nwp-layers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.nwp-layers[hidden] {
  display: none;
}

.nwp-layers__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.temporal-interpolation-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.88rem;
}

.nwp-components {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nwp-layers__note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.85;
}

.product-picker__kind {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-picker__kind[hidden] {
  display: none;
}

.product-picker__field {
  margin-bottom: 0;
}

.product-picker__field[hidden] {
  display: none;
}

.product-category-selects {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-category-field {
  margin-bottom: 0;
}

/* ─── Status dock ─────────────────────────────────────────── */
.status-dock {
  flex-shrink: 0;
  border-top: 1px solid var(--sb-border);
  background: var(--sb-bg);
  padding: 0;
}

.status-dock__progress {
  height: 2px;
  width: 100%;
  border-radius: 0;
  background: #27272a;
  overflow: hidden;
}

.status-dock__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 14px 10px;
}

.status-dock__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sb-accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.status-dock.is-loading .status-dock__dot,
.status-dock__dot.is-pulsing {
  background: #d4d4d8;
}

.status-dock__text-wrap {
  min-width: 0;
}

.status-dock__text,
#status-text {
  font-size: 11px;
  font-weight: 400;
  color: var(--sb-muted);
  line-height: 1.35;
}

.status-dock__progress-label {
  display: block;
  font-size: 11px;
  color: var(--sb-muted);
}

.sidebar .model-load-progress {
  height: 2px;
  border-radius: 0;
  background: #27272a;
}

.sidebar .model-load-progress__bar {
  background: var(--sb-accent);
  border-radius: 0;
  box-shadow: none;
}

.sidebar .model-load-progress__bar.is-indeterminate {
  width: 36% !important;
  animation: sb-indet 1.1s linear infinite;
}

@keyframes sb-indet {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

/* Sidebar: hide instructional captions; keep live readouts. */
.sidebar .field-hint,
.sidebar .segmented-control__hint,
.sidebar .sub-card__hint,
.sidebar .logo-picker__hint,
.sidebar .dash-card__eyebrow {
  display: none;
}

.sidebar .field-hint--live,
.sidebar #discussion-list .field-hint {
  display: block;
}

/* Sidebar form controls — flat, utility */
.sidebar label,
.sidebar .field-row-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--sb-muted);
  margin-bottom: 4px;
}

.sidebar .field-hint[id] {
  font-size: 11px;
  color: var(--sb-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.sidebar select,
.sidebar .text-input {
  background: rgba(8, 12, 18, 0.65);
  border: 1px solid var(--sb-border);
  border-radius: 8px;
  color: var(--sb-text);
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}

.sidebar select:hover,
.sidebar .text-input:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(168, 184, 204, 0.22);
}

.sidebar select:focus,
.sidebar .text-input:focus {
  border-color: rgba(168, 184, 204, 0.45);
  box-shadow: 0 0 0 3px var(--sb-focus);
  outline: none;
}

.sidebar .value-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  color: var(--sb-accent);
  padding: 1px 8px;
}

.sidebar .slider {
  background: #243040;
  height: 4px;
  border-radius: 99px;
}

.sidebar .slider::-webkit-slider-thumb {
  box-shadow: none;
  border: 0;
  background: var(--sb-accent);
  border-radius: 50%;
}

.sidebar .slider::-moz-range-thumb {
  box-shadow: none;
  border: 0;
  background: var(--sb-accent);
  border-radius: 50%;
}

.sidebar .segmented-control {
  display: flex;
  gap: 6px;
}

.sidebar .segmented-control__option {
  flex: 1 1 0;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border-color: var(--sb-border);
  background: rgba(8, 12, 18, 0.45);
  padding: 7px 8px;
}

.sidebar .product-picker__kind .segmented-control__option {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 8px 10px;
}

.sidebar .segmented-control__option + .segmented-control__option {
  margin-left: 0;
}

.sidebar .segmented-control__title {
  font-size: 12px;
  font-weight: 500;
}

.sidebar .segmented-control__option:hover {
  background: var(--sb-hover);
  border-color: #3f3f46;
}

.sidebar .segmented-control__option.is-active {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.32);
  color: var(--sb-text);
  box-shadow: none;
}

.model-run-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-run-picker .field + .field {
  margin-top: 0;
}

.text-input--date {
  width: 100%;
  min-height: 34px;
  color-scheme: dark;
}

.cycle-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.cycle-pills__btn {
  appearance: none;
  border: 1px solid var(--sb-border);
  background: rgba(8, 12, 18, 0.55);
  color: var(--sb-muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}

.cycle-pills__btn:hover {
  background: var(--sb-hover);
  border-color: rgba(168, 184, 204, 0.22);
  color: var(--sb-text);
}

.cycle-pills__btn.is-active {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.35);
  color: var(--sb-accent-warm);
}

.cycle-pills__btn:focus-visible {
  outline: 1px solid #a1a1aa;
  outline-offset: 2px;
}

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

.model-opacity-field {
  margin-top: 4px;
}

.sidebar-details {
  border: 1px solid var(--sb-border);
  background: rgba(8, 12, 18, 0.35);
  margin: 2px 0 0;
  border-radius: 8px;
}

.sidebar-details--nested {
  border-radius: 6px;
}

.sidebar-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sb-text);
  padding: 9px 11px;
  user-select: none;
}

.sidebar-details > summary .fa-solid {
  flex: 0 0 auto;
  width: 1em;
  font-size: 11px;
  color: var(--sb-muted);
}

.sidebar-details > summary::-webkit-details-marker {
  display: none;
}

.sidebar-details > summary::after {
  content: "▸";
  float: right;
  color: var(--sb-muted);
  transition: transform var(--sb-ease);
}

.sidebar-details[open] > summary::after {
  transform: rotate(90deg);
}

.sidebar-details__body {
  padding: 0 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--sb-border);
}

.contour-label-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.color-blind-variant {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 10px;
}

.color-blind-variant__option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text);
}

.color-blind-appearance {
  gap: 10px;
}

.color-blind-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  background: linear-gradient(
    135deg,
    rgba(61, 210, 138, 0.22) 0%,
    rgba(15, 23, 42, 0.92) 55%
  );
}

.color-blind-preview__pill {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35em;
  padding: 0.28em 0.45em 0.28em 0.62em;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.55);
  color: #f8fafc;
  font-family: "Saira", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.color-blind-preview__sep {
  opacity: 0.55;
  font-weight: 600;
}

.color-blind-preview__city {
  font-weight: 700;
  font-size: 13px;
}

.color-blind-preview__category {
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
  opacity: 0.85;
  letter-spacing: 0.02em;
  padding: 0.08em 0.38em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.contour-label-density {
  margin-top: 6px;
}

.contour-label-appearance {
  gap: 12px;
}

.contour-label-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 16px 12px;
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(30, 41, 59, 0.85) 100%
  );
  overflow: hidden;
}

.contour-label-preview__band {
  position: absolute;
  inset: 18% 12%;
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--contour-preview-band, #3dd28a) 55%,
    transparent
  );
  opacity: 0.45;
  filter: blur(0.5px);
}

.contour-label-preview__sample {
  position: relative;
  z-index: 1;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
}

.contour-label-style-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--sb-border);
}

.contour-label-style-toolbar .field {
  margin: 0;
}

.contour-label-style-toolbar .btn--compact {
  align-self: flex-start;
}

.contour-label-style {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.contour-label-style__section {
  border: 1px solid var(--sb-border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
}

.contour-label-style__section > summary {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.contour-label-style__section > summary::-webkit-details-marker {
  display: none;
}

.contour-label-style__section-body {
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--sb-border);
}

.contour-label-style__field {
  margin: 0;
}

.contour-label-style .field {
  margin-bottom: 0;
}

.sidebar .select--compact,
.sidebar .input--compact {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 8px;
}

.sidebar .btn.btn--ghost.btn--compact {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--sb-border);
  background: transparent;
  color: var(--sb-text);
  cursor: pointer;
}

.sidebar .btn.btn--ghost.btn--compact:hover {
  border-color: #52525b;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-details__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 0;
  border-bottom: 0;
}

.sidebar .toggle-item {
  border-bottom-color: var(--sb-border);
  padding: 7px 0;
}

.sidebar .toggle-item:first-child {
  padding-top: 1px;
}

.sidebar .toggle-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.sidebar .toggle-grid:last-child .toggle-item:last-child {
  border-bottom: none;
}

.sidebar .toggle-item label {
  font-size: 12px;
  color: var(--sb-text);
}

.sidebar .toggle {
  background: #243040;
  border-color: transparent;
  border-radius: 99px;
}

.sidebar .toggle:checked {
  background: rgba(117, 125, 232, 0.75);
  border-color: transparent;
}

.sidebar .color-swatch {
  border-radius: 8px;
  box-shadow: none;
}

.sidebar .color-swatch:hover {
  border-color: #52525b;
}

.sidebar .btn-primary,
.sidebar .btn-secondary {
  border-radius: 8px;
  box-shadow: none;
  letter-spacing: -0.01em;
  font-family: var(--font-inter);
  font-weight: 600;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}

.sidebar .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--msc-blue);
  border: 1px solid rgba(0, 0, 0, 0.22);
  color: #fff;
}

.sidebar .btn-primary__icon {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  opacity: 0.92;
  color: inherit;
}

.sidebar .btn-primary:hover {
  background: var(--msc-blue-hover);
  border-color: rgba(117, 125, 232, 0.45);
  color: #fff;
}

.sidebar .btn-secondary {
  background: rgba(8, 12, 18, 0.4);
  border: 1px solid var(--sb-border);
  color: var(--sb-text);
}

.sidebar .btn-secondary:hover,
.sidebar .btn-secondary--accent:hover {
  background: var(--sb-hover);
  border-color: rgba(168, 184, 204, 0.28);
  color: var(--sb-text);
}

.sidebar .btn-secondary.is-active {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.32);
  color: var(--sb-accent-warm);
}

.sidebar .btn-secondary--compact {
  flex: 0 0 auto;
  padding: 8px 10px;
}

.sidebar .btn-secondary--full {
  width: 100%;
  margin-top: 0;
}

.sidebar .logo-picker__option,
.sidebar .place-list__item,
.sidebar .dash-card,
.sidebar .sub-card {
  border-radius: 8px;
  box-shadow: none;
  background: rgba(8, 12, 18, 0.4);
  border-color: var(--sb-border);
}

.sidebar .logo-picker__option:hover,
.sidebar .place-list__item:hover {
  background: var(--sb-hover);
}

.sidebar .keybind-settings__toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar .keybind-settings__section + .keybind-settings__section {
  margin-top: 12px;
}

.sidebar .keybind-settings__category {
  font-size: 11px;
  font-weight: 600;
  color: var(--sb-muted);
  margin: 0 0 6px;
}

.sidebar .keybind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--sb-border);
}

.sidebar .keybind-row:last-child {
  border-bottom: none;
}

.sidebar .keybind-row__label {
  font-size: 12px;
  color: var(--sb-text);
  min-width: 0;
}

.sidebar .keybind-row__chords {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.sidebar .keybind-row__rebind {
  appearance: none;
  border: 1px solid var(--sb-border);
  background: var(--sb-bg-2);
  color: var(--sb-text);
  cursor: pointer;
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 0;
}

.sidebar .keybind-row__rebind:hover {
  background: var(--sb-hover);
  border-color: #3f3f46;
}

.sidebar .keybind-row--recording .keybind-row__rebind {
  border-color: #52525b;
  background: var(--sb-active);
}



.sidebar .keybind-row__reset {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sb-muted);
  cursor: pointer;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.sidebar .keybind-row__reset:hover {
  color: var(--sb-text);
  background: var(--sb-hover);
}

.sidebar .keybind-key {
  display: inline-block;
  min-width: 1.4em;
  padding: 1px 5px;
  border: 1px solid var(--sb-border);
  background: var(--sb-bg);
  color: var(--sb-text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

.sidebar .keybind-key--empty,
.sidebar .keybind-key--prompt {
  color: var(--sb-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  border-style: dashed;
}

.sidebar .outlook-color-list {
  margin: 0;
}

.sidebar .outlook-swatch-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--sb-muted);
}

.sidebar .discussion-list {
  margin-top: 0;
}

.sidebar .logo-picker {
  margin-bottom: 0;
}

.sidebar .logo-upload {
  margin-top: 0;
}

/* ─── Cards ───────────────────────────────────────────────── */
.dash-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 15px 13px;
}

.dash-card--primary {
  border-color: var(--border);
  background: var(--surface-2);
}

.dash-card--legend {
  padding-bottom: 12px;
}

.dash-card__head {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.dash-card__head--inline {
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: none;
}

.dash-card__eyebrow {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.dash-card__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sub-card {
  margin: 4px 0 12px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.sub-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.sub-card__hint {
  margin-bottom: 10px !important;
}

/* ─── Fields ──────────────────────────────────────────────── */
.field {
  margin-bottom: 11px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 11px;
}

.field-row--vcenter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-template-columns: unset;
  gap: 10px;
  margin-bottom: 11px;
}

.field-row-label {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0;
}

label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 5px;
}

.field-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 400;
  line-height: 1.4;
}

.concern-weights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.concern-weight-row {
  display: grid;
  grid-template-columns: 52px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.concern-weight-row label {
  font-size: 11px;
  margin: 0;
}

.concern-weight-row input[type="range"] {
  width: 100%;
}

/* ─── Inputs ──────────────────────────────────────────────── */
select,
.text-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 7px 10px;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 400;
  outline: none;
  transition:
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b95a7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

select[multiple],
.select--multiline {
  background-image: none;
  padding-right: 11px;
  resize: none;
  min-height: 120px;
}

select option {
  background: #1a2230;
  color: var(--text);
  padding: 4px;
}

select:hover,
.text-input:hover {
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.045);
}

select:focus,
.text-input:focus {
  border-color: var(--accent-border);
  box-shadow: var(--focus-ring);
}

/* ─── Sliders ─────────────────────────────────────────────── */
.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.slider-header label {
  margin-bottom: 0;
}

.value-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.value-badge--mono {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
}

.slider--neutral {
  background: rgba(255, 255, 255, 0.1);
}

.slider:disabled,
.slider.slider--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.slider:disabled::-webkit-slider-thumb,
.slider.slider--disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e8ecf0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.slider::-webkit-slider-thumb:hover {
  background: #fff;
}

.slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e8ecf0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* ─── Segmented control (concern index HRRR window) ─────── */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented-control__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition:
    border-color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.segmented-control__option:hover {
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.045);
}

.segmented-control__option.is-active {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.segmented-control__title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.segmented-control__hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
}

.window-timeframe-grid {
  display: grid;
  gap: 8px;
}

.field-row--datetime {
  grid-template-columns: 1.4fr 0.8fr;
  margin-bottom: 0;
}

/* ─── Toggles ─────────────────────────────────────────────── */
.toggle-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.toggle-item label {
  margin: 0;
  text-transform: none;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  cursor: pointer;
}

.toggle {
  flex-shrink: 0;
  width: 34px;
  height: 18px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
  border: 1px solid var(--border);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a8b0bc;
  transition:
    transform var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.toggle:checked {
  background: rgba(94, 180, 212, 0.28);
  border-color: var(--accent-border);
}

.toggle:checked::after {
  transform: translateX(16px);
  background: #e8ecf0;
}

/* ─── Color picker ────────────────────────────────────────── */
.color-swatch {
  width: 40px;
  height: 26px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  transition: border-color var(--duration) var(--ease);
}

.color-swatch:hover {
  border-color: var(--accent-border);
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  margin-top: 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 9px 14px;
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.btn-primary:hover {
  background: rgba(94, 180, 212, 0.16);
  border-color: rgba(94, 180, 212, 0.45);
}

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

.btn-secondary {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 10px;
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.btn-secondary--full {
  width: 100%;
  margin-top: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hi);
  color: var(--text);
}

.btn-secondary--accent:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-secondary.is-active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--text);
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

/* ─── Place lists ─────────────────────────────────────────── */
.place-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  max-height: 160px;
  overflow-y: auto;
}

.place-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--input-bg);
}

.place-list__meta {
  min-width: 0;
  flex: 1;
}

.place-list__name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-list__sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  margin-top: 2px;
}

.place-list__remove {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: var(--r-sm);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition:
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.place-list__remove:hover {
  color: var(--red);
  border-color: rgba(217, 112, 112, 0.4);
}

#map.pick-place-mode {
  cursor: crosshair;
}

/* ─── State picker ──────────────────────────────────────── */
.state-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  margin-bottom: 8px;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 9px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-hi);
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
}

.state-chip__remove {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  width: 16px;
  height: 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  transition:
    background var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.state-chip__remove:hover {
  background: rgba(217, 112, 112, 0.25);
  color: var(--red);
}

.state-search {
  margin-bottom: 8px;
}

.state-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.state-option {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 7px 8px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.state-option:hover {
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.045);
}

.state-option.is-selected {
  border-color: var(--accent-border);
  background: var(--accent-bg);
  color: var(--text);
}

.state-option__code {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Map overlays ──────────────────────────────────────── */
.custom-place-tracker__name,
.custom-place-tracker__readout {
  pointer-events: none;
  white-space: nowrap;
  line-height: 1.1;
}

.custom-place-tracker__readout {
  font-weight: 700;
}

.map-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.map-panel {
  position: absolute;
  pointer-events: none;
  border: var(--map-panel-border);
  border-radius: var(--map-panel-radius);
  background: var(--map-panel-surface);
  backdrop-filter: blur(var(--map-panel-blur));
  -webkit-backdrop-filter: blur(var(--map-panel-blur));
  box-shadow: var(--shadow);
}

.map-panel--header {
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--map-header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px 4px 0;
  border: none;
  border-radius: 0;
  border-bottom: none;
  box-shadow: none;
  background: linear-gradient(180deg, #000000 0%, #303030 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: left;
  font-family: var(--font-saira);
}

.map-panel--header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #c9c9c9 0%, #303030 100%);
  pointer-events: none;
}

.map-panel--header,
.map-panel--header .map-panel__product-title,
.map-panel--header .map-panel__guidance-note,
.map-panel--header .map-panel__valid-date {
  font-family: var(--font-saira);
}

.map-panel__logo {
  flex-shrink: 0;
  margin-left: 20px;
  height: calc((var(--map-header-h) - 22px) * var(--logo-scale));
  width: auto;
  max-width: min(calc(240px * var(--logo-scale)), 42%);
  object-fit: contain;
  object-position: left center;
}

.map-panel__header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.map-panel__product-title,
.map-panel__valid-date,
.map-panel__guidance-note {
  margin: 0;
  padding: 0;
  font-family: var(--font-saira);
  letter-spacing: 0;
  line-height: 1.05;
}

.map-panel__product-title {
  font-size: clamp(1.5rem, 2.2vw, 2.5rem);
  font-weight: 700;
  color: #f0f2f5;
  text-transform: none;
  text-shadow: none;
}

.map-panel__valid-date {
  font-size: clamp(1rem, 1.4vw, 1.7rem);
  font-weight: 500;
  color: var(--map-gold);
}

.map-panel__guidance-note {
  flex-shrink: 0;
  margin-left: auto;
  max-width: min(280px, 38%);
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
}

.map-panel__guidance-note.control-hidden {
  display: none;
}

.map-panel--legend {
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: var(--map-legend-h, 72px);
  max-height: none;
  padding: 5px 0 var(--map-legend-safe-bottom, 8px);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(25, 34, 47, 0.88), rgba(8, 13, 22, 0.94));
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: none;
}

.map-panel--legend.map-legend--named {
  --map-legend-h: 84px;
}

.map-panel--legend.map-legend--safety {
  --map-legend-h: 108px;
}

.map-legend__safety {
  margin: 3px 8px 0;
  font-family: var(--font-saira-cond);
  font-size: 0.72rem;
  font-weight: var(--font-saira-cond-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(220, 232, 244, 0.88);
  line-height: 1.2;
}

.map-panel--legend::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

.map-legend__bug {
  position: relative;
  flex: 0 0 clamp(188px, 19vw, 292px);
  width: clamp(188px, 19vw, 292px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 3px 18px 0 20px;
  min-width: 0;
  overflow: visible;
}

.map-panel--legend.map-legend--derived .map-legend__bug {
  padding-right: 16px;
}

.map-panel--legend.map-legend--derived .map-legend__header-text,
.map-panel--legend.map-legend--derived .map-legend__unit {
  overflow: visible;
  word-break: break-word;
}

#map-container.is-exporting .map-legend__bug,
#map-container.is-exporting .map-legend__header-text,
#map-container.is-exporting .map-legend__unit {
  overflow: visible !important;
}

.map-panel--legend.map-legend--derived .map-legend__bug::after {
  content: "";
  position: absolute;
  top: 14%;
  right: 0;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 18%,
    rgba(255, 255, 255, 0.28) 82%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.map-legend__header-text {
  display: block;
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: var(--font-saira);
  font-size: calc(
    0.98rem * var(--legend-text-scale, 1) * var(--legend-title-fit, 1)
  );
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #f0f2f5;
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: break-word;
}

.map-legend__unit {
  display: block;
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: var(--font-saira);
  font-size: calc(
    0.92rem * var(--legend-text-scale, 1) * var(--legend-unit-fit, 1)
  );
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--map-gold);
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: break-word;
}

.map-legend__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 6px 18px 2px 0;
}

.map-legend__cig {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.map-legend__cig-label {
  align-self: center;
  font-family: var(--font-saira-cond);
  font-size: calc(0.78rem * var(--legend-text-scale, 1));
  font-weight: var(--font-saira-cond-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--map-gold);
}

.legend-ramp-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 4px 0 8px;
}

.legend-ramp {
  width: 18px;
  flex: 0 0 18px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.legend-ramp__labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.legend-ramp__label {
  font-family: var(--font-saira-cond);
  font-size: calc(1.02rem * var(--legend-text-scale, 1));
  font-weight: var(--font-saira-cond-bold);
  color: #f0f2f5;
  line-height: 1;
}

.legend-ramp-wrap--horizontal {
  position: relative;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  gap: 0;
  padding: 4px calc(1.25em * var(--legend-text-scale, 1)) 0;
}

.legend-ramp-wrap--horizontal .legend-ramp {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: calc(22px * var(--legend-text-scale, 1));
  flex: 0 0 calc(22px * var(--legend-text-scale, 1));
  margin-bottom: calc(8px + 1.15em * var(--legend-text-scale, 1));
  border-radius: 4px;
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25), 0 3px 12px rgba(0, 0, 0, 0.28);
}

.legend-ramp__tick {
  position: absolute;
  top: 100%;
  width: 1px;
  height: calc(6px * var(--legend-text-scale, 1));
  background: rgba(238, 244, 251, 0.75);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.legend-ramp-wrap--horizontal .legend-ramp__label {
  position: absolute;
  top: calc(7px * var(--legend-text-scale, 1));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-saira);
  font-size: calc(0.92rem * var(--legend-text-scale, 1));
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(244, 248, 252, 0.94);
}

.legend-ramp-wrap--dbz.legend-ramp-wrap--horizontal .legend-ramp__label {
  font-size: calc(0.78rem * var(--legend-text-scale, 1));
}

.legend-segments {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  height: 100%;
}

.legend-segments--capped {
  flex: 0 1 auto;
  max-width: 100%;
}

.legend-segments--fit-labels {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.legend-segments--fit-labels .legend-segment {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
}

.legend-segments--fit-labels .legend-segment__name {
  overflow: hidden;
}

.legend-segment {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  height: 100%;
  flex: 1 1 0;
  justify-content: center;
}

/* Named categories read as compact glass cards with a color marker. */
.legend-segment:has(.legend-segment__name) {
  height: auto;
  margin-block: 3px;
  justify-content: flex-start;
  border: 1px solid rgba(214, 227, 242, 0.19);
  border-radius: 9px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.11), 0 5px 15px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.legend-segments--capped .legend-segment {
  flex: 0 1 120px;
  width: 120px;
  max-width: 120px;
}

.map-legend__cig .legend-segments--capped .legend-segment {
  flex: 0 1 88px;
  width: 88px;
  max-width: 88px;
}

.legend-segment__swatch {
  flex: 0 0 28px;
  min-height: 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.legend-segment:has(.legend-segment__name) .legend-segment__swatch {
  flex: 0 0 16px;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 -1px rgba(255, 255, 255, 0.16);
}

.legend-segment:has(.legend-segment__name) .legend-segment__swatch:has(.legend-segment__value) {
  flex-basis: 25px;
}

.legend-segment__swatch--ramp {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 5px 3px;
}

.legend-segment__ramp-end {
  position: relative;
  z-index: 1;
  font-family: var(--font-saira-cond);
  font-size: calc(0.58rem * var(--legend-text-scale, 1));
  font-weight: var(--font-saira-cond-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.8);
}

.legend-segment__swatch--hatch {
  border-color: rgba(255, 255, 255, 0.85);
}

.legend-segment__swatch--transparent {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.55);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.08) 3px,
    transparent 3px,
    transparent 6px
  );
}

.legend-segment__hatch,
.legend-segment__swatch svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.legend-segment__value {
  position: relative;
  z-index: 1;
  font-family: var(--font-saira-cond);
  font-size: calc(1.05rem * var(--legend-text-scale, 1));
  font-weight: var(--font-saira-cond-bold);
  color: #f0f2f5;
  line-height: 1;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.75);
}

.legend-segment__name {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2px 5px;
  font-family: var(--font-saira);
  font-size: calc(0.72rem * var(--legend-text-scale, 1));
  font-weight: 600;
  letter-spacing: -0.015em;
  color: rgba(246, 249, 253, 0.96);
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.legend-chip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-swatch {
  width: 48px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.legend-swatch--hatch {
  background: transparent;
  border-color: #ffffff;
}

.legend-swatch--mpd {
  border-style: solid;
  box-sizing: border-box;
}

.map-legend__body--discussions {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.discussion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.discussion-card {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--input-bg);
}

.discussion-card h3 {
  margin: 0 0 4px;
  font-size: 0.82rem;
}

.discussion-card p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.discussion-card__error {
  margin-top: 4px;
  color: var(--red);
  font-size: 0.7rem;
}

.legend-swatch__hatch {
  width: 100%;
  height: 100%;
  display: block;
}

.legend-swatch__value {
  font-family: var(--font-saira);
  font-size: calc(1.28rem * var(--legend-text-scale, 1));
  font-weight: 600;
  color: #f0f2f5;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.7);
  line-height: 1;
}

.legend-label {
  font-family: var(--font-saira-cond);
  font-size: calc(1.18rem * var(--legend-text-scale, 1));
  font-weight: var(--font-saira-cond-bold);
  color: #f0f2f5;
  letter-spacing: 0.01em;
  text-shadow: none;
}

.legend-swatch--transparent {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.55);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.06) 3px,
    transparent 3px,
    transparent 6px
  );
}

/* ─── Status bar ──────────────────────────────────────────── */
.status-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 6px 4px 2px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.model-load-progress {
  height: 3px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.model-load-progress__bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #3ddc84;
  transition: width 0.16s linear;
}

.status-bar__row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.status-bar__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 7px;
  opacity: 0.75;
}

#status-text {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
}

/* ─── Map ─────────────────────────────────────────────────── */
#map-container {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  min-width: 0;
  box-shadow: var(--shadow);
  isolation: isolate;
  background: #0d1520;
  width: calc(var(--map-width-pct) * 1%);
  height: calc(var(--map-height-pct) * 1%);
  max-width: 100%;
  max-height: 100%;
  min-height: 240px;
  align-self: start;
  justify-self: start;
}

#map {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1520;
}

#map-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0d1520;
}

/* ─── Toast notification ──────────────────────────────────── */
.app-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100% - 28px));
  transform: translateX(-50%) translateY(8px);
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 22, 28, 0.92);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast.is-warning {
  border-color: rgba(217, 112, 112, 0.4);
  color: #f2c9c9;
}

/* ─── Logo picker ─────────────────────────────────────────── */
.logo-picker__hint {
  margin: -4px 0 12px;
}

.logo-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo-picker__option {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition:
    border-color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.logo-picker__option-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.logo-picker__remove {
  appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.logo-picker__remove:hover {
  color: var(--red);
  background: rgba(217, 112, 112, 0.12);
}

.logo-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
}

.logo-upload__button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.logo-upload__button:hover {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.logo-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.logo-picker__option:hover {
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.045);
}

.logo-picker__option.is-active {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.logo-picker__preview {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 5px;
  background: #05070b;
  border: 1px solid var(--border);
  overflow: hidden;
}

.logo-picker img {
  display: block;
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  object-position: center;
}

.logo-picker__label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
}

.logo-picker__option.is-active .logo-picker__label {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Utilities ───────────────────────────────────────────── */
.control-hidden {
  display: none !important;
}

.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;
}

.keybind-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.keybind-overlay.is-open {
  display: flex;
}

.keybind-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.keybind-overlay__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #111113;
  color: #e4e4e7;
  border: 1px solid #27272a;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.keybind-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #27272a;
}

.keybind-overlay__header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.keybind-overlay__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #a1a1aa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
}

.keybind-overlay__close:hover {
  color: #e4e4e7;
}

.keybind-overlay__body {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.keybind-overlay__section h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: #a1a1aa;
}

.keybind-overlay__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.keybind-overlay__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.keybind-overlay__item dt {
  font-size: 12px;
}

.keybind-overlay__item dd {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.keybind-overlay .keybind-key {
  display: inline-block;
  min-width: 1.4em;
  padding: 1px 5px;
  border: 1px solid #27272a;
  background: #18181b;
  color: #e4e4e7;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

.keybind-overlay .keybind-key-sep {
  color: #a1a1aa;
  font-size: 10px;
}

.keybind-overlay__footer {
  padding: 10px 14px 12px;
  border-top: 1px solid #27272a;
}

.keybind-overlay__footer p {
  margin: 0;
  font-size: 11px;
  color: #a1a1aa;
}

.outlook-color-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 12px;
}

.outlook-swatch-title {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
}

.outlook-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.outlook-swatch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.62rem;
  color: var(--muted);
}

.outlook-swatch input[type="color"] {
  width: 36px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.muggy-scale-list,
.wind-scale-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 10px;
}

.muggy-scale-row,
.wind-scale-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 64px auto auto;
  gap: 6px;
  align-items: center;
}

.muggy-scale-row input[type="color"],
.wind-scale-row input[type="color"] {
  width: 36px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.muggy-scale-row__min,
.wind-scale-row__min {
  width: 64px;
}

.muggy-scale-row__unit,
.wind-scale-row__unit {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100%;
    min-height: 100%;
    padding: 10px;
    gap: 10px;
  }

  :root {
    --sidebar-w: 100%;
  }

  .sidebar {
    max-height: 48vh;
  }
  #map-container {
    min-height: 52vh;
  }

  .state-option-grid {
    grid-template-columns: 1fr;
  }
}

html[data-ui-resolution-mode="fixed"] .app-shell {
  grid-template-columns: var(--sidebar-w) 1fr !important;
  grid-template-rows: unset !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: var(--gap) !important;
}

html[data-ui-resolution-mode="fixed"] {
  --sidebar-w: 352px;
}

html[data-ui-resolution-mode="fixed"] .sidebar {
  max-height: none !important;
}

html[data-ui-resolution-mode="fixed"] #map-container {
  min-height: 0 !important;
}

/* ─── MSC Sounding workstation ───────────────────────────── */
#map-container.sounding-active:not(.sounding-picking) .map-overlays {
  visibility: hidden;
}

.sounding-viewer {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #0b0c0f;
  color: var(--text);
  font-family: var(--font);
}

.sounding-viewer--picking {
  background: transparent;
  pointer-events: none;
}

.sounding-viewer--picking .sounding-viewer__stage {
  visibility: hidden;
}

.sounding-viewer--picking .sounding-viewer__mast,
.sounding-viewer--picking .sounding-viewer__pick {
  pointer-events: auto;
}

.sounding-viewer__mast {
  flex: 0 0 var(--map-header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 4px 0;
  background: linear-gradient(180deg, #000000 0%, #303030 100%);
  position: relative;
  font-family: var(--font-saira);
  min-width: 0;
  overflow: hidden;
}

.sounding-viewer__mast::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #c9c9c9 0%, #303030 100%);
  pointer-events: none;
}

.sounding-viewer__mast .map-panel__logo {
  margin-left: 16px;
  max-height: calc(var(--map-header-h) - 18px);
}

.sounding-viewer__mast .map-panel__header-text {
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.sounding-viewer__mast .map-panel__product-title {
  font-size: clamp(1.05rem, 1.5vw, 1.65rem);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sounding-viewer__mast .map-panel__valid-date {
  font-size: clamp(0.82rem, 1.05vw, 1.15rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sounding-viewer__mast .map-panel__guidance-note {
  pointer-events: none;
  flex: 0 1 220px;
  min-width: 0;
  max-width: 220px;
  margin-left: 0;
}

.sounding-viewer__status {
  font-family: var(--font-saira);
  font-size: 12px;
  color: var(--map-gold);
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sounding-viewer__close {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-saira);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

.sounding-viewer__close:hover {
  border-color: #c9c9c9;
  color: #fff;
}

.sounding-viewer__pick {
  flex: 0 0 auto;
  padding: 8px 18px;
  font-size: 13px;
  color: #111;
  background: var(--map-gold);
  font-family: var(--font-saira), var(--font);
}

.sounding-viewer__stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 34%);
  grid-template-rows: minmax(0, 1fr) minmax(168px, 210px);
  gap: 0;
}

.sounding-viewer__diagram {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.sounding-viewer__plot {
  position: absolute;
  inset: 0;
}

.sounding-viewer__params {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #10131a 0%, #0c0e12 100%);
  overflow: hidden;
  min-height: 0;
}

.sounding-viewer__rail {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1014;
  padding: 8px 10px 10px;
  gap: 8px;
}

.snd-inspect {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.snd-inspect__head {
  flex: 0 0 auto;
  font-family: var(--font-saira-cond), var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--map-gold);
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.snd-inspect__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.snd-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.snd-chip__k {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.snd-chip__v {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.snd-readout {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.snd-block {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.snd-block h3 {
  margin: 0 0 5px;
  flex: 0 0 auto;
  font-family: var(--font-saira-cond), var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--map-gold);
}

.snd-block__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.snd-note {
  margin: 0 0 4px;
  font-size: 10px;
  color: var(--muted);
}

.snd-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  min-width: 0;
}

.snd-row__k,
.snd-row span {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snd-row__v,
.snd-row b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.sounding-viewer__hodo {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: #0a0b0e;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sounding-viewer__minimap {
  flex: 0 0 28%;
  min-height: 120px;
  max-height: 200px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sounding-minimap__map {
  width: 100%;
  height: 100%;
}

.sounding-minimap__pin {
  width: 12px;
  height: 12px;
  background: var(--map-gold);
  border: 2px solid #111;
  border-radius: 50%;
  cursor: grab;
}

.sounding-skewt,
.sounding-hodo {
  display: block;
  width: 100%;
  height: 100%;
}

.skt-plot {
  fill: #12141a;
}

.skt-isobar {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
}

.skt-iso {
  stroke: rgba(220, 110, 110, 0.18);
  stroke-width: 1;
}

.skt-iso0 {
  stroke: rgba(230, 140, 140, 0.55);
  stroke-width: 1.2;
}

.skt-dry {
  stroke: rgba(201, 180, 106, 0.22);
  stroke-width: 1;
}

.skt-moist {
  stroke: rgba(96, 176, 138, 0.32);
  stroke-width: 1;
  stroke-dasharray: 6 4;
}

.skt-mix {
  stroke: rgba(96, 168, 214, 0.28);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.skt-mix-lab,
.skt-p,
.skt-tlab,
.skt-axis,
.skt-legend text,
.skt-lvl-lab {
  fill: #9aa0a8;
  font-size: 10px;
  font-family: var(--font);
  pointer-events: none;
}

.skt-axis {
  font-size: 9px;
}

.skt-t {
  stroke: #e07070;
  stroke-width: 2.25;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.skt-td {
  stroke: #3ddc84;
  stroke-width: 2.25;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.skt-parcel {
  stroke: var(--map-gold);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 5 3;
}

.skt-barb-rail {
  stroke: rgba(255, 255, 255, 0.08);
}

.sounding-barb {
  color: #e4e4e7;
}

.skt-lvl {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-dasharray: 4 5;
}

.skt-cursor {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
}

.skt-mark--t {
  fill: #e07070;
  stroke: #111;
  stroke-width: 1;
}

.skt-mark--td {
  fill: #3ddc84;
  stroke: #111;
  stroke-width: 1;
}

.sounding-hover-chip {
  position: absolute;
  z-index: 2;
  min-width: 132px;
  padding: 6px 8px;
  background: rgba(12, 13, 16, 0.92);
  border: 1px solid rgba(201, 180, 106, 0.35);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
}

.sounding-hover-chip__p {
  color: var(--map-gold);
  font-variant-numeric: tabular-nums;
}

.sounding-hodo__disc {
  fill: #12141a;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.sounding-hodo__ring,
.sounding-hodo__axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
  fill: none;
}

.sounding-hodo__ring-lab {
  fill: rgba(154, 160, 168, 0.7);
  font-size: 8px;
  font-family: var(--font);
  pointer-events: none;
}

.sounding-hodo__path,
.sounding-hodo__seg {
  stroke-width: 2.3;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.sounding-hodo__eil {
  fill: none;
  stroke: rgba(201, 180, 106, 0.85);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.sounding-hodo__eil-pt {
  fill: var(--map-gold);
  stroke: #111;
  stroke-width: 0.8;
}

.sounding-hodo__eil-lab {
  fill: var(--map-gold);
  font-size: 9px;
  font-family: var(--font-saira), var(--font);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.sounding-hodo__shear {
  stroke: #c084fc;
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
  fill: none;
}

.sounding-hodo__shear-pt {
  fill: #c084fc;
  stroke: #111;
  stroke-width: 0.6;
}

.sounding-hodo__ca-arc {
  fill: none;
  stroke: rgba(192, 132, 252, 0.9);
  stroke-width: 1.4;
}

.sounding-hodo__ca-lab {
  fill: #e9d5ff;
  font-size: 10px;
  font-family: var(--font-saira), var(--font);
  font-weight: 600;
}

.sounding-hodo__point {
  stroke: #111;
  stroke-width: 0.6;
}

.sounding-hodo__label,
.sounding-hodo__sm,
.sounding-hodo__cardinal,
.sounding-hodo__unit {
  fill: var(--muted);
  font-size: 10px;
  font-family: var(--font);
}

.sounding-hodo__ht {
  fill: #9aa0a8;
  font-size: 9px;
  font-family: var(--font);
}

.sounding-hodo__footer-rule {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.sounding-hodo__footer-lab,
.sounding-hodo__footer-stat {
  fill: #9aa0a8;
  font-size: 9px;
  font-family: var(--font);
}

.sounding-hodo__footer-stat {
  fill: #c9cdd3;
  font-variant-numeric: tabular-nums;
}

.sounding-hodo__motion {
  stroke-width: 1.15;
  stroke-dasharray: 3 2;
  fill: none;
  opacity: 0.85;
}

.sounding-hodo__motion--R,
.sounding-hodo__motion-pt--R {
  stroke: var(--map-gold);
  fill: var(--map-gold);
}

.sounding-hodo__motion--L,
.sounding-hodo__motion-pt--L {
  stroke: #68c8e8;
  fill: #68c8e8;
}

.sounding-hodo__motion--M,
.sounding-hodo__motion-pt--M {
  stroke: #a1a1aa;
  fill: #a1a1aa;
}

.sounding-hodo__empty {
  color: var(--muted);
  font-size: 11px;
  padding: 12px;
}

.msc-sounding-marker {
  width: 14px;
  height: 14px;
  background: var(--map-gold);
  border: 2px solid #111;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201, 180, 106, 0.4);
}

@media (max-width: 1200px) {
  .snd-readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sounding-viewer__stage {
    grid-template-rows: minmax(0, 1fr) minmax(220px, 260px);
  }
}

@media (max-width: 980px) {
  .sounding-viewer__stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, 1fr) minmax(200px, auto) minmax(280px, 42%);
  }

  .sounding-viewer__params {
    grid-column: 1;
    grid-row: 2;
  }

  .sounding-viewer__rail {
    grid-column: 1;
    grid-row: 3;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: row;
  }

  .sounding-viewer__hodo {
    flex: 1.4 1 auto;
    min-height: 220px;
  }

  .sounding-viewer__minimap {
    flex: 1 1 auto;
    max-height: none;
    min-height: 220px;
  }

  .sounding-viewer__mast .map-panel__guidance-note {
    display: none;
  }
}

.map-panel--stargazing {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 12;
  width: min(420px, calc(100vw - 2rem));
  max-height: min(68vh, 620px);
  overflow-y: auto;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid rgba(120, 160, 255, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.stargazing-section__title {
  margin: 0.75rem 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(160, 190, 255, 0.85);
}

/* ── Stargazing outlook ─────────────────────────────── */

.stargazing-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stargazing-empty {
  margin: 0;
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
  font-size: 0.875rem;
  line-height: 1.45;
}

.stargazing-location-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.stargazing-outlook-card {
  background: linear-gradient(145deg, rgba(12, 20, 36, 0.95), rgba(8, 14, 28, 0.98));
  border: 1px solid rgba(120, 160, 255, 0.22);
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.stargazing-outlook-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.stargazing-outlook-card__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(160, 190, 255, 0.85);
  font-weight: 600;
}

.stargazing-outlook-card__confidence {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.stargazing-outlook-card__hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.stargazing-outlook-card__category {
  font-family: var(--font-display, "Saira Condensed", sans-serif);
  font-size: 1.65rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.stargazing-outlook-card__score {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

.stargazing-outlook-card__score strong {
  font-size: 1.35rem;
  color: #fff;
}

.stargazing-outlook-card__window {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
}

.stargazing-outlook-card__discussion {
  margin: 0 0 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid rgba(120, 160, 255, 0.45);
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.stargazing-astro-quick {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8rem;
}

.stargazing-astro-quick div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.stargazing-astro-quick dt {
  color: rgba(255, 255, 255, 0.5);
}

.stargazing-astro-quick dd {
  margin: 0;
  text-align: right;
}

.sgi-excellent { color: #7ee787; }
.sgi-good { color: #79c0ff; }
.sgi-fair { color: #f2cc60; }
.sgi-poor { color: #ffa657; }
.sgi-very-poor { color: #ff7b72; }
.sgi-unknown { color: rgba(255, 255, 255, 0.35); }

.stargazing-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.stargazing-timeline__hour {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.5rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.stargazing-timeline__hour.is-best {
  outline: 1px solid rgba(126, 231, 135, 0.35);
  background: rgba(126, 231, 135, 0.06);
}

.stargazing-timeline__hour.is-daylight {
  opacity: 0.55;
}

.stargazing-timeline__time {
  grid-row: 1 / span 2;
  font-size: 0.75rem;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.stargazing-timeline__bar {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), currentColor);
  opacity: calc(0.35 + (var(--sgi-score, 0) / 100) * 0.65);
}

.stargazing-timeline__meta {
  grid-column: 2;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
}

.stargazing-timeline__score {
  grid-row: 1 / span 2;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.8rem;
  font-weight: 600;
}

.stargazing-event-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

.stargazing-event-card--eclipse {
  border-color: rgba(255, 200, 120, 0.35);
  background: linear-gradient(160deg, rgba(40, 24, 8, 0.55), rgba(10, 12, 24, 0.9));
}

.stargazing-event-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.stargazing-event-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.stargazing-event-card time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.stargazing-event-card__visibility,
.stargazing-event-card__summary {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.stargazing-eclipse-phases {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stargazing-eclipse-phase {
  display: grid;
  gap: 0.1rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.78rem;
}

.stargazing-eclipse-phase__time {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  color: rgba(255, 220, 160, 0.9);
}

.stargazing-eclipse-phase__label {
  font-weight: 600;
}

.stargazing-eclipse-phase__wx {
  color: rgba(255, 255, 255, 0.55);
}

.stargazing-param-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.stargazing-param-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stargazing-param-list .is-missing span:last-child {
  color: rgba(255, 123, 114, 0.85);
}

.stargazing-param-list .is-available span:last-child {
  color: rgba(126, 231, 135, 0.85);
}

/* ─── Telestration ────────────────────────────────────────── */
.map-panel--telestration {
  top: calc(var(--map-header-h) + 10px);
  right: 12px;
  left: auto;
  bottom: auto;
  z-index: 8;
  width: auto;
  max-width: min(240px, calc(100% - 24px));
  padding: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.map-panel--telestration[hidden],
.map-panel--telestration.control-hidden {
  display: none !important;
}

.telestration-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.telestration-toggle:hover {
  color: var(--accent);
}

.telestration-toggle__icon {
  display: flex;
  width: 16px;
  height: 16px;
  color: var(--map-gold);
}

.telestration-toggle__icon svg {
  width: 16px;
  height: 16px;
}

.map-panel--telestration.is-open .telestration-toggle {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.telestration-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.telestration-tools {
  display: grid;
  grid-template-columns: repeat(6, 32px);
  gap: 4px;
  justify-content: start;
}

.telestration-tool,
.telestration-actions button,
.telestration-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--input-bg);
  color: var(--muted);
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.telestration-tool {
  width: 32px;
  height: 32px;
  padding: 0;
}

.telestration-tool svg {
  width: 15px;
  height: 15px;
}

.telestration-tool:hover,
.telestration-actions button:hover,
.telestration-fill:hover {
  color: var(--text);
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.05);
}

.telestration-tool.is-active,
.telestration-fill.is-active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--text);
}

.telestration-style {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.telestration-swatches {
  display: flex;
  gap: 5px;
}

.telestration-swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--swatch);
  cursor: pointer;
}

.telestration-swatch.is-active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.telestration-width {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.telestration-width input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

.telestration-fill {
  align-self: start;
  height: 24px;
  padding: 0 8px;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
}

.telestration-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.telestration-actions button {
  height: 26px;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
}

.telestration-actions button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.telestration-hint {
  margin: 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .map-panel--telestration {
    right: 8px;
    max-width: calc(100% - 16px);
  }

  .telestration-toggle__label {
    display: none;
  }
}

/* â”€â”€â”€ Daily high/low meteogram â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Meteogram body UI (not header band, not SVG chart figures) */
.meteo-modal {
  font-family: var(--font);
  font-weight: 400;
}

.meteo-modal .meteo-pills,
.meteo-modal .meteo-pills
  *:not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fas):not(.far):not(.fab),
.meteo-modal .meteo-empty {
  font-family: var(--font);
  font-weight: 400;
}

.map-context-menu,
.map-context-menu
  *:not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fas):not(.far):not(.fab) {
  font-family: var(--font);
  font-weight: 400;
}

/* Font Awesome — only on icon elements so chart/UI fonts stay intact */
:is(.sidebar, .meteo-modal, .meteo-head, .map-context-menu, .app-shell)
  i:is(.fa-solid, .fas) {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  line-height: 1;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

:is(.sidebar, .meteo-modal, .meteo-head, .map-context-menu, .app-shell)
  i:is(.fa-regular, .far) {
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  font-style: normal;
}

:is(.sidebar, .meteo-modal, .meteo-head, .map-context-menu, .app-shell)
  i:is(.fa-brands, .fab) {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
  font-style: normal;
}

.meteo-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 16px calc(var(--sidebar-w) + 16px);
  pointer-events: none;
}

.meteo-modal[hidden] {
  display: none;
}

.meteo-card {
  pointer-events: auto;
  width: min(1080px, 100%);
  max-height: min(900px, calc(100vh - 32px));
  overflow: auto;
  color: #f8fafc;
  background: #0b1018;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 0 0 14px;
  scrollbar-width: thin;
  scrollbar-color: #334155 rgba(15, 23, 42, 0.6);
}

.meteo-card::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.meteo-card::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}

.meteo-card::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.meteo-card::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Header band matches the map product header (Saira 700). */
.meteo-head {
  position: relative;
  display: block;
  padding: 0;
  background: linear-gradient(180deg, #000000 0%, #303030 100%);
  font-family: var(--font-saira);
  font-weight: 700;
  overflow: hidden;
}

.meteo-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 14px;
}

.meteo-modal .meteo-head,
.meteo-modal .meteo-head
  *:not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fas):not(.far):not(.fab),
.meteo-head,
.meteo-head
  *:not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fas):not(.far):not(.fab) {
  font-family: var(--font-saira);
  font-weight: 700;
}

.meteo-title,
.meteo-kicker,
.meteo-run-pill,
.meteo-head .meteo-btn {
  font-family: var(--font-saira);
  font-weight: 700;
}

.meteo-head-rule {
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #c9c9c9 0%, #303030 100%);
}

.meteo-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.meteo-logo {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}

.meteo-brand-copy {
  min-width: 0;
}

.meteo-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  line-height: 1.2;
  color: #f8fafc;
}

.meteo-kicker {
  margin: 4px 0 0;
  color: #f59e0b;
  font-size: 14px;
  line-height: 1.2;
}

.meteo-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.meteo-run-pill {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 5px 12px;
  color: #e2e8f0;
  font-size: 13px;
  white-space: nowrap;
}

.meteo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meteo-btn {
  appearance: none;
  border: 1px solid transparent;
  color: #f8fafc;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.meteo-btn--save {
  background: #2563eb;
  border-color: #2563eb;
}

.meteo-btn--save:hover {
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.55);
}

.meteo-btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.meteo-btn--close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.meteo-btn--close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* State tabs + airport row. */
.meteo-chart {
  margin-left: 16px;
  margin-right: 16px;
}

.meteo-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.meteo-categories {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.meteo-category {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 6px 14px 7px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.meteo-category:hover {
  color: #e2e8f0;
}

.meteo-category.is-active {
  color: #f8fafc;
  border-bottom-color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.meteo-station-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.meteo-station-scroll::-webkit-scrollbar {
  display: none;
}

.meteo-pill {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
}

.meteo-pill:hover {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

.meteo-pill.is-active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  color: #f8fafc;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

/* Chart: identical frosted day cards. */
.meteo-chart {
  position: relative;
  margin-top: 12px;
  min-height: 320px;
  aspect-ratio: 960 / 468;
  overflow: hidden;
}

.meteo-cols {
  position: absolute;
  inset: 0;
}

.meteo-col {
  position: absolute;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.meteo-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.meteo-modal .meteo-svg :is(.meteo-num, .meteo-date, .meteo-dow),
.meteo-num,
.meteo-date,
.meteo-dow {
  font-family: var(--font-saira-cond);
  font-weight: 700;
}

.meteo-modal .meteo-svg .meteo-ylabel,
.meteo-ylabel {
  fill: #94a3b8;
  font-family: var(--font);
  font-weight: 500;
}

.meteo-num {
  fill: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.meteo-num--low {
  fill: #ffffff;
}

.meteo-date {
  fill: #f8fafc;
}

.meteo-dow {
  fill: #94a3b8;
  letter-spacing: 0.08em;
}

.meteo-dow--weekend {
  fill: #f59e0b;
}

.meteo-empty {
  margin: 0;
  min-height: 280px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 15px;
}

.map-context-menu {
  position: fixed;
  z-index: 140;
  min-width: 188px;
  padding: 6px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.map-context-menu[hidden] {
  display: none;
}

.map-context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.map-context-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 800px) {
  .meteo-modal {
    padding: 8px;
    align-items: flex-end;
  }

  .meteo-card {
    max-height: calc(100vh - 16px);
  }

  .meteo-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .meteo-head-side {
    align-items: flex-start;
  }

  .meteo-chart {
    aspect-ratio: 4 / 3;
    min-height: 240px;
  }
}

/* ═══ Sidebar redesign ═══════════════════════════════════════
   Neutral surfaces, Inter throughout, one restrained accent.
   Loaded last so it refines the earlier sidebar rules. */
.sidebar {
  --sb-bg: #0c0e12;
  --sb-bg-2: #12151b;
  --sb-card: #13161c;
  --sb-field: #0e1116;
  --sb-text: #e8ebf0;
  --sb-muted: #8b94a3;
  --sb-faint: #5f6775;
  --sb-border: rgba(255, 255, 255, 0.065);
  --sb-border-hi: rgba(255, 255, 255, 0.13);
  --sb-hover: rgba(255, 255, 255, 0.04);
  --sb-active: rgba(31, 37, 147, 0.12);
  --sb-accent: var(--msc-blue-bright);
  --sb-focus: rgba(117, 125, 232, 0.24);
  --sb-radius: 8px;
  --sb-ease: 0.16s cubic-bezier(0.3, 0.1, 0.25, 1);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss03", "tnum";
  font-size: 13px;
  letter-spacing: -0.006em;
  text-rendering: optimizeLegibility;
  border-color: var(--sb-border);
}

.sidebar *,
.sidebar button,
.sidebar select,
.sidebar input,
.sidebar label {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.sidebar .fa-solid,
.sidebar .fas {
  font-family: "Font Awesome 6 Free";
}
.sidebar .fa-regular,
.sidebar .far {
  font-family: "Font Awesome 6 Free";
}
.sidebar .fa-brands,
.sidebar .fab {
  font-family: "Font Awesome 6 Brands";
}

/* Header */
.sidebar-header {
  padding: 16px 16px 12px;
  gap: 10px;
}
.sidebar-header::before {
  height: 14px;
  width: 3px;
  background: var(--sb-accent);
}
.sidebar-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.016em;
}

/* Tabs: segmented rail */
.sidebar-nav {
  gap: 2px;
  margin: 0 12px 12px;
  padding: 3px;
  border: 1px solid var(--sb-border);
  border-radius: 10px;
  background: var(--sb-field);
}
.sidebar-nav__tab {
  flex-direction: row;
  gap: 6px;
  padding: 7px 4px;
  border: 0;
  border-radius: 7px;
  color: var(--sb-muted);
  transition:
    color var(--sb-ease),
    background var(--sb-ease),
    box-shadow var(--sb-ease);
}
.sidebar-nav__icon {
  width: 14px;
  height: 14px;
  font-size: 12px;
}
.sidebar-nav__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.006em;
}
.sidebar-nav__tab:hover {
  color: var(--sb-text);
  background: var(--sb-hover);
}
.sidebar-nav__tab.is-active {
  color: var(--sb-text);
  background: var(--sb-bg-2);
  border: 0;
  box-shadow:
    0 0 0 1px var(--sb-border-hi),
    0 1px 2px rgba(0, 0, 0, 0.4);
}
.sidebar-nav__tab.is-active .sidebar-nav__label {
  font-weight: 600;
}
.sidebar-nav__tab:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}
.sidebar-nav {
  border-bottom: 1px solid var(--sb-border);
}

/* Body */
.sidebar-body {
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.sidebar-panel {
  gap: 10px;
  padding: 2px 12px 20px;
}
.sidebar-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}
.sidebar-panel[data-sidebar-panel="labels"].is-active::before,
.sidebar-panel[data-sidebar-panel="discussions"].is-active::before {
  margin: 4px 2px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-transform: none;
  color: var(--sb-text);
}

/* Cards and accordions */
.sidebar-section,
.sidebar-accordion {
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  background: var(--sb-card);
  transition: border-color var(--sb-ease);
}
.sidebar-section {
  padding: 14px;
  gap: 14px;
}
.sidebar-accordion.is-open {
  border-color: rgba(255, 255, 255, 0.09);
}
.sidebar-accordion__trigger {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sidebar-accordion__trigger:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: -2px;
}
.sidebar-accordion__trigger-main {
  align-items: center;
  gap: 10px;
}
.sidebar-accordion__badge {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--sb-faint);
}
.sidebar-accordion__chevron {
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-width: 0 1.5px 1.5px 0;
  border-color: var(--sb-faint);
  transition:
    transform var(--sb-ease),
    border-color var(--sb-ease);
}
.sidebar-accordion__trigger:hover .sidebar-accordion__chevron {
  border-color: var(--sb-muted);
}
.sidebar-accordion__body {
  padding: 2px 14px 14px;
  gap: 14px;
}
.sidebar .control-stack,
.sidebar .control-block {
  gap: 12px;
}
.sidebar .control-block + .control-block {
  padding-top: 14px;
}
.sidebar-subheading,
.sub-card__title,
.sidebar .keybind-settings__category,
.contour-label-style__section > summary {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.006em;
  text-transform: none;
  color: var(--sb-muted);
}
.sidebar-subheading {
  margin: 16px 0 6px;
  padding-top: 12px;
}

/* Labels and fields */
.sidebar label,
.sidebar .field-row-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.006em;
  text-transform: none;
  color: var(--sb-muted);
  margin-bottom: 6px;
}
.sidebar .toggle-item label {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 450;
  color: var(--sb-text);
}
.sidebar .field-hint[id],
.sidebar .field-hint--live {
  font-size: 11.5px;
  color: var(--sb-faint);
}
.sidebar .field-row {
  gap: 10px;
}

.sidebar select,
.sidebar .text-input {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 450;
  letter-spacing: -0.006em;
  background-color: var(--sb-field);
  border: 1px solid var(--sb-border-hi);
  border-radius: var(--sb-radius);
  transition:
    border-color var(--sb-ease),
    background-color var(--sb-ease),
    box-shadow var(--sb-ease);
}
.sidebar select {
  padding-right: 30px;
}
.sidebar select:hover,
.sidebar .text-input:hover {
  background-color: #11141a;
  border-color: rgba(255, 255, 255, 0.2);
}
.sidebar select:focus,
.sidebar .text-input:focus {
  border-color: rgba(117, 125, 232, 0.55);
  box-shadow: 0 0 0 3px var(--sb-focus);
}
.sidebar .select--compact,
.sidebar .input--compact {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

/* Value badges, sliders, toggles */
.sidebar .value-badge {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--sb-text);
  font-variant-numeric: tabular-nums;
}
.sidebar .slider {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.sidebar .slider::-webkit-slider-thumb {
  background: #f1f3f6;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: transform var(--sb-ease);
}
.sidebar .slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}
.sidebar .slider::-moz-range-thumb {
  background: #f1f3f6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.sidebar .toggle {
  background: rgba(255, 255, 255, 0.14);
}
.sidebar .toggle:checked {
  background: var(--sb-accent);
}
.sidebar .toggle-item {
  padding: 8px 0;
}
.sidebar .color-swatch {
  border: 1px solid var(--sb-border-hi);
  border-radius: var(--sb-radius);
}
.sidebar .color-swatch:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Segmented controls and cycle pills */
.sidebar .segmented-control {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--sb-border);
  border-radius: 10px;
  background: var(--sb-field);
}
.sidebar .segmented-control__option {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--sb-muted);
  padding: 7px 8px;
  transition:
    background var(--sb-ease),
    color var(--sb-ease),
    box-shadow var(--sb-ease);
}
.sidebar .segmented-control__title {
  font-size: 12.5px;
  font-weight: 500;
}
.sidebar .segmented-control__option:hover {
  background: var(--sb-hover);
  color: var(--sb-text);
}
.sidebar .segmented-control__option.is-active {
  background: var(--sb-bg-2);
  color: var(--sb-text);
  box-shadow:
    0 0 0 1px var(--sb-border-hi),
    0 1px 2px rgba(0, 0, 0, 0.4);
}
.sidebar .segmented-control__option.is-active .segmented-control__title {
  font-weight: 600;
}
.sidebar .product-picker__kind .segmented-control__option {
  align-items: center;
  text-align: center;
  padding: 7px 8px;
}

.cycle-pills {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--sb-border);
  border-radius: 10px;
  background: var(--sb-field);
}
.cycle-pills__btn {
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 7px 0;
}
.cycle-pills__btn:hover {
  background: var(--sb-hover);
  color: var(--sb-text);
}
.cycle-pills__btn.is-active {
  background: var(--sb-bg-2);
  color: var(--sb-text);
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(117, 125, 232, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.4);
}
.cycle-pills__btn:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}

/* Buttons */
.sidebar .btn-primary,
.sidebar .btn-secondary,
.sidebar .btn.btn--ghost.btn--compact {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.008em;
  border-radius: var(--sb-radius);
  cursor: pointer;
}
.sidebar .btn-primary {
  background: var(--msc-blue);
  border: 1px solid rgba(0, 0, 0, 0.22);
  color: #fff;
}
.sidebar .btn-primary:hover {
  background: var(--msc-blue-hover);
  border-color: rgba(117, 125, 232, 0.45);
  color: #fff;
}
.sidebar .btn-primary:active {
  background: var(--msc-blue-pressed);
}
.sidebar .btn-secondary,
.sidebar .btn.btn--ghost.btn--compact {
  background: transparent;
  border: 1px solid var(--sb-border-hi);
  color: var(--sb-text);
}
.sidebar .btn-secondary:hover,
.sidebar .btn-secondary--accent:hover,
.sidebar .btn.btn--ghost.btn--compact:hover {
  background: var(--sb-hover);
  border-color: rgba(255, 255, 255, 0.22);
}
.sidebar .btn-secondary.is-active {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.4);
  color: var(--sb-accent);
}
.sidebar .btn-primary:focus-visible,
.sidebar .btn-secondary:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 2px;
}
.sidebar .btn-secondary--compact,
.sidebar .btn.btn--ghost.btn--compact {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}
.forecast-actions {
  gap: 8px;
}

/* Details, cards, lists */
.sidebar-details,
.contour-label-style__section {
  border-radius: var(--sb-radius);
  background: transparent;
}
.sidebar-details > summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
}
.sidebar-details__body {
  padding: 12px;
}
.sidebar .logo-picker__option,
.sidebar .place-list__item,
.sidebar .dash-card,
.sidebar .sub-card {
  background: var(--sb-field);
  border-radius: var(--sb-radius);
}
.sidebar .sub-card__hint {
  display: none;
}
.sidebar .keybind-row {
  padding: 8px 0;
}
.sidebar .keybind-row__label {
  font-size: 13px;
}
.sidebar .keybind-row__rebind {
  border-radius: 6px;
}
.sidebar .keybind-key {
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  background: var(--sb-bg-2);
}

/* Status dock */
.status-dock {
  background: var(--sb-bg);
  border-top: 1px solid var(--sb-border);
}
.status-dock__progress,
.sidebar .model-load-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar .model-load-progress__bar {
  background: var(--sb-accent);
  border-radius: 99px;
}
.status-dock__row {
  align-items: center;
  padding: 10px 16px 12px;
}
.status-dock__dot {
  margin-top: 0;
  background: #4ade80;
}
.status-dock.is-loading .status-dock__dot,
.status-dock__dot.is-pulsing {
  background: var(--sb-accent);
}
.status-dock__text,
#status-text,
.status-dock__progress-label {
  font-size: 12px;
  color: var(--sb-muted);
}

/* Responsive */
@media (min-width: 961px) and (max-width: 1100px) {
  :root {
    --sidebar-w: 320px;
  }
}
@media (max-width: 860px) {
  .sidebar-panel {
    padding: 2px 10px 16px;
  }
}
@media (max-height: 640px) {
  .sidebar-header {
    padding: 10px 16px 8px;
  }
  .sidebar-nav {
    margin-bottom: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar *,
  .sidebar-accordion__chevron {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}

/* ═══ Sidebar refinement ═════════════════════════════════════
   Final pass: Inter, soft hairlines, MSC blue accent, responsive layout. */
.sidebar {
  --sb-bg: #0b0d11;
  --sb-bg-2: #171b22;
  --sb-card: #111419;
  --sb-field: #0c0f13;
  --sb-text: #e9ecf1;
  --sb-muted: #8f98a7;
  --sb-faint: #626a78;
  --sb-border: rgba(255, 255, 255, 0.06);
  --sb-border-hi: rgba(255, 255, 255, 0.11);
  --sb-hover: rgba(255, 255, 255, 0.045);
  --sb-active: rgba(31, 37, 147, 0.16);
  --sb-accent: var(--msc-blue-bright);
  --sb-accent-warm: var(--msc-blue-bright);
  --sb-focus: rgba(117, 125, 232, 0.28);
  --sb-radius: 8px;
  --sb-radius-lg: 12px;
  --sb-field-h: 36px;
  --sb-pad: 14px;
  border: 1px solid var(--sb-border);
  border-radius: 14px;
  background: var(--sb-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 28px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.45;
  font-feature-settings: "cv11", "ss03", "tnum";
}

/* Header */
.sidebar-header {
  position: relative;
  gap: 11px;
  padding: 16px var(--sb-pad) 14px;
  background: var(--sb-bg);
  transition: box-shadow 0.2s ease;
}
.sidebar-header::before {
  content: none;
}
.sidebar.is-scrolled .sidebar-header {
  box-shadow: 0 1px 0 var(--sb-border);
}
.sidebar-brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(31, 37, 147, 0.55), #12151b 68%);
  border: 1px solid rgba(117, 125, 232, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.sidebar-brand__mark img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.sidebar .brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-title {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.018em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand__org {
  font-size: 11.5px;
  font-weight: 450;
  line-height: 1.2;
  color: var(--sb-faint);
  letter-spacing: -0.004em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabs */
.sidebar-nav {
  margin: 0 var(--sb-pad) 12px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--sb-border);
  border-radius: 11px;
  background: var(--sb-field);
}
.sidebar-nav__tab {
  min-height: 32px;
  padding: 6px 4px;
  border-radius: 8px;
  gap: 6px;
}
.sidebar-nav__icon {
  font-size: 11.5px;
  opacity: 0.75;
}
.sidebar-nav__label {
  font-size: 12px;
  font-weight: 500;
}
.sidebar-nav__tab.is-active {
  background: var(--sb-bg-2);
  box-shadow:
    0 0 0 1px var(--sb-border-hi),
    0 2px 6px rgba(0, 0, 0, 0.35);
}
.sidebar-nav__tab.is-active .sidebar-nav__icon {
  color: var(--sb-accent);
  opacity: 1;
}

/* Scroll region */
.sidebar-body {
  border-top: 1px solid var(--sb-border);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  scroll-behavior: smooth;
}
.sidebar-panel {
  gap: 12px;
  padding: 14px var(--sb-pad) 24px;
}
.sidebar-panel.is-active {
  animation: sb-panel-in 0.2s ease both;
}
@keyframes sb-panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sidebar-panel[data-sidebar-panel="labels"].is-active::before,
.sidebar-panel[data-sidebar-panel="discussions"].is-active::before {
  margin: 0 2px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.018em;
}

/* Cards and accordions */
.sidebar-section,
.sidebar-accordion {
  border-radius: var(--sb-radius-lg);
  border: 1px solid var(--sb-border);
  background: var(--sb-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.sidebar-section {
  padding: var(--sb-pad);
  gap: 14px;
}
.sidebar-accordion__trigger {
  padding: 13px var(--sb-pad);
  font-size: 13px;
  font-weight: 600;
  color: var(--sb-text);
}
.sidebar-accordion.is-open > .sidebar-accordion__trigger {
  padding-bottom: 11px;
}
.sidebar-accordion__body {
  padding: 4px var(--sb-pad) var(--sb-pad);
  gap: 14px;
}
.sidebar-accordion__body:not([hidden]) {
  animation: sb-panel-in 0.18s ease both;
}
.sidebar-accordion__chevron {
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-width: 0 1.5px 1.5px 0;
  border-color: var(--sb-faint);
}
.sidebar-subheading {
  margin: 18px 0 4px;
  padding-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sb-text);
  letter-spacing: -0.008em;
  text-transform: none;
}

/* Fields */
.sidebar label,
.sidebar .field-row-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--sb-muted);
  margin-bottom: 6px;
}
.sidebar .field {
  min-width: 0;
}
.sidebar .field-row {
  gap: 10px;
}
.sidebar select,
.sidebar .text-input {
  min-height: var(--sb-field-h);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 450;
  color: var(--sb-text);
  background-color: var(--sb-field);
  border: 1px solid var(--sb-border-hi);
  border-radius: var(--sb-radius);
  text-overflow: ellipsis;
}
.sidebar select {
  padding-right: 32px;
  background-position: right 12px center;
}
.sidebar select:hover,
.sidebar .text-input:hover {
  background-color: #10141a;
  border-color: rgba(255, 255, 255, 0.2);
}
.sidebar select:focus-visible,
.sidebar .text-input:focus-visible,
.sidebar select:focus,
.sidebar .text-input:focus {
  border-color: rgba(117, 125, 232, 0.6);
  box-shadow: 0 0 0 3px var(--sb-focus);
  outline: none;
}
.sidebar select:disabled,
.sidebar .text-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sidebar .product-picker {
  gap: 12px;
}
.sidebar .product-picker__kind {
  gap: 0;
}
.sidebar .product-picker__kind > .field-row-label {
  display: none;
}

/* Sliders and values */
.sidebar .slider-header {
  margin-bottom: 8px;
}
.sidebar .slider-header label {
  margin-bottom: 0;
}
.sidebar .value-badge {
  font-size: 12px;
  font-weight: 550;
  color: var(--sb-text);
  font-variant-numeric: tabular-nums;
}
.sidebar .value-badge--mono {
  font-family: var(--mono);
  font-size: 11.5px;
}
.sidebar .slider {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}
.sidebar .forecast-transport {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.sidebar .forecast-transport__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--sb-border-hi);
  border-radius: 7px;
  background: var(--sb-bg-2);
  color: var(--sb-muted);
  cursor: pointer;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}

.sidebar .forecast-transport__btn:hover:not(:disabled) {
  background: var(--sb-hover);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--sb-text);
}

.sidebar .forecast-transport__btn:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}

.sidebar .forecast-transport__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sidebar .forecast-transport__btn i {
  font-size: 11px;
  pointer-events: none;
}

.sidebar .forecast-transport__btn--play {
  width: 32px;
  height: 32px;
  color: var(--sb-text);
  background: var(--sb-card);
}

.sidebar .forecast-transport__btn--play:not(.is-playing) i {
  transform: translateX(1px);
}

.sidebar .forecast-transport__btn--play.is-playing {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.45);
  color: var(--sb-accent);
}

.sidebar .forecast-transport__btn--loop {
  margin-left: auto;
}

.sidebar .forecast-transport__btn--loop.is-on {
  color: var(--sb-accent);
  border-color: rgba(117, 125, 232, 0.35);
  background: var(--sb-active);
}

.sidebar .slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  background: #f3f5f8;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.5);
}
.sidebar .slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--sb-focus);
}
.sidebar .slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
}

/* Toggles */
.sidebar .toggle-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--sb-border);
}
.sidebar .toggle-item:last-child {
  border-bottom: 0;
}
.sidebar .toggle {
  width: 34px;
  height: 20px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}
.sidebar .toggle::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.sidebar .toggle:checked {
  background: var(--sb-accent);
}
.sidebar .toggle:checked::after {
  transform: translateX(14px);
  background: #fff;
}
.sidebar .toggle:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 2px;
}
.sidebar input[type="checkbox"]:not(.toggle),
.sidebar input[type="radio"] {
  accent-color: var(--sb-accent);
}

/* Segmented controls and cycle pills */
.sidebar .segmented-control,
.cycle-pills {
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--sb-border);
  border-radius: 10px;
  background: var(--sb-field);
}
.sidebar .segmented-control__option,
.cycle-pills__btn {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--sb-muted);
}
.sidebar .segmented-control__option:hover,
.cycle-pills__btn:hover {
  background: var(--sb-hover);
  color: var(--sb-text);
}
.sidebar .segmented-control__option.is-active,
.cycle-pills__btn.is-active {
  background: var(--sb-bg-2);
  color: var(--sb-text);
  box-shadow:
    0 0 0 1px var(--sb-border-hi),
    0 2px 6px rgba(0, 0, 0, 0.3);
}
.cycle-pills__btn.is-active {
  color: var(--sb-accent);
}
.sidebar .segmented-control__title {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.sidebar .product-picker__kind .segmented-control__option {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
}

/* Buttons */
.forecast-actions {
  gap: 8px;
  padding: 0;
}
.sidebar .btn-primary,
.sidebar .btn-secondary,
.sidebar .btn.btn--ghost.btn--compact {
  min-height: var(--sb-field-h);
  border-radius: var(--sb-radius);
  font-size: 13px;
  font-weight: 560;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease),
    transform 0.08s ease;
}
.sidebar .btn-primary {
  gap: 8px;
  background: var(--msc-blue);
  border: 1px solid rgba(0, 0, 0, 0.22);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.sidebar .btn-primary:hover {
  background: var(--msc-blue-hover);
  border-color: rgba(117, 125, 232, 0.4);
  color: #fff;
}
.sidebar .btn-primary:active {
  background: var(--msc-blue-pressed);
}
.sidebar .btn-primary:active,
.sidebar .btn-secondary:active {
  transform: translateY(0.5px);
}
.sidebar .btn-primary:disabled,
.sidebar .btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.sidebar .btn-secondary,
.sidebar .btn.btn--ghost.btn--compact {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--sb-border-hi);
  color: var(--sb-text);
}
.sidebar .btn-secondary:hover,
.sidebar .btn.btn--ghost.btn--compact:hover {
  background: var(--sb-hover);
  border-color: rgba(255, 255, 255, 0.2);
}
.sidebar .btn-secondary--compact {
  padding: 8px 14px;
  font-size: 13px;
}
.sidebar .btn-secondary--full {
  width: 100%;
}

/* Nested details, lists, swatches */
.sidebar-details {
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  background: var(--sb-field);
}
.sidebar-details > summary {
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 500;
}
.sidebar-details > summary::after {
  content: "";
  float: none;
  margin-left: auto;
  width: 6px;
  height: 6px;
  border: solid var(--sb-faint);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.sidebar-details[open] > summary::after {
  transform: rotate(-135deg);
}
.sidebar-details > summary:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: -2px;
  border-radius: 10px;
}
.sidebar-details__body {
  padding: 14px 12px 12px;
  gap: 14px;
}
.sidebar .logo-picker__option,
.sidebar .place-list__item,
.sidebar .dash-card,
.sidebar .sub-card {
  border: 1px solid var(--sb-border);
  border-radius: 10px;
  background: var(--sb-field);
}
.sidebar .color-swatch {
  border-radius: var(--sb-radius);
}
.sidebar .field-hint--live,
.sidebar .field-hint[id] {
  font-size: 12px;
  color: var(--sb-faint);
}

/* Status dock */
.status-dock {
  position: relative;
  background: var(--sb-bg);
  border-top: 1px solid var(--sb-border);
}
.status-dock__row {
  align-items: center;
  gap: 10px;
  padding: 11px var(--sb-pad) 13px;
}
.status-dock__dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}
.status-dock.is-loading .status-dock__dot,
.status-dock__dot.is-pulsing {
  background: var(--sb-accent);
  box-shadow: 0 0 0 3px rgba(117, 125, 232, 0.16);
  animation: sb-pulse 1.4s ease-in-out infinite;
}
@keyframes sb-pulse {
  50% {
    box-shadow: 0 0 0 5px rgba(117, 125, 232, 0.04);
  }
}
.status-dock__text-wrap {
  min-width: 0;
}
.status-dock__text,
#status-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--sb-muted);
  overflow-wrap: anywhere;
}
.status-dock__progress-label {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--sb-faint);
  font-variant-numeric: tabular-nums;
}
.status-dock__progress,
.sidebar .model-load-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}

/* Responsive: sidebar width follows the viewport, then height */
@media (min-width: 961px) and (max-width: 1100px), (max-width: 420px) {
  .sidebar-nav__icon {
    display: none;
  }
  .sidebar-brand__org {
    display: none;
  }
  .sidebar-panel {
    padding-left: 10px;
    padding-right: 10px;
  }
  .sidebar-section,
  .sidebar-accordion__trigger {
    --sb-pad: 12px;
  }
}
@media (max-width: 420px) {
  .sidebar .field-row,
  .sidebar .color-row,
  .window-timeframe-grid .field-row--datetime {
    grid-template-columns: minmax(0, 1fr);
  }
  .forecast-actions {
    flex-wrap: wrap;
  }
  .sidebar .forecast-actions .btn-secondary {
    flex: 1 1 100%;
  }
  .sidebar-nav__label {
    font-size: 11.5px;
  }
}
@media (max-height: 700px) {
  .sidebar-header {
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .sidebar-brand__mark {
    width: 28px;
    height: 28px;
  }
  .sidebar-brand__org {
    display: none;
  }
  .sidebar-panel {
    gap: 10px;
    padding-top: 10px;
  }
}
@media (hover: none) {
  .sidebar select,
  .sidebar .text-input,
  .sidebar .btn-primary,
  .sidebar .btn-secondary {
    min-height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-panel.is-active,
  .sidebar-accordion__body:not([hidden]),
  .status-dock__dot {
    animation: none !important;
  }
  .sidebar-body {
    scroll-behavior: auto;
  }
}

/* ─── Scenes tab ──────────────────────────────────────────── */
.sidebar .sidebar-nav {
  gap: 2px;
}
.sidebar .sidebar-nav__tab {
  flex-direction: column;
  gap: 3px;
  padding: 6px 2px 5px;
}
.sidebar .sidebar-nav__label {
  font-size: 11px;
}

.sidebar .sidebar-section--scenes {
  padding-bottom: 8px;
}
.sidebar .scenes-intro {
  margin-bottom: 10px;
}
.sidebar .scenes-intro__title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--sb-text);
}
.sidebar .scenes-intro__text {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--sb-muted);
}

.sidebar .scenes-hub {
  --scenes-radius: 8px;
  --scenes-gold: var(--sb-accent, var(--msc-blue-bright));
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.sidebar .scenes-hub [hidden] {
  display: none !important;
}

/* Buttons */
.sidebar .scenes-btn,
.sidebar .scenes-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--sb-border-hi, rgba(255, 255, 255, 0.13));
  border-radius: 7px;
  background: var(--sb-bg-2);
  color: var(--sb-text);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}
.sidebar .scenes-btn:hover,
.sidebar .scenes-icon-btn:hover:not(:disabled) {
  background: var(--sb-hover);
  border-color: rgba(255, 255, 255, 0.22);
}
.sidebar .scenes-btn:focus-visible,
.sidebar .scenes-icon-btn:focus-visible,
.sidebar .scene-card__main:focus-visible,
.sidebar .scenes-color:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}
.sidebar .scenes-btn i,
.sidebar .scenes-icon-btn i {
  font-size: 11px;
  opacity: 0.85;
}
.sidebar .scenes-btn--primary {
  background: var(--msc-blue);
  border-color: rgba(0, 0, 0, 0.22);
  color: #fff;
}
.sidebar .scenes-btn--primary:hover {
  background: var(--msc-blue-hover);
  border-color: rgba(117, 125, 232, 0.45);
  color: #fff;
}
.sidebar .scenes-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--sb-muted);
}
.sidebar .scenes-btn--ghost:hover {
  color: var(--sb-text);
  background: var(--sb-hover);
  border-color: transparent;
}
.sidebar .scenes-btn--danger {
  color: #e48a8a;
}
.sidebar .scenes-btn--danger:hover {
  background: rgba(217, 112, 112, 0.12);
  border-color: rgba(217, 112, 112, 0.5);
}
.sidebar .scenes-btn--latest {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  background: rgba(62, 168, 104, 0.18);
  border-color: rgba(110, 214, 150, 0.72);
  color: #d7ffe6;
  font-weight: 650;
  box-shadow:
    0 0 0 1px rgba(110, 214, 150, 0.16),
    0 0 16px rgba(62, 168, 104, 0.28);
}
.sidebar .scenes-btn--latest i {
  color: #7dffa8;
  opacity: 1;
}
.sidebar .scenes-btn--latest:hover {
  background: rgba(62, 168, 104, 0.3);
  border-color: #9dffc0;
  color: #f3fff7;
}
.sidebar .scenes-btn--key {
  justify-content: flex-start;
  min-width: 120px;
  color: var(--sb-muted);
}
.sidebar .scenes-icon-btn {
  width: 28px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: var(--sb-muted);
}
.sidebar .scenes-icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.sidebar .scenes-icon-btn.is-on {
  color: var(--sb-accent);
  background: var(--sb-active);
}
.sidebar .scenes-icon-btn--danger:hover:not(:disabled) {
  color: #e48a8a;
  background: rgba(217, 112, 112, 0.12);
}

/* Toolbar */
.sidebar .scenes-media {
  gap: 8px;
}
.sidebar .scenes-media .slider-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.sidebar .scenes-media .slider-header label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sb-muted);
}
.sidebar .scenes-media__live {
  min-width: 52px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.sidebar .scenes-media__live.is-on {
  color: #9dffc0;
  border-color: rgba(110, 214, 150, 0.55);
  background: rgba(62, 168, 104, 0.14);
}

.sidebar .scenes-media-dock {
  min-height: 0;
  transition:
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.sidebar .scenes-media-dock.is-snap-target {
  border-radius: var(--scenes-radius, 8px);
  box-shadow:
    inset 0 0 0 2px rgba(110, 214, 150, 0.55),
    0 0 0 4px rgba(62, 168, 104, 0.12);
  background: rgba(62, 168, 104, 0.06);
}
.sidebar .scenes-media-dock__hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(110, 214, 150, 0.35);
  border-radius: var(--scenes-radius, 8px);
  text-align: center;
  color: var(--sb-muted);
}

.scenes-media.is-floating {
  --sb-bg: #0b0d11;
  --sb-bg-2: #171b22;
  --sb-card: #111419;
  --sb-field: #0c0f13;
  --sb-text: #e9ecf1;
  --sb-muted: #8f98a7;
  --sb-faint: #626a78;
  --sb-border: rgba(255, 255, 255, 0.06);
  --sb-border-hi: rgba(255, 255, 255, 0.11);
  --sb-hover: rgba(255, 255, 255, 0.045);
  --sb-active: rgba(31, 37, 147, 0.16);
  --sb-accent: var(--msc-blue-bright);
  --sb-focus: rgba(117, 125, 232, 0.28);
  --sb-ease: 0.15s ease;
  --sb-radius: 8px;
  --scenes-radius: 8px;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  position: fixed;
  z-index: 1400;
  width: min(100%, 320px);
  max-width: calc(100vw - 24px);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: var(--scenes-radius);
  background: var(--sb-card);
  color: var(--sb-text);
  font-family: var(--font-inter, Inter, system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  font-feature-settings: "cv11", "ss03", "tnum";
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.25);
  touch-action: none;
}
.scenes-media.is-floating.is-snap-highlight {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(157, 255, 192, 0.85),
    0 0 24px rgba(62, 168, 104, 0.35);
}
.scenes-media.is-floating .scenes-media__grip {
  color: var(--sb-muted);
}
.scenes-media.is-floating .scenes-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--sb-border-hi);
  border-radius: 7px;
  background: var(--sb-bg-2);
  color: var(--sb-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}
.scenes-media.is-floating .scenes-icon-btn:hover:not(:disabled) {
  background: var(--sb-hover);
  border-color: rgba(255, 255, 255, 0.22);
}
.scenes-media.is-floating .scenes-icon-btn:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}
.scenes-media.is-floating .scenes-icon-btn i {
  font-size: 11px;
  pointer-events: none;
}
.scenes-media.is-floating .scenes-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--sb-border-hi);
  border-radius: 7px;
  background: var(--sb-bg-2);
  color: var(--sb-text);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}
.scenes-media.is-floating .scenes-btn--ghost {
  background: transparent;
  color: var(--sb-muted);
}
.scenes-media.is-floating .scenes-btn--ghost:hover {
  background: var(--sb-hover);
  color: var(--sb-text);
}
.scenes-media.is-floating .scenes-media__live {
  min-width: 52px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.scenes-media.is-floating .scenes-media__live.is-on {
  color: #9dffc0;
  border-color: rgba(110, 214, 150, 0.55);
  background: rgba(62, 168, 104, 0.14);
}
.scenes-media.is-floating .slider-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.scenes-media.is-floating .slider-header label {
  margin-bottom: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--sb-muted);
}
.scenes-media.is-floating .value-badge {
  font-size: 12px;
  font-weight: 550;
  color: var(--sb-text);
  font-variant-numeric: tabular-nums;
}
.scenes-media.is-floating .value-badge--mono {
  font-family: var(--mono);
  font-size: 11.5px;
}
.scenes-media.is-floating .slider {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}
.scenes-media.is-floating .slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  background: #f3f5f8;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.5);
}
.scenes-media.is-floating .slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--sb-focus);
}
.scenes-media.is-floating .slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
}
.scenes-media.is-floating .forecast-transport {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}
.scenes-media.is-floating .forecast-transport__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--sb-border-hi);
  border-radius: 7px;
  background: var(--sb-bg-2);
  color: var(--sb-muted);
  cursor: pointer;
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    color var(--sb-ease);
}
.scenes-media.is-floating .forecast-transport__btn:hover:not(:disabled) {
  background: var(--sb-hover);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--sb-text);
}
.scenes-media.is-floating .forecast-transport__btn:focus-visible {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}
.scenes-media.is-floating .forecast-transport__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.scenes-media.is-floating .forecast-transport__btn i {
  font-size: 11px;
  pointer-events: none;
}
.scenes-media.is-floating .forecast-transport__btn--play {
  width: 32px;
  height: 32px;
  color: var(--sb-text);
  background: var(--sb-card);
}
.scenes-media.is-floating .forecast-transport__btn--play:not(.is-playing) i {
  transform: translateX(1px);
}
.scenes-media.is-floating .forecast-transport__btn--play.is-playing {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.45);
  color: var(--sb-accent);
}
.scenes-media.is-floating .forecast-transport__btn--loop {
  margin-left: auto;
}
.scenes-media.is-floating .forecast-transport__btn--loop.is-on {
  color: var(--sb-accent);
  border-color: rgba(117, 125, 232, 0.35);
  background: var(--sb-active);
}
.scenes-media.is-floating .scenes-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--sb-muted);
}
.scenes-media.is-dragging {
  opacity: 0.96;
}
.scenes-media__chrome {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -2px 0 4px;
}
.scenes-media__grip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 4px;
  border-radius: 6px;
  color: var(--sb-muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.scenes-media__grip i {
  font-size: 11px;
  opacity: 0.75;
}
.scenes-media.is-dragging .scenes-media__grip {
  cursor: grabbing;
}
.scenes-media__detach,
.scenes-media__dock {
  flex-shrink: 0;
}
.scenes-media__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .scenes-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar .scenes-toolbar__spacer {
  flex: 1;
}

/* Panels (composer, tools) */
.sidebar .scenes-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: var(--scenes-radius);
  background: var(--sb-card);
}
.sidebar .scenes-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.sidebar .scenes-field__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sb-muted);
}
.sidebar .scenes-input,
.sidebar .scenes-select {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: 7px;
  background: var(--sb-field, var(--sb-bg-2));
  color: var(--sb-text);
  font: inherit;
  font-size: 12.5px;
}
.sidebar .scenes-input:focus,
.sidebar .scenes-select:focus {
  outline: none;
  border-color: rgba(117, 125, 232, 0.55);
  box-shadow: 0 0 0 3px var(--sb-focus);
}
.sidebar .scenes-select:disabled {
  opacity: 0.45;
}
.sidebar .scenes-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sidebar .scenes-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--sb-muted);
}
.sidebar .scenes-hint--center {
  text-align: center;
  padding: 14px 0;
}
.sidebar .scenes-hint--meta {
  color: var(--sb-faint, var(--sb-muted));
  font-size: 10.5px;
}

/* Part chips */
.sidebar .scenes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sidebar .scenes-chip {
  position: relative;
  cursor: pointer;
}
.sidebar .scenes-chip input,
.sidebar .scenes-seg__item input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.sidebar .scenes-chip__face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: 99px;
  font-size: 11.5px;
  color: var(--sb-muted);
  transition:
    background var(--sb-ease),
    color var(--sb-ease),
    border-color var(--sb-ease);
}
.sidebar .scenes-chip__face i {
  font-size: 10.5px;
}
.sidebar .scenes-chip input:checked + .scenes-chip__face {
  background: var(--sb-active);
  border-color: rgba(117, 125, 232, 0.45);
  color: var(--sb-accent);
}
.sidebar .scenes-chip input:focus-visible + .scenes-chip__face {
  outline: 2px solid var(--sb-focus);
  outline-offset: 1px;
}

/* Segmented control */
.sidebar .scenes-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: 8px;
  background: var(--sb-field, var(--sb-bg-2));
}
.sidebar .scenes-seg__item {
  position: relative;
  cursor: pointer;
}
.sidebar .scenes-seg__face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--sb-muted);
  transition:
    background var(--sb-ease),
    color var(--sb-ease);
}
.sidebar .scenes-seg__item input:checked + .scenes-seg__face {
  background: var(--sb-bg-2);
  color: var(--sb-text);
  box-shadow: 0 0 0 1px var(--sb-border-hi, var(--sb-border));
}
.sidebar .scenes-seg__item input:focus-visible + .scenes-seg__face {
  outline: 2px solid var(--sb-focus);
}

/* Switch */
.sidebar .scenes-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--sb-text);
}
.sidebar .scenes-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.sidebar .scenes-switch__track {
  position: relative;
  flex: none;
  width: 30px;
  height: 17px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  transition: background var(--sb-ease);
}
.sidebar .scenes-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e8ebf0;
  transition: transform var(--sb-ease);
}
.sidebar .scenes-switch input:checked + .scenes-switch__track {
  background: rgba(117, 125, 232, 0.75);
}
.sidebar .scenes-switch input:checked + .scenes-switch__track::after {
  transform: translateX(13px);
}
.sidebar .scenes-switch input:focus-visible + .scenes-switch__track {
  outline: 2px solid var(--sb-focus);
  outline-offset: 2px;
}

/* Search / undo */
.sidebar .scenes-search {
  position: relative;
  display: flex;
  align-items: center;
}
.sidebar .scenes-search i {
  position: absolute;
  left: 10px;
  font-size: 11px;
  color: var(--sb-muted);
  pointer-events: none;
}
.sidebar .scenes-search .scenes-input {
  padding-left: 28px;
}
.sidebar .scenes-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: var(--scenes-radius);
  background: var(--sb-card);
  font-size: 12px;
  color: var(--sb-text);
}
.sidebar .scenes-undo__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rows */
.sidebar .scenes-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar .scenes-row {
  border-radius: var(--scenes-radius);
  transition: background var(--sb-ease), box-shadow var(--sb-ease);
}
.sidebar .scenes-row.is-drop-target {
  background: rgba(117, 125, 232, 0.06);
  box-shadow: 0 0 0 1px rgba(117, 125, 232, 0.4);
}
.sidebar .scenes-row__head {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 6px;
}
.sidebar .scenes-row__toggle {
  width: 24px;
  min-height: 24px;
}
.sidebar .scenes-row__name {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--sb-text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
}
.sidebar .scenes-row__name:hover {
  background: var(--sb-hover);
}
.sidebar .scenes-row__name:focus {
  outline: none;
  background: var(--sb-field, var(--sb-bg-2));
  border-color: rgba(117, 125, 232, 0.5);
}
.sidebar .scenes-row__count {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  text-align: center;
  color: var(--sb-muted);
}
.sidebar .scenes-row__tools {
  display: inline-flex;
  margin-left: 4px;
  opacity: 0;
  transition: opacity var(--sb-ease);
}
.sidebar .scenes-row:hover .scenes-row__tools,
.sidebar .scenes-row:focus-within .scenes-row__tools {
  opacity: 1;
}
.sidebar .scenes-row__tools .scenes-icon-btn {
  width: 24px;
  min-height: 24px;
}
.sidebar .scenes-row__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 10px;
  border: 1px dashed var(--sb-border-hi, var(--sb-border));
  border-radius: var(--scenes-radius);
  font-size: 11.5px;
  text-align: center;
  color: var(--sb-muted);
}

/* Grid */
.sidebar .scenes-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sidebar .scenes-grid[data-view="list"] {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 420px) {
  .sidebar .scenes-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Scene card */
.sidebar .scene-card {
  --scene-color: rgba(255, 255, 255, 0.18);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--sb-border-hi, var(--sb-border));
  border-radius: var(--scenes-radius);
  background: var(--sb-card);
  overflow: hidden;
  transition:
    border-color var(--sb-ease),
    background var(--sb-ease),
    box-shadow var(--sb-ease),
    transform var(--sb-ease);
}
.sidebar .scene-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: var(--sb-bg-2);
}
.sidebar .scene-card.is-active {
  border-color: var(--scene-color);
  box-shadow: 0 0 0 1px var(--scene-color) inset;
}
.sidebar .scene-card.is-expanded {
  grid-column: 1 / -1;
}
.sidebar .scene-card.is-dragging {
  opacity: 0.45;
}
.sidebar .scene-card.is-drop-before {
  box-shadow: -3px 0 0 0 var(--sb-accent);
}
.sidebar .scene-card__main {
  appearance: none;
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 0 4px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sidebar .scene-card__swatch {
  flex: none;
  width: 4px;
  background: var(--scene-color);
}
.sidebar .scene-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding: 9px 0 9px 2px;
}
.sidebar .scene-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--sb-text);
}
.sidebar .scene-card__detail,
.sidebar .scene-card__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--sb-muted);
}
.sidebar .scene-card__sub {
  color: var(--sb-faint, var(--sb-muted));
  font-size: 10.5px;
}
.sidebar .scene-card__parts {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--sb-faint, var(--sb-muted));
}
.sidebar .scene-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 4px 6px;
}
.sidebar .scene-card__edit {
  width: 24px;
  min-height: 24px;
  opacity: 0.55;
}
.sidebar .scene-card:hover .scene-card__edit,
.sidebar .scene-card.is-expanded .scene-card__edit,
.sidebar .scene-card__edit:focus-visible {
  opacity: 1;
}
.sidebar .scene-card__warm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  color: var(--sb-faint, var(--sb-muted));
}
.sidebar .scene-card__warm[data-state="ready"] {
  color: #6fbf8b;
}
.sidebar .scene-card__warm[data-state="warming"] i {
  animation: scenes-spin 0.9s linear infinite;
  color: var(--sb-accent);
}
.sidebar .scene-card__warm[data-state="error"] {
  color: #d9a15e;
}
.sidebar .scene-card__key {
  display: inline-flex;
  gap: 2px;
  max-width: 100%;
  overflow: hidden;
  transform: scale(0.88);
  transform-origin: right center;
}
.sidebar .scene-card__spinner {
  display: none;
}
.sidebar .scene-card.is-loading::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--scene-color, var(--sb-accent)),
    transparent
  );
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: scenes-sweep 1s ease-in-out infinite;
}
.sidebar .scene-card.is-recording {
  border-color: rgba(117, 125, 232, 0.6);
}
@keyframes scenes-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes scenes-sweep {
  from {
    background-position: -50% 0;
  }
  to {
    background-position: 150% 0;
  }
}

/* Inline editor */
.sidebar .scene-editor {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--sb-border);
  background: rgba(0, 0, 0, 0.18);
}
.sidebar .scenes-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar .scenes-color {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  color: var(--sb-muted);
  font-size: 9px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.sidebar .scenes-color--none {
  background: transparent;
}
.sidebar .scenes-color[aria-pressed="true"] {
  border-color: var(--sb-bg);
  box-shadow: 0 0 0 2px var(--sb-text);
}
.sidebar .scenes-shortcut {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Empty state */
.sidebar .scenes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 16px 22px;
  border: 1px dashed var(--sb-border-hi, var(--sb-border));
  border-radius: 10px;
  text-align: center;
}
.sidebar .scenes-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sb-active);
  color: var(--sb-accent);
  font-size: 16px;
}
.sidebar .scenes-empty__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--sb-text);
}
.sidebar .scenes-empty__text {
  margin: 0 0 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--sb-muted);
}
.sidebar .scenes-footnote {
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--sb-faint, var(--sb-muted));
}

@media (prefers-reduced-motion: reduce) {
  .sidebar .scene-card.is-loading::after,
  .sidebar .scene-card__warm[data-state="warming"] i {
    animation: none;
  }
}

.sidebar .radar-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
}
.sidebar .radar-sat-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

/* Forecast controls share the map's quiet navy surfaces. */
.sidebar {
  --sb-bg: #0b0e14;
  --sb-card: #111722;
  --sb-field: #161c28;
  --sb-border: rgba(255, 255, 255, 0.045);
  --sb-border-hi: rgba(255, 255, 255, 0.08);
}
#panel-forecast .sidebar-section,
#panel-forecast .sidebar-accordion {
  border: 0;
  background: #111722;
  box-shadow: none;
  border-radius: 12px;
}
#panel-forecast .sidebar-accordion__trigger {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 11px;
  color: #b6c3d7;
}
#panel-forecast select,
#panel-forecast .text-input {
  background-color: #161c28;
  border-color: transparent;
  border-radius: 8px;
}
#panel-forecast .product-picker__kind {
  margin: -3px -3px 4px;
}
#panel-forecast .segmented-control__option.is-active,
#panel-forecast .cycle-pills__btn.is-active {
  background: #1f2593;
  color: #fff;
}
#panel-forecast .forecast-actions {
  margin: 0 2px 2px;
}
#panel-forecast #model-time-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px;
  align-items: end;
}
#panel-forecast #model-time-group > .field { min-width: 0; }
#panel-forecast #model-time-group .cycle-pills { min-height: 36px; }
#panel-forecast #day-picker-group .field-hint { margin-top: 4px; }

/* Forecast panel: one clear viewing flow, with detail only when needed. */
#panel-forecast {
  gap: 12px;
  padding: 4px 12px 24px;
}
#panel-forecast .forecast-step {
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(25, 34, 49, 0.94), rgba(15, 21, 32, 0.97));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045), 0 6px 18px rgba(0, 0, 0, 0.12);
}
#panel-forecast .forecast-step--product { padding: 16px; }
#panel-forecast .forecast-step__heading,
#panel-forecast .sidebar-accordion__title {
  display: flex;
  align-items: center;
  gap: 11px;
}
#panel-forecast .forecast-step__heading { margin-bottom: 15px; }
#panel-forecast .forecast-step__number {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(73, 93, 235, 0.2);
  color: #a9b8ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}
#panel-forecast .forecast-step h2,
#panel-forecast .sidebar-accordion__title > span:last-child {
  margin: 0;
  color: #f3f7ff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
#panel-forecast .forecast-step__heading p,
#panel-forecast .sidebar-accordion__title small {
  display: block;
  margin: 4px 0 0;
  color: #8999ae;
  font-size: 11px;
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}
#panel-forecast .sidebar-accordion__trigger {
  padding: 16px;
  min-height: 59px;
}
#panel-forecast .sidebar-accordion__body { padding: 0 16px 16px; }
#panel-forecast .product-picker { gap: 13px; }
#panel-forecast .product-picker__kind { margin: 0 0 2px; }
#panel-forecast .product-picker__kind .segmented-control {
  padding: 3px;
  border: 0;
  border-radius: 10px;
  background: #0b111d;
}
#panel-forecast .product-picker__kind .segmented-control__option {
  min-height: 38px;
  padding: 7px 4px;
}
#panel-forecast .segmented-control__title { font-size: 12px; font-weight: 650; }
#panel-forecast label,
#panel-forecast .field-row-label {
  color: #aab9cf;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
#panel-forecast select,
#panel-forecast .text-input {
  min-height: 40px;
  color: #f4f7ff;
  background-color: #1a2433;
  font-size: 14px;
  font-weight: 570;
}
#panel-forecast select:hover,
#panel-forecast .text-input:hover { background-color: #202d40; }
#panel-forecast .field-hint { color: #8293a9; font-size: 11px; }
#panel-forecast .forecast-actions--load { padding: 0 2px; margin: -2px 0 1px; }
#panel-forecast .forecast-actions--load .btn-primary {
  min-height: 43px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #2834ae;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 5px 14px rgba(15, 20, 95, 0.25);
}
#panel-forecast .forecast-actions--load .btn-primary:hover { background: #3948ca; }
#panel-settings .nwp-display-controls[hidden] { display: none; }
#panel-settings .nwp-display-controls { display: grid; gap: 12px; }
#panel-settings .nwp-display-controls__toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#panel-settings .nwp-display-controls__toggles .nwp-layers__check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #1a2433;
  color: #dce5f3;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
#panel-settings .nwp-display-controls__toggles input { accent-color: #4c6aff; }
#panel-forecast .sidebar-details {
  border: 0;
  border-radius: 9px;
  background: #161e2b;
}
#panel-forecast .sidebar-details > summary { color: #cbd7e7; }
#panel-forecast .forecast-transport__btn { width: 34px; height: 34px; border: 0; background: #1a2433; }
#panel-forecast .forecast-transport__btn--play { width: 38px; height: 38px; background: #2834ae; color: #fff; }
#panel-forecast .forecast-transport__btn--loop.is-on { color: #fff; background: #2834ae; }
#panel-forecast .cycle-pills__btn.is-active { background: #2834ae; color: #fff; box-shadow: none; }
#panel-forecast .slider { accent-color: #6979ff; }
#panel-forecast .sidebar-accordion__trigger:focus-visible,
#panel-forecast :is(button, select, input, summary):focus-visible { outline: 2px solid #8093ff; outline-offset: 2px; }
@media (max-width: 420px) {
  #panel-forecast #model-time-group { grid-template-columns: 1fr; }
  #panel-settings .nwp-display-controls__toggles { grid-template-columns: 1fr; }
}

/* Shared broadcast control deck across every sidebar tab. */
.sidebar {
  --sb-bg: #0b0e14;
  --sb-bg-2: #101722;
  --sb-card: #121a27;
  --sb-field: #1a2433;
  --sb-text: #f3f7ff;
  --sb-muted: #aab9cc;
  --sb-faint: #8191a7;
  --sb-border: rgba(180, 204, 240, 0.06);
  --sb-border-hi: rgba(180, 204, 240, 0.13);
  border-color: rgba(180, 204, 240, 0.08);
}
.sidebar-header { padding: 18px 17px 15px; background: #0b0e14; }
.sidebar-title { font-size: 16px; font-weight: 750; color: #fff; }
.sidebar-brand__org { color: #93a5bc; }
.sidebar-nav {
  margin: 0 12px 10px;
  padding: 4px;
  gap: 3px;
  background: #111926;
  border: 0;
  border-radius: 13px;
}
.sidebar .sidebar-nav__tab {
  min-height: 51px;
  padding: 7px 2px;
  border-radius: 9px;
  color: #97a7bd;
}
.sidebar .sidebar-nav__tab.is-active {
  color: #fff;
  background: #2634a6;
  box-shadow: 0 3px 10px rgba(8, 14, 75, 0.3);
}
.sidebar .sidebar-nav__tab.is-active .sidebar-nav__icon { color: #fff; }
.sidebar .sidebar-nav__label { font-size: 11px; font-weight: 650; }
.sidebar-body {
  border-top: 1px solid rgba(180, 204, 240, 0.06);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-color: #34435a transparent;
}
.sidebar-panel { gap: 12px; padding: 15px 12px 24px; }
.sidebar-panel[data-sidebar-panel="labels"].is-active::before,
.sidebar-panel[data-sidebar-panel="discussions"].is-active::before { content: none; }
.sidebar-panel__intro { padding: 2px 5px 4px; }
.sidebar-panel__intro h2 {
  margin: 0 0 4px;
  color: #f5f8ff;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.025em;
}
.sidebar-panel__intro p { margin: 0; color: #92a3ba; font-size: 12px; line-height: 1.4; }
.sidebar-panel:not(#panel-forecast) > .sidebar-section,
.sidebar-panel:not(#panel-forecast) > .sidebar-accordion {
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, #172131, #111925);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}
.sidebar-panel:not(#panel-forecast) > .sidebar-section { padding: 16px; }
.sidebar-panel:not(#panel-forecast) > .sidebar-accordion .sidebar-accordion__trigger {
  min-height: 45px;
  padding: 14px 16px;
  color: #e4ebf7;
  font-size: 12px;
  font-weight: 700;
}
.sidebar-panel:not(#panel-forecast) > .sidebar-accordion .sidebar-accordion__body { padding: 0 16px 16px; }
.sidebar-panel:not(#panel-forecast) .field > label,
.sidebar-panel:not(#panel-forecast) .field-row-label {
  color: #aebed2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sidebar :is(select, .text-input, input[type="number"], input[type="search"], input[type="date"]) {
  min-height: 40px;
  color: #f3f7ff;
  background-color: #1a2433;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
}
.sidebar :is(select, .text-input, input[type="number"], input[type="search"], input[type="date"]):hover {
  background-color: #202d40;
}
.sidebar :is(select, .text-input, input, button, summary):focus-visible {
  outline: 2px solid #8294ff;
  outline-offset: 2px;
}
.sidebar .sidebar-details,
.sidebar .control-block,
.sidebar .sub-card { border-color: rgba(180, 204, 240, 0.07); }
.sidebar .sidebar-details { background: #161f2e; }
.sidebar .toggle:checked,
.sidebar input[type="checkbox"]:checked { accent-color: #687dff; }
.sidebar .btn-primary { background: #2834ae; color: #fff; border-color: transparent; }
.sidebar .btn-primary:hover { background: #3948ca; }
.sidebar .btn-secondary { background: #1c2839; border-color: transparent; color: #e5edfa; }
.sidebar .btn-secondary:hover { background: #26364c; }
#advisories-root { padding: 0; }
#advisories-root fieldset { border-color: rgba(180, 204, 240, 0.08); background: #151f2d; }
#advisories-root h3 { color: #e8effb; }
@media (max-width: 960px) {
  .sidebar .sidebar-nav__tab { min-height: 44px; }
  .sidebar-panel { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-body { scroll-behavior: auto; }
}

/* Interactive controls: one visual grammar for every sidebar panel. */
.sidebar :is(select, input, button, summary) { -webkit-tap-highlight-color: transparent; }
.sidebar select:not([multiple]) {
  appearance: none;
  padding-right: 37px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23b8c9e2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}
.sidebar select:disabled,
.sidebar input:disabled,
.sidebar button:disabled { opacity: 0.48; cursor: not-allowed; }
.sidebar input[type="date"] { color-scheme: dark; padding: 7px 8px; cursor: pointer; }
.sidebar input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.9;
  padding: 5px;
  border-radius: 6px;
  background-color: #2a3850;
  cursor: pointer;
}
.sidebar input[type="date"]::-webkit-calendar-picker-indicator:hover { background-color: #364a68; }
.sidebar input[type="number"] { padding: 8px 10px; }
.sidebar input[type="number"]::-webkit-inner-spin-button { opacity: 0.6; }
.sidebar input[type="checkbox"]:not(.toggle),
.sidebar input[type="radio"]:not(.toggle) {
  appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid #647790;
  border-radius: 5px;
  background: #111b2a;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  vertical-align: middle;
}
.sidebar input[type="radio"]:not(.toggle) { border-radius: 50%; }
.sidebar input[type="checkbox"]:not(.toggle):checked {
  border-color: #6578ff;
  background: #394bc3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m2 7 3.2 3.1L12 3.7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.sidebar input[type="radio"]:not(.toggle):checked {
  border: 5px solid #6578ff;
  background: #fff;
}
.sidebar .toggle {
  border: 1px solid #53657e;
  background: #263348;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.32);
}
.sidebar .toggle:checked { border-color: #6277ff; background: #394bc3; }
.sidebar .slider,
.sidebar input[type="range"] {
  appearance: none;
  height: 6px;
  min-height: 6px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(to right, #5269e9 0 var(--range-fill, 0%), #35445c var(--range-fill, 0%) 100%);
  cursor: pointer;
}
.sidebar :is(.slider, input[type="range"])::-webkit-slider-thumb {
  appearance: none;
  width: 17px;
  height: 17px;
  border: 3px solid #f4f7ff;
  border-radius: 50%;
  background: #5369e9;
  box-shadow: 0 0 0 3px #17233a, 0 2px 7px rgba(0, 0, 0, 0.35);
}
.sidebar :is(.slider, input[type="range"])::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #f4f7ff;
  border-radius: 50%;
  background: #5369e9;
  box-shadow: 0 0 0 3px #17233a;
}
.sidebar .value-badge { min-width: 38px; padding: 3px 7px; border-radius: 6px; background: #24334a; color: #f1f5ff; font-weight: 700; }
.sidebar .segmented-control { border: 0; border-radius: 10px; background: #0e1725; padding: 3px; }
.sidebar .segmented-control__option { min-height: 35px; border: 0; border-radius: 7px; }
.sidebar .segmented-control__option.is-active { background: #2f3cb6; color: #fff; box-shadow: none; }
.sidebar .sidebar-details {
  overflow: hidden;
  border: 1px solid rgba(180, 204, 240, 0.07);
  border-radius: 10px;
  background: #182334;
}
.sidebar .sidebar-details > summary { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 11px 13px; color: #dfebfc; font-weight: 650; }
.sidebar .sidebar-details[open] > summary { border-bottom: 1px solid rgba(180, 204, 240, 0.08); background: #1b2940; }
.sidebar .sidebar-details__body { padding: 14px 13px; background: #151f2e; }
#panel-forecast .sidebar-details { background: #182334; }
#panel-forecast .sidebar-details > summary { color: #dfebfc; }

/* Run date and cycle share compact stepper controls. */
#panel-forecast #model-time-group { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.run-date-control,
.cycle-carousel { display: flex; align-items: center; gap: 6px; min-width: 0; }
.run-date-control .text-input { flex: 1 1 auto; min-width: 0; }
.run-step-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #243248;
  color: #d9e4f4;
  cursor: pointer;
}
.run-step-btn:hover { background: #344967; color: #fff; }
.run-step-btn:active { transform: scale(0.96); }
.cycle-carousel .cycle-pills {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  background: #0f1928;
  border: 0;
  padding: 3px;
}
.cycle-carousel .cycle-pills::-webkit-scrollbar { display: none; }
.cycle-carousel .cycle-pills__btn {
  flex: 0 0 56px;
  min-height: 34px;
  scroll-snap-align: center;
  border: 0;
  border-radius: 7px;
  color: #aabbcf;
  font: 700 12px var(--mono);
}
.cycle-carousel .cycle-pills__btn.is-active { background: #3547bc; color: #fff; box-shadow: none; }
.cycle-carousel .cycle-pills__btn[aria-checked="false"]:hover { background: #243248; color: #fff; }

/* Export stays available without interrupting map setup. */
#panel-forecast .sidebar-export {
  overflow: hidden;
  margin-top: 1px;
  border: 1px solid rgba(180, 204, 240, 0.08);
  border-radius: 12px;
  background: #111a28;
}
#panel-forecast .sidebar-export > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  color: #c8d6e9;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
#panel-forecast .sidebar-export > summary::-webkit-details-marker { display: none; }
#panel-forecast .sidebar-export > summary span { display: flex; gap: 9px; align-items: center; }
#panel-forecast .sidebar-export > summary .fa-image { color: #92a4ff; }
#panel-forecast .sidebar-export > summary > .fa-chevron-down { font-size: 10px; transition: transform 0.15s ease; }
#panel-forecast .sidebar-export[open] > summary > .fa-chevron-down { transform: rotate(180deg); }
#panel-forecast .sidebar-export__body { display: grid; gap: 10px; padding: 4px 15px 15px; }
#panel-forecast .sidebar-export__body .field-hint { margin: 0; }
#panel-forecast .sidebar-export__body .field-row { display: grid; grid-template-columns: 1fr 1fr; }
#panel-forecast .sidebar-export__body .field-row[hidden] { display: none; }
#panel-forecast .sidebar-export__body input { width: 100%; }
#panel-forecast .sidebar-export__body .btn-primary { min-height: 40px; border: 0; border-radius: 8px; background: #2834ae; color: #fff; font-weight: 700; cursor: pointer; }
#panel-forecast .sidebar-export__body .btn-primary:hover { background: #3948ca; }

/* The control deck is a sibling of the capture surface. */
html .app-shell,
html[data-ui-resolution-mode="fixed"] .app-shell {
  position: relative;
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0 !important;
}

.app-shell > #map-surface-host > #map-container {
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-shell > .sidebar {
  --deck-inset: 12px;
  --deck-header: var(--map-header-h);
  --deck-legend: var(--map-legend-h);
  --deck-surface: #141c28;
  --deck-border: 1px solid #394557;
  --deck-shadow: 0 4px 18px #04070c50;
  --deck-open-height: max(0px, calc(var(--ui-resolution-h, 100vh) * var(--map-height-pct) / 100
    - var(--deck-header) - var(--deck-legend) - var(--deck-nav, 44px) - 2 * var(--deck-inset) - 8px));
  position: absolute;
  z-index: 5;
  top: var(--deck-header);
  left: 0;
  width: calc(var(--map-width-pct) * 1%);
  height: max(0px, calc(var(--map-height-pct) * 1% - var(--deck-header) - var(--deck-legend)));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: var(--deck-inset);
  max-height: none;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}

.deck-top,
.deck-actions,
.deck-panel-heading,
.deck-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deck-top {
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.sidebar .deck-top .sidebar-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 3px;
  gap: 2px;
  margin: 0;
  border: var(--deck-border);
  border-radius: 10px;
  background: var(--deck-surface);
  box-shadow: var(--deck-shadow);
  pointer-events: auto;
}

.sidebar .deck-top .sidebar-nav__tab,
.sidebar .deck-button {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--sb-text);
  font: 600 12px/1.2 var(--font-inter);
  white-space: nowrap;
  cursor: pointer;
}

.sidebar .deck-top .sidebar-nav__tab {
  border: 0;
  box-shadow: none;
}

.sidebar .deck-button {
  border: var(--deck-border);
  background: var(--deck-surface);
  box-shadow: var(--deck-shadow);
  pointer-events: auto;
  list-style: none;
}

.deck-button::-webkit-details-marker { display: none; }
.sidebar .deck-button:hover,
.sidebar .deck-button.is-active { background: #29374b; }
.sidebar .deck-button:disabled { cursor: wait; opacity: .7; }
.sidebar .deck-button:focus-visible,
.product-picker__item:focus-visible { outline: 2px solid #a4b2ff; outline-offset: 2px; }
.sidebar .deck-icon { min-width: 36px; }
.sidebar .deck-export { background: #3649ad; border-color: #596ac8; }
.sidebar .deck-export:hover { background: #455bc7; }

.deck-actions details {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.deck-actions .sidebar-export__body,
.deck-status-details {
  position: absolute;
  z-index: 1;
  top: calc(100% + 6px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  max-height: var(--deck-open-height);
  overflow: auto;
  padding: 12px;
  border: var(--deck-border);
  border-radius: 10px;
  background: var(--deck-surface);
  box-shadow: var(--deck-shadow);
  pointer-events: auto;
}

.deck-actions .sidebar-export__body { display: grid; gap: 10px; }
.deck-actions .sidebar-export__body .save-map-size { margin: 0; }
.sidebar .sidebar-export__body #save-map-size-hint { display: block; margin: 0; }
.deck-actions .sidebar-export__body .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deck-actions .sidebar-export__body input { width: 100%; }
.deck-actions .sidebar-export__body .btn-primary { margin: 0; }
.deck-actions details:not([open]) > div { display: none; }
#status-dock .status-dock__dot { flex: 0 0 7px; }
#status-dock.is-error .status-dock__dot { background: #ff6b6b; box-shadow: none; }
#status-summary { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
.deck-status-details .status-dock__text { margin: 6px 0 0; }
.deck-status-details .status-dock__row { padding: 0; }

.deck-workspace {
  display: flex;
  align-items: flex-start;
  min-height: 0;
  min-width: 0;
}

#deck-panel-open { align-self: start; }
.deck-panel {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  width: min(310px, 100%);
  min-height: 0;
  overflow: hidden;
  border: var(--deck-border);
  border-radius: 12px;
  background: var(--deck-surface);
  box-shadow: var(--deck-shadow);
  pointer-events: auto;
}

.sidebar[data-active-panel="settings"] .deck-panel {
  margin-left: auto;
  width: min(385px, 100%);
  animation: deck-drawer-in 160ms ease-out;
}

@keyframes deck-drawer-in {
  from { opacity: .65; transform: translateX(8px); }
}

.deck-panel-heading {
  justify-content: space-between;
  padding: 7px 8px 7px 13px;
  font: 700 19px/1 var(--font-saira-cond);
}

.sidebar .deck-panel-heading .deck-button { min-height: 32px; box-shadow: none; }
.deck-panel .sidebar-body { flex: 0 1 auto; scrollbar-gutter: stable; }
.deck-panel #panel-forecast { padding: 8px; }
.deck-panel #panel-forecast .forecast-step--product { padding: 0; background: transparent; border: 0; }
.sidebar:not([data-active-panel="forecast"]) #refresh-btn { display: none; }
.deck-symbol { display: block; font-size: 18px; line-height: 1; }

.forecast-is-loading #refresh-btn .deck-symbol {
  animation: deck-spin 1s linear infinite;
}

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

.product-picker__list,
.product-picker__group { display: grid; gap: 3px; }
.product-picker__list { gap: 10px; padding-top: 8px; }
.product-picker__item {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sb-text);
  font: 500 12px/1.35 var(--font-inter);
  text-align: left;
  cursor: pointer;
}
.product-picker__item:hover { background: #253347; }
.product-picker__item[aria-pressed="true"] { background: #303f83; color: #fff; }
.deck-map-style { padding: 0 8px 8px; }
.deck-map-style > :is(.sidebar-section, .sidebar-accordion) { margin: 6px 0; }

.deck-time {
  min-width: 0;
  justify-self: center;
  max-width: 100%;
  pointer-events: auto;
}

.sidebar:not([data-active-panel="forecast"]) .deck-time { display: none; }
.sidebar #deck-time-toggle { display: none; }

.deck-time-controls {
  display: flex;
  align-items: start;
  gap: 10px;
  max-width: 100%;
  padding: 9px 11px;
  overflow: auto;
  max-height: min(31vh, 250px, var(--deck-open-height));
  border: var(--deck-border);
  border-radius: 12px;
  background: var(--deck-surface);
  box-shadow: var(--deck-shadow);
  scrollbar-color: #54657e transparent;
}

.deck-time-controls > * { flex: 0 0 auto; }
.deck-time-controls .field { min-width: 0; margin: 0; }
.deck-time-controls .field-hint { text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.deck-time-controls .cycle-carousel { width: 218px; }
.deck-time-controls #model-time-group { display: flex; flex-direction: row; gap: 10px; }
.deck-time-controls #forecast-hour-group { width: clamp(227px, 23vw, 380px); }
.deck-time-controls #window-timeframe-group { width: min(405px, 82vw); }
.deck-time-controls .window-timeframe-grid { display: flex; gap: 8px; }
.deck-time-controls .window-timeframe-grid > * { flex: 1 1 0; min-width: 0; }
.deck-time-controls #window-hours-options { min-width: 170px; }
.sidebar .deck-time-controls #window-timeframe-label { display: block; margin-block: 6px 0; }
.deck-time-controls #radar-panel { margin: 0; min-width: 230px; }
.deck-time-controls :is(#cycle-select-hint, #day-period-label) { max-width: 218px; }
.deck-time-controls #forecast-hour-group > .field-hint { display: none; }

.sidebar.is-clean > :is(.deck-top, .deck-workspace, .deck-time) { display: none; }
.sidebar #deck-restore { justify-self: right; align-self: start; opacity: .75; }
.sidebar #deck-restore:hover,
.sidebar #deck-restore:focus-visible { opacity: 1; }
.sidebar.is-clean + #map-surface-host :is(.map-capture-guide, #telestration-toolbar) { visibility: hidden; }
.sidebar [hidden] { display: none !important; }

@media (max-width: 760px), (max-height: 480px) and (max-width: 980px) {
  .app-shell > .sidebar { --deck-inset: 7px; gap: 5px; }
  .deck-top { flex-direction: column; align-items: stretch; gap: 5px; }
  .deck-actions { justify-content: space-between; gap: 4px; }
  .sidebar .deck-top .sidebar-nav { flex-wrap: nowrap; justify-content: space-between; overflow-x: auto; }
  .sidebar .deck-top .sidebar-nav__tab,
  .sidebar .deck-button { min-height: 38px; padding: 5px 7px; }
  .sidebar .deck-top .sidebar-nav__tab { flex: 1 0 auto; }
  #status-summary { max-width: 9ch; }
  .deck-actions details { position: static; }
  .deck-actions :is(.sidebar-export__body, .deck-status-details) { right: 0; }
  .deck-workspace { align-items: end; }
  .deck-panel,
  .sidebar[data-active-panel="settings"] .deck-panel { width: 100%; }
  #deck-panel-open { align-self: end; }
  .deck-time { width: 100%; justify-self: stretch; }
  .sidebar #deck-time-toggle { display: inline-flex; }
  .deck-time:not(.is-open) { width: fit-content; }
  .deck-time:not(.is-open) .deck-time-controls { display: none; }
  .deck-time-controls {
    display: grid;
    gap: 12px;
    max-height: min(43vh, 360px, max(0px, calc(var(--deck-open-height) - 43px)));
    margin-top: 5px;
    overscroll-behavior: contain;
  }
  .deck-time-controls #model-time-group { display: grid; }
  .deck-time-controls :is(#forecast-hour-group, #window-timeframe-group, .cycle-carousel) { width: 100%; }
  .deck-time-controls .window-timeframe-grid { flex-wrap: wrap; }
  .deck-time-controls .window-timeframe-grid > * { flex-basis: 140px; }
}

@media (min-width: 650px) and (max-width: 980px) and (max-height: 480px) {
  .deck-top { flex-direction: row; align-items: start; }
}

@media (max-width: 375px) {
  #deck-clean .fa-eye { display: none; }
  #deck-clean span { font-size: 11px; }
  #status-summary { max-width: 5ch; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar[data-active-panel="settings"] .deck-panel { animation: none; }
  .forecast-is-loading #refresh-btn .deck-symbol { animation: none; }
  .forecast-is-loading #refresh-btn { color: #abb9ff; }
}

/* Playback sits below the graphic and stays available across all control panels. */
.app-shell {
  --playback-h: 66px;
  --deck-map-area: calc(var(--ui-resolution-h) - var(--playback-h));
}
.app-shell > #map-surface-host > #map-container { height: calc(var(--deck-map-area) * var(--map-height-pct) / 100); }
.app-shell > .sidebar {
  height: max(0px, calc(var(--deck-map-area) * var(--map-height-pct) / 100 - var(--deck-header) - var(--deck-legend)));
  --deck-open-height: max(0px, calc(var(--deck-map-area) * var(--map-height-pct) / 100
    - var(--deck-header) - var(--deck-legend) - var(--deck-nav, 44px) - 2 * var(--deck-inset) - 8px));
}
#playback-dock {
  position: absolute;
  inset: auto 0 0;
  z-index: 5;
  color: #e6eaf0;
  font-family: var(--font-inter);
}
#playback-dock :is(button, input, select, label, summary) { font-family: var(--font-inter); }
#playback-dock > .scenes-media:is([hidden], .is-hint),
.app-shell:has(.sidebar.is-clean) > #playback-dock,
body:has(.sidebar.is-clean) > .scenes-media.is-floating { display: none; }
#playback-dock .scenes-media__grip span { display: none; }
#playback-dock .scenes-media__dock[hidden],
#playback-dock .scenes-media__detach[hidden],
#playback-dock .scenes-media__live[hidden],
#playback-dock .forecast-transport__btn[hidden] { display: none; }
#playback-dock :is(button, .slider, select, input):focus-visible {
  outline: 2px solid #a4b2ff;
  outline-offset: 2px;
}
#playback-dock .scenes-media-dock__hint:not([hidden]) {
  display: block;
  padding: 10px;
  background: #12171f;
  color: #e6eaf0;
  text-align: center;
}
#playback-dock.is-snap-target .scenes-media-dock__hint { outline: 2px solid #8aa6ff; outline-offset: -2px; }

.app-shell:has(#playback-dock) .deck-time-controls #forecast-hour-group {
  display: flex;
  align-items: flex-end;
  width: auto;
  max-width: none;
}
.app-shell:has(#playback-dock) .deck-time-controls #forecast-hour-group:not(:has(#temporal-interpolation-control:not(.control-hidden))),
.app-shell:has(#playback-dock) .deck-time-controls :is(#forecast-hour-group, #radar-panel) > :is(.forecast-transport, .slider-header, .slider) {
  display: none;
}

.product-picker__list { gap: 5px; }
.product-picker__section > summary {
  padding: 8px;
  border-radius: 6px;
  background: #1f2a3b;
  color: var(--sb-text);
  font: 600 12px/1.35 var(--font-inter);
  cursor: pointer;
}
.product-picker__section:has([aria-pressed="true"]) > summary { color: #b9c7ff; }
.product-picker__section > .product-picker__section { margin: 4px 0 0 9px; }
.product-picker__section > .product-picker__section > summary { background: #182334; }
.product-picker__section > .product-picker__group { padding: 4px 0 4px 9px; }
#panel-outlooks .forecast-actions--compact { padding-top: 0; }
#panel-scenes > .sidebar-section--scenes { padding: 0; border: 0; background: transparent; }
#advisories-root .advisory-actions { display: flex; gap: 8px; }
#advisories-root .advisory-actions > button { width: auto; margin: 0; }
#advisories-root .advisory-actions > .btn-primary { flex: 1; }
#advisories-root .advisory-filter-body { display: grid; gap: 8px; }
#advisories-root > .sidebar-details > #advisory-sources { padding: 0 10px 10px; }

/* Run controls and playback share one bar. The scrubber stays short so the
   date, cycle, and valid-time readout keep their own space. */
.app-shell:has(.sidebar.is-clean) { --playback-h: 0px; }

#playback-dock {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--playback-h);
  padding: 0 14px;
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c1016;
}
#playback-dock > .deck-time {
  flex: 0 0 auto;
  max-width: none;
  min-width: 0;
}
#playback-dock:has(.scenes-media:not([hidden]):not(.is-hint)) > .deck-time {
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
#playback-dock #deck-time-toggle { display: none; }
#playback-dock .deck-time .deck-time-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#playback-dock #model-time-group {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
#playback-dock #model-time-group > .field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
#playback-dock :is(label, .field-row-label) {
  display: block;
  margin: 0;
  color: #8b97a8;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
#playback-dock #model-time-group .cycle-carousel,
#playback-dock #cycle-select-hint { display: none; }

#playback-dock .run-date-control {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #12171f;
}
#playback-dock .run-step-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c5d0de;
  cursor: pointer;
}
#playback-dock .run-step-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
#playback-dock .run-step-btn:active { transform: none; }
#playback-dock #date-select {
  position: static;
  display: block;
  flex: 0 0 150px;
  width: 150px;
  min-width: 150px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0 4px 0 8px;
  border: 0;
  border-radius: 0;
  border-inline: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #e6eaf0;
  color-scheme: dark;
  font-size: 12px;
  font-weight: 500;
}
#playback-dock #cycle-select {
  position: static;
  display: block;
  width: 78px;
  min-width: 78px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background-color: #12171f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b97a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: #e6eaf0;
  color-scheme: dark;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#playback-dock .temporal-interpolation-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #12171f;
  color: #e6eaf0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
#playback-dock .temporal-interpolation-check input { flex: 0 0 auto; margin: 0; }

#playback-dock .deck-time-options { margin: 0; }
#playback-dock .deck-time-options:not(:has(.deck-time-options__fields > :not(.control-hidden))) { display: none; }
#playback-dock .deck-time-options > summary {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #12171f;
  color: #e6eaf0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  list-style: none;
  cursor: pointer;
}
#playback-dock .deck-time-options > summary::-webkit-details-marker { display: none; }
#playback-dock .deck-time-options > summary:hover { background: #1b2330; }
#playback-dock .deck-time-options[open] > summary {
  border-color: #4a5ad0;
  background: #3649ad;
  color: #fff;
}
.deck-time-options__fields {
  position: absolute;
  z-index: 6;
  bottom: calc(100% + 8px);
  left: 12px;
  display: grid;
  gap: 10px;
  width: min(400px, calc(100% - 24px));
  max-height: min(46vh, 360px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #12171f;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-family: var(--font-inter);
}

#playback-dock > .scenes-media {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#playback-dock .scenes-media__chrome {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  margin: 0;
}
#playback-dock .scenes-media__grip {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 32px;
  color: #8b97a8;
  cursor: grab;
}
#playback-dock .scenes-media__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  height: auto;
}
#playback-dock .forecast-transport {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  order: 1;
  margin: 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #12171f;
}
#playback-dock .slider {
  flex: 0 1 300px;
  align-self: center;
  order: 2;
  width: 300px;
  max-width: 300px;
  min-width: 96px;
  height: 4px;
  min-height: 0;
  margin: 0;
  border-radius: 99px;
  background: linear-gradient(to right, #757de8 var(--playback-progress, 0%), rgba(255, 255, 255, 0.14) var(--playback-progress, 0%));
}
#playback-dock .slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #0c1016;
  border-radius: 50%;
  background: #f4f6fb;
  box-shadow: 0 0 0 3px rgba(117, 125, 232, 0.45);
}
#playback-dock .slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #0c1016;
  border-radius: 50%;
  background: #f4f6fb;
  box-shadow: 0 0 0 3px rgba(117, 125, 232, 0.45);
}
#playback-dock .slider-header {
  display: flex;
  flex: 0 1 250px;
  align-self: center;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  order: 3;
  gap: 3px;
  min-width: 0;
  max-width: 250px;
  margin: 0;
}
#playback-dock .slider-header label {
  margin: 0;
  color: #8b97a8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#playback-dock .value-badge {
  display: block;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--map-gold);
  font-family: var(--font-inter);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#playback-dock :is(.scenes-icon-btn, .forecast-transport__btn, .scenes-media__live) {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d5deea;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
#playback-dock :is(.scenes-icon-btn, .forecast-transport__btn, .scenes-media__live):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
#playback-dock :is(.scenes-icon-btn, .forecast-transport__btn, .scenes-media__live):disabled { opacity: 0.38; }
#playback-dock .forecast-transport__btn--play {
  background: #3649ad;
  color: #fff;
}
#playback-dock .forecast-transport__btn--play:hover:not(:disabled) { background: #455bc7; color: #fff; }
#playback-dock .forecast-transport__btn--loop.is-on,
#playback-dock .scenes-media__live.is-on {
  background: rgba(117, 125, 232, 0.2);
  color: #d6dbff;
}
#playback-dock .scenes-media-dock__hint { position: absolute; inset: 0; pointer-events: none; }

@media (max-width: 1120px) {
  .app-shell { --playback-h: 116px; }
  #playback-dock {
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 12px;
    padding: 8px 12px;
  }
  #playback-dock:has(.scenes-media:not([hidden]):not(.is-hint)) > .deck-time {
    padding-right: 0;
    border-right: 0;
  }
  #playback-dock > .scenes-media { flex: 1 1 100%; }
  #playback-dock .slider { flex-basis: 220px; width: 220px; }
  #playback-dock .slider-header { flex-basis: 200px; max-width: 220px; }
}
@media (max-width: 640px) {
  #playback-dock .slider-header label { display: none; }
  #playback-dock #date-select { flex-basis: 132px; width: 132px; min-width: 132px; }
  #playback-dock .scenes-media__grip { display: none; }
}
@media (max-width: 420px) {
  #playback-dock .run-step-btn { display: none; }
  #playback-dock #date-select {
    flex-basis: 124px;
    width: 124px;
    min-width: 124px;
    border-inline: 0;
  }
  #playback-dock .slider { flex-basis: 88px; width: 88px; min-width: 72px; }
}
