/* ── guest app — the public face ────────────────────────────────────────
   After scfo.de's idea (steps, one live object, calm type) but our
   weather: graphite rather than pitch black, spotlight and smoke behind
   frosted cards, Poppins everywhere with heavy heads, lines that assert
   themselves. The form walks in numbered steps with strong slides. */

:root{
  --bg:#1b1d26;
  --panel:rgba(22, 23, 29, .55);
  --panel-2:rgba(36, 37, 45, .6);
  --line:hsl(233 8% 26%);
  --line-strong:hsl(233 8% 38%);
  --ink:#f4f4f1;
  --muted:hsl(60 4% 76%);
  --faint:hsl(50 3% 56%);
  --danger:#e0705f;
  --good:#8fd8a8;
  --warn:#d8b46a;

  --serif:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --sans:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;

  --r:14px;          /* cards */
  --r-s:9px;         /* inputs, small blocks */
  --bw:1.5px;        /* the app's line weight */
}

*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0 }

/* the live cube behind everything — content stacks above it
   (.bar and .progress are sticky and already carry higher z-indexes) */
#cube-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none;
}
.wrap{ position:relative; z-index:1 }

html{
  background:var(--bg); -webkit-text-size-adjust:100%;

  /* The page advances card by card. Proximity rather than mandatory, so a
     tall calendar never traps the scroll, and the anchor point is the real
     height of the two sticky strips — both measured in JS, because the
     wordmark wraps on a narrow screen and the progress strip follows it.
     This used to be a flat 6.5rem here AND another 6.5rem of scroll-margin
     on the card, which anchored every card 208px above where it belonged. */
  scroll-padding-top:calc(var(--bar-h,3.4rem) + var(--stops-h,0px)
                          + var(--progress-h,2.4rem) + .5rem);
}
html.snap{ scroll-snap-type:y proximity }

body{
  min-height:100dvh;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(125, 130, 170, .38), transparent 60%),
    radial-gradient(90% 50% at 50% 110%, rgba(140, 105, 150, .22), transparent 65%),
    var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-weight:300;
  font-size:15.5px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

::selection{ background:var(--ink); color:var(--bg) }

/* the little all-caps labels that carry the structure */
.kicker, fieldset > legend, .field > span, .chips > legend{
  font-family:var(--sans);
}

/* ── chrome ────────────────────────────────────────────────────────── */

