/* ============================================================
   Sections — in scroll order, following Rox's Canva pages 1 → 12
   ============================================================ */

/* --- test reset (CONFIG.testMode; off before launch) --------- */

.testreset {
  position: fixed;
  left: calc(0.75rem + env(safe-area-inset-left, 0px));
  bottom: calc(0.75rem + var(--safe-b));
  /* Above everything, the envelope (200) included, like the mute
     button: a tester can start again from any screen. */
  z-index: 210;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font: 500 var(--t-xs) var(--f-sub);
  letter-spacing: var(--track-util);
  text-transform: uppercase;
  color: var(--paper);
  background: var(--leaf);
  border: 1px dashed var(--matcha-pale);
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--rule);
  cursor: pointer;
}

/* ============================================================
   00 — The envelope (Rox's pages 1 and 2)
   Shown only when the inline script has marked the page `.js` and
   this guest has not opened their envelope before (`.js-invited`).
   Her green envelope with a silver seal on paper in leaf shadow. The
   sequence is driven by classes main.js adds in order:
     is-ready     the paper and the envelope come in
     is-shaking   three shakes while the guest list is checked
     is-opening   the seal comes off, the flap opens
     is-rising    the card comes out with the lace, the photo strip
                  and Yoki; her flowers open; "Hi, ‹name›! You're
                  Invited" (held 3s)
     is-entering  the scene flies past into her blurred green
     is-leaving   the envelope fades over the hero (same green)
   Every place and size in the scene (.envelope__body, her page 2's
   design area, 7 wide to 6 tall) was measured from her page renders
   and pictures: left and width are % of the scene's width, top % of
   its height, turns are about each picture's middle.
   ============================================================ */

.envelope { display: none; }

.js .envelope {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  /* Flex + margin:auto on the stage: when a short landscape screen
     can't fit it all, the top stays reachable by scrolling. */
  overflow: hidden auto;
  /* Room for a scrollbar is kept on both sides at all times, so if one
     ever appears the scene does not re-centre and jump sideways. */
  scrollbar-gutter: stable both-edges;
  padding: calc(1.25rem + var(--safe-t)) var(--pad-r) calc(1.25rem + var(--safe-b)) var(--pad-l);
  background: var(--paper);
  color: var(--ink);
}

.js-invited .envelope { display: none; }

/* While the envelope is up, only the hero is drawn under it (the scene
   flies into its green). The sections below wait until the guest is
   in, so their photos and papers are not part of the first download. */
.js:not(.js-invited) main > .section,
.js:not(.js-invited) .footer { display: none; }

/* Her paper in leaf shadow; the shadows sway a little, as in her design. */
.envelope__paper {
  position: fixed;
  inset: -4%;
  background: var(--paper) url("../img/canva/paper-shadow-720.webp") center / cover no-repeat;
  animation: shadow-sway 16s ease-in-out infinite alternate;
  pointer-events: none;
  transition: opacity 0.9s ease-out;
}

@media (min-width: 700px), (min-resolution: 2dppx) {
  .envelope__paper { background-image: url("../img/canva/paper-shadow-1280.webp"); }
}

@keyframes shadow-sway {
  from { transform: translate(-1.2%, -0.6%) rotate(-0.5deg) scale(1.02); }
  to   { transform: translate(1.2%, 0.8%) rotate(0.5deg) scale(1.04); }
}

/* Her blurred green, which the scene flies into. Painted exactly like
   the hero's background (same picture, same shade), so the hand-over
   is unseen. */
.envelope__motion,
.hero__bg {
  background:
    linear-gradient(var(--scrim-top), var(--scrim-mid)),
    var(--forest-deep) url("../img/canva/motion-900.webp") center / cover no-repeat;
}

@media (min-width: 700px), (min-resolution: 2dppx) {
  .envelope__motion,
  .hero__bg {
    background-image:
      linear-gradient(var(--scrim-top), var(--scrim-mid)),
      url("../img/canva/motion-1600.webp");
  }
}

.envelope__motion {
  position: fixed;
  inset: 0;
  opacity: 0;
  transform: scale(1.35);
  pointer-events: none;
  /* Forward only: it comes in from close and settles at the hero's size. */
  transition: opacity 0.9s ease-in 0.2s, transform 1.5s cubic-bezier(0.2, 0.6, 0.35, 1);
}

/* Nothing shows until the fonts and the envelope are in (main.js adds
   .is-ready), then the paper fades in and the envelope floats down. */
.js .envelope:not(.is-ready) .envelope__paper,
.js .envelope:not(.is-ready) .envelope__stage { opacity: 0; }

.envelope.is-ready .envelope__stage { animation: stage-in 0.9s 0.25s var(--ease) backwards; }

@keyframes stage-in {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- the stage: title, envelope, the name form ------------------ */

/* The scene is her page 2's design area, 7 wide to 6 tall, as large as
   the screen allows: the screen's width (wider still on a portrait
   phone, below) or its height. Sizes inside it are % of the scene, or
   cqw of its width. */
.envelope {
  --scene-w: min(100vw - 1rem, (100vh - 3.5rem - var(--safe-t) - var(--safe-b)) * 7 / 6, 68rem);
}

@supports (height: 100svh) {
  .envelope {
    --scene-w: min(100vw - 1rem, (100svh - 3.5rem - var(--safe-t) - var(--safe-b)) * 7 / 6, 68rem);
  }
}

/* Portrait phones: her scene is wide, so at the screen's width the
   envelope would be little more than half of it. The scene is made a
   quarter wider than the screen instead: the envelope fills about three
   quarters of it and only the outer tips of her bouquet run off the
   edges (clipped by .envelope; nothing scrolls sideways). */
@media (max-width: 600px) and (orientation: portrait) {
  .envelope {
    --scene-w: min(125vw, (100vh - 3.5rem - var(--safe-t) - var(--safe-b)) * 7 / 6);
  }
  @supports (height: 100svh) {
    .envelope {
      --scene-w: min(125vw, (100svh - 3.5rem - var(--safe-t) - var(--safe-b)) * 7 / 6);
    }
  }
  /* The words stay on the screen: they wrap within it, not the scene.
     Once it opens, the whole scene is shrunk to fit the screen (main.js),
     so they may use its full width. */
  .envelope:not(.is-opening) .envelope__hi,
  .envelope:not(.is-opening) .envelope__venue {
    padding-inline: max(0.5rem, (var(--scene-w) - 100vw) / 2 + 0.75rem);
  }
}

.envelope__stage {
  --stage-gap: 1.1rem;
  position: relative;
  margin: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stage-gap);
  text-align: center;
  transition: transform 0.9s var(--ease), opacity 0.9s var(--ease);
}

/* Her page 1: "a little note for you ♡" just above the envelope. */
.envelope__title {
  font: italic 600 max(1.3125rem, calc(var(--scene-w) * 0.034)) / 1.2 var(--f-main);
  color: var(--forest);
  transition: opacity 0.4s var(--ease);
}

/* From a personal link: "Hi, Tita Marie & Tito Ben!" */
.envelope__to {
  font: italic 600 clamp(1.375rem, 5.4vw, 1.625rem) / 1.25 var(--f-main);
  color: var(--leaf);
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: opacity 0.4s var(--ease);
}

/* The scene. Its empty top and bottom (room for page 2's words and
   flowers) are pulled in, so on page 1 the title sits 2.8% of the
   scene's height above her envelope and the name field 2.2% below it,
   as on her page. Decorative only: taps go through it to the form. */
.envelope__body {
  position: relative;
  flex: none;
  width: var(--scene-w);
  aspect-ratio: 7 / 6;
  margin-top: calc(var(--scene-w) * -0.3137 - var(--stage-gap));
  margin-bottom: calc(var(--scene-w) * -0.0668 - var(--stage-gap));
  /* The words are sized to the scene (cqw), whatever the screen. */
  container: scene / inline-size;
  /* The shake turns about the envelope, not the scene's middle. */
  transform-origin: 50% 64.7%;
  pointer-events: none;
}

.envelope__body > * { position: absolute; }

