/* Hallmark · route: custom (bespoke) · structure: 「여정 스크롤」 · idea: "an archive of their trips, filed tab by tab, that ends at the venue"
 * theme: studied-DNA (source: image — ui design 레퍼런스 + 폴더 레퍼런스 3장) · studied: yes
 * paper: #DED9D0 khadi · accent: #8AA2BA marlborough · display: Pinyon Script · body: MaruBuri · outlier: Courier Prime (labels only)
 * axes: light / script + Korean serif / cool · nav: none · footer: Ft6 letter-close
 * contrast: pass (40–41) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · mobile: pass (34, 49–57)
 * brief overrides kept: blue folder sheets as full grounds (23) · blackout is the palette's own neutral (22)
 */
/* Hallmark · pre-emit critique: P5 H4 E4 S5 R4 V5 */

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

html,
body {
  margin: 0;
  background: var(--color-surround);
}

/* hidden only on the root: on <body> it would turn body into a scroller and unstick the opening */
html {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

body {
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img,
video {
  display: block;
  max-width: 100%;
}

strong {
  font-family: var(--font-body-strong);
  font-weight: 400;
}

.page {
  position: relative;
  width: var(--W);
  margin-inline: auto;
  overflow-x: clip;
  background: var(--color-ink);
}

/* ── Type roles ── */
.label {
  font-family: var(--font-label);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.key {
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  color: var(--color-ink-muted);
}

/* ── Tab shapes, shared by the opening sheets and the section folders ── */
.sheet--tab-left,
.folder--tab-left {
  --tab-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cpath d='M0 36V11C0 4.5 4.5 0 11 0h107c7 0 11 3 14 9.5l7.5 17C142 32.5 147 36 154 36h6z'/%3E%3C/svg%3E");
}

.sheet--tab-right,
.folder--tab-right {
  --tab-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cpath d='M160 36V11c0-6.5-4.5-11-11-11H42c-7 0-11 3-14 9.5l-7.5 17C18 32.5 13 36 6 36H0z'/%3E%3C/svg%3E");
}

.sheet--tab-mid,
.folder--tab-mid {
  --tab-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cpath d='M0 36c7 0 12-3.5 14.5-9.5l7.5-17C25 3 29 0 36 0h88c7 0 11 3 14 9.5l7.5 17C148 32.5 153 36 160 36z'/%3E%3C/svg%3E");
}

/* ── Opening sheets: absolutely placed in the sticky stage ── */
.sheet {
  --tab-h: 34px;
  --tab-pad: 12px; /* the hero print covers the back tab's right half; 12px keeps its word clear even at 360px */
  --tab-w: 152px;
  --tab-left: 0px;
  --fill: var(--color-paper);
  --sheet-bg: var(--sheet-light), var(--paper-texture), var(--fill);

  position: absolute;
  inset-inline: 0;
  height: 140svh;
  filter: var(--shadow-sheet);
  pointer-events: none;
}

.sheet__tab,
.sheet__body {
  position: absolute;
  background: var(--sheet-bg);
}

.sheet__tab {
  top: 0;
  left: var(--tab-left);
  width: var(--tab-w);
  height: var(--tab-h);
  background-position: 0 0, calc(-1 * var(--tab-left)) 0, 0 0;
  -webkit-mask: var(--tab-shape) 0 0 / 100% 100% no-repeat;
  mask: var(--tab-shape) 0 0 / 100% 100% no-repeat;
}

.sheet__tab .label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 0;
  color: var(--color-ink);
}

.sheet__body {
  top: calc(var(--tab-h) - 1px);
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background-position: 0 calc(-1 * var(--tab-h)), 0 calc(-1 * var(--tab-h)), 0 0;
}

.sheet--tab-left .sheet__body { border-top-left-radius: 0; }
.sheet--tab-right { --tab-left: calc(var(--W) - var(--tab-w)); }
.sheet--tab-right .sheet__body { border-top-right-radius: 0; }

.sheet--kraft { --fill: var(--color-kraft); }
.sheet--sky   { --fill: var(--color-mark); }
.sheet--dusk  { --fill: var(--color-mark); --sheet-bg: var(--sheet-dusk), var(--sheet-light), var(--paper-texture), var(--fill); }
.sheet--dusk .sheet__tab { background-position: 0 0, 0 0, calc(-1 * var(--tab-left)) 0, 0 0; }
.sheet--dusk .sheet__body { background-position: 0 0, 0 calc(-1 * var(--tab-h)), 0 calc(-1 * var(--tab-h)), 0 0; }
.sheet--dusk .sheet__tab .label { color: var(--color-on-dark); }

/* ── Prints: photographs on khadi stock ── */
.print {
  position: absolute;
  margin: 0;
  padding: 10px 10px 12px;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: var(--shadow-paper);
}

.print img,
.print video {
  height: auto;
  object-fit: cover;
  outline: 1px solid var(--color-hairline);
  outline-offset: -1px;
}

/* Kraft tape: translucent bronco with torn ends */
.tape {
  position: absolute;
  margin: 0;
  padding: 7px 16px 6px;
  background: var(--paper-texture), var(--color-tape);
  clip-path: polygon(1.5% 6%, 99% 0, 97.5% 22%, 100% 44%, 98% 64%, 100% 86%, 98.5% 100%, 1% 95%, 2.5% 74%, 0 53%, 2% 33%, 0 14%);
  color: var(--color-ink);
  text-align: center;
  white-space: nowrap;
}

/* A steel paper clip drawn in three passes: shadow, body, highlight */
.clip {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 58px;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clip .clip__shade { stroke: var(--color-shadow-hard); stroke-width: 2.8; transform: translate(0.8px, 1px); }
.clip .clip__body { stroke: var(--color-kraft); stroke-width: 1.9; }
.clip .clip__shine { stroke: var(--color-paper); stroke-width: 0.6; transform: translate(-0.35px, -0.2px); }

/* ═══ Opening ═══════════════════════════════════════════════════════════ */
.opening {
  position: relative;
  height: 300svh;
  background: linear-gradient(180deg, var(--vignette), transparent 40%), var(--paper-texture), var(--color-ink);
}

.stage {
  --print-h: min(48svh, calc(var(--W) * 0.64 * 1.5));
  --print-w: calc(var(--print-h) / 1.5);

  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: var(--color-on-dark);
}

.cover-meta {
  position: absolute;
  top: calc(var(--space-5) + env(safe-area-inset-top, 0px));
  inset-inline: var(--gutter);
  z-index: 8;
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.cover-meta span {
  display: block;
}

.opening .sheet--kraft { top: 33%; z-index: 1; --tab-w: 140px; }
.opening .print--hero  { z-index: 2; }
.opening .sheet--dusk  { top: 39%; z-index: 3; --tab-left: calc(var(--W) * 0.3); --tab-w: 150px; }
.opening .snap         { z-index: 4; }
.opening .sheet--sky   { top: 45%; z-index: 5; }
.opening .sheet--front { top: 52%; z-index: 6; }

.print--hero {
  left: calc(50% - var(--print-w) / 2 - 10px);
  top: calc(50% - var(--print-h) / 2 - 14px);
}

.print--hero img {
  width: var(--print-w);
  height: var(--print-h);
}

.print--hero .tape {
  left: -14px;
  top: 14px;
  transform: rotate(-9deg);
}

.snap {
  right: calc(var(--W) * 0.07);
  top: 33%;
  padding: 7px 7px 20px;
  transform: rotate(7deg);
}

.snap img {
  width: calc(var(--W) * 0.27);
  aspect-ratio: 2 / 3;
}

.snap .clip {
  left: 38%;
  top: -22px;
}

/* the front sheet carries the lockup */
.lockup {
  position: absolute;
  inset: var(--space-5) var(--gutter) auto;
  color: var(--color-ink);
}

/* kicker above the names, between two hairlines: one column, so the label never sits beside the heading */
.lockup__rule {
  padding-block: var(--space-3) var(--space-1);
  border-block: var(--rule);
}

.lockup__kicker {
  margin: 0;
}

.lockup__names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 14vw, 3.5rem);
  font-weight: 400;
  line-height: 1.3;
}

.lockup__line {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
}

.lockup__route,
.ticket__route {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-3);
  margin: var(--space-5) 0 0;
}

.lockup__route i,
.ticket__route i {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--color-ink) 0 5px, transparent 5px 10px);
}

