:root {
  color-scheme: dark;
  font-family:
    Inter, Pretendard, "Helvetica Neue", Arial, sans-serif;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  color: #fff;
}

button,
input {
  font: inherit;
}

.depth-dolly-lab,
.depth-dolly-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #000;
}

.depth-dolly-fallback,
.depth-dolly-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.depth-dolly-fallback {
  z-index: 0;
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.depth-dolly-canvas {
  z-index: 1;
  background: #000;
}

.depth-dolly-title,
.depth-dolly-readout,
.depth-dolly-parameters,
.depth-dolly-controls,
.depth-dolly-status,
.depth-dolly-drop-hint,
.depth-dolly-noscript {
  position: absolute;
  z-index: 4;
}

.depth-dolly-lab[data-embedded="true"] .depth-dolly-title,
.depth-dolly-lab[data-embedded="true"] .depth-dolly-readout,
.depth-dolly-lab[data-embedded="true"] .depth-dolly-parameters,
.depth-dolly-lab[data-embedded="true"] .depth-dolly-controls,
.depth-dolly-lab[data-embedded="true"] .depth-dolly-status,
.depth-dolly-lab[data-embedded="true"] .depth-dolly-drop-hint,
.depth-dolly-lab[data-embedded="true"] .depth-dolly-noscript {
  display: none !important;
}

.depth-dolly-title {
  top: clamp(20px, 2vw, 42px);
  left: clamp(20px, 2.1vw, 48px);
  display: grid;
  gap: 7px;
  padding: 12px 14px 11px;
  color: #fff;
  background: rgb(0 0 0 / 62%);
  border: 1px solid rgb(255 255 255 / 16%);
  backdrop-filter: blur(14px);
}

.depth-dolly-title p,
.depth-dolly-title h1 {
  margin: 0;
  font-size: clamp(9px, 0.65vw, 12px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
}

.depth-dolly-title h1 {
  color: rgb(255 255 255 / 62%);
  font-size: clamp(8px, 0.58vw, 11px);
  font-weight: 400;
}

.depth-dolly-readout {
  top: clamp(20px, 2vw, 42px);
  right: clamp(20px, 2.1vw, 48px);
  display: grid;
  min-width: 230px;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 14px;
  color: rgb(255 255 255 / 76%);
  background: rgb(0 0 0 / 62%);
  border: 1px solid rgb(255 255 255 / 16%);
  font-size: clamp(8px, 0.58vw, 11px);
  line-height: 1;
  letter-spacing: 0.1em;
  backdrop-filter: blur(14px);
}

.depth-dolly-readout div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.depth-dolly-readout output {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.depth-dolly-parameters {
  top: clamp(104px, 6.2vw, 132px);
  bottom: auto;
  left: clamp(20px, 2.1vw, 48px);
  z-index: 5;
  display: flex;
  width: min(460px, calc(100vw - 40px));
  max-height: calc(100% - 250px);
  flex-direction: column;
  color: rgb(255 255 255 / 78%);
  background: rgb(0 0 0 / 76%);
  border: 1px solid rgb(255 255 255 / 18%);
  backdrop-filter: blur(18px);
}

.depth-dolly-parameters[data-open="false"] {
  right: auto;
  bottom: auto;
  width: auto;
}

.depth-dolly-parameter-header {
  display: flex;
  min-height: 58px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.depth-dolly-parameter-header div {
  display: grid;
  gap: 6px;
}

.depth-dolly-parameter-header p,
.depth-dolly-parameter-header span {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
}

.depth-dolly-parameter-header span {
  color: rgb(255 255 255 / 42%);
  font-size: 8px;
  font-weight: 400;
}

.depth-dolly-parameter-header button,
.depth-dolly-parameter-footer button {
  min-height: 30px;
  padding: 0 11px;
  color: rgb(255 255 255 / 74%);
  background: transparent;
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 0;
  font-size: 9px;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.depth-dolly-parameter-header button:hover,
.depth-dolly-parameter-header button:focus-visible,
.depth-dolly-parameter-footer button:hover,
.depth-dolly-parameter-footer button:focus-visible {
  color: #000;
  background: #fff;
  outline: none;
}

.depth-dolly-parameter-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgb(255 255 255 / 28%) transparent;
  scrollbar-width: thin;
}

.depth-dolly-parameters[data-open="false"] .depth-dolly-parameter-body {
  display: none;
}

.depth-dolly-parameter-body fieldset {
  display: grid;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 13px 14px 15px;
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.depth-dolly-parameter-body legend {
  width: 100%;
  padding: 0 0 8px;
  color: rgb(255 255 255 / 42%);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.depth-dolly-parameter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 18px;
  padding: 8px 0;
  border-top: 1px solid rgb(255 255 255 / 7%);
}

.depth-dolly-parameter:first-of-type {
  border-top: 0;
}

.depth-dolly-parameter > span,
.depth-dolly-parameter > output {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.025em;
}

.depth-dolly-parameter > output {
  min-width: 64px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.depth-dolly-parameter input {
  grid-column: 1 / -1;
  width: 100%;
  height: 16px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.depth-dolly-parameter input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(
    90deg,
    rgb(255 255 255 / 82%) 0 var(--parameter-progress, 50%),
    rgb(255 255 255 / 22%) var(--parameter-progress, 50%) 100%
  );
}

.depth-dolly-parameter input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -5px;
  appearance: none;
  background: #fff;
  border: 1px solid #000;
  border-radius: 50%;
}

.depth-dolly-parameter input::-moz-range-track {
  height: 2px;
  background: rgb(255 255 255 / 34%);
}

.depth-dolly-parameter input::-moz-range-progress {
  height: 2px;
  background: rgb(255 255 255 / 76%);
}

.depth-dolly-parameter input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 50%;
}

.depth-dolly-parameter input:focus-visible {
  outline: 1px solid rgb(255 255 255 / 72%);
  outline-offset: 4px;
}

.depth-dolly-parameter-footer {
  display: grid;
  gap: 10px;
  padding: 13px 14px 14px;
}

.depth-dolly-parameter-footer button {
  justify-self: start;
}

.depth-dolly-parameter-footer p {
  margin: 0;
  color: rgb(255 255 255 / 45%);
  font-size: 9px;
  line-height: 1.45;
}

.depth-dolly-controls {
  right: clamp(20px, 2.1vw, 48px);
  bottom: clamp(22px, 2.2vw, 48px);
  left: clamp(20px, 2.1vw, 48px);
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: clamp(14px, 1.4vw, 28px);
  min-height: 58px;
  padding: 10px 12px;
  background: rgb(0 0 0 / 70%);
  border: 1px solid rgb(255 255 255 / 16%);
  backdrop-filter: blur(18px);
}

.depth-dolly-file,
.depth-dolly-controls button {
  display: inline-flex;
  min-width: 112px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 0;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.depth-dolly-file:hover,
.depth-dolly-controls button:hover,
.depth-dolly-file:focus-within,
.depth-dolly-controls button:focus-visible {
  color: #000;
  background: #fff;
  outline: none;
}

.depth-dolly-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.depth-dolly-scrubber {
  display: flex;
  align-items: center;
  min-width: 0;
}

.depth-dolly-scrubber input {
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.depth-dolly-scrubber input::-webkit-slider-runnable-track {
  height: 1px;
  background: rgb(255 255 255 / 54%);
}

.depth-dolly-scrubber input::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4.5px;
  appearance: none;
  background: #fff;
  border: 0;
  border-radius: 50%;
}

.depth-dolly-scrubber input::-moz-range-track {
  height: 1px;
  background: rgb(255 255 255 / 54%);
}

.depth-dolly-scrubber input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #fff;
  border: 0;
  border-radius: 50%;
}

.depth-dolly-scrubber input:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 7px;
}

.depth-dolly-percent {
  min-width: 42px;
  color: rgb(255 255 255 / 78%);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-align: right;
}

.depth-dolly-status {
  right: clamp(22px, 2.2vw, 50px);
  bottom: clamp(90px, 6.4vw, 116px);
  max-width: min(560px, calc(100vw - 44px));
  margin: 0;
  padding: 8px 10px;
  color: rgb(255 255 255 / 68%);
  background: rgb(0 0 0 / 54%);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.035em;
}

.depth-dolly-drop-hint {
  top: 50%;
  left: 50%;
  display: grid;
  width: min(540px, calc(100vw - 48px));
  min-height: 150px;
  place-items: center;
  margin: 0;
  color: #fff;
  background: rgb(0 0 0 / 82%);
  border: 1px solid rgb(255 255 255 / 54%);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.depth-dolly-stage[data-dragging="true"] .depth-dolly-drop-hint {
  opacity: 1;
}

.depth-dolly-noscript {
  top: 50%;
  left: 50%;
  margin: 0;
  padding: 16px;
  color: #fff;
  background: #000;
  transform: translate(-50%, -50%);
}

.depth-dolly-lab[data-state="loading"] .depth-dolly-controls,
.depth-dolly-lab[data-state="loading"] .depth-dolly-readout,
.depth-dolly-lab[data-state="loading"] .depth-dolly-parameter-body {
  opacity: 0.48;
  pointer-events: none;
}

.depth-dolly-lab[data-state="ready"] .depth-dolly-fallback {
  opacity: 0;
}

.depth-dolly-lab[data-state="error"] .depth-dolly-canvas {
  opacity: 0;
}

.depth-dolly-lab[data-state="error"] .depth-dolly-status {
  color: #ffb4a8;
}

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

@media (max-width: 760px) {
  .depth-dolly-title {
    right: 20px;
  }

  .depth-dolly-title h1 {
    display: none;
  }

  .depth-dolly-readout {
    top: 78px;
    right: 20px;
    left: 20px;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .depth-dolly-parameters {
    top: 166px;
    right: 20px;
    bottom: 188px;
    left: 20px;
    width: auto;
  }

  .depth-dolly-parameters[data-open="false"] {
    right: auto;
  }

  .depth-dolly-controls {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
  }

  .depth-dolly-scrubber {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 24px;
  }

  .depth-dolly-file,
  .depth-dolly-controls button {
    width: 100%;
    min-width: 0;
  }

  .depth-dolly-status {
    right: 20px;
    bottom: 136px;
    left: 20px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .depth-dolly-fallback,
  .depth-dolly-drop-hint {
    transition: none;
  }
}