/* Page 1: her envelope, where the open one will be, so it opens in
   place (same width; its bottom is the pocket's bottom). */
.envelope__closed {
  left: 20%;
  top: 39.4%;
  width: 60%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 22px 34px -20px color-mix(in srgb, var(--forest-deep) 70%, transparent);
  transition: opacity 0.45s var(--ease) 0.25s;
}

.envelope__seal {
  left: 50.8%;
  top: 80%;
  width: 12.2%;
  height: auto;
  translate: -50% -50%;
  filter: drop-shadow(0 3px 4px color-mix(in srgb, var(--forest-deep) 45%, transparent));
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}

/* The open envelope (her page 2): its back with the flap up, the seal
   on the flap's tip, then what comes out, then the pocket in front.
   Back and pocket are two layers of one picture, so they line up. The
   pocket's top corners are at 36.7% of this box. */
.envelope__open {
  left: 20%;
  top: 21.25%;
  width: 60.09%;
  height: 68.76%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.45s var(--ease) 0.2s;
}

.envelope__back,
.envelope__pocket {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The flap swings up: the back is uncovered from the body upwards. */
.envelope__back {
  clip-path: inset(33% 0 0 0);
  transition: clip-path 0.7s var(--ease) 0.25s;
}

/* Her seal on the open flap's tip, behind the lace; it settles there
   as the flap finishes opening. */
.envelope__seal--tip {
  position: absolute;
  left: 40.4%;
  top: -11.7%;
  width: 18.4%;
  height: auto;
  filter: drop-shadow(0 3px 4px color-mix(in srgb, var(--forest-deep) 45%, transparent));
  opacity: 0;
  transition: opacity 0.35s var(--ease) 0.6s;
}

.envelope__pocket { z-index: 2; }

/* Everything that comes out is cut off at the envelope's bottom edge,
   so while it waits below, nothing shows under the envelope. */
.envelope__inside {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: inset(-400% -60% 0 -60%);
}

/* What comes out, placed as on her page 2 (% of the open envelope),
   waiting below it until the card rises. */
.envelope__rise {
  position: absolute;
  inset: 0;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease);
}

/* Bottom to top: lace, card, photo strip, Yoki in the lace oval. */
.envelope__rise > * { position: absolute; }

.envelope__lace {
  left: -4.7%;
  top: -8.3%;
  width: 94.8%;
  height: auto;
}

/* The card: her torn paper (its shadow is in the picture), words in
   her order and places. */
.envelope__card {
  left: 18.7%;
  top: 1.7%;
  width: 59.8%;
  aspect-ratio: 560 / 780;
  rotate: -1deg;
  container-type: inline-size;
  background: url("../img/canva/card-paper-340.webp") center / 100% 100% no-repeat;
  color: var(--forest);
  text-align: center;
}

@media (min-width: 700px), (min-resolution: 2dppx) {
  .envelope__card { background-image: url("../img/canva/card-paper-560.webp"); }
}

/* Each line centred on its own point; tilted a little more than the
   card, as on hers. The top pair hangs from the top and the date sits
   on a fixed line, so where the floor sizes make the words bigger than
   hers (phones), they grow towards the drawing, not into the pocket. */
.envelope__card > * {
  position: absolute;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-2deg);
}

.envelope__card-to {
  left: 48.5%;
  top: 7.8%;
  font: italic 500 max(1.0625rem, 12cqw) / 1 var(--f-main);
}

.envelope__card-names {
  left: 49.6%;
  top: calc(9.5% + max(1.0625rem, 12cqw));
  /* The letter-spacing after the last letter, balanced. */
  padding-left: 0.14em;
  font: 600 max(0.75rem, 6.14cqw) / 1 var(--f-sub);
  letter-spacing: 0.14em;
}

.envelope__card-us {
  left: 50.15%;
  top: 39.64%;
  width: 51.1%;
  height: auto;
  transform: translate(-50%, -50%) rotate(-2deg);
}

.envelope__card-save {
  left: 54.2%;
  bottom: calc(28.7% + max(1.0625rem, 9cqw) + 2.4cqw);
  font: italic 500 max(1.0625rem, 9cqw) / 1 var(--f-main);
}

.envelope__card-date {
  left: 53%;
  bottom: 28.7%;
  font: italic 700 max(1.0625rem, 9cqw) / 1 var(--f-main);
  font-variant-numeric: lining-nums;
}

/* A 320px phone: the words are at their floor sizes, so the drawing
   steps back a little to keep clear of them, and the date lines move
   to the card's middle, clear of Yoki's oval. */
@container scene (max-width: 340px) {
  .envelope__card-us { width: 46%; }
  .envelope__card-save,
  .envelope__card-date { left: 50%; }
}

.envelope__strip {
  left: 2.6%;
  top: 11.1%;
  width: 25.7%;
  height: auto;
  rotate: -8.2deg;
  box-shadow: 0 6px 12px -6px color-mix(in srgb, var(--forest-deep) 60%, transparent);
}

/* Yoki, in the lace oval, on cream (as on hers), its foot tucked into
   the pocket. */
.envelope__oval {
  left: 66.1%;
  top: 19.2%;
  width: 32.7%;
  aspect-ratio: 480 / 654;
}

.envelope__oval::before {
  content: "";
  position: absolute;
  inset: 9% 13%;
  border-radius: 50%;
  background: var(--cream);
}

.envelope__yoki {
  position: absolute;
  left: 15%;
  top: 16%;
  width: 71%;
  height: auto;
  rotate: -2deg;
}

.envelope__oval-lace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Her flowers, all behind the envelope (none crosses its front), placed
   as on her page 2 and turned about their middles; they open as the
   card comes out. One spray of baby's breath and one anthurium leaf,
   mirrored, give her three sprays' worth and her three leaves. */
.envelope__flower {
  height: auto;
  opacity: 0;
  transform: rotate(var(--r, 0deg)) scaleX(var(--sx, 1)) scale(0.55);
  transform-origin: 50% 50%;
  transition: opacity 0.7s var(--ease) var(--d, 0.3s), transform 1.1s var(--ease) var(--d, 0.3s);
}

.envelope__flower--breath-l { left: 6.4%;  top: 28.3%; width: 48.1%; --r: -121.9deg; --d: 0.7s; }
.envelope__flower--breath-r { left: 40.1%; top: 19.9%; width: 50.2%; --r: 82.9deg; --sx: -1; --d: 0.75s; }
.envelope__flower--calla    { left: 6.5%;  top: 16.1%; width: 27.5%; --r: -29.9deg; --d: 0.35s; }
.envelope__flower--pair     { left: 65.6%; top: 20.5%; width: 22.2%; --r: 12.6deg; --d: 0.45s; }
.envelope__flower--leaf-l   { left: 11.7%; top: 53%;   width: 16.9%; --r: -57.2deg; --d: 0.55s; }
.envelope__flower--leaf-r   { left: 72.3%; top: 36.3%; width: 16.3%; --r: 42.5deg; --sx: -1; --d: 0.6s; }
.envelope__flower--leaf-r2  { left: 68.6%; top: 62.1%; width: 16.3%; --r: 74.2deg; --sx: -1; --d: 0.65s; }

/* Over it all: "Hi, ‹name›!" and her brush "You're Invited", hanging
   from the line where hers ends, so a long name grows upwards. */
.envelope__hello {
  left: 0;
  right: 0;
  bottom: 82.8%;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.8s var(--ease) 0.7s;
}

/* Her leaf shadows reach the greeting and the venue: a glow of her
   paper behind the words keeps them readable on them. */
.envelope__hi,
.envelope__venue {
  color: var(--forest);
  text-shadow: 0 0 0.35em var(--paper), 0 0 0.12em var(--paper);
}

.envelope__hi {
  min-height: 1em;
  padding-inline: 0.5rem;
  /* --fit is how far main.js shrinks the opened scene to fit the
     screen; dividing by it keeps the words at 17px or more on screen. */
  font: italic 500 max(1.25rem, 3.7cqw, 1.0625rem / var(--fit, 1)) / 1.1 var(--f-main);
  overflow-wrap: anywhere;
}

