:root {
  --plum: #3a1f5c;
  --plum-2: #55308a;
  --coral: #e8503f;
  --coral-2: #c93e2f;
  --sun: #ffc94d;
  --cream: #fff8ee;
  --paper: #ffffff;
  --ink: #1d1a26;
  --muted: #625b6e;
  --line: #eadfce;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(58, 31, 92, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum-2); }
h1, h2 { font-family: Fraunces, Georgia, serif; line-height: 1.15; color: var(--plum); }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin: 0.15em 0 0.35em; }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 0 0 0.7em; }
[hidden] { display: none !important; }

.top {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1120px; margin: 0 auto; padding: 16px;
}
.brand { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.1rem; color: var(--plum); text-decoration: none; }
.brand-mark { color: var(--coral); }
.top-cta { font-weight: 600; text-decoration: none; color: var(--coral); }

.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.76rem; font-weight: 600; color: var(--coral); margin: 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; margin: 0 0 1.1em; }
.fine { font-size: 0.85rem; color: var(--muted); margin: 0.6em 0 0; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The maker is the first screen: copy and form on the left, the result (or a sample) on the right. */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 8px 16px 56px;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start;
}
.card-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.maker-result { position: sticky; top: 16px; text-align: center; max-width: 400px; width: 100%; justify-self: center; }

.step { margin: 0 0 22px; }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 0.6em; }
.num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--plum); color: #fff;
  display: grid; place-items: center; font-family: Inter, system-ui, sans-serif; font-size: 0.9rem; font-weight: 700;
}

.photo-box { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: start; }
.photo-pick {
  display: grid; place-items: center; aspect-ratio: 9 / 16; border: 2px dashed var(--sun); border-radius: 14px;
  background: var(--cream); cursor: pointer; text-align: center; overflow: hidden; color: var(--muted);
  font-size: 0.8rem; line-height: 1.35; padding: 8px;
}
.photo-pick:hover, #photoInput:focus-visible + .photo-pick { border-color: var(--coral); }
.photo-pick strong { display: block; color: var(--coral); font-size: 0.98rem; margin-bottom: 4px; }
.photo-pick.has-photo { border-style: solid; border-color: var(--plum-2); padding: 0; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-side .fine:first-child { margin-top: 0; }
.photo-side .btn-mini { margin-top: 10px; }
.crop { margin-top: 12px; font-size: 0.85rem; font-weight: 600; color: var(--plum); }
.crop input { width: 100%; margin-top: 6px; accent-color: var(--coral); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--plum); }
.field input {
  font: inherit; font-weight: 400; color: var(--ink); padding: 11px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; width: 100%;
}
.field input:focus { outline: none; border-color: var(--plum-2); box-shadow: 0 0 0 3px rgba(85, 48, 138, 0.15); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.92rem; font-weight: 600; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--plum);
}
.chip:hover { border-color: var(--plum-2); }
.chip[aria-checked="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.lyric { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; }
.lyric strong { color: var(--plum); font-family: Fraunces, Georgia, serif; font-size: 1.05rem; overflow-wrap: anywhere; }
.form-error { color: var(--coral-2); font-weight: 600; margin: 0 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; cursor: pointer;
  padding: 12px 22px; text-decoration: none; transition: transform 0.08s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-2); }