.bar{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:1rem clamp(1rem,4vw,2.4rem);
  border-bottom:var(--bw) solid var(--line);
  position:sticky; top:0; z-index:5;
  background:rgba(17,18,23,.72); backdrop-filter:blur(16px);
}
/* the wordmark holds the centre of the bar; the controls keep the right */
.mark{
  position:absolute; left:50%; transform:translateX(-50%);
  max-width:46vw; text-align:center;
  font-size:.78rem; font-weight:600;
  letter-spacing:.22em; text-transform:uppercase;
  color:var(--ink); text-decoration:none;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.bar-right{ margin-left:auto }
.bar-right{ display:flex; align-items:center; gap:1rem; flex:none }
.bar-right a,.bar-right button{
  font:inherit; font-size:.7rem; font-weight:400;
  letter-spacing:.18em; text-transform:uppercase;
  color:var(--faint); background:none; border:0; cursor:pointer;
  text-decoration:none; white-space:nowrap;
  transition:color .2s;
}
.bar-right a:hover,.bar-right button:hover{ color:var(--ink) }

/* On a phone there is no centre left to hold — Admin, the language pill
   and Surt already own it — and an absolutely placed wordmark knows
   nothing about them, so it prints itself straight over the top: 110px of
   overlap on a 390px screen, with "Madness" clipped off the end. Here the
   mark rejoins the flow, takes the left, and wraps to a second line rather
   than overlapping or truncating. The switch is at 720px because that is
   where a centred mark stops reaching the controls: half of its 228px plus
   the 199px of buttons and the bar's own padding needs ~660px, and a gap
   worth looking at needs the rest. */
@media (max-width:719px){
  .bar{ padding-inline:1rem; gap:.8rem }
  .mark{
    position:static; transform:none;
    flex:1 1 auto; min-width:0; max-width:none;
    text-align:left; white-space:normal; overflow:visible;
    font-size:.7rem; letter-spacing:.14em; line-height:1.3;
  }
  .bar-right{ gap:.5rem }
  .bar-right a,.bar-right button{ font-size:.62rem; letter-spacing:.1em }
}

/* ── arriving through the door ─────────────────────────────────────── */

/* The same wash the landing ends on, down to the stops, so the handover
   between the two pages has no seam in it. It only exists for the visit
   that came through the door. */
.arrival{ display:none }
html.from-door .arrival{
  display:block;
  position:fixed; inset:0; z-index:60; pointer-events:none;
  background:radial-gradient(60% 60% at 50% 46%,
    #fff7e2, #f0d79a 45%, #e3c079 70%, #b98a35);
  animation:arrival-clear 1.25s cubic-bezier(.22,.61,.36,1) forwards;
}
/* holds for a beat while the room draws behind it, then opens outward */
@keyframes arrival-clear{
  0%   { opacity:1; transform:scale(1);    filter:blur(0) }
  18%  { opacity:1; transform:scale(1.01); filter:blur(0) }
  100% { opacity:0; transform:scale(1.22); filter:blur(14px) }
}

/* the room comes up out of the light rather than being revealed by it */
html.from-door #view,
html.from-door .bar{
  animation:arrival-rise 1.05s cubic-bezier(.2,.75,.3,1) both;
}
html.from-door .bar{ animation-delay:.1s }
@keyframes arrival-rise{
  0%   { opacity:0; transform:translateY(14px) scale(.985) }
  40%  { opacity:.35 }
  100% { opacity:1; transform:none }
}

@media (prefers-reduced-motion:reduce){
  html.from-door .arrival{ animation:arrival-fade .5s linear forwards }
  html.from-door #view, html.from-door .bar{ animation:none }
  @keyframes arrival-fade{ to{ opacity:0 } }
}

/* ── stops — the guest's own menu ──────────────────────────────────── */

.stops{
  position:sticky; top:var(--bar-h,3.4rem); z-index:4;
  display:flex; justify-content:center; flex-wrap:wrap; gap:.45rem;
  padding:.5rem clamp(1rem,4vw,2.4rem);
  background:rgba(17,18,23,.72); backdrop-filter:blur(16px);
  border-bottom:var(--bw) solid var(--line);
}
/* display:flex above outranks the UA stylesheet's [hidden]{display:none} */
.stops[hidden]{ display:none }
/* When the stops are up they are the bar's second line, not a second bar,
   so the rule between them goes. Driven by a class rather than :has(+ ...)
   because the class is the same thing the JS already knows and it can't
   quietly stop matching. */
html.stops-on .bar{ border-bottom-color:transparent }
.stops button{
  font:inherit; font-size:.66rem; font-weight:400;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); background:none;
  border:1px solid var(--line-strong); border-radius:999px;
  padding:.45rem 1.1rem; cursor:pointer; white-space:nowrap;
  transition:color .2s, border-color .2s, background-color .2s;
  -webkit-tap-highlight-color:transparent;
}
.stops button:hover{ color:var(--ink); border-color:var(--ink) }
.stops button[aria-current=true]{
  background:var(--ink); border-color:var(--ink); color:var(--bg);
}
@media (max-width:719px){
  .stops{ padding:.35rem .6rem; gap:.3rem }
  .stops button{ font-size:.58rem; letter-spacing:.08em; padding:.35rem .7rem }
  /* three sticky strips on a 5-inch screen is most of the screen */
  .progress .meta{ padding:.3rem 1rem; font-size:.6rem }
}

/* ── progress ──────────────────────────────────────────────────────── */

.progress{
  position:sticky; top:calc(var(--bar-h,3.4rem) + var(--stops-h,0px)); z-index:4;
  background:rgba(17,18,23,.85); backdrop-filter:blur(16px);
  border-bottom:var(--bw) solid var(--line);
}
.progress .track{ height:3px; background:var(--line) }
.progress .fill{
  height:100%; width:0; background:var(--ink);
  transition:width .18s linear;
}
.progress .meta{
  display:flex; justify-content:space-between; align-items:baseline; gap:1rem;
  padding:.45rem clamp(1rem,4vw,2.4rem);
  font-size:.68rem; letter-spacing:.14em; text-transform:uppercase;
  /* nowrap below is what keeps this one line, so the height no longer
     depends on which section name is showing */
  line-height:1.5;
}
.progress .where{
  color:var(--muted);
  min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.progress .count{ color:var(--faint); white-space:nowrap }

@media (prefers-reduced-motion:reduce){ .progress .fill{ transition:none } }

.wrap{
  max-width:47rem; margin:0 auto;
  padding:clamp(1.6rem,5vw,4rem) clamp(1rem,4vw,2rem) 24vh;
}
.loading{ color:var(--faint); text-align:center; padding:4rem 0 }

/* ── panel ─────────────────────────────────────────────────────────── */

.panel{
  background:var(--panel);
  backdrop-filter:blur(26px) saturate(1.25);
  -webkit-backdrop-filter:blur(26px) saturate(1.25);
  border:var(--bw) solid var(--line);
  border-radius:var(--r);
  padding:clamp(1.5rem,5.5vw,3rem);
  /* a hair of glass edge where the light hits the top of the card */
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07);

  /* each card is a stop on the ride: it anchors into place and plays its
     entrance when it arrives. The anchor offset lives on <html> as
     scroll-padding, not here — having both double-counted it. */
  scroll-snap-align:start;
  opacity:0;
  transform:translateY(72px) scale(.98);
  transition:opacity .8s cubic-bezier(.2,.85,.25,1),
             transform .8s cubic-bezier(.2,.85,.25,1);
}
/* Landed, the card keeps a layer of its own. With transform:none it fell
   back into the page's layer, and every hover inside it — a chip, a card,
   a link — repainted a patch of the page and re-ran the blur behind just
   that patch: the glass blinked under the pointer. translateZ(0) keeps
   the blur whole and the hover on the card's own layer. */
.panel.in{ opacity:1; transform:translateZ(0) }
@media (prefers-reduced-motion:reduce){
  .panel{ opacity:1; transform:translateZ(0); transition:none }
}
/* On a phone the questionnaire's own sections are stops too, so the
   scroll walks the questions the way it walks the chapters — which is
   what replaced Enrere/Següent. It only reads as anchoring rather than
   yanking because the card no longer re-arms its entrance under a thumb
   (see app.js): a snap target that slides while the browser is chasing it
   was the whole problem, and a measurable one — the same five flicks used
   to land up to 155px from where they were sent, past 46 target moves in
   a single pass down the page. */
@media (any-pointer:coarse),(max-width:900px){
  #rsvpForm > fieldset{ scroll-snap-align:start }
}
.panel.center{ text-align:center }

/* the closed door is a poster: everything centred */
/* the artwork carries the door; the words underneath only explain it */
.poster{
  display:block; width:min(100%,24rem); height:auto;
  margin:0 auto clamp(1.2rem,4vw,2rem);
  /* gold on glass wants a little air under it */
  filter:drop-shadow(0 10px 30px rgba(0,0,0,.45));
}
.panel:has(#signinForm){ text-align:center }
.panel:has(#signinForm) .lede{ margin-inline:auto }
/* This headline asks for something, it is not the poster — the artwork
   above is. So it drops a size and leaves room for the box it points at. */
.panel:has(#signinForm) h1{ font-size:clamp(1.45rem,4.6vw,2rem); margin-bottom:1.7rem }
#signinForm{ max-width:26rem; margin:0 auto }
/* the headline names the field; the placeholder names it again. A third
   time above the box is a stutter, so the label is left to screen readers */
#signinForm .field > span{
  position:absolute; width:1px; height:1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#signinForm input{ text-align:center }

h1{
  font-weight:600;
  font-size:clamp(1.9rem,6vw,2.9rem);
  letter-spacing:-.02em; line-height:1.14;
  margin-bottom:.8rem;
}
.who{
  font-size:.68rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--faint); margin-bottom:1.1rem;
}
.who b{ font-weight:500; color:var(--muted) }
.lede{ color:var(--muted); margin-bottom:2rem; max-width:46ch; font-size:.95rem }
.panel.center .lede{ margin-inline:auto }
.note{ font-size:.85rem; color:var(--muted); margin-top:1rem }
.note.bad{ color:var(--danger) }
.note.good{ color:var(--good) }
.hint{ font-size:.85rem; color:var(--faint); margin-bottom:1rem; max-width:48ch }

.draft-badge{
  display:inline-block; font-size:.64rem; letter-spacing:.18em; text-transform:uppercase;
  color:var(--warn); border:1px dashed var(--warn);
  border-radius:999px; padding:.45rem .9rem; margin-bottom:1.2rem;
  opacity:.85;
}

/* ── form ──────────────────────────────────────────────────────────── */

fieldset{ border:0; margin-bottom:3rem }

fieldset > legend{
  font-size:clamp(1.35rem,4.4vw,1.9rem); font-weight:600;
  letter-spacing:-.015em; line-height:1.2;
  color:var(--ink);
  padding-bottom:.9rem; margin-bottom:1.2rem; width:100%;
  border-bottom:2px solid var(--line);
}
fieldset > legend::before{
  content:attr(data-n);
  display:block;
  font-size:.66rem; font-weight:500;
  letter-spacing:.3em; text-transform:uppercase;
  color:var(--faint); margin-bottom:.5rem;
}

.field{ display:block; margin-bottom:1.2rem }
.field > span{
  display:block; font-size:.85rem; font-weight:400;
  color:var(--ink); margin-bottom:.45rem;
}
.field > span i{ color:var(--faint); font-style:normal }
.field small{ display:block; font-size:.78rem; color:var(--faint); margin-top:.4rem; line-height:1.55 }

input[type=text],input[type=email],input[type=tel],input[type=search],input:not([type]),textarea{
  width:100%; font:inherit; font-weight:300; font-size:.95rem; color:var(--ink);
  background:var(--panel-2);
  border:var(--bw) solid var(--line); border-radius:var(--r-s);
  padding:.8rem .95rem;
  transition:border-color .2s;
}
textarea{ resize:vertical }
input:focus,textarea:focus{ outline:none; border-color:var(--line-strong) }
input:focus-visible,textarea:focus-visible{ border-color:var(--muted) }
input::placeholder,textarea::placeholder{ color:var(--faint); opacity:.8 }

.row{ display:grid; grid-template-columns:1fr 1fr; gap:1rem }
@media (max-width:520px){ .row{ grid-template-columns:1fr } }

input[type=range]{ width:100%; accent-color:var(--ink) }

/* checkbox rows */
.check{
  display:flex; gap:.9rem; align-items:flex-start;
  padding:.9rem 0; cursor:pointer;
}
.check input{ margin-top:.3rem; accent-color:var(--ink); width:1rem; height:1rem; flex:none }
.check span{ font-size:.95rem }
.check b{ font-weight:500 }
.check small{ display:block; font-size:.8rem; color:var(--faint); margin-top:.35rem; line-height:1.55 }

/* chips */
.chips{ margin:1.3rem 0 0 }
.chips > legend{
  font-size:.85rem; font-weight:400; letter-spacing:0; text-transform:none;
  color:var(--ink); border:0; padding:0; margin-bottom:.6rem;
}
.chips small{ display:block; font-size:.78rem; color:var(--faint); margin-top:.6rem }
.chips > div{ display:flex; flex-wrap:wrap; gap:.45rem }

.chip{
  display:inline-flex; align-items:center;
  padding:.5rem 1rem; border:var(--bw) solid var(--line-strong); border-radius:999px;
  font-size:.83rem; font-weight:300; color:var(--muted);
  cursor:pointer; user-select:none;
  transition:border-color .18s, color .18s, background .18s;
  -webkit-tap-highlight-color:transparent;
}
.chip input{ position:absolute; opacity:0; width:0; height:0 }
.chip:hover{ color:var(--ink); border-color:var(--muted) }
.chip:has(input:checked){
  background:var(--ink); border-color:var(--ink); color:var(--bg);
  font-weight:400;
}
.chip:has(input:focus-visible){ outline:2px solid var(--muted); outline-offset:2px }

/* tier cards */
.tiers{ display:grid; gap:.6rem }
.tier{
  display:flex; align-items:baseline; gap:.9rem;
  padding:1rem 1.1rem; border:var(--bw) solid var(--line); border-radius:var(--r-s);
  cursor:pointer; background:var(--panel-2);
  transition:border-color .18s;
}
.tier input{ position:absolute; opacity:0; width:0; height:0 }
.tier:hover{ border-color:var(--line-strong) }
.tier:has(input:checked){ border-color:var(--ink) }
.tier b{ font-weight:500; font-size:1rem; color:var(--ink) }
.tier em{ font-style:normal; font-size:.85rem; color:var(--muted); margin-left:auto; white-space:nowrap }
.tier span{ font-size:.83rem; color:var(--faint) }

/* ── payment card ──────────────────────────────────────────────────── */

.paycard{
  display:grid; gap:1.4rem;
  border:var(--bw) solid var(--line-strong); border-radius:var(--r);
  background:var(--panel-2);
  padding:1.8rem 1.5rem; margin-bottom:1.4rem;
}
.pay-amount b{
  display:block; font-weight:600; letter-spacing:-.02em;
  font-size:clamp(2.4rem,8vw,3.2rem); color:var(--ink); line-height:1.1;
  font-variant-numeric:tabular-nums;
}
.pay-amount small,.pay-to small{
  display:block; font-size:.64rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--faint); margin-top:.4rem;
}
.pay-to small{ margin:0 0 .4rem }
.pay-to b{ display:block; font-size:1.05rem; color:var(--ink); font-weight:400 }
.pay-to a{
  display:inline-block; margin-top:.25rem; font-size:1rem;
  color:var(--muted); text-decoration:underline;
  text-underline-offset:3px; text-decoration-color:var(--line-strong);
}
.pay-to a:hover{ color:var(--ink) }
.pay-iban{ display:block; margin-top:.3rem; font-size:.9rem; color:var(--muted);
  font-variant-numeric:tabular-nums; user-select:all; overflow-wrap:anywhere }

/* ── the deadline, and the way out ─────────────────────────────────── */

.deadline{
  /* it sits between the concept hint and the button, and needs to be clear
     of both: pinned to the button it read as part of it */
  margin:1.3rem 0 1.9rem; padding:.75rem 1rem;
  font-size:.85rem; line-height:1.55; color:var(--warn);
  border:1px dashed var(--warn); border-radius:var(--r-s);
}
.quiet-out{ margin-top:2rem; text-align:center }
.linkish{
  font:inherit; font-size:.8rem; color:var(--faint); background:none;
  border:0; padding:.4rem; cursor:pointer; text-decoration:underline;
  text-underline-offset:3px; text-decoration-color:var(--line-strong);
}
.linkish:hover{ color:var(--muted) }

/* ── the extras, asked as a forecast ───────────────────────────────── */

.forecast{
  margin-top:2.2rem; padding-top:1.6rem;
  border-top:1px solid var(--line);
}
.forecast h2{
  font-size:1rem; font-weight:500; color:var(--ink); margin-bottom:.5rem;
}
.fc-chips{ display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.2rem }
.fc-chips button{
  font:inherit; font-size:.83rem; font-weight:300;
  padding:.5rem 1rem; border-radius:999px; cursor:pointer;
  color:var(--muted); background:none;
  border:var(--bw) solid var(--line-strong);
  transition:color .2s, border-color .2s, background-color .2s;
  -webkit-tap-highlight-color:transparent;
}
.fc-chips button:hover{ color:var(--ink); border-color:var(--muted) }
.fc-chips button[aria-pressed=true]{
  background:var(--ink); border-color:var(--ink); color:var(--bg);
}

/* ── actions & buttons ─────────────────────────────────────────────── */

.actions{ display:flex; flex-direction:column; gap:.6rem; align-items:flex-start }

button.primary{
  font:inherit; font-size:.74rem; font-weight:500;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--bg); background:var(--ink);
  border:1px solid var(--ink); border-radius:999px;
  padding:.95rem 2.2rem; cursor:pointer;
  transition:opacity .2s;
  -webkit-tap-highlight-color:transparent;
}
button.primary:hover:not(:disabled){ opacity:.85 }
button.primary:disabled{ opacity:.35; cursor:default }

button.ghost{
  font:inherit; font-size:.72rem; font-weight:400;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); background:none;
  border:var(--bw) solid var(--line-strong); border-radius:999px;
  padding:.7rem 1.4rem; cursor:pointer;
  transition:color .2s, border-color .2s;
}
button.ghost:hover:not(:disabled){ color:var(--ink); border-color:var(--ink) }