.envelope__hi strong { font-weight: 700; }

/* Long greetings ("Hi, Tito Bartolome & Tita Maria…!") one size down. */
.envelope__hi.is-long { font-size: max(1.125rem, 3cqw, 1.0625rem / var(--fit, 1)); }

.envelope__invited {
  margin-top: -1.4cqw;
  font-family: var(--f-main);
  font-style: italic;
  font-weight: 600;
  font-size: max(2.5rem, 12.5cqw);
  line-height: 1;
  white-space: nowrap;
  color: var(--forest);
  translate: -1.1cqw 0;
  rotate: -2deg;
}

.envelope__venue {
  left: 0;
  right: 0;
  top: 91.8%;
  z-index: 4;
  padding-inline: 0.5rem;
  font: italic 500 max(1.125rem, 3.1cqw, 1.0625rem / var(--fit, 1)) / 1.2 var(--f-main);
  text-wrap: balance;
  translate: 0.6cqw 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease) 0.9s;
}

.envelope__venue strong { font-weight: 700; }

/* --- the form ---------------------------------------------------- */

.envelope__find,
.envelope__ready {
  position: relative;
  z-index: 5;
  /* Her field is 54% of the envelope's width; never narrower than a
     full name needs. */
  width: max(calc(var(--scene-w) * 0.325), min(100%, 19rem));
}

.envelope__find {
  display: grid;
  justify-items: center;
  gap: max(0.5rem, calc(var(--scene-w) * 0.0103));
  transition: opacity 0.4s var(--ease);
}

.envelope__find input {
  width: 100%;
  /* 16px or iOS zooms the page on focus. */
  font: 400 1rem var(--f-sub);
  text-align: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 10px var(--rule);
}

.envelope__find input::placeholder { color: var(--muted); }
.envelope__find input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

/* Her button: "open note", small, lowercase, olive. */
.envelope__go {
  min-height: 44px;
  min-width: calc(var(--scene-w) * 0.142);
  padding: 0.5rem 1.5rem;
  font-size: max(1rem, calc(var(--scene-w) * 0.0169));
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  background: var(--leaf);
  border-color: var(--leaf);
}

/* Her olive is also the site's hover colour: a step darker here. */
.envelope__go:focus-visible {
  background: var(--forest);
  border-color: var(--forest);
}

@media (hover: hover) {
  .btn--solid.envelope__go:hover {
    background: var(--forest);
    border-color: var(--forest);
  }
}

.envelope__status {
  min-height: 1.4em;
  font-size: var(--t-sm);
  color: var(--ink);
  text-wrap: balance;
}

.envelope__status:empty { min-height: 0; }

.envelope__hint {
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.envelope__ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: opacity 0.3s var(--ease);
}

.envelope__notme,
.rsvp__notme {
  font: inherit;
  font-size: var(--t-sm);
  background: none;
  border: 0;
  padding: 0.5rem;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.envelope__notme { color: var(--ink-soft); }

/* --- the sequence -------------------------------------------- */

/* Three shakes while the guest list is checked, then still. */
.envelope.is-shaking .envelope__body { animation: env-shake 1.2s ease-in-out; }

@keyframes env-shake {
  0%, 100%       { transform: none; }
  8%, 41%, 74%   { transform: translateX(-7px) rotate(-2.5deg); }
  24%, 57%, 90%  { transform: translateX(7px) rotate(2.5deg); }
}

/* From here on nothing needs scrolling, and the gliding, rising and
   zooming stage must not make the scene scrollable: a scrollbar
   appearing mid-glide shifts everything sideways on desktop. */
.envelope.is-opening { overflow: hidden; }

.envelope.is-opening .envelope__seal { transform: translateY(-40%) scale(1.25); opacity: 0; }
.envelope.is-opening .envelope__seal--tip { opacity: 1; }
.envelope.is-opening .envelope__closed { opacity: 0; }
.envelope.is-opening .envelope__open { opacity: 1; }
.envelope.is-opening .envelope__back { clip-path: inset(0 0 0 0); }
.envelope.is-opening .envelope__title,
.envelope.is-opening .envelope__to,
.envelope.is-opening .envelope__ready,
.envelope.is-opening .envelope__find { opacity: 0; pointer-events: none; }

/* The card comes out of the pocket; main.js has already glided (and on
   short screens shrunk) the stage so the whole scene is centred. */
.envelope.is-rising .envelope__rise { transform: none; }
.envelope.is-rising .envelope__flower { opacity: 1; transform: rotate(var(--r, 0deg)) scaleX(var(--sx, 1)); }
.envelope.is-rising .envelope__hello,
.envelope.is-rising .envelope__venue { opacity: 1; }

/* Into her green: always forward. The scene flies past the camera and
   fades, the paper goes, and the blurred green comes in from close and
   settles at exactly the hero's size. */
.envelope.is-entering .envelope__stage {
  opacity: 0;
  transition: transform 1.3s cubic-bezier(0.55, 0, 0.85, 0.4), opacity 0.8s ease-in 0.2s;
}
.envelope.is-entering .envelope__paper { opacity: 0; transition: opacity 1s ease-in 0.3s; }
.envelope.is-entering .envelope__motion { opacity: 1; transform: none; }

/* What is left of the envelope is the same picture as the hero's, so
   this fade is brief and unseen. */
.envelope.is-leaving {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0s linear 0.4s;
}

/* Landscape phones: less room between the lines on a 390px-tall screen. */
@media (max-height: 500px) and (orientation: landscape) {
  .envelope__stage { --stage-gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .envelope__paper { animation: none; }
}

/* --- top bar and menu (Earl, 4 Dec) ---
   A slim green bar like the couple's portal: their names on the left,
   Menu on the right, there once the guest is in. Menu drops down a small
   card under the bar with the sections, RSVP and the pass (a dropdown,
   not a whole-screen panel). 3.5rem tall plus the notch. */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: calc(3.5rem + var(--safe-t));
  padding: var(--safe-t) calc(0.5rem + env(safe-area-inset-right, 0px)) 0 calc(var(--pad-l) - 0.25rem);
  background: var(--forest);
  color: var(--on-dark);
  box-shadow: 0 6px 18px -10px var(--forest-deep);
}

.js:not(.js-invited) .topbar { display: none; }

.topbar__names {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  font: italic 600 1.5rem / 1 var(--f-main);
  color: var(--on-dark);
  text-decoration: none;
  white-space: nowrap;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.75rem;
  font: 500 var(--t-xs) var(--f-sub);
  letter-spacing: var(--track-util);
  text-transform: uppercase;
  color: var(--on-dark);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.topbar__names:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 2px;
}

.menu-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 17px;
}

.menu-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu-toggle.is-open .menu-toggle__bars i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bars i:last-child  { transform: translateY(-2.75px) rotate(-45deg); }

/* The card: her light paper, pinned under the bar on the right. It
   stops above the Mute pill (which sits over everything) and scrolls
   inside itself where a landscape phone is shorter than it. */
.navpanel {
  position: fixed;
  top: calc(var(--safe-t) + 3.5rem + 0.5rem);
  right: calc(0.75rem + env(safe-area-inset-right, 0px));
  z-index: 45;
  width: min(17rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 8.75rem - var(--safe-t) - var(--safe-b));
  max-height: calc(100dvh - 8.75rem - var(--safe-t) - var(--safe-b));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.375rem 0 0.875rem;
  background: var(--surface);
  color: var(--forest);
  border: 1px solid var(--matcha-pale);
  border-radius: 1rem;
  box-shadow: 0 8px 24px var(--rule);
  animation: navpanel-drop 0.18s var(--ease);
}

@keyframes navpanel-drop {
  from { opacity: 0; transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .navpanel { animation: none; }
}

.navpanel__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.navpanel__links li + li { border-top: 1px solid var(--rule-soft); }

.navpanel__links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 1.25rem;
  font: 500 1.25rem / 1.2 var(--f-main);
  text-decoration: none;
  color: var(--forest);
}

