/*
 * Source-faithful web port of the production Halo Capture surface.
 * Component geometry, state colour, glass, and motion are derived from:
 * halo-compass/apps/capture-pwa/src/screens/CaptureScreen.css and its capture components.
 * The outer stage chrome belongs to the website. The 393 x 852 artboard belongs to Halo Capture.
 */

.demo {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--halo-dark-rule);
  color: var(--halo-dark-ink);
  overflow: hidden;
  width: 100%;
}

.stageHeader {
  align-items: center;
  border-bottom: 1px solid var(--halo-dark-rule);
  color: var(--halo-dark-muted);
  display: flex;
  font-family: var(--halo-font-mono);
  font-size: 0.72rem;
  font-weight: 650;
  justify-content: space-between;
  letter-spacing: 0.08em;
  min-height: 3.25rem;
  padding: 0 var(--space-4);
}

.stageStatus {
  color: rgba(255, 255, 255, 0.54);
}

.stageBody {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  justify-content: center;
  min-height: 58rem;
  padding: clamp(var(--space-5), 5vw, var(--space-8));
}

.demo[data-variant="showcase"] {
  background: transparent;
  border: 0;
  overflow: visible;
}

.demo[data-variant="showcase"] .stageHeader {
  display: none;
}

.demo[data-variant="showcase"] .stageBody {
  gap: 0;
  min-height: 0;
  padding: 0;
}

.demo[data-variant="showcase"] .captureViewport {
  height: min(852px, calc(100svh - var(--header-height) - 5rem));
  max-height: 852px;
  max-width: min(100%, 393px);
  width: auto;
}

.demo[data-variant="presentation"] {
  background: transparent;
  border: 0;
  height: 100%;
  overflow: visible;
}

.demo[data-variant="presentation"] .stageHeader {
  display: none;
}

