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

:root {
  color-scheme: light;
  --bg-surface: #ffffff;
  --bg-subtle: #f7f9fc;
  --bg-canvas: #eef3f9;
  --bg-card: #ffffff;
  --border: #dde3ee;
  --text-primary: #0f1d40;
  --text-secondary: #4a5878;
  --accent: #3b82f6;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --critical: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 36px rgba(15, 23, 42, 0.14);
  --hud-mode-switch-gap: 6px;
  --hud-mode-switch-padding: 4px;
  --hud-mode-switch-margin-left: auto;
  --hud-mode-switch-margin-right: 0;
  --hud-mode-button-padding: 6px 12px;
  --hud-mode-button-sunpath-extra: 52px;
  --hud-mode-play-size: 28px;
  --hud-mode-play-right: 8px;
  --hud-mobile-status-padding: 6px 14px;
  --hud-mobile-status-gap: 10px;
  --hud-mobile-status-margin-top: 8px;
  --hud-mobile-status-label-size: 9px;
  --hud-mobile-status-time-size: 15px;
  --hud-mobile-status-date-size: 10px;
  --hud-mobile-status-divider-gap: 8px;
  --hud-mobile-legal-font-size: 11px;
  --hud-mobile-legal-padding: 4px 10px;
  --hud-mobile-legal-bottom: 12px;
  --hud-mobile-legal-right: 16px;
  --planner-header-height: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sun-dimmer-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 700ms ease, background 1200ms ease;
  background: linear-gradient(180deg, rgba(18, 26, 44, 0.12) 0%, rgba(12, 18, 32, 0.18) 100%);
  will-change: opacity;
}

.sun-dimmer-layer[data-stage="night"] {
  background: linear-gradient(180deg, rgba(10, 12, 28, 0.65) 0%, rgba(2, 5, 15, 0.78) 100%);
}

.sun-dimmer-layer[data-stage="dawn"] {
  background: radial-gradient(circle at 35% 20%, rgba(255, 214, 165, 0.4), rgba(25, 32, 52, 0.6));
}

.sun-dimmer-layer[data-stage="dusk"] {
  background: radial-gradient(circle at 60% 25%, rgba(255, 181, 153, 0.36), rgba(18, 25, 44, 0.62));
}

.sun-dimmer-layer.is-visible {
  pointer-events: none;
}

a {
  color: var(--accent-strong);
}

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

.mobile-attribution {
  position: fixed;
  bottom: var(--hud-mobile-legal-bottom, 12px);
  right: var(--hud-mobile-legal-right, 16px);
  z-index: 10;
  display: inline-flex;
  font-size: var(--hud-mobile-legal-font-size, 11px);
  letter-spacing: 0.03em;
  color: rgba(226, 232, 240, 0.72);
  background: rgba(12, 20, 36, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: var(--hud-mobile-legal-padding, 4px 10px);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.brand-trigger {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  padding: 7px 16px 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.26);
  color: rgba(248, 250, 252, 0.92);
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(18px) saturate(120%);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.brand-trigger:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}

.brand-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.32);
  background: rgba(30, 41, 59, 0.6);
}

.brand-trigger:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.26);
}

.brand-trigger__emoji {
  font-size: 18px;
  line-height: 1;
}

.brand-trigger__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-trigger[aria-expanded="true"] {
  background: rgba(30, 41, 59, 0.68);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.34);
}


.map-location-switch {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 64px);
  left: 16px;
  z-index: 14;
  display: flex;
  align-items: center;
}

.map-location-switch__label {
  position: relative;
  display: inline-flex;
  align-items: center;
}


.map-location-switch__control {
  appearance: none;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.92);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 32px 8px 16px;
  cursor: pointer;
  line-height: 1.25;
  min-width: 176px;
  max-width: 240px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px) saturate(130%);
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.map-location-switch__control:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(191, 219, 254, 0.46);
}

.map-location-switch__control:focus-visible {
  outline: 2px solid rgba(148, 197, 255, 0.55);
  outline-offset: 2px;
  background: rgba(37, 56, 86, 0.78);
  border-color: rgba(191, 219, 254, 0.55);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.32);
}

.map-location-switch__label::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: rgba(226, 232, 240, 0.78);
  pointer-events: none;
}

details.helper-more {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

details.helper-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

details.helper-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

details.helper-more > summary:hover,
details.helper-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

details.helper-more[open] > summary {
  color: var(--accent);
}

details.helper-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

details.helper-more p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.mode-switcher a,
.mode-switcher .mode-toggle {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  text-decoration: none;
}

.mode-switcher a.is-active,
.mode-switcher .mode-toggle.is-pressed {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.mode-switcher a:focus-visible,
.mode-switcher .mode-toggle:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.header-actions {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  align-items: center;
}


.overflow-menu .icon {
  width: 20px;
  height: 20px;
}

.caret {
  font-size: 14px;
  margin-left: 6px;
  color: var(--accent-strong);
}

.app-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(248, 250, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.app-switcher:hover {
  transform: translateY(-1px);
}

.utility-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.06);
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.icon-button:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.16);
}

.icon-button:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
  background: rgba(59, 130, 246, 0.16);
  color: var(--accent-strong);
}

.icon-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.icon-button .icon {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-button .icon path,
.icon-button .icon rect,
.icon-button .icon circle,
.icon-button .icon polygon,
.icon-button .icon line {
  fill: currentColor;
  stroke: currentColor;
}

.icon-button .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(59,130,246,0.08));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-strong);
}

.layout {
  display: flex;
  min-height: calc(100vh - 72px);
}

.layout.layout--explore {
  gap: 0;
}

.sidebar {
  width: 320px;
  flex: 0 0 320px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(255,255,255,0.7) 100%);
  border-right: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 3;
  scrollbar-gutter: stable;
}

.explore-main {
  flex: 1;
  background: var(--bg-canvas);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
}

.explore-intro {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.9);
  padding: 28px 32px;
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.explore-intro h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.explore-intro p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.explore-tip {
  font-size: 13px;
  color: var(--accent-strong);
}

.sidebar h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.search-input {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.filter-toolbar {
  display: grid;
  gap: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.filter-toolbar .input-field {
  margin: 0;
}

.filter-toolbar .field-label {
  text-transform: none;
  letter-spacing: 0.03em;
}

.search-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  position: relative;
}

.search-icon::before {
  content: '';
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-strong);
  position: absolute;
  transform: rotate(45deg);
  transform-origin: center;
  bottom: -4px;
  right: -3px;
}

.search-input input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
}

.search-input input::placeholder {
  color: var(--text-secondary);
}

.filters-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filters-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.1);
  padding: 7px 14px;
  font-size: 12px;
  color: var(--accent-strong);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transition: background 140ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.16);
}

.chip:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.chip[aria-pressed="true"] {
  border: 1px solid var(--accent-strong);
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-strong);
}

.chip[aria-pressed="false"] {
  background: rgba(148, 163, 184, 0.08);
  color: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.32);
}

.chip[aria-pressed="false"]::before {
  background: rgba(148, 163, 184, 0.6);
}

.clear-filters {
  justify-self: end;
  margin-top: -4px;
}

.filter-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.library-head {
  margin: 18px 0 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 600;
}

.section-title {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.85);
}

.sort-control select {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
}

.sort-control select:focus-visible {
  outline: none;
}

.sort-control:focus-within {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: stretch;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

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

.card + .card {
  margin-top: 18px;
}

.card-thumb {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-strong);
  position: relative;
  overflow: hidden;
}

.card-thumb--accent {
  background: linear-gradient(135deg, #fde4cf, #fcc8a2);
  color: #9a3412;
}

.card-thumb--warm {
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  color: #9a3412;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-strong);
}

.state-chip.is-secondary {
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-strong);
}

.state-chip.is-warning {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.state-chip.is-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.state-chip svg {
  width: 14px;
  height: 14px;
}

.card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.card-meta[data-state='queued'] {
  border-left: 3px solid rgba(59, 130, 246, 0.35);
  padding-left: 12px;
}

.card-meta[data-state='queued'] .btn-secondary.is-queued {
  background: rgba(59, 130, 246, 0.16);
  color: var(--accent-strong);
  box-shadow: none;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.card-more {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.card-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

.card-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

.card-more > summary:hover,
.card-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

.card-more[open] > summary {
  color: var(--accent);
}

.card-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.card-more p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn {
  border-radius: 999px;
  border: none;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.4);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-primary.is-muted {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-strong);
  box-shadow: none;
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
}

.btn-icon-only svg {
  width: 16px;
  height: 16px;
}

.btn-compact {
  padding: 7px 16px;
  font-size: 12px;
}

.btn-critical {
  background: rgba(239, 68, 68, 0.08);
  color: var(--critical);
}

.canvas-area {
  flex: 1;
  background: var(--bg-canvas);
  padding: 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.canvas-workspace {
  display: flex;
  align-items: stretch;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.canvas-stage {
  flex: 1;
  min-width: 0;
  background: linear-gradient(
      rgba(255, 255, 255, 0.86),
      rgba(255, 255, 255, 0.92)
    ),
    repeating-linear-gradient(
      to right,
      rgba(148, 163, 184, 0.08) 0,
      rgba(148, 163, 184, 0.08) 32px,
      transparent 32px,
      transparent 64px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(148, 163, 184, 0.08) 0,
      rgba(148, 163, 184, 0.08) 32px,
      transparent 32px,
      transparent 64px
    );
  border: 2px dashed rgba(59, 130, 246, 0.18);
  border-radius: 24px;
  position: relative;
  overflow: visible;
  z-index: 2;
}

.canvas-stage__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.canvas-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.canvas-empty h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.canvas-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.inspector {
  width: 320px;
  flex: 0 0 320px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(246,248,252,0.95) 100%);
  border-left: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.inspector h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.inspector h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.inspector-subhead {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.inspector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inspector-details {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.inspector-details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-strong);
  list-style: none;
}

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

.inspector-details p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.legend-view {
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(241,245,249,0.9) 100%);
}

.legend-mode {
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.06), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.08), transparent 65%);
}