.navpanel__links a:focus-visible {
  outline: 2px solid var(--matcha);
  outline-offset: -2px;
  background: var(--matcha-mist);
}
@media (hover: hover) {
  .navpanel__links a:hover { background: var(--matcha-mist); }
}

.navpanel__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.375rem;
  padding: 0.75rem 1rem 0;
  border-top: 1px solid var(--rule);
}

.navpanel__actions .btn { width: 100%; }

/* ============================================================
   01 — Hero (Rox's page 3)
   Her blurred green (painted with the envelope's, see 00) with the
   caricature, her note and the countdown. `.is-arriving` (from the
   envelope) brings the words in one after another; scrolling drifts
   the background slower than the page (--sy from main.js).
   ============================================================ */

/* Focus lands here when the envelope opens; the hero itself is not a
   control, so no ring. */
.hero:focus { outline: none; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(5rem + var(--safe-t)) var(--pad-r) 4.5rem var(--pad-l);
  overflow: hidden;
  background: var(--forest-deep);
  color: var(--on-dark);
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  translate: 0 calc(var(--sy, 0) * 0.35px);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-width: 36rem;
  translate: 0 calc(var(--sy, 0) * -0.12px);
  opacity: calc(1 - var(--sy, 0) / 900);
}

.hero__guest {
  font: italic 600 clamp(1.375rem, 5.6vw, 1.75rem) / 1.25 var(--f-main);
  color: var(--on-dark);
  overflow-wrap: anywhere;
}

.hero__guest.is-long { font-size: clamp(1.1875rem, 4.8vw, 1.4rem); }

/* Their photo, upright like a print: a thin edge of her light paper and
   a soft shadow on the green. About half the phone's width (Earl, 4 Dec:
   "this big"), never more than 15rem. The hero grows to fit it. */
.hero__photo {
  display: block;
  width: min(53vw, 15rem);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 3px solid var(--on-dark);
  border-radius: 2px;
  box-shadow: 0 10px 24px -12px var(--forest-deep);
}

.hero__note {
  font: 500 var(--t-lead) / 1.45 var(--f-main);
  color: var(--on-dark);
  max-width: 34rem;
  text-wrap: pretty;
}

/* The signature stays together on one line. */
.hero__signed { white-space: nowrap; }

.hero__note strong { font-weight: 700; }

.hero__sign {
  font: italic 500 var(--t-accent) / 1.4 var(--f-main);
  color: var(--on-dark);
}

.hero__dots {
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1;
}

/* One line, as on her page, and kept modest (Earl, 3 Dec: not too big
   on phones): 22px on a small phone up to 44px on a wide screen. */
.hero__script {
  font: italic 500 clamp(1.375rem, 1rem + 2.2vw, 2.75rem) / 1.15 var(--f-main);
  color: var(--on-dark);
  text-wrap: balance;
}

/* Her countdown: a cream pill for the days, the clock under it. */
/* Kept compact (Earl, 3 Dec: simple, not taking much room). */
.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.countdown__days {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 8.5rem;
  padding: 0.3rem 1.9rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--gold);
  font: 600 clamp(2.25rem, 9vw, 3rem) / 1 var(--f-main);
  letter-spacing: 0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown__days small {
  font-family: var(--f-sub);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.countdown__clock {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.countdown__clock > span:not(.countdown__colon) {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.9rem;
}

.countdown__clock b {
  font: 600 clamp(1.375rem, 5.5vw, 1.75rem) / 1 var(--f-main);
  letter-spacing: 0.06em;
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown__clock small {
  font-family: var(--f-sub);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
  color: var(--on-dark-soft);
}

.countdown__colon {
  font: 500 clamp(1.125rem, 4.5vw, 1.375rem) / 1.2 var(--f-main);
}

.hero__date {
  font-size: var(--t-sm);
  letter-spacing: 0.04em;
  color: var(--on-dark-soft);
}


.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(1.25rem + var(--safe-b));
  width: 1px;
  height: 2.6rem;
  background: linear-gradient(var(--on-dark-soft), transparent);
  translate: -50% 0;
}

/* From the envelope: her words come in one after another. */
.hero.is-arriving .hero__inner > * { animation: rise-in 0.9s var(--ease) backwards; }
.hero.is-arriving .hero__inner > :nth-child(2) { animation-delay: 0.15s; }
.hero.is-arriving .hero__inner > :nth-child(3) { animation-delay: 0.25s; }
.hero.is-arriving .hero__inner > :nth-child(4) { animation-delay: 0.4s; }
.hero.is-arriving .hero__inner > :nth-child(5) { animation-delay: 0.5s; }
.hero.is-arriving .hero__inner > :nth-child(6) { animation-delay: 0.6s; }
.hero.is-arriving .hero__inner > :nth-child(7) { animation-delay: 0.75s; }
.hero.is-arriving .hero__inner > :nth-child(8) { animation-delay: 0.9s; }
.hero.is-arriving .hero__inner > :nth-child(n+9) { animation-delay: 1.05s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: calc(4.5rem + var(--safe-t)); }
  /* Sized by the screen's height on a phone on its side. */
  .hero__photo { width: auto; height: 62vh; height: 62svh; }
  .hero__note { font-size: 1.125rem; line-height: 1.4; }
  .hero__sign { font-size: 1.0625rem; }
}

/* Laptops and tablets on their side (up to about 900px tall): the whole
   hero, down to the pass button, in the first view; the script on one
   line. */
@media (min-width: 900px) and (max-height: 920px) and (orientation: landscape) {
  .hero__inner { gap: 0.6rem; max-width: 44rem; }
}

/* Short phones (320x640, 375x667, a folded 280x653): everything closer
   together, so the whole hero, the pass button included, ends above the
   floating Mute (and test Reset) buttons, which take the bottom 56px
   of the screen in both corners. */
@media (max-height: 700px) and (orientation: portrait) {
  .hero { padding-top: calc(4.5rem + var(--safe-t)); }
  .hero__inner { gap: 0.375rem; }
  .hero__note { font-size: 1.125rem; line-height: 1.35; }
  .hero__sign { font-size: 1.0625rem; line-height: 1.35; }
}

/* Narrow, taller phones (360 x 780): a little closer together, so the
   pass button ends above the floating corner buttons. */
@media (max-width: 370px) and (min-height: 701px) and (orientation: portrait) {
  .hero__inner { gap: 0.7rem; }
}

/* --- shared: her script headings --------------------------------- */

.script-title {
  font-family: var(--f-main);
  font-style: italic;
  font-weight: 500;
  font-size: var(--t-title);
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--forest);
  text-align: center;
}

/* ============================================================
   02 — The proposal (Rox's page 4)
   ============================================================ */

.proposal { background: var(--paper); }

.proposal__head {
  margin-bottom: var(--gap);
}

.proposal__date {
  font: italic 500 var(--t-lead) / 1.2 var(--f-main);
  font-variant-numeric: lining-nums;
  color: var(--ink-soft);
}

.proposal__title {
  font: italic 500 var(--t-title) / 1 var(--f-main);
  color: var(--forest);
}

.proposal__grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--gap-sm);
  align-items: end;
}

.proposal__ring,
.proposal__beach { margin: 0; }

.proposal__ring img,
.proposal__beach img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.proposal__beach { align-self: end; }

.proposal__text {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: var(--gap-sm);
  color: var(--ink);
  line-height: 1.6;
  max-width: 34rem;
}

.proposal__text strong { font-weight: 600; }
.proposal__next { font: italic 600 var(--t-lead) / 1.35 var(--f-main); color: var(--forest); }

/* Her page 4: ring, beach and words side by side (landscape phones too,
   so the photos never stand taller than the screen). */
@media (min-width: 760px), (orientation: landscape) and (min-width: 560px) {
  .proposal__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 5fr);
    gap: var(--gap);
  }
  .proposal__beach { width: 82%; }
  .proposal__text { grid-column: 3; margin-top: 0; }
}

@media (min-width: 1100px) {
  .proposal__text { font-size: 1.0625rem; }
}