.demo[data-variant="presentation"] .stageBody {
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.demo[data-variant="presentation"] .captureViewport {
  height: 100%;
  max-height: 852px;
  max-width: min(100%, 393px);
  width: auto;
}

.captureViewport {
  aspect-ratio: 393 / 852;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-width: 393px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.captureArtboard {
  --font-family-ui:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --type-screen-title-size: 16px;
  --type-screen-title-weight: 700;
  --type-screen-title-line-height: 1.15;
  --type-screen-title-tracking: -0.01em;
  --type-screen-meta-size: 13px;
  --type-screen-meta-weight: 500;
  --type-screen-meta-tracking: 0.01em;
  --type-instruction-title-size: 13px;
  --type-instruction-title-weight: 610;
  --type-instruction-title-line-height: 1.15;
  --type-instruction-title-tracking: 0.012em;
  --type-supporting-body-size: 14px;
  --type-supporting-body-weight: 500;
  --type-supporting-body-line-height: 1.35;
  --type-supporting-body-tracking: 0;
  --type-hud-label-size: 11px;
  --type-hud-label-weight: 500;
  --type-hud-label-line-height: 1.1;
  --type-hud-label-tracking: 0.01em;
  --type-micro-label-size: 10px;
  --type-micro-label-weight: 600;
  --type-micro-label-line-height: 1;
  --type-micro-label-tracking: 0.08em;
  background: #05010d;
  border-radius: inherit;
  color: #ffffff;
  font-family: var(--font-family-ui);
  height: 852px;
  left: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  transform-origin: left top;
  width: 393px;
}

.captureMediaLayer {
  background: transparent;
  inset: 0;
  overflow: hidden;
  position: absolute;
  z-index: 1;
}

.captureCanvasGlassDefs {
  height: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 0;
}

.captureShellGlass {
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 12px 24px rgba(4, 8, 14, 0.18));
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 6;
}

.captureShellGlass > span {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.captureAtmosphere {
  background: linear-gradient(
    180deg,
    rgba(8, 12, 20, 0.28) 0%,
    rgba(7, 10, 18, 0.18) 44%,
    rgba(6, 9, 16, 0.26) 100%
  );
  overflow: hidden;
  z-index: 0;
}

.captureAtmosphere::before,
.captureAtmosphere::after {
  content: "";
  position: absolute;
}

.captureAtmosphere::before {
  background: radial-gradient(
    820px 560px at 28% 24%,
    rgba(70, 110, 170, 0.56) 0%,
    rgba(70, 110, 170, 0.4) 32%,
    rgba(70, 110, 170, 0.2) 56%,
    rgba(70, 110, 170, 0.08) 72%,
    transparent 84%
  );
  filter: blur(42px) saturate(1.04);
  height: 174%;
  left: -18%;
  opacity: 0.86;
  top: -31%;
  transform: translate3d(-18%, -3%, 0) rotate(-5deg);
  width: 148%;
}

.captureAtmosphere::after {
  background:
    radial-gradient(
      circle at 42% 46%,
      rgba(241, 58, 173, 0.56) 0%,
      rgba(241, 58, 173, 0.38) 28%,
      rgba(241, 58, 173, 0.18) 52%,
      rgba(241, 58, 173, 0.08) 68%,
      transparent 80%
    ),
    radial-gradient(
      circle at 60% 56%,
      rgba(66, 28, 74, 0.38) 0%,
      rgba(39, 17, 48, 0.26) 36%,
      rgba(39, 17, 48, 0.1) 58%,
      transparent 80%
    );
  bottom: -372px;
  filter: blur(52px) saturate(1.04);
  height: 1140px;
  left: -24px;
  opacity: 0.8;
  transform: translate3d(30%, 10%, 0) rotate(-14deg) scale(0.96);
  width: 1140px;
}

.captureScrim {
  backdrop-filter: blur(8px) saturate(1.03) brightness(0.75);
  background:
    linear-gradient(180deg, rgba(1, 3, 7, 0.78) 0%, rgba(3, 5, 10, 0.66) 48%, rgba(6, 8, 14, 0.52) 100%),
    radial-gradient(
      126% 82% at 50% 2%,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.66) 46%,
      rgba(0, 0, 0, 0.36) 100%
    );
  box-shadow:
    inset 0 20px 48px rgba(0, 0, 0, 0.24),
    inset 0 -34px 64px rgba(4, 8, 14, 0.3);
  z-index: 1;
}

.captureDepth {
  background:
    radial-gradient(
      50% 28% at 12% 14%,
      rgba(241, 58, 173, 0.12) 0%,
      rgba(241, 58, 173, 0.04) 28%,
      rgba(241, 58, 173, 0) 74%
    ),
    radial-gradient(
      44% 22% at 88% 18%,
      rgba(70, 110, 170, 0.1) 0%,
      rgba(70, 110, 170, 0.03) 32%,
      rgba(70, 110, 170, 0) 76%
    );
  mix-blend-mode: screen;
  opacity: 0.62;
  z-index: 2;
}

.captureSheen {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.055) 10%,
      rgba(255, 255, 255, 0.016) 18%,
      rgba(255, 255, 255, 0) 36%
    ),
    radial-gradient(
      120% 80% at 50% -8%,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.024) 24%,
      rgba(255, 255, 255, 0) 58%
    );
  opacity: 0.94;
  z-index: 3;
}

.captureRim {
  box-shadow: inset 0 18px 30px rgba(255, 255, 255, 0.018);
  z-index: 4;
}

.captureRim::before,
.captureRim::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.captureRim::before {
  background: linear-gradient(
    90deg,
    rgba(70, 110, 170, 0.05) 0%,
    rgba(70, 110, 170, 0) 12%,
    rgba(255, 255, 255, 0) 88%,
    rgba(241, 58, 173, 0.05) 100%
  );
  mix-blend-mode: screen;
  opacity: 0.52;
}

.captureRim::after {
  box-shadow:
    inset 1px 0 5px rgba(70, 110, 170, 0.05),
    inset -1px 0 6px rgba(241, 58, 173, 0.05);
  inset: 1px;
  opacity: 0.56;
}

.captureExit {
  backdrop-filter: blur(10px) saturate(120%);
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: var(--type-hud-label-size);
  font-weight: var(--type-hud-label-weight);
  left: 12px;
  letter-spacing: var(--type-hud-label-tracking);
  line-height: var(--type-hud-label-line-height);
  min-height: 36px;
  padding: 9px 13px;
  position: absolute;
  text-transform: uppercase;
  top: 8px;
  transition:
    background-color 180ms ease,
    transform 160ms ease;
  z-index: 35;
}

.captureExit:active {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(0.96);
}

.captureStepHeader {
  left: 0;
  padding: 0 12px;
  position: absolute;
  right: 0;
  top: 10px;
  z-index: 30;
}

.captureHeader {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 44px;
  justify-content: center;
  padding: 0 16px;
}

.captureTitle {
  line-height: var(--type-screen-title-line-height);
  text-align: center;
}