.canvas-bed {
  position: absolute;
  border-radius: 28px;
  border: 2px solid var(--cluster-color, rgba(59, 130, 246, 0.4));
  background: color-mix(in srgb, var(--cluster-color, rgba(59, 130, 246, 0.4)) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.canvas-bed.is-active {
  border-width: 3px;
  background: color-mix(in srgb, var(--cluster-color, rgba(59, 130, 246, 0.4)) 24%, transparent);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.18);
}

.canvas-bed[data-cluster="c"] {
  border-style: dashed;
}

.cluster-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--cluster-color, rgba(59, 130, 246, 0.6));
  color: white;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.24);
}

.canvas-focus-callout {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.canvas-focus-callout .status-chip {
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.25);
}

.canvas-focus-callout.is-active {
  opacity: 1;
  transform: translateY(0);
}

.canvas-bed-outline {
  position: absolute;
  inset: 64px;
  border: 2px solid rgba(59, 130, 246, 0.32);
  border-radius: 36px;
  background: rgba(59, 130, 246, 0.04);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.direction-marker {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
}

.scale-ruler {
  position: absolute;
  bottom: 32px;
  left: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.scale-ruler::before {
  content: '';
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, var(--text-secondary) 0%, var(--text-secondary) 60%, transparent 60%, transparent 100%);
  background-size: 16px 4px;
  border-radius: 999px;
}

.canvas-preview {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  position: relative;
  z-index: 2;
}

.canvas-preview svg {
  flex-shrink: 0;
}

.canvas-preview p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.canvas-preview[data-state="cue"] {
  align-items: flex-start;
}

.canvas-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.canvas-preview-copy h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.canvas-preview-copy p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.shortlist-progress {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
}

.empty-state-card {
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.6);
}

.empty-state-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.empty-state-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-meter {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.65), rgba(59, 130, 246, 0.85));
  transition: width 160ms ease-out;
}

.placement-halo {
  position: absolute;
  border-radius: 50%;
  background: var(--halo-fill);
  border: 2px solid var(--halo-border);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65), 0 20px 32px rgba(15, 23, 42, 0.18);
}

.placement-halo.is-pulsing {
  animation: haloPulse 1.6s ease-in-out infinite;
}

.placement-halo.is-highlighted {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22), 0 24px 36px rgba(15, 23, 42, 0.22);
}

.placement-badge {
  position: absolute;
  background: var(--badge-color);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.25);
}

.placement-badge.is-highlighted {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.measurement-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.measurement-label--vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 10px 6px;
}

.spacing-ghost {
  position: absolute;
  background: repeating-linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.16) 0,
    rgba(56, 189, 248, 0.16) 12px,
    transparent 12px,
    transparent 24px
  );
  border-radius: 6px;
}

.spacing-ghost.is-warning {
  background: repeating-linear-gradient(
    90deg,
    rgba(249, 115, 22, 0.16) 0,
    rgba(249, 115, 22, 0.16) 12px,
    transparent 12px,
    transparent 24px
  );
}

.spacing-ghost.is-critical {
  background: repeating-linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.18) 0,
    rgba(239, 68, 68, 0.18) 12px,
    transparent 12px,
    transparent 24px
  );
}

.spacing-ghost::after {
  content: attr(data-measure);
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.tool-rail {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  gap: 12px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.tool-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.tool-btn.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.25);
}

.tool-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.tool-tooltip {
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.tool-btn:hover .tool-tooltip,
.tool-btn:focus-visible .tool-tooltip {
  opacity: 1;
}

.coachmark-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(3px);
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
}

.coachmark {
  position: absolute;
  top: 120px;
  left: 48px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  max-width: 320px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.coachmark::after {
  content: '';
  position: absolute;
  left: 32px;
  top: -20px;
  width: 32px;
  height: 32px;
  background: inherit;
  transform: rotate(45deg);
  border-top: 1px solid rgba(148, 163, 184, 0.32);
  border-left: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: inherit;
  pointer-events: none;
}

.coachmark-step {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
}

.coachmark h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.coachmark p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

details.coachmark-more {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

details.coachmark-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

details.coachmark-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

details.coachmark-more > summary:hover,
details.coachmark-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

details.coachmark-more[open] > summary {
  color: var(--accent);
}

details.coachmark-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

details.coachmark-more p {
  margin: 6px 0 0;
  line-height: 1.55;
}

.coachmark-hotkey {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
}

.coachmark-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ready-queue {
  margin-top: 28px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.ready-queue-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ready-queue-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.ready-queue-subhead {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.queue-insight {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.86);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 16px 26px rgba(148, 163, 184, 0.16);
}

.queue-insight h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.queue-insight-subhead {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.queue-insight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-insight-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.queue-insight-details {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.queue-insight-details[open] {
  padding-bottom: 4px;
}

.queue-insight-details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-strong);
  list-style: none;
}

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

.queue-insight-details ul {
  margin: 10px 0 0;
  padding-left: 16px;
  line-height: 1.5;
}

.ready-item.is-callout {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 18px 32px rgba(59, 130, 246, 0.18);
}

.ready-item.is-callout .ready-copy {
  gap: 4px;
}

.ready-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.ready-next {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ready-item {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(59, 130, 246, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border 120ms ease, box-shadow 120ms ease;
}

.ready-item:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.ready-item:not(:last-of-type) {
  margin-bottom: 4px;
}

.ready-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 16px 28px rgba(59, 130, 246, 0.18);
  background: rgba(59, 130, 246, 0.12);
}

.ready-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ready-copy h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.ready-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.ready-tag.is-muted {
  color: var(--text-secondary);
}

.ready-summary {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.queue-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.ready-mini-action {
  font-size: 12px;
  color: var(--accent-strong);
  font-weight: 600;
}

.ready-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ready-meta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.ready-item.compact {
  padding-right: 16px;
}

.ready-flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ready-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ready-group.is-open .ready-group-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ready-group.is-collapsed .ready-group-items {
  display: none;
}

.ready-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.7);
}

.ready-group-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
}

.accordion-toggle svg {
  width: 14px;
  height: 14px;
}

.ready-empty {
  margin-top: 18px;
}

.banner-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border-radius: 12px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.status-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-chip.is-success {
  background: rgba(16, 185, 129, 0.16);
  color: var(--success);
}

.status-chip.is-warning {
  background: rgba(245, 158, 11, 0.18);
  color: var(--warning);
}

.status-chip.is-critical {
  background: rgba(239, 68, 68, 0.18);
  color: var(--critical);
}

.status-chip svg {
  width: 14px;
  height: 14px;
}

.context-panel {
  position: sticky;
  top: 32px;
  margin-left: auto;
  width: 280px;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateX(0);
  transition: transform 200ms ease;
}

.context-panel.is-collapsed {
  transform: translateX(120%);
}

.context-panel .collapse-toggle {
  position: absolute;
  top: 18px;
  left: -16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.context-panel .collapse-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.context-panel h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.context-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.context-subhead {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diagnostic-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diagnostic-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

details.diagnostic-more {
  font-size: 13px;
  color: var(--text-secondary);
}

details.diagnostic-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

details.diagnostic-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

details.diagnostic-more > summary:hover,
details.diagnostic-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

details.diagnostic-more[open] > summary {
  color: var(--accent);
}

details.diagnostic-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

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

.diagnostic-list .status-chip {
  width: 100%;
}

.context-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.context-section h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.context-section p {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
}

details.context-more {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

details.context-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

details.context-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

details.context-more > summary:hover,
details.context-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

details.context-more[open] > summary {
  color: var(--accent);
}

details.context-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

details.context-more p {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

.context-section ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.context-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-overlay {
  position: absolute;
  inset: 36px;
  border-radius: 26px;
  border: 2px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.legend-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.legend-marker {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  padding: 14px 18px;
  display: none;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.legend-marker:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.28);
  outline-offset: 4px;
}

.legend-marker.is-active {
  display: flex;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 18px 42px rgba(59, 130, 246, 0.24);
}

.legend-marker-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-marker-copy h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.legend-chip {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 16px;
}

.chip-a { background: #2563eb; }
.chip-b { background: #0d9488; }
.chip-c { background: #ea580c; }
.chip-note {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-strong);
  font-size: 18px;
}

.legend-card--a { border-top: 4px solid rgba(37, 99, 235, 0.35); }
.legend-card--b { border-top: 4px solid rgba(13, 148, 136, 0.28); }
.legend-card--c { border-top: 4px solid rgba(234, 88, 12, 0.32); }
.legend-card--notes {
  border-top: 4px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.06);
}

.legend-card[data-state='warning'] {
  border-color: rgba(249, 115, 22, 0.32);
  box-shadow: 0 18px 32px rgba(249, 115, 22, 0.15);
}

.legend-card[data-state='critical'] {
  border-color: rgba(239, 68, 68, 0.38);
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.18);
}

.legend-state {
  margin-left: auto;
}

.legend-badge-row {
  display: flex;
  gap: 14px;
}

.spacing-grid {
  display: grid;
  grid-template-columns: repeat(4, 20px);
  grid-auto-rows: 20px;
  gap: 6px;
}

.spacing-cell {
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
}

.spacing-grid[data-cluster='B'] .spacing-cell {
  background: rgba(13, 148, 136, 0.2);
}

.spacing-grid[data-cluster='C'] .spacing-cell {
  background: rgba(234, 88, 12, 0.25);
}

.legend-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

details.legend-more {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

details.legend-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

details.legend-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

details.legend-more > summary:hover,
details.legend-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

details.legend-more[open] > summary {
  color: var(--accent);
}

details.legend-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

details.legend-more p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.legend-card--notes .legend-card-subtitle {
  color: var(--text-secondary);
}

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.notes-list li::before {
  content: '•';
  position: absolute;
  left: 6px;
  top: 0;
  color: var(--text-secondary);
}

.notes-list li.is-accent {
  color: var(--accent-strong);
  font-weight: 600;
}

.notes-list li.is-accent::before {
  color: var(--accent-strong);
}

.legend-summary {
  width: 340px;
  padding: 36px 28px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.85) 0%, rgba(241, 245, 255, 0.72) 80%);
  border-right: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.legend-summary-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.legend-summary-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.legend-summary-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.summary-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-plant {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.summary-plant:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.28);
  outline-offset: 3px;
}

.summary-plant.is-active {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 18px 42px rgba(59, 130, 246, 0.12);
}

.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.summary-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.summary-count {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 12px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.summary-chip svg {
  width: 16px;
  height: 16px;
}

.summary-chip:hover,
.summary-chip:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.12);
}

.summary-chip.is-success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.summary-chip.is-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.summary-chip.is-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.summary-more {
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-more > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 18px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

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

.summary-more > summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: currentColor;
  transition: transform 160ms ease;
}

.summary-more > summary:hover,
.summary-more > summary:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}

.summary-more[open] > summary {
  color: var(--accent);
}

.summary-more[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.summary-meta-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-meta-list li {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.field-reminders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(59, 130, 246, 0.32);
  background: rgba(59, 130, 246, 0.06);
}

.field-reminders h4 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.field-reminders ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.export-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.export-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.export-actions .btn {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
}

.export-links {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--accent-strong);
}

.export-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.export-preview svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  padding: 8px;
}

@keyframes haloPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65), 0 20px 32px rgba(15, 23, 42, 0.18);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25), 0 24px 36px rgba(15, 23, 42, 0.22);
  }
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 14px;
  height: 14px;
}