@media (max-width:520px){
  button.primary{ width:100%; text-align:center }
  .actions{ align-items:stretch }
}

/* ── the collector's list ──────────────────────────────────────────── */

.collect-head{
  display:flex; flex-wrap:wrap; gap:1.6rem 2.4rem; align-items:flex-end;
  padding:1.2rem 1.3rem; margin-bottom:1.4rem;
  border:var(--bw) solid var(--line-strong); border-radius:var(--r);
  background:var(--panel-2);
}
.collect-fig b{
  display:block; font-weight:600; font-size:1.9rem; line-height:1.1;
  color:var(--ink); font-variant-numeric:tabular-nums;
}
.collect-fig small,.collect-me small{
  display:block; font-size:.62rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--faint); margin-top:.35rem;
}
.collect-me{ margin-left:auto; text-align:right }
.collect-me small{ margin:0 0 .3rem }
.collect-me b{ font-weight:400; font-size:1.05rem; color:var(--ink) }
.collect-me span{ display:block; font-size:.8rem; color:var(--faint); margin-top:.2rem }

/* a ledger reads as columns: name, amount, state, the one button —
   they line up down the card, and fold to two columns on a phone */
.collect-row{
  display:grid; align-items:center; gap:.5rem 1.2rem;
  grid-template-columns:minmax(0,1fr) auto minmax(8.5rem,auto) auto;
  padding:.95rem 0; border-bottom:1px solid var(--line);
}
.collect-row:first-child{ border-top:1px solid var(--line) }
.collect-who{ flex:1 1 14rem; min-width:0 }
.collect-who b{ display:block; font-weight:500; font-size:1rem; color:var(--ink) }
.collect-who span{
  display:block; font-size:.78rem; color:var(--faint); margin-top:.2rem;
  overflow-wrap:anywhere;
}
.collect-who a{ color:var(--muted); text-decoration:none }
.collect-who a:hover{ color:var(--ink); text-decoration:underline }
.collect-amount{
  font-size:1.05rem; color:var(--ink); font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.collect-state{
  font-size:.68rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--faint); white-space:nowrap; flex:0 0 auto; min-width:8.5rem;
}
.collect-state.said{ color:var(--warn) }
.collect-state.done{ color:var(--good) }
.collect-row button{ flex:0 0 auto }
.collect-row button.primary{ padding:.6rem 1.3rem; font-size:.68rem }
.collect-row button.ghost{ padding:.5rem 1rem; font-size:.66rem }
/* a row with a request in flight takes no second tap: two taps were two
   writes of the same money */