.captureTitleTop {
  font-size: var(--type-screen-meta-size);
  font-weight: var(--type-screen-meta-weight);
  letter-spacing: var(--type-screen-meta-tracking);
  opacity: 0.85;
}

.captureTitleSub {
  font-size: var(--type-screen-title-size);
  font-weight: var(--type-screen-title-weight);
  letter-spacing: var(--type-screen-title-tracking);
  margin-top: 4px;
}

.captureVerticalStack {
  left: 50%;
  position: absolute;
  top: 68px;
  transform: translateX(-50%);
  width: 357px;
  z-index: 12;
}

.viewfinderWrapper {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.viewfinderCameraPlate {
  inset: 0 -8%;
  overflow: hidden;
  position: absolute;
  transition: transform 120ms linear;
  z-index: 0;
}

.viewfinderCameraPlate img {
  object-fit: cover;
  object-position: center;
}

.viewfinderPrimaryGuidance,
.viewfinderSecondaryGuidance {
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 20;
}

.viewfinderPrimaryGuidance {
  top: 0;
}

.viewfinderSecondaryGuidance {
  bottom: 0;
}

.capturePill,
.secondaryGuidanceCard {
  backdrop-filter: blur(2px) saturate(125%);
  border: 1px solid rgba(236, 244, 255, 0.24);
  border-radius: 12px;
  isolation: isolate;
  position: relative;
  width: 100%;
}

.capturePill {
  align-items: center;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.11) 0%,
      rgba(255, 255, 255, 0.025) 6%,
      rgba(255, 255, 255, 0) 14%
    ),
    radial-gradient(
      140% 108% at 50% -34%,
      rgba(255, 255, 255, 0.07) 0%,
      rgba(255, 255, 255, 0.015) 34%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(180deg, rgba(18, 24, 39, 0.18) 0%, rgba(12, 17, 28, 0.1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 1px 0 0 rgba(196, 220, 255, 0.08),
    inset -1px 0 0 rgba(255, 255, 255, 0.05);
  color: rgba(245, 248, 255, 0.95);
  display: flex;
  font-size: var(--type-instruction-title-size);
  font-weight: var(--type-instruction-title-weight);
  gap: 8px;
  justify-content: flex-start;
  letter-spacing: var(--type-instruction-title-tracking);
  line-height: var(--type-instruction-title-line-height);
  min-height: 40px;
  padding: 9px 52px 9px 16px;
  text-align: left;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.capturePillReady {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.11) 0%,
      rgba(255, 255, 255, 0.025) 6%,
      rgba(255, 255, 255, 0) 14%
    ),
    linear-gradient(180deg, rgba(33, 94, 66, 0.2) 0%, rgba(21, 62, 43, 0.11) 100%);
  border-color: rgba(145, 238, 187, 0.24);
  color: rgba(255, 255, 255, 0.98);
}

.capturePillIconSlot {
  align-items: center;
  display: inline-flex;
  flex: 0 0 20px;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.capturePillIcon {
  display: block;
  height: 20px;
  object-fit: contain;
  width: 20px;
}

.capturePillLabel {
  flex: 1 1 auto;
  min-width: 0;
}

.secondaryGuidanceCard {
  align-items: center;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.09) 0%,
      rgba(255, 255, 255, 0.02) 8%,
      rgba(255, 255, 255, 0) 16%
    ),
    linear-gradient(180deg, rgba(18, 24, 39, 0.16) 0%, rgba(10, 15, 26, 0.09) 100%);
  border-color: rgba(236, 244, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07);
  color: rgba(239, 244, 255, 0.9);
  display: flex;
  font-size: var(--type-supporting-body-size);
  font-weight: var(--type-supporting-body-weight);
  justify-content: flex-start;
  letter-spacing: var(--type-supporting-body-tracking);
  line-height: var(--type-supporting-body-line-height);
  min-height: 44px;
  padding: 9px 16px 10px;
  text-align: left;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.viewfinderMask {
  border-radius: 12px;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
}

.viewfinderGlass,
.viewfinderEdge,
.viewfinderFlash,
.viewfinderOverlay {
  border-radius: inherit;
  inset: 0;
  position: absolute;
}

.viewfinderGlass {
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.viewfinderEdge {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.14);
  z-index: 2;
}

.viewfinderFlash {
  background: linear-gradient(
    180deg,
    rgba(255, 97, 219, 0.12) 0%,
    rgba(255, 97, 219, 0.02) 24%,
    rgba(255, 97, 219, 0.02) 76%,
    rgba(255, 97, 219, 0.12) 100%
  );
  box-shadow:
    inset 0 0 0 2px rgba(255, 97, 219, 0.82),
    inset 0 0 18px rgba(255, 97, 219, 0.14),
    0 0 24px rgba(255, 97, 219, 0.22);
  opacity: 0;
  z-index: 3;
}

.viewfinderSuccess .viewfinderFlash {
  animation: viewfinder-edge-success-flash 280ms cubic-bezier(0.18, 0.84, 0.22, 1);
}

.viewfinderOverlay {
  pointer-events: none;
  z-index: 4;
}

.reticleWrap {
  --reticle-center-y: 55%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

.reticleRings {
  height: 206.93px;
  left: 50%;
  position: absolute;
  top: var(--reticle-center-y);
  transform: translate(-50%, -50%);
  width: 206.93px;
}

.reticleRing {
  border-radius: 50%;
  box-sizing: border-box;
  position: absolute;
  transition: border-color 300ms ease;
}

.reticleOuter1 {
  border: 1px solid rgba(122, 130, 148, 0.28);
  height: 206.93px;
  left: 0;
  top: 0;
  width: 206.93px;
}

.reticleOuter2 {
  border: 1px solid rgba(122, 130, 148, 0.24);
  height: 188.75px;
  left: 9.09px;
  top: 9.09px;
  width: 188.75px;
}

.reticleOuter3 {
  border: 1px solid rgba(122, 130, 148, 0.2);
  height: 171.25px;
  left: 17.84px;
  top: 17.84px;
  width: 171.25px;
}

.reticlePrimary {
  border: 1.5px solid rgba(255, 204, 79, 0.82);
  box-shadow: 0 0 5px rgba(255, 199, 59, 0.12);
  height: 154.75px;
  left: 26.09px;
  top: 26.09px;
  width: 154.75px;
}

.reticleReady .reticlePrimary {
  border-color: rgba(76, 175, 80, 0.88);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.reticleInner1 {
  border: 1px solid rgba(122, 130, 148, 0.28);
  height: 137.25px;
  left: 34.84px;
  top: 34.84px;
  width: 137.25px;
}

.reticleInner2 {
  border: 1px solid rgba(122, 130, 148, 0.24);
  height: 122.25px;
  left: 42.34px;
  top: 42.34px;
  width: 122.25px;
}

.reticleInner3 {
  border: 1px solid rgba(122, 130, 148, 0.2);
  height: 108.14px;
  left: 49.395px;
  top: 49.395px;
  width: 108.14px;
}

.reticleCrosshair {
  background: rgba(245, 247, 251, 0.8);
  border-radius: 999px;
  left: 50%;
  position: absolute;
  top: var(--reticle-center-y);
  transform: translate(-50%, -50%);
}

.crosshairTop,
.crosshairBottom {
  height: 12.4158px;
  width: 4px;
}

.crosshairTop {
  top: calc(var(--reticle-center-y) - 84.0829px);
}

.crosshairBottom {
  top: calc(var(--reticle-center-y) + 84.0829px);
}

.crosshairLeft,
.crosshairRight {
  height: 4px;
  width: 12.4158px;
}

.crosshairLeft {
  left: calc(50% - 84.0829px);
}

.crosshairRight {
  left: calc(50% + 84.0829px);
}

.reticleCenter {
  background: transparent;
  border: 1px solid rgba(246, 247, 250, 0.94);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255, 199, 59, 0.08);
  height: 14.69px;
  left: 50%;
  position: absolute;
  top: var(--reticle-center-y);
  transform: translate(-50%, -50%);
  width: 14.69px;
}

.reticleReady .reticleCenter {
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.16);
}

.targetDot {
  background: #ff4fd5;
  border: 1px solid rgba(255, 182, 238, 0.95);
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 79, 213, 0.2),
    0 0 10px rgba(255, 79, 213, 0.42),
    0 0 20px rgba(255, 79, 213, 0.22);
  height: 16px;
  position: absolute;
  transform: translate(-50%, -50%);
  transition:
    left 120ms linear,
    top 120ms linear,
    opacity 140ms ease,
    box-shadow 160ms ease;
  width: 16px;
  z-index: 2;
}

.targetDotLocked {
  box-shadow:
    0 0 0 2px rgba(255, 79, 213, 0.26),
    0 0 12px rgba(255, 79, 213, 0.5),
    0 0 24px rgba(255, 79, 213, 0.28);
}

.levelIndicator {
  height: 114.869px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  bottom: -43px;
  transform: translateX(-50%);
  width: 155.371px;
  z-index: 12;
}

.levelArc {
  display: block;
  height: 114.869px;
  transition: filter 180ms ease;
  width: 155.371px;
}

.levelLow .levelArc {
  filter: drop-shadow(0 0 10px rgba(255, 188, 74, 0.18));
}

.levelLocked .levelArc {
  filter: drop-shadow(0 0 10px rgba(112, 224, 139, 0.2));
}

.levelStopTop,
.levelStopMid,
.levelStopBottom {
  transition: stop-color 180ms ease;
}

.levelLow .levelStopTop {
  stop-color: rgba(255, 196, 86, 0.92);
}

.levelLow .levelStopMid {
  stop-color: rgba(240, 174, 66, 0.62);
}

.levelLow .levelStopBottom {
  stop-color: rgba(214, 136, 51, 0);
}

.levelLocked .levelStopTop {
  stop-color: rgba(120, 232, 148, 0.9);
}

.levelLocked .levelStopMid {
  stop-color: rgba(103, 214, 132, 0.64);
}

.levelLocked .levelStopBottom {
  stop-color: rgba(88, 190, 117, 0);
}

.levelArcPath,
.levelArcActive {
  fill: none;
  stroke-linecap: round;
}

.levelArcPath {
  stroke-width: 2.2;
}

.levelArcActive {
  opacity: 0.86;
  stroke-width: 2.515;
  transition:
    stroke 180ms ease,
    stroke-dasharray 200ms ease,
    stroke-dashoffset 200ms ease,
    opacity 160ms ease;
}

.levelLow .levelArcActive {
  filter: drop-shadow(0 0 5px rgba(255, 198, 94, 0.34));
  stroke: rgba(255, 212, 132, 0.94);
}

.levelLocked .levelArcActive {
  filter: drop-shadow(0 0 5px rgba(114, 231, 142, 0.48));
  opacity: 0.96;
  stroke: rgba(146, 248, 171, 0.98);
}

.levelMarker {
  border-radius: 2px 2px 0 0;
  bottom: 9px;
  height: 16px;
  left: 50%;
  position: absolute;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    opacity 140ms ease;
  width: 3px;
}

.levelLow .levelMarker {
  background: rgba(255, 204, 115, 0.9);
  box-shadow: 0 0 8px rgba(255, 186, 80, 0.28);
  opacity: 0.8;
  transform: translate(-50%, 0) translate(2.8px, 0);
}

.levelLocked .levelMarker {
  background: rgba(132, 242, 160, 0.9);
  box-shadow: 0 0 8px rgba(104, 217, 132, 0.34);
  opacity: 0.9;
  transform: translate(-50%, 0);
}

.levelLabel {
  bottom: 75px;
  color: rgba(206, 234, 241, 0.88);
  font-size: 10px;
  font-weight: 600;
  left: 50%;
  letter-spacing: 0.14em;
  pointer-events: none;
  position: absolute;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  transform: translateX(-50%);
}

.captureReadinessTrack {
  isolation: isolate;
  margin-top: 5px;
  min-height: 30px;
  position: relative;
  top: 3px;
  width: 100%;
  z-index: 20;
}

.readinessTrack {
  align-items: end;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  width: 95%;
}