.btn-dark { background: var(--plum); color: #fff; }
.btn-dark:hover { background: var(--plum-2); }
.btn-ghost { background: transparent; color: var(--plum); border: 1.5px solid var(--line); margin-top: 10px; }
.btn-ghost:hover { border-color: var(--plum-2); }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-mini { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--coral); background: var(--coral); color: #fff; cursor: pointer; white-space: nowrap; }
.btn-mini-ghost { background: transparent; color: var(--plum); border-color: var(--line); }
.btn-mini-ghost:hover { background: var(--cream); border-color: var(--plum-2); }
.linklike { font: inherit; color: var(--plum-2); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* Video player: a 9:16 frame, a "tap for sound" button, and the site address over the picture. */
.player { margin: 0; }
.player-frame { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #241a33; box-shadow: var(--shadow); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tap {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--plum); background: rgba(255, 255, 255, 0.95);
  border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.tap:hover { background: #fff; }
.tap-icon { color: var(--coral); }
.wm {
  position: absolute; left: 10px; top: 10px; z-index: 1; pointer-events: none;
  font-size: 0.74rem; font-weight: 600; color: #fff; background: rgba(20, 16, 30, 0.55); border-radius: 999px; padding: 4px 10px;
}
.player figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; overflow-wrap: anywhere; }
#emptyBox .player, #readyBox .player { max-width: 300px; margin: 0 auto; }

/* Waiting: the visitor's own photo with notes floating up, an honest clock, and a way to leave. */
.stage { position: relative; width: 132px; aspect-ratio: 9 / 16; margin: 4px auto 16px; border-radius: 14px; background: var(--cream); border: 2px solid var(--sun); }
.stage img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; animation: sway 2.4s ease-in-out infinite; }
.stage.no-photo::before { content: "♪"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; color: var(--plum-2); }
.note { position: absolute; font-size: 1.5rem; color: var(--coral); opacity: 0; animation: float 2.8s ease-in infinite; }
.n1 { left: -22px; bottom: 30%; }
.n2 { right: -24px; bottom: 45%; animation-delay: 0.9s; color: var(--plum-2); }
.n3 { right: -8px; bottom: 15%; animation-delay: 1.8s; }
@keyframes float { 0% { opacity: 0; transform: translateY(10px) rotate(-8deg); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) rotate(12deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
.bar { height: 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); overflow: hidden; margin: 14px 0 8px; }
.bar-fill { height: 100%; width: 3%; background: linear-gradient(90deg, var(--plum-2), var(--coral)); transition: width 0.9s linear; }
.progress-time { margin: 0; color: var(--muted); font-size: 0.95rem; }
.progress-time strong { color: var(--plum); font-variant-numeric: tabular-nums; }
.leave { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.leave .fine { margin: 0 0 10px; }

.actions { margin-top: 14px; }
.share-box { text-align: left; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.share-row { display: flex; gap: 8px; margin-top: 10px; }
.share-row .btn { flex: 1; padding: 11px 12px; }
.paid-note { font-weight: 600; color: var(--plum-2); margin: 0 0 10px; }
#readyTitle { margin-bottom: 0.6em; overflow-wrap: anywhere; }

.how, .gallery, .faq { max-width: 1120px; margin: 0 auto; padding: 0 16px 56px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 58px; position: relative; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--plum); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.gallery-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.gallery-grid .tap { font-size: 0.78rem; padding: 8px 11px; gap: 5px; }
#galleryNote { margin-top: 14px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--plum); }
.faq p { margin: 10px 0 2px; color: var(--muted); }

.foot { text-align: center; padding: 28px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); }
.foot a { color: var(--muted); }

.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 56px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }

/* Search landing pages: their own text and questions between the maker and "How it works". */
.page-intro { max-width: 820px; margin: 0 auto 44px; padding: 0 16px; }
.page-intro h2 { margin-bottom: 8px; }
.page-intro p { color: var(--muted); line-height: 1.6; }
.page-faq { max-width: none; padding: 0; margin-top: 18px; }
.page-links { max-width: 1120px; margin: 0 auto 44px; padding: 0 16px; }
.page-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.page-links a { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--plum); text-decoration: none; font-size: 0.9rem; background: var(--paper); }
.page-links a:hover { border-color: var(--plum-2); }

/* Share page /s/<id> and the 404 page */
.share, .notfound { max-width: 420px; margin: 0 auto; padding: 4px 16px 48px; text-align: center; }
.share h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); overflow-wrap: anywhere; }
.share .player { margin-bottom: 18px; }
.share .player figcaption { font-family: Fraunces, Georgia, serif; font-size: 1.05rem; color: var(--plum); }
.notfound { padding-top: 40px; }
.notfound .btn { margin-top: 14px; }

/* Turnstile widget: invisible unless Cloudflare asks for a click. */
.human-check:empty { display: none; }
.human-check { display: flex; justify-content: center; margin: 0 0 0.8em; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 40px; }
  .maker-result { position: static; }
  .steps { grid-template-columns: 1fr; }
  /* A row to swipe through, so six tall clips don't make a very long page. */
  .gallery-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .gallery-grid .player { flex: 0 0 46%; max-width: 220px; scroll-snap-align: start; }
}
@media (max-width: 520px) {
  .card-panel { padding: 16px; }
  .top-cta { display: none; }
  .photo-box { grid-template-columns: 104px 1fr; gap: 12px; }
  .lead { font-size: 1rem; }
  .gallery-grid .player { flex-basis: 58%; }
}
@media (prefers-reduced-motion: reduce) {
  .stage img, .note { animation: none; }
  .note { opacity: 1; }
  html { scroll-behavior: auto; }
}