.map-layout {
  position: relative;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  height: calc(100dvh - var(--planner-header-height, 0px));
  min-height: calc(100dvh - var(--planner-header-height, 0px));
}

.map-layout--full {
  grid-template-columns: 1fr;
}

.map-layout--full .map-surface {
  grid-column: 1;
}

.panel {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.32);
  margin: 0;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel h2,
.panel h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.95);
}

.panel-intro,
.panel-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.74);
}

.panel-intro + .panel-checklist,
.panel-note + .panel-checklist {
  margin-top: 12px;
}

.input-select select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(59, 130, 246, 0.8) 50%), linear-gradient(135deg, rgba(59, 130, 246, 0.8) 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% - 5px), calc(100% - 14px) calc(50% - 5px);
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.input-select select:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.28);
  outline-offset: 2px;
}

.chip-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detected-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detected-item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.12);
  background: rgba(59, 130, 246, 0.04);
  display: grid;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.detected-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-primary);
}

.detected-item footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detected-item.is-new {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.detected-item.is-muted {
  opacity: 0.65;
  background: rgba(15, 23, 42, 0.04);
  border-style: dashed;
}

.detected-empty {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 12px 0;
}

.detected-label {
  font-size: 15px;
}

.detected-meta {
  font-size: 12px;
  color: var(--accent-strong);
}

.map-surface {
  position: relative;
  height: 100%;
  min-height: 0;
  background: #111827;
}

.overlay-window-group {
  position: absolute;
  top: calc(var(--planner-header-height, 0px) + 128px);
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: clamp(260px, 32vw, 360px);
  pointer-events: none;
  z-index: 28;
}

.overlay-window-group > .overlay-window {
  width: 100%;
}

.overlay-window {
  position: relative;
  pointer-events: auto;
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 18px;
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 180ms ease, opacity 160ms ease;
}

.overlay-window.is-collapsed .overlay-window__body,
.overlay-window.is-collapsed .overlay-window__footer {
  display: none;
}

.overlay-window.is-collapsed {
  background: rgba(17, 24, 39, 0.7);
}

.overlay-window__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.overlay-window__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}

.overlay-window__badge {
  margin-left: auto;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: rgba(226, 232, 240, 0.85);
}

.overlay-window__badge.is-hidden {
  display: none;
}

.overlay-window:not(.is-collapsed) .overlay-window__badge {
  display: none;
}

.overlay-window.is-collapsed .overlay-window__badge {
  display: inline-flex;
}

.overlay-window__header--clickable {
  cursor: pointer;
  user-select: none;
}

.overlay-window__header--clickable:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 3px;
}

.overlay-window__title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.96);
  letter-spacing: 0.02em;
}

.overlay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.3);
  color: rgba(226, 232, 240, 0.85);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-chip--accent {
  background: rgba(191, 219, 254, 0.2);
  border-color: rgba(191, 219, 254, 0.4);
  color: rgba(241, 249, 255, 0.96);
}

.overlay-window--primary .overlay-window__header {
  padding: 18px 22px;
}

.overlay-window--primary .overlay-window__title {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.overlay-window--secondary {
  border: 1px solid rgba(94, 234, 212, 0.16);
  background: rgba(11, 18, 33, 0.76);
  box-shadow: 0 18px 42px rgba(10, 19, 35, 0.42);
  margin-left: 10px;
  width: calc(100% - 10px);
}

.overlay-window--secondary .overlay-window__header {
  padding: 14px 18px 14px 24px;
  position: relative;
}

.overlay-window--secondary .overlay-window__header::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.45), rgba(59, 130, 246, 0.32));
  pointer-events: none;
}

.overlay-window--secondary .overlay-window__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(226, 232, 240, 0.9);
}

.overlay-window--secondary .overlay-window__actions {
  gap: 6px;
}

.overlay-window--secondary .overlay-window__control {
  border-color: transparent;
  background: rgba(30, 41, 59, 0.42);
  color: rgba(148, 163, 184, 0.86);
  padding: 2px 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.overlay-window--secondary .overlay-window__control:hover,
.overlay-window--secondary .overlay-window__control:focus-visible {
  background: rgba(59, 130, 246, 0.28);
  color: rgba(248, 250, 252, 0.92);
}

.overlay-window--secondary.is-collapsed {
  background: rgba(11, 18, 33, 0.68);
}

.overlay-window--secondary.is-collapsed .overlay-window__header::before {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.26), rgba(59, 130, 246, 0.2));
}

.overlay-window--secondary.is-collapsed {
  margin-left: 10px;
}

.overlay-window.is-dismissed {
  display: none !important;
}

.overlay-window__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overlay-window__control {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.35);
  color: rgba(226, 232, 240, 0.88);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.overlay-window__control svg {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}

.overlay-window__control:hover,
.overlay-window__control:focus-visible {
  background: rgba(59, 130, 246, 0.26);
  border-color: rgba(59, 130, 246, 0.42);
  color: rgba(248, 250, 252, 0.96);
}

.overlay-window.is-collapsed .overlay-window__control svg {
  transform: rotate(180deg);
}

.overlay-window__body {
  padding: 0 18px 18px;
  display: grid;
  gap: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.82);
}

.overlay-window__body--stacked {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.overlay-window__body > :last-child {
  margin-bottom: 0;
}

.overlay-window__meta {
  display: grid;
  gap: 12px;
}

.overlay-window__meta dl,
.overlay-window__meta div {
  margin: 0;
}

.overlay-window__meta dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.overlay-window__meta dt {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.74);
}

.overlay-window__meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.96);
}

.overlay-window__footer {
  padding: 0 18px 18px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.68);
}

.guide-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: rgba(226, 232, 240, 0.9);
}

.guide-panel__lede {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(241, 249, 255, 0.95);
}

.guide-panel__section {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: inset 0 0 0 1px rgba(148, 197, 255, 0.16);
  display: grid;
  gap: 12px;
}

.guide-panel__section h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 204, 255, 0.88);
}

.guide-panel__section ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.88);
}

.guide-panel__section li {
  line-height: 1.5;
}


.overlay-window .panel-checklist {
  color: rgba(226, 232, 240, 0.78);
}

.overlay-window .detected-list {
  gap: 12px;
}

.overlay-window .detected-item {
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(37, 99, 235, 0.12);
  color: rgba(226, 232, 240, 0.92);
}

.overlay-window .detected-item.is-hovered {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.18);
  box-shadow: 0 14px 24px rgba(13, 148, 136, 0.25);
}

.overlay-window .detected-item.is-selected {
  border-color: rgba(217, 166, 97, 0.55);
  background: rgba(217, 166, 97, 0.18);
  box-shadow: 0 16px 30px rgba(217, 166, 97, 0.28);
}

.overlay-window .detected-item header {
  color: rgba(248, 250, 252, 0.94);
}

.overlay-window .detected-item p {
  color: rgba(226, 232, 240, 0.82);
}

.overlay-window .detected-item.is-muted {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(148, 163, 184, 0.26);
}

.overlay-window .panel-note,
.overlay-window .panel-intro {
  color: rgba(226, 232, 240, 0.74);
}

.bed-detail__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bed-detail__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.bed-detail__metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
}

.bed-detail__metric span {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.82);
}

.bed-detail__metric strong {
  font-size: 15px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.96);
}

.bed-detail__viz {
  display: flex;
  justify-content: center;
  padding: 0;
}

.bed-detail-grid-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--frame-width, 216px);
  height: var(--frame-height, 140px);
  padding: 12px;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 12px 20px rgba(8, 47, 73, 0.22);
}

.bed-detail-grid-frame::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--grid-width, 40px) + 12px);
  height: calc(var(--grid-height, 40px) + 12px);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.28);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.18), 0 10px 24px rgba(15, 23, 42, 0.26);
}

.bed-detail-grid-frame .bed-mini-grid {
  --bed-cell-size: 22px;
  --bed-gap: 4px;
  padding: 0;
  background: transparent;
  box-shadow: none !important;
  width: var(--grid-width, auto);
  height: var(--grid-height, auto);
  justify-content: center;
}

.bed-detail-grid-frame .bed-mini-grid--sunpath {
  background: transparent;
}

.bed-detail-grid-frame .bed-mini-sparkline {
  width: var(--grid-width, 180px);
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.bed-detail__timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bed-detail__timeline label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.78);
}

.bed-detail__timeline input[type='range'] {
  flex: 1 1 auto;
}

.bed-detail__timeline span {
  white-space: nowrap;
}

.bed-detail__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.74);
}

.bed-detail__focus {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.32);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.bed-detail__focus-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.bed-detail__focus-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.74);
}

