:root {
  /* Every design overrides these in its own design.css */
  --deep: #0f3d33;          /* dark surfaces */
  --deep2: #0a2c25;         /* darker edge of dark surfaces */
  --accent: #c9a45c;        /* metallic detail */
  --accent-soft: #e3cf9f;   /* text on dark */
  --light: #faf6ec;         /* page background */
  --paper: #f1e8d2;
  --ink: #2c2a25;
  --muted: #6f6a5d;
  --card: #fff;
  --card-line: #e9e0c9;
  --note: #f3ecd9;
  --line2: #d9cfb5;
  --field: #fffdf7;
  --env-back: #d9cdae;
  --env-front: #efe5cb;
  --env-flap1: #f6eedb;
  --env-flap2: #e6dabb;
  --seal: radial-gradient(circle at 35% 30%, #ecd398, #b8893a 58%, #86601f);
  --seal-ink: #4a3210;
  --foil: #b8893a, #ecd398, #c9a45c, #f1dfae, #a97c30;  /* scratch card gradient */
  --foil-ink: rgba(74, 50, 16, 0.85);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --names-font: var(--serif);
  --names-weight: 500;
  --names-size: clamp(46px, 14vw, 64px);
  --bar: 62px;
  --pattern: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0;
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
  background: var(--light);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
p { margin: 0; }
[hidden] { display: none !important; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- 1. Envelope ---------- */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px 16px;
  background: var(--deep);
  color: var(--accent-soft);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .envelope-screen { display: flex; }
.envelope-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pattern);
  opacity: 0.14;
  animation: drift 60s linear infinite;
}
.envelope-screen > * { position: relative; }
.env-to, .env-hint { font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; }
.env-hint { animation: breathe 2.2s ease-in-out infinite; }
.envelope {
  width: min(84vw, 340px);
  aspect-ratio: 3 / 2;
  perspective: 900px;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.4));
}
.envelope > * { position: absolute; }
.env-back { inset: 0; z-index: 0; background: var(--env-back); border-radius: 6px; }
.env-card {
  z-index: 1;
  left: 6%; right: 6%; top: 7%; bottom: 7%;
  padding-top: 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--light);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--deep);
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.8s;
}
.env-small { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.env-names { font-family: var(--serif); font-size: clamp(22px, 7vw, 28px); font-weight: 500; line-height: 1.1; }
.env-front {
  inset: 0; z-index: 2;
  background: linear-gradient(180deg, var(--env-front), var(--paper));
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  border-radius: 6px;
}
.env-flap {
  inset: 0; z-index: 3;
  background: linear-gradient(180deg, var(--env-flap1), var(--env-flap2));
  clip-path: polygon(0 0, 100% 0, 50% 60%);
  transform-origin: top;
  transition: transform 0.7s ease 0.3s, z-index 0s 0.65s;
}
.seal {
  z-index: 4;
  left: 50%; top: 58%;
  width: 78px; height: 78px;
  margin: -39px 0 0 -39px;
  border: 0;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.16), inset 0 -4px 8px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.4);
  color: var(--seal-ink);
  font: 500 24px var(--serif);
  letter-spacing: 0.04em;
  cursor: pointer;
  animation: pulse 2.2s ease-in-out infinite;
  transition: transform 0.45s ease, opacity 0.45s ease;
}
.opening .seal { transform: scale(1.6) rotate(12deg); opacity: 0; animation: none; }
.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.opening .env-card { transform: translateY(-64%); }
.opening .env-hint { opacity: 0; animation: none; transition: opacity 0.3s; }
.envelope-screen.leaving { opacity: 0; transform: scale(1.12); pointer-events: none; }
@keyframes pulse { 50% { transform: scale(1.07); } }
@keyframes breathe { 50% { opacity: 0.45; } }
@keyframes drift { to { background-position: 80px 160px; } }