/* ============================================================
   03 — Our story (Rox's page 5)
   Polaroids on her blurred green; each photo sits in the frame's
   window (measured from the frame: 12.3% / 14.3% at the sides, 8.9%
   at the top, the caption in the bottom 25%). As on her page the cards
   stand straight and still (Earl, 3 Dec: no animation).
   ============================================================ */

.story {
  background:
    linear-gradient(var(--scrim-mid), var(--scrim-mid)),
    var(--forest-deep) url("../img/canva/motion-900.webp") center / cover no-repeat;
  color: var(--on-dark);
}

/* The same size of her green as the hero's on this screen (see 00),
   so only one of the two files is ever downloaded. */
@media (min-width: 700px), (min-resolution: 2dppx) {
  .story {
    background-image:
      linear-gradient(var(--scrim-mid), var(--scrim-mid)),
      url("../img/canva/motion-1600.webp");
  }
}

.story__title {
  margin-bottom: 2rem;
  font: italic 500 var(--t-title) / 1 var(--f-main);
  color: var(--on-dark);
  text-align: center;
}

.story__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 2rem var(--gap);
  max-width: 17rem;
}

@media (min-width: 760px) {
  .story__list {
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 15rem));
    justify-content: center;
  }
}

@media (min-width: 1100px) {
  .story__list { grid-template-columns: repeat(3, minmax(0, 17.5rem)); gap: var(--gap-lg) var(--gap-lg); }
}

.polaroid {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Her photo card (p05-04: cream paper with its soft shadow, 594 x 800;
   make-canva-assets.py fills its window with its own paper). The photo
   sits where her window is (73 and 72 px in from the left and top,
   435 x 525) and the caption on the paper under it. Percentages are of
   the card's width, so it scales as one picture; a longer caption lets
   the card grow a little (paper and shadow stretch, the photo stays). */
.polaroid__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 594 / 800;
  padding: 12.12% 14.48% 9% 12.29%;
  background: url("../img/canva/polaroid-594.webp") center / 100% 100% no-repeat;
}

.polaroid__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 435 / 525;
  object-fit: cover;
  object-position: 50% 0;   /* as she cropped them: the top kept, headroom and all */
}

.polaroid__caption {
  margin-top: 4%;
  font: italic 500 1.125rem / 1.25 var(--f-main);
  color: var(--ink);
  text-align: left;
}

.polaroid__year {
  margin-top: 0.9rem;
  font: italic 600 1.5rem / 1 var(--f-main);
  font-variant-numeric: lining-nums;
  letter-spacing: 0.3em;
  color: var(--on-dark);
}

/* The last "year" is the infinity sign ("and on"): a sign, drawn bigger. */
.polaroid__year--on {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

/* Side by side (landscape phones and up): the three years share one
   line at the foot of their polaroids, however long each caption is,
   and the sign is lowered from its line box onto the digits' baseline. */
@media (min-width: 760px) {
  /* All three cards one height, as on her page; a shorter caption
     leaves more paper under it. */
  .polaroid__photo { flex: 1 0 auto; }
  /* One height for every year line, the bigger sign included (it may
     run below its box), so the three cards come out the same height. */
  .polaroid__year { margin-top: auto; padding-top: 0.9rem; height: 2.4rem; }
  .polaroid__year--on { position: relative; top: 0.55rem; }
}

/* ============================================================
   04 — Celebrate with us (Rox's page 6)
   ============================================================ */

.celebrate {
  background: var(--forest) url("../img/canva/green-paper-1200.webp") center / cover;
  color: var(--on-dark);
  overflow: hidden;
}

.celebrate__grid {
  display: grid;
  gap: var(--gap-lg);
  align-items: center;
}

@media (min-width: 860px) {
  .celebrate__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--gap-xl); }
}

/* Her page 6, rebuilt from her pieces and placed as on her page
   (measured on page-06.jpg, 3 Dec): her grey studio photo in the lace's
   opening; the lace; the bouquet over the lace's left side (baby's
   breath, the calla pair, two anthurium leaves); the two of them, cut at
   the opening, so the flowers tuck in behind Rox; the rings in front.
   Every piece is placed as a share of the lace frame (572 x 800), so the
   whole picture scales as one. The figure keeps room on the left (half
   the frame's width) and on top for the bouquet; the baby's breath may
   reach a little into the page's side padding. */
.celebrate__photo {
  margin: 0 auto;
  width: min(100%, 36rem);
  padding: 13.986% 0 0 33.333%;
}

@media (max-height: 500px) and (orientation: landscape) {
  .celebrate__photo { width: min(100%, 80vh); }
}

.celebrate__frame {
  position: relative;
  aspect-ratio: 572 / 800;
}

.celebrate__frame > img {
  position: absolute;
  max-width: none;
}

.celebrate__studio {
  left: 7.692%;
  top: 5.5%;
  width: 84.615%;
  height: 88.875%;
  object-fit: cover;
}

.celebrate__lace {
  inset: 0;
  width: 100%;
  height: 100%;
}

.celebrate__flower { height: auto; }
.celebrate__breath { left: -53.54%; top: -0.8%;   width: 86.26%; rotate: -100deg; }
.celebrate__calla  { left: -25.15%; top: -15.69%; width: 53.65%; rotate: -36.7deg; }
.celebrate__leaf--low { left: -16.59%; top: 23.91%; width: 34.86%; rotate: -90deg; }
.celebrate__leaf--top { left: -4.18%;  top: -6.88%; width: 35.49%; }

.celebrate__people {
  left: 8.217%;
  top: 5.875%;
  width: 83.566%;
  height: 88.125%;
}

.celebrate__rings {
  left: -19.46%;
  top: 77.37%;
  width: 32.25%;
  height: auto;
}

.celebrate__text {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: center;
}

@media (min-width: 860px) {
  .celebrate__text { text-align: left; }
}

.celebrate__title {
  font-family: var(--f-main);
  font-style: italic;
  font-weight: 500;
  font-size: var(--t-title);
  line-height: 1.1;
  color: var(--on-dark);
}

.celebrate__venue {
  font: italic 600 var(--t-lead) / 1.3 var(--f-main);
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-on-dark);
}

@media (min-width: 860px) {
  .celebrate__venue { font-size: 1.75rem; }
}

/* Venue, address and time, each on its own ruled line. */
.celebrate__venue,
.celebrate__address {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule-on-dark);
}

.celebrate__address {
  font: 400 var(--t-base) / 1.65 var(--f-sub);
  color: var(--on-dark);
  max-width: 28rem;
}

@media (max-width: 859px) {
  .celebrate__address { margin-inline: auto; }
}

.celebrate__when {
  font: italic 600 var(--t-lead) / 1.3 var(--f-main);
  font-variant-numeric: lining-nums;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule-on-dark);
}

.celebrate__cal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

@media (min-width: 860px) {
  .celebrate__cal { justify-content: flex-start; }
}

.celebrate__cal .btn { padding-inline: 1.4rem; }

/* Landscape phones: picture and words side by side, as on her page. */
@media (max-height: 500px) and (orientation: landscape) and (min-width: 560px) {
  .celebrate__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
  .celebrate__text { text-align: left; }
  .celebrate__address { margin-inline: 0; }
  .celebrate__cal { justify-content: flex-start; }
}

/* ============================================================
   05 — The day, in order (Rox's page 7)
   ============================================================ */

.day { background: var(--paper); }

.day__title { margin-bottom: var(--gap); }

.schedule {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.schedule__item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 600px) {
  .schedule__item { grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; }
}

.schedule__time {
  font: 600 1.25rem / 1.25 var(--f-main);
  font-variant-numeric: lining-nums;
  color: var(--forest);
}

.schedule__what h3 {
  font: italic 600 var(--t-lead) / 1.25 var(--f-main);
  color: var(--forest);
  margin-bottom: 0.4rem;
}

