/* Top-left telemetry card */
.telemetry-card {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  width: 318px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.brand-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.brand-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.brand-dots span:nth-child(1) {
  background: #ffd27d;
  box-shadow: 0 0 8px #ff9d3b;
}

.brand-dots span:nth-child(2) {
  background: #9ec5ff;
  box-shadow: 0 0 8px #4b8bff;
}

.brand-dots span:nth-child(3) {
  background: #ff8a7a;
  box-shadow: 0 0 8px #ff3b4e;
}

.era-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--teal);
  border: 1px solid rgba(94, 234, 212, 0.25);
}

.era-badge.chaotic {
  background: rgba(255, 107, 122, 0.14);
  color: var(--danger);
  border-color: rgba(255, 107, 122, 0.28);
}

.preset-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 179, 255, 0.1);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Top-right quick actions */
.top-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: rgba(148, 179, 255, 0.34);
}

.icon-btn.active {
  color: var(--text-primary);
  background: rgba(122, 162, 255, 0.18);
  border-color: rgba(122, 162, 255, 0.45);
}

/* Right Inspector Drawer */
.inspector-drawer {
  position: absolute;
  top: 66px;
  right: 20px;
  max-height: calc(100vh - 154px);
  width: 288px;
  border-radius: var(--radius-lg);
  padding: 14px 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.inspector-drawer.collapsed {
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.focus-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 179, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.pill-btn.active {
  background: rgba(122, 162, 255, 0.2);
  border-color: rgba(122, 162, 255, 0.5);
  color: #ffffff;
}

/* Star Cards */
.star-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.star-card {
  padding: 8px 11px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 179, 255, 0.1);
}

.star-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.star-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.star-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.star-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.star-spectral {
  font-size: 10px;
  color: var(--text-muted);
}

.star-mass-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* Range Sliders */
.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.slider-head span:last-child {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(148, 179, 255, 0.2);
  outline: none;
  cursor: pointer;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid #0b101e;
  box-shadow: 0 0 8px rgba(122, 162, 255, 0.65);
  transition: transform 0.15s ease;
}

input[type='range']::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

/* Toggle Chips Grid */
.toggle-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 179, 255, 0.09);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle-item:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(148, 179, 255, 0.22);
}

.toggle-item input {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(148, 179, 255, 0.18);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-item input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-item input:checked {
  background: rgba(122, 162, 255, 0.62);
}

.toggle-item input:checked::after {
  transform: translateX(11px);
  background: #ffffff;
}

/* Bottom Floating Control Dock */
.bottom-dock {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  max-width: calc(100vw - 32px);
  overflow-x: auto;
}

.dock-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-divider {
  width: 1px;
  height: 24px;
  background: rgba(148, 179, 255, 0.16);
  flex-shrink: 0;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

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

.dock-btn.primary {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), rgba(167, 139, 250, 0.35));
  border-color: rgba(147, 197, 253, 0.45);
}

.dock-btn.primary:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(167, 139, 250, 0.5));
}

.preset-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 179, 255, 0.12);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.preset-pill.library-trigger {
  background: rgba(94, 234, 212, 0.08);
  border-color: rgba(94, 234, 212, 0.28);
  color: var(--teal);
}

.preset-pill.library-trigger:hover,
.preset-pill.library-trigger.active {
  background: rgba(94, 234, 212, 0.2);
  border-color: rgba(94, 234, 212, 0.55);
  color: #ffffff;
}

.preset-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.preset-pill.active {
  color: #ffffff;
  background: rgba(122, 162, 255, 0.24);
  border-color: rgba(122, 162, 255, 0.5);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.speed-control input[type='range'] {
  width: 72px;
}

.speed-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 36px;
}

.hint-bar {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0.75;
}

@media (max-width: 860px) {
  .telemetry-card {
    max-width: 240px;
    padding: 12px 14px;
  }
  .inspector-drawer {
    width: 270px;
  }
  .hint-bar {
    display: none;
  }
}
