:root {
  --pink: #ff3eb5;
  --pink-dark: #d42d96;
  --bg: #fff7fb;
  --ink: #2a2233;
  --card: #ffffff;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
}
main { width: 100%; max-width: 520px; padding: 24px 20px 60px; }
.logo { font-weight: 900; font-size: 1.5rem; color: var(--pink); text-decoration: none; }
.logo small { color: #b89; font-weight: 400; font-size: .75rem; }
header { width: 100%; max-width: 520px; padding: 18px 20px 0; }
h1 { font-size: 2rem; line-height: 1.15; margin: 18px 0 10px; }
h1 .hl { color: var(--pink); }
p.sub { color: #6b5c78; margin-bottom: 22px; }
.btn {
  display: inline-block; background: var(--pink); color: #fff; border: none;
  font-size: 1.05rem; font-weight: 700; padding: 14px 28px; border-radius: 999px;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--pink-dark); }
.btn.secondary { background: #fff; color: var(--pink); border: 2px solid var(--pink); }
#retry:disabled { opacity: .6; cursor: default; background: var(--pink); }
/* F207: New look once the three redraws are used: plainly not pressable, still readable. */
.btn.secondary:disabled { color: #a8949f; border-color: #e3d6df; background: #faf6f8; cursor: not-allowed; }
.card-box {
  background: var(--card); border-radius: 16px; padding: 20px;
  box-shadow: 0 4px 20px rgba(212, 45, 150, .08); margin-bottom: 18px;
}
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=date], textarea, select {
  width: 100%; padding: 11px 12px; border: 1.5px solid #e8d5e2; border-radius: 10px;
  font-size: 1rem; background: #fff;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input { display: none; }
.pills span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid #e8d5e2; cursor: pointer; user-select: none; font-size: .95rem;
}
.pills input:checked + span { background: var(--pink); border-color: var(--pink); color: #fff; }
.preview-img, video.card-video { width: 100%; border-radius: 14px; display: block; }
.status-line { display: flex; align-items: center; gap: 10px; color: #6b5c78; }
.upload-thumb {
  display: block; width: 100%; max-width: 180px; max-height: 240px; object-fit: cover;
  margin: 0 auto 16px; border-radius: 12px;
}
.upload-thumb[hidden] { display: none; }
.spinner {
  width: 18px; height: 18px; border: 3px solid #f3cfe6; border-top-color: var(--pink);
  border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: #c0392b; font-weight: 600; }
/* F303: an empty date input keeps the text inputs' height (iOS draws it collapsed otherwise). */
input[type=date] { display: block; min-height: 46px; color: inherit; }
#unlock-form label:first-child { margin-top: 0; }
#unlock-form input { font-family: inherit; }
#gifter-error { margin-top: 10px; }
#unlock-form .btn { margin-top: 16px; }
/* F303: the share page's From line, under the title */
p.from { color: #6b5c78; font-weight: 600; margin: -6px 0 16px; }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.share-row { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.fineprint { font-size: .8rem; color: #a08fae; margin-top: 10px; }
.archetypes { display: flex; flex-direction: column; gap: 8px; }
.arch-card input { display: none; }
.arch-card .arch-body {
  display: block; border: 1.5px solid #e8d5e2; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; transition: border-color .1s, background .1s;
}
.arch-card input:checked + .arch-body {
  border-color: var(--pink); background: #fff0f9;
  box-shadow: 0 0 0 1px var(--pink);
}
.arch-emoji { font-size: 1.3rem; margin-right: 8px; }
.arch-name { font-weight: 800; }
.arch-tag { display: block; color: #6b5c78; font-size: .88rem; margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip {
  border: 1.5px solid #e8d5e2; background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: .85rem; cursor: pointer; color: var(--ink);
}
.chip:hover { border-color: var(--pink); color: var(--pink); }

.voice-picker { display: flex; flex-direction: column; gap: 6px; }
/* The radio is hidden from sight, not from the keyboard or a screen reader (F208): Tab reaches
   the voice in use, the arrow keys choose, and the focus shows on the row. */
.voice-opt { position: relative; }
.voice-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.voice-opt input:focus-visible + .voice-body { outline: 2px solid var(--pink); outline-offset: 2px; }
.voice-opt .voice-body {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid #e8d5e2; border-radius: 10px; padding: 8px 12px; cursor: pointer;
}
.voice-opt input:checked + .voice-body {
  border-color: var(--pink); background: #fff0f9; box-shadow: 0 0 0 1px var(--pink);
}
.voice-now { color: var(--pink); font-weight: 600; font-size: .85em; white-space: nowrap; }
.voice-play {
  width: 30px; height: 30px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--pink); color: #fff; font-size: .8rem; cursor: pointer;
}

.variant-card { display: block; margin: 8px 0; }
.variant-card input { display: none; }
.variant-card .variant-body {
  display: block; border: 1.5px solid #e8d5e2; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; font-size: .92rem; line-height: 1.45;
  color: #4a3d57; white-space: pre-wrap;
}
.variant-card input:checked + .variant-body {
  border-color: var(--pink); background: #fff0f9; box-shadow: 0 0 0 1px var(--pink);
}

.tune-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.tune-row input[type=range] { flex: 1; accent-color: var(--pink); }
.tune-end { font-size: .8rem; color: #a08fae; width: 64px; }
.tune-end:last-child { text-align: right; }

.steps { margin: 20px 0; padding-left: 0; list-style: none; }
.steps li { padding: 8px 0 8px 34px; position: relative; color: #6b5c78; }
.steps li::before {
  content: attr(data-n); position: absolute; left: 0; top: 6px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--pink); color: #fff;
  font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center;
}

/* ---- preview gate (2026-09-03 redesign: hear it, pick a take, approve) ---- */
.stage-box { padding: 12px; }
.stage { position: relative; }
.big-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 62, 181, .92); color: #fff; font-size: 1.7rem;
  box-shadow: 0 6px 24px rgba(212, 45, 150, .45); display: grid; place-items: center;
  padding-left: 4px; transition: transform .1s;
}
.big-play:hover { transform: translate(-50%, -50%) scale(1.05); }
.stage-bar { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 6px;
  border-radius: 999px; background: rgba(255, 255, 255, .45); overflow: hidden; }
.stage-bar i { display: block; height: 100%; width: 0; background: var(--pink); }
.takes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.take {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer;
  border: 1.5px solid #e8d5e2; border-radius: 12px; background: #fff; user-select: none;
}
.take.selected { border-color: var(--pink); background: #fff0f9; box-shadow: 0 0 0 1px var(--pink); }
.take.playing .take-play { background: var(--pink-dark); }
/* B024: a pick still on its way after a moment: its card says so, dashed, until the answer. */
.take.pending { border-style: dashed; border-color: var(--pink); }
.take.pending .take-meta span:not(.take-dur) { color: var(--pink-dark); }
#pick-error { margin: 8px 0 0; font-size: .85rem; }
.take-play { width: 36px; height: 36px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--pink); color: #fff; cursor: pointer; font-size: .85rem; }
.take-meta { display: flex; flex-direction: column; line-height: 1.2; border-radius: 6px; }
/* B023: the card's words are its radio; the keyboard focus on them shows as a ring around the
   whole card, as F208's does on a voice row (on the words alone where :has is not known). */
.take-meta:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
@supports selector(:has(*)) {
  .take-meta:focus-visible { outline: none; }
  .take:has(> .take-meta:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }
}
.take-meta b { font-size: .95rem; }
.take-meta span { font-size: .75rem; color: #a08fae; }
.prose-wrap { margin-top: 14px; padding: 12px 14px; background: #fbf5f9; border-radius: 12px; }
.prose-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #a08fae; margin-bottom: 6px; }
.prose { white-space: pre-wrap; line-height: 1.5; color: #4a3d57; font-size: .95rem; }
.prose.small { font-size: .9rem; }
.approve-box input[type=email] { margin-bottom: 10px; }
.btn.wide { display: block; width: 100%; }
.banner { display: flex; align-items: center; gap: 10px; background: #fff0f9;
  border: 1.5px solid var(--pink); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 14px; color: var(--pink-dark); font-weight: 600; position: sticky; top: 8px; z-index: 5; }
body.busy .stage-box, body.busy .approve-box, body.busy .changes { opacity: .55; pointer-events: none; }
body.busy { -webkit-user-select: none; user-select: none; }   /* a double click selects nothing */
details.changes { padding: 0; overflow: hidden; }
details.changes summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; }
details.changes summary::-webkit-details-marker { display: none; }
details.changes summary span { color: var(--pink); font-weight: 700; }
details.changes[open] summary { border-bottom: 1px solid #f0e3ec; }
.change { padding: 16px 20px; border-bottom: 1px solid #f0e3ec; }
.change:last-child { border-bottom: none; }
.change-h { font-weight: 700; margin-bottom: 2px; }
.change-p { color: #6b5c78; font-size: .9rem; margin-bottom: 10px; }
.change textarea { margin-bottom: 10px; }
.variant { margin-bottom: 12px; }
.variant .prose { margin-bottom: 8px; }
@media (max-width: 400px) { .takes { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
textarea { font-family: inherit; line-height: 1.45; }

/* ---- intake: a photo turned away (F107) ---- */
.field-alert {
  background: #fff0f9; border: 1.5px solid var(--pink); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.field-alert-msg { font-weight: 700; color: var(--pink-dark); }
.field-alert-note { font-size: .88rem; color: #6b5c78; margin-top: 4px; }
.btn.small { font-size: .92rem; padding: 9px 18px; margin-top: 10px; }
input[type=file].invalid { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 6px; }
#retry-form { margin-top: 16px; }
p.reassure { margin-top: 10px; color: #6b5c78; }
p.reassure b { color: var(--ink); }
/* B010: the page for a card that is taking longer than usual */
#delayed p + p { margin-top: 10px; }
/* F301: Unlock when checkout could not open (B020's holding page before it) */
#checkout-closed p + p { margin-top: 10px; }
#checkout-closed .btn { margin-top: 18px; }
/* F207: the redraws counter ("3 redraws left.") keeps its words together on a phone */
#restyles-left { white-space: nowrap; }

/* ---- F209: a picked take too long to animate ---- */
.too-long { background: #fff8e6; border: 1.5px solid #f0b429; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; }
.too-long p { margin: 0 0 8px; }
.too-long-h { font-weight: 700; }
.too-long .btn { margin-top: 2px; }
.take-dur.over { color: #b4540a; font-weight: 600; }
.btn.disabled, .btn.disabled:hover { background: #e9dfe5; color: #8f7d88; cursor: not-allowed; }

/* ---- F301: Unlock is a button in a POST form; the fixture's fake checkout ---- */
#unlock { font-family: inherit; line-height: inherit; }
#unlock:disabled, #unlock:disabled:hover { background: #e9dfe5; color: #8f7d88; cursor: not-allowed; }
#fake-checkout .checkout-item { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.checkout-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.checkout-thumb[hidden] { display: none; }
.checkout-what { font-weight: 600; }
.checkout-price { font-size: 1.6rem; font-weight: 900; color: var(--pink); }
#fake-checkout input[type=email] { margin-bottom: 12px; }
#fake-checkout .error { margin: -4px 0 12px; }
#pay { font-family: inherit; }
#pay:disabled { opacity: .6; cursor: default; }
.checkout-back { display: block; text-align: center; margin-top: 14px; color: var(--pink-dark);
  font-weight: 600; }
/* F309: the card video starts muted; the tap-for-sound pill sits on its lower edge. */
.video-wrap { position: relative; }
.unmute {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%);   /* clear of the controls bar */
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  background: rgba(30, 20, 40, .78); color: #fff; font: inherit; font-weight: 700;
  font-size: .95rem; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.unmute[hidden], .share-row [hidden] { display: none; }
/* F312: /thanks */
#thanks .btn { margin-top: 18px; }
/* F317: the Unlock form's Have a code?: a small link under Unlock, opening to a field and Apply. */
#code-field { margin-top: 10px; text-align: center; }
#code-field summary { display: inline-block; min-height: 44px; padding: 12px 6px; cursor: pointer; list-style: none;
  color: var(--pink); font-weight: 600; font-size: .95rem; }
#code-field summary::-webkit-details-marker { display: none; }
#code-field .code-row { display: flex; gap: 8px; align-items: stretch; text-align: left; }
#code-field #code-input { flex: 1; min-width: 0; text-transform: uppercase; }
#unlock-form #code-apply { margin-top: 0; padding: 10px 18px; min-height: 44px; font-family: inherit; }
#code-error { margin-top: 8px; text-align: left; }