.schedule__what p {
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Small phones: the time and the title on one line, the words under
   them across the full width. */
@media (max-width: 419px) {
  .schedule__item {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.75rem;
    row-gap: 0.3rem;
    align-items: baseline;
    padding: 1rem 0 1.1rem;
  }
  .schedule__what { display: contents; }
  .schedule__what h3 { margin: 0; }
  .schedule__what p { grid-column: 1 / -1; }
}

/* ============================================================
   06 — Getting there (Rox's page 8)
   ============================================================ */

.venue { background: var(--paper); }

/* Her page 8. A phone: the title, the building and the studio's sign
   side by side, the directions, the map. Wide screens (and landscape
   phones): three columns as on her page, the building, the map and the
   title down the left, the sign the full height in the middle, the
   directions on the right. Every picture has its own cell, so nothing
   overlaps. */
.venue__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  grid-template-areas:
    "title    title"
    "building sign"
    "side     side"
    "map      map";
  gap: 0.75rem;
}

.venue__title    { grid-area: title; text-align: left; margin-bottom: 0.5rem; }
.venue__building { grid-area: building; }
.venue__sign     { grid-area: sign; }
.venue__side     { grid-area: side; margin-top: var(--gap-sm); }
.venue__map      { grid-area: map; margin-top: var(--gap); }

.venue__building {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* As tall as the building beside it (or, on wide screens, as the whole
   left column), cut to fit: height 0 so its own tall shape doesn't
   stretch the row, then min-height fills the cell. */
.venue__sign {
  width: 100%;
  height: 0;
  min-height: 100%;
  object-fit: cover;
}

@media (min-width: 1000px), (min-width: 700px) and (orientation: landscape) {
  .venue__grid {
    grid-template-columns: minmax(0, 28fr) minmax(0, 21fr) minmax(0, 39fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "building sign side"
      "map      sign side"
      "title    sign side";
    column-gap: var(--gap);
    row-gap: 0.75rem;
  }
  .venue__title { align-self: start; margin: 0.25rem 0 0; }
  /* Her page: the studio's name at the top, the buttons at the foot. */
  .venue__side  { margin-top: 0; align-self: stretch; }
  .venue__side .venue__go { margin-top: auto; padding-top: var(--gap-sm); }
  .venue__grid .venue__map { margin-top: 0; aspect-ratio: 2 / 1; }
  /* Once a guest opens it, the map takes the full width under the rest. */
  .venue__grid .venue__map.is-open { grid-column: 1 / -1; grid-row: 4; aspect-ratio: 16 / 7; margin-top: var(--gap-sm); }
}

.venue__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--ink);
}

.venue__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 600 clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem) / 1.2 var(--f-main);
  color: var(--forest);
  margin-top: 0.5rem;
}

.venue__name .icon { color: var(--leaf); }

.venue__address { line-height: 1.6; }

.venue__side a { text-underline-offset: 3px; }

.venue__go {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.venue__go .btn { padding-inline: 1.5rem; }

/* Small phones: the pills don't fit in one row, so they stack, all
   one width. */
@media (max-width: 479px) {
  .venue__go {
    align-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

.venue__map {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 1px solid var(--rule);
  background: var(--matcha-mist);
}

.venue__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Until a guest asks for it: grid paper with a pin, not a grey box. */
.venue__map-load {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  color: var(--ink);
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 46%, var(--matcha-mist) 0 5.5rem, transparent 5.6rem),
    repeating-linear-gradient(0deg, var(--rule-soft) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--rule-soft) 0 1px, transparent 1px 32px),
    var(--matcha-mist);
}

.venue__map-cta {
  font: italic 600 var(--t-lead) / 1.3 var(--f-main);
  border-bottom: 1px solid currentColor;
}

.venue__map-note { font-size: var(--t-sm); color: var(--muted); }

@media (hover: hover) {
  .venue__map-load:hover .venue__map-cta { color: var(--leaf); }
}

/* ============================================================
   07 — RSVP (Rox's page 9): her card on the leaf-shadow paper
   ============================================================ */

.rsvp {
  background: var(--paper) url("../img/canva/paper-shadow-720.webp") center / cover;
}

@media (min-width: 700px), (min-resolution: 2dppx) {
  .rsvp { background-image: url("../img/canva/paper-shadow-1280.webp"); }
}

.rsvp__card {
  display: grid;
  gap: var(--gap);
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3.25rem);
  background: var(--paper-2);
  box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--forest-deep) 55%, transparent);
}

@media (min-width: 900px) {
  .rsvp__card {
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    gap: var(--gap) var(--gap-xl);
    align-items: start;
  }
  .rsvp__title { grid-column: 1 / -1; }
}

.rsvp__intro {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  color: var(--ink);
}

.rsvp__title {
  font: 600 clamp(2.25rem, 1.8rem + 2vw, 3.25rem) / 1 var(--f-main);
  letter-spacing: 0.16em;
  /* The spacing trails the last letter too: pad the start to match, so
     the word sits at the true centre. */
  padding-left: 0.16em;
  color: var(--forest);
  text-align: center;
}

.rsvp__held {
  font: 400 1rem / 1.5 var(--f-sub);
  color: var(--ink);
}

/* The guest's name: the main font's italic (Jost has no italic here). */
.rsvp__held em { font: italic 600 1.25rem / 1.3 var(--f-main); color: var(--forest); }

/* The pass button keeps to one line on a small phone. */
.rsvp__intro .btn { align-self: flex-start; padding-inline: 1.3rem; }

.rsvp__notme {
  align-self: flex-start;
  margin-top: -0.75rem;
  padding-inline: 0;
  font-size: 1rem;
  color: var(--ink);
}

.rsvp__deadline {
  font: italic 500 var(--t-accent) / 1.35 var(--f-main);
  color: var(--ink);
  text-wrap: balance;
}

.rsvp__deadline strong { font-weight: 700; display: block; color: var(--forest); }


/* One column (phones, tablets): the words under the title are centred
   with it, like a card; the form below keeps its labels to the left. */
@media (max-width: 899px) {
  .rsvp__intro { align-items: center; text-align: center; }
  .rsvp__intro .btn,
  .rsvp__notme { align-self: center; }
  .rsvp__card > .form { margin-top: var(--gap-sm); }
}

.form {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field--wide { grid-column: 1 / -1; }

.field label {
  font-size: var(--t-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  font-family: var(--f-sub);
  font-weight: 400;
  /* Must be at least 16px. Below that, iOS Safari zooms the whole page
     in when a field is focused and leaves it there. */
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  width: 100%;
  transition: border-color 0.3s var(--ease);
}

.field textarea { resize: vertical; min-height: 5.5rem; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--leaf);
  outline: none;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 1px;
}

.form__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-sm);
}

.form__status {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  min-height: 1.4em;
}

.form__status[data-state="ok"]   { color: var(--leaf); }
.form__status[data-state="err"]  { color: var(--ink); font-weight: 500; }

/* RSVP: the status sits under the form, outside it, so the thank-you
   stays when a sent reply hides the form. Nothing there: no space. */
.rsvp__card > .form__status { margin-top: calc(var(--gap-sm) - var(--gap)); }
.rsvp__card > .form__status:empty { display: none; }
.rsvp__card > .form__status[data-state="ok"] {
  margin-top: 0;
  font: italic 500 var(--t-accent) / 1.35 var(--f-main);
  color: var(--forest);
  text-align: center;
}
@media (min-width: 900px) {
  .rsvp__card > .form__status { grid-column: 2; }
  .rsvp__card > .form__status[data-state="ok"] { text-align: left; }
}

/* ============================================================
   08 — What to wear (Rox's page 10)
   ============================================================ */

.wear { background: var(--paper); }

.wear__title { margin-bottom: var(--gap-sm); }

/* Her outfit photos, standing together in a row, feet on one line. */
.wear__people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.25rem 0;
}

/* Sized from the screen so the eight always make whole rows: two on
   a phone (the men, then the women), one from a tablet up. */
.wear__people li { height: calc((100vw - 2.75rem) / 2.85); margin-inline: -0.6%; }

@media (min-width: 700px) {
  .wear__people li { height: min(14.5rem, calc((min(100vw, 1180px) - 8rem) / 5)); }
}
.wear__people img { height: 100%; width: auto; }