/* ---------- 2. Welcome ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--bar));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 16px 28px;
  background: var(--deep);
  color: var(--light);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pattern);
  opacity: 0.16;
  animation: drift 60s linear infinite;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, var(--deep2) 100%);
}
.arch {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 84px 24px 56px;
  border: 1px solid var(--accent);
  border-radius: 210px 210px 6px 6px;
  background: color-mix(in srgb, var(--deep2) 72%, transparent);
  outline: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 8px;
}
.bismillah { font-family: "Amiri", serif; direction: rtl; font-size: clamp(26px, 7.4vw, 34px); line-height: 1.5; color: var(--accent-soft); }
.bismillah-en { margin-top: 6px; font-size: 12px; letter-spacing: 0.04em; color: color-mix(in srgb, var(--light) 70%, transparent); }
.ornament {
  width: 120px;
  height: 14px;
  margin: 26px auto;
  background:
    linear-gradient(var(--accent), var(--accent)) left center / 44px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right center / 44px 1px no-repeat;
  position: relative;
}
.ornament::after, .star { content: ""; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); }
.ornament::after { position: absolute; left: 50%; top: 2px; margin-left: -5px; }
.eyebrow { font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent-soft); }
.names {
  margin: 14px 0 0;
  font-family: var(--names-font);
  font-weight: var(--names-weight);
  font-size: var(--names-size);
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-wrap: anywhere;
}
.amp { font-style: italic; font-weight: 400; font-size: 0.5em; color: var(--accent); margin: 6px 0; }
.ch { display: inline-block; }
.js .ch { opacity: 0; }
.js .opened .ch { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.scroll {
  position: relative;
  z-index: 1;
  color: var(--accent-soft);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 8px 22px;
}
.scroll::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: translateX(-50%) rotate(45deg);
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge { 50% { bottom: -2px; } }

/* ---------- Sections ---------- */
.section { padding: 68px 20px; max-width: 720px; margin: 0 auto; }
.section.dark { max-width: none; background: var(--deep); color: var(--light); position: relative; }
.section.dark > * { position: relative; max-width: 520px; margin-left: auto; margin-right: auto; }
.section.dark::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: 0.1; }
h2 { margin: 0 0 28px; font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.2; }
.dark h2 { color: var(--accent-soft); }
.lead { font-family: var(--serif); font-size: 23px; line-height: 1.5; max-width: 30ch; margin: 0 auto; }
.small { font-size: 14px; opacity: 0.8; margin: -18px auto 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border: 1px solid var(--deep);
  border-radius: 30px;
  background: var(--deep);
  color: var(--light);
  font: 400 13px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn:active { transform: scale(0.96); }
.btn.outline { background: transparent; color: var(--deep); }
.btn.gold { background: var(--accent); border-color: var(--accent); color: var(--deep2); font-weight: 500; }
.text-btn {
  background: none;
  border: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---------- 3. Scratch card ---------- */
.scratch {
  position: relative;
  width: min(100%, 340px);
  height: 132px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--deep) 12%, transparent);
  user-select: none;
  -webkit-user-select: none;
}
.scratch-under { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; }
.big-date { font-family: var(--serif); font-size: clamp(23px, 6.6vw, 28px); font-weight: 600; color: var(--deep); line-height: 1.2; }
.date-sub { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
#foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  transition: opacity 0.7s ease;
}
#foil.gone { opacity: 0; pointer-events: none; }
.spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 5;
}
.date-section { position: relative; }
.after-reveal { margin-top: 30px; animation: rise 0.8s ease both; }
.after-reveal .btn { margin-top: 24px; }

