.splat-page {
  --invented: #a886ff;
  --observed: #79f5e6;
}

.splat-lab-grid {
  height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: 288px minmax(420px, 1fr) 338px;
  overflow: hidden;
}

.splat-source-panel {
  border-right: 1px solid var(--line);
}

.splat-control-panel {
  border-left: 1px solid var(--line);
}

.depth-file-card {
  border-color: rgba(173, 154, 255, 0.15);
}

.pair-state {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #07090a;
}

.pair-state.ready {
  border-color: rgba(121, 245, 230, 0.18);
  background: rgba(121, 245, 230, 0.035);
}

.pair-state.warning {
  border-color: rgba(255, 183, 93, 0.22);
}

.pair-light {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #424949;
}

.pair-state.ready .pair-light {
  background: var(--observed);
  box-shadow: 0 0 10px rgba(121, 245, 230, 0.55);
}

.pair-state.warning .pair-light {
  background: var(--warning);
}

.pair-state > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pair-state small,
.pair-state strong {
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pair-state small {
  color: var(--faint);
  font-size: 6.5px;
  letter-spacing: 0.12em;
}

.pair-state strong {
  color: #a5afad;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.capture-section .range-control {
  margin-top: 13px;
}

.capture-toggle {
  min-height: 34px;
  justify-content: flex-start;
  margin-top: 10px;
  color: #7f8988;
  font-size: 8px;
}

.build-section {
  display: grid;
  gap: 10px;
}

.build-button,
.cancel-button,
.import-button {
  width: 100%;
  justify-content: center;
}

.secondary-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: #949e9c;
  background: rgba(255, 255, 255, 0.018);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 160ms ease;
}

.secondary-button:hover {
  border-color: rgba(143, 247, 235, 0.25);
  color: #d4dedc;
  background: rgba(143, 247, 235, 0.04);
}

.cancel-button {
  border-color: rgba(255, 93, 97, 0.18);
  color: #d89a9c;
}

.build-progress {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #07090a;
}

.build-progress > span {
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: #252b2b;
}

.build-progress i {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--signal), var(--invented));
  box-shadow: 0 0 10px rgba(143, 247, 235, 0.45);
  transition: width 150ms ease;
}

.build-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 7px;
}

.build-progress strong {
  color: #8d9796;
  font-weight: 500;
}

.build-progress small {
  color: var(--signal);
  font-size: inherit;
}

.local-copy {
  margin: 0;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.55;
}

.import-button {
  position: relative;
  overflow: hidden;
}

.import-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.splat-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 43px minmax(280px, 1fr) 31px 66px;
  background: #030405;
}

.splat-stage-toolbar {
  border-bottom: 1px solid var(--line);
}

.splat-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 46%, rgba(107, 221, 210, 0.055), transparent 46%),
    #030405;
}

.splat-stage canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.splat-grid-floor {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.8;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0, rgba(0, 0, 0, 0.72) 48%, transparent 92%);
}

.splat-empty-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.splat-empty-state.hidden {
  opacity: 0;
  transform: translateY(7px);
}

