:root {
  color-scheme: dark;
  --void: #050711;
  --void-2: #070a15;
  --panel: #0a0f1d;
  --panel-2: #0d1425;
  --panel-3: #111a2d;
  --line: #222e48;
  --line-hot: #3c5276;
  --text: #eff3ff;
  --muted: #8391ac;
  --dim: #56637b;
  --cyan: #55d6e8;
  --cyan-soft: #2e93ad;
  --magenta: #eb63b4;
  --amber: #f4b95f;
  --violet: #9b82ff;
  --warning: #ffb454;
  --error: #ff667a;
  --success: #8ae3b4;
  --header-h: 64px;
  --footer-h: 112px;
  --ui: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--text);
  font-family: var(--ui);
  font-size: 13px;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.015) 3px 4px);
  mix-blend-mode: soft-light;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  color: var(--text);
}

button {
  border: 1px solid var(--line);
  background: #0b1120;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

button:hover:not(:disabled) {
  border-color: var(--line-hot);
  color: #fff;
  background: #10192b;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
#canvas-host:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid #35435d;
  border-bottom-color: #53617a;
  border-radius: 3px;
  background: #11192a;
  color: var(--muted);
  font: 9px/1 var(--mono);
}

.app-shell {
  display: grid;
  grid-template-rows: var(--header-h) minmax(0, 1fr) var(--footer-h);
  width: 100%;
  height: 100%;
  min-width: 1040px;
  background:
    radial-gradient(circle at 55% 20%, rgba(62, 71, 129, 0.09), transparent 35%),
    var(--void);
}

.command-bar {
  display: grid;
  grid-template-columns: 290px 1fr auto;
  align-items: stretch;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 18, 0.96);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

.brand-sigil {
  position: relative;
  width: 34px;
  height: 34px;
}

.brand-sigil span {
  position: absolute;
  top: 5px;
  width: 15px;
  height: 23px;
  border: 1px solid var(--cyan);
  border-radius: 80% 15% 70% 30%;
  opacity: 0.86;
  transform: rotate(-24deg);
  box-shadow: inset 0 0 12px rgba(85, 214, 232, 0.18);
}

.brand-sigil span:nth-child(2) {
  right: 0;
  border-color: var(--magenta);
  transform: scaleX(-1) rotate(-24deg);
  box-shadow: inset 0 0 12px rgba(235, 99, 180, 0.18);
}

.brand-sigil i {
  position: absolute;
  top: 5px;
  left: 16px;
  width: 2px;
  height: 26px;
  background: linear-gradient(var(--cyan), var(--magenta));
}

.brand-kicker {
  margin-bottom: 2px;
  color: var(--muted);
  font: 8px/1 var(--mono);
  letter-spacing: 0.22em;
}

.brand-kicker b {
  color: var(--magenta);
}

.brand-block h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 690;
  letter-spacing: 0.14em;
}

.view-modes {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
}

.mode-button {
  position: relative;
  min-width: 108px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: 10px/1 var(--mono);
  letter-spacing: 0.14em;
}

.mode-button::after {
  position: absolute;
  right: 22px;
  bottom: -1px;
  left: 22px;
  height: 2px;
  content: "";
  background: transparent;
}

.mode-button.is-active {
  color: var(--text);
  background: linear-gradient(180deg, transparent, rgba(85, 214, 232, 0.05));
}

.mode-button.is-active::after {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(85, 214, 232, 0.6);
}

.command-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.model-badge {
  padding: 4px 6px;
  border: 1px solid rgba(244, 185, 95, 0.25);
  color: var(--amber);
  font: 8px/1 var(--mono);
  letter-spacing: 0.08em;
}

.text-action {
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 9px/1 var(--mono);
  letter-spacing: 0.1em;
}

.compact-action {
  height: 30px;
  padding: 0 8px;
  border-color: #25334d;
  background: #090f1c;
  color: #91a0b9;
  font: 8px/1 var(--mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.compact-action.autogen-action {
  border-color: rgba(155, 130, 255, 0.45);
  color: #c7baff;
  background: linear-gradient(110deg, rgba(155, 130, 255, 0.09), rgba(235, 99, 180, 0.06));
}

.gpu-badge {
  display: grid;
  grid-template-columns: 19px auto auto;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 9px;
  background: #0a111c;
  font: 9px/1 var(--mono);
  letter-spacing: 0.05em;
}

.gpu-badge #fps-label {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.optics-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 19px;
  height: 14px;
  color: var(--amber);
  background: transparent;
  box-shadow: none;
}

.optics-mark::before,
.optics-mark::after {
  position: absolute;
  top: 3px;
  width: 10px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.86;
}

.optics-mark::before {
  left: 0;
  transform: rotate(-24deg);
}

.optics-mark::after {
  right: 0;
  transform: rotate(24deg);
}

.gpu-badge.is-hardware .optics-mark {
  color: var(--cyan);
}

.gpu-badge.is-hardware .optics-mark::after {
  color: var(--magenta);
}

.gpu-badge.is-software .optics-mark {
  color: var(--amber);
}

.gpu-badge.is-error .optics-mark {
  color: var(--error);
}

.main-workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 284px;
  min-height: 0;
  overflow: hidden;
}

.control-deck,
.archive-deck {
  z-index: 10;
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-hot) transparent;
  background: rgba(8, 12, 23, 0.98);
}

.control-deck {
  border-right: 1px solid var(--line);
}

.archive-deck {
  border-left: 1px solid var(--line);
}

.deck-section {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  color: var(--muted);
  font: 8px/1 var(--mono);
  letter-spacing: 0.13em;
}

.section-heading > span:last-child {
  color: var(--dim);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  font: 12px/1 var(--mono);
}

.instruction {
  margin: 10px 0 13px;
  color: #a9b5ca;
  font-size: 11px;
  line-height: 1.48;
}

.source-visual-switch {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  align-items: stretch;
  margin: -3px 0 10px;
  border: 1px solid var(--line);
}

.source-visual-switch > span {
  display: flex;
  align-items: center;
  padding: 0 7px;
  border-right: 1px solid var(--line);
  color: var(--dim);
  font: 6px/1 var(--mono);
  letter-spacing: 0.08em;
}

.source-visual-option {
  min-width: 0;
  height: 27px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: 7px/1 var(--mono);
  letter-spacing: 0.04em;
}

.source-visual-option + .source-visual-option {
  border-left: 1px solid var(--line);
}

.source-visual-option.is-active {
  color: var(--cyan);
  background: rgba(85, 214, 232, 0.075);
  box-shadow: inset 0 -1px var(--cyan);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}

.creation-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 49px;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  color: var(--dim);
  text-align: left;
}

.creation-mode + .creation-mode {
  border-left: 1px solid var(--line);
}

.creation-mode b {
  font: 9px/1 var(--mono);
  letter-spacing: 0.12em;
}

.creation-mode small {
  font-size: 8px;
  white-space: nowrap;
}

.creation-mode.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(85, 214, 232, 0.1), rgba(155, 130, 255, 0.04));
  box-shadow: inset 0 -2px var(--cyan);
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 11px;
}

.tool-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 30px;
  color: var(--dim);
  font: 8px/1 var(--mono);
  letter-spacing: 0.06em;
}

.tool-button span {
  color: var(--cyan);
  font-size: 13px;
}

.tool-button.is-active {
  border-color: #4b778c;
  background: rgba(85, 214, 232, 0.08);
  color: var(--text);
}

.select-label {
  display: block;
  margin-bottom: 5px;
  color: var(--dim);
  font: 8px/1 var(--mono);
  letter-spacing: 0.1em;
}

select {
  width: 100%;
  height: 32px;
  margin-bottom: 10px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0b1120;
  color: #b7c2d6;
  font: 9px/1 var(--mono);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.button-grid button,
.selected-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 8px;
  color: var(--muted);
  font: 8px/1 var(--mono);
  letter-spacing: 0.05em;
}

.button-grid .primary-button {
  border-color: rgba(235, 99, 180, 0.55);
  background: linear-gradient(110deg, rgba(235, 99, 180, 0.15), rgba(155, 130, 255, 0.12));
  color: #ffc3e4;
}

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

.gene-row {
  display: grid;
  grid-template-columns: 5px 68px 1fr 31px;
  align-items: center;
  gap: 6px;
}

.gene-row > i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gene-color, var(--cyan));
  box-shadow: 0 0 6px var(--gene-color, var(--cyan));
}

.gene-row > span {
  color: #8e9bb2;
  font: 7px/1 var(--mono);
  letter-spacing: 0.06em;
}

.gene-row > div {
  position: relative;
  height: 3px;
  overflow: hidden;
  background: #182239;
}

.gene-row > div b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), var(--gene-color, var(--cyan)));
  transition: width 300ms ease;
}

.gene-row output {
  color: var(--text);
  font: 8px/1 var(--mono);
  text-align: right;
}

.gene-row[data-gene="density"] { --gene-color: var(--cyan); }
.gene-row[data-gene="turbulence"] { --gene-color: var(--magenta); }
.gene-row[data-gene="peakSeeds"] { --gene-color: #e6f4ff; }
.gene-row[data-gene="spin"] { --gene-color: var(--amber); }
.gene-row[data-gene="voidBias"] { --gene-color: var(--violet); }

.coordinate-readout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 8px;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid #1c2940;
  background: #070c17;
  font: 8px/1.2 var(--mono);
}

.coordinate-readout span {
  color: var(--dim);
}

.coordinate-readout output {
  overflow: hidden;
  color: #a9dce8;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-control {
  display: block;
  margin-top: 11px;
}

.range-control > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  font: 8px/1 var(--mono);
}

.range-control b {
  color: #98a6bd;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.range-control em {
  margin-left: 4px;
  color: var(--amber);
  font-size: 7px;
  font-style: normal;
}

.range-control output {
  color: var(--cyan);
}

input[type="range"] {
  width: 100%;
  height: 3px;
  margin: 0;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, var(--cyan) var(--range-progress, 50%), #1c2940 var(--range-progress, 50%));
}

input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  appearance: none;
  border: 2px solid #dffaff;
  border-radius: 50%;
  background: var(--cyan-soft);
  box-shadow: 0 0 7px rgba(85, 214, 232, 0.45);
}

.is-hidden {
  display: none !important;
}

