/* Storage Warning */
.storage-warning {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 50, 50, 0.9);
  color: var(--text-color);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: var(--font-md);
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow-panel);
}


.variation-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.variation-close {
  appearance: none;
  border: 0;
  color: var(--text-color);
  opacity: var(--opacity-muted);
  cursor: pointer;
  font-size: var(--font-lg);
  line-height: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-1);
  transition: opacity 90ms var(--ease-out-quart), background-color 90ms var(--ease-out-quart);
}

.variation-close:hover,
.variation-close:focus-visible { opacity: 1; background: var(--surface-2); }

.variation-section {
  margin-top: 16px;
}

.variation-section-head {
  align-items: baseline;
  font-size: var(--font-md);
  font-weight: 600;
}

.variation-range {
  font-size: var(--font-sm);
  font-weight: 400;
  opacity: var(--opacity-muted);
  text-align: right;
}

.variation-bars {
  margin-top: 8px;
  min-height: 64px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-bottom: 1px solid var(--panel-border);
}

.variation-bar-slot {
  flex: 1 1 0;
  min-width: 2px;
  max-width: 14px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  cursor: default;
}

.variation-bar {
  width: 100%;
  background: currentColor;
  opacity: var(--opacity-mark);
  border-radius: 2px 2px 0 0;
  transition: opacity 90ms var(--ease-out-quart);
}

.variation-bar-slot:hover .variation-bar {
  opacity: 1 !important;
}

.variation-bar-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--panel-bg-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-color);
  font-size: var(--font-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: var(--shadow-panel);
}

.variation-bar-tooltip[hidden] {
  display: none;
}

.variation-empty {
  font-size: var(--font-sm);
  opacity: var(--opacity-faint);
  padding: 8px 0;
}

.variation-rotation-mode {
  margin-top: 9px;
}

.variation-rotation-mode-label {
  font-size: var(--font-sm);
  opacity: var(--opacity-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* Phase 7: factual motor-vocabulary coverage. These panels are event-driven;
   there are no idle animations or continuously running render loops. */
.coverage-summary {
  margin-top: 0;
  display: block;
}

.coverage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 5px;
  font-size: var(--font-sm);
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}

/* Thin fill under a coverage row: how much of the possible range has been explored. */
.coverage-meter {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.coverage-meter > i {
  display: block;
  height: 100%;
  background: currentColor;
  opacity: var(--opacity-mark);
  border-radius: inherit;
}

.coverage-row-label {
  opacity: var(--opacity-muted);
  min-width: 0;
}

.coverage-row-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: var(--font-md);
  opacity: 1;
  font-weight: 600;
}

.coverage-note {
  margin-top: 8px;
  font-size: var(--font-xs);
  line-height: 1.4;
  opacity: var(--opacity-faint);
}

.heatmap-group {
  min-width: 0;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: var(--font-xs);
  opacity: var(--opacity-muted);
}

.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 3px;
}

.heatmap-grid {
  display: grid;
  gap: 1px;
  width: max-content;
  min-width: 100%;
}

.heatmap-cell {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.055;
  cursor: default;
  outline: none;
}

.heatmap-cell.has-data {
  opacity: var(--heat-opacity, 0.25);
}

.heatmap-cell:hover,
.heatmap-cell:focus-visible,
.heatmap-cell.is-selected {
  opacity: 1;
  box-shadow: 0 0 0 1px currentColor;
}

.direction-rose {
  margin-top: 8px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.direction-rose svg {
  width: 200px;
  height: 200px;
  overflow: visible;
}

.direction-rose-baseline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  opacity: var(--opacity-mark-faint);
}

.direction-spoke {
  stroke: currentColor;
  stroke-linecap: round;
  opacity: var(--opacity-mark-faint);
}

.direction-spoke.has-data {
  opacity: var(--direction-opacity, 0.45);
}

.direction-spoke-hit {
  stroke: transparent;
  stroke-width: 8;
  cursor: default;
  pointer-events: stroke;
}

.direction-spoke-group:hover .direction-spoke,
.direction-spoke-group:focus .direction-spoke,
.direction-spoke-group.is-selected .direction-spoke {
  opacity: 1;
}

.angle-coverage-bars {
  margin-top: 9px;
  display: grid;
  gap: 5px;
}

.angle-coverage-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  font-size: var(--font-sm);
}

.angle-coverage-label {
  opacity: var(--opacity-muted);
  font-variant-numeric: tabular-nums;
}

.angle-coverage-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.angle-coverage-fill {
  height: 100%;
  width: var(--angle-width, 0%);
  background: currentColor;
  opacity: var(--opacity-mark);
  border-radius: inherit;
}

.angle-coverage-count {
  min-width: 30px;
  text-align: right;
  opacity: var(--opacity-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .direction-rose svg { width: 160px; height: 160px; }
}