.cue {
  position: absolute;
  inset-inline: 0;
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  z-index: 7;
  margin: 0;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  text-align: center;
}

/* short screens: the lockup needs the room, and the sheets moving already say "scroll" */
@media (max-height: 680px) {
  .cue {
    display: none;
  }
}

/* end frame: the print on dark card, names above, the day below */
.end-title,
.end-info {
  position: absolute;
  inset-inline: 0;
  z-index: 9;
  margin: 0;
  text-align: center;
}

.end-title {
  bottom: calc(50% + var(--print-h) / 2 + 30px);
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.1;
}

.end-info {
  top: calc(50% + var(--print-h) / 2 + 30px);
  line-height: 1.7;
}

.end-info span {
  display: block;
}

/* ═══ Section folders: each section arrives as the next sheet, overlapping the last ═══ */
.folder {
  --tab-h: 34px;
  --tab-pad: 12px;
  --tab-w: 150px;
  --tab-left: 0px;
  --overlap: calc(var(--tab-h) + var(--space-4));
  --fill: var(--color-paper);
  --sheet-bg: var(--sheet-light), var(--paper-texture), var(--fill);

  position: relative;
  margin-top: calc(-1 * var(--overlap));
  color: var(--color-ink);
}

.folder--tab-right { --tab-left: calc(var(--W) - var(--tab-w)); }
.folder--tab-mid   { --tab-left: calc((var(--W) - var(--tab-w)) / 2); }

