/* RSVP · the photobooth.
   Site = beach palette (cream, aqua, blue, ocean ink); sepia lives only in the booth window and on the strips,
   and the papel picado only on the booth window.
   Steps: find → attend → details → booth → done (main[data-step]); the camera has phases (main[data-phase]). */

[hidden] { display: none !important; }

@view-transition { navigation: auto; }

:root {
  --frame-aspect: 752 / 895;
  --flash: #fffcf2;
  --hair: color-mix(in oklab, var(--ink) 30%, transparent);
  --line: color-mix(in oklab, var(--ink) 22%, transparent);
  --field: color-mix(in oklab, #fff 52%, var(--cannoli-cream));
  --safe-b: env(safe-area-inset-bottom, 0px);
  --strip-w: 150px;
  /* the cut-paper strip image carries its own shadow: film.js VIEW_PAD (14 px each side of 440, 26 below) */
  --pad-x: calc(14 / 468 * 100%);
}

/* ───────── view transition: the RSVP button grows into the booth window ───────── */
.booth__window { view-transition-name: rsvp; }
::view-transition-group(rsvp) {
  animation-duration: .6s;
  animation-timing-function: cubic-bezier(.65, 0, .35, 1);
  overflow: clip;
}
::view-transition-old(rsvp) { animation: rsvp-vt-out .2s ease-out both; height: 100%; object-fit: cover; }
::view-transition-new(rsvp) { animation: rsvp-vt-in .28s ease-out both; height: 100%; object-fit: cover; }
@keyframes rsvp-vt-out { to { opacity: 0; } }
@keyframes rsvp-vt-in { from { opacity: 0; } }

/* ───────── page ───────── */
html { background: var(--bg); }
body { overflow-x: hidden; }
body::before {                       /* a breath of shallow water at the foot of the page */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(130% 60% at 50% 120%, color-mix(in oklab, var(--iced-aqua) 58%, transparent), transparent 72%),
    radial-gradient(90% 50% at 90% -10%, color-mix(in oklab, var(--sea-pearl) 70%, transparent), transparent 70%);
}
main.rsvp {
  position: relative; z-index: 0; isolation: isolate;
  padding: var(--nav-h, 0px) 0 0;
  min-height: 100svh;
  overflow-x: clip;            /* the rail runs edge to edge; clip, not hidden, so sticky columns still work */
}

.flash { position: fixed; inset: 0; z-index: 9000; background: var(--flash); opacity: 0; pointer-events: none; }

/* ───────── the curtain: papel picado inside the booth window only ───────── */
.curtain { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.curtain__row {
  position: absolute; left: -4%; width: 108%;
  top: calc(var(--r) * 32.3% - 3.5%);
  display: flex; will-change: transform;
}
.curtain__flag { flex: 0 0 33.3334%; transform-origin: 50% 7%; }
.curtain__sway { transform-origin: 50% 7%; }
.curtain__sway svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 3px 3px rgba(16, 10, 4, .42)); }
/* at rest the valance breathes, ever so slightly */
.curtain[data-at="peek"] .curtain__sway { animation: curtain-sway var(--d, 4s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes curtain-sway {
  from { transform: rotate(calc(var(--a, .6deg) * -1)) skewX(calc(var(--a, .6deg) * .5)); }
  to   { transform: rotate(var(--a, .6deg)) skewX(calc(var(--a, .6deg) * -.5)); }
}
html:not(.js) .curtain { display: none; }

/* ───────── the stage ───────── */
.stage {
  --win-h: clamp(150px, 30svh, 260px);
  position: relative;
  min-height: calc(100svh - var(--nav-h, 0px));
  display: grid; grid-template-columns: minmax(0, 1fr);
  justify-items: center; align-content: start;
  row-gap: clamp(14px, 2.4svh, 26px);
  padding: clamp(18px, 3.4svh, 34px) var(--gutter) calc(var(--safe-b) + 56px);
}
.booth-col { position: relative; display: grid; justify-items: center; }
.panel { position: relative; width: min(100%, 30rem); display: grid; gap: 0; }

/* the step bar: back on the left, how far along on the right — the same spot on every step */
.stepbar { width: min(100%, 30rem); min-height: 44px; display: flex; align-items: center; gap: 12px; }
.stepbar .progress { margin-left: auto; }

/* phone window sizes per step: the booth steps back while the forms need the room */
.rsvp[data-step="attend"] .stage,
.rsvp[data-step="details"] .stage { --win-h: clamp(104px, 15svh, 150px); }
.rsvp[data-step="booth"] .stage { --win-h: clamp(200px, 40svh, 380px); }
.rsvp[data-phase="live"] .stage,
.rsvp[data-phase="shooting"] .stage,
.rsvp[data-phase="asking"] .stage {
  --win-h: max(220px, min(58svh, 100svh - var(--nav-h, 0px) - 250px, (100vw - 2 * var(--gutter)) / .84));
}
.rsvp[data-step="done"] .booth { display: none; }

/* ───────── the booth window ───────── */
.booth { position: relative; display: grid; justify-items: center; gap: 10px; }
.booth__window {
  position: relative; isolation: isolate; overflow: hidden;
  height: var(--win-h); aspect-ratio: var(--frame-aspect);
  border-radius: 3px; background: var(--film-ink);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--ink) 16%, transparent),
    0 34px 60px -34px color-mix(in oklab, var(--ink) 60%, transparent);
}
.booth__us, .booth__us img, .booth__cam, .booth__shade, .booth__pop, .booth__count {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.booth__us img { object-fit: cover; opacity: 0; }
.booth__cam { object-fit: cover; opacity: 0; filter: grayscale(1) sepia(.46) contrast(1.2) brightness(1.04); }
.booth__cam.is-mirrored { transform: scaleX(-1); }
.booth__shade { pointer-events: none; background: radial-gradient(120% 100% at 50% 44%, transparent 46%, rgba(20, 14, 8, .46) 100%); }
.booth__pop { background: #fff6e4; opacity: 0; pointer-events: none; }
/* the 3 · 2 · 1: .t-numeral .t-extrude (type.css), sized to the window */
.booth__count { z-index: 4; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.booth__count.t-numeral { font-size: calc(var(--win-h) * .42); line-height: 1; }
.booth__note {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 10%; margin: 0; text-align: center; pointer-events: none;
  color: var(--cannoli-cream);                                    /* .t-label, on the dark window */
  text-shadow: 0 1px 8px rgba(20, 14, 8, .7); opacity: 0; transition: opacity var(--dur-sm) var(--ease-out);
}
.booth__note.is-on { opacity: .95; }

/* the frames you've taken, only while shooting */
.pips { list-style: none; margin: 0; padding: 4px; display: none; gap: 4px; background: var(--film-ink); border-radius: 2px; }
.rsvp[data-phase="shooting"] .pips { display: flex; }
.pips li { width: 26px; aspect-ratio: var(--frame-aspect); border-radius: 1px; background: #2c251d center / cover no-repeat; transition: box-shadow var(--dur-sm) var(--ease-out); }
.pips li.is-next { box-shadow: 0 0 0 1px var(--cannoli-cream); }

/* ───────── panel type: roles from /kit/type.css (docs/site/type.md); only layout and local sizes here ───────── */
.page-title { margin: 0; text-align: center; }                               /* .t-title .t-pop: the one page title */
.mast { margin: 10px 0 18px; text-align: center; padding-left: .24em; }      /* .t-eyebrow: centred tracked line */
.step-title { margin: 0; outline: none; text-align: center; }               /* .t-heading (or .t-script below) */
/* "Your turn." and "See you in Mexico.": brush asides, a little larger than the role's default */
.step-script { --type-swash: var(--type-edge); font-size: clamp(2.1rem, 1.55rem + 2.4vw, 3rem); line-height: 1.3; margin: 2px 0 2px; }
.lede { margin: 10px auto 0; max-width: 26rem; text-align: center; }          /* .t-lead */
.fine { margin: 12px 0 0; text-align: center; text-wrap: balance; }         /* .t-small */
.when { display: grid; justify-items: center; gap: 4px; margin: 12px 0 0; text-align: center; }
.when__place { color: var(--type-accent); }                                 /* .t-fat: the place name */
/* once the RSVP is sent (photobooth, reveal), "kindly reply by" has done its job */
.rsvp:is([data-step="booth"], [data-step="done"]) .mast { display: none; }
.rsvp:is([data-step="booth"], [data-step="done"]) .page-title { margin-bottom: 14px; }

.progress { display: flex; align-items: center; gap: 10px; margin: 0; }
/* back: on every step after the first */
.back {
  display: inline-flex; align-items: center; gap: .4em; min-height: 44px; min-width: 44px; margin: 0 0 0 -2px; padding: 0 .6em 0 0;
  border: 0; background: none; cursor: pointer; color: var(--type-ink);       /* .t-label */
  text-decoration: none; text-underline-offset: .3em;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .back:hover { text-decoration: underline; } }
/* booth step: the RSVP itself is already in */
.sent { display: flex; align-items: center; justify-content: center; gap: .55em; margin: 0 0 8px; }   /* .t-label */
.sent__tick { width: 1.35em; height: 1.35em; border-radius: 50%; background: var(--blue-heaven); position: relative; flex: none; }
.sent__tick::after { content: ""; position: absolute; left: .38em; top: .3em; width: .55em; height: .3em; border-left: 2px solid var(--cannoli-cream); border-bottom: 2px solid var(--cannoli-cream); transform: rotate(-45deg); }
.input--area { min-height: 96px; resize: vertical; line-height: 1.45; }
.progress__text { margin: 0; }                                             /* .t-label */
.progress__bar { list-style: none; display: flex; gap: 5px; margin: 0; padding: 0; }
.progress__bar li { width: 22px; height: 3px; border-radius: 3px; background: color-mix(in oklab, var(--ink) 14%, transparent); transition: background var(--dur-md) var(--ease-out); }
.progress__bar li.is-done { background: var(--blue-heaven); }
.progress__bar li.is-now { background: var(--moonlit-ocean); }

.view { display: grid; gap: 0; }
.sub { display: grid; }

/* ───────── controls ───────── */
.btn { min-height: 52px; justify-content: center; -webkit-tap-highlight-color: transparent; }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:focus-visible { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .btn--solid:hover { background: var(--blue-heaven); border-color: var(--blue-heaven); color: var(--bg); } }
.btn--line { background: transparent; color: var(--ink); }
.btn--wide { width: 100%; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 .5em; border: 0; background: none; cursor: pointer;
  font: 400 .95rem/1.3 var(--type-text); color: var(--type-ink-soft);          /* quiet text links, 15 px+ */
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .link:hover { color: var(--ink); text-decoration-color: currentColor; } }
.link--inline { min-height: 0; padding: .3em 0; }

.actions { display: grid; justify-items: center; gap: 4px; margin-top: 20px; }

/* fields */
.field { display: grid; gap: 5px; margin-top: 14px; }
.field__label, .field__sub { padding: 0; }                                  /* .t-label */
.group__legend { padding: 0; margin-bottom: 2px; }                            /* .t-subhead */
.opt { font: 400 .875rem/1.2 var(--type-text); text-transform: none; letter-spacing: 0; color: var(--type-ink-soft); }
.req { color: var(--baltic-amber); }
.input {
  width: 100%; min-height: 52px; padding: .78rem .95rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--field);
  font: 400 1.0625rem/1.35 var(--type-text); color: var(--type-ink);        /* 17 px: legible, and iOS won't zoom */
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur-sm) var(--ease-out), box-shadow var(--dur-sm) var(--ease-out);
}
.input::placeholder { color: color-mix(in oklab, var(--ink) 42%, var(--bg)); }
.input:focus { outline: none; border-color: var(--blue-heaven); box-shadow: 0 0 0 3px color-mix(in oklab, var(--iced-aqua) 80%, transparent); }
.input[aria-invalid="true"] { border-color: var(--baltic-amber); box-shadow: 0 0 0 3px color-mix(in oklab, var(--baltic-amber) 18%, transparent); }
.help { margin: 0; }                                                       /* .t-small */
.field__err, .error { margin: 0; color: #7a3f2c; }                           /* .t-small, in a warm red (7 : 1 on cream) */
.field__err:empty, .error:empty { display: none; }
.error { margin-top: 14px; text-align: center; }
.hint { margin: 8px 0 0; min-height: 1.5em; text-align: center; }          /* .t-small */
.group { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.group > .field:first-of-type { margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.row2 > .field { min-width: 0; }
.row2--street { grid-template-columns: minmax(0, 1fr) 6.6rem; }
.group > .row2:first-of-type > .field { margin-top: 8px; }
/* a field's error under a row of two */
.row2 + .field__err { margin-top: 6px; }
/* email: styled like the address group; a second address on request */
.group--email { margin-top: 18px; }
.group--email .field:first-of-type { margin-top: 8px; }
.link--add { justify-self: start; margin-top: 8px; font-size: .9rem; }
.link--add::before { content: "+"; margin-right: .35em; text-decoration: none; display: inline-block; }
/* allergies: the name beside the field, one line each */
.diet-row { grid-template-columns: minmax(4.5rem, max-content) minmax(0, 1fr); align-items: center; column-gap: 12px; margin-top: 8px; }
.diet-row .field__sub { overflow-wrap: anywhere; }
.note {
  margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; color: var(--type-ink);   /* .t-small */
  background: color-mix(in oklab, var(--iced-aqua) 40%, transparent);
}
.note--warn { background: color-mix(in oklab, var(--baltic-amber) 16%, transparent); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* "Saved" sits just under the panel, so it never pushes anything around */
.saved { position: absolute; top: 100%; left: 0; right: 0; margin: 10px 0 0; transition: opacity var(--dur-md) var(--ease-out); }

/* find: the name combobox */
.find { margin-top: 22px; display: grid; gap: 6px; }
.combo { position: relative; }
.combo__input { padding-right: 2.6rem; }
.combo__spin {
  position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  border: 2px solid var(--blue-heaven); border-right-color: transparent; opacity: 0; transition: opacity .2s;
}
.combo.is-busy .combo__spin { opacity: 1; animation: spin .8s linear infinite; }
.combo__list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; max-height: min(22rem, 52svh); overflow: auto;
  background: var(--cannoli-cream); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(42, 59, 78, .2), 0 0 0 1px rgba(42, 59, 78, .1);
}
.combo__opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: .8rem .9rem; border-radius: 8px; cursor: pointer; color: var(--ink);
}
.combo__opt[aria-selected="true"] { background: color-mix(in oklab, var(--iced-aqua) 70%, transparent); }
@media (hover: hover) { .combo__opt:hover { background: color-mix(in oklab, var(--iced-aqua) 45%, transparent); } }
.combo__opt mark { background: none; color: inherit; font-weight: 700; }
.combo__hint { white-space: nowrap; }                                         /* .t-small */

.lost { margin-top: 18px; text-align: center; }
.lost summary {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none;
  font: 400 .95rem/1.3 var(--type-text); color: var(--type-ink-soft); text-decoration: underline; text-underline-offset: .3em;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
}
.lost summary::-webkit-details-marker { display: none; }
.lost__form { text-align: left; margin-top: 6px; padding: 16px; border-radius: 12px; background: color-mix(in oklab, var(--sea-pearl) 55%, transparent); }
.lost__form .btn { margin-top: 16px; width: 100%; }

/* attend: the party and one choice per person */
.attend { margin-top: 18px; }
.party { text-align: center; }
.party__label { margin: 0; }                                               /* .t-label */
.party__names { margin: 4px 0 0; }                                            /* .t-subhead */
.people { display: grid; gap: 14px; margin-top: 16px; }
.person { border: 0; margin: 0; padding: 0; min-width: 0; }
.person__name { padding: 0; margin-bottom: 8px; }                          /* .t-subhead */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice__opt { position: relative; display: block; }
.choice__opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice__opt span {
  display: flex; align-items: center; justify-content: center; gap: .45em; min-height: 54px; padding: .6rem .5rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--field);
  font: 800 var(--type-size-button)/1.1 var(--type-caps); letter-spacing: .1em; text-transform: uppercase;   /* like a button */
  text-align: center; color: var(--type-ink);
  transition: background var(--dur-sm) var(--ease-out), color var(--dur-sm) var(--ease-out), border-color var(--dur-sm) var(--ease-out);
}
.choice__opt input:checked + span { border-color: var(--ink); }
.choice__opt input[value="yes"]:checked + span { background: var(--ink); color: var(--cannoli-cream); }
.choice__opt input[value="no"]:checked + span { background: var(--sea-pearl); }
.choice__opt input:checked + span::before {
  content: ""; width: .9em; height: .5em; margin-top: -.25em;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}
.choice__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.person[aria-invalid="true"] .choice__opt span { border-color: var(--baltic-amber); }
.plus__name { margin-top: 2px; }
.plus__name .field { margin-top: 10px; }
#plusErr { margin-top: 6px; }

/* booth step */
.shot-status { margin: 4px 0 0; text-align: center; padding-left: .24em; }   /* .t-eyebrow */

/* details */
.details { margin-top: 6px; }

/* done */
.summary { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; text-align: center; }   /* .t-body */
.summary b { font-weight: 700; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; margin-top: 22px; }
.cal-wrap { position: relative; }
.done-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin: 16px 0 0; }

/* ───────── the end: our strip, and yours printing out next to it ───────── */
.hang { position: relative; width: 100%; padding-top: 6px; }
.hang__rail { height: 1px; background: var(--hair); margin: 0 calc(var(--gutter) * -1); }
.hang__strips { display: flex; justify-content: center; align-items: flex-start; gap: clamp(18px, 6vw, 34px); padding: 0 6px; }
.strip { position: relative; margin: 0; width: var(--strip-w); }
/* yours: the paper is 1.12× ours (its frames then match), and the image carries 14 px of shadow room each side */
.strip--yours { width: calc(var(--strip-w) * 1.12 * 468 / 440); }
.strip__slot {
  position: absolute; z-index: 2; top: -2px; left: -7px; right: -7px; height: 4px;
  border-radius: 2px; background: var(--ink); box-shadow: 0 6px 9px -4px rgba(29, 24, 19, .5);
}
.strip--yours .strip__slot { left: calc(var(--pad-x) - 7px); right: calc(var(--pad-x) - 7px); }
/* the clip is the mouth of the slot: the paper slides down out of it. Transforms and opacity only (no filters):
   Safari can leave part of a filtered, moving, clipped image unpainted. */
.strip__clip { overflow: hidden; margin: 0 -26px -40px; padding: 0 26px 40px; transform-origin: 50% 0; }
.strip__paper { position: relative; will-change: transform; }
.strip__paper img { display: block; width: 100%; height: auto; }
.strip--ours .strip__paper img { border-radius: 1.5px; box-shadow: 0 1px 2px rgba(29, 24, 19, .28), 0 18px 28px -14px rgba(29, 24, 19, .42); }
/* developing: a pale veil the shape of the cut paper, fading away */
.strip__fog {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: #f7f2e6;
  -webkit-mask: var(--mask, none) center / 100% 100% no-repeat;
          mask: var(--mask, none) center / 100% 100% no-repeat;
}
.strip__cap { margin-top: 14px; text-align: center; padding-left: .14em; }  /* .t-label */

/* phones and tablets */
@media (max-width: 859px), (max-aspect-ratio: 11/10) {
  .stage { padding-top: 6px; row-gap: clamp(10px, 1.8svh, 20px); }
  .stepbar { margin-bottom: -4px; }
  .rsvp[data-step="done"] .booth-col { display: none; }
  /* while the camera is on, the window gets the room */
  .rsvp:is([data-phase="live"], [data-phase="shooting"], [data-phase="asking"]) :is(.stepbar, .page-title, .mast) { display: none; }
  .rsvp:is([data-phase="live"], [data-phase="shooting"], [data-phase="asking"]) .stage { padding-top: 14px; }

  /* the end: "See you in Mexico." leads (the page title stays for screen readers) */
  .rsvp[data-step="done"] .page-title {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .rsvp[data-step="done"] .stage { padding-top: 14px; }
  /* the strips hang between the words and the buttons, sized so the whole screen fits */
  .view[data-view="done"] .hang {
    margin: 16px 0 0;
    --strip-w: clamp(56px, min(22vw, (100svh - var(--nav-h, 0px) - 360px - var(--rows, 2) * 26px) / 5.25), 112px);
  }
  .view[data-view="done"] .lede { margin-top: 6px; }
  .view[data-view="done"] .strip__cap { margin-top: 8px; }
  .view[data-view="done"] .summary { margin-top: 12px; gap: 2px; }
  .view[data-view="done"] .done-actions { margin-top: 14px; gap: 8px 10px; }
  .view[data-view="done"] .done-links { margin-top: 8px; gap: 0 18px; }
  .view[data-view="done"] .fine { margin-top: 2px; }
}

/* phones (not tall tablets): every step after the first gets straight to the point — the page title has said
   "RSVP" on step 1, and the photos of us step aside while the forms need the room (James, round 3) */
@media (max-width: 859px) and (max-height: 959px), (max-aspect-ratio: 11/10) and (max-height: 959px) {
  .rsvp:not([data-step="find"]) .page-title {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .rsvp:not([data-step="find"]) .mast { display: none; }
  .rsvp:is([data-step="attend"], [data-step="details"]) .booth-col { display: none; }
  .rsvp[data-step="find"] .mast { margin: 6px 0 12px; }
  .view[data-view="find"] .lede { margin-top: 6px; }
  .find { margin-top: 14px; }
  .lost { margin-top: 8px; }
  .when { margin-top: 6px; gap: 2px; }
  .attend { margin-top: 14px; }
  .people { gap: 12px; margin-top: 12px; }
  .actions { margin-top: 16px; }
  .field { margin-top: 10px; }
  .group { margin-top: 18px; }
  .view[data-view="details"] .lede { margin-top: 6px; }
}

/* ───────── wide screens: booth on the left, words on the right ───────── */
@media (min-width: 860px) and (min-aspect-ratio: 11/10) {
  .stage {
    --win-h: max(300px, min(62svh, 620px, 100svh - var(--nav-h, 0px) - 150px));
    grid-template-columns: auto minmax(20rem, 27rem);
    /* the two flexible rows share the spare height, so the step bar + words sit centred beside the booth */
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: clamp(3.5rem, 7vw, 8rem); row-gap: 0;
    justify-content: center; align-items: center;
    padding-top: 36px; padding-bottom: 64px;
  }
  .booth-col { grid-column: 1; grid-row: 1 / -1; }
  .stepbar { grid-column: 2; grid-row: 2; width: 100%; margin-bottom: 10px; justify-self: start; }
  .panel { grid-column: 2; grid-row: 3; align-self: start; }
  .rsvp[data-step] .stage { --win-h: max(300px, min(62svh, 620px, 100svh - var(--nav-h, 0px) - 150px)); }
  .rsvp[data-phase="live"] .stage, .rsvp[data-phase="shooting"] .stage, .rsvp[data-phase="asking"] .stage {
    --win-h: max(320px, min(68svh, 680px, 100svh - var(--nav-h, 0px) - 110px));
  }
  .booth-col { align-self: center; }
  .panel { justify-self: start; }
  .page-title, .mast, .step-title, .lede, .fine, .hint, .party, .error, .summary, .sent, .when, .shot-status { text-align: left; justify-items: start; justify-content: flex-start; }
  .mast, .shot-status { padding-left: 0; }
  .lede { margin-left: 0; }
  .page-title { margin-left: -.04em; }
  .step-script { margin-left: -.06em; }
  .actions { justify-items: start; }
  .actions .link { padding-left: 0; }
  .lost { text-align: left; }
  .done-actions, .done-links { justify-content: flex-start; }
  .rsvp[data-step="details"] .booth-col { position: sticky; top: calc(var(--nav-h, 0px) + 40px); align-self: start; padding-top: 20px; }
  /* the reveal: both strips whole on screen, side by side */
  .rsvp[data-step="done"] .booth-col { align-self: start; }
  .rsvp[data-step="done"] .hang { --strip-w: clamp(84px, (100svh - var(--nav-h, 0px) - 110px) / 5.5, 160px); width: auto; padding-top: 0; }
  .rsvp[data-step="done"] .hang__rail { position: absolute; top: 0; left: -100vw; right: -100vw; margin: 0; }
  .rsvp[data-step="done"] .stage { padding-top: 30px; }
  .shot-status { text-align: left; }
}

/* ───────── dialogs ───────── */
.dialog {
  width: min(92vw, 26rem); padding: 0; border: 0; border-radius: 16px;
  background: var(--cannoli-cream); color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 30, 40, .35);
}
.dialog::backdrop { background: color-mix(in oklab, var(--moonlit-ocean) 45%, transparent); }
.dialog__body { padding: 26px 22px 20px; display: grid; }
.dialog .step-title { margin-bottom: 2px; }
.dialog--sheet { width: min(96vw, 60rem); }
.dialog--sheet table { width: 100%; border-collapse: collapse; font: 400 .8rem/1.4 var(--type-text); margin-top: 12px; }
.dialog--sheet th, .dialog--sheet td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dialog--sheet .scroll { overflow: auto; max-height: 60svh; }
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: dialog-in .32s cubic-bezier(.16, 1, .3, 1); }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(10px); } }
}

.noscript { padding: 3rem var(--gutter); text-align: center; }

/* ───────── calm version (reduced motion, or ?calm) ───────── */
.is-calm .curtain__sway { animation: none !important; }
.is-calm .curtain__row, .is-calm .strip__paper { will-change: auto; }
@media (prefers-reduced-motion: reduce) {
  .curtain__sway { animation: none !important; }
  .curtain__row, .strip__paper { will-change: auto; }
}