.collect-row.busy{ opacity:.5; pointer-events:none }

/* the door picker, in the cell the single button was in */
.collect-doors{
  display:flex; flex-wrap:wrap; gap:.4rem; justify-content:flex-end;
}
.collect-doors button.ghost{ padding:.5rem .9rem; font-size:.62rem }
/* Two buttons where there used to be one. On a wide screen they stack into
   a narrow column, so the name beside them keeps its width instead of
   being squeezed one letter wide; on a phone the row already breaks into
   its own line and they spread along it. */
@media (min-width:561px){
  .collect-row > .collect-doors{
    flex-direction:column; align-items:stretch;
    min-width:0; max-width:11rem; gap:.3rem;
  }
  .collect-row > .collect-doors .collect-doors{ flex-direction:row }
}
/* how much of it arrived, typed on the line it belongs to */
.collect-doors .part-amount{
  width:5.5rem; padding:.45rem .6rem; font-size:.9rem;
  font-variant-numeric:tabular-nums;
  border:var(--bw) solid var(--line-strong); border-radius:var(--r-s);
  background:var(--panel-2); color:var(--ink);
}
/* money that was already written down before they opened the page */
.collect-who .collect-noted{ color:var(--warn) }
/* half a quota: what landed, over what it was */
.collect-amount b{ font-weight:500 }
.collect-amount small{ font-size:.8rem; color:var(--faint) }

/* somebody who isn't on the list paid you anyway */
.collect-add{
  margin-top:2.2rem; padding-top:1.6rem; border-top:1px solid var(--line);
}
.collect-add h2{
  font-size:.7rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--faint); margin:0 0 .5rem;
}
.collect-add .hint{ margin-bottom:1rem }
/* lines paid to somebody off the list: checked here, never held here */
.collect-via{ margin-top:2.2rem }
.collect-via h2{
  font-size:.7rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--faint); margin:0 0 .5rem;
}
.collect-via .hint{ margin-bottom:1rem; max-width:36rem }
.collect-add .field{ margin-bottom:.6rem; max-width:24rem }
.collect-add .collect-doors{ justify-content:flex-start; margin-top:.4rem }

/* the name picker, under the field it belongs to */
.ac-list{
  display:flex; flex-direction:column; overflow:auto;
  max-width:24rem; max-height:15rem;
  border:var(--bw) solid var(--line-strong); border-radius:var(--r-s);
  background:var(--panel-2);
}
/* display:flex above outranks the UA stylesheet's [hidden]{display:none} */
.ac-list[hidden]{ display:none }
.ac-hit{
  display:flex; align-items:baseline; gap:.5rem; text-align:left;
  font:inherit; font-size:.92rem; color:var(--ink);
  background:none; border:0; border-bottom:1px solid var(--line);
  padding:.6rem .8rem; cursor:pointer;
}
.ac-hit:last-child{ border-bottom:0 }
.ac-hit b{ font-weight:400 }
.ac-hit:hover:not(:disabled),.ac-hit:focus-visible{ background:rgba(255,255,255,.055) }
.ac-hit:disabled{ cursor:default; color:var(--faint) }
.ac-hint{ font-size:.75rem; color:var(--faint) }
.ac-paid{
  margin-left:auto; font-size:.6rem; letter-spacing:.14em;
  text-transform:uppercase; color:var(--good); white-space:nowrap;
}

@media (max-width:640px){
  .collect-me{ margin-left:0; text-align:left }
  .collect-row{ grid-template-columns:minmax(0,1fr) auto; align-items:start }
  .collect-amount{ text-align:right }
  .collect-state{ min-width:0; white-space:normal }
  .collect-row button{ justify-self:end }
  .collect-row button.primary{ width:auto }
  .collect-doors{ grid-column:1/-1; justify-content:flex-start }
}

/* ── rooms ─────────────────────────────────────────────────────────── */

/* the chapters keep their distance — each one owns its moment. Only below
   another card: the rota and the programme are stops of their own now,
   and the first card on a stop starts where every first card does. */
.panel + :is(.rooms-panel,.shifts-panel,.program-panel){ margin-top:34vh }

/* a third of the viewport between chapters is a lot of thumb on a phone */
@media (max-width:719px){
  .panel + :is(.rooms-panel,.shifts-panel,.program-panel){ margin-top:18vh }
}

.room-type{
  display:flex; align-items:baseline; gap:.8rem; flex-wrap:wrap;
  margin:1.8rem 0 .7rem; padding-bottom:.5rem;
  border-bottom:1px solid var(--line);
}
.room-type b{ font-weight:600; font-size:1.02rem; color:var(--ink) }
.room-type em{
  font-style:normal; font-size:.64rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted);
}
.room-type span{ font-size:.8rem; color:var(--faint); flex-basis:100% }

.room-card{
  display:flex; align-items:center; gap:.9rem; flex-wrap:wrap;
  border:var(--bw) solid var(--line); border-radius:var(--r-s);
  background:var(--panel-2);
  padding:.9rem 1.1rem; margin-bottom:.55rem;
  transition:border-color .18s;
}
.room-card:hover{ border-color:var(--line-strong) }
.room-card .room-title{ color:var(--ink); font-size:.95rem; font-weight:400 }
.room-card .room-occ{ font-size:.78rem; color:var(--faint); margin-right:auto }
.room-card button{ flex:none }
.room-card.invite,.room-card.wait{ border-color:var(--warn) }
.room-card.ok{ border-color:var(--good) }
.room-card.invite b,.room-card.wait b,.room-card.ok b{ flex-basis:100%; font-weight:400 }
.room-card .room-members{ font-size:.8rem; color:var(--muted); flex-basis:100% }
.room-card .room-extra{
  font-size:.64rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
}