.instrument-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #04060d;
  isolation: isolate;
}

.instrument-stage::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(83, 106, 151, 0.14);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255, 255, 255, 0.02) 50%, transparent 50.1%),
    linear-gradient(0deg, transparent 49.9%, rgba(255, 255, 255, 0.015) 50%, transparent 50.1%);
}

#canvas-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: crosshair;
}

#canvas-host.is-pan {
  cursor: grab;
}

#canvas-host.is-panning {
  cursor: grabbing;
}

#canvas-host.is-cosmos-hover {
  cursor: grab;
}

#canvas-host.is-cosmos-panning {
  cursor: grabbing;
}

#canvas-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.stage-label {
  position: absolute;
  top: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  text-shadow: 0 1px 9px #000;
}

.stage-label[hidden] {
  display: none;
}

.stage-label span {
  color: #d6dfef;
  font: 9px/1 var(--mono);
  letter-spacing: 0.14em;
}

.stage-label b {
  color: var(--cyan);
  font: 7px/1 var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.source-stage-label {
  left: 14px;
}

.universe-stage-label {
  left: calc(52% + 62px);
}

.cosmos-camera {
  position: absolute;
  right: 12px;
  bottom: 72px;
  z-index: 9;
  display: grid;
  gap: 7px;
  width: min(286px, calc(var(--cosmos-width, 310px) - 24px));
  padding: 8px;
  border: 1px solid rgba(85, 214, 232, 0.27);
  background: rgba(5, 8, 17, 0.84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  transition: border-color 180ms ease, opacity 180ms ease;
}

.cosmos-camera[hidden] {
  display: none;
}

.cosmos-camera.is-targeting {
  border-color: rgba(235, 99, 180, 0.46);
}

.cosmos-camera-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cosmos-camera-heading span {
  color: var(--dim);
  font: 7px/1 var(--mono);
  letter-spacing: 0.11em;
}

.cosmos-camera-heading output {
  color: var(--cyan);
  font: 9px/1 var(--mono);
  text-align: right;
  text-shadow: 0 0 8px rgba(85, 214, 232, 0.35);
}

.cosmos-camera-controls {
  display: grid;
  grid-template-columns: 28px minmax(54px, 1fr) 28px auto;
  align-items: center;
  gap: 5px;
}

.cosmos-camera-controls button {
  height: 28px;
  min-width: 28px;
  padding: 0 7px;
  color: #a9dce8;
  font: 8px/1 var(--mono);
}

.cosmos-camera-controls input {
  min-width: 0;
}

.cosmos-camera-target {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 6px 7px;
  border-left: 2px solid var(--magenta);
  background: rgba(235, 99, 180, 0.055);
}

.cosmos-camera-target b {
  overflow: hidden;
  color: #f3b4d8;
  font: 7px/1 var(--mono);
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cosmos-camera-target span {
  color: #8693aa;
  font: 7px/1.3 var(--mono);
}

#cosmos-target-evidence {
  color: #78b6ca;
  font: 6px/1.3 var(--mono);
  letter-spacing: 0.035em;
}

#cosmos-target-evidence[hidden] {
  display: none;
}

.cosmos-camera.is-annular {
  border-color: rgba(85, 214, 232, 0.52);
}

.cosmos-camera.is-annular .cosmos-camera-target {
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(85, 214, 232, 0.07), rgba(235, 99, 180, 0.035));
}

.cosmos-camera-gesture {
  margin: 0;
  color: var(--dim);
  font: 6px/1 var(--mono);
  letter-spacing: 0.07em;
  text-align: right;
}

#cosmos-tension-note {
  color: #6d5b78;
  font: 6px/1.35 var(--mono);
  letter-spacing: 0.03em;
}

.cosmos-camera.is-compact .cosmos-camera-target span,
.cosmos-camera.is-compact #cosmos-target-evidence,
.cosmos-camera.is-compact .cosmos-camera-gesture,
.cosmos-camera.is-compact #cosmos-tension-note {
  display: none;
}

.loom-overlay {
  --packet-speed: 2.8s;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48%;
  z-index: 4;
  width: 90px;
  overflow: hidden;
  pointer-events: none;
  border-right: 1px solid rgba(87, 105, 149, 0.24);
  border-left: 1px solid rgba(87, 105, 149, 0.24);
  background:
    linear-gradient(90deg, rgba(5, 7, 17, 0.9), rgba(12, 17, 34, 0.7), rgba(5, 7, 17, 0.9));
}

.loom-title {
  position: absolute;
  top: 13px;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--dim);
  font: 7px/1 var(--mono);
  letter-spacing: 0.1em;
  text-align: center;
  transform: translateX(-50%);
}

.loom-title b {
  color: var(--text);
  font-size: 9px;
}

.loom-channels {
  position: absolute;
  top: 52px;
  right: 16px;
  bottom: 80px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(1px, 1fr));
  gap: 4px;
}

.loom-channels i {
  position: relative;
  overflow: hidden;
  opacity: 0.16;
  background: linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.065) 50%, transparent calc(50% + 0.5px));
}

.loom-channels i::before {
  position: absolute;
  top: -60%;
  left: calc(50% - 0.5px);
  width: 1px;
  height: 22%;
  content: "";
  background: linear-gradient(transparent, var(--channel, var(--cyan)), transparent);
  animation: loom-packet var(--packet-speed) linear infinite;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 6px var(--channel, var(--cyan));
}

