:root {
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #2b2024;
  --muted: #7a6a70;
  --rose: #b0506a;
  --rose-dark: #8e3b53;
  --rose-soft: #f6e6ea;
  --gold: #b8925a;
  --line: #eadfd6;
  --ok: #3f7d5a;
  --err: #b23a3a;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(43, 32, 36, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, .serif { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.35rem; }
p { margin: .5rem 0; }
a { color: var(--rose-dark); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.err { color: var(--err); font-size: .92rem; }
.ok { color: var(--ok); }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 520px; }
.brand { text-align: center; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin: 8px 0 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; color: var(--gold); margin: 0 0 6px; font-weight: 500; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; box-shadow: var(--shadow); margin: 0 0 18px; }
.foot { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 28px; }
.foot a { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 auto; }

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rose); color: #fff; font: 600 1rem/1 "DM Sans", system-ui, sans-serif;
  padding: 15px 22px; border-radius: 999px; text-decoration: none; min-height: 50px; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--rose-dark); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--rose-dark); border: 1.5px solid var(--rose); }
.btn.ghost:hover { background: var(--rose-soft); }
.btn.small { min-height: 38px; padding: 9px 14px; font-size: .88rem; }
.btn.gold { background: var(--gold); }
.btn.gold:hover { background: #9d7a46; }
.linklike { background: none; border: 0; color: var(--rose-dark); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }

/* Forms */
label { display: block; font-weight: 500; margin: 16px 0 6px; text-align: left; }
input[type=text], input[type=email], input[type=password], input[type=date], input:not([type]) {
  width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
audio { width: 100%; margin: 12px 0 4px; }

/* Spinner */
.spinner { width: 34px; height: 34px; border: 3px solid var(--rose-soft); border-top-color: var(--rose); border-radius: 50%; margin: 18px auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Guest page ---------- */
.hero-names { text-align: center; margin: 0 0 22px; }
.hero-names h1 { color: var(--ink); }
.prompt-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 0; }
.prompt { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.45rem; min-height: 2.2em; margin: 4px 0 18px; transition: opacity .35s; }
.rec-wrap { position: relative; width: 168px; height: 168px; margin: 6px auto 8px; }
.rec-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.rec-ring circle { fill: none; stroke-width: 6; }
.rec-ring .track { stroke: var(--rose-soft); }
.rec-ring .bar { stroke: var(--rose); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.rec-btn {
  position: absolute; inset: 16px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #c9657f, var(--rose) 55%, var(--rose-dark));
  color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(176, 80, 106, .35);
  transition: transform .12s;
}
.rec-btn:active { transform: scale(.96); }
.rec-btn svg { width: 46px; height: 46px; }
.rec-btn .stop-icon { display: none; }
.recording .rec-btn .mic-icon { display: none; }
.recording .rec-btn .stop-icon { display: block; }
.recording .rec-btn::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--rose); animation: pulse 1.4s ease-out infinite;
}
@keyframes pulse { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.25); } }
.timer { font-variant-numeric: tabular-nums; font-size: 1.6rem; font-weight: 600; margin: 4px 0 0; }
.timer.warn { color: var(--rose); }
.done-mark { width: 74px; height: 74px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-dark); display: grid; place-items: center; margin: 4px auto 14px; font-size: 2rem; }

/* ---------- Album ---------- */
.album-head { text-align: center; margin-bottom: 22px; }
.album-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 14px 0 0; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0 0 12px; box-shadow: var(--shadow); }
.msg.playing { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.msg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.msg-name { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.35rem; font-weight: 600; }
.msg-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.msg-actions { display: flex; justify-content: flex-end; }
.msg-actions a { font-size: .85rem; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- Admin ---------- */
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.ev { border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 14px; background: #fff; }
.ev.closed { opacity: .7; }
.ev-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pill { display: inline-block; font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: var(--rose-soft); color: var(--rose-dark); font-weight: 600; }
.pill.off { background: #eee; color: #666; }
.linkrow { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.linkrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--bg); border: 1px solid var(--line); padding: 8px 10px; border-radius: 10px; font-size: .82rem; }
.linkrow .lbl { width: 62px; flex: none; font-size: .8rem; color: var(--muted); }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.modal { position: fixed; inset: 0; background: rgba(43, 32, 36, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 20px; max-width: 460px; width: 100%; max-height: 92vh; overflow: auto; text-align: center; }
.modal-box img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 60; }

/* ---------- Sales page ---------- */
.sales-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 30px 0 50px; }
@media (max-width: 760px) { .sales-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 10px; } }
.sales-hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); }
.price-tag { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.4rem; font-weight: 700; color: var(--rose-dark); margin: 18px 0 4px; }
.price-tag span:not([data-price]) { font-family: "DM Sans", sans-serif; font-size: .95rem; font-weight: 400; color: var(--muted); }
.phone { width: 250px; max-width: 80%; aspect-ratio: 9 / 18; margin: 0 auto; border-radius: 38px; background: var(--ink); padding: 12px; box-shadow: 0 30px 60px rgba(43, 32, 36, .25); }
.phone-screen { background: var(--bg); border-radius: 28px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; text-align: center; }
.phone-screen .mini-rec { width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c9657f, var(--rose) 55%, var(--rose-dark)); margin: 18px auto 10px; display: grid; place-items: center; color: #fff; }
.phone-screen .mini-rec svg { width: 30px; height: 30px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step-n { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.2rem; color: var(--gold); line-height: 1; }
.section { padding: 34px 0; }
.section > h2 { text-align: center; margin-bottom: 22px; font-size: 2.2rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 640px) { .ticks { grid-template-columns: 1fr; } }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--rose); font-weight: 700; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--rose); font-size: 1.2rem; }
details[open] summary::after { content: "–"; }
.cta-band { text-align: center; background: var(--rose-soft); border-radius: var(--radius); padding: 40px 20px; margin-top: 20px; }

@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; inset: 0; display: block !important; }
  #printArea img { width: 105mm; height: auto; }
}
