/* Invitation maker: steps on the left, live card on the right (on top, on phones). */

.maker-head { flex-wrap: wrap; }
.stepper { display: flex; gap: 0.35rem; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.stepper button {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0.3rem 0.7rem;
  font: inherit; font-size: 0.95rem; color: var(--slate); background: none; border: 0; border-radius: var(--radius-control);
  cursor: pointer;
}
.stepper li { counter-increment: s; }
.stepper button::before {
  content: counter(s); display: grid; place-items: center; width: 1.6rem; height: 1.6rem;
  font-size: 0.85rem; border: 1px solid currentColor; border-radius: 50%;
}
.stepper button:hover { color: var(--plum); }
.stepper button[aria-current="step"] { color: var(--plum); font-weight: 700; }
.stepper button[aria-current="step"]::before { background: var(--plum); border-color: var(--plum); color: #fff8fa; }

.maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 4rem; align-items: start; padding-bottom: 4rem; }
.maker-main { min-width: 0; padding-top: 1rem; }
.step h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.step h1:focus { outline: none; }
.step-help { margin: 0.8rem 0 1.8rem; max-width: 34em; color: var(--slate); font-size: 1.08rem; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

/* Radio choices: the input is visually hidden; the label shows state and focus. */
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: var(--radius-control); }

.occasion-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
.occasion-choices .choice { display: grid; grid-template-columns: auto 1fr; column-gap: 0.7rem; padding: 0.85rem 0.2rem; border-bottom: 1px solid var(--rule); }
.occasion-choices .choice::before {
  content: ""; grid-row: span 2; width: 1.1rem; height: 1.1rem; margin-top: 0.35rem;
  border: 1px solid #c9a9b9; border-radius: 50%; background: var(--paper);
}
.occasion-choices .choice:has(input:checked)::before { border: 5px solid var(--plum); }
.choice-name { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; color: var(--plum); }
.choice-note { color: var(--slate); font-size: 0.92rem; }

.design-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1.2rem; }
.design-choices .choice { display: grid; gap: 0.6rem; padding: 0.55rem; border: 1px solid transparent; border-radius: 8px; }
.design-choices .choice:has(input:checked) { border-color: var(--plum); background: rgb(74 29 63 / 0.05); }
.design-choices .choice-name { font-size: 1.2rem; }

.verse-choices { display: grid; gap: 0.6rem; max-width: 40rem; }
.verse-choices .choice { padding: 1rem 1.15rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.verse-choices .choice:has(input:checked) { border-color: var(--plum); box-shadow: inset 4px 0 0 var(--plum); }
.verse-text { display: block; font-style: italic; line-height: 1.5; }
.verse-ref { display: block; margin-top: 0.3rem; color: var(--slate); font-size: 0.92rem; }
.own-verse { display: grid; gap: 1rem; max-width: 40rem; margin-top: 1.25rem; }

.group { display: grid; gap: 1.1rem; max-width: 40rem; margin-bottom: 2.2rem; }
.group legend { margin-bottom: 0.9rem; font-family: var(--font-display); font-size: 1.5rem; color: var(--plum); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.linkbox { display: flex; gap: 0.6rem; max-width: 40rem; }
.linkbox input { font-size: 0.95rem; color: var(--slate); }
.linkbox .btn { flex: none; white-space: nowrap; }
.copied { min-height: 1.6em; margin: 0.5rem 0 1rem; color: var(--plum); font-weight: 700; }
.send-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.privacy { max-width: 36em; margin-top: 1.5rem; }
.start-over { margin-top: 1.5rem; }

.maker-nav { display: flex; justify-content: space-between; gap: 1rem; max-width: 40rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.maker-nav .btn[hidden] { display: none; }
.maker-nav #next { margin-left: auto; }

.maker-preview { position: sticky; top: 1.5rem; }
.stage { padding: 2.2rem; background: #f2dbe5; border-radius: 4px; }
/* An animated invitation is shown whole, in its story shape, and never taller than the window. */
.stage .inv--film { aspect-ratio: 9 / 16; width: min(100%, calc((100dvh - 11rem) * 9 / 16)); margin-inline: auto; }
.stage .inv-film { margin-top: 0; }
.video-status { margin: 0.9rem 0 0; }
.send-actions .btn[hidden] { display: none; }
.preview-caption { margin: 0.8rem 0 0; color: var(--slate); font-size: 0.92rem; text-align: center; }

@media (max-width: 980px) {
  .maker { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .maker-preview { position: static; order: -1; }
  .stage { display: flex; justify-content: center; padding: 1rem; }
  .stage .inv-wrap { width: min(280px, 52vw); }
  .stage .inv--film { width: min(100%, 210px); }
  .stepper button { font-size: 0; gap: 0; padding: 0.3rem; }
  .stepper button[aria-current="step"] { font-size: 0.95rem; gap: 0.45rem; }
}

@media (max-width: 640px) {
  .occasion-choices { grid-template-columns: minmax(0, 1fr); }
  .design-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair, .linkbox { grid-template-columns: minmax(0, 1fr); flex-direction: column; }
  .maker-nav { position: sticky; bottom: 0; margin-inline: -1.25rem; padding: 0.8rem 1.25rem; background: var(--blush); }
}

/* Print only the card. */
@media print {
  @page { size: 5in 7in; margin: 0; }
  body { background: none; }
  body > *:not(main), .maker-main, .preview-caption, .skip { display: none !important; }
  .maker, .maker-preview, .stage { display: block; padding: 0; margin: 0; width: auto; background: none; position: static; }
  .stage .inv-wrap { width: 5in; }
  .inv { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .inv-film-toggle { display: none; }
  /* An animated invitation prints as a still, cropped to the printed card's shape. */
  .stage .inv--film { aspect-ratio: 5 / 7; width: 100%; }
  .stage .inv-film { margin-top: -5%; }
}
