/* Newton's Cradle Museum Exhibit — Architectural Swiss Museum UI
 * Adapts seamlessly across Dark Vitrine, Daylight Lab, and Warm Studio lighting presets.
 */

:root {
  --bg: #090b0f;
  --surface: rgba(14, 17, 23, 0.80);
  --surface-solid: #11151c;
  --surface-hover: rgba(255, 255, 255, 0.08);
  --ink: #f2efe9;
  --ink-muted: #9b9991;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.22);
  --accent: #d4a95a;
  --accent-ink: #120e07;
  --accent-soft: rgba(212, 169, 90, 0.16);
  --meter-ke: #d4a95a;
  --meter-pe: #7ca7d6;
  --meter-te: #e7e3db;
  --meter-px: #d4a95a;
  --radius-sm: 4px;
  --radius-md: 6px;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --drawer-width: 304px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="daylight"] {
  --bg: #e6e3dc;
  --surface: rgba(246, 244, 239, 0.84);
  --surface-solid: #f4f1eb;
  --surface-hover: rgba(20, 22, 26, 0.06);
  --ink: #181a1f;
  --ink-muted: #5a5d63;
  --border: rgba(24, 26, 31, 0.12);
  --border-strong: rgba(24, 26, 31, 0.26);
  --accent: #265d7a;
  --accent-ink: #f7f9fa;
  --accent-soft: rgba(38, 93, 122, 0.12);
  --meter-ke: #265d7a;
  --meter-pe: #a16f33;
  --meter-te: #24272e;
  --meter-px: #265d7a;
}

[data-theme="studio"] {
  --bg: #130f0c;
  --surface: rgba(24, 18, 14, 0.82);
  --surface-solid: #1a1410;
  --surface-hover: rgba(255, 228, 190, 0.08);
  --ink: #f5ede2;
  --ink-muted: #a89989;
  --border: rgba(255, 224, 185, 0.13);
  --border-strong: rgba(255, 224, 185, 0.26);
  --accent: #e2a84c;
  --accent-ink: #171007;
  --accent-soft: rgba(226, 168, 76, 0.16);
  --meter-ke: #e2a84c;
  --meter-pe: #87abc9;
  --meter-te: #f2e6d6;
  --meter-px: #e2a84c;
}

[data-theme="chill"] {
  --bg: #110d0a;
  --surface: rgba(24, 18, 13, 0.72);
  --surface-solid: #18120d;
  --surface-hover: rgba(255, 224, 178, 0.12);
  --ink: #f2e8da;
  --ink-muted: #b09f8d;
  --border: rgba(255, 220, 175, 0.16);
  --border-strong: rgba(255, 220, 175, 0.32);
  --accent: #e0a958;
  --accent-ink: #171007;
  --accent-soft: rgba(224, 169, 88, 0.18);
  --meter-ke: #e0a958;
  --meter-pe: #7ea3c4;
  --meter-te: #f2e8da;
  --meter-px: #e0a958;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  transition: background-color 280ms var(--ease-out), color 220ms var(--ease-out);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

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

/* Full-bleed 3D WebGL viewport */
.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Top header */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 12px max(22px, env(safe-area-inset-left));
  pointer-events: none;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.brand {
  pointer-events: auto;
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  flex-wrap: nowrap;
}

.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.util-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.util-btn[aria-pressed="true"],
.util-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.util-icon-only {
  width: 36px;
  padding: 0;
  justify-content: center;
}

#btn-audio .icon-sound-off {
  display: none;
}

#btn-audio[aria-pressed="true"] .icon-sound-on {
  display: none;
}

#btn-audio[aria-pressed="true"] .icon-sound-off {
  display: block;
}

#btn-pause .icon-play {
  display: none;
}

#btn-pause[aria-pressed="true"] .icon-pause {
  display: none;
}

#btn-pause[aria-pressed="true"] .icon-play {
  display: block;
}

/* Kiosk mode restore button */
.kiosk-restore {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
  height: 34px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.kiosk-restore:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

/* Stage status & live drag badge */
.stage-status {
  position: fixed;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: left 240ms var(--ease-out), opacity 220ms var(--ease-out);
}

.hint-line {
  margin: 0;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  transition: opacity 320ms var(--ease-out);
}

.hint-line.is-hidden {
  opacity: 0;
}

.drag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(12px);
}

.drag-badge-label {
  color: var(--ink-muted);
}

.drag-badge-value {
  color: var(--ink);
  font-weight: 600;
}

.drag-badge-sep {
  color: var(--border-strong);
}

/* Bottom museum dock */
.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  width: min(740px, calc(100vw - 32px));
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: left 240ms var(--ease-out), opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

/* Offset dock slightly left on wide desktops when the right settings rail is open */
@media (min-width: 1024px) {
  body.drawer-open .bottom-dock,
  body.drawer-open .stage-status {
    left: calc(50% - var(--drawer-width) * 0.5);
  }
}

.dock-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

/* Segmented controls */
.segmented {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(128, 128, 128, 0.06);
}

.segmented-full {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
}

