:root {
  --dusk: #1d2733;
  --text: #f2ede4;
  --muted: #b4bfcc;
  --red: #c4121f;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font: 16px/1.5 'Instrument Sans', system-ui, -apple-system, sans-serif;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#video, #gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#video { object-fit: cover; }

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}
.back {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
}
.hint { margin: 0; font-size: 15px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}
.bar .pill:first-child { justify-self: start; }
.bar .pill:last-child { justify-self: end; }

.pill {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: 600 15px/1 'Instrument Sans', system-ui, sans-serif;
  cursor: pointer;
}

.shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--red);
  cursor: pointer;
}
.shutter:active { transform: scale(0.94); }

.start, .photo {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: var(--dusk);
  text-align: center;
}
.start h1 { font: 800 40px/1.02 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif; letter-spacing: -0.03em; margin: 0; }
.start p { margin: 0; max-width: 32ch; color: var(--muted); }
.go {
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  background: var(--red);
  color: #fff;
  font: 600 17px/1 'Instrument Sans', system-ui, sans-serif;
  cursor: pointer;
}
.start .privacy { font-size: 14px; }
.start .privacy a { color: var(--muted); }
.err { color: #ffb4b4 !important; }

.photo { background: #000; gap: 12px; }
.photo img { max-width: 100%; max-height: 72vh; border-radius: 12px; -webkit-touch-callout: default; user-select: auto; }
.photo-actions { display: flex; gap: 12px; }
.photo-tip { margin: 0; color: var(--muted); font-size: 14px; }

[hidden] { display: none !important; }