.folder__tab {
  position: relative;
  z-index: 1;
  width: var(--tab-w);
  height: var(--tab-h);
  margin-left: var(--tab-left);
  filter: drop-shadow(0 -1px 0 var(--edge-light)) drop-shadow(0 -4px 8px var(--color-shadow-soft));
}

.folder__tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sheet-bg);
  background-position: 0 0, calc(-1 * var(--tab-left)) 0, 0 0;
  -webkit-mask: var(--tab-shape) 0 0 / 100% 100% no-repeat;
  mask: var(--tab-shape) 0 0 / 100% 100% no-repeat;
}

.folder__tab .label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding-top: 2px;
}

.folder__body {
  position: relative;
  margin-top: -1px;
  padding: var(--space-8) var(--gutter) calc(var(--space-9) + var(--overlap));
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--sheet-bg);
  background-position: 0 calc(-1 * var(--tab-h)), 0 calc(-1 * var(--tab-h)), 0 0;
  background-repeat: no-repeat, repeat; /* the light falls once — tiled, it showed again as a band at the last sheet's foot */
  box-shadow: 0 -1px 0 var(--edge-light), 0 -8px 16px -8px var(--color-shadow-soft);
}

.folder--tab-left .folder__body { border-top-left-radius: 0; }

/* a tab's word sits on the same side as the tab: left tabs read from the left, right tabs end at the right, middle tabs centre */
.sheet--tab-left .sheet__tab .label,
.folder--tab-left .folder__tab .label { justify-content: flex-start; padding-left: var(--tab-pad); }
.sheet--tab-right .sheet__tab .label,
.folder--tab-right .folder__tab .label { justify-content: flex-end; padding-right: var(--tab-pad); }
.folder--tab-right .folder__body { border-top-right-radius: 0; }

.folder--paper { --fill: var(--color-paper); }
.folder--sky   { --fill: var(--color-mark); }
.folder--kraft { --fill: var(--color-kraft); }
.folder--dark  { --fill: var(--color-ink); color: var(--color-on-dark); }
.folder--dark .key { color: var(--color-paper-dim); }

/* ── Section heads: left-set, editorial ── */
.section-head {
  margin-bottom: var(--space-7);
}

.section-title {
  margin: 0;
  font-family: var(--font-body-strong);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.section-lede {
  margin: var(--space-3) 0 0;
  max-width: 34ch;
}

/* an English subtitle under a Korean head — same serif, quieter */
.section-sub {
  margin: var(--space-1) 0 0;
  color: var(--color-ink-muted);
  letter-spacing: 0.02em;
}

/* ── Buttons: 8 states, one shape ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-ink);
  font: 400 var(--text-base) / 1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.button:hover { background-color: var(--tint-ink); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 3px; }
.button:disabled,
.button[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }

.button--primary {
  width: 100%;
  background: var(--color-ink);
  color: var(--color-paper);
}

.button--primary:hover { background-color: var(--color-ink); box-shadow: inset 0 0 0 100vmax var(--tint-paper); }

.button--small {
  min-height: 40px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

.button--ghost {
  display: flex;
  margin: var(--space-6) auto 0;
}

.button[hidden] {
  display: none;
}

.folder--dark .button,
.button--on-dark {
  border-color: var(--color-on-dark);
  color: var(--color-on-dark);
}

.folder--dark .button:hover,
.button--on-dark:hover { background-color: var(--tint-paper); }

.folder--dark .button:focus-visible,
.button--on-dark:focus-visible { outline-color: var(--color-on-dark); }

/* ── Paper card ── */
.card {
  position: relative;
  padding: var(--space-5);
  border-radius: 4px;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: var(--shadow-paper);
  color: var(--color-ink);
}

/* a kraft card on a khadi sheet (RSVP) — the guestbook's colour, so the form doesn't vanish into its page */
.card--kraft {
  --color-control-line: var(--color-control-line-kraft);
  background: var(--paper-texture), var(--color-kraft);
}

/* ═══ The Route ═══════════════════════════════════════════════════════════ */
.route {
  position: relative;
  padding-top: var(--space-8);
}

.route__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.route__ghost,
.route__line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route__ghost {
  stroke: var(--color-kraft);
  stroke-width: 1.4;
  stroke-dasharray: 0.5 7;
}

.route__line {
  stroke: var(--color-mark);
  stroke-width: 2.4;
  stroke-dasharray: 8 7;
}

.stop {
  position: relative;
  display: grid;
  justify-items: start;
  gap: var(--space-5);
  margin-bottom: var(--space-9);
}

.stop--right {
  justify-items: end;
  text-align: right;
}

.stop--last {
  margin-bottom: 0;
}

.stop__media {
  position: relative;
  width: 62%;
  margin: 0;
}

.stop .print {
  position: relative;
}

.stop .print img,
.stop .print video {
  width: 100%;
}

.stop:nth-of-type(odd) .stop__media { transform: rotate(-1.5deg); }
.stop:nth-of-type(even) .stop__media { transform: rotate(1.2deg); }

.stop__pin {
  position: absolute;
  top: -9px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-mark);
  box-shadow: 0 0 0 3px var(--color-paper), 0 0 0 4.5px var(--color-ink);
}

.stop--left .stop__pin { left: calc(62% - 9px); }
.stop--right .stop__pin { right: calc(62% - 9px); }

.stop__pin--end {
  background: var(--color-ink);
  box-shadow: 0 0 0 3px var(--color-paper), 0 0 0 4.5px var(--color-ink), 0 0 0 9px var(--color-mark-halo);
}

/* text stays out of the gutter the route runs down */
.stop__text {
  max-width: 74%;
}

/* Until the line reaches a stop, its print and words wait just below, and its pin is folded small */
.route.is-live .stop__media,
.route.is-live .stop__text {
  transition: opacity var(--dur-long) var(--ease-out), translate var(--dur-long) var(--ease-out);
}

.route.is-live .stop__pin {
  transition: scale var(--dur-short) var(--ease-out);
}

.route.is-live .stop:not(.is-reached) .stop__media,
.route.is-live .stop:not(.is-reached) .stop__text {
  opacity: 0;
  translate: 0 24px;
}

.route.is-live .stop:not(.is-reached) .stop__pin {
  scale: 0.35;
}

.stop__tag {
  margin: 0 0 var(--space-2);
  color: var(--color-ink-muted);
}

.stop__line {
  margin: 0;
  font-size: var(--text-story);
  line-height: 1.75;
}

.stop .print--video .clip {
  left: 18%;
  top: -24px;
}

.stop--last .tape {
  right: -10px;
  bottom: 22px;
  transform: rotate(6deg);
}

/* Two ways to show the stops — the couple's own photos, or the drawn stamps and sky.
   config.js `story` picks one ("photo" | "drawn"); ?story=drawn in the address previews the other. */
.route[data-story="photo"] [data-story-variant="drawn"],
.route[data-story="drawn"] [data-story-variant="photo"] {
  display: none;
}

.print--story {
  padding-bottom: 34px;
}

.print__caption {
  position: absolute;
  left: 14px;
  bottom: 10px;
  margin: 0;
}

.print--story .tape {
  right: -12px;
  top: 18px;
  transform: rotate(8deg);
}

/* Stamp: perforated khadi stock (::before, masked) with a coloured face (::after).
   The shadow sits on the unmasked parent so it follows the perforations instead of being cut off. */
.stamp {
  --face: var(--color-kraft);

  display: grid;
  align-content: end;
  aspect-ratio: 5 / 6;
  padding: 16px;
  filter: drop-shadow(0 1px 1px var(--color-shadow-soft)) drop-shadow(0 10px 14px var(--color-shadow-soft));
  text-align: left;
}

.stamp::before,
.stamp::after {
  content: "";
  position: absolute;
}

.stamp::before {
  inset: 0;
  background: var(--paper-texture), var(--color-paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 240' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' d='M0 0H200V240H0ZM-4.2 0.0a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 240.0a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM8.3 0.0a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM8.3 240.0a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM20.8 0.0a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM20.8 240.0a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.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3a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 138.9a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 138.9a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 151.6a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 151.6a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 164.2a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 164.2a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 176.8a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 176.8a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 189.5a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 189.5a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 202.1a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 202.1a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 214.7a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 214.7a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM-4.2 227.4a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0ZM195.8 227.4a4.2 4.2 0 1 0 8.4 0a4.2 4.2 0 1 0 -8.4 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

.stamp::after {
  inset: 16px;
  background: var(--paper-texture), var(--face);
  box-shadow: inset 0 0 0 1px var(--color-hairline);
}

.stamp > * {
  position: relative;
  z-index: 1;
}

.stamp--snow { --face: var(--color-mark); }

.stamp__mark {
  position: absolute;
  top: 6px;
  right: 2px;
  width: 58%;
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 1.3;
  opacity: 0.5;
}

.stamp__place,
.stamp__note {
  position: relative;
  margin: 0 var(--space-3);
}

.stamp__place {
  font-family: var(--font-body-strong);
  font-size: var(--text-xl);
  line-height: 1.1;
}

.stamp__note {
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
}

/* Night print: the Sri Lanka sky, drawn */
.night {
  padding-bottom: 34px;
}

.night__sky {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, var(--glow-sky), transparent 55%), var(--color-ink);
  outline: 1px solid var(--color-hairline);
  outline-offset: -1px;
}

.night__sky circle { fill: var(--color-paper); }
.night__sky path { stroke: var(--color-paper); stroke-width: 0.6; fill: none; stroke-linecap: round; }

.night__place {
  position: absolute;
  left: 14px;
  bottom: 10px;
  margin: 0;
}

/* ═══ Invitation: the ticket ═══════════════════════════════════════════ */
.ticket-wrap {
  filter: drop-shadow(0 1px 1px var(--color-shadow-soft)) drop-shadow(0 16px 22px var(--color-shadow-soft));
}

.ticket {
  --stub: 56px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  border-radius: 6px;
  background: var(--paper-texture), var(--color-paper);
  -webkit-mask:
    radial-gradient(circle at calc(100% - var(--stub)) 0, transparent 10px, var(--color-ink) 10.5px) top / 100% 51% no-repeat,
    radial-gradient(circle at calc(100% - var(--stub)) 100%, transparent 10px, var(--color-ink) 10.5px) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle at calc(100% - var(--stub)) 0, transparent 10px, var(--color-ink) 10.5px) top / 100% 51% no-repeat,
    radial-gradient(circle at calc(100% - var(--stub)) 100%, transparent 10px, var(--color-ink) 10.5px) bottom / 100% 51% no-repeat;
}

.ticket__main {
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.ticket__route {
  margin: 0 0 var(--space-5);
}

.ticket__fields {
  display: grid;
  margin: 0;
}

/* one field per row, key above value, so names and the date get the full width */
.ticket__field {
  padding: var(--space-3) 0;
}

.ticket__field + .ticket__field {
  border-top: var(--rule);
}

.ticket__field dt {
  margin-bottom: 2px;
}

.ticket__field dd {
  margin: 0;
}

.ticket__field strong {
  display: block;
  font-size: var(--text-md);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.ticket__field dd span {
  display: block;
  margin-top: 2px;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.ticket__stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 0;
  border-left: 1.5px dashed var(--color-hairline);
}

.ticket__stub p {
  margin: 0;
  writing-mode: vertical-rl;
}

.ticket__names {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1;
}

/* ═══ The Day ═══════════════════════════════════════════════════════════ */
.calendar {
  margin: 0;
  padding: var(--space-5) var(--space-4) var(--space-4);
  border-radius: 4px;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: var(--shadow-paper);
}

.calendar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 var(--space-2) var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: var(--rule);
}

.calendar__month {
  font-family: var(--font-body-strong);
  font-size: var(--text-xl);
  line-height: 1;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: var(--space-1);
  text-align: center;
}

.calendar__grid span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.calendar__grid .is-weekday {
  aspect-ratio: auto;
  padding-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.calendar__grid .is-day {
  position: relative;
  margin: 2px;
  border-radius: 50%;
  background: var(--color-mark);
  font-family: var(--font-body-strong);
}

.calendar__grid .is-day svg {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.countdown {
  margin: var(--space-6) 0 0;
  font-size: var(--text-md);
  line-height: 1.6;
}

.countdown strong {
  font-size: var(--text-xl);
}

/* ═══ Gallery ═══════════════════════════════════════════════════════════ */
.folder--dark .section-lede { color: var(--color-paper-dim); }

.film {
  position: relative;
  margin: 0 0 var(--space-7);
  padding: 8px 8px 30px;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: 0 18px 30px -16px var(--shadow-on-dark);
  transform: rotate(-1deg);
}

.film video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.film figcaption {
  position: absolute;
  left: 12px;
  bottom: 8px;
  color: var(--color-ink);
}

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.gallery__col {
  display: grid;
  gap: var(--space-3);
}

.gallery__col:last-child {
  margin-top: var(--space-8);
}

.shot {
  display: block;
  width: 100%;
  padding: 6px 6px 8px;
  border: 0;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: 0 12px 22px -14px var(--shadow-on-dark);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-short) var(--ease-out);
}

.shot img {
  width: 100%;
  height: auto;
}

.shot:active { transform: scale(0.985); }
.shot:focus-visible { outline: 2px solid var(--color-on-dark); outline-offset: 3px; }

.shot[hidden] {
  display: none;
}

/* ═══ Directions ═══════════════════════════════════════════════════════ */
.venue {
  margin-bottom: var(--space-6);
}

.venue__name {
  margin: 0;
  font-family: var(--font-body-strong);
  font-size: var(--text-md);
}

.venue__address {
  margin: var(--space-2) 0 var(--space-4);
}

.map {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: 4px;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: var(--shadow-paper);
}

.map__svg {
  display: block;
  width: 100%;
  height: auto;
}

.map__road { fill: none; stroke: var(--color-kraft); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.map__road--main { stroke: var(--color-ink); stroke-width: 7; }
.map__walk { fill: none; stroke: var(--color-mark); stroke-width: 2.4; stroke-dasharray: 2.5 2.5; stroke-linecap: round; }
.map__block,
.map__dot,
.map__exit { fill: var(--color-ink); }
.map__venue { fill: var(--color-mark); stroke: var(--color-ink); stroke-width: 1.6; }
.map__exit-no { fill: var(--color-paper); font-family: var(--font-body-strong); font-size: 8px; text-anchor: middle; }

.map__label {
  fill: var(--color-ink);
  font-family: var(--font-body);
  font-size: 12px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--color-paper);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.map__label--road { font-size: 13px; text-anchor: start; }
.map__label--start { text-anchor: start; }
.map__label--venue { font-family: var(--font-body-strong); font-size: 13.5px; }

.map-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.ways {
  margin: 0;
}

.ways__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: var(--rule);
}

.ways__item dt {
  padding-top: 2px;
}

.ways__item dd {
  margin: 0;
}

.ways__item p {
  margin: 0 0 var(--space-2);
}

.ways__item p:last-child {
  margin-bottom: 0;
}

.ways__note {
  font-size: var(--text-sm); /* the floor for information (15px) — a step under the line above */
  line-height: 1.65;
}

/* ═══ Forms: RSVP + guestbook ═══════════════════════════════════════════ */
.form {
  display: grid;
}

.field {
  min-width: 0;
  margin: 0 0 var(--space-5);
  padding: 0;
  border: 0;
}

.field__label {
  display: block;
  margin-bottom: var(--space-2);
  padding: 0;
  font-size: var(--text-sm);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-control-line);
  border-radius: 2px;
  background: transparent;
  color: var(--color-ink);
  font: 400 var(--text-base) / 1.5 var(--font-body);
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.input:hover { border-color: var(--color-ink); }
.input:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 1px; border-color: var(--color-ink); }
.input:disabled { opacity: 0.55; cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--color-ink); background-color: var(--tint-ink); }