.seg-btn {
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.seg-btn:last-child {
  border-right: 0;
}

.seg-btn:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.seg-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Live conservation telemetry */
.telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

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

.metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.metric-name {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.metric-val {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.meter-track {
  position: relative;
  height: 4px;
  width: 100%;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transform-origin: left center;
}

.meter-ke {
  background: var(--meter-ke);
}

.meter-pe {
  background: var(--meter-pe);
}

.meter-te {
  background: var(--meter-te);
}

.meter-bipolar .meter-center-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border-strong);
}

.meter-px {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0%;
  background: var(--meter-px);
}

/* Right architectural controls rail */
.controls-drawer {
  position: fixed;
  top: 72px;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 25;
  width: var(--drawer-width);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms var(--ease-out), opacity 200ms var(--ease-out);
}

body.drawer-open .controls-drawer {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.close-btn:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
  transition: color 140ms var(--ease-out), border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.help-tip:hover,
.help-tip:focus-visible,
.help-tip.is-open {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.help-tooltip {
  position: fixed;
  z-index: 60;
  max-width: 264px;
  padding: 9px 11px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.48;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.control-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.control-meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.control-caption {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.control-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

/* Custom precision range sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-solid);
  margin-top: -5.5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 140ms var(--ease-out);
}

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

input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-solid);
}

/* Clean toggle switches */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 2px 0;
}

.switch-row:hover {
  color: var(--ink);
}

.switch-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  flex-shrink: 0;
  transition: background-color 180ms var(--ease-out);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.switch-row input:checked + .switch-track {
  background: var(--accent);
}

.switch-row input:checked + .switch-track::after {
  transform: translateX(16px);
  background: var(--accent-ink);
}

.switch-row input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.control-footer {
  padding-top: 6px;
}

.reset-defaults-btn {
  width: 100%;
  height: 34px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.reset-defaults-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--ink);
}

/* Museum Exhibit Plaque slide-over */
.plaque-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 7, 10, 0.48);
  backdrop-filter: blur(4px);
}

.plaque-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 45;
  width: min(460px, 100vw);
  background: var(--surface-solid);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  user-select: text;
}

.plaque-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.plaque-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.08;
}

.plaque-sub {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.plaque-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.plaque-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.plaque-section p {
  margin: 0;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-muted);
}

.plaque-section strong {
  color: var(--ink);
  font-weight: 600;
}

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

.experiment-item {
  text-align: left;
  padding: 11px 13px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.experiment-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.experiment-item strong {
  font-size: 13px;
  color: var(--ink);
}

.experiment-item span {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.keys-line {
  font-size: 13px !important;
  line-height: 1.8 !important;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
}

/* Kiosk / Hidden UI & Chill Mode state */
body.kiosk-mode .topbar,
body.kiosk-mode .bottom-dock,
body.kiosk-mode .controls-drawer,
body.kiosk-mode .stage-status,
body.chill-mode .topbar,
body.chill-mode .bottom-dock,
body.chill-mode .controls-drawer,
body.chill-mode .stage-status {
  opacity: 0;
  pointer-events: none;
}

.chill-bar {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.62;
  transition: opacity 220ms var(--ease-out);
}

.chill-bar:hover,
.chill-bar:focus-within {
  opacity: 1;
}

.chill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: rgba(20, 15, 11, 0.72);
  border: 1px solid rgba(255, 220, 175, 0.18);
  border-radius: var(--radius-sm);
  color: #efe4d4;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.chill-pill:hover {
  background: rgba(36, 27, 19, 0.88);
  border-color: rgba(224, 169, 88, 0.55);
  color: #ffffff;
}

.chill-pill.is-active {
  background: rgba(224, 169, 88, 0.22);
  border-color: rgba(224, 169, 88, 0.65);
  color: #fff6e6;
}

#btn-chill-audio .icon-sound-off {
  display: none;
}

#btn-chill-audio[aria-pressed="true"] .icon-sound-on {
  display: none;
}

#btn-chill-audio[aria-pressed="true"] .icon-sound-off {
  display: block;
}

/* Responsive mobile & compact layout */
@media (max-width: 1023px) {
  .controls-drawer {
    top: 68px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: 380px;
    margin-left: auto;
    bottom: 12px;
  }
}

@media (max-width: 767px) {
  .topbar {
    padding: max(12px, env(safe-area-inset-top)) 12px 8px 12px;
    gap: 8px;
    align-items: center;
  }

  .brand-title {
    font-size: 22px;
    white-space: nowrap;
  }

  .brand-subtitle {
    display: none;
  }

  .utility-actions {
    gap: 5px;
  }

  .util-btn {
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .util-icon-only {
    width: 32px;
    padding: 0;
  }

  .util-btn .util-label {
    display: none;
  }

  #btn-controls-toggle .util-label {
    display: inline;
  }

  .stage-status {
    bottom: 186px;
    width: calc(100vw - 24px);
  }

  .hint-line {
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }

  .bottom-dock {
    width: calc(100vw - 20px);
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 10px;
    gap: 8px;
  }

  .dock-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .dock-controls .segmented {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
  }

  .dock-transport {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  .dock-transport .util-btn {
    justify-content: center;
  }

  .seg-btn {
    padding: 0 4px;
    font-size: 11.5px;
    height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .telemetry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .chill-bar {
    right: 12px;
    left: 12px;
    justify-content: flex-end;
    gap: 6px;
  }

  .chill-pill {
    height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }
}

.noscript-fallback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #090b0f;
  color: #f2efe9;
  text-align: center;
}

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