: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;
}

button,
.photo-ring-file {
  -webkit-tap-highlight-color: transparent;
}

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

.photo-ring-canvas,
.photo-ring-source {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.photo-ring-canvas {
  z-index: 1;
  background: #000;
}

.photo-ring-source {
  z-index: 2;
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  pointer-events: none;
  will-change: opacity;
}

.photo-ring-identity,
.photo-ring-readout,
.photo-ring-controls,
.photo-ring-status,
.photo-ring-drop-hint,
.photo-ring-noscript {
  position: absolute;
  z-index: 4;
}

.photo-ring-identity {
  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 / 68%);
  border: 1px solid rgb(255 255 255 / 18%);
  backdrop-filter: blur(14px);
}

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

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

.photo-ring-readout {
  top: clamp(20px, 2vw, 42px);
  right: clamp(20px, 2.1vw, 48px);
  display: flex;
  min-width: 176px;
  justify-content: space-between;
  gap: 28px;
  padding: 12px 14px;
  color: #fff;
  background: rgb(0 0 0 / 68%);
  border: 1px solid rgb(255 255 255 / 18%);
  font-size: clamp(9px, 0.65vw, 12px);
  line-height: 1;
  letter-spacing: 0.12em;
  backdrop-filter: blur(14px);
}

.photo-ring-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;
  align-items: center;
  gap: clamp(16px, 1.7vw, 34px);
  min-height: 58px;
  padding: 10px 12px;
  background: rgb(0 0 0 / 74%);
  border: 1px solid rgb(255 255 255 / 18%);
  backdrop-filter: blur(18px);
}

.photo-ring-file,
.photo-ring-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;
}

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

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

.photo-ring-scrubber {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

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

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

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

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

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

.photo-ring-status {
  right: clamp(22px, 2.2vw, 50px);
  bottom: clamp(90px, 6.4vw, 116px);
  max-width: min(440px, calc(100vw - 44px));
  margin: 0;
  padding: 8px 10px;
  color: rgb(255 255 255 / 72%);
  background: rgb(0 0 0 / 62%);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.photo-ring-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;
}

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

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

.photo-ring-lab[data-state="loading"] .photo-ring-controls,
.photo-ring-lab[data-state="loading"] .photo-ring-readout {
  opacity: 0.48;
  pointer-events: none;
}

.photo-ring-lab[data-state="error"] .photo-ring-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) {
  .photo-ring-identity {
    right: 20px;
  }

  .photo-ring-identity h1 {
    display: none;
  }

  .photo-ring-readout {
    top: 78px;
    right: auto;
    left: 20px;
    min-width: 158px;
  }

  .photo-ring-controls {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

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

  .photo-ring-status {
    right: 20px;
    bottom: 136px;
    left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-ring-drop-hint {
    transition: none;
  }
}