.bed-detail__focus-list {
  max-height: 248px;
  overflow-y: auto;
  padding-right: 4px;
}

.bed-detail__focus-list .detected-item {
  padding: 14px;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(59, 130, 246, 0.26);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.bed-detail__focus-list .detected-item:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.14);
}

.bed-detail__focus-list .detected-item.is-selected {
  border-color: rgba(217, 166, 97, 0.55);
  background: rgba(217, 166, 97, 0.2);
  box-shadow: 0 10px 22px rgba(217, 166, 97, 0.22);
}

.bed-detail__focus-list .detected-item.is-hovered {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.18);
}

.bed-detail__actions {
  display: inline-flex;
  gap: 8px;
}

.bed-detail__action {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.bed-detail__action:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.55);
  outline-offset: 3px;
}

.bed-detail__action[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-section__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-section__header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(248, 250, 252, 0.92);
}

.panel-section__header p {
  margin: 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
  line-height: 1.5;
}

.overlay-window .input-select select {
  background: rgba(15, 23, 42, 0.7);
  color: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(96, 165, 250, 0.32);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12), 0 16px 32px rgba(15, 23, 42, 0.32);
}

.overlay-window .input-select select:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
}

.overlay-window .chip-toggle-group {
  margin-bottom: 0;
}

.overlay-window .chip {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(37, 99, 235, 0.2);
  color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.36);
}

.overlay-window .chip::before {
  background: rgba(94, 234, 212, 0.85);
}

.overlay-window .chip[aria-pressed="false"] {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(96, 165, 250, 0.2);
  color: rgba(148, 163, 184, 0.84);
}

.overlay-window .panel-list {
  color: rgba(226, 232, 240, 0.82);
}

.overlay-window .panel-list .list-label {
  color: rgba(248, 250, 252, 0.94);
}

.overlay-window .panel-list .list-meta {
  color: rgba(94, 234, 212, 0.85);
}

.overlay-window details {
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  color: rgba(226, 232, 240, 0.8);
}

.overlay-window details + details {
  margin-top: 10px;
}

.overlay-window details > summary {
  cursor: pointer;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.9);
  list-style: none;
}

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

.overlay-window details > summary::after {
  content: '▾';
  float: right;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.overlay-window details[open] > summary::after {
  transform: rotate(180deg);
}

.overlay-window details ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.overlay-window details code {
  font-size: 12px;
}

.overlay-window__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.38);
  color: rgba(226, 232, 240, 0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overlay-window__pill svg {
  width: 12px;
  height: 12px;
}

.overlay-window-grid {
  display: grid;
  gap: 12px;
}

.sun-bearing-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 90px;
  height: 90px;
  pointer-events: none;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.92) 0%, rgba(251, 191, 36, 0.26) 58%, rgba(8, 47, 73, 0) 86%);
  box-shadow: 0 0 42px rgba(251, 191, 36, 0.5);
  opacity: var(--sun-bearing-opacity, 0.4);
  transition: opacity 140ms ease, transform 80ms linear, box-shadow 180ms ease;
  z-index: 24;
}

.sun-bearing-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(253, 224, 71, 0.95) 0%, rgba(251, 191, 36, 0.1) 72%, rgba(251, 191, 36, 0) 100%);
}

.sun-bearing-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  transform-origin: 50% 84%;
  transform: translate(-50%, -100%) rotate(var(--sun-bearing-rotation, 0deg));
  clip-path: ellipse(38% 90% at 50% 0%);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.45) 0%, rgba(251, 191, 36, 0) 90%);
  filter: blur(0.4px) saturate(120%);
}

.sun-bearing-indicator.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.map-surface .map-intro-card {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 30;
  max-width: min(420px, calc(100% - 48px));
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.28);
  backdrop-filter: blur(18px) saturate(130%);
  transition: opacity 200ms ease, transform 200ms ease;
}

@media (max-width: 768px), (max-height: 600px) {
  .map-surface .map-intro-card {
    left: 16px;
    right: 16px;
    top: 16px;
    max-width: calc(100% - 32px);
  }
}

.map-intro-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.map-intro-card p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.85);
}

.map-intro-card p:last-child {
  margin-bottom: 0;
}

.overlay-help-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.overlay-help-chip svg {
  width: 16px;
  height: 16px;
}

.overlay-help-chip:hover,
.overlay-help-chip:focus-visible {
  background: rgba(148, 163, 184, 0.3);
  border-color: rgba(148, 163, 184, 0.42);
  color: #f8fafc;
}

.map-intro-card {
  position: relative;
}

.intro-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(248, 250, 252, 0.92);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.intro-close:hover,
.intro-close:focus-visible {
  background: rgba(148, 163, 184, 0.3);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f8fafc;
}

.intro-close svg {
  width: 16px;
  height: 16px;
}

.map-intro-card .intro-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.intro-dismiss {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(148, 163, 184, 0.22);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.intro-dismiss:hover {
  background: rgba(148, 163, 184, 0.32);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.intro-restore {
  display: none;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: rgba(226, 232, 240, 0.85);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  align-self: flex-start;
}

.intro-restore.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.map-intro-card.is-collapsed header,
.map-intro-card.is-collapsed .intro-actions {
  display: none;
}

.map-intro-card.is-collapsed {
  padding: 10px 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.map-intro-card.is-collapsed .intro-close {
  display: none;
}

.map-intro-card.is-collapsed .overlay-help-chip {
  margin-top: 0;
}

#map {
  position: absolute;
  inset: 0;
}

.map-overlay {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(920px, calc(100% - 24px));
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(12, 20, 36, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  z-index: 12;
}

.map-overlay.overlay-window {
  padding: 0;
}


.map-overlay__status {
  padding: 0 18px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.map-overlay__status .overlay-hud {
  flex: 1 1 auto;
}

.map-overlay__header-main .map-overlay__status {
  padding: 0;
  margin-top: 6px;
}

.overlay-window--controls.is-collapsed .map-overlay__status {
  padding-bottom: 0;
}

.map-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(226, 232, 240, 0.06), rgba(30, 41, 59, 0.08));
  pointer-events: none;
  z-index: -1;
}

.map-overlay.is-collapsed {
  max-width: min(640px, calc(100% - 32px));
}

.overlay-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.overlay-window--controls.is-collapsed .overlay-primary {
  justify-content: center;
}

.overlay-window--controls.is-collapsed .overlay-action-group {
  margin-left: auto;
  margin-right: auto;
}

.map-overlay__header {
  align-items: flex-start;
  gap: 12px;
}

.map-overlay__header-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-overlay__header .overlay-topbar {
  flex: 1 1 auto;
}

.map-overlay__header .overlay-window__actions {
  align-self: flex-start;
  margin-top: 4px;
}

.map-overlay__body {
  display: grid;
  gap: 12px;
}

.overlay-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: center;
  flex: 0 0 auto;
}

.overlay-action-group .mode-switch {
  flex: 0 0 auto;
}

.overlay-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.map-utility-stack {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  z-index: 12;
  transition: opacity 180ms ease;
}

.map-utility-stack > * {
  pointer-events: auto;
}

.map-utility-stack.is-dimmed {
  opacity: 0.35;
}

.gesture-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
}

.gesture-tour-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.gesture-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 14, 25, 0.55);
  backdrop-filter: blur(12px);
}

.gesture-tour-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 24px 64px rgba(8, 15, 28, 0.45);
  max-width: 320px;
  text-align: center;
  color: rgba(226, 232, 240, 0.92);
}

.gesture-tour-visual {
  width: 120px;
  height: 120px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(14, 116, 144, 0.3);
}

.gesture-tour-visual img,
.gesture-tour-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gesture-tour-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(244, 248, 252, 0.95);
}

.gesture-tour-copy {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.86);
}

.gesture-tour-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.gesture-tour-actions button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.28);
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.32);
  transition: background 140ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.gesture-tour-actions button:hover,
.gesture-tour-actions button:focus-visible {
  background: rgba(96, 165, 250, 0.32);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.38);
  outline: none;
  transform: translateY(-1px);
}

.gesture-tour-actions button:active {
  transform: translateY(1px);
}

.gesture-tour-skip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: rgba(226, 232, 240, 0.85);
}

.gesture-tour-skip:hover,
.gesture-tour-skip:focus-visible {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 197, 255, 0.42);
  color: #f8fafc;
}

.gesture-tour-stage-indicator {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.gesture-tour-stage-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.3);
}

.gesture-tour-stage-indicator span.is-active {
  background: rgba(59, 130, 246, 0.9);
}

.gesture-tour-inline-tip {
  position: absolute;
  left: 12px;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.88);
  font-size: 12px;
  letter-spacing: 0.03em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 11;
}

.gesture-tour-inline-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.28);
  z-index: 11;
}

.fullscreen-toggle svg {
  width: 14px;
  height: 14px;
}

.fullscreen-toggle:hover {
  background: rgba(59, 130, 246, 0.32);
  border-color: rgba(148, 197, 255, 0.48);
  color: #f8fafc;
}

.fullscreen-toggle:focus-visible {
  outline: 2px solid rgba(148, 197, 255, 0.6);
  outline-offset: 2px;
}

.fullscreen-toggle[aria-pressed='true'] {
  background: rgba(59, 130, 246, 0.38);
  border-color: rgba(96, 165, 250, 0.58);
  color: #f8fafc;
}

.fullscreen-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: rgba(226, 232, 240, 0.92);
  font-size: 11px;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.32);
}

.fullscreen-hint.is-hidden {
  display: none;
}