.wear__box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 5vw, 3rem);
  background: var(--paper-2);
  color: var(--ink);
  line-height: 1.6;
}

.wear__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm) var(--gap);
  margin-top: var(--gap);
}

/* Phones: the logo centred under the swatches at every width. */
@media (max-width: 599px) {
  .wear__foot { flex-direction: column; align-items: center; }
}

.wear__theme {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wear__theme-name {
  font-family: var(--f-main);
  font-style: italic;
  font-weight: 500;
  /* Always a size under "what to wear" above it. */
  font-size: 2.25rem;
  line-height: 1;
  color: var(--forest);
}

@media (min-width: 700px) {
  .wear__theme-name { font-size: 2.75rem; }
}

/* Landscape phones: the heading is 2.75rem there, so one size under. */
@media (max-height: 500px) and (orientation: landscape) {
  .wear__theme-name { font-size: 2.25rem; }
}

.wear__theme-sub {
  font: italic 500 1.125rem / 1.3 var(--f-main);
  color: var(--ink-soft);
}

.wear__swatches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 0.7rem;
}

.wear__swatches li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font: 400 var(--t-xs) / 1 var(--f-sub);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* Small phones: an even three by two. */
@media (max-width: 400px) {
  .wear__swatches { display: grid; grid-template-columns: repeat(3, 4.5rem); }
}

.wear__chip {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--rule);
}


/* ============================================================
   09 — Useful info (Rox's page 11): a pale card on her green paper
   ============================================================ */

.info {
  background: var(--forest) url("../img/canva/green-paper-1200.webp") center / cover;
}

.info__card {
  position: relative;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--matcha-mist);
  color: var(--ink);
}

.info__card .script-title { text-align: left; margin-bottom: var(--gap-sm); }

.faq {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 0.85rem 0;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font: 600 clamp(1.125rem, 1rem + 0.5vw, 1.25rem) / 1.3 var(--f-main);
  color: var(--ink);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  margin-left: auto;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--leaf);
  flex: none;
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq summary .icon { flex: none; width: 1.2em; height: 1.2em; color: var(--leaf); }

.faq__answer {
  padding: 0 0 1.4rem;
  font: 400 var(--t-base) / 1.65 var(--f-sub);
  color: var(--ink-soft);
  max-width: 58ch;
}

.faq__answer > * + * { margin-top: 0.9rem; }

/* ============================================================
   10 — Enjoy your day! (Rox's page 12) / footer
   ============================================================ */

/* On her light paper, like the other light sections (Earl, 4 Dec). */
.after {
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.after__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
}

.after__script {
  font-family: var(--f-main);
  font-style: italic;
  font-weight: 500;
  font-size: var(--t-title);
  line-height: 1;
  color: var(--forest);
}

.after__note {
  font: italic 500 var(--t-accent) / 1.45 var(--f-main);
  color: var(--ink);
  max-width: 34ch;
}

/* A slim bar, just its two lines and the credit (Earl, 4 Dec). The
   credit's row (44px, for its tap) lines up with the floating Mute and
   test Reset pills (44px, 0.75rem up), so it sits between them and the
   two lines above them; the home indicator gets its inset too. */
.footer {
  background: var(--forest-deep);
  color: var(--on-dark-soft);
  padding: 1rem 0 calc(0.75rem + var(--safe-b));
}

/* The date and the place, centred like the credit under them; on a
   phone they stack. */
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3rem var(--gap-lg);
  font-size: var(--t-xs);
  letter-spacing: var(--track-util);
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 600px) {
  .footer__inner { flex-direction: column; text-wrap: balance; }
}

/* ============================================================
   Colophon — our credit, inside the footer, under the place
   Kept small and in her style: on the footer's dark
   green, "made by" in lowercase, the RECONTECH mark turned light so it
   shows on the green, and the name in the sub font's semibold caps at
   label size (the site keeps to two fonts).
   ============================================================ */

.colophon__inner {
  margin-top: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.colophon__label {
  font: 400 var(--t-xs) / 1 var(--f-sub);
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--on-dark-soft);
}

.colophon__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--on-dark-soft);
}

.colophon__mark {
  width: auto;
  height: 13px;
  display: block;
  /* The mark is deep green; drawn light here so it shows on the green. */
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.colophon__name {
  font-family: var(--f-sub);
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  line-height: 1;
}

.colophon__brand:focus-visible { outline-offset: 2px; }

@media (hover: hover) {
  .colophon__brand:hover { color: var(--on-dark); }
}

/* ============================================================
   Invitation pass
   The guest's card for the guard at the entrance. On screen it is
   a dialog over the page; printed, it is the only thing on the
   paper (html.pass-open is set while it is open).
   ============================================================ */

.pass {
  width: min(100% - 2rem, 26rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: auto;
}

.pass::backdrop {
  /* Nearly solid, so the hint under Print / Close reads on plain green. */
  background: color-mix(in srgb, var(--forest) 90%, transparent);
}

.pass__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 1.5rem 1.6rem;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
  /* A white margin, then a fine leaf-green rule: like a printed card. */
  box-shadow: inset 0 0 0 10px var(--surface), inset 0 0 0 11px var(--leaf);
  border-radius: 4px;
}

.pass__us { width: 6rem; height: auto; margin-bottom: 0.2rem; }

.pass__kind {
  font-family: var(--f-sub);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--leaf);
}

.pass__event {
  font: italic 500 1.125rem / 1.2 var(--f-main);
  color: var(--ink-soft);
}

.pass__names {
  font-family: var(--f-main);
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1.1;
  color: var(--forest);
}

.pass__facts {
  width: 100%;
  margin: 0.8rem 0 0.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--matcha-pale);
  border: 1px solid var(--matcha-pale);
  text-align: left;
}