.splat-empty-state h1 {
  margin: 0;
  color: #eef5f4;
  font-size: clamp(25px, 3.2vw, 44px);
  font-weight: 330;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.splat-empty-state p {
  max-width: 475px;
  margin: 17px 0 22px;
  color: #737d7c;
  font-size: 10.5px;
  line-height: 1.65;
}

.empty-diagram {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #596160;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.empty-diagram span,
.empty-diagram strong {
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 500;
}

.empty-diagram strong {
  border-color: rgba(168, 134, 255, 0.25);
  color: #bba7ef;
  background: rgba(168, 134, 255, 0.05);
}

.viewer-overlay {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #67706f;
  background: rgba(6, 8, 9, 0.76);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.viewer-overlay.top-left {
  top: 14px;
  left: 14px;
  gap: 14px;
  padding: 8px 10px;
}

.viewer-overlay > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.viewer-overlay strong {
  color: #afb8b6;
  font-weight: 500;
}

.observed-dot,
.invented-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.observed-dot {
  background: var(--observed);
  box-shadow: 0 0 7px rgba(121, 245, 230, 0.6);
}

.invented-dot {
  background: var(--invented);
  box-shadow: 0 0 7px rgba(168, 134, 255, 0.6);
}

.viewer-hint {
  left: 14px;
  bottom: 14px;
  padding: 7px 9px;
}

.axis-gizmo {
  position: absolute;
  right: 20px;
  bottom: 22px;
  z-index: 4;
  width: 42px;
  height: 42px;
  color: #697271;
  font-family: var(--mono);
  font-size: 6px;
  pointer-events: none;
}

.axis-gizmo i {
  position: absolute;
  left: 20px;
  bottom: 10px;
  width: 17px;
  height: 1px;
  transform-origin: left center;
}

.axis-x { background: #e76f71; transform: rotate(-18deg); }
.axis-y { background: #71dfaa; transform: rotate(-90deg); }
.axis-z { background: #819ee8; transform: rotate(-145deg); }
.axis-gizmo b,
.axis-gizmo em,
.axis-gizmo span { position: absolute; font-style: normal; font-weight: 500; }
.axis-gizmo b { right: 0; bottom: 13px; color: #e76f71; }
.axis-gizmo em { left: 18px; top: 0; color: #71dfaa; }
.axis-gizmo span { left: 0; bottom: 20px; color: #819ee8; }

.splat-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-block: 1px solid var(--line);
  color: var(--faint);
  background: #07090a;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.045em;
}

.splat-status-strip > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.splat-status-strip strong {
  color: #7d8785;
  font-weight: 450;
}

.method-note {
  color: #605c73;
  white-space: nowrap;
}

.splat-output-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: #080a0b;
}

.splat-output-bar > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.splat-output-bar strong {
  overflow: hidden;
  color: #8d9795;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-button {
  flex: 0 0 auto;
}

.truth-card {
  padding: 12px;
  border: 1px solid rgba(168, 134, 255, 0.16);
  border-radius: 6px;
  background: linear-gradient(130deg, rgba(168, 134, 255, 0.075), transparent 70%);
}

.truth-card > span {
  display: block;
  margin-bottom: 7px;
  color: #8b73c8;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.13em;
}

.truth-card strong {
  color: #d4caee;
  font-size: 10px;
  font-weight: 520;
}

.truth-card p {
  margin: 7px 0 0;
  color: #716d7b;
  font-size: 8px;
  line-height: 1.55;
}

.number-control {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}

.number-control span {
  color: #858f8e;
  font-size: 8.5px;
}

.number-control input {
  width: 94px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #aeb7b6;
  background: #080a0b;
  font-family: var(--mono);
  font-size: 8px;
}

.media-probe,
.analysis-canvas {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1260px) {
  .splat-lab-grid {
    grid-template-columns: 252px minmax(390px, 1fr) 308px;
  }

  .method-note {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .splat-page {
    overflow: auto;
  }

  .splat-lab-grid {
    height: auto;
    min-height: calc(100dvh - 64px);
    grid-template-columns: 250px minmax(0, 1fr);
    overflow: visible;
  }

  .splat-source-panel {
    max-height: calc(100dvh - 64px);
  }

  .splat-workspace {
    min-height: calc(100dvh - 64px);
  }

  .splat-control-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .splat-control-panel .control-header,
  .splat-control-panel .notice-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .splat-lab-grid {
    display: flex;
    flex-direction: column;
  }

  .splat-source-panel {
    max-height: none;
    overflow: visible;
    border-right: 0;
  }

  .splat-workspace {
    min-height: 650px;
  }

  .splat-control-panel {
    display: block;
  }

  .viewer-overlay.top-left {
    right: 12px;
    flex-wrap: wrap;
  }

  .viewer-hint,
  .axis-gizmo {
    display: none;
  }

  .splat-output-bar {
    align-items: stretch;
  }

  .splat-output-bar > div {
    display: none;
  }

  .export-button {
    width: 100%;
    justify-content: center;
  }
}