.fullscreen-hint__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.28);
  color: rgba(248, 250, 252, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.fullscreen-hint__dismiss {
  margin-left: auto;
  background: transparent;
  border: none;
  color: rgba(226, 232, 240, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.fullscreen-hint__dismiss:hover,
.fullscreen-hint__dismiss:focus-visible {
  background: rgba(59, 130, 246, 0.25);
  color: #f8fafc;
  outline: none;
}

.fullscreen-hint__dismiss svg {
  width: 12px;
  height: 12px;
}

.overlay-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.overlay-meta--compact {
  flex-wrap: wrap;
  gap: 8px;
}

.overlay-meta--compact div {
  min-width: 120px;
}

.overlay-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overlay-meta dt {
  margin: 0;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.74);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
}

.overlay-meta dd {
  margin: 0;
  color: #f8fafc;
  font-weight: 600;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  padding: var(--hud-mode-switch-padding, 4px);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
  gap: var(--hud-mode-switch-gap, 6px);
  margin-left: var(--hud-mode-switch-margin-left, auto);
  margin-right: var(--hud-mode-switch-margin-right, 0);
}

.mode-button {
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.7);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--hud-mode-button-padding, 6px 12px);
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.mode-button.is-active {
  background: rgba(148, 163, 184, 0.22);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.mode-button:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

.mode-switch__sunpath {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mode-switch__sunpath .mode-button {
  padding-right: var(--hud-mode-button-sunpath-extra, 52px);
}

.mode-switch__play {
  position: absolute;
  top: 50%;
  right: var(--hud-mode-play-right, 8px);
  transform: translateY(-50%);
  width: var(--hud-mode-play-size, 28px);
  height: var(--hud-mode-play-size, 28px);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(12, 20, 36, 0.72);
  color: rgba(226, 232, 240, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(8, 15, 28, 0.35);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.mode-switch__play:hover,
.mode-switch__play:focus-visible {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(148, 197, 255, 0.45);
  color: #f8fafc;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.38);
  outline: none;
}

.mode-switch__play svg {
  width: 14px;
  height: 14px;
}

.mode-switch__play[aria-pressed='true'],
.mode-switch__play.is-active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(148, 197, 255, 0.5);
  color: #f8fafc;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.38);
}

.mobile-status-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hud-mobile-status-gap, 10px);
  padding: var(--hud-mobile-status-padding, 6px 14px);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 8px 18px rgba(8, 15, 28, 0.26);
  backdrop-filter: blur(14px);
  min-width: 0;
  max-width: min(80vw, 280px);
}

.mobile-status-card__label {
  font-size: var(--hud-mobile-status-label-size, 9px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.6);
  white-space: nowrap;
}

.mobile-status-card__time {
  position: relative;
  font-size: var(--hud-mobile-status-time-size, 15px);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(248, 250, 252, 0.88);
  line-height: 1.2;
  white-space: nowrap;
}

.mobile-status-card__time::after {
  content: '•';
  margin: 0 var(--hud-mobile-status-divider-gap, 8px);
  color: rgba(226, 232, 240, 0.38);
  font-size: 11px;
}

.mobile-status-card__date {
  font-size: var(--hud-mobile-status-date-size, 10px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
  line-height: 1.2;
  white-space: nowrap;
}

.overlay-toggles .toggle:hover .toggle-label,
.overlay-toggles .toggle:focus-within .toggle-label {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.92);
}

.mode-sunpath-only[aria-hidden='true'] {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  display: none;
}

.map-3d-widget-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.map-3d-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 12px;
  border-radius: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #e2e8f0;
  font-family: inherit;
  flex-shrink: 0;
  transform: translateY(0);
  transition: transform 200ms ease, box-shadow 220ms ease;
  position: relative;
}

.map-3d-widget--collapsed {
  gap: 8px;
}

.map-3d-widget--collapsed .map-3d-widget__pad,
.map-3d-widget--collapsed .map-3d-widget__footer,
.map-3d-widget--collapsed .map-3d-widget__fab {
  display: none;
}

.map-3d-widget__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.86);
  background: rgba(15, 23, 42, 0.42);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(12px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 180ms ease, transform 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-3d-widget__title:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(148, 197, 255, 0.34);
  color: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.24);
}

.map-3d-widget__title:focus-visible {
  outline: 2px solid rgba(148, 197, 255, 0.55);
  outline-offset: 3px;
}

.map-3d-widget__title.is-active {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(148, 197, 255, 0.5);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.32);
  color: #f8fafc;
  transform: translateY(-1px);
}

.map-3d-widget__pad {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-auto-rows: 40px;
  gap: 8px;
  justify-items: center;
  align-items: center;
}

.map-3d-widget__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px);
  color: rgba(226, 232, 240, 0.86);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 160ms ease;
}

.map-3d-widget__btn--icon {
  position: relative;
}

.map-3d-widget__btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.map-3d-widget__btn:hover,
.map-3d-widget__btn:focus-visible {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(148, 197, 255, 0.45);
  color: #f8fafc;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.32);
}

.map-3d-widget__btn:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.map-3d-widget__btn:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.28);
}

.map-3d-widget__btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.map-3d-widget__btn--zoom-in {
  grid-column: 1;
  grid-row: 1;
}

.map-3d-widget__btn--zoom-out {
  grid-column: 3;
  grid-row: 1;
}

.map-3d-widget__btn--tilt-up {
  grid-column: 2;
  grid-row: 1;
}

.map-3d-widget__btn--rotate-left {
  grid-column: 1;
  grid-row: 2;
}

.map-3d-widget__btn--rotate-right {
  grid-column: 3;
  grid-row: 2;
}

.map-3d-widget__btn--tilt-down {
  grid-column: 2;
  grid-row: 3;
}

.map-3d-widget__btn--recenter {
  grid-column: 2;
  grid-row: 2;
}

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

.map-3d-widget__footer {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.map-3d-widget__btn--chip {
  width: 100%;
  padding: 6px 14px;
  gap: 8px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  justify-content: center;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.28);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 160ms ease;
}

.map-3d-widget__btn--chip:hover,
.map-3d-widget__btn--chip:focus-visible {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(148, 197, 255, 0.5);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.3);
}

.map-3d-widget__btn--chip svg {
  width: 12px;
  height: 12px;
}

.map-3d-widget__chip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: inherit;
}

.map-3d-widget__hint {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.58);
  color: rgba(226, 232, 240, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.3);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.map-3d-widget--expanded .map-3d-widget__hint {
  display: inline-flex;
}

.map-3d-widget__hint svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.map-3d-widget__hint:hover,
.map-3d-widget__hint:focus-visible {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(148, 197, 255, 0.45);
  box-shadow: 0 16px 26px rgba(15, 23, 42, 0.32);
  outline: none;
}

.map-3d-widget__fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(16px);
  color: rgba(248, 250, 252, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.34);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 200ms ease, box-shadow 220ms ease, background-color 200ms ease, border-color 200ms ease;
  z-index: 1;
  flex-shrink: 0;
}

.map-3d-widget__fab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.map-3d-widget__fab:hover {
  background-color: rgba(36, 50, 77, 0.72);
  border-color: rgba(148, 197, 255, 0.45);
}

.map-3d-widget__fab:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.65);
  outline-offset: 2px;
}

.map-3d-widget__fab:active {
  background-color: rgba(44, 62, 98, 0.82);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.36);
  transform: translateY(-1px);
  transition-duration: 60ms;
}

.map-3d-widget__fab[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: 0 12px 18px rgba(15, 23, 42, 0.22);
  transform: translateY(0);
}

.map-3d-widget__fab.is-locating svg {
  animation: map-3d-widget__fab-pulse 1.5s ease-in-out infinite;
}

.map-3d-widget-group:hover .map-3d-widget,
.map-3d-widget-group:hover .map-3d-widget__fab {
  transform: translateY(-2px);
}

.map-3d-widget-group:hover .map-3d-widget {
  background: rgba(17, 24, 39, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.26);
}

.map-3d-widget-group:hover .map-3d-widget__fab {
  box-shadow: 0 22px 36px rgba(15, 23, 42, 0.42);
}

.map-3d-widget-group:hover .map-3d-widget__fab[disabled] {
  transform: translateY(0);
  box-shadow: 0 12px 18px rgba(15, 23, 42, 0.22);
}

.map-3d-widget-group:hover .map-3d-widget:hover {
  transform: translateY(-4px);
  background: rgba(24, 33, 51, 0.24);
  box-shadow: 0 28px 46px rgba(15, 23, 42, 0.3);
}

.map-3d-widget-group:hover .map-3d-widget__fab:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 42px rgba(15, 23, 42, 0.45);
}

.map-3d-widget-group > .map-3d-widget,
.map-3d-widget-group > .map-3d-widget__fab {
  opacity: 0;
  animation: map-3d-widget-enter 280ms ease-out forwards;
}

.map-3d-widget-group > .map-3d-widget__fab {
  animation-delay: 100ms;
}

@keyframes map-3d-widget__fab-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.14);
    opacity: 0.68;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes map-3d-widget-enter {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-3d-widget,
  .map-3d-widget__fab {
    transition: none;
    transform: none;
  }

  .map-3d-widget-group > .map-3d-widget,
  .map-3d-widget-group > .map-3d-widget__fab {
    animation: none;
    opacity: 1;
  }

  .map-3d-widget-group:hover .map-3d-widget,
  .map-3d-widget-group:hover .map-3d-widget__fab,
  .map-3d-widget-group:hover .map-3d-widget:hover,
  .map-3d-widget-group:hover .map-3d-widget__fab:hover {
    transform: none;
  }
}

.overlay-drawer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  padding-top: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  transition: max-height 220ms ease, opacity 180ms ease, padding-top 180ms ease;
}

.map-overlay.has-drawer-open .overlay-drawer {
  max-height: min(460px, calc(100vh - 260px));
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  padding-top: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 234, 212, 0.55) rgba(15, 23, 42, 0.68);
}

.map-overlay.has-drawer-open .overlay-drawer::-webkit-scrollbar {
  width: 10px;
}

.map-overlay.has-drawer-open .overlay-drawer::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.68);
  border-radius: 12px;
}

.map-overlay.has-drawer-open .overlay-drawer::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.75), rgba(14, 165, 233, 0.8));
  border-radius: 12px;
  border: 2px solid rgba(15, 23, 42, 0.7);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}

.map-overlay.has-drawer-open .overlay-drawer::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.92), rgba(59, 130, 246, 0.95));
}

.overlay-drawer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.45);
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
  flex: 0 0 auto;
}

