:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #11131a;
  color: #f7f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

header,
section {
  margin-bottom: 3rem;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 6rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.5rem;
}

p {
  max-width: 64ch;
  color: #c7cad6;
  line-height: 1.6;
}

.eyebrow {
  color: #de38ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#status {
  color: #91f5c3;
}

#status.error {
  color: #ff9fa9;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #353948;
  border-radius: 1rem;
  background: #191c25;
}

.controls label {
  display: grid;
  gap: 0.5rem;
  min-width: 10rem;
  font-size: 0.85rem;
  font-weight: 700;
}

button,
.file-picker {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.65rem;
  background: #de38ff;
  color: #16001b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.preview {
  position: relative;
  width: min(100%, 640px);
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #353948;
  border-radius: 1rem;
  background: #08090d;
}

.preview video,
.preview img,
.preview canvas {
  display: block;
  width: 100%;
  height: auto;
}

.webcam-preview {
  aspect-ratio: 4 / 3;
}

.webcam-preview video {
  position: absolute;
  opacity: 0;
}

.webcam-preview canvas,
.image-preview canvas {
  position: absolute;
  inset: 0;
}

.removed {
  display: none;
}