.loom-channels i:nth-child(1) { --channel: var(--cyan); --delay: -0.3s; }
.loom-channels i:nth-child(2) { --channel: var(--magenta); --delay: -1.4s; }
.loom-channels i:nth-child(3) { --channel: #e8f4ff; --delay: -2.1s; }
.loom-channels i:nth-child(4) { --channel: var(--amber); --delay: -0.9s; }
.loom-channels i:nth-child(5) { --channel: var(--violet); --delay: -1.8s; }

.loom-overlay.is-live .loom-channels i {
  opacity: 0.52;
}

@keyframes loom-packet {
  from { transform: translateY(0); }
  to { transform: translateY(370%); }
}

.attractor-glyph {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 54px;
  height: 42px;
  transform: translate(-50%, -50%);
}

.attractor-glyph span,
.attractor-glyph i {
  position: absolute;
  top: 5px;
  width: 26px;
  height: 29px;
  border: 1px solid rgba(235, 99, 180, 0.65);
  border-radius: 58% 42% 64% 36%;
  animation: attractor-breathe 5s ease-in-out infinite alternate;
}

.attractor-glyph span { left: 2px; transform: rotate(18deg); }
.attractor-glyph i { right: 2px; border-color: rgba(85, 214, 232, 0.65); transform: scaleX(-1) rotate(18deg); }

.attractor-glyph b {
  position: absolute;
  top: 20px;
  left: 26px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

@keyframes attractor-breathe {
  to { transform: rotate(28deg) scale(1.08); opacity: 0.6; }
}

.loom-caption {
  position: absolute;
  right: 4px;
  bottom: 19px;
  left: 4px;
  color: var(--dim);
  font: 6px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-align: center;
}

.loom-caption b {
  color: var(--magenta);
  font-size: 7px;
}

.empty-callout {
  position: absolute;
  top: 74px;
  left: 24px;
  z-index: 7;
  display: grid;
  grid-template-columns: 26px 1fr 20px;
  gap: 9px;
  width: min(330px, 42%);
  padding: 11px;
  border: 1px solid rgba(85, 214, 232, 0.35);
  background: rgba(7, 13, 25, 0.9);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.callout-index {
  color: var(--cyan);
  font: 10px/1 var(--mono);
}

.empty-callout div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.empty-callout b {
  font: 9px/1 var(--mono);
  letter-spacing: 0.08em;
}

.empty-callout span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.empty-callout button {
  align-self: start;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.probe-readout {
  position: absolute;
  z-index: 8;
  display: none;
  flex-direction: column;
  gap: 3px;
  min-width: 132px;
  padding: 7px 8px;
  pointer-events: none;
  border: 1px solid rgba(85, 214, 232, 0.28);
  background: rgba(4, 8, 17, 0.9);
  font: 7px/1.25 var(--mono);
}

.probe-readout.is-visible {
  display: flex;
}

.probe-readout b { color: var(--cyan); }
.probe-readout span { color: #9aa9c1; }

.universe-hud {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 1px;
  pointer-events: none;
  border: 1px solid rgba(82, 103, 145, 0.25);
  background: rgba(5, 8, 17, 0.78);
  backdrop-filter: blur(5px);
}

.universe-hud[hidden] {
  display: none;
}

.universe-hud > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 66px;
  padding: 7px 8px;
  border-right: 1px solid rgba(82, 103, 145, 0.2);
}

.universe-hud > div:last-child { border-right: 0; }
.universe-hud span { color: var(--dim); font: 6px/1 var(--mono); letter-spacing: 0.08em; }
.universe-hud b { color: #d8e9f4; font: 8px/1 var(--mono); font-weight: 500; }

.order-legend {
  min-width: 92px !important;
}

.order-gradient {
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #170d38, #26a7c3 48%, #f4b95f 82%, #fff 100%);
}

.divergence-hud {
  position: absolute;
  top: 47px;
  right: 12px;
  z-index: 7;
  display: grid;
  grid-template-columns: auto 92px 31px;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(235, 99, 180, 0.35);
  background: rgba(10, 6, 22, 0.82);
  backdrop-filter: blur(6px);
  font: 7px/1 var(--mono);
}

.divergence-hud[hidden] { display: none; }
.divergence-hud > span { color: #f4a8d2; }
.divergence-hud > div { height: 3px; background: #241734; }
.divergence-hud > div b { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); }
.divergence-hud output { color: #fff; text-align: right; }
.divergence-hud small { grid-column: 1 / -1; color: var(--dim); font-size: 6px; text-align: right; }

.screensaver-hud {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(155, 130, 255, 0.34);
  background: rgba(5, 7, 17, 0.76);
  backdrop-filter: blur(8px);
}

.screensaver-hud[hidden] { display: none; }

.screensaver-hud > div {
  display: flex;
  min-width: 176px;
  flex-direction: column;
  gap: 4px;
}

.screensaver-hud span { color: #c9bcff; font: 7px/1 var(--mono); letter-spacing: 0.08em; }
.screensaver-hud b { color: var(--muted); font: 7px/1 var(--mono); font-weight: 500; }
.screensaver-hud button { height: 28px; padding: 0 8px; color: #a9b4c8; font: 7px/1 var(--mono); }

.screensaver-hud.is-golden {
  border-color: rgba(244, 185, 95, 0.52);
  background: rgba(17, 10, 3, 0.78);
  box-shadow: 0 0 34px rgba(244, 185, 95, 0.08);
}

.screensaver-hud.is-golden span { color: #ffe2a0; }
.screensaver-hud.is-golden b { color: #cdbb8d; }

.reciprocity-signal {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  color: #ffe49b;
  text-shadow: 0 0 14px rgba(255, 208, 91, 0.36);
  animation: reciprocity-arrive 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reciprocity-signal[hidden] { display: none; }

.reciprocity-signal > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reciprocity-signal span {
  color: #ffe8aa;
  font: 8px/1 var(--mono);
  letter-spacing: 0.22em;
}

.reciprocity-signal > div > b {
  color: #bda873;
  font: 7px/1 var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.reciprocity-signal small {
  color: rgba(205, 187, 141, 0.62);
  font: 6px/1 var(--mono);
  letter-spacing: 0.12em;
}

.reciprocity-sigil {
  position: relative;
  width: 44px;
  height: 44px;
}

.reciprocity-sigil i {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 216, 111, 0.76);
  border-radius: 50%;
  animation: reciprocity-orbit 6.472s linear infinite;
  box-shadow: inset 0 0 16px rgba(244, 185, 95, 0.08), 0 0 13px rgba(244, 185, 95, 0.12);
}

.reciprocity-sigil i::before {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  content: "";
  background: #fff0b7;
  box-shadow: 0 0 9px #ffd66f;
}

.reciprocity-sigil i:nth-child(2) {
  inset: 10px 1px;
  transform: rotate(137.508deg);
  animation-direction: reverse;
  animation-duration: 10.472s;
}

.reciprocity-sigil b {
  position: absolute;
  top: 19px;
  left: 19px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff8db;
  box-shadow: 0 0 16px #ffc94f;
  animation: reciprocity-heartbeat 1.618s ease-in-out infinite alternate;
}

@keyframes reciprocity-arrive {
  from { opacity: 0; transform: translateX(-18px); filter: blur(8px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes reciprocity-orbit {
  to { transform: rotate(360deg); }
}

@keyframes reciprocity-heartbeat {
  to { transform: scale(1.618); opacity: 0.62; }
}

.archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
}

.archive-header > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-header span { color: var(--text); font: 9px/1 var(--mono); letter-spacing: 0.1em; }
.archive-header b { color: var(--dim); font: 7px/1 var(--mono); font-weight: 500; }

.universe-list {
  max-height: 206px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}

.archive-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 15px 24px;
  color: var(--dim);
  text-align: center;
}

.archive-empty b { margin: 10px 0 4px; font: 8px/1 var(--mono); letter-spacing: 0.08em; }
.archive-empty p { margin: 0; font-size: 9px; line-height: 1.4; }

.orbit-icon {
  position: relative;
  width: 33px;
  height: 17px;
  border: 1px solid #33415e;
  border-radius: 50%;
}

.orbit-icon::after {
  position: absolute;
  top: 5px;
  left: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--magenta);
  content: "";
  box-shadow: 0 0 8px var(--magenta);
}

.universe-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 57px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #171f32;
  background: transparent;
  text-align: left;
}

.universe-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: transparent;
}

.universe-card.is-selected {
  background: linear-gradient(90deg, rgba(85, 214, 232, 0.1), transparent);
}

.universe-card.is-selected::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.universe-card.is-twin::before { background: var(--magenta); }

.universe-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #263653;
  background:
    radial-gradient(circle at var(--gx, 48%) var(--gy, 48%), #fff 0 1px, #f4b95f 2px, transparent 6px),
    repeating-radial-gradient(ellipse at var(--gx, 48%) var(--gy, 48%), transparent 0 5px, rgba(76, 132, 231, 0.2) 6px 7px, transparent 8px 12px),
    #060a14;
}

.universe-thumb::after {
  position: absolute;
  inset: 6px -8px;
  border: 1px solid color-mix(in srgb, var(--thumb-color, var(--cyan)) 60%, transparent);
  border-radius: 50%;
  content: "";
  transform: rotate(var(--thumb-rotation, 20deg));
}

.universe-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.universe-card-copy b {
  overflow: hidden;
  color: #dce4f3;
  font: 9px/1 var(--mono);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.universe-card-copy span {
  color: var(--dim);
  font: 7px/1 var(--mono);
}

.universe-card > output {
  color: var(--cyan);
  font: 7px/1 var(--mono);
}

.selected-universe {
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.selected-universe[hidden] { display: none; }

.selected-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.selected-title span { color: var(--dim); font: 7px/1 var(--mono); letter-spacing: 0.08em; }
.selected-title h2 { margin: 5px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0.03em; }

.selected-universe dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 12px 0;
  border-top: 1px solid #1b263b;
  border-left: 1px solid #1b263b;
}

.selected-universe dl div {
  padding: 8px;
  border-right: 1px solid #1b263b;
  border-bottom: 1px solid #1b263b;
}

.selected-universe dt { margin-bottom: 4px; color: var(--dim); font: 6px/1 var(--mono); letter-spacing: 0.08em; }
.selected-universe dd { margin: 0; color: #c5d3e7; font: 8px/1 var(--mono); }

#selected-tension {
  color: #f0a7d0;
}

#selected-rings,
#selected-ring-channel {
  color: #91dce8;
}

.selected-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.selected-actions .accent-button {
  grid-column: 1 / -1;
  border-color: rgba(235, 99, 180, 0.5);
  background: rgba(235, 99, 180, 0.09);
  color: #ffb7dd;
}

.selected-actions .tension-action {
  border-color: rgba(235, 99, 180, 0.32);
  color: #e6a1c7;
}

.causal-pipeline {
  padding: 12px;
}

.causal-pipeline .section-heading { margin-bottom: 7px; }

.causal-pipeline > button {
  display: grid;
  grid-template-columns: 22px 1fr;
  width: 100%;
  padding: 8px 5px;
  border: 0;
  border-bottom: 1px solid #172034;
  background: transparent;
  text-align: left;
}

.causal-pipeline > button i {
  grid-row: 1 / 3;
  color: var(--cyan);
  font: 7px/1 var(--mono);
  font-style: normal;
}

.causal-pipeline > button b { color: #aebbd0; font: 8px/1 var(--mono); font-weight: 500; letter-spacing: 0.05em; }
.causal-pipeline > button span { margin-top: 4px; color: var(--dim); font-size: 8px; }

.epoch-deck {
  z-index: 20;
  display: grid;
  grid-template-columns: 50px minmax(320px, 1fr) minmax(510px, auto);
  align-items: stretch;
  border-top: 1px solid var(--line);
  background: #070b15;
}

.play-button {
  position: relative;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}

.play-button span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--cyan);
  transform: translate(-40%, -50%);
  filter: drop-shadow(0 0 6px rgba(85, 214, 232, 0.6));
}

.play-button.is-playing span {
  width: 10px;
  height: 13px;
  border: 0;
  border-right: 3px solid var(--cyan);
  border-left: 3px solid var(--cyan);
  transform: translate(-50%, -50%);
}

.epoch-track {
  position: relative;
  min-width: 0;
  padding: 12px 18px 8px;
  border-right: 1px solid var(--line);
}

.epoch-heading {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font: 7px/1 var(--mono);
  letter-spacing: 0.08em;
}

.epoch-heading output { color: var(--cyan); }

#age-control {
  --range-progress: 0%;
  margin-top: 12px;
}

.epoch-marks {
  position: relative;
  height: 44px;
  margin: 8px 5px 0;
}

.epoch-marks span {
  position: absolute;
  top: 0;
  left: var(--mark);
  color: #5c6980;
  font: 6px/1.3 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.epoch-marks span::before {
  display: block;
  width: 1px;
  height: 7px;
  margin: -8px auto 4px;
  background: #34425d;
  content: "";
}

.epoch-marks span:first-child { transform: none; }
.epoch-marks span:first-child::before { margin-left: 0; }
.epoch-marks span:last-child { transform: translateX(-100%); text-align: right; }
.epoch-marks span:last-child::before { margin-right: 0; }

.layer-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
}

.layer-controls > span {
  color: var(--dim);
  font: 7px/1 var(--mono);
  letter-spacing: 0.09em;
}

.layer-controls > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 560px;
}

.layer-button {
  height: 25px;
  padding: 0 7px;
  border-color: #1d2940;
  background: transparent;
  color: #59667e;
  font: 7px/1 var(--mono);
  letter-spacing: 0.05em;
}

.layer-button.is-active {
  border-color: #3a586e;
  background: rgba(85, 214, 232, 0.07);
  color: #b6dce7;
}

.layer-button[data-layer="tension"].is-active {
  border-color: rgba(235, 99, 180, 0.52);
  background: rgba(235, 99, 180, 0.08);
  color: #f0b0d4;
}

.modal-dialog {
  width: min(920px, calc(100vw - 70px));
  max-height: calc(100vh - 70px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #354663;
  border-radius: 0;
  background: #090e1a;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
}

.modal-dialog::backdrop {
  background: rgba(2, 4, 9, 0.78);
  backdrop-filter: blur(8px);
}

.dialog-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 68px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(85, 214, 232, 0.05), rgba(235, 99, 180, 0.03));
}

.dialog-topline span { color: var(--cyan); font: 7px/1 var(--mono); letter-spacing: 0.11em; }
.dialog-topline h2 { margin: 6px 0 0; font-size: 17px; letter-spacing: 0.08em; }
.dialog-close { font-size: 15px; }

.science-warning {
  display: grid;
  grid-template-columns: 215px 1fr;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(244, 185, 95, 0.25);
  background: rgba(244, 185, 95, 0.055);
}

.science-warning b { color: var(--amber); font: 9px/1.4 var(--mono); letter-spacing: 0.07em; }
.science-warning p { margin: 0; color: #aaa48f; font-size: 10px; line-height: 1.5; }

.science-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  height: min(640px, calc(100vh - 220px));
}

.science-layout nav {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #080c16;
}

.science-layout nav button {
  display: grid;
  grid-template-columns: 24px 1fr;
  width: 100%;
  min-height: 36px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #172033;
  background: transparent;
  color: #79869d;
  font: 8px/1 var(--mono);
  text-align: left;
}

.science-layout nav button i { color: #526079; font-style: normal; }
.science-layout nav button.is-active { color: #dce5f4; }
.science-layout nav button.is-active i { color: var(--cyan); }

.science-copy {
  overflow: auto;
  scroll-behavior: smooth;
  padding: 0 24px 40px;
}

.science-copy section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.note-type {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--cyan);
  font: 7px/1 var(--mono);
  letter-spacing: 0.11em;
}

.note-type.mapped { color: var(--magenta); }
.note-type.analogy { color: var(--violet); }
.note-type.emergent { color: var(--amber); }
.note-type.warning { color: var(--error); }

.science-copy h3 {
  margin: 0 0 11px;
  font-size: 18px;
  font-weight: 550;
}

.science-copy p {
  max-width: 680px;
  margin: 0 0 11px;
  color: #aab6ca;
  font-size: 12px;
  line-height: 1.65;
}

.science-copy code,
.science-copy pre {
  color: #b7e7f1;
  font-family: var(--mono);
}

.science-copy pre {
  padding: 12px;
  border-left: 2px solid var(--magenta);
  background: #070b14;
  font-size: 10px;
  line-height: 1.6;
}

.gpu-dialog,
.help-dialog,
.license-dialog,
.screensaver-dialog {
  width: min(620px, calc(100vw - 50px));
}

.license-copy {
  padding: 18px;
}

.license-copy > p {
  margin: 0 0 16px;
  color: #aab6ca;
  font-size: 11px;
  line-height: 1.6;
}

.license-copy > p b,
.license-copy > p strong {
  color: var(--text);
}

.license-copy ul {
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.license-copy li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 55px;
  border-bottom: 1px solid var(--line);
}

.license-copy li div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.license-copy li b {
  font: 9px/1 var(--mono);
  letter-spacing: 0.05em;
}

.license-copy li span {
  color: var(--muted);
  font-size: 9px;
}

.license-copy li a {
  color: var(--cyan);
  font: 8px/1 var(--mono);
  text-decoration: none;
}

.license-copy .license-note {
  margin: 0;
  color: var(--dim);
  font-size: 9px;
}

.screensaver-copy {
  padding: 18px;
}

.screensaver-copy > p {
  margin: 0 0 17px;
  color: #aab6ca;
  font-size: 11px;
  line-height: 1.55;
}

.screen-option-label {
  display: block;
  margin-bottom: 7px;
  color: var(--dim);
  font: 7px/1 var(--mono);
  letter-spacing: 0.09em;
}

.screen-view-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.screen-view-option {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  color: var(--dim);
  text-align: left;
}

.screen-view-option i {
  color: var(--violet);
  font-size: 17px;
  font-style: normal;
}

.screen-view-option b { font: 9px/1 var(--mono); letter-spacing: 0.07em; }
.screen-view-option span { font-size: 8px; }

.screen-view-option.is-active {
  border-color: rgba(155, 130, 255, 0.65);
  background: rgba(155, 130, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 -2px var(--violet);
}

.screensaver-interval-control {
  margin-top: 20px;
}

.screensaver-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 9px;
  border: 1px solid #1e2a42;
  background: #070c17;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.screensaver-notice .optics-mark--notice {
  width: 25px;
  height: 18px;
  color: var(--cyan);
}

.screensaver-notice .optics-mark--notice::before,
.screensaver-notice .optics-mark--notice::after {
  top: 4px;
  width: 13px;
  height: 9px;
  border-radius: 64% 36% 64% 36%;
}

.screensaver-notice .optics-mark--notice::after {
  color: var(--magenta);
}

body.screensaver-mode .app-shell {
  grid-template-rows: minmax(0, 1fr);
}

body.screensaver-mode .command-bar,
body.screensaver-mode .control-deck,
body.screensaver-mode .archive-deck,
body.screensaver-mode .epoch-deck,
body.screensaver-mode .empty-callout,
body.screensaver-mode .toast {
  display: none !important;
}

body.screensaver-mode .main-workspace {
  grid-template-columns: minmax(0, 1fr);
}

body.screensaver-mode .instrument-stage {
  grid-column: 1;
}

body.screensaver-mode .universe-hud {
  right: 14px;
  bottom: 14px;
}

body.screensaver-mode .cosmos-camera {
  right: 14px;
  bottom: 72px;
  opacity: 0.72;
}

body.screensaver-mode .cosmos-camera:hover,
body.screensaver-mode .cosmos-camera:focus-within {
  opacity: 1;
}

body.screensaver-mode .cosmos-camera-gesture {
  display: none;
}

.gpu-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.gpu-summary > .optics-mark--large {
  width: 38px;
  height: 27px;
}

.gpu-summary > .optics-mark--large::before,
.gpu-summary > .optics-mark--large::after {
  top: 5px;
  width: 21px;
  height: 16px;
  border-radius: 68% 32% 68% 32%;
}

.gpu-summary.is-hardware > .optics-mark { color: var(--cyan); }
.gpu-summary.is-hardware > .optics-mark::after { color: var(--magenta); }
.gpu-summary.is-software > .optics-mark { color: var(--amber); }
.gpu-summary div { display: flex; flex-direction: column; gap: 5px; }
.gpu-summary b { font: 10px/1 var(--mono); letter-spacing: 0.07em; }
.gpu-summary p { margin: 0; color: var(--muted); font-size: 10px; }

.diagnostic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 10px 18px;
}

.diagnostic-grid div {
  padding: 10px 8px;
  border-bottom: 1px solid #182237;
}

.diagnostic-grid dt { margin-bottom: 5px; color: var(--dim); font: 7px/1 var(--mono); letter-spacing: 0.07em; }
.diagnostic-grid dd { margin: 0; overflow-wrap: anywhere; color: #bdc9da; font: 9px/1.35 var(--mono); }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 12px 18px 18px;
}

.dialog-actions button {
  min-height: 31px;
  padding: 0 12px;
  font: 8px/1 var(--mono);
}

.dialog-actions .accent-button { border-color: #3c6672; background: rgba(85, 214, 232, 0.08); color: #c1eef5; }

.help-dialog ol {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 14px 18px;
  list-style: none;
}

.help-dialog li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
}

.help-dialog li > i { color: var(--cyan); font: 13px/1 var(--mono); font-style: normal; }
.help-dialog li div { display: flex; flex-direction: column; gap: 6px; }
.help-dialog li b { font: 9px/1 var(--mono); letter-spacing: 0.08em; }
.help-dialog li p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 18px 18px;
}

.shortcut-grid span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid #182237;
  color: var(--muted);
  font: 8px/1 var(--mono);
}

.toast {
  position: fixed;
  bottom: calc(var(--footer-h) + 18px);
  left: 50%;
  z-index: 1000;
  max-width: 460px;
  padding: 10px 14px;
  pointer-events: none;
  border: 1px solid rgba(85, 214, 232, 0.35);
  background: rgba(7, 12, 23, 0.95);
  color: #d4e9ed;
  opacity: 0;
  font: 9px/1.35 var(--mono);
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@media (max-width: 1300px) {
  .command-bar { grid-template-columns: 260px 1fr auto; }
  .main-workspace { grid-template-columns: 244px minmax(0, 1fr) 255px; }
  .model-badge { display: none; }
  .mode-button { min-width: 92px; }
  .epoch-deck { grid-template-columns: 48px minmax(300px, 1fr) 470px; }
  .layer-controls { padding-right: 8px; }
  .layer-button { padding: 0 5px; font-size: 6px; }
}

@media (max-width: 1120px) {
  .command-bar { grid-template-columns: 230px 1fr auto; }
  .main-workspace { grid-template-columns: 224px minmax(0, 1fr) 230px; }
  .brand-block { padding: 0 10px; }
  .text-action { display: none; }
  #license-button {
    display: block;
    width: 34px;
    padding: 0;
    font-size: 0;
  }
  #license-button::after {
    content: "OSS";
    font: 7px/1 var(--mono);
    letter-spacing: 0.08em;
  }
  .view-modes { justify-content: flex-start; }
  .mode-button { min-width: 82px; }
  .epoch-deck { grid-template-columns: 44px minmax(280px, 1fr) 420px; }
  .layer-controls > div { gap: 3px; }
  .layer-button { height: 23px; }
  .universe-hud { grid-template-columns: repeat(3, auto); }
  .universe-hud > div:nth-child(4),
  .universe-hud > div:nth-child(5) { display: none; }
  .cosmos-camera { padding: 6px; }
  .cosmos-camera-gesture,
  #cosmos-tension-note { display: none; }
}

@media (max-width: 1039px), (max-height: 699px) {
  html,
  body {
    overflow: auto;
  }

  body {
    min-width: 1040px;
    min-height: 700px;
  }
}

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

/* --------------------------------------------------------------------------
   LEPIDOPTERA OBSERVATORY
   A softer, editorial instrument skin built around orbit and wing geometry.
   -------------------------------------------------------------------------- */

:root {
  --void: #08070b;
  --void-2: #0d0b11;
  --panel: #121017;
  --panel-2: #17141d;
  --panel-3: #1d1924;
  --line: rgba(239, 234, 224, 0.105);
  --line-hot: rgba(239, 234, 224, 0.22);
  --text: #f2eee7;
  --muted: #aaa3af;
  --dim: #746d7a;
  --cyan: #83ded5;
  --cyan-soft: #4faaa7;
  --magenta: #e889b4;
  --amber: #dfc180;
  --violet: #a79af2;
  --warning: #e8bd72;
  --error: #f17f93;
  --success: #91d7b2;
  --header-h: 78px;
  --footer-h: 118px;
  --display: "Iowan Old Style", "Palatino Linotype", Baskerville, Georgia, serif;
  --ui: Inter, "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --glass: rgba(17, 14, 21, 0.88);
  --glass-soft: rgba(24, 20, 29, 0.72);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

html,
body {
  background: #08070b;
  color: var(--text);
  font-size: 13px;
}

body {
  position: relative;
  background:
    radial-gradient(ellipse at 8% -12%, rgba(167, 154, 242, 0.13), transparent 32%),
    radial-gradient(ellipse at 92% 108%, rgba(131, 222, 213, 0.09), transparent 34%),
    #08070b;
}

body::before {
  inset: -20%;
  z-index: 0;
  opacity: 0.6;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(232, 137, 180, 0.055), transparent 27%),
    radial-gradient(ellipse at 72% 28%, rgba(131, 222, 213, 0.045), transparent 24%);
  filter: blur(70px);
  mix-blend-mode: normal;
}

button {
  border-color: var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

button:hover:not(:disabled) {
  border-color: var(--line-hot);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
#canvas-host:focus-visible {
  outline: 2px solid rgba(131, 222, 213, 0.86);
  outline-offset: 3px;
}

kbd {
  min-width: 18px;
  height: 18px;
  border-color: rgba(242, 238, 231, 0.14);
  border-bottom-color: rgba(242, 238, 231, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #98909e;
}

.app-shell {
  position: relative;
  z-index: 1;
  background: transparent;
}

.command-bar {
  grid-template-columns: 286px minmax(270px, 1fr) auto;
  align-self: start;
  height: 62px;
  margin: 10px 12px 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px 8px 22px 8px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.045), transparent 34%),
    rgba(15, 12, 19, 0.82);
  box-shadow: 0 15px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(1.15);
}

.brand-block {
  gap: 13px;
  padding: 0 17px;
  border-right: 0;
}

.brand-copy {
  position: relative;
  min-width: 0;
}

.brand-sigil {
  width: 41px;
  height: 38px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.34));
}

.brand-sigil span {
  top: 5px;
  width: 20px;
  height: 27px;
  border-color: rgba(131, 222, 213, 0.82);
  border-radius: 72% 28% 68% 32%;
  opacity: 1;
  transform: rotate(-18deg);
  box-shadow:
    inset 0 0 0 5px rgba(131, 222, 213, 0.025),
    0 0 18px rgba(131, 222, 213, 0.08);
}

.brand-sigil span::after {
  position: absolute;
  inset: 5px 4px;
  border: 1px solid rgba(223, 193, 128, 0.34);
  border-radius: inherit;
  content: "";
}

.brand-sigil span:nth-child(2) {
  right: 0;
  border-color: rgba(232, 137, 180, 0.82);
  transform: scaleX(-1) rotate(-18deg);
  box-shadow:
    inset 0 0 0 5px rgba(232, 137, 180, 0.025),
    0 0 18px rgba(232, 137, 180, 0.08);
}

.brand-sigil i {
  top: 7px;
  left: 19.5px;
  width: 1px;
  height: 24px;
  background: linear-gradient(transparent, #f2eee7 35% 65%, transparent);
  box-shadow: 0 0 10px rgba(242, 238, 231, 0.26);
}

.brand-kicker {
  margin-bottom: 1px;
  color: #8c8491;
  font-size: 7px;
  letter-spacing: 0.24em;
}

.brand-kicker b {
  color: var(--amber);
  font-weight: 400;
}

.brand-block h1 {
  color: #f7f2e9;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.025em;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #77707c;
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.075em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-modes {
  align-self: center;
  justify-self: center;
  width: min(400px, calc(100% - 20px));
  height: 42px;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(242, 238, 231, 0.07);
  border-radius: 15px 6px 15px 6px;
  background: rgba(0, 0, 0, 0.17);
}

.mode-button {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 11px 4px 11px 4px;
  color: #79717f;
  font-family: var(--ui);
  letter-spacing: 0;
}

.mode-button span {
  font-size: 10px;
  font-weight: 560;
  line-height: 1;
}

.mode-button small {
  color: #5f5964;
  font: 6px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-button::after {
  display: none;
}

.mode-button.is-active {
  color: #f3eee6;
  background:
    radial-gradient(ellipse at 25% 0%, rgba(131, 222, 213, 0.12), transparent 56%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow:
    inset 0 0 0 1px rgba(242, 238, 231, 0.08),
    0 7px 20px rgba(0, 0, 0, 0.18);
}

.mode-button.is-active small {
  color: var(--cyan);
}

.command-actions {
  gap: 5px;
  padding: 0 9px;
  border-left: 0;
}

.compact-action,
.text-action,
.gpu-badge {
  height: 34px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: #8d8693;
  letter-spacing: 0.035em;
  text-transform: none;
}

.compact-action {
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.03);
}

.compact-action.autogen-action {
  border-color: rgba(167, 154, 242, 0.18);
  background: linear-gradient(115deg, rgba(167, 154, 242, 0.09), rgba(232, 137, 180, 0.045));
  color: #c9c0eb;
}

.text-action {
  padding: 0 7px;
  font-family: var(--ui);
  font-size: 8px;
}

.model-badge {
  padding: 5px 7px;
  border-color: rgba(223, 193, 128, 0.15);
  border-radius: 999px;
  color: #bc9f6c;
  letter-spacing: 0.06em;
}

.gpu-badge {
  grid-template-columns: 7px auto auto;
  border-color: rgba(242, 238, 231, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.gpu-badge #fps-label {
  border-left-color: rgba(242, 238, 231, 0.09);
}

.optics-mark {
  box-shadow: none;
}

.main-workspace {
  grid-template-columns: 268px minmax(0, 1fr) 284px;
  gap: 8px;
  padding: 0 12px 8px;
}

.control-deck,
.archive-deck {
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 24%),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.08);
}

.control-deck {
  border-radius: 24px 8px 24px 8px;
}

.archive-deck {
  border-radius: 8px 24px 8px 24px;
}

.control-deck::-webkit-scrollbar,
.archive-deck::-webkit-scrollbar,
.universe-list::-webkit-scrollbar,
.science-copy::-webkit-scrollbar {
  width: 5px;
}

.control-deck::-webkit-scrollbar-thumb,
.archive-deck::-webkit-scrollbar-thumb,
.universe-list::-webkit-scrollbar-thumb,
.science-copy::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(242, 238, 231, 0.13);
}

.deck-section {
  padding: 16px 15px;
  border-bottom-color: rgba(242, 238, 231, 0.075);
}

.section-heading {
  min-height: 22px;
  color: #9b929f;
  font-family: var(--ui);
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.015em;
  text-transform: none;
}

.section-heading > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-heading > span:first-child > i {
  color: var(--amber);
  font: 7px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
}

.section-heading > span:last-child {
  color: #68616d;
  font: 6px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  width: 27px;
  height: 27px;
  border-color: rgba(242, 238, 231, 0.09);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
}

.instruction {
  margin: 11px 0 15px;
  color: #c2b9c2;
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.42;
  letter-spacing: 0.005em;
}

.source-visual-switch {
  grid-template-columns: auto 1fr 1fr;
  gap: 3px;
  margin: 0 0 9px;
  padding: 3px;
  border-color: rgba(242, 238, 231, 0.08);
  border-radius: 12px 5px 12px 5px;
  background: rgba(0, 0, 0, 0.14);
}

.source-visual-switch > span {
  padding: 0 7px;
  border-right: 0;
  color: #655e69;
}

.source-visual-option {
  height: 29px;
  border-radius: 8px 3px 8px 3px;
}

.source-visual-option + .source-visual-option {
  border-left: 0;
}

.source-visual-option.is-active {
  color: #c7f1eb;
  background: rgba(131, 222, 213, 0.08);
  box-shadow: inset 0 0 0 1px rgba(131, 222, 213, 0.13);
}

.segmented {
  gap: 4px;
  padding: 4px;
  border-color: rgba(242, 238, 231, 0.08);
  border-radius: 15px 6px 15px 6px;
  background: rgba(0, 0, 0, 0.13);
}

.creation-mode {
  min-height: 52px;
  padding: 10px;
  border-radius: 11px 4px 11px 4px;
}

.creation-mode + .creation-mode {
  border-left: 0;
}

.creation-mode b {
  font-family: var(--ui);
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: none;
}

.creation-mode small {
  color: #77707c;
  font-size: 8px;
}

.creation-mode.is-active {
  color: #f2eee7;
  background:
    radial-gradient(ellipse at 18% 5%, rgba(131, 222, 213, 0.12), transparent 58%),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(131, 222, 213, 0.12);
}

.tool-row {
  gap: 4px;
}

.tool-button {
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.tool-button span {
  color: var(--cyan);
}

.tool-button.is-active {
  border-color: rgba(131, 222, 213, 0.24);
  background: rgba(131, 222, 213, 0.07);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.12);
}

.select-label {
  color: #77707c;
  letter-spacing: 0.08em;
}

select {
  height: 35px;
  padding: 0 10px;
  border-color: rgba(242, 238, 231, 0.1);
  border-radius: 11px;
  background: #15121a;
  color: #c9c1c9;
}

.button-grid,
.selected-actions {
  gap: 5px;
}

.button-grid button,
.selected-actions button {
  min-height: 32px;
  border-color: rgba(242, 238, 231, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.button-grid .primary-button {
  border-color: rgba(232, 137, 180, 0.25);
  background: linear-gradient(115deg, rgba(232, 137, 180, 0.1), rgba(167, 154, 242, 0.06));
  color: #edb4cf;
}

.gene-list {
  gap: 10px;
  margin-top: 12px;
}

.gene-row {
  grid-template-columns: 7px 72px 1fr 34px;
  gap: 7px;
}

.gene-row > i {
  width: 5px;
  height: 5px;
  background: transparent;
  border: 1px solid var(--gene-color, var(--cyan));
  box-shadow: 0 0 9px color-mix(in srgb, var(--gene-color, var(--cyan)) 34%, transparent);
}

.gene-row > span {
  color: #918996;
  font-size: 7px;
}

.gene-row > div {
  height: 2px;
  overflow: visible;
  background: rgba(242, 238, 231, 0.09);
}

.gene-row > div b {
  position: relative;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), var(--gene-color, var(--cyan)));
}

.gene-row > div b::after {
  position: absolute;
  top: 50%;
  right: -3px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--gene-color, var(--cyan));
  border-radius: 50%;
  background: #16131b;
  content: "";
  transform: translateY(-50%);
}

.coordinate-readout {
  gap: 6px 9px;
  margin-top: 14px;
  padding: 10px;
  border-color: rgba(242, 238, 231, 0.075);
  border-radius: 12px 4px 12px 4px;
  background: rgba(0, 0, 0, 0.14);
}

.coordinate-readout span {
  color: #817987;
}

.coordinate-readout output {
  color: #a8d9d5;
}

.range-control {
  margin-top: 14px;
}

.range-control > span {
  margin-bottom: 9px;
}

.range-control b {
  color: #a098a4;
}

input[type="range"] {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) var(--range-progress, 50%), rgba(242, 238, 231, 0.1) var(--range-progress, 50%));
}