.overlay-drawer-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.overlay-drawer-toggle:hover,
.overlay-drawer-toggle:focus-visible {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.45);
  color: #f8fafc;
}

.overlay-drawer-toggle:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.overlay-drawer-toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.overlay-hud {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.82);
  padding: 2px 0;
  letter-spacing: 0.01em;
}

.overlay-hud span[aria-hidden='true'] {
  color: rgba(148, 163, 184, 0.6);
}

.overlay-hud span[data-bind='time'] {
  font-weight: 600;
  color: #f8fafc;
}

.legend-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.overlay-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  --legend-pill-bg: rgba(226, 232, 240, 0.92);
  --legend-pill-color: #0f172a;
  --legend-pill-border: rgba(148, 163, 184, 0.24);
  --legend-pill-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.overlay-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--legend-pill-border);
  background: var(--legend-pill-bg);
  color: var(--legend-pill-color);
  box-shadow: var(--legend-pill-shadow);
}

.overlay-legend .legend-swatch,
.overlay-legend .legend-bar,
.overlay-legend .legend-line {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.overlay-legend .legend-swatch.legend-sun {
  background: linear-gradient(135deg, #d9a661 0%, #c99154 100%);
}

.overlay-legend .legend-swatch.legend-shade {
  background: linear-gradient(135deg, #142432 0%, #244451 45%, #4b6a7c 100%);
}

.legend-sun {
  background: linear-gradient(135deg, #d9a661 0%, #c99154 100%);
}

.legend-shade {
  background: linear-gradient(135deg, #142432 0%, #244451 55%, #4b6a7c 100%);
}

.legend-hours {
  background: #f5e7c3;
}

.legend-shadow {
  background: linear-gradient(135deg, #142432 0%, #244451 55%, #4b6a7c 100%);
}

.legend-bar {
  width: 100px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0e1623 0%, #1a2d3b 18%, #274457 36%, #345d63 52%, #4b796f 68%, #c5b474 88%, #d9a661 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.legend-line {
  width: 42px;
  height: 6px;
  border-radius: 999px;
  box-shadow: none;
  background: linear-gradient(90deg, #4b796f 0%, #9fb481 55%, #d9a661 100%);
}

.legend-line.legend-line--contour {
  background: linear-gradient(90deg, #4b796f 0%, #9fb481 55%, #d9a661 100%);
}
.legend-bar.legend-bar--heat {
  background: linear-gradient(90deg, #0e1623 0%, #1a2d3b 15%, #274457 33%, #345d63 50%, #4b796f 68%, #c5b474 88%, #d9a661 100%);
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  align-items: start;
}

.overlay-bed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.overlay-bed-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: rgba(226, 232, 240, 0.9);
}

.overlay-bed-list .list-label {
  font-weight: 600;
}

.overlay-bed-list .list-meta {
  font-weight: 500;
  color: rgba(248, 250, 252, 0.78);
}

.sun-arc-tooltip {
  position: absolute;
  transform: translate(-50%, -110%);
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  padding: 12px;
  border-radius: 18px;
  box-shadow: 0 20px 36px rgba(8, 47, 73, 0.42);
  font-size: 12px;
  line-height: 1.45;
  z-index: 40;
  opacity: 1;
  transition: opacity 120ms ease, transform 120ms ease;
  width: max-content;
  max-width: 220px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  backdrop-filter: blur(12px) saturate(140%);
}

.sun-arc-tooltip[data-state='hover'] {
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.35;
  max-width: 200px;
  text-align: center;
}

.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__close,
.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__viz,
.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__dial-wrapper,
.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__bands,
.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__legend,
.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__debug {
  display: none !important;
}

.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__meta {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__title {
  font-size: 11px;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.sun-arc-tooltip[data-state='hover'] .sun-arc-tooltip__chips {
  gap: 6px;
}

.sun-arc-tooltip[data-state='hover'] .sun-arc-chip {
  padding: 4px 6px;
  font-size: 10px;
}

.sun-arc-tooltip[data-state='hover'] [data-arc-state] {
  opacity: 0.85;
}

.sun-arc-tooltip.is-hidden {
  opacity: 0;
  transform: translate(-50%, -120%);
  visibility: hidden;
}

.sun-arc-tooltip__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.sun-arc-tooltip__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sun-arc-tooltip__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  color: rgba(226, 232, 240, 0.82);
}

.sun-arc-tooltip__meta span:last-child {
  color: rgba(248, 250, 252, 0.78);
  font-weight: 500;
  font-size: 11px;
}

.sun-arc-tooltip__close {
  display: inline-flex;
  padding: 6px 16px;
  margin: -6px -8px -6px 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  color: rgba(226, 232, 240, 0.85);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.sun-arc-tooltip__close svg {
  width: 12px;
  height: 12px;
}

.sun-arc-tooltip__close:focus-visible {
  outline: 2px solid rgba(148, 197, 255, 0.6);
  outline-offset: 2px;
}

.sun-arc-tooltip__close:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(96, 165, 250, 0.45);
  color: #f8fafc;
}

.sun-arc-tooltip__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.sun-arc-tooltip[data-state='pinned'] .sun-arc-tooltip__chips {
  gap: 8px;
  margin-bottom: 10px;
}

.sun-arc-chip.is-hidden,
.sun-arc-tooltip__chips .sun-arc-chip[data-arc-chip='grid'] {
  display: none !important;
}

.sun-arc-tooltip__viz {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.sun-arc-tooltip__viz.is-hidden {
  display: none;
}

.sun-arc-tooltip__dial-wrapper.is-hidden,
.sun-arc-tooltip__bands.is-hidden,
.sun-arc-tooltip__legend.is-hidden {
  display: none !important;
}

.bed-mini-grid {
  --bed-cell-size: 14px;
  --bed-gap: 4px;
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), var(--bed-cell-size));
  grid-auto-rows: var(--bed-cell-size);
  gap: var(--bed-gap);
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18), 0 8px 16px rgba(8, 47, 73, 0.24);
}

.bed-mini-grid--sunpath {
  background: rgba(15, 23, 42, 0.32);
}

.bed-mini-cell {
  width: var(--bed-cell-size);
  height: var(--bed-cell-size);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.bed-mini-cell.is-sunlit {
  box-shadow: inset 0 0 0 1px rgba(217, 166, 97, 0.45);
}

.bed-mini-cell.is-shaded {
  box-shadow: inset 0 0 0 1px rgba(71, 85, 105, 0.45);
}

.bed-mini-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18), 0 8px 16px rgba(8, 47, 73, 0.24);
}

.bed-mini-sparkline__bar {
  flex: 1 1 auto;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(217, 166, 97, 0.85) 0%, rgba(94, 234, 212, 0.6) 100%);
  transition: transform 120ms ease, background 120ms ease;
}

.bed-mini-sparkline__bar.is-active {
  transform: scaleX(1.08);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(217, 166, 97, 0.85) 100%);
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.4);
}

.sun-arc-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: rgba(226, 232, 240, 0.82);
}

.sun-arc-chip[data-state='sun'] {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.32);
  color: #fbbf24;
}

.sun-arc-chip[data-state='shade'] {
  background: rgba(14, 165, 233, 0.16);
  border-color: rgba(14, 165, 233, 0.28);
  color: #38bdf8;
}

.sun-arc-chip[data-state='heatmap'] {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.82);
}

.sun-arc-chip[data-state='bed'] {
  background: rgba(94, 234, 212, 0.16);
  border-color: rgba(94, 234, 212, 0.32);
  color: rgba(16, 185, 129, 0.85);
}

.sun-arc-tooltip__dial-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.sun-arc-tooltip.is-bed .sun-arc-tooltip__dial-wrapper {
  display: none;
}

.sun-arc-tooltip.is-bed .sun-arc-tooltip__chips {
  justify-content: flex-start;
}

.sun-arc-tooltip.is-bed .sun-arc-chip[data-arc-chip='mode'] {
  display: none;
}

.sun-arc-tooltip.is-bed .sun-arc-tooltip__bands {
  background: rgba(94, 234, 212, 0.16);
}

.sun-arc-tooltip.is-bed {
  border-color: rgba(94, 234, 212, 0.28);
}

.sun-arc-tooltip__dial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(rgba(148, 163, 184, 0.28) 0deg 360deg);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18), 0 10px 18px rgba(15, 23, 42, 0.28);
}

.sun-arc-tooltip__dial::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: inset 0 0 8px rgba(148, 163, 184, 0.2);
}

.sun-arc-tooltip__dial::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 26px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.95), rgba(251, 191, 36, 0.6));
  top: 50%;
  left: 50%;
  transform-origin: 50% 90%;
  border-radius: 999px;
  transform: translate(-50%, -90%) rotate(var(--marker-rotation, 0deg));
  box-shadow: 0 4px 8px rgba(251, 191, 36, 0.45);
}

.sun-arc-tooltip__dial.is-shaded::before {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.9), rgba(148, 163, 184, 0.6));
  box-shadow: 0 4px 6px rgba(148, 163, 184, 0.35);
}

.sun-arc-tooltip__bands {
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  text-align: center;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
}

.sun-arc-tooltip__legend {
  color: rgba(226, 232, 240, 0.76);
  font-size: 11px;
  text-align: center;
}

.sun-arc-tooltip__debug {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 10px;
  color: rgba(226, 232, 240, 0.85);
  max-width: 100%;
  overflow: hidden;
}

.sun-arc-tooltip__debug.is-hidden {
  display: none;
}