.readinessItem {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.readinessLabel {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--type-hud-label-size);
  font-weight: var(--type-hud-label-weight);
  letter-spacing: var(--type-hud-label-tracking);
  line-height: var(--type-hud-label-line-height);
  margin-bottom: 3px;
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.readinessActive .readinessLabel {
  color: rgba(243, 202, 99, 0.88);
}

.readinessBar {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: block;
  height: 3.6px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  width: 60%;
}

.readinessFill {
  background: linear-gradient(90deg, rgba(95, 219, 204, 0.6) 0%, rgba(111, 233, 209, 0.92) 100%);
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(95, 219, 204, 0.18);
  display: block;
  height: 100%;
  transition:
    width 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.readinessActive .readinessFill {
  background: linear-gradient(90deg, rgba(235, 194, 90, 0.6) 0%, rgba(255, 214, 103, 0.96) 100%);
  box-shadow: 0 0 12px rgba(243, 202, 99, 0.24);
}

.captureButtonLock {
  align-items: center;
  display: flex;
  height: var(--capture-dock-shutter-size);
  justify-content: center;
  pointer-events: auto;
  position: relative;
  z-index: 30;
}

.captureButton {
  --capture-state-idle-ring: rgba(224, 233, 240, 0.3);
  --capture-state-idle-fill-top: rgba(255, 255, 255, 0.18);
  --capture-state-idle-fill-bottom: rgba(116, 132, 149, 0.12);
  --capture-state-ready-rim: rgba(255, 255, 255, 0.24);
  --capture-state-ready-fill-top: rgba(255, 255, 255, 0.68);
  --capture-state-ready-fill-bottom: rgba(228, 234, 240, 0.48);
  --capture-state-ring-ready: #6fd59f;
  --capture-state-ring-warning: #f4c55c;
  --capture-state-press: #ff61db;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  height: 114px;
  padding: 0;
  place-items: center;
  position: relative;
  transition:
    transform 140ms ease,
    filter 180ms ease;
  width: 114px;
}

.captureButtonOuter {
  backdrop-filter: blur(14px) saturate(138%);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0.04) 32%,
      rgba(34, 42, 49, 0.1) 100%
    ),
    radial-gradient(
      circle at 32% 22%,
      rgba(255, 255, 255, 0.34),
      rgba(255, 255, 255, 0.08) 30%,
      rgba(255, 255, 255, 0) 58%
    ),
    radial-gradient(circle at 68% 72%, rgba(141, 155, 171, 0.2), rgba(141, 155, 171, 0) 52%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 28px 44px rgba(0, 0, 0, 0.34),
    0 12px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(10, 14, 20, 0.18);
  display: grid;
  height: 79px;
  isolation: isolate;
  overflow: visible;
  place-items: center;
  position: relative;
  transition:
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 140ms ease;
  width: 79px;
}

.captureButtonOuter::before,
.captureButtonOuter::after,
.captureButtonRing::before,
.captureButtonInner::before,
.captureButtonInner::after {
  border-radius: 50%;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.captureButtonOuter::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.03));
  filter: blur(1.5px);
  inset: 6px 14px 50px 18px;
  opacity: 0.92;
  transform: rotate(-18deg);
}

.captureButtonOuter::after {
  background: radial-gradient(circle at 50% 62%, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0) 68%);
  filter: blur(14px);
  inset: -8px -10px -14px;
  opacity: 0.86;
  z-index: -1;
}

.captureButtonRing {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 66%);
  border: 2px solid var(--capture-state-idle-ring);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: grid;
  height: calc(100% - 10px);
  place-items: center;
  position: relative;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 140ms ease;
  width: calc(100% - 10px);
}

.captureButtonRing::before {
  display: none;
}

.captureButtonInner {
  background:
    linear-gradient(180deg, var(--capture-state-idle-fill-top), var(--capture-state-idle-fill-bottom)),
    radial-gradient(
      circle at 36% 24%,
      rgba(255, 255, 255, 0.34),
      rgba(255, 255, 255, 0.08) 26%,
      rgba(255, 255, 255, 0) 52%
    );
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -8px 12px rgba(12, 17, 22, 0.2),
    inset 0 0 18px rgba(255, 255, 255, 0.06);
  display: grid;
  height: 100%;
  overflow: hidden;
  place-items: center;
  position: relative;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 140ms ease,
    opacity 180ms ease;
  width: 100%;
}

.captureButtonInner::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.02));
  filter: blur(1.2px);
  inset: 10% 22% 54% 24%;
  opacity: 0.88;
}

.captureButtonInner::after {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 97, 219, 0.7) 0%,
    rgba(255, 97, 219, 0.22) 44%,
    rgba(255, 97, 219, 0) 76%
  );
  inset: 14%;
  opacity: 0;
  transform: scale(0.74);
  transition:
    opacity 120ms ease,
    transform 140ms ease;
}

.captureButtonReady .captureButtonOuter {
  border-color: var(--capture-state-ready-rim);
  box-shadow:
    0 30px 46px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(245, 248, 251, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(10, 14, 20, 0.18);
}

.captureButtonReady .captureButtonInner {
  background:
    linear-gradient(180deg, var(--capture-state-ready-fill-top), var(--capture-state-ready-fill-bottom)),
    radial-gradient(
      circle at 36% 24%,
      rgba(255, 255, 255, 0.56),
      rgba(255, 255, 255, 0.18) 20%,
      rgba(255, 255, 255, 0) 46%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -12px 16px rgba(110, 120, 130, 0.14),
    inset 0 0 22px rgba(255, 255, 255, 0.12);
}

.captureButtonDisabled {
  cursor: not-allowed;
  opacity: 0.92;
}

.captureButtonDisabled .captureButtonOuter {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03) 32%,
    rgba(34, 42, 49, 0.08) 100%
  );
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -8px 14px rgba(10, 14, 20, 0.16);
}

