
:root {
  --ink: #29221f;
  --muted: #716965;
  --paper: #fbf7f0;
  --card: #fffdf9;
  --accent: #74342f;
  --accent-dark: #5c2622;
  --gold: #b88a49;
  --line: #e9ddd0;
  --sage: #71806a;
  --shadow: 0 24px 70px rgba(72, 45, 33, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184,138,73,.11), transparent 30%),
    linear-gradient(180deg, #f8f1e7 0%, #fbf8f2 46%, #f5eee5 100%);
  min-height: 100vh;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 980px); margin: auto; min-height: 100vh; padding: 0 20px; }
.topbar {
  min-height: 88px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--accent); font-family: "Lora", serif; font-size: 22px;
  box-shadow: 0 8px 20px rgba(116,52,47,.22);
}
.brand strong { display: block; font-family: "Lora", serif; font-size: 20px; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }

.view { display: none; animation: fade .35s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity:0; transform:translateY(8px);} to {opacity:1; transform:none;} }

.hero-card, .question-card {
  background: rgba(255,253,249,.94);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  border-radius: 32px;
}
.hero-card { padding: 68px 72px; text-align: center; }
.eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-size: 12px; margin-bottom: 18px;
}
h1, h2 { font-family: "Lora", serif; margin: 0; font-weight: 600; }
h1 { font-size: clamp(42px, 6vw, 66px); line-height: 1.08; letter-spacing: -.035em; }
h1 span { color: var(--accent); }
.hero-copy { max-width: 670px; margin: 26px auto; line-height: 1.8; color: var(--muted); font-size: 17px; }

.trust-row {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 34px 0 36px;
}
.trust-row div { padding: 18px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.trust-row span { display:block; font-size:24px; margin-bottom:8px; }
.trust-row b { display:block; font-size:14px; }
.trust-row small { display:block; margin-top:4px; color:var(--muted); font-size:11px; }

.field-label { display:block; text-align:left; font-weight:600; font-size:13px; margin:18px 0 9px; }
.name-input, textarea {
  width:100%; border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:16px; padding:16px 18px; outline:none; transition:.2s;
}
.name-input { font-size:18px; text-align:center; max-width:430px; }
textarea { resize:vertical; line-height:1.6; }
.name-input:focus, textarea:focus { border-color: var(--gold); box-shadow:0 0 0 4px rgba(184,138,73,.11); }

.primary-btn, .secondary-btn, .text-btn {
  border:0; border-radius:999px; transition:.2s; font-weight:700;
}
.primary-btn {
  color:white; background:var(--accent); min-height:58px; padding:0 28px;
  display:inline-flex; align-items:center; justify-content:center; gap:18px;
  box-shadow:0 12px 28px rgba(116,52,47,.22);
}
.primary-btn:hover { background:var(--accent-dark); transform:translateY(-1px); }
#startBtn { width:min(100%,430px); margin-top:18px; }
.primary-btn.compact { min-height:50px; }
.secondary-btn {
  background:var(--paper); color:var(--ink); border:1px solid var(--line); min-height:48px; padding:0 22px;
}
.secondary-btn:hover { background:#f1e8dd; }
.secondary-btn.full { width:100%; margin-top:12px; }
.text-btn { background:transparent; color:var(--muted); padding:10px 4px; }
.text-btn:hover { color:var(--accent); }
.text-btn.danger { color:#9a4a44; }
.microcopy { color:var(--muted); font-size:12px; margin:15px 0 0; }

.progress-wrap { max-width:740px; margin:16px auto 22px; }
.progress-label { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin-bottom:9px; }
.progress-track { height:7px; border-radius:10px; background:#e7ddd3; overflow:hidden; }
.progress-bar { height:100%; width:0; background:linear-gradient(90deg,var(--accent),var(--gold)); transition:.35s; }

.question-card { max-width:740px; margin:auto; padding:48px 52px; }
.question-number { color:var(--accent); font-weight:700; font-size:12px; letter-spacing:.12em; text-transform:uppercase; }
h2 { font-size:clamp(30px,5vw,44px); line-height:1.25; margin-top:14px; }
.question-hint { color:var(--muted); line-height:1.7; margin:18px 0 24px; }

.recorder {
  padding:28px; border-radius:24px; text-align:center; background:var(--paper); border:1px solid var(--line); margin:26px 0;
}
.timer { font-variant-numeric:tabular-nums; font-size:34px; font-weight:600; font-family:"Lora",serif; margin-bottom:16px; }
.record-btn {
  border:0; border-radius:999px; background:var(--accent); color:#fff; min-height:58px;
  padding:0 26px; display:inline-flex; align-items:center; gap:12px; font-weight:700;
}
.record-btn.recording { background:#9a302b; animation:pulse 1.4s infinite; }
.record-dot { width:13px; height:13px; border-radius:50%; background:#fff; }
.record-btn.recording .record-dot { border-radius:3px; }
@keyframes pulse { 50% { box-shadow:0 0 0 12px rgba(154,48,43,.1); } }
.record-status { margin:13px 0 0; color:var(--muted); font-size:12px; }

.audio-wrap { margin:18px 0 25px; }
.audio-wrap audio { width:100%; }
.audio-actions { display:flex; gap:10px; justify-content:center; margin-top:12px; }
.hidden { display:none !important; }

.nav-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:28px; }
.memory-tip {
  max-width:740px; margin:18px auto 0; padding:18px 22px; border-left:3px solid var(--gold);
  color:var(--muted); background:rgba(255,255,255,.35); border-radius:0 14px 14px 0;
}
.memory-tip span { color:var(--accent); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; }
.memory-tip p { margin:6px 0 0; line-height:1.6; font-size:14px; }

.complete-card { max-width:760px; margin:auto; }
.celebration { font-size:48px; margin-bottom:14px; }
.summary-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:30px 0; }
.summary-stats div { background:var(--paper); border:1px solid var(--line); padding:18px; border-radius:18px; }
.summary-stats strong { display:block; color:var(--accent); font-family:"Lora",serif; font-size:28px; }
.summary-stats span { color:var(--muted); font-size:12px; }

footer { text-align:center; color:var(--muted); font-size:12px; padding:32px 0 28px; }

@media (max-width:700px) {
  .app-shell { padding:0 12px; }
  .topbar { min-height:72px; }
  .hero-card { padding:42px 22px; border-radius:24px; }
  .trust-row { grid-template-columns:1fr; }
  .trust-row div { display:grid; grid-template-columns:36px 1fr; text-align:left; align-items:center; }
  .trust-row span { grid-row:1/3; margin:0; }
  .question-card { padding:34px 22px; border-radius:24px; }
  .nav-actions { flex-direction:column-reverse; }
  .nav-actions button { width:100%; }
  .audio-actions { flex-direction:column; }
  .summary-stats { grid-template-columns:1fr; }
}