.sun-arc-tooltip__debug-meta {
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sun-arc-tooltip__debug-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.sun-arc-tooltip__debug-table th {
  font-weight: 600;
  padding-bottom: 3px;
  color: rgba(248, 250, 252, 0.75);
  font-size: 9px;
}

.sun-arc-tooltip__debug-row th,
.sun-arc-tooltip__debug-row td {
  padding: 1px 0;
  text-align: left;
  font-weight: 500;
  font-size: 9px;
}

.sun-arc-tooltip__debug-row td {
  text-align: right;
  font-feature-settings: 'tnum' 1;
}

.sun-arc-tooltip__debug-deg {
  padding-left: 6px;
  text-align: right;
}

.sun-arc-tooltip__debug-css {
  padding-left: 6px;
  text-align: right;
}

.sun-arc-tooltip__debug-span {
  padding-left: 6px;
  text-align: right;
}

.sun-arc-tooltip__debug-delta {
  padding-left: 6px;
  text-align: right;
}

.sun-arc-tooltip__debug-row.is-current-hour {
  color: #fbbf24;
}

.sun-arc-tooltip__debug-note {
  margin: 0;
}

.map-surface[data-map-mode="heatmap"] .hour-control {
  opacity: 0;
  pointer-events: none;
}

.map-surface[data-map-mode="heatmap"] .mode-sunpath-only {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.map-surface[data-map-mode="heatmap"] .overlay-legend--heatmap {
  display: flex;
}

.map-surface[data-map-mode="sunpath"] .overlay-legend--sunpath {
  display: flex;
}

.map-surface[data-map-mode="sunpath"] .overlay-legend--heatmap,
.map-surface[data-map-mode="heatmap"] .overlay-legend--sunpath {
  display: none;
}
.overlay-legend--sunpath,
.overlay-legend--heatmap {
  --legend-pill-bg: rgba(15, 23, 42, 0.45);
  --legend-pill-color: rgba(226, 232, 240, 0.92);
  --legend-pill-border: rgba(59, 130, 246, 0.32);
}

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

.panel-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

@media (max-width: 720px) {
  .map-overlay {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border-radius: 16px;
  }

  .overlay-divider {
    display: none;
  }

  .overlay-meta {
    flex-wrap: wrap;
  }

  .overlay-form input {
    min-width: 0;
  }

  .overlay-drawer-body {
    position: static;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: none;
  }
}

.mapboxgl-ctrl,
.maplibregl-ctrl {
  margin: 12px;
}

.maplibregl-ctrl-top-right {
  margin-top: calc(58px + env(safe-area-inset-top, 0px));
  margin-right: calc(12px + env(safe-area-inset-right, 0px));
}

.maplibregl-ctrl-group {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 32px rgba(8, 47, 73, 0.32);
  backdrop-filter: blur(12px) saturate(130%);
}

.maplibregl-ctrl-group button {
  background-color: rgba(30, 41, 59, 0.6);
  color: rgba(226, 232, 240, 0.9);
  border: 0;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.maplibregl-ctrl-group button:hover {
  background-color: rgba(59, 130, 246, 0.24);
  color: #f8fafc;
}

.export-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .sidebar,
  .legend-summary,
  .ready-queue {
    width: 280px;
  }

  .canvas-area {
    padding: 28px;
  }

  .context-panel {
    width: 240px;
  }
}

@media (max-width: 1024px) {
  .map-layout {
    height: auto;
    min-height: auto;
  }

  .map-surface {
    height: auto;
    min-height: 480px;
  }

  header.app-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px;
  }

  .layout {
    flex-direction: column;
  }

  .canvas-workspace {
    flex-direction: column;
    gap: 20px;
  }

  .sidebar,
  .legend-summary,
  .ready-queue {
    position: static;
    top: auto;
    height: auto;
    width: 100%;
    flex: 1 1 auto;
    border-right: none;
    border-left: none;
    border-radius: 0;
    padding: 24px;
    box-shadow: none;
  }

  .sidebar {
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
  }

  .legend-summary,
  .ready-queue {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
  }

  .canvas-area {
    order: 2;
    padding: 24px;
  }

  .sidebar {
    order: 1;
  }

  .ready-queue,
  .legend-summary {
    order: 3;
    margin-top: 12px;
  }

  .search-input {
    box-shadow: none;
  }

  .coachmark {
    position: static;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
  }

  .coachmark::after {
    display: none;
  }

  .context-panel {
    position: static;
    width: 100%;
    margin-top: 20px;
    margin-left: 0;
  }

  .canvas-stage {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .canvas-area {
    padding: 20px 16px;
  }

  .sidebar,
  .legend-summary,
  .ready-queue {
    padding: 20px 16px;
  }

  .card {
    grid-template-columns: 64px 1fr;
    gap: 14px;
  }

  .card-thumb {
    width: 64px;
    height: 64px;
    font-size: 12px;
  }

  header.app-header h1 {
    font-size: 16px;
  }

  header.app-header nav {
    gap: 16px;
    width: 100%;
    justify-content: space-between;
  }

  .tool-rail {
    top: 16px;
    left: 16px;
  }
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(85%) brightness(1.05);
}

.thumb-code {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: rgba(255, 255, 255, 0.92);
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.78);
}

.panel-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.panel-checklist li::before {
  content: '✓';
  color: rgba(94, 234, 212, 0.8);
  font-weight: 600;
}

.overlay-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 4px 0 0;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 8px 10px;
}

.timeline-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
}

.timeline-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.72);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.timeline-label__meta {
  font-size: 10px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.58);
  text-transform: none;
  letter-spacing: 0.02em;
}

.timeline-select select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  font-size: 13px;
}

.timeline-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
}

.timeline-slider__track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.timeline-slider__track input[type="range"] {
  width: 100%;
  display: block;
}

.timeline-hour-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.timeline-hour-row .timeline-slider {
  flex: 1 1 auto;
  min-width: 0;
}

.timeline-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
  border: 1px solid rgba(248, 250, 252, 0.8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.timeline-marker.is-visible {
  opacity: 1;
}

.timeline-marker.is-edge {
  opacity: 0.7;
}

.timeline-marker[data-tooltip]:not([data-tooltip=""])::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translate(-50%, -120%);
  font-size: 10px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.92);
  background: rgba(248, 250, 252, 0.95);
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.timeline-marker[data-tooltip]:not([data-tooltip=""]):hover::after,
.timeline-marker[data-tooltip]:not([data-tooltip=""]):focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -140%);
}

.timeline-meta-note {
  font-size: 11px;
  color: rgba(248, 250, 252, 0.78);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease;
}

.timeline-meta-note.is-visible {
  opacity: 0.7;
  visibility: visible;
}

.timeline-meta-note.is-active {
  opacity: 1;
  background: rgba(250, 204, 21, 0.25);
  border-color: rgba(250, 204, 21, 0.6);
  color: rgba(248, 250, 252, 0.95);
}

.timeline-hour-row .timeline-meta-note {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .timeline-hour-row {
    flex-wrap: wrap;
  }
}

.timeline-slider input[type="range"] {
  flex: 1;
  accent-color: #38bdf8;
}

.timeline-value {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  min-width: 48px;
  text-align: right;
}

.timeline-chips {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-group.timeline-resolution {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.timeline-group.timeline-resolution .timeline-label {
  margin: 0;
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 240, 0.78);
}

.timeline-group.timeline-resolution .timeline-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  width: 100%;
}

.timeline-group.timeline-resolution .timeline-chips .chip {
  width: 100%;
  justify-content: center;
}

.drawer-sections {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-section {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.drawer-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.drawer-section__header h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.drawer-section__header p {
  margin: 0;
  font-size: 10px;
  color: rgba(226, 232, 240, 0.62);
  white-space: nowrap;
}

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

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 6px 10px;
}

.toggle-group__title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 240, 0.62);
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.toggle-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 4px;
}

.overlay-toggles .toggle-group + .toggle-group {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 4px;
  margin-top: 2px;
}


.overlay-toggles .toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.84);
  cursor: pointer;
}

.overlay-toggles .toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.overlay-toggles .toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.24);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.overlay-toggles .toggle-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
  transition: background 140ms ease, transform 140ms ease;
}