.captureButtonReadyRing .captureButtonRing {
  border-color: var(--capture-state-ring-ready);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 0 16px rgba(111, 213, 159, 0.24);
}

.captureButtonWarningRing .captureButtonRing {
  border-color: var(--capture-state-ring-warning);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 0 16px rgba(244, 197, 92, 0.22);
}

.captureButton:not(:disabled):active {
  transform: scale(0.968);
}

.captureButton:not(:disabled):active .captureButtonRing {
  border-color: var(--capture-state-press);
}

.captureButtonSuccess .captureButtonRing {
  animation: capture-button-ring-success 220ms cubic-bezier(0.2, 0.9, 0.24, 1);
}

.captureButtonSuccess .captureButtonInner {
  animation: capture-button-inner-success 220ms cubic-bezier(0.2, 0.9, 0.24, 1);
}

.captureButtonSuccess .captureButtonInner::after {
  animation: capture-button-core-flash 240ms cubic-bezier(0.16, 0.84, 0.22, 1);
}

.captureDock {
  --capture-dock-map-height: 125px;
  --capture-dock-map-width: 94px;
  --capture-dock-preview-height: 65px;
  --capture-dock-preview-width: 62px;
  --capture-dock-shutter-size: 114px;
  align-items: center;
  bottom: 68px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  left: 12px;
  min-height: var(--capture-dock-map-height);
  pointer-events: none;
  position: absolute;
  right: 12px;
  z-index: 29;
}

.captureDock > * {
  justify-self: center;
}

.coverageMiniMap {
  height: var(--capture-dock-map-height);
  overflow: visible;
  position: relative;
  width: var(--capture-dock-map-width);
}

.miniMapWireframe {
  height: 68%;
  left: 24%;
  object-fit: contain;
  opacity: 0.84;
  pointer-events: none;
  position: absolute;
  top: 16%;
  width: 52%;
}

.mapDot {
  background: rgba(8, 14, 24, 0.54);
  border: 1.4px solid rgba(205, 221, 244, 0.76);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(3, 7, 14, 0.35);
  height: 7.2px;
  opacity: 0.86;
  position: absolute;
  transform: translate(-50%, -50%);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 180ms ease,
    opacity 140ms ease,
    transform 160ms ease;
  width: 7.2px;
}

.mapDotCompleted {
  background: rgba(70, 182, 148, 0.82);
  border-color: rgba(127, 238, 205, 0.9);
  box-shadow:
    0 0 0 1px rgba(61, 137, 115, 0.3),
    0 0 8px rgba(95, 219, 204, 0.44);
}

.mapDotActive {
  background: rgba(232, 179, 69, 0.96);
  border-color: rgba(255, 216, 114, 0.98);
  box-shadow:
    0 0 0 2px rgba(255, 209, 82, 0.3),
    0 0 12px rgba(255, 214, 91, 0.62);
  transform: translate(-50%, -50%) scale(1.05);
}

.nextTargetCursor {
  height: 17.28px;
  position: absolute;
  width: 17.28px;
}

.nextTargetHalo,
.nextTargetCore,
.nextTargetHeading {
  display: block;
  position: absolute;
}

.nextTargetHalo {
  border: 1px solid rgba(255, 79, 213, 0.96);
  border-radius: 50%;
  box-shadow:
    0 0 0 1.44px rgba(255, 79, 213, 0.2),
    0 0 7.2px rgba(255, 79, 213, 0.54);
  inset: 1.44px;
  animation: next-target-pulse 1.2s ease-in-out infinite;
}