.room-builder{ flex-basis:100%; border-top:1px dashed var(--line); padding-top:.9rem }
.room-builder .room-actions{ display:flex; gap:.5rem }
.room-builder input{ flex:1 }
.room-chosen{ display:flex; flex-wrap:wrap; gap:.4rem; margin:.6rem 0 }
.room-chip{
  font-size:.8rem; color:var(--bg); cursor:pointer;
  background:var(--muted);
  border-radius:999px; padding:.35rem .8rem;
}
.room-chip:hover{ background:var(--ink) }
.room-builder > .primary{ margin-top:.4rem }

.room-actions{ display:flex; gap:.6rem; margin-top:.6rem }

/* ── shifts ────────────────────────────────────────────────────────── */

.sh-mine{
  font-size:.85rem; color:var(--muted); margin-bottom:1.1rem;
  border:1px solid var(--line-strong); background:var(--panel-2);
  border-radius:var(--r-s); padding:.8rem 1rem;
}
.sh-mine b{ color:var(--ink); font-weight:400 }

.shift-block.tappable{ cursor:pointer }

/* ── how a tap looks while the network is still thinking ────────────
   Shift blocks and room cards both take their new state on the tap
   itself, before the server has answered, so these two say which of the
   two things is happening: `just` is the thing you changed announcing
   itself, `pending` appears only if the wait turns out to be long enough
   to notice. */
@keyframes tapLanded{
  0%{ transform:scale(.94) }
  60%{ transform:scale(1.03) }
  100%{ transform:none }
}
@keyframes stillWaiting{ 50%{ opacity:.5 } }

.shift-block.just,.room-card.just{
  animation:tapLanded .34s cubic-bezier(.2,.9,.25,1) both;
  z-index:2;
}
.shift-block.pending,.room-card.pending{
  animation:stillWaiting 1s ease-in-out infinite;
}

/* a day or a rota filter swaps the whole grid at once — a short fade
   makes that read as a move rather than a cut */
@keyframes calSwap{
  from{ opacity:0; transform:translateY(8px) }
  to{ opacity:1; transform:none }
}
.cal-grid.swap{ animation:calSwap .22s cubic-bezier(.2,.85,.25,1) both }

@media (prefers-reduced-motion:reduce){
  .shift-block.just,.shift-block.pending,
  .room-card.just,.room-card.pending,
  .cal-grid.swap{ animation:none }
}
.shift-block .shift-people{ opacity:.85 }
/* staffing states — quiet until something matters */
.shift-block.st-mine{     --edge:var(--good);        --fill:rgba(143,216,168,.10) }
.shift-block.st-ok{       --edge:var(--line-strong); --fill:var(--panel-2) }
.shift-block.st-short{    --edge:var(--warn);        --fill:rgba(216,180,106,.08) }
.shift-block.st-critical{ --edge:var(--danger);      --fill:rgba(224,112,95,.10) }
.shift-block.st-full{     --edge:var(--line);        --fill:var(--panel); opacity:.6 }

.shift-prio{
  font-style:normal; font-size:.58rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); border:1px solid var(--line-strong);
  border-radius:999px; padding:.12rem .5rem; margin-left:.4rem;
  vertical-align:middle;
}

/* ── calendar ──────────────────────────────────────────────────────── */

.cal-toolbar{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1rem }
.cal-tab{
  font:inherit; font-size:.66rem; font-weight:400;
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--faint); background:none; cursor:pointer;
  border:1px solid var(--line); border-radius:999px; padding:.45rem 1rem;
  transition:color .18s, border-color .18s, background .18s;
}
.cal-tab:hover{ color:var(--ink); border-color:var(--line-strong) }
.cal-tab.on{ color:var(--bg); background:var(--ink); border-color:var(--ink) }

.cal-grid{
  display:flex; gap:.5rem; overflow-x:auto; padding-bottom:.5rem;
  /* a sideways swipe inside a calendar stays inside it: no chaining out to
     the page, and on iOS no handing the gesture to the back swipe */
  overscroll-behavior-x:contain;
}
.cal-gutter{ flex:0 0 3.2rem }
.cal-col{ flex:1 1 0; min-width:0 }
.cal-grid.many .cal-col{ min-width:19rem }
/* A phone shows one day and nothing else (see oneDayOnly in app.js), so
   the column has the whole width and there is nothing to scroll sideways
   to. Overlapping lanes get narrow instead of getting a filmstrip. */
@media (max-width:700px){
  .cal-col{ min-width:0 }
  .cal-grid{ overflow-x:hidden }
  .cal-gutter{ flex:0 0 2.6rem }
}
.cal-day-head{
  font-size:.72rem; font-weight:600; color:var(--ink);
  letter-spacing:.18em; text-transform:uppercase;
  padding:.3rem 0 .6rem; min-height:2rem;
  border-bottom:2px solid var(--line); margin-bottom:.4rem;
  white-space:nowrap;
}
.cal-body{
  position:relative; border-radius:var(--r-s);
  background:
    repeating-linear-gradient(to bottom,
      var(--line) 0, var(--line) 1px,
      transparent 1px, transparent var(--hour,44px));
}
.cal-gutter .cal-body{ background:none }
.cal-hour{
  position:absolute; right:.4rem; transform:translateY(-45%);
  font-size:.6rem; color:var(--faint); font-variant-numeric:tabular-nums;
  letter-spacing:.06em;
}
.cal-untimed{ display:flex; flex-direction:column; gap:.3rem; margin-bottom:.5rem }