.overlay-toggles .toggle input:checked + .toggle-label {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(96, 165, 250, 0.5);
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.overlay-toggles .toggle input:checked + .toggle-label::before {
  background: #38bdf8;
  transform: scale(1.4);
}

.overlay-toggles--developer {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.timeline-chips .chip {
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.timeline-chips .chip.is-active {
  background: rgba(59, 130, 246, 0.32);
  color: #f8fafc;
  border-color: rgba(59, 130, 246, 0.45);
}

.timeline-chips .chip:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 2px;
}

.overlay-help-chip.is-hidden {
  display: none;
}
@media (max-width: 720px) {
  .overlay-topbar,
  .overlay-primary,
  .overlay-action-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 1280px), (max-height: 820px) {
  .overlay-window-group {
    left: 16px;
    max-width: min(320px, 55vw);
  }
}

@media (max-width: 960px), (max-height: 700px) {
  .overlay-window-group {
    left: 50%;
    transform: translateX(-50%);
    max-width: min(92vw, 360px);
  }
}

@media (max-width: 720px), (max-height: 560px) {
  .overlay-window-group {
    top: calc(var(--planner-header-height, 0px) + 72px);
  }
}

@media (max-width: 768px) {
  :root {
    --planner-header-height: 0px;
  }

  .brand-trigger {
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-size: 13px;
  }

  .map-location-switch {
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    left: 12px;
  }

  .map-location-switch__control {
    padding: 7px 26px 7px 14px;
    font-size: 11px;
    min-width: 160px;
    max-width: 210px;
  }

  .map-layout {
    grid-template-columns: 1fr;
    height: 100dvh;
    min-height: 100dvh;
  }

  .map-utility-stack {
    top: 12px;
    right: 12px;
    gap: 6px;
  }

  .overlay-window-group {
    display: none;
  }

  body {
    --hud-mode-switch-margin-left: auto;
    --hud-mode-switch-margin-right: auto;
    --hud-mode-switch-padding: 4px 12px;
    --hud-mode-button-padding: 7px 16px;
    --hud-mode-button-sunpath-extra: 68px;
    --hud-mode-play-size: 28px;
    --hud-mode-play-right: 12px;
    --hud-mobile-status-padding: 6px 12px;
    --hud-mobile-status-gap: 8px;
    --hud-mobile-status-margin-top: 2px;
    --hud-mobile-status-label-size: 8.5px;
    --hud-mobile-status-time-size: 13px;
    --hud-mobile-status-date-size: 9px;
    --hud-mobile-status-divider-gap: 6px;
    --hud-mobile-legal-font-size: 9px;
    --hud-mobile-legal-padding: 3px 8px;
    --hud-mobile-legal-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
    --hud-mobile-legal-right: 12px;
  }

  .map-overlay--compact {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    width: auto;
    padding: 4px 8px;
    border-radius: 18px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: none;
    pointer-events: auto;
    backdrop-filter: none;
  }

  .map-overlay--compact::before {
    content: none;
    display: none;
  }

  .map-overlay--compact .map-overlay__status,
  .map-overlay--compact .map-overlay__header .map-overlay__status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: var(--hud-mobile-status-gap, 8px);
    margin-top: var(--hud-mobile-status-margin-top, 2px);
    padding: var(--hud-mobile-status-padding, 6px 14px);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 8px 18px rgba(8, 15, 28, 0.26);
    color: rgba(226, 232, 240, 0.74);
    font-size: var(--hud-mobile-status-label-size, 9px);
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-align: center;
    min-width: 0;
    white-space: nowrap;
  }

  .map-overlay--compact .map-overlay__status::before {
    content: attr(data-mode-label);
    margin-right: var(--hud-mobile-status-gap, 8px);
    font-size: var(--hud-mobile-status-label-size, 9px);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.6);
    white-space: nowrap;
  }

  .map-overlay--compact .map-overlay__status[data-mode-label='']::before,
  .map-overlay--compact .map-overlay__status:not([data-mode-label])::before {
    content: none;
    margin-right: 0;
  }

  .map-overlay--compact .map-overlay__status .overlay-hud {
    display: inline-flex;
    align-items: center;
    gap: var(--hud-mobile-status-gap, 8px);
    padding: 0;
    line-height: 1.15;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .map-overlay--compact .map-overlay__status .overlay-hud span[aria-hidden='true']:not(:nth-of-type(2)) {
    display: none;
  }

  .map-overlay--compact .map-overlay__status .overlay-hud [data-bind='time'] {
    font-size: var(--hud-mobile-status-time-size, 14px);
    font-weight: 600;
    color: rgba(248, 250, 252, 0.9);
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  .map-overlay--compact .map-overlay__status .overlay-hud [data-bind='hud-date'] {
    font-size: var(--hud-mobile-status-date-size, 10px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.72);
    white-space: nowrap;
  }

  .map-overlay--compact .map-overlay__status .overlay-hud [data-bind='hud-resolution'],
  .map-overlay--compact .map-overlay__status .overlay-hud [data-bind='sunrise-sunset'],
  .map-overlay--compact .map-overlay__status .overlay-hud [data-bind='sun-altitude'],
  .map-overlay--compact .map-overlay__status .overlay-hud [data-bind='sun-azimuth'] {
    display: none;
  }

.overlay-window--controls.is-collapsed .overlay-hud [data-status-part='dot-before-angle'],
.overlay-window--controls.is-collapsed .overlay-hud [data-status-part='angle-divider'],
.overlay-window--controls.is-collapsed .overlay-hud [data-status-part='sun-altitude'],
.overlay-window--controls.is-collapsed .overlay-hud [data-status-part='sun-azimuth'] {
  display: none;
}

  .map-overlay--compact .map-overlay__header {
    align-items: center;
  }

  .map-overlay--compact .map-overlay__header-main {
    gap: 4px;
    flex-direction: column;
    align-items: center;
  }

  .map-overlay--compact .overlay-topbar {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
  }

  .map-overlay--compact .overlay-primary {
    justify-content: center;
  }

  .map-overlay--compact .overlay-action-group {
    width: auto;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 0 0 auto;
    margin: 0 auto;
  }

  .map-overlay--compact .mode-switch {
    min-width: 236px;
  }

  .map-utility-stack .fullscreen-toggle {
    width: 38px;
    height: 38px;
  }

  .map-utility-stack .fullscreen-hint {
    font-size: 10px;
  }

  .sun-arc-tooltip__close {
    display: inline-flex;
  }

  .map-overlay--compact .mode-switch__play svg {
    width: 13px;
    height: 13px;
  }

  .map-overlay--compact .sun-arc-tooltip__close {
    display: inline-flex;
  }

  .map-overlay--compact.overlay-window {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    overflow: visible;
  }

  .map-overlay--compact .overlay-window__actions {
    display: none;
  }

  .map-overlay--compact .map-overlay__body {
    padding: 0 4px 6px;
  }

  .map-overlay--compact .map-3d-widget {
    gap: 10px;
    padding: 6px 6px 10px;
  }

  .map-overlay--compact .map-3d-widget__pad {
    grid-template-columns: repeat(3, 32px);
    grid-auto-rows: 32px;
    gap: 6px;
  }

  .map-overlay--compact .map-3d-widget__btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .map-overlay--compact .map-3d-widget__btn svg {
    width: 14px;
    height: 14px;
  }

  .map-overlay--compact .map-3d-widget__btn--chip {
    padding: 5px 10px;
    font-size: 10px;
  }

  .map-overlay--compact .map-3d-widget__fab {
    width: 36px;
    height: 36px;
  }

  .map-overlay--compact .map-3d-widget__fab svg {
    width: 16px;
    height: 16px;
  }

  .mobile-attribution {
    display: inline-flex;
    align-items: center;
  }
}
.developer-notes__content {
  overflow-wrap: anywhere;
}

.developer-notes__content code {
  word-break: break-all;
}

.developer-notes__content details {
  overflow-wrap: anywhere;
}
.is-mobile-device {
  --hud-mode-switch-margin-left: auto;
  --hud-mode-switch-margin-right: auto;
  --hud-mode-switch-padding: 4px 12px;
  --hud-mode-button-padding: 7px 16px;
  --hud-mode-button-sunpath-extra: 68px;
  --hud-mode-play-size: 28px;
  --hud-mode-play-right: 12px;
  --hud-mobile-status-padding: 6px 12px;
  --hud-mobile-status-gap: 8px;
  --hud-mobile-status-margin-top: 2px;
  --hud-mobile-status-label-size: 8.5px;
  --hud-mobile-status-time-size: 13px;
  --hud-mobile-status-date-size: 9px;
  --hud-mobile-status-divider-gap: 6px;
  --hud-mobile-legal-font-size: 9px;
  --hud-mobile-legal-padding: 3px 8px;
  --hud-mobile-legal-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  --hud-mobile-legal-right: 12px;
}

.is-mobile-device .brand-trigger {
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px;
  padding: 6px 13px;
  font-size: 12px;
  gap: 6px;
}

.is-mobile-device .map-location-switch {
  top: calc(env(safe-area-inset-top, 0px) + 52px);
  left: 12px;
}

.is-mobile-device .map-location-switch__control {
  font-size: 11px;
  padding: 7px 24px 7px 14px;
  min-width: 150px;
  max-width: 200px;
}

.is-mobile-device .map-layout {
  grid-template-columns: 1fr;
  height: 100dvh;
  min-height: 100dvh;
}

.is-mobile-device .overlay-window-group {
  display: none;
}

.is-mobile-device .map-overlay--compact {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: auto;
  padding: 4px 8px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: none;
  pointer-events: auto;
  backdrop-filter: none;
}

.is-mobile-device .map-overlay--compact::before {
  content: none;
  display: none;
}

.is-mobile-device .map-overlay--compact .map-overlay__status,
.is-mobile-device .map-overlay--compact .map-overlay__header .map-overlay__status {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: var(--hud-mobile-status-gap, 8px);
  margin-top: var(--hud-mobile-status-margin-top, 2px);
  padding: var(--hud-mobile-status-padding, 6px 14px);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 8px 18px rgba(8, 15, 28, 0.26);
  color: rgba(226, 232, 240, 0.74);
  font-size: var(--hud-mobile-status-label-size, 9px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
}

.is-mobile-device .map-overlay--compact .map-overlay__header {
  align-items: center;
}

.is-mobile-device .map-overlay--compact .map-overlay__header-main {
  gap: 4px;
  flex-direction: column;
  align-items: center;
}

.is-mobile-device .map-overlay--compact .overlay-topbar {
  width: 100%;
  justify-content: center;
  gap: 6px;
}

.is-mobile-device .map-overlay--compact .overlay-primary {
  justify-content: center;
}

.is-mobile-device .map-overlay--compact .overlay-action-group {
  width: auto;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin: 0 auto;
}

.is-mobile-device .map-overlay--compact .mode-switch {
  min-width: 236px;
}

.is-mobile-device .map-utility-stack {
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
}

.is-mobile-device .map-utility-stack .fullscreen-toggle {
  width: 38px;
  height: 38px;
}

.is-mobile-device .map-utility-stack .fullscreen-hint {
  font-size: 10px;
}

.is-mobile-device .sun-arc-tooltip__close {
  display: inline-flex;
}

.is-mobile-device .map-overlay--compact .overlay-window__actions {
  display: none;
}

.is-mobile-device .map-overlay--compact .map-overlay__mobile-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: var(--hud-mobile-status-margin-top, 4px);
}

.is-mobile-device .map-overlay--compact .map-overlay__mobile-status .mobile-status-card {
  width: auto;
}

.is-mobile-device .map-overlay--compact .map-overlay__body {
  padding: 0 4px 6px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget {
  gap: 10px;
  padding: 6px 6px 10px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget__pad {
  grid-template-columns: repeat(3, 32px);
  grid-auto-rows: 32px;
  gap: 6px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget__btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget__btn svg {
  width: 14px;
  height: 14px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget__btn--chip {
  padding: 5px 10px;
  font-size: 10px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget__fab {
  width: 36px;
  height: 36px;
}

.is-mobile-device .map-overlay--compact .map-3d-widget__fab svg {
  width: 16px;
  height: 16px;
}

.is-mobile-device .mobile-attribution {
  display: inline-flex;
}

.is-mobile-device .maplibregl-ctrl-bottom-right {
  display: none !important;
}

.map-overlay__mobile-status {
  display: none;
}
