:root {
  color-scheme: dark;
  --bg: #0c0b0a;
  --bg-elev: #161412;
  --line: #3a342c;
  --gold: #d4b896;
  --gold-strong: #e8d0a8;
  --cream: #f4eee4;
  --muted: #9a9186;
  --danger: #e07a6a;
  --success: #7dba8a;
  --rec: #d45c4c;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "DM Sans", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  min-height: 100%;
  min-height: 100dvh;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; color: inherit; }

.app {
  width: min(42rem, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(0.9rem + var(--safe-top)) 1.15rem calc(1.5rem + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 8px var(--gold);
  flex: 0 0 auto;
}
.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.brand h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step { animation: fade 0.28s ease; }
.hidden { display: none !important; }

.lede {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #e6ddd2;
  margin: 0 0 1rem;
}

.checklist, .tips ul {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.checklist li, .tips li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.3rem;
  color: var(--muted);
  line-height: 1.45;
}
.checklist li::before, .tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--gold);
}

.form { display: grid; gap: 0.9rem; }
.form label span, .speed-row label, .tips h2, .section-title {
  display: block;
}
.form label > span, .speed-row label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input[type="text"], input[type="email"] {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  outline: none;
}
input[type="text"]:focus, input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 184, 150, 0.18);
}

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #ddd4c8;
}
.consent input { margin-top: 0.2rem; accent-color: var(--gold); width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary { background: var(--gold); color: #1a1510; width: 100%; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary { background: var(--bg-elev); color: var(--cream); border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--gold-strong); border: 1px solid var(--line); padding-inline: 0.9rem; }
.row-actions { display: flex; gap: 0.7rem; margin-top: 1rem; }
.row-actions .btn { flex: 1; }

.banner {
  border-radius: 14px;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.banner-warn { border-color: rgba(224, 122, 106, 0.45); background: rgba(224, 122, 106, 0.08); }
.banner p { margin: 0 0 0.6rem; }
.banner-steps { margin: 0 0 0.8rem 1.1rem; color: #e6ddd2; padding: 0; }
.fineprint { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.center { text-align: center; }

.stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.stage-mini { width: 38%; min-width: 8.5rem; aspect-ratio: 3 / 4; margin: 0; }
.preview, .playback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}
.playback {
  height: auto;
  max-height: 70dvh;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  margin-bottom: 0.75rem;
}
.mirrored { transform: scaleX(-1); }

.oval-guide {
  pointer-events: none;
  position: absolute;
  inset: 10% 12% 22%;
  border: 2px solid rgba(212, 184, 150, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.35);
  mix-blend-mode: screen;
}

.meter-wrap {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 80ms linear;
}

.stage-caption {
  position: absolute;
  left: 0;
  right: 0;
  top: 0.7rem;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.tips h2, .section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.55rem;
  margin: 0 0 0.6rem;
}

.record-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rec-dot {
  width: 0.65rem;
  height: 0.65rem;
  background: var(--rec);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(212, 92, 76, 0.18);
  animation: pulse 1.2s ease-in-out infinite;
}
.timer { font-variant-numeric: tabular-nums; color: var(--cream); }

.countdown {
  font-family: var(--font-serif);
  font-size: 5.5rem;
  text-align: center;
  line-height: 1;
  padding: 1.5rem 0;
  color: var(--gold-strong);
}

.prompter {
  min-height: 11rem;
  padding: 0.4rem 0.2rem 1rem;
}
#prompter-text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 6.4vw, 2.35rem);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.speed-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  margin: 0.6rem 0 1rem;
}
input[type="range"] { width: 100%; accent-color: var(--gold); }

#skip-to-headturns { width: 100%; }




.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #2a2622;
  overflow: hidden;
  margin: 1.2rem 0 0.7rem;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 160ms ease;
}

.done-mark {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 2px solid var(--success);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin: 1rem auto 0.8rem;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  50% { opacity: 0.45; }
}

@media (min-width: 720px) {
  .app { padding-top: calc(1.5rem + var(--safe-top)); }
  #prompter-text { font-size: 2.4rem; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .stage { aspect-ratio: 16 / 9; max-height: 46dvh; }
  .prompter { min-height: 6rem; }
  #prompter-text { font-size: 1.45rem; }
}

.instruction-list { display: grid; gap: 1rem; margin: 0 0 1.25rem; }
.instruction-block {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
}
.instruction-block h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}
.instruction-block p {
  margin: 0;
  color: #ddd4c8;
  line-height: 1.5;
  white-space: pre-wrap;
}

.privacy-notice {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem 0.85rem;
  margin: 0 0 1.25rem;
}
.privacy-notice > h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  margin: 0 0 0.55rem;
}
.privacy-notice > .lede,
.privacy-notice p {
  margin: 0 0 0.75rem;
  color: #ddd4c8;
  line-height: 1.55;
}
.privacy-notice h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0.95rem 0 0.35rem;
}
.privacy-notice a {
  color: var(--gold-strong);
  text-underline-offset: 2px;
}

.waist-guide {
  pointer-events: none;
  position: absolute;
  left: 12%;
  right: 12%;
  top: 6%;
  bottom: 18%;
  border: 2px solid rgba(212, 184, 150, 0.9);
  border-radius: 46% 46% 18% 18% / 28% 28% 12% 12%;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.28);
}
.waist-guide-label {
  position: absolute;
  left: 50%;
  bottom: -1.4rem;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.quiet-cue {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  text-align: center;
  padding: 2rem 0.5rem;
  color: var(--gold-strong);
  line-height: 1.25;
}

.tone-hint {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.prompter-column {
  margin: 0 auto;
  width: min(var(--prompter-ch, 24ch), 100%);
}
#prompter-text {
  font-size: var(--prompter-size, 30px);
}

.controls-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem 0.9rem 0.2rem;
  margin: 0.4rem 0 1rem;
}

.row-actions.stack { flex-direction: column; }

.banner code { color: var(--gold-strong); }

.page-intro { margin: 0 0 1.25rem; }
.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