.cal-block{
  position:absolute; left:2px; right:2px; overflow:hidden;
  border-radius:6px; padding:.35rem .55rem;
  border:1px solid var(--edge, var(--line-strong));
  background:var(--fill, var(--panel-2));
}
.cal-block.floating{ position:static }
.cal-block b{
  display:block; font-size:.76rem; font-weight:400; color:var(--ink);
  line-height:1.3; overflow:hidden; text-overflow:ellipsis;
}
.cal-block span{
  display:block; font-size:.66rem; color:var(--muted); line-height:1.35;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cal-block.floating span{ white-space:normal }
.cal-block.narrow{ padding:.25rem .4rem }
.cal-block.narrow .shift-prio{ display:none }
.cal-block.narrow .shift-people{ display:none }

/* the programme's space colours — muted, not neon */
.cal-block.c1{ --edge:hsl(200 30% 40%);  --fill:hsl(200 30% 40% / .12) }
.cal-block.c2{ --edge:hsl(40 35% 48%);   --fill:hsl(40 35% 48% / .12) }
.cal-block.c3{ --edge:hsl(340 30% 48%);  --fill:hsl(340 30% 48% / .12) }
.cal-block.c4{ --edge:hsl(140 25% 42%);  --fill:hsl(140 25% 42% / .10) }
.cal-block.c5{ --edge:hsl(270 25% 50%);  --fill:hsl(270 25% 50% / .12) }
.cal-block.c6{ --edge:hsl(20 35% 48%);   --fill:hsl(20 35% 48% / .12) }
.cal-block.c0{ --edge:var(--line-strong); --fill:var(--panel-2) }

@media (prefers-reduced-motion:reduce){ *{ transition:none !important } }

/* ── the two doors: hotel or your own van ──────────────────────────── */

.modes{ display:grid; grid-template-columns:1fr 1fr; gap:.8rem; margin-bottom:1rem }
@media (max-width:520px){ .modes{ grid-template-columns:1fr } }
.mode{
  font:inherit; text-align:left; cursor:pointer;
  background:var(--panel-2); color:var(--ink);
  border:var(--bw) solid var(--line); border-radius:var(--r-s);
  padding:1.2rem 1.1rem;
  transition:border-color .18s, background .18s;
  -webkit-tap-highlight-color:transparent;
}
.mode:hover{ border-color:var(--line-strong) }
.mode:focus-visible{ outline:2px solid var(--muted); outline-offset:2px }
.mode b{
  display:block; font-size:1.9rem; font-weight:600; letter-spacing:-.02em;
  line-height:1.1; color:var(--ink);
}
.mode span{ display:block; margin-top:.5rem; font-size:.95rem; color:var(--ink) }
.mode small{ display:block; margin-top:.2rem; font-size:.8rem; color:var(--faint) }
/* changing the ticket: the one they have, and a door with no bed behind it */
.mode[aria-pressed="true"]{ border-color:var(--line-strong); background:var(--panel) }
.mode[aria-pressed="true"] small{ color:var(--muted) }
.mode:disabled{ cursor:not-allowed; opacity:.5 }
.mode:disabled:hover{ border-color:var(--line) }

/* the quiet promise at the end of the form */
.privacy{
  font-size:.8rem; line-height:1.6; color:var(--faint);
  border-top:1px solid var(--line); padding-top:1.2rem; margin-bottom:1.4rem;
  max-width:56ch;
}

/* ── the extra, third phase ────────────────────────────────────────── */

.modes.one{ grid-template-columns:1fr }
.ex-choices{ grid-template-columns:repeat(3,1fr) }
@media (max-width:640px){ .ex-choices{ grid-template-columns:1fr } }
.extra-panel fieldset{ margin-bottom:2.4rem }
.extra-panel .mode[aria-pressed="true"]{ border-color:var(--ink) }
.ex-choices .mode{ display:flex; flex-direction:column; justify-content:flex-start }

.ex-mates{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.7rem }
.ex-mates:empty{ display:none }
.ex-mate{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.45rem .5rem .45rem .95rem; border-radius:999px;
  border:var(--bw) solid var(--line-strong); background:var(--panel-2);
  font-size:.9rem;
}
.ex-mate b{ font-weight:400; color:var(--ink) }
.ex-mate small{ font-size:.72rem; color:var(--faint) }
.ex-mate.mutual small{ color:var(--good, var(--muted)) }
.ex-mate button{
  font:inherit; font-size:1rem; line-height:1; width:1.6rem; height:1.6rem;
  border-radius:50%; border:0; background:none; color:var(--faint); cursor:pointer;
}
.ex-mate button:hover{ color:var(--ink); background:var(--panel) }

.ex-find{ position:relative }
.ex-find input{ width:100% }
.ex-suggest{
  margin-top:.4rem; background:var(--panel-2); border:var(--bw) solid var(--line-strong);
  border-radius:var(--r-s); padding:.3rem;
}
.ex-suggest button{
  display:flex; justify-content:space-between; gap:1rem; width:100%;
  font:inherit; font-size:.92rem; text-align:left; color:var(--ink);
  background:none; border:0; border-radius:calc(var(--r-s) - 2px);
  padding:.6rem .7rem; cursor:pointer;
}
.ex-suggest button small{ color:var(--faint) }
.ex-suggest button.on,.ex-suggest button:hover{ background:var(--panel-2) }
.ex-suggest .hint{ padding:.5rem .7rem; margin:0 }
.ex-namedby{ display:grid; gap:.3rem; margin-top:.8rem }
.ex-named .linkish{ font-size:.85rem; padding:0 .2rem }

.ex-pay{ margin-top:2.6rem; padding-top:1.8rem; border-top:1px solid var(--line) }
.ex-pay h2{ font-size:1rem; font-weight:500; color:var(--ink); margin-bottom:1rem }
/* landing from the payment mail: the card announces itself once, the way
   a tapped shift block does (pointAtExtraPay skips it under reduced motion) */
.ex-pay.just .paycard{ animation:tapLanded .34s cubic-bezier(.2,.9,.25,1) both }
@media (prefers-reduced-motion:reduce){ .ex-pay.just .paycard{ animation:none } }

/* the inscription: a field's explanation above its box, and the DJ details */
.field small.lead{ margin:0 0 .7rem; font-size:.84rem; line-height:1.6; color:var(--muted) }
.dj-box{ margin:.4rem 0 1.4rem; padding-left:1rem; border-left:2px solid var(--line) }
fieldset > .deadline{ margin:1rem 0 0 }
.dj-links{ display:grid; gap:.5rem }
.dj-add{ margin-top:.5rem; padding-left:0 }
fieldset > legend + .deadline{ margin:0 0 1.6rem }
.lede + .deadline{ margin:1.2rem 0 2.4rem }

/* the form closed for them: one button, and the message behind it */
.ask{ margin:-1rem 0 2.2rem }
.ask-form{ max-width:34rem }
.ask-form .field{ margin-bottom:1rem }
.ask > .note{ margin-top:.8rem }

/* workshops and DJs past the last day: who runs each, and their phone */
.offer-shut{
  margin:0 0 1.6rem; padding:.9rem 1rem 1rem;
  font-size:.85rem; line-height:1.55; color:var(--muted);
  border:1px dashed var(--warn); border-radius:var(--r-s);
}
.offer-shut > b{ display:block; color:var(--warn); font-weight:500; margin-bottom:.3rem }
.offer-shut > p{ margin:0 0 .8rem }
.offer-leads{ display:grid; gap:.45rem }
.offer-lead{ display:grid; grid-template-columns:6.5rem 1fr; gap:1rem; align-items:baseline }
.offer-names{ display:flex; flex-wrap:wrap; gap:.2rem 1rem }
.offer-k{ font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--faint) }
.offer-who{ color:var(--ink) }
.offer-who a{ color:var(--ink); text-underline-offset:3px; white-space:nowrap }
/* an empty workshop or an unticked DJ box has nothing to show then */
#rsvpForm label[hidden]{ display:none }
.ex-auto{ font-size:1rem; font-weight:600; margin:0 0 .6rem }

.stay-ask fieldset{ margin:1.3rem 0 0 }
.stay-ask fieldset > legend{
  font-size:.85rem; font-weight:400; letter-spacing:0; text-transform:none;
  color:var(--ink); border:0; padding:0; margin-bottom:.6rem;
}
.stay-ask fieldset > legend::before{ content:none }

