:root {
  --bg: #f5e9d7;
  --ink: #1a1a1a;
  --accent: #ff3b6b;
  --accent-2: #ffd166;
  --soft: #ffffff;
  --shadow: 0 6px 0 var(--ink);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100vh;
  width: 100vw;
  display: grid;
  place-items: center;
  padding: 24px;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 720px;
  text-align: center;
}
.screen.active { display: flex; }

.title {
  font-size: clamp(48px, 8vw, 96px);
  margin: 0;
  letter-spacing: -0.04em;
  font-weight: 800;
  line-height: 1;
}
.title .cat { display: inline-block; transform: translateY(2px); }
.booth-illo {
  width: clamp(220px, 40vw, 320px);
  height: auto;
  filter: drop-shadow(0 8px 0 var(--ink));
}
.title-sm {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0;
  letter-spacing: -0.02em;
}
.subtitle { margin: 0; opacity: 0.7; font-size: 18px; }
.hint { margin: 0; opacity: 0.6; font-size: 14px; }

.btn-primary, .btn-secondary {
  font: inherit;
  font-weight: 700;
  font-size: 22px;
  padding: 18px 36px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
  box-shadow: var(--shadow);
}
.btn-primary {
  background: var(--accent);
  color: var(--soft);
}
.btn-secondary {
  background: var(--soft);
  color: var(--ink);
}
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn-primary:active, .btn-secondary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }

.stage {
  position: relative;
  width: min(90vw, 720px);
  aspect-ratio: 3 / 2;
  border: 3px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: grayscale(100%) contrast(1.05);
}
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(120px, 30vh, 280px);
  font-weight: 800;
  color: white;
  text-shadow: 0 6px 0 rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0;
}
.countdown.show { opacity: 1; animation: pulse 900ms ease-out; }
@keyframes pulse {
  0% { transform: scale(1.6); opacity: 0; }
  20% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.1); opacity: 0; }
}
.flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
}
.flash.fire { animation: flash 380ms ease-out; }
@keyframes flash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.photo-num {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}
.photo-num.show { opacity: 1; }

.transition {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
  text-align: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.transition.show { opacity: 1; }

.booth-action { font-size: 18px; padding: 14px 28px; }

.strip-progress {
  display: flex;
  gap: 10px;
}
.strip-progress .dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--soft);
}
.strip-progress .dot.done { background: var(--accent); }

.preview-wrap {
  background: var(--soft);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 16px;
  max-height: 70vh;
  overflow: auto;
}
#strip-canvas {
  display: block;
  max-height: 65vh;
  width: auto;
  height: auto;
}

.actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