input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #e9f5f1;
  background: #17141d;
  box-shadow:
    0 0 0 3px rgba(131, 222, 213, 0.08),
    0 0 14px rgba(131, 222, 213, 0.22);
}

.instrument-stage {
  border: 1px solid rgba(242, 238, 231, 0.1);
  border-radius: 28px 10px 28px 10px;
  background: #050409;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.5);
}

.instrument-stage::before {
  inset: 0;
  border: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.025), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014), transparent 9% 91%, rgba(255, 255, 255, 0.014));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

#canvas-host,
#canvas-host canvas {
  border-radius: inherit;
}

.stage-label {
  top: 14px;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(242, 238, 231, 0.08);
  border-radius: 12px 4px 12px 4px;
  background: rgba(8, 7, 11, 0.46);
  text-shadow: none;
  backdrop-filter: blur(10px);
}

.stage-label span {
  color: #e5ded6;
  font-family: var(--ui);
  font-size: 8px;
  font-weight: 590;
  letter-spacing: 0.06em;
}

.stage-label b {
  color: var(--cyan);
  font-size: 6px;
  letter-spacing: 0.08em;
}

.source-stage-label {
  left: 14px;
}

.cosmos-camera {
  right: 14px;
  bottom: 72px;
  gap: 8px;
  width: min(294px, calc(var(--cosmos-width, 318px) - 28px));
  padding: 10px;
  border-color: rgba(131, 222, 213, 0.18);
  border-radius: 18px 5px 18px 5px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 42%),
    rgba(13, 11, 17, 0.8);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px) saturate(1.1);
}