.input--area {
  min-height: 120px;
  resize: vertical;
}

.choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
}

.choices--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  position: relative;
  display: block;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-control-line);
  border-radius: var(--radius-control);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.choice:hover span { border-color: var(--color-ink); }
.choice input:checked + span { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-paper); }
.choice input:focus-visible + span { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.choice input:disabled + span { opacity: 0.55; cursor: not-allowed; }
.choices[aria-invalid="true"] .choice span { border-color: var(--color-ink); border-style: dashed; }

.stepper {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  border: 1px solid var(--color-control-line);
  border-radius: var(--radius-control);
}

.stepper__btn {
  min-height: 48px;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: 400 var(--text-md) / 1 var(--font-body);
  cursor: pointer;
  border-radius: var(--radius-control);
}

.stepper__btn:hover { background: var(--tint-ink); }
.stepper__btn:focus-visible { outline: 2px solid var(--color-ink); outline-offset: -2px; }
.stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; }

.stepper__value {
  text-align: center;
  font-family: var(--font-body-strong);
  font-size: var(--text-md);
}

.form__more[hidden] { display: none; }

.form__trap {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form__status {
  min-height: 1.6em;
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
}

.form.is-done .field,
.form.is-done .form__more,
.form.is-done .button--primary {
  display: none;
}

.form.is-done .form__status {
  margin: 0;
  font-size: var(--text-base);
}

/* ═══ Guestbook notes ═══════════════════════════════════════════════════ */
.notes {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
}

.note {
  padding: var(--space-4) var(--space-5);
  border-radius: 2px;
  background: var(--paper-texture), var(--color-paper);
  box-shadow: 0 1px 1px var(--color-shadow-soft), 0 8px 16px -10px var(--color-shadow-hard);
}

.note:nth-child(odd) { transform: rotate(-0.6deg); }
.note:nth-child(even) { transform: rotate(0.5deg); }

.note__message {
  margin: 0 0 var(--space-3);
  white-space: pre-line;
}

.note__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0;
  font-size: var(--text-sm);
}

.notes__empty {
  color: var(--color-ink); /* sits on the kraft sheet — muted ink drops under 4.5:1 there */
}

.notes__hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-sm); /* 15px, the floor for information */
}

/* ═══ Gift: accounts ════════════════════════════════════════════════════ */
.accounts {
  padding: 0;
  margin-bottom: var(--space-4);
}

.accounts__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 var(--space-5);
  font-family: var(--font-body-strong);
  list-style: none;
  cursor: pointer;
}

.accounts__summary::-webkit-details-marker { display: none; }

.accounts__summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--dur-short) var(--ease-out);
}

.accounts[open] .accounts__summary::after { transform: translateY(2px) rotate(-135deg); }
.accounts__summary:focus-visible { outline: 2px solid var(--color-ink); outline-offset: -4px; }

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

.account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: var(--rule);
}

.account p {
  grid-column: 1;
  margin: 0;
}

.account__who .key {
  margin-right: var(--space-2);
}

.account__number {
  font-variant-numeric: tabular-nums lining-nums;
}
.account__digits { white-space: nowrap; } /* a number never splits at a hyphen; it drops whole below the bank */

.account__actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: var(--space-2);
}

/* with KakaoPay or Toss as well, the buttons get their own row under the number */
.account--stacked .account__actions {
  grid-column: 1 / -1;
  grid-row: auto;
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

/* ═══ Closing ═══════════════════════════════════════════════════════════ */
.closing .folder__body {
  padding-bottom: calc(var(--space-10) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.closing__art {
  width: 88%;
  height: auto;
  margin: 0 auto var(--space-7);
}

.closing__title {
  margin: 0;
  font-family: var(--font-body-strong);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.65;
}

.closing__names {
  margin: var(--space-4) 0 var(--space-7);
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: 1.2;
}

.closing__foot {
  margin: var(--space-7) 0 0;
  font-size: var(--text-sm);
  color: var(--color-paper-dim);
}

/* the illustrator's mark, as on the printed card */
.credit {
  position: absolute;
  right: var(--gutter);
  bottom: var(--space-5);
  margin: 0;
  font-size: var(--text-label);
  color: var(--color-paper-dim);
}

/* ═══ Loop toggle: the clips loop forever, so anyone can stop them (WCAG 2.2.2) ═══ */
.loop-toggle {
  position: absolute;
  right: 18px;
  bottom: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-scrim);
  color: var(--color-on-dark);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-short) var(--ease-out);
}

.film .loop-toggle {
  right: 16px;
  bottom: 40px;
}

.loop-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loop-toggle__play { display: none; fill: currentColor; stroke: none; }
.loop-toggle.is-paused .loop-toggle__pause { display: none; }
.loop-toggle.is-paused .loop-toggle__play { display: block; }
.loop-toggle:hover { background-color: var(--color-overlay); }
.loop-toggle:active { transform: translateY(1px); }
.loop-toggle:focus-visible { outline: 2px solid var(--color-on-dark); outline-offset: 2px; }

/* ═══ Lightbox ══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: var(--W);
  margin-inline: auto;
  padding: calc(var(--space-3) + env(safe-area-inset-top, 0px)) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  background: var(--color-overlay);
  color: var(--color-on-dark);
}

.lightbox[hidden] { display: none; }

.lightbox__close {
  grid-column: 1 / -1;
  justify-self: end;
}

.lightbox__figure {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100svh - 160px);
  object-fit: contain;
}

.lightbox__count {
  margin-top: var(--space-3);
}

.lightbox__nav--prev { grid-row: 3; grid-column: 1; justify-self: start; }
.lightbox__nav--next { grid-row: 3; grid-column: 2; justify-self: end; }

.lightbox button {
  min-width: 64px;
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-overlay-line);
  border-radius: var(--radius-control);
  background: none;
  color: var(--color-on-dark);
  font: 400 var(--text-sm) / 1 var(--font-body);
  cursor: pointer;
}

.lightbox button:hover { background: var(--tint-paper); }
.lightbox button:active { transform: translateY(1px); }
.lightbox button:focus-visible { outline: 2px solid var(--color-on-dark); outline-offset: 3px; }

/* ═══ Toast (copy only: its effect is otherwise invisible) ══════════════ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  margin: 0;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-control);
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-size: var(--text-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ═══ Reduced motion ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .opening {
    height: auto;
  }

  .stage {
    position: relative;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