/* Pull to reveal: a scroll on two gold rods with a tassel */
.scratch.scroll-reveal { --p: 0; height: auto; overflow: visible; border: 0; background: none; box-shadow: none; padding: 0 6px; }
.scroll-reveal .scratch-under {
  height: calc(var(--p) * 150px); min-height: 0; overflow: hidden; padding: 0 12px; margin: 0 10px;
  background: var(--scroll-paper, linear-gradient(180deg, color-mix(in srgb, var(--paper) 80%, #000 8%), var(--card) 14%, var(--card) 86%, color-mix(in srgb, var(--paper) 80%, #000 8%)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}
.scroll-reveal .scratch-under > * { opacity: var(--p); }
.scroll-reveal.smooth .scratch-under { transition: height 1.1s cubic-bezier(0.25, 0.8, 0.25, 1); }
.scroll-reveal.smooth .scratch-under > * { transition: opacity 1.1s ease; }
.rod {
  position: relative; height: 14px; border-radius: 7px; z-index: 2;
  background: var(--rod, linear-gradient(180deg, #6b4a1c, #f6e3a6 35%, #c9a45c 60%, #6b4a1c));
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}
.rod::before, .rod::after {
  content: ""; position: absolute; top: -4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--rod-cap, radial-gradient(circle at 35% 30%, #fbe9b7, #c9a45c 55%, #6b4a1c));
}
.rod::before { left: -10px; } .rod::after { right: -10px; }
.tassel {
  position: absolute; left: 50%; top: 10px; width: 56px; height: 104px; margin-left: -28px;
  border: 0; background: none; padding: 0; cursor: grab; touch-action: none;
  transform-origin: 50% 0; animation: sway 2.6s ease-in-out infinite;
}
.scroll-reveal.open .tassel { animation: none; opacity: 0.85; }
.tassel .cord { position: absolute; left: 27px; top: 0; width: 2px; height: 34px; background: var(--tassel-cord, var(--accent)); }
.tassel .knot { position: absolute; left: 20px; top: 32px; width: 16px; height: 16px; border-radius: 50%; background: var(--tassel, #7a1424); box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.3), inset 2px 2px 3px rgba(255, 255, 255, 0.3); }
.tassel .fringe {
  position: absolute; left: 17px; top: 46px; width: 22px; height: 44px;
  background: repeating-linear-gradient(90deg, var(--tassel, #7a1424) 0 2px, transparent 2px 3px);
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); border-radius: 0 0 4px 4px;
}
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.scratch.scroll-reveal { margin-bottom: 100px; }

/* ---------- 4. Countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 400px; margin: 0 auto; }
.countdown div { border-radius: 40px 40px 4px 4px; padding: 22px 2px 12px; background: var(--deep); color: var(--light); }
.countdown b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 9vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); }
.done { font-family: var(--serif); font-size: 22px; }

/* ---------- 5. Families ---------- */
.families { margin-top: 40px; display: grid; gap: 26px; justify-items: center; }
.child { font-family: var(--serif); font-size: 38px; font-weight: 500; color: var(--accent-soft); line-height: 1.1; }
.parents { margin-top: 8px; font-size: 15px; color: color-mix(in srgb, var(--light) 70%, transparent); }
.parents span { color: var(--light); font-weight: 400; }
.from { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
@media (min-width: 620px) { .families { grid-template-columns: 1fr auto 1fr; align-items: center; } }

/* ---------- 6. Events carousel ---------- */
.events {
  display: flex;
  gap: 14px;
  margin: 0 -20px;
  padding: 4px 20px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.events::-webkit-scrollbar { display: none; }
.event {
  flex: 0 0 84%;
  scroll-snap-align: center;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.event h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 500; font-size: 32px; color: var(--deep); }
.event .when { font-weight: 400; }
.event .where { margin-top: 12px; color: var(--muted); font-size: 15px; }
.event .where b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; }
.event .note { margin-top: 14px; padding: 3px 12px; border-radius: 20px; background: var(--note); font-size: 13px; }
.event .actions { margin-top: auto; padding-top: 20px; display: grid; gap: 8px; width: 100%; max-width: 240px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); transition: background 0.3s, transform 0.3s; }
.dots i.on { background: var(--deep); transform: scale(1.35); }
@media (min-width: 760px) {
  .section.wide { max-width: 1040px; }
  .events { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
  .dots, .swipe-hint { display: none; }
}

/* Dress code on each function */
.event .dress { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 30px; background: var(--note); text-align: left; }
.event .dress .swatches { display: flex; }
.event .dress .swatches i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line2); }
.event .dress .swatches i + i { margin-left: -9px; }
.event .dress-text { font-size: 14px; line-height: 1.25; }
.event .dress-text small { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---------- 6b. How to reach ---------- */
.reach-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -8px auto 18px; }
.reach-tabs button {
  border: 1px solid var(--line2); background: transparent; color: var(--ink);
  padding: 8px 16px; border-radius: 30px; font: 400 13px var(--sans); letter-spacing: 0.04em; cursor: pointer;
}
.reach-tabs button[aria-selected="true"] { background: var(--deep); border-color: var(--deep); color: var(--light); }
.reach-map {
  display: block; width: min(100%, 440px); aspect-ratio: 16 / 10; margin: 0 auto; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--card-line); box-shadow: 0 12px 28px color-mix(in srgb, var(--deep) 14%, transparent);
}
.reach-map svg { display: block; width: 100%; height: 100%; }
.m-land { fill: var(--map-land, color-mix(in srgb, var(--paper) 70%, var(--light))); }
.m-park { fill: var(--map-park, color-mix(in srgb, #8fae7a 32%, var(--light))); }
.m-sea { fill: var(--map-sea, color-mix(in srgb, #6fa3a6 38%, var(--light))); }
.m-wave { fill: none; stroke: #fff; stroke-width: 1.2; opacity: 0.7; stroke-linecap: round; }
.m-road { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; }
.m-road.wide { stroke-width: 9; }
.m-route { fill: none; stroke: var(--map-route, var(--deep)); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.1 7; }
.m-draw { fill: none; stroke: #fff; stroke-width: 8; stroke-dasharray: 100; stroke-dashoffset: 0; }
.reach-map.drawn .m-draw { animation: draw-route 1.8s ease-out both; }
.js .reach:not(.in) .m-draw { stroke-dashoffset: 100; animation: none; }
@keyframes draw-route { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.m-start { fill: var(--light); stroke: var(--map-route, var(--deep)); stroke-width: 3; }
.m-pin path { fill: var(--map-pin, var(--deep)); }
.m-pin circle { fill: var(--light); }
.m-pin { animation: pin-drop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 1.4s both; }
.js .reach:not(.in) .m-pin { animation: none; opacity: 0; }
@keyframes pin-drop { from { opacity: 0; translate: 0 -18px; } to { opacity: 1; translate: 0 0; } }
.m-label rect { fill: var(--card); stroke: var(--card-line); }
.m-label text { font: 500 10.5px var(--sans); fill: var(--ink); }
.m-label .m-sub { font-weight: 400; font-size: 8.5px; fill: var(--muted); }
.reach-venue { margin-top: 22px; font-family: var(--serif); font-size: 28px; color: var(--deep); line-height: 1.2; }
.reach-address { margin-top: 4px; color: var(--muted); font-size: 15px; }
.reach-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* ---------- 7. Good to know ---------- */
.info { display: grid; gap: 10px; text-align: left; }
.info details { border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--deep2) 60%, transparent); }
.info summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 44px 14px 16px;
  min-height: 52px;
  position: relative;
  font-family: var(--serif);
  font-size: 21px;
  color: var(--accent-soft);
}
.info summary::-webkit-details-marker { display: none; }
.info summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 21px;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.3s;
}
.info details[open] summary::after { transform: rotate(-135deg); top: 25px; }
.info details p { padding: 0 16px 16px; font-size: 15px; color: color-mix(in srgb, var(--light) 88%, transparent); }
.contact { margin-top: 36px; }
.contact .small { margin-top: 0; margin-bottom: 4px; }
.contact-name { font-family: var(--serif); font-size: 22px; margin-bottom: 14px; }

/* ---------- 8. Gallery ---------- */
.gallery { display: flex; gap: 10px; margin: 0 -20px; padding: 0 20px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery button { flex: 0 0 70%; max-width: 320px; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 4px; overflow: hidden; scroll-snap-align: center; cursor: pointer; background: var(--paper); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
dialog.photo { border: 0; padding: 0; background: transparent; max-width: 96vw; text-align: center; }
dialog.photo img { max-width: 96vw; max-height: 82vh; border-radius: 4px; display: block; }
dialog.photo .text-btn { color: #fff; }
dialog::backdrop { background: color-mix(in srgb, var(--deep2) 82%, transparent); }

/* ---------- 9. Verse ---------- */
.verse blockquote { margin: 0 auto; max-width: 32ch; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.5; color: var(--deep); }
.verse .ornament { margin-top: 0; }
.js .verse blockquote span { opacity: 0; transition: opacity 1.1s ease; transition-delay: var(--d); }
.js .verse.in blockquote span { opacity: 1; }
.source { margin-top: 16px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }

/* ---------- 10 and 11. Forms ---------- */
.form { display: grid; gap: 18px; text-align: left; }
.form label, .form legend, .stepper-row > span { font-size: 13px; letter-spacing: 0.06em; color: var(--accent-soft); }
.form.light label { color: var(--muted); }
.form label { display: grid; gap: 6px; position: relative; }
.form input:not([type="radio"]), .form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  font: 400 16px var(--sans);
}
.form textarea { resize: vertical; }
.form .btn { justify-self: center; min-width: 200px; }
.choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice legend { padding: 0; margin-bottom: 6px; }
.choice label { display: block; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 6px;
  color: var(--light);
  font-size: 15px;
  letter-spacing: 0;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.choice input:checked + span { background: var(--accent); color: var(--deep2); font-weight: 500; }
.choice input:focus-visible + span { outline: 2px solid var(--light); outline-offset: 2px; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper { display: flex; align-items: center; }
.stepper button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:active { background: var(--accent); color: var(--deep2); }
.form .stepper input { width: 56px; border: 0; background: transparent; color: var(--light); font: 500 28px var(--serif); text-align: center; padding: 0; }
.thanks { font-family: var(--serif); font-size: 24px; color: var(--accent-soft); }
.count { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--muted); pointer-events: none; }
.error { color: #a23a2a; font-size: 14px; text-align: center; }

.wishes { margin-top: 34px; display: grid; gap: 12px; text-align: left; }
.wish {
  position: relative;
  padding: 18px 18px 16px 22px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.wish.new { animation: rise 0.7s ease both; }
.wish p { font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--deep); overflow-wrap: anywhere; }
.wish cite { display: block; margin-top: 8px; font-style: normal; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- 12. Closing ---------- */
.closing .ornament { margin-top: 0; }
.hosts { margin: 18px 0 30px; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
footer { padding: 4px 16px 30px; font-size: 12px; letter-spacing: 0.08em; }
footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line2); padding-bottom: 2px; }

/* ---------- Shortcut bar ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--bar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--deep2) 96%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  transition: transform 0.6s ease 0.4s;
}
.js body:not(.opened) .bar { transform: translateY(110%); }
.bar a, .bar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--accent-soft);
  font: 400 10px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.bar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bar a:active, .bar button:active { color: #fff; }

/* ---------- Calendar sheet ---------- */
dialog.sheet {
  width: min(92vw, 360px);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 28px 22px 14px;
  background: var(--light);
  color: var(--ink);
  text-align: center;
}
dialog.sheet[open] { display: grid; gap: 10px; }
dialog.sheet h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; color: var(--deep); }
dialog.sheet .small { margin: 0 0 8px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .ch, .js .verse blockquote span { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