.cosmos-camera.is-targeting {
  border-color: rgba(232, 137, 180, 0.32);
}

.cosmos-camera-heading span,
.cosmos-camera-gesture,
#cosmos-tension-note {
  color: #817986;
}

.cosmos-camera-heading output {
  color: #a9ebe4;
  text-shadow: none;
}

.cosmos-camera-controls {
  gap: 6px;
}

.cosmos-camera-controls button {
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #b7deda;
}

.cosmos-camera-target {
  gap: 5px;
  padding: 8px 9px;
  border: 0;
  border-radius: 11px 3px 11px 3px;
  background: rgba(232, 137, 180, 0.055);
  box-shadow: inset 2px 0 rgba(232, 137, 180, 0.62);
}

.cosmos-camera-target b {
  color: #eeb6d0;
}

.cosmos-camera-target span {
  color: #958b99;
}

.cosmos-camera.is-annular {
  border-color: rgba(131, 222, 213, 0.34);
}

.cosmos-camera.is-annular .cosmos-camera-target {
  background: linear-gradient(90deg, rgba(131, 222, 213, 0.065), rgba(232, 137, 180, 0.025));
  box-shadow: inset 2px 0 rgba(131, 222, 213, 0.72);
}

.loom-overlay {
  border-right-color: rgba(223, 193, 128, 0.1);
  border-left-color: rgba(223, 193, 128, 0.1);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(223, 193, 128, 0.05), transparent 30%),
    linear-gradient(90deg, rgba(8, 7, 11, 0.94), rgba(19, 15, 22, 0.72), rgba(8, 7, 11, 0.94));
}