/* ── where you sleep, inside the inscription ── */
.stay-cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(14rem,1fr)); gap:.8rem }
.stay-card{
  position:relative; display:flex; flex-direction:column; gap:.3rem;
  padding:1.1rem 1.2rem 1.2rem; border:var(--bw) solid var(--line); border-radius:var(--r-s);
  background:var(--panel-2);
}
.stay-k{ font-size:.62rem; letter-spacing:.2em; text-transform:uppercase; color:var(--faint) }
.stay-v{ font-size:1.15rem; font-weight:500; color:var(--ink); line-height:1.3; margin-top:.2rem }
.stay-d{ font-size:.8rem; color:var(--faint); line-height:1.6; white-space:pre-line }
.stay-head{ display:flex; justify-content:space-between; align-items:center; gap:.6rem }
.stay-ok{
  font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; color:var(--good);
  padding:.2rem .55rem; border-radius:999px;
  background:color-mix(in srgb, var(--good) 14%, transparent);
}
.stay-ok::before{ content:'✓ ' }
.stay-foot{ margin:1.6rem 0 0; font-size:.85rem; color:var(--faint) }
.stay-foot .linkish{ font-size:inherit }
.stay-done{ margin-top:1.6rem }
.stay-mates{ list-style:none; margin:.7rem 0 0; padding:0; display:grid; gap:.45rem }
.stay-mate{
  display:flex; align-items:center; gap:.8rem;
  padding:.6rem .9rem .6rem .6rem; border:var(--bw) solid var(--line); border-radius:999px;
}
.stay-mate b{ flex:1; min-width:0; font-weight:400; color:var(--ink); font-size:.95rem;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.stay-av{
  flex:none; width:2.1rem; height:2.1rem; border-radius:50%;
  display:grid; place-items:center; font-size:.7rem; font-weight:500; letter-spacing:.04em;
  background:var(--line); color:var(--muted);
}
.stay-pill{
  flex:none; font-size:.68rem; padding:.25rem .65rem; border-radius:999px;
  color:var(--faint); border:1px dashed var(--line-strong);
}
.stay-mate.mutual{ border-color:color-mix(in srgb, var(--good) 35%, var(--line)) }
.stay-mate.mutual .stay-av{ background:color-mix(in srgb, var(--good) 22%, transparent); color:var(--good) }
.stay-mate.mutual .stay-pill{ color:var(--good); border:1px solid color-mix(in srgb, var(--good) 40%, transparent) }
.stay-mate.mutual .stay-pill::before{ content:'✓ ' }
.stay-none{ color:var(--faint); font-size:.9rem }
@media (max-width:520px){ .stay-pill{ font-size:.62rem } }

/* ── transport ── */
.transit-help{
  display:flex; gap:.7rem; align-items:flex-start;
  margin:0 0 .9rem; font-size:.85rem; line-height:1.6; color:var(--muted);
}
.transit-help svg{ flex:none; width:1.15rem; height:1.15rem; margin-top:.2rem; color:var(--warn) }
.ways{ display:grid; grid-template-columns:1fr 1fr; gap:.7rem }
@media (max-width:520px){ .ways{ grid-template-columns:1fr } }
.transit .ways{ display:grid }
.way{
  position:relative; display:flex; flex-direction:column; gap:.35rem;
  padding:1rem 3rem 1.1rem 1.1rem; border:var(--bw) solid var(--line); border-radius:var(--r-s);
  background:var(--panel-2); cursor:pointer; user-select:none;
  transition:border-color .2s, background .2s, transform .2s;
  -webkit-tap-highlight-color:transparent;
}
.way input{ position:absolute; opacity:0; width:0; height:0 }
.way:hover{ border-color:var(--line-strong) }
.way:active{ transform:scale(.985) }
.way-k{ font-size:.62rem; letter-spacing:.2em; text-transform:uppercase; color:var(--faint) }
.way b{ font-weight:400; font-size:.95rem; color:var(--muted); line-height:1.4 }
.way-tick{
  position:absolute; top:1rem; right:1rem; width:1.3rem; height:1.3rem; border-radius:50%;
  border:var(--bw) solid var(--line-strong); transition:background .2s, border-color .2s;
}
.way-tick::after{
  content:''; position:absolute; left:.38rem; top:.18rem; width:.3rem; height:.6rem;
  border:solid var(--bg); border-width:0 2px 2px 0; transform:rotate(45deg) scale(0);
  transition:transform .25s cubic-bezier(.3,1.6,.5,1);
}
.way:has(input:checked){ border-color:var(--ink); background:var(--panel) }
.way:has(input:checked) b{ color:var(--ink) }
.way:has(input:checked) .way-tick{ background:var(--ink); border-color:var(--ink) }
.way:has(input:checked) .way-tick::after{ transform:rotate(45deg) scale(1) }
.way:has(input:focus-visible){ outline:2px solid var(--muted); outline-offset:2px }

.unsure{
  display:flex; align-items:center; gap:1rem; margin-top:1.4rem;
  padding:1rem 1.1rem; border:var(--bw) solid var(--line); border-radius:var(--r-s);
  cursor:pointer; user-select:none; transition:border-color .2s;
}
.unsure:hover{ border-color:var(--line-strong) }
.unsure input{ position:absolute; opacity:0; width:0; height:0 }
.switch{
  flex:none; position:relative; width:2.6rem; height:1.5rem; border-radius:999px;
  background:var(--line); transition:background .25s;
}
.switch::after{
  content:''; position:absolute; top:.2rem; left:.2rem; width:1.1rem; height:1.1rem;
  border-radius:50%; background:var(--muted);
  transition:transform .3s cubic-bezier(.3,1.4,.5,1), background .25s;
}
.unsure:has(input:checked){ border-color:var(--warn) }
.unsure:has(input:checked) .switch{ background:color-mix(in srgb, var(--warn) 45%, transparent) }
.unsure:has(input:checked) .switch::after{ transform:translateX(1.1rem); background:var(--warn) }
.unsure:has(input:focus-visible){ outline:2px solid var(--muted); outline-offset:2px }
.unsure-t b{ display:block; font-weight:400; font-size:.95rem; color:var(--ink) }
.unsure-t small{ display:block; font-size:.8rem; color:var(--faint); margin-top:.15rem }

/* ── the form, one page at a time ── */
.steps{ list-style:none; display:flex; gap:.4rem; margin:1.8rem 0 2.4rem; padding:0 }
.steps li{ flex:1; min-width:0 }
.steps button{
  display:block; width:100%; padding:.3rem 0; margin:0; border:0; background:none;
  font:inherit; color:var(--faint); text-align:left; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.steps button:disabled{ cursor:default; opacity:.4 }
.step-bar{ display:block; position:relative; height:4px; border-radius:4px; background:var(--line); overflow:hidden }
.step-bar::after{
  content:''; position:absolute; inset:0; background:var(--ink); border-radius:inherit;
  transform:scaleX(0); transform-origin:left;
  transition:transform .7s cubic-bezier(.2,.85,.25,1);
}
.steps .at .step-bar{ background:var(--line-strong) }
.steps .at .step-bar::before{
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation:stepShimmer 2.2s ease-in-out infinite;
}
.steps .done .step-bar::after{ transform:scaleX(1) }
.step-l{
  display:block; margin-top:.55rem; font-size:.6rem; letter-spacing:.12em; text-transform:uppercase;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:color .3s;
}
.steps .at .step-l{ color:var(--ink) }
.steps .done .step-l::before{ content:'✓ '; color:var(--good); display:inline-block }
.steps .pop .step-l::before{ animation:stepPop .55s cubic-bezier(.3,1.6,.5,1) }
.steps button:not(:disabled):hover .step-l{ color:var(--muted) }
.step-n{ display:none }
/* a phone has no room for seven names: numbered stops on a line instead,
   big enough for a thumb, a tick on the ones kept */
@media (max-width:640px){
  .steps{ gap:0; margin:1.4rem 0 2rem }
  .steps button{ position:relative; display:flex; justify-content:center; padding:0; height:2.6rem; align-items:center }
  .step-l{ display:none }
  .step-bar{ position:absolute; left:0; right:0; top:50%; height:2px; margin-top:-1px; border-radius:0 }
  .steps li:first-child .step-bar{ left:50% }
  .steps li:last-child .step-bar{ right:50% }
  .steps .at .step-bar{ height:2px; box-shadow:none }
  .steps .at .step-bar::before{ content:none }
  .step-n{
    display:grid; place-items:center; position:relative; z-index:1;
    width:2rem; height:2rem; border-radius:50%;
    font-size:.72rem; font-weight:500; color:var(--faint);
    background:var(--bg); border:var(--bw) solid var(--line-strong);
    transition:background .3s, color .3s, border-color .3s, transform .3s;
  }
  .steps .done .step-n{ font-size:0; color:var(--good); border-color:color-mix(in srgb, var(--good) 55%, transparent) }
  .steps .done .step-n::before{ content:"✓"; font-size:.85rem }
  .steps .pop .step-n{ animation:stepPop .55s cubic-bezier(.3,1.6,.5,1) }
  .steps .at .step-n{ background:var(--ink); color:var(--bg); border-color:var(--ink); transform:scale(1.12) }
  .steps .at.done .step-n::before{ color:var(--bg) }
  .steps button:disabled{ opacity:.55 }
  html:has(.page-actions) .wmm-lang{ bottom:5.8rem }
}
@keyframes stepPop{ from{ transform:scale(0) } 60%{ transform:scale(1.5) } to{ transform:scale(1) } }
@keyframes stepShimmer{ from{ transform:translateX(-100%) } to{ transform:translateX(100%) } }

#rsvpForm > fieldset.page-in-next{ animation:pageInNext .5s cubic-bezier(.2,.85,.25,1) both }
#rsvpForm > fieldset.page-in-prev{ animation:pageInPrev .5s cubic-bezier(.2,.85,.25,1) both }
#rsvpForm > fieldset.page-out-next{ animation:pageOutNext .21s ease-in both }
#rsvpForm > fieldset.page-out-prev{ animation:pageOutPrev .21s ease-in both }
@keyframes pageInNext{ from{ opacity:0; transform:translateX(48px) } to{ opacity:1; transform:none } }
@keyframes pageInPrev{ from{ opacity:0; transform:translateX(-48px) } to{ opacity:1; transform:none } }
@keyframes pageOutNext{ to{ opacity:0; transform:translateX(-48px) } }
@keyframes pageOutPrev{ to{ opacity:0; transform:translateX(48px) } }

/* the way on: pinned to the bottom of the screen like an app bar */
.page-actions{
  position:sticky; bottom:0; z-index:3;
  margin:1rem calc(-1 * clamp(1.5rem,5.5vw,3rem)) calc(-1 * clamp(1.5rem,5.5vw,3rem));
  padding:1.1rem clamp(1.5rem,5.5vw,3rem) calc(1.1rem + env(safe-area-inset-bottom));
  background:linear-gradient(to top, rgba(17,18,23,.96) 55%, rgba(17,18,23,0));
  border-radius:0 0 var(--r) var(--r);
  flex-direction:column-reverse; align-items:stretch; gap:.4rem;
}
.page-actions .note{ text-align:center; min-height:1.2em; margin:0 }
.page-buttons{ display:flex; gap:.7rem; align-items:center; width:100% }
.nav-back, .nav-next{
  font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent;
  display:inline-flex; align-items:center; justify-content:center;
  transition:transform .18s, opacity .2s, background .2s, border-color .2s, color .2s;
}
.nav-back{
  flex:none; width:3.2rem; height:3.2rem; border-radius:50%;
  background:none; color:var(--muted); border:var(--bw) solid var(--line-strong);
}
.nav-back:hover{ color:var(--ink); border-color:var(--ink) }
.nav-back[hidden]{ display:none }
.nav-back svg{ width:1.3rem; height:1.3rem }
.nav-next{
  margin-left:auto; gap:.7rem; height:3.2rem; padding:0 1.4rem 0 1.8rem; border-radius:999px;
  background:var(--ink); color:var(--bg); border:1px solid var(--ink);
  font-size:.78rem; font-weight:500; letter-spacing:.16em; text-transform:uppercase;
}
.nav-next svg{ width:1.2rem; height:1.2rem; transition:transform .25s cubic-bezier(.3,1.5,.5,1) }
.nav-next:hover:not(:disabled) svg{ transform:translateX(4px) }
.nav-back:active, .nav-next:active{ transform:scale(.95) }
.nav-next:disabled{ opacity:.5; cursor:default }
.nav-next.busy svg{ animation:nudge .7s ease-in-out infinite }
@keyframes nudge{ 50%{ transform:translateX(5px) } }
@media (max-width:520px){
  .nav-next{ flex:1; justify-content:space-between }
}
.note.flash{ animation:savedFlash 2.4s ease forwards }
.note.flash::before{ content:'✓ ' }
@keyframes savedFlash{ 0%{ opacity:0; transform:translateY(4px) } 12%,70%{ opacity:1; transform:none } 100%{ opacity:0 } }

@media (prefers-reduced-motion:reduce){
  #rsvpForm > fieldset[class*="page-"]{ animation:none }
  .steps .at .step-bar::before, .steps .pop .step-l::before, .note.flash{ animation:none }
}
.steps .done:not(.at) .step-bar::after{ opacity:.5 }
.steps .at .step-bar{ height:4px; box-shadow:0 0 12px rgba(255,255,255,.25) }

.stay-pay{ margin-top:2rem }
.stay-pay .paycard{ margin-top:.7rem }
.stay-full{ margin:0 0 1.1rem; font-size:.95rem; line-height:1.6; color:var(--muted) }

/* a bed that is gone: still shown, so the choice reads honestly */
.mode.full{ opacity:.4 }
.mode.full small{ color:var(--danger); letter-spacing:.14em; text-transform:uppercase; font-size:.68rem }
.ex-lose{ margin:.2rem 0 1.4rem; border-color:var(--danger); color:var(--danger); animation:loseIn .35s cubic-bezier(.2,.85,.25,1) }
@keyframes loseIn{ from{ opacity:0; transform:translateY(-6px) } }
@media (prefers-reduced-motion:reduce){ .ex-lose{ animation:none } }
/* the bed you have, in green and ticked: the one picked reads at a glance */
.ex-choices .mode{ position:relative }
.ex-choices .mode[aria-pressed="true"],
.extra-panel .ex-choices .mode[aria-pressed="true"],
.stay-ask .ex-choices .mode[aria-pressed="true"]{
  border-color:var(--good);
  background:color-mix(in srgb, var(--good) 10%, var(--panel));
}
.ex-choices .mode[aria-pressed="true"] b{ color:var(--good) }
.ex-choices .mode[aria-pressed="true"]::after{
  content:'✓'; position:absolute; top:.9rem; right:.9rem;
  width:1.5rem; height:1.5rem; border-radius:50%;
  display:grid; place-items:center; font-size:.8rem; font-weight:600;
  background:var(--good); color:var(--bg);
  animation:stepPop .45s cubic-bezier(.3,1.6,.5,1);
}
@media (prefers-reduced-motion:reduce){ .ex-choices .mode[aria-pressed="true"]::after{ animation:none } }