.pass__fact {
  background: var(--surface);
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.pass__fact--guest,
.pass__fact--wide { grid-column: 1 / -1; }

.pass__fact dt {
  font-size: var(--t-xs);
  letter-spacing: var(--track-util);
  text-transform: uppercase;
  color: var(--muted);
}

.pass__fact dd {
  margin: 0;
  font-size: var(--t-base);
  line-height: 1.4;
  color: var(--ink);
  /* Break between words; only a word too long for the box is split. */
  overflow-wrap: break-word;
}

/* The guest's name is what the guard reads first. */
.pass__fact--guest dd {
  font-family: var(--f-main);
  font-weight: 600;
  font-size: 1.625rem;
  line-height: 1.2;
  color: var(--forest);
}

.pass__code {
  font-weight: 600;
  letter-spacing: 0.16em;
}

.pass__note {
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

/* Phones: a tighter card, so the whole pass and its Print and Close
   buttons fit on one screen (checked at 320x640 and 375x667). Seats
   take only the room they need, so the date wraps to two lines. */
@media (max-width: 420px) {
  .pass__card { padding: 1.25rem 1rem 1rem; gap: 0.35rem; }
  .pass__us { width: 4rem; margin-bottom: 0; }
  .pass__names { font-size: 1.75rem; }
  .pass__facts { grid-template-columns: auto minmax(0, 1fr); margin: 0.5rem 0 0.1rem; }
  .pass__fact { padding: 0.5rem 0.65rem; gap: 0.1rem; }
  .pass__fact dd { line-height: 1.35; }
  .pass__fact--guest dd { font-size: 1.5rem; }
  .pass__actions { padding-top: 0.75rem; }
  /* Fully opaque here: on a small phone the hint under Print / Close
     sat over faint hero text showing through the 90% green. */
  .pass::backdrop { background: var(--forest); }
}

/* A folded phone (280px): tighter still. */
@media (max-width: 300px) {
  .pass { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .pass__card { padding: 1rem 0.85rem 0.85rem; gap: 0.25rem; }
  .pass__us { width: 3rem; }
  .pass__facts { margin: 0.35rem 0 0; }
  .pass__fact { padding: 0.4rem 0.55rem; }
  .pass__fact--guest dd { font-size: 1.3125rem; }
  .pass__note { line-height: 1.4; }
}

.pass__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 0 0.25rem;
}

/* On the dark backdrop (--forest at 90%) Print is the light solid pill
   (.btn--solid-light, --forest-deep on --matcha-mist) and Close the
   outline button, which needs light lines. */
.pass__actions .btn:not(.btn--solid-light) {
  border-color: var(--on-dark-soft);
  color: var(--on-dark);
}

.pass__hint {
  width: 100%;
  text-align: center;
  font-size: var(--t-sm);
  color: var(--on-dark);
}



/* --- printed: the card alone, on its own page ----------------- */

@media print {
  @page { margin: 12mm; }

  .pass-open body > *:not(.pass) { display: none !important; }
  .pass-open body { background: var(--surface); }

  .pass-open .pass {
    position: static;
    display: block;
    width: 100%;
    max-width: 120mm;
    max-height: none;
    margin: 0 auto;
    overflow: visible;
  }

  .pass-open .pass::backdrop { background: none; }
  .pass-open .pass__actions { display: none; }

  /* Keep the fine rule and the fact lines when "background graphics"
     is off: draw them as borders instead of shadows and fills. */
  .pass-open .pass__card {
    box-shadow: none;
    border: 1px solid var(--leaf);
    outline: 6px solid var(--surface);
    outline-offset: -8px;
  }

  .pass-open .pass__facts { background: none; border: 0; gap: 0; }
  .pass-open .pass__fact { border-bottom: 1px solid var(--matcha-pale); }
}
/* ============================================================
   Growing flowers
   Rox's real flowers (calla lilies, anthurium, baby's breath, from her
   Canva design) tucked into section corners, behind the content, in
   the margins: never under text.
   ============================================================ */

.has-botanical {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.has-botanical > .shell { position: relative; z-index: 1; }

.botanical {
  position: absolute;
  z-index: 0;
  height: clamp(110px, 16vw, 240px);
  width: auto;
  pointer-events: none;
}

/* Where each grows from. Flowers in the bottom corners are rooted there
   and grow UP; those in the top corners hang from the edge and grow
   DOWN. --grow (0..1) comes from main.js as the flower scrolls into
   view, so it grows as you scroll and shrinks back when you scroll up;
   it also straightens from a slight lean while it grows. Pushed past
   the edge so they peek in from the margin. */
.botanical--top-left     { top: -0.5rem;     left: -2rem;  transform: rotate(-14deg) scaleX(-1); transform-origin: 30% 0; }
.botanical--top-right    { top: -0.5rem;     right: -2rem; transform: rotate(12deg);  transform-origin: 70% 0; }
.botanical--bottom-left  { bottom: -0.75rem; left: -1.5rem;   transform: rotate(14deg);   transform-origin: 40% 100%; }
.botanical--bottom-right { bottom: -0.75rem; right: -1.5rem;  transform: rotate(-12deg); transform-origin: 60% 100%; }

.js .botanical {
  rotate: calc((1 - var(--grow, 1)) * -9deg);
  transition: clip-path 0.25s linear, rotate 0.25s linear;
}
.js .botanical--bottom-left,
.js .botanical--bottom-right { clip-path: inset(calc((1 - var(--grow, 1)) * 100%) 0 0 0); }
.js .botanical--top-left,
.js .botanical--top-right    { clip-path: inset(0 0 calc((1 - var(--grow, 1)) * 100%) 0); }

/* Phones and small tablets: content runs edge to edge, so flowers stay
   inside the band's top or bottom padding, peeking past the corner. */
@media (max-width: 860px) {
  .botanical { height: 78px; }
  .botanical--bottom-left,
  .botanical--bottom-right { bottom: -1.1rem; }
  .botanical--top-left,
  .botanical--top-right { top: -0.9rem; }
}

/* --- mute button ---------------------------------------------- */

.music {
  position: fixed;
  right: calc(0.75rem + env(safe-area-inset-right, 0px));
  bottom: calc(0.75rem + var(--safe-b));
  /* Above the envelope (200), so music can play while it opens. */
  z-index: 210;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 1rem 0.5rem 0.85rem;
  font: 500 var(--t-xs) var(--f-sub);
  letter-spacing: var(--track-util);
  text-transform: uppercase;
  color: var(--forest);
  background: var(--surface);
  border: 1px solid var(--matcha-pale);
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--rule);
  cursor: pointer;
}

.music .icon { width: 1.25rem; height: 1.25rem; color: var(--leaf); }
.music__off,
.music.is-muted .music__on { display: none; }
.music.is-muted .music__off { display: block; }

/* Phones, upright or sideways: the icon alone, a 44px circle, so it
   covers no text. The word stays for screen readers (the
   .visually-hidden pattern from base.css). */
@media (max-width: 599px), (max-height: 500px) and (orientation: landscape) {
  .music {
    width: 2.75rem;
    padding: 0;
    justify-content: center;
  }
  .music__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

@media (hover: hover) {
  .music:hover { border-color: var(--leaf); }
}

/* While the invitation pass is printed, no floating buttons. */
@media print {
  .music, .testreset { display: none !important; }
}

/* ============================================================
   Scrolling in
   Groups marked data-stagger bring their items in one after another
   as they reach the screen (main.js numbers them, --i, and adds
   .is-in), and send them back last-first when scrolling up takes them
   off the bottom (main.js counts them, --n). Botanical drawings grow
   with the scroll (see Botanical line art). Everything is visible
   without JS; reduced motion keeps it still.
   ============================================================ */

.js [data-stagger] > * {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.7s var(--ease), translate 0.9s var(--ease);
  transition-delay: calc((var(--n, 1) - 1 - var(--i, 0)) * 60ms);
}

.js [data-stagger].is-in > * {
  opacity: 1;
  translate: none;
  transition-delay: calc(var(--i, 0) * 90ms);
}


/* ============================================================
   Cat disco — the secret behind "For Cats Only!" (After)
   A full-screen dialog: the green lounge (only fetched once it is
   open), three canvases from disco.js stacked on it, and a bar with
   Mute and Leave. The lights are --paper, --disco-red, --disco-green.
   ============================================================ */

.after__more {
  margin-top: var(--gap-sm);
  text-transform: none;
  font: italic 500 1.25rem / 1.2 var(--f-main);
  letter-spacing: 0.01em;
}

html.disco-open { overflow: hidden; }

.disco {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--on-dark);
  background: var(--forest-deep) center / cover no-repeat;
}

.disco[open] {
  background-image:
    linear-gradient(color-mix(in srgb, var(--forest-deep) 30%, transparent),
                    color-mix(in srgb, var(--forest-deep) 60%, transparent)),
    url("../img/disco/room-960.webp");
}

@media (min-width: 700px), (min-resolution: 2dppx) {
  .disco[open] {
    background-image:
      linear-gradient(color-mix(in srgb, var(--forest-deep) 30%, transparent),
                      color-mix(in srgb, var(--forest-deep) 60%, transparent)),
      url("../img/disco/room-1920.webp");
  }
}

.disco::backdrop { background: var(--forest-deep); }

.disco__room,
.disco__room canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The cat videos play here unseen; the canvases show them keyed. */
.disco__tape {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  opacity: 0.01;
  pointer-events: none;
}

.disco__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem calc(0.9rem + var(--safe-b));
  background: linear-gradient(transparent, color-mix(in srgb, var(--forest-deep) 88%, transparent) 45%);
}

.disco__sign {
  font-family: var(--f-main);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.25rem, 7vw, 3rem);
  line-height: 1;
  color: var(--matcha-pale);
}

.disco__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.disco__actions .btn {
  min-height: 44px;
  padding: 0.8rem 1.6rem;
}

/* Landscape phones: one row, so the room keeps its height. */
@media (max-height: 500px) and (orientation: landscape) {
  .disco__bar {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.9rem calc(1rem + env(safe-area-inset-right, 0px)) calc(0.6rem + var(--safe-b)) calc(1rem + env(safe-area-inset-left, 0px));
  }
  .disco__sign { font-size: 2rem; }
}

@media print {
  .disco { display: none !important; }
}