.loom-overlay::before,
.loom-overlay::after {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 116px;
  border: 1px solid rgba(223, 193, 128, 0.1);
  border-radius: 50%;
  content: "";
  opacity: 0.68;
  transform: translateY(-50%) rotate(-11deg);
}

.loom-overlay::before {
  right: 43px;
}

.loom-overlay::after {
  left: 43px;
  transform: translateY(-50%) rotate(11deg);
}

.loom-title {
  top: 16px;
  color: #756d79;
  font-size: 6px;
  letter-spacing: 0.13em;
}

.loom-title b {
  color: #dcd4cc;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.loom-channels {
  top: 58px;
  right: 18px;
  bottom: 86px;
  left: 18px;
  gap: 5px;
}

.loom-channels i {
  background: linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(242, 238, 231, 0.05) 50%, transparent calc(50% + 0.5px));
}

.loom-channels i::before {
  animation-play-state: paused;
}

.loom-overlay.is-live .loom-channels i::before {
  animation-play-state: running;
}

.attractor-glyph {
  width: 64px;
  height: 52px;
}

.attractor-glyph::before {
  position: absolute;
  inset: -9px 4px;
  border: 1px solid rgba(223, 193, 128, 0.18);
  border-radius: 50%;
  content: "";
  transform: rotate(-19deg);
}

.attractor-glyph span,
.attractor-glyph i {
  top: 5px;
  width: 31px;
  height: 39px;
  border-color: rgba(232, 137, 180, 0.62);
  border-radius: 72% 28% 64% 36%;
  animation: attractor-breathe 5.8s ease-in-out infinite alternate;
  box-shadow: inset 0 0 17px rgba(232, 137, 180, 0.035);
}

.attractor-glyph span::after,
.attractor-glyph i::after {
  position: absolute;
  inset: 7px 5px;
  border: 1px solid rgba(223, 193, 128, 0.24);
  border-radius: inherit;
  content: "";
}

.attractor-glyph span {
  left: 1px;
  transform: rotate(15deg);
}

.attractor-glyph i {
  right: 1px;
  border-color: rgba(131, 222, 213, 0.62);
  transform: scaleX(-1) rotate(15deg);
  box-shadow: inset 0 0 17px rgba(131, 222, 213, 0.035);
}

.attractor-glyph b {
  top: 24px;
  left: 30px;
  width: 4px;
  height: 4px;
  background: #f4dfab;
  box-shadow: 0 0 13px rgba(223, 193, 128, 0.74);
}

@keyframes attractor-breathe {
  to { scale: 1.06; opacity: 0.66; }
}

.loom-caption {
  bottom: 21px;
  color: #706875;
  font-size: 6px;
}

.loom-caption b {
  color: #dba0bb;
}