.nextTargetCore {
  background: linear-gradient(180deg, #ff94ea 0%, #ff4fd5 100%);
  border: 0.72px solid rgba(255, 182, 238, 0.95);
  border-radius: 1.44px;
  box-shadow: 0 0 5.76px rgba(255, 79, 213, 0.58);
  height: 5.76px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5.76px;
}

.nextTargetHeading {
  border-bottom: 5.04px solid rgba(255, 79, 213, 0.98);
  border-left: 2.88px solid transparent;
  border-right: 2.88px solid transparent;
  filter: drop-shadow(0 0 4.32px rgba(255, 79, 213, 0.56));
  height: 0;
  left: 50%;
  top: 0;
  transform: translateX(-50%) rotate(180deg);
  transform-origin: 50% 8.64px;
  width: 0;
}

.nextTargetHeading::after {
  background: #ff4fd5;
  border-radius: 50%;
  content: "";
  height: 3.6px;
  left: 50%;
  position: absolute;
  top: -9.36px;
  transform: translateX(-50%);
  width: 3.6px;
}

.lastPhotoThumbnail {
  background: transparent;
  border: 0;
  border-radius: 18px;
  height: var(--capture-dock-preview-height);
  overflow: hidden;
  pointer-events: auto;
  position: relative;
  width: var(--capture-dock-preview-width);
}

.lastPhotoThumbnail::before {
  background: linear-gradient(180deg, rgba(20, 26, 39, 0.28) 0%, rgba(12, 17, 28, 0.18) 100%);
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(236, 244, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 20px rgba(0, 0, 0, 0.16);
  content: "";
  inset: -1px;
  position: absolute;
}

.lastPhotoImage {
  border-radius: inherit;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.lastPhotoBadge {
  align-items: center;
  background: rgba(9, 14, 24, 0.78);
  border-radius: 999px;
  box-shadow:
    0 4px 12px rgba(1, 4, 10, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: rgba(247, 250, 255, 0.94);
  display: inline-flex;
  font-size: var(--type-micro-label-size);
  font-weight: var(--type-micro-label-weight);
  height: 18px;
  justify-content: center;
  letter-spacing: var(--type-micro-label-tracking);
  line-height: var(--type-micro-label-line-height);
  min-width: 18px;
  padding: 0 5px;
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 3;
}

.lastPhotoFooter {
  background: linear-gradient(180deg, rgba(6, 9, 15, 0) 0%, rgba(6, 9, 15, 0.82) 100%);
  bottom: 0;
  color: rgba(245, 248, 255, 0.92);
  font-size: var(--type-hud-label-size);
  font-weight: var(--type-hud-label-weight);
  left: 0;
  letter-spacing: var(--type-hud-label-tracking);
  line-height: var(--type-hud-label-line-height);
  padding: 16px 8px 8px;
  position: absolute;
  right: 0;
  text-align: center;
  z-index: 2;
}

.captureBrandMark {
  bottom: 20px;
  height: 22px;
  left: 50%;
  opacity: 0.64;
  object-fit: contain;
  position: absolute;
  transform: translateX(-50%);
  width: auto;
  z-index: 30;
}

@keyframes viewfinder-edge-success-flash {
  0% {
    opacity: 0;
    transform: scale(0.988);
  }
  22% {
    opacity: 0.92;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.006);
  }
}

@keyframes capture-button-ring-success {
  0%,
  100% {
    border-color: var(--capture-state-press);
    box-shadow: 0 0 0 rgba(255, 97, 219, 0);
  }
  35% {
    border-color: var(--capture-state-press);
    box-shadow: 0 0 18px rgba(255, 97, 219, 0.24);
  }
}

@keyframes capture-button-inner-success {
  0%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.96);
  }
}

@keyframes capture-button-core-flash {
  0% {
    opacity: 0;
    transform: scale(0.74);
  }
  28% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes next-target-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.16);
  }
}

@media (max-width: 760px) {
  .stageHeader {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.24rem;
    justify-content: center;
  }

  .stageBody {
    min-height: 0;
    padding-inline: var(--space-3);
  }
}

@media (max-width: 860px) and (orientation: portrait) {
  .demo[data-variant="showcase"] .captureViewport {
    height: clamp(18rem, calc(100svh - var(--header-height) - 17rem), 32rem);
    max-width: 78vw;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .demo[data-variant="showcase"] .captureViewport {
    height: calc(100svh - var(--header-height) - 2.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .captureCamera,
  .targetDot,
  .reticleRing,
  .levelArc,
  .levelMarker,
  .readinessFill,
  .captureButton,
  .captureButtonOuter,
  .captureButtonRing,
  .captureButtonInner {
    transition-duration: 0.01ms;
  }

  .nextTargetHalo,
  .captureButtonSuccess .captureButtonRing,
  .captureButtonSuccess .captureButtonInner,
  .captureButtonSuccess .captureButtonInner::after,
  .viewfinderSuccess .viewfinderFlash {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}
