:root {
  --ivory: #faf6f2;
  --card: #ffffff;
  --ink: #3a3632;
  --muted: #8a8078;
  --accent: #b08d6f;
  --accent-ink: #ffffff;
  --line: #eae2da;
  --success: #6f8f6a;
  --error: #b3624f;
  --radius: 18px;
}

* { box-sizing: border-box; }

/* Elements toggled via the `hidden` attribute must actually hide, even
   though other rules below also set `display` on them. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  padding: 32px 16px 48px;
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.app-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 2.4rem;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}

.app-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(58, 54, 50, 0.08);
  border: 1px solid var(--line);
}

.stage video,
.stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mirror the live preview so it feels like a mirror; the captured photo
   is mirrored to match at capture time (see app.js), so both look the same. */
.stage video {
  transform: scaleX(-1);
}

.status {
  margin: 16px 4px 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-success { color: var(--success); }
.status-error { color: var(--error); }
.status-info { color: var(--muted); }

.controls {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-controls {
  display: flex;
  gap: 12px;
}

.review-controls[hidden] { display: none; }

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  flex: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

@media (max-width: 360px) {
  .app-header h1 { font-size: 2rem; }
}