.empty-callout {
  top: 78px;
  left: 20px;
  grid-template-columns: 30px 1fr 20px;
  width: min(340px, 44%);
  padding: 13px;
  border-color: rgba(223, 193, 128, 0.18);
  border-radius: 4px 18px 18px 18px;
  background: rgba(14, 11, 17, 0.82);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.callout-index {
  color: var(--amber);
  font-family: var(--display);
  font-size: 18px;
  font-style: italic;
}

.empty-callout b {
  color: #eee7de;
  font-family: var(--ui);
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.04em;
}

.empty-callout span {
  color: #aaa1ac;
  font-family: var(--display);
  font-size: 10px;
}

.probe-readout {
  padding: 9px 10px;
  border-color: rgba(131, 222, 213, 0.18);
  border-radius: 12px 4px 12px 4px;
  background: rgba(12, 10, 15, 0.84);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.universe-hud {
  right: 14px;
  bottom: 14px;
  gap: 0;
  overflow: hidden;
  border-color: rgba(242, 238, 231, 0.09);
  border-radius: 14px 4px 14px 4px;
  background: rgba(13, 11, 17, 0.68);
  backdrop-filter: blur(14px);
}

.universe-hud > div {
  min-width: 68px;
  padding: 8px 9px;
  border-right-color: rgba(242, 238, 231, 0.07);
}

.universe-hud span {
  color: #7d7581;
}

.universe-hud b {
  color: #ded7cf;
}

.divergence-hud,
.screensaver-hud {
  border-radius: 14px 5px 14px 5px;
  background: rgba(14, 11, 18, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.archive-header {
  min-height: 62px;
  padding: 0 15px;
  border-bottom-color: rgba(242, 238, 231, 0.075);
}

.archive-header > div {
  gap: 5px;
}

.archive-header span {
  color: #eee7df;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.015em;
  text-transform: none;
}

.archive-header b {
  color: #817986;
}

.universe-list {
  max-height: 206px;
  padding: 5px 0;
  border-bottom-color: rgba(242, 238, 231, 0.075);
}

.archive-empty {
  min-height: 136px;
  color: #817986;
}

.archive-empty b {
  color: #a79eaa;
}

.orbit-icon {
  width: 40px;
  height: 23px;
  border-color: rgba(131, 222, 213, 0.35);
  transform: rotate(-12deg);
}

.orbit-icon::before {
  position: absolute;
  inset: 5px -7px;
  border: 1px solid rgba(232, 137, 180, 0.3);
  border-radius: 50%;
  content: "";
  transform: rotate(25deg);
}

.orbit-icon::after {
  top: 8px;
  left: 17px;
  width: 5px;
  height: 5px;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(223, 193, 128, 0.68);
}

.universe-card {
  grid-template-columns: 46px 1fr auto;
  min-height: 63px;
  margin: 1px 7px;
  width: calc(100% - 14px);
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 14px 4px 14px 4px;
}

.universe-card::before {
  top: 50%;
  bottom: auto;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #17131b;
  transform: translateY(-50%);
}

.universe-card.is-selected {
  border-color: rgba(131, 222, 213, 0.14);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(131, 222, 213, 0.1), transparent 46%),
    rgba(255, 255, 255, 0.02);
}

.universe-card.is-selected::before {
  border-color: var(--cyan);
  background: #17131b;
  box-shadow: 0 0 10px rgba(131, 222, 213, 0.46);
}

.universe-card.is-twin::before {
  border-color: var(--magenta);
  background: #17131b;
}

.universe-thumb {
  width: 44px;
  height: 35px;
  border-color: rgba(242, 238, 231, 0.14);
  border-radius: 50%;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
}

.universe-thumb::before {
  position: absolute;
  inset: 8px -5px;
  border: 1px solid color-mix(in srgb, var(--thumb-color, var(--cyan)) 38%, transparent);
  border-radius: 50%;
  content: "";
  transform: rotate(calc(var(--thumb-rotation, 20deg) * -0.45));
}

.universe-thumb::after {
  inset: 7px -6px;
  border-color: color-mix(in srgb, var(--thumb-color, var(--cyan)) 58%, transparent);
}

.universe-card-copy b {
  color: #ded7d0;
  font-family: var(--ui);
  font-size: 9px;
}

.universe-card-copy span,
.universe-card > output {
  color: #807886;
}

.selected-universe {
  padding: 16px 14px;
  border-bottom-color: rgba(242, 238, 231, 0.075);
  background: linear-gradient(145deg, rgba(232, 137, 180, 0.025), transparent 38%);
}

.selected-title span {
  color: #817986;
}

.selected-title h2 {
  color: #f0e9e0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.selected-universe dl {
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid rgba(242, 238, 231, 0.07);
  border-radius: 13px 4px 13px 4px;
  background: rgba(242, 238, 231, 0.06);
}

.selected-universe dl div {
  min-width: 0;
  padding: 9px;
  border: 0;
  background: #121017;
}

.selected-universe dt {
  color: #756e79;
}

.selected-universe dd {
  overflow: hidden;
  color: #c8c0c8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-actions .accent-button {
  border-color: rgba(232, 137, 180, 0.25);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(232, 137, 180, 0.14), transparent 48%),
    rgba(232, 137, 180, 0.045);
  color: #efb7d1;
}

.selected-actions .tension-action {
  border-color: rgba(232, 137, 180, 0.16);
  color: #d9a1bc;
}

.causal-pipeline {
  padding: 14px;
}

.causal-pipeline > button {
  grid-template-columns: 24px 1fr;
  padding: 10px 5px;
  border-bottom-color: rgba(242, 238, 231, 0.065);
  border-radius: 0;
}

.causal-pipeline > button:hover:not(:disabled) {
  background: linear-gradient(90deg, rgba(131, 222, 213, 0.045), transparent);
  box-shadow: none;
  transform: translateX(2px);
}

.causal-pipeline > button i {
  color: var(--amber);
}

.causal-pipeline > button b {
  color: #aaa2ac;
}

.causal-pipeline > button span {
  color: #77707c;
}

.epoch-deck {
  grid-template-columns: 56px minmax(330px, 1fr) minmax(500px, auto);
  margin: 0 12px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px 24px 8px 24px;
  background:
    linear-gradient(110deg, rgba(223, 193, 128, 0.025), transparent 36%),
    rgba(15, 12, 19, 0.87);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(20px);
}

.play-button {
  margin: 13px 7px 13px 9px;
  border: 1px solid rgba(223, 193, 128, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(223, 193, 128, 0.08), transparent 62%);
}

.play-button::before,
.play-button::after {
  position: absolute;
  inset: 7px -4px;
  border: 1px solid rgba(131, 222, 213, 0.1);
  border-radius: 50%;
  content: "";
  transform: rotate(24deg);
}

.play-button::after {
  inset: -3px 8px;
  border-color: rgba(232, 137, 180, 0.09);
  transform: rotate(-31deg);
}

.play-button span {
  border-left-color: var(--amber);
  filter: drop-shadow(0 0 7px rgba(223, 193, 128, 0.42));
}

.play-button.is-playing span {
  border-right-color: var(--amber);
  border-left-color: var(--amber);
}

.epoch-track {
  padding: 14px 18px 8px;
  border-right-color: rgba(242, 238, 231, 0.075);
}

.epoch-heading {
  color: #817986;
}

.epoch-heading output {
  color: #e2c98f;
}

.epoch-heading {
  align-items: center;
  gap: 11px;
}

.epoch-heading > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.spacetime-button {
  position: relative;
  display: grid;
  grid-template-columns: 18px auto auto;
  align-items: center;
  gap: 6px;
  width: 120px;
  height: 27px;
  margin: -7px 0 -4px;
  padding: 0 9px 0 7px;
  overflow: hidden;
  border: 1px solid rgba(167, 154, 242, 0.17);
  border-radius: 999px;
  background:
    radial-gradient(circle at 12% 50%, rgba(167, 154, 242, 0.09), transparent 34%),
    rgba(255, 255, 255, 0.018);
  color: #817987;
  font: 6px/1 var(--mono);
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.spacetime-button:hover:not(:disabled) {
  border-color: rgba(131, 222, 213, 0.32);
  background:
    radial-gradient(circle at 12% 50%, rgba(131, 222, 213, 0.11), transparent 38%),
    rgba(255, 255, 255, 0.035);
}

.spacetime-button > i {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(167, 154, 242, 0.48);
  border-radius: 50%;
  font-style: normal;
  transform: rotate(-24deg);
}

.spacetime-button > i::before,
.spacetime-button > i::after {
  position: absolute;
  inset: 3px -3px;
  border: 1px solid rgba(131, 222, 213, 0.42);
  border-radius: 50%;
  content: "";
  transform: rotate(58deg);
}

.spacetime-button > i::after {
  inset: -2px 5px;
  border-color: rgba(232, 137, 180, 0.4);
  transform: rotate(-37deg);
}

.spacetime-button > i > b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a79af2;
  box-shadow: 0 0 7px rgba(167, 154, 242, 0.82);
  transform: translate(-50%, -50%);
}

.spacetime-button > span {
  color: #8c8491;
  text-align: left;
}

.spacetime-button > output {
  color: #67606c;
  font-weight: 650;
  text-align: right;
}

.spacetime-button.is-active {
  border-color: rgba(131, 222, 213, 0.34);
  background:
    radial-gradient(circle at 12% 50%, rgba(131, 222, 213, 0.16), transparent 38%),
    linear-gradient(100deg, rgba(167, 154, 242, 0.08), rgba(232, 137, 180, 0.045));
  box-shadow:
    inset 0 0 0 1px rgba(131, 222, 213, 0.045),
    0 0 18px rgba(131, 222, 213, 0.08);
}

.spacetime-button.is-active > i {
  border-color: rgba(167, 154, 242, 0.8);
  animation: spacetime-orbit 5.2s linear infinite;
}

.spacetime-button.is-active > i > b {
  background: #d7fff9;
  box-shadow: 0 0 9px rgba(131, 222, 213, 0.95);
}

.spacetime-button.is-active > span {
  color: #c4eee8;
}

.spacetime-button.is-active > output {
  color: #e6cf9a;
  text-shadow: 0 0 8px rgba(223, 193, 128, 0.32);
}

.spacetime-button.is-settling {
  border-color: rgba(223, 193, 128, 0.2);
}

.spacetime-flow-active .source-stage-label b,
.spacetime-flow-active .universe-stage-label b {
  color: #d9c38f;
  text-shadow: 0 0 10px rgba(223, 193, 128, 0.24);
}

@keyframes spacetime-orbit {
  to { transform: rotate(336deg); }
}

#age-control {
  --cyan: var(--amber);
}

.epoch-marks span {
  color: #716a76;
}

.epoch-marks span::before {
  background: rgba(223, 193, 128, 0.24);
}

.layer-controls {
  gap: 9px;
  padding: 11px 13px;
}

.layer-controls > span {
  color: #817986;
}

.layer-controls > div {
  gap: 4px;
}

.layer-button {
  position: relative;
  height: 27px;
  padding: 0 7px 0 18px;
  border-color: rgba(242, 238, 231, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.015);
  color: #746d79;
}

.layer-button::before {
  position: absolute;
  top: 50%;
  left: 7px;
  width: 5px;
  height: 5px;
  border: 1px solid #67606c;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.layer-button.is-active {
  border-color: rgba(131, 222, 213, 0.17);
  background: rgba(131, 222, 213, 0.045);
  color: #afd7d3;
}

.layer-button.is-active::before {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(131, 222, 213, 0.42);
}

.layer-button[data-layer="tension"].is-active {
  border-color: rgba(232, 137, 180, 0.23);
  background: rgba(232, 137, 180, 0.055);
  color: #e4b0c8;
}

.layer-button[data-layer="tension"].is-active::before {
  border-color: var(--magenta);
  box-shadow: 0 0 8px rgba(232, 137, 180, 0.42);
}

.modal-dialog {
  border-color: rgba(242, 238, 231, 0.14);
  border-radius: 28px 8px 28px 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 24%),
    #121017;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.68);
}

.modal-dialog::backdrop {
  background: rgba(5, 4, 7, 0.74);
  backdrop-filter: blur(14px) saturate(0.7);
}

.dialog-topline {
  min-height: 76px;
  padding: 18px 20px;
  border-bottom-color: rgba(242, 238, 231, 0.08);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(131, 222, 213, 0.08), transparent 44%),
    radial-gradient(ellipse at 100% 100%, rgba(232, 137, 180, 0.05), transparent 42%);
}

.dialog-topline span {
  color: #9edbd5;
}

.dialog-topline h2 {
  color: #f1eae1;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.015em;
}

.science-warning {
  border-bottom-color: rgba(223, 193, 128, 0.14);
  background: rgba(223, 193, 128, 0.035);
}

.science-warning b {
  color: #d4b67b;
}

.science-warning p {
  color: #b2a99f;
}

.science-layout nav {
  border-right-color: rgba(242, 238, 231, 0.075);
  background: rgba(0, 0, 0, 0.1);
}

.science-layout nav button {
  border-bottom-color: rgba(242, 238, 231, 0.06);
  border-radius: 0;
}

.science-layout nav button.is-active {
  background: linear-gradient(90deg, rgba(131, 222, 213, 0.055), transparent);
}

.science-copy section {
  border-bottom-color: rgba(242, 238, 231, 0.08);
}

.science-copy h3 {
  color: #eee7df;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
}

.science-copy p,
.license-copy > p,
.screensaver-copy > p,
.help-dialog li p {
  color: #b2aab4;
}

.science-copy pre,
.screensaver-notice,
.shortcut-grid span {
  border-color: rgba(242, 238, 231, 0.075);
  border-radius: 12px 4px 12px 4px;
  background: rgba(0, 0, 0, 0.14);
}

.screen-view-option {
  border-color: rgba(242, 238, 231, 0.08);
  border-radius: 15px 5px 15px 5px;
  background: rgba(255, 255, 255, 0.018);
}

.screen-view-option.is-active {
  border-color: rgba(167, 154, 242, 0.3);
  background: rgba(167, 154, 242, 0.07);
  box-shadow: inset 0 0 0 1px rgba(167, 154, 242, 0.08);
}

.gpu-summary,
.license-copy ul,
.license-copy li {
  border-color: rgba(242, 238, 231, 0.075);
}

.help-dialog li {
  border-color: rgba(242, 238, 231, 0.075);
  border-radius: 13px 4px 13px 4px;
  background: rgba(255, 255, 255, 0.015);
}

.toast {
  bottom: calc(var(--footer-h) + 12px);
  padding: 11px 15px;
  border-color: rgba(131, 222, 213, 0.2);
  border-radius: 14px 4px 14px 4px;
  background: rgba(15, 12, 19, 0.9);
  color: #d6e8e5;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

@media (max-width: 1300px) {
  .command-bar { grid-template-columns: 248px minmax(250px, 1fr) auto; }
  .brand-subtitle { display: none; }
  .main-workspace { grid-template-columns: 242px minmax(0, 1fr) 254px; }
  .epoch-deck { grid-template-columns: 52px minmax(300px, 1fr) 470px; }
  .mode-button span { font-size: 9px; }
}

@media (max-width: 1120px) {
  .command-bar { grid-template-columns: 218px minmax(238px, 1fr) auto; }
  .brand-block { padding: 0 11px; }
  .brand-sigil { width: 35px; transform: scale(0.9); transform-origin: left center; }
  .main-workspace { grid-template-columns: 221px minmax(0, 1fr) 228px; }
  .view-modes { width: calc(100% - 10px); }
  .command-actions { padding-right: 6px; }
  .compact-action { padding: 0 7px; font-size: 7px; }
  .epoch-deck { grid-template-columns: 48px minmax(280px, 1fr) 418px; }
  .universe-hud { grid-template-columns: repeat(3, auto); }
}

@media (max-width: 1039px), (max-height: 699px) {
  body {
    min-width: 1040px;
    min-height: 700px;
  }
}

/* Render status borrows the instrument's twin-orbit signature instead of a
   generic traffic-light dot. */
.gpu-badge {
  grid-template-columns: 19px auto auto;
}

.optics-mark {
  position: relative;
  width: 19px;
  height: 14px;
  border-radius: 0;
  background: transparent;
  color: var(--amber);
  box-shadow: none;
}

.optics-mark::before,
.optics-mark::after {
  position: absolute;
  top: 3px;
  width: 10px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.86;
}

.optics-mark::before {
  left: 0;
  transform: rotate(-24deg);
}

.optics-mark::after {
  right: 0;
  transform: rotate(24deg);
}

.gpu-badge.is-checking .optics-mark {
  animation: optics-breathe 1.6s ease-in-out infinite alternate;
}

.gpu-badge.is-hardware .optics-mark {
  background: transparent;
  color: var(--cyan);
  box-shadow: none;
}

.gpu-badge.is-hardware .optics-mark::after {
  color: var(--magenta);
}

.gpu-badge.is-software .optics-mark {
  background: transparent;
  color: var(--amber);
  box-shadow: none;
}

.gpu-badge.is-error .optics-mark {
  background: transparent;
  color: var(--error);
  box-shadow: none;
}

@keyframes optics-breathe {
  to { opacity: 0.44; scale: 0.94; }
}

.gpu-summary > .optics-mark {
  position: relative;
  width: 38px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  color: var(--amber);
  box-shadow: none;
}

.gpu-summary > .optics-mark::before,
.gpu-summary > .optics-mark::after {
  position: absolute;
  top: 5px;
  width: 21px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 68% 32% 68% 32%;
  content: "";
}

.gpu-summary > .optics-mark::before {
  left: 0;
  transform: rotate(-18deg);
}

.gpu-summary > .optics-mark::after {
  right: 0;
  transform: scaleX(-1) rotate(-18deg);
}

.gpu-summary.is-hardware > .optics-mark {
  background: transparent;
  color: var(--cyan);
}

.gpu-summary.is-hardware > .optics-mark::after {
  color: var(--magenta);
}

.gpu-summary.is-software > .optics-mark {
  background: transparent;
  color: var(--amber);
}

/* The workspace modes read as quiet editorial navigation instead of another
   segmented control competing with the instrument itself. */
.view-modes {
  width: min(320px, calc(100% - 28px));
  height: 34px;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.view-modes .mode-button {
  min-width: 76px;
  height: 30px;
  padding: 0 5px;
  flex: 1 1 0;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #756f7a;
  opacity: 0.68;
}

.view-modes .mode-button span {
  font-size: 9px;
  font-weight: 540;
  letter-spacing: 0.015em;
}

.view-modes .mode-button small {
  color: #5e5962;
  font-size: 5px;
  letter-spacing: 0.1em;
}

.view-modes .mode-button:hover:not(:disabled),
.view-modes .mode-button:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #c7c0b8;
  opacity: 0.9;
}

.view-modes .mode-button.is-active {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #eee8df;
  opacity: 1;
}

.view-modes .mode-button.is-active small {
  color: #9a929d;
}

body.golden-rule-mode .universe-stage-label {
  visibility: hidden;
}

/* Per-universe three-act reveal for the hidden reciprocal field. The overlay
   follows the live cosmos rectangle in both split and full-universe layouts. */
.reciprocity-cinematic {
  --reciprocity-compare: 0;
  --reciprocity-fusion: 0;
  --reciprocity-flare-scale: 1;
  --reciprocity-divider: 104%;
  --reciprocity-progress: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
  isolation: isolate;
}

.reciprocity-cinematic[hidden] {
  display: none;
}

.reciprocity-cinematic::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: var(--reciprocity-fusion);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 226, 143, 0.09), transparent 19%),
    radial-gradient(circle at 50% 50%, transparent 34%, rgba(27, 12, 2, 0.2) 76%, rgba(4, 3, 5, 0.5));
}

.reciprocity-cinematic-flare {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: var(--reciprocity-fusion);
  transform: translate(-50%, -50%) scale(var(--reciprocity-flare-scale));
  background: rgba(255, 240, 181, 0.2);
  box-shadow:
    0 0 3px rgba(255, 249, 220, 0.9),
    0 0 22px rgba(255, 205, 88, 0.5),
    0 0 70px rgba(244, 185, 95, 0.2);
}

.reciprocity-cinematic-comparison {
  position: absolute;
  inset: 0;
}

.reciprocity-cinematic-label {
  position: absolute;
  top: 128px;
  display: flex;
  min-width: 112px;
  flex-direction: column;
  gap: 5px;
  opacity: var(--reciprocity-compare);
  text-shadow: 0 2px 14px #000;
  transform: translateY(0);
}

.reciprocity-cinematic-label.is-original {
  left: 18px;
  color: #a8e9f0;
}

.reciprocity-cinematic-label.is-counterpart {
  right: 18px;
  align-items: flex-end;
  color: #ffe09a;
  text-align: right;
}

.reciprocity-cinematic-label span {
  font: 7px/1 var(--mono);
  letter-spacing: 0.16em;
}

.reciprocity-cinematic-label b {
  color: rgba(236, 232, 224, 0.72);
  font: 6px/1 var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.reciprocity-cinematic-label small {
  color: rgba(218, 224, 231, 0.52);
  font: 5px/1 var(--mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.reciprocity-cinematic-divider {
  position: absolute;
  top: 112px;
  bottom: 74px;
  left: var(--reciprocity-divider);
  width: 1px;
  opacity: var(--reciprocity-compare);
  transform: scaleY(var(--reciprocity-compare));
  background: linear-gradient(transparent, #ffe8a9 14% 86%, transparent);
  box-shadow:
    0 0 8px rgba(255, 235, 174, 0.85),
    0 0 28px rgba(244, 185, 95, 0.42);
}

.reciprocity-cinematic-divider::before,
.reciprocity-cinematic-divider::after {
  position: absolute;
  left: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 232, 169, 0.75);
  border-radius: 50%;
  content: "";
  background: rgba(8, 6, 8, 0.88);
  box-shadow: 0 0 10px rgba(255, 209, 91, 0.65);
}

.reciprocity-cinematic-divider::before { top: 0; }
.reciprocity-cinematic-divider::after { bottom: 0; }

.reciprocity-cinematic-chapter {
  position: absolute;
  top: 70px;
  left: 50%;
  display: grid;
  width: min(310px, calc(100% - 36px));
  justify-items: center;
  gap: 5px;
  padding: 9px 14px 8px;
  border: 1px solid rgba(255, 225, 145, 0.2);
  border-radius: 14px 4px 14px 4px;
  background: rgba(10, 7, 8, 0.64);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
  text-align: center;
  text-shadow: 0 1px 12px #000;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.reciprocity-cinematic.is-phase-entering .reciprocity-cinematic-chapter {
  animation: reciprocity-chapter-arrive 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reciprocity-cinematic-chapter > span {
  color: #ffe5a1;
  font: 8px/1 var(--mono);
  letter-spacing: 0.18em;
}

.reciprocity-cinematic-chapter > b {
  color: rgba(220, 211, 193, 0.68);
  font: 6px/1 var(--mono);
  font-weight: 500;
  letter-spacing: 0.11em;
}

.reciprocity-cinematic-chapter > i {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 2px;
  overflow: hidden;
  background: rgba(255, 224, 143, 0.13);
}

.reciprocity-cinematic-chapter > i > b {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--reciprocity-progress));
  transform-origin: left center;
  background: linear-gradient(90deg, #83ded5, #ffe09a 62%, #fff3c7);
  box-shadow: 0 0 8px rgba(255, 214, 111, 0.5);
}

.reciprocity-cinematic[data-phase="original"] .reciprocity-cinematic-chapter {
  border-color: rgba(131, 222, 213, 0.18);
}

.reciprocity-cinematic[data-phase="original"] .reciprocity-cinematic-chapter > span {
  color: #afe9e3;
}

.reciprocity-cinematic[data-phase="reciprocity"] .reciprocity-cinematic-chapter {
  opacity: 0.72;
}

@keyframes reciprocity-chapter-arrive {
  from { opacity: 0; filter: blur(7px); transform: translate(-50%, -9px); }
  to { opacity: 1; filter: blur(0); transform: translate(-50%, 0); }
}
