/* Fonts are served from this site (Fraunces, Ephesis, Be Vietnam Pro, all SIL Open Font License): no request to a
   third-party host blocks the first paint, and only the subsets a page uses (Vietnamese, Latin) are downloaded. */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-300-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-300-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-300-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-400-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-500-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-600-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/be-vietnam-pro-normal-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Ephesis"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ephesis-normal-400-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Ephesis"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ephesis-normal-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Ephesis"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ephesis-normal-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 500; font-display: swap; src: url(/fonts/fraunces-italic-300-500-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 500; font-display: swap; src: url(/fonts/fraunces-italic-300-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 500; font-display: swap; src: url(/fonts/fraunces-italic-300-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-normal-300-600-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-normal-300-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-normal-300-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Thiệp cưới Đông & Thuỷ — cream paper, a deep cherry accent and soft blush (a Valentine wedding,
   burgundy callas, the red pillars of Huế). One soft serif (Fraunces), one script (Ephesis), one
   Vietnamese-native sans (Be Vietnam Pro). The DT monogram is a mask, so it takes any colour.
   Mobile-first single 460px column; on wide screens it floats over a dark backdrop. */
:root {
  color-scheme: light;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-script: "Ephesis", "Fraunces", cursive;
  --font-sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* colour theme (burgundy here; the others below) */
  --paper: #fcf7f2; --paper-2: #f7ebe6; --card: #fffdfb;
  --blush: #f3d6d1; --blush-2: #eabab3; --blush-rgb: 243, 214, 209;
  --cherry: #6b2737; --cherry-2: #7f3444; --accent-rgb: 107, 39, 55;
  --ink: #2b2224; --ink-2: #66575a; --ink-3: #6e5f62; --night: #1f1719; --night-2: #2c2023;
  --line: rgba(43, 34, 36, 0.14); --line-2: rgba(43, 34, 36, 0.07);
  --gate-1: #6b3441; --gate-2: #5e2b36; --gate-3: #3d1a22; --emboss: #653140;
  --emboss-hi: 255, 226, 226, 0.2; --emboss-lo: 30, 10, 15, 0.5; --emboss-lo2: 30, 10, 15, 0.32; --sheen: 255, 228, 228, 0.16;
  --gate-ink: #fff6ee; --gate-soft: #f3d6d1; --gate-frame: #f3d6d1; --gate-btn: #fff6ee; --gate-btn-ink: #6b2737;
  --gate-halo: 255, 246, 238; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.4); --gate-foot: 255, 246, 238, 0.8; --music-deep: 94, 43, 54;
  --seal-hi: #f4e6ce; --seal-1: #c9a271; --seal-2: #7a5a34; --seal-mono: #d6b384; --seal-img: url(/brand/seal-burgundy.webp);
  --cream: #fff6ee;
  --accent-big: var(--cherry); /* large lines and drawings (3:1 is enough there); small text keeps --cherry */
  --ok: #1d7a4b;
  --err: #b42318;

  --fs-eyebrow: 11px;
  --fs-small: 13px;
  --fs-body: 15px;
  --fs-lead: 16.5px;
  --fs-h3: 21px;
  --fs-display: clamp(34px, 9.4vw, 42px);
  --fs-script: clamp(52px, 15vw, 64px);
  --fs-date: clamp(52px, 15vw, 66px);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 44px; --s9: 64px; --s10: 88px;
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(31, 23, 25, 0.06), 0 10px 28px rgba(31, 23, 25, 0.1);
  --shadow-2: 0 2px 6px rgba(31, 23, 25, 0.08), 0 24px 60px rgba(31, 23, 25, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --col: 460px;
  --dock-h: 64px;
  --scrim: 0.62;
  --scrim-top: 0.4;
  --scrim-start: 44%;
  --scrim-foot: 0.62;
  --foot-start: 78%;
  /* a soft halo hugging the strokes: dark at the edge, gone a few px out */
  --halo-lg: 0 0 2px rgba(20, 12, 14, 0.5), 0 1px 3px rgba(20, 12, 14, 0.4), 0 2px 12px rgba(20, 12, 14, 0.38), 0 6px 36px rgba(20, 12, 14, 0.32);
  --halo-sm: 0 1px 2px rgba(20, 12, 14, 0.45), 0 1px 10px rgba(20, 12, 14, 0.35);
}
/* Colour themes, picked in the admin page. Contrast of every text pairing is at least 4.5:1. */
/* Đỏ burgundy (Champagne #F2E4D0, Antique gold #C6A15B, Burgundy #6E1734, Wine #8F2948, Espresso #2A1018): a wine gate with
   antique-gold details and seal; champagne paper, burgundy text and antique gold on the large lines */
[data-theme="burgundy"] {
  --paper: #fbf6ef; --paper-2: #f2e4d0; --card: #fffcf7;
  --blush: #f0e0c8; --blush-2: #e0c595; --blush-rgb: 240, 224, 200;
  --cherry: #6e1734; --cherry-2: #8f2948; --accent-rgb: 110, 23, 52; --accent-big: #9c7a38;
  --ink: #2b2224; --ink-2: #66575a; --ink-3: #6e5f62; --night: #2a1018; --night-2: #3a1822; --album-bg: #3d1424;
  --gate-1: #7a1b3b; --gate-2: #6a1632; --gate-3: #2a1018; --emboss: #701837;
  --emboss-hi: 255, 220, 226, 0.18; --emboss-lo: 20, 4, 10, 0.55; --emboss-lo2: 20, 4, 10, 0.34; --sheen: 255, 228, 200, 0.14;
  --gate-ink: #f6ecdc; --gate-soft: #e6cb93; --gate-frame: #c6a15b; --gate-btn: #f6ecdc; --gate-btn-ink: #6e1734;
  --gate-halo: 230, 203, 147; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.4); --gate-foot: 230, 203, 147, 0.9; --music-deep: 110, 23, 52;
}
/* Lụa đỏ (from a crimson satin ref; red and gold, the wedding pair after Tết): a crimson silk gate with antique-gold
   details and the gold seal; champagne paper, crimson text and antique gold on the large lines */
[data-theme="silk-red"] {
  --paper: #fbf6ef; --paper-2: #f2e4d0; --card: #fffcf7;
  --blush: #f0e0c8; --blush-2: #e0c595; --blush-rgb: 240, 224, 200;
  --cherry: #941427; --cherry-2: #a81c30; --accent-rgb: 148, 20, 39; --accent-big: #9c7a38;
  --ink: #2b2224; --ink-2: #66575a; --ink-3: #6e5f62; --night: #1e0508; --night-2: #2e0a10; --album-bg: #3a0a14;
  --gate-1: #8a1022; --gate-2: #6e0c1c; --gate-3: #1e0508; --emboss: #6e0c1c;
  --emboss-hi: 255, 220, 226, 0.18; --emboss-lo: 20, 4, 10, 0.55; --emboss-lo2: 20, 4, 10, 0.34; --sheen: 255, 228, 200, 0.14;
  --gate-ink: #f6ecdc; --gate-soft: #e6cb93; --gate-frame: #c6a15b; --gate-btn: #f6ecdc; --gate-btn-ink: #941427;
  --gate-halo: 230, 203, 147; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.45); --gate-foot: 230, 203, 147, 1; --music-deep: 148, 20, 39;
}
/* Lụa trắng (pearl satin with champagne gold): a white silk gate with espresso ink, gold details and the gold seal;
   ivory paper, champagne-gold text, antique gold on the large lines, a warm taupe album */
[data-theme="silk-white"] {
  --paper: #fbfaf7; --paper-2: #f1ede5; --card: #ffffff;
  --blush: #ece6da; --blush-2: #d6cab2; --blush-rgb: 236, 230, 218;
  --cherry: #74592a; --cherry-2: #866834; --accent-rgb: 116, 89, 42; --accent-big: #967838;
  --ink: #26241f; --ink-2: #5d5a52; --ink-3: #646157; --night: #26231d; --night-2: #332f27; --album-bg: #3a342a;
  --line: rgba(38, 36, 31, 0.14); --line-2: rgba(38, 36, 31, 0.07);
  --gate-1: #f4f1ea; --gate-2: #e6e1d6; --gate-3: #d6cfbf; --emboss: #ece8df;
  --emboss-hi: 255, 255, 255, 0.6; --emboss-lo: 90, 80, 60, 0.3; --emboss-lo2: 90, 80, 60, 0.18; --sheen: 255, 255, 255, 0.3;
  --gate-ink: #2a251c; --gate-soft: #3a3226; --gate-frame: #8a7449; --gate-btn: #2a251c; --gate-btn-ink: #fbfaf7;
  --gate-halo: 42, 37, 28; --gate-shadow: none; --gate-foot: 42, 37, 28, 1; --music-deep: 116, 89, 42;
}
/* Xanh olive (the hellebore palette: Olive #4A5933, Lime #C3D96E / #DDE9B8, Berry #9A4B5A): the olive gate with pale-lime
   details and a pale-lime pearl seal; lime tints, olive text and berry on the large lines */
[data-theme="olive"] {
  --seal-hi: #ffffff; --seal-1: #e6eec6; --seal-2: #b4c286; --seal-mono: #f2f6e0; --seal-img: url(/brand/seal-olive.webp);
  --paper: #faf8f0; --paper-2: #f0eee0; --card: #fffefa;
  --blush: #e8eecf; --blush-2: #c3d96e; --blush-rgb: 232, 238, 207;
  --cherry: #4a5933; --cherry-2: #57683c; --accent-rgb: 74, 89, 51; --accent-big: #9a4b5a;
  --ink: #25271e; --ink-2: #5b5e4f; --ink-3: #626553; --night: #1b1e15; --night-2: #272b1f; --album-bg: #333d22;
  --line: rgba(37, 39, 30, 0.14); --line-2: rgba(37, 39, 30, 0.07);
  --gate-1: #57613c; --gate-2: #4d5634; --gate-3: #2f3520; --emboss: #535d39;
  --emboss-hi: 244, 248, 222, 0.2; --emboss-lo: 14, 17, 6, 0.5; --emboss-lo2: 14, 17, 6, 0.32; --sheen: 246, 250, 226, 0.15;
  --gate-ink: #fbf9ef; --gate-soft: #dde9b8; --gate-frame: #c3d96e; --gate-btn: #fbf9ef; --gate-btn-ink: #4a5933;
  --gate-halo: 221, 233, 184; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); --gate-foot: 221, 233, 184, 0.9; --music-deep: 64, 74, 36;
}
/* Hồng mây: the poster pink, a dusty raspberry deepening at the top, watermelon in the middle, cloud-white glowing ink,
   a pearl seal and pale rose-gold details */
[data-theme="rose"] {
  --seal-hi: #ffffff; --seal-1: #fbeef1; --seal-2: #e6b8c2; --seal-mono: #fff6f8; --seal-img: url(/brand/seal-rose.webp);
  --paper: #fff7f7; --paper-2: #fce6e9; --card: #fffbfb;
  --blush: #f9d6dc; --blush-2: #ef94a5; --blush-rgb: 249, 214, 220;
  --cherry: #a3364f; --cherry-2: #b23f59; --accent-rgb: 163, 54, 79; --accent-big: #d14f67;
  --ink: #3d1f27; --ink-2: #75505a; --ink-3: #7b5560; --night: #7a2840; --night-2: #8d2f45; --album-bg: #80283f; --backdrop: #2a0f18;
  --line: rgba(61, 31, 39, 0.14); --line-2: rgba(61, 31, 39, 0.07);
  --gate-1: #be3f5a; --gate-2: #ae3a54; --gate-3: #8d2f45; --emboss: #b23c56;
  --emboss-hi: 255, 222, 230, 0.22; --emboss-lo: 70, 10, 26, 0.5; --emboss-lo2: 70, 10, 26, 0.3; --sheen: 255, 226, 234, 0.16;
  --gate-ink: #fff8f9; --gate-soft: #fff4f6; --gate-frame: #f6cfc6; --gate-btn: #fff7f8; --gate-btn-ink: #a3364f;
  --gate-halo: 255, 247, 248; --gate-shadow: 0 1px 14px rgba(70, 10, 28, 0.32); --gate-foot: 255, 248, 249, 1; --music-deep: 163, 54, 79;
}
/* Xanh navy (Regal heritage: Midnight navy, Royal gold, Ivory stone): a midnight-navy gate with the names and cartouche in
   gold foil and a metallic gold seal; ivory-stone paper, navy text and royal gold on the large lines */
[data-theme="navy"], [data-theme="silk-navy"] {
  --seal-hi: #fff0c8; --seal-1: #cfa94f; --seal-2: #7a5a1c; --seal-mono: #e2c47c; --seal-img: url(/brand/seal-navy.webp);
  --paper: #fbf8f2; --paper-2: #ede3d1; --card: #fffdf9;
  --blush: #eae0cc; --blush-2: #d4c19a; --blush-rgb: 234, 224, 204;
  --cherry: #1b2a4a; --cherry-2: #26385f; --accent-rgb: 27, 42, 74; --accent-big: #9a7a30;
  --ink: #1d2230; --ink-2: #4f5463; --ink-3: #565b6a; --night: #0e172c; --night-2: #172440; --album-bg: #16233f;
  --line: rgba(29, 34, 48, 0.14); --line-2: rgba(29, 34, 48, 0.07);
  --gate-1: #24375e; --gate-2: #1b2a4a; --gate-3: #0e172c; --emboss: #1f3053;
  --emboss-hi: 214, 226, 255, 0.14; --emboss-lo: 0, 4, 14, 0.6; --emboss-lo2: 0, 4, 14, 0.38; --sheen: 255, 230, 170, 0.08;
  --foil-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0 0.05 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --gate-ink: #f3e9d6; --gate-soft: #e6cf98; --gate-frame: #c9a24a; --gate-btn: #e6cf98; --gate-btn-ink: #1b2a4a;
  --gate-halo: 230, 207, 152; --gate-shadow: 0 2px 18px rgba(0, 0, 0, 0.5); --gate-foot: 230, 207, 152, 0.9; --music-deep: 27, 42, 74;
}
/* Cam đất (the 2026 Terracotta #C4694F with the Earth palette #F7D1B6 #E1997A #C96F53 #A4523B #7D3D2A): an earth-red gate
   with cream ink and an ivory wax seal; peach tints, #C4694F on the large lines */
[data-theme="terracotta"] {
  --seal-hi: #ffffff; --seal-1: #f6ead8; --seal-2: #d2b391; --seal-mono: #fbf3e8; --seal-img: url(/brand/seal-terracotta.webp);
  --paper: #fdf7f2; --paper-2: #f9e6d8; --card: #fffcf9;
  --blush: #f8d6bf; --blush-2: #e1997a; --blush-rgb: 248, 214, 191;
  --cherry: #974a33; --cherry-2: #a4523b; --accent-rgb: 151, 74, 51; --accent-big: #c4694f;
  --ink: #2e211b; --ink-2: #66544a; --ink-3: #6d5a50; --night: #241712; --night-2: #31211a; --album-bg: #5a2c1e;
  --line: rgba(46, 33, 27, 0.14); --line-2: rgba(46, 33, 27, 0.07);
  --gate-1: #9e5139; --gate-2: #974c36; --gate-3: #7d3d2a; --emboss: #994e37;
  --emboss-hi: 255, 222, 204, 0.2; --emboss-lo: 48, 16, 6, 0.5; --emboss-lo2: 48, 16, 6, 0.32; --sheen: 255, 226, 206, 0.14;
  --gate-ink: #fffcf8; --gate-soft: #fff1e8; --gate-frame: #f7d1b6; --gate-btn: #fffcf8; --gate-btn-ink: #974a33;
  --gate-halo: 255, 252, 248; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); --gate-foot: 255, 252, 248, 0.9; --music-deep: 125, 61, 42;
}
/* Xanh cổ vịt (2026 teal #2A5C5F): a deep teal gate with ochre details and a metallic ochre seal; cream paper */
[data-theme="teal"] {
  --seal-hi: #fff1d8; --seal-1: #d8b47f; --seal-2: #8a6a3c; --seal-mono: #ecd5a8; --seal-img: url(/brand/seal-teal.webp);
  --paper: #f9f7f1; --paper-2: #e8efec; --card: #fffefb;
  --blush: #d4e5e1; --blush-2: #93c3bd; --blush-rgb: 212, 229, 225;
  --cherry: #2a5c5f; --cherry-2: #336a6d; --accent-rgb: 42, 92, 95; --accent-big: #2f7c7f;
  --ink: #1d2726; --ink-2: #4d5d5c; --ink-3: #546463; --night: #122021; --night-2: #1c2d2e; --album-bg: #173d40;
  --line: rgba(29, 39, 38, 0.14); --line-2: rgba(29, 39, 38, 0.07);
  --gate-1: #2c5f61; --gate-2: #255355; --gate-3: #14353a; --emboss: #2a5c5e;
  --emboss-hi: 214, 240, 236, 0.18; --emboss-lo: 2, 16, 18, 0.55; --emboss-lo2: 2, 16, 18, 0.34; --sheen: 226, 246, 240, 0.12;
  --gate-ink: #f5faf8; --gate-soft: #f2e0bb; --gate-frame: #d8b47f; --gate-btn: #f5faf8; --gate-btn-ink: #2a5c5f;
  --gate-halo: 242, 224, 187; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); --gate-foot: 242, 224, 187, 0.92; --music-deep: 30, 70, 72;
}
/* Xanh lục bảo (Ivory #F2EBDD, Sage #78947F, Emerald #185844, Forest #102F27, Antique gold #B08A4F): an emerald gate with
   antique-gold details and a metallic gold seal; ivory paper, sage tints, emerald text and antique gold on the large lines */
[data-theme="emerald"], [data-theme="silk-emerald"] {
  --seal-hi: #f8e6bf; --seal-1: #c9a76a; --seal-2: #6a4f25; --seal-mono: #dcc08a; --seal-img: url(/brand/seal-emerald.webp);
  --paper: #faf7f0; --paper-2: #f2ebdd; --card: #fffdf8;
  --blush: #dbe5dc; --blush-2: #a9c0ad; --blush-rgb: 219, 229, 220;
  --cherry: #185844; --cherry-2: #1f6650; --accent-rgb: 24, 88, 68; --accent-big: #9a7838;
  --ink: #1e2622; --ink-2: #4f5a54; --ink-3: #56615b; --night: #0f241e; --night-2: #17332a; --album-bg: #123f32;
  --line: rgba(30, 38, 34, 0.14); --line-2: rgba(30, 38, 34, 0.07);
  --gate-1: #1b5d48; --gate-2: #185844; --gate-3: #102f27; --emboss: #195a46;
  --emboss-hi: 214, 240, 226, 0.16; --emboss-lo: 2, 14, 10, 0.55; --emboss-lo2: 2, 14, 10, 0.34; --sheen: 240, 226, 190, 0.12;
  --gate-ink: #f4eee2; --gate-soft: #ead6ad; --gate-frame: #c9a76a; --gate-btn: #f4eee2; --gate-btn-ink: #185844;
  --gate-halo: 234, 214, 173; --gate-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); --gate-foot: 234, 214, 173, 0.9; --music-deep: 24, 88, 68;
}
/* Xanh sage (2026 sage #8B9E82): a soft sage gate with forest-green ink and a terracotta wax seal */
[data-theme="sage"] {
  --seal-hi: #ffd8c4; --seal-1: #a9553a; --seal-2: #5e2615; --seal-mono: #c97a5e; --seal-img: url(/brand/seal-sage.webp);
  --paper: #f7f8f3; --paper-2: #e9eee3; --card: #fdfdfa;
  --blush: #dde5d5; --blush-2: #b3c4a6; --blush-rgb: 221, 229, 213;
  --cherry: #4b6244; --cherry-2: #57704f; --accent-rgb: 75, 98, 68; --accent-big: #66825c;
  --ink: #222920; --ink-2: #545e50; --ink-3: #5b6557; --night: #192017; --night-2: #242c21; --album-bg: #2e3c29;
  --line: rgba(34, 41, 32, 0.14); --line-2: rgba(34, 41, 32, 0.07);
  --gate-1: #b6c4ad; --gate-2: #a3b499; --gate-3: #8fa186; --emboss: #aabba0;
  --emboss-hi: 250, 255, 244, 0.6; --emboss-lo: 40, 58, 34, 0.32; --emboss-lo2: 40, 58, 34, 0.18; --sheen: 252, 255, 246, 0.28;
  --gate-ink: #1b2618; --gate-soft: #25351f; --gate-frame: #34482e; --gate-btn: #1b2618; --gate-btn-ink: #f7f8f3;
  --gate-halo: 27, 38, 24; --gate-shadow: none; --gate-foot: 27, 38, 24, 1; --music-deep: 75, 98, 68;
}
/* Vàng gold (antique gold with Tết red, for a wedding right after Tết): an antique-gold gate with espresso ink and a red wax
   seal; warm gold tints, red text and buttons, antique gold on the large lines, a red album */
[data-theme="golden"], [data-theme="silk-golden"] {
  --seal-hi: #ffd2cc; --seal-1: #8a1c2b; --seal-2: #4a0b14; --seal-mono: #b8434f; --seal-img: url(/brand/seal-golden.webp);
  --paper: #fdf9ef; --paper-2: #f5ebd3; --card: #fffdf7;
  --blush: #f0e2bf; --blush-2: #dcc188; --blush-rgb: 240, 226, 191;
  --cherry: #8a1c2b; --cherry-2: #a3242f; --accent-rgb: 138, 28, 43; --accent-big: #9c7425;
  --ink: #2b2116; --ink-2: #5f5345; --ink-3: #665a4b; --night: #2a1a0c; --night-2: #3a2614; --album-bg: #5c1620;
  --line: rgba(43, 33, 22, 0.14); --line-2: rgba(43, 33, 22, 0.07);
  --gate-1: #e0c27c; --gate-2: #cfab5f; --gate-3: #bc974e; --emboss: #d4b066;
  --emboss-hi: 255, 246, 214, 0.6; --emboss-lo: 110, 75, 10, 0.32; --emboss-lo2: 110, 75, 10, 0.18; --sheen: 255, 248, 220, 0.3;
  --gate-ink: #2b1a0c; --gate-soft: #3d250d; --gate-frame: #5c3b16; --gate-btn: #2b1a0c; --gate-btn-ink: #fdf9ef;
  --gate-halo: 43, 26, 12; --gate-shadow: none; --gate-foot: 43, 26, 12, 1; --music-deep: 138, 28, 43;
}
/* navy: the names and the cartouche on the gate in matte gold foil (a narrow band of tones under a fine grain, so
   it reads as stamped, not a polished mirror) */
[data-theme="navy"] .intro-logo .mono-frame, [data-theme="silk-navy"] .intro-logo .mono-frame { background: var(--foil-grain), linear-gradient(135deg, #b39459 0%, #cdb27a 45%, #bfa067 70%, #c9ad74 100%); }
[data-theme="navy"] .intro-names, [data-theme="silk-navy"] .intro-names { background: var(--foil-grain), linear-gradient(100deg, #c0a063 0%, #d3b981 45%, #c6a86d 70%, #cfb37a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* hồng mây: the gate deepens toward the top like the evening sky, clouds drift along the bottom, the names glow */
[data-theme="rose"] .intro-paper { background: radial-gradient(125% 72% at 50% 60%, var(--gate-1) 0%, var(--gate-2) 55%, var(--gate-3) 100%); }
[data-theme="rose"] .intro-paper::after { content: ""; position: absolute; left: -15%; right: -15%; bottom: 0; height: 20%; z-index: 1; pointer-events: none; filter: blur(14px);
  background: radial-gradient(30% 75% at 10% 100%, rgba(255, 236, 241, 0.78), transparent 70%), radial-gradient(30% 75% at 90% 100%, rgba(255, 232, 238, 0.74), transparent 70%), radial-gradient(42% 60% at 50% 118%, rgba(255, 242, 246, 0.85), transparent 70%); }
[data-theme="rose"] .intro-names, [data-theme="rose"] .intro-to { text-shadow: 0 0 5px rgba(255, 242, 246, 0.55), 0 0 16px rgba(255, 214, 226, 0.45), 0 0 38px rgba(255, 190, 208, 0.3); }
/* lụa: the silk-* themes show draped satin instead of paper (public/brand/<theme>.webp, drawn by scripts/silk-render
   in the theme's colours, its sheen kept dark/light enough for the gate's text), shaded at the top and the foot for the
   music button and the footer line; cloth takes no blind emboss, only the faintest grain against banding.
   /brand/ is cached for 7 days: after redrawing a satin, bump its ?v= here AND its THEMES `silk` number (the preload) */
[data-theme^="silk-"] .intro-paper { background: var(--silk-shade, linear-gradient(180deg, rgba(8, 2, 4, 0.3) 0%, transparent 16%, transparent 60%, rgba(8, 2, 4, 0.55) 100%)), var(--gate-silk) center / cover, var(--gate-3); }
[data-theme^="silk-"] .intro-paper::before { opacity: 0.06; }
[data-theme^="silk-"] .intro-emboss { display: none; }
[data-theme="silk-red"] { --gate-silk: url(/brand/silk-red.webp?v=1); --backdrop: #14030a; }
[data-theme="silk-navy"] { --gate-silk: url(/brand/silk-navy.webp?v=1); --backdrop: #050a17; --gate-foot: 230, 207, 152, 1; }
[data-theme="silk-emerald"] { --gate-silk: url(/brand/silk-emerald.webp?v=1); --backdrop: #04140e; --gate-foot: 234, 214, 173, 1; }
[data-theme="silk-white"] { --gate-silk: url(/brand/silk-white.webp?v=1); --silk-shade: linear-gradient(transparent, transparent); --backdrop: #24211c; }
[data-theme="silk-golden"] { --gate-silk: url(/brand/silk-golden.webp?v=4); --silk-shade: linear-gradient(transparent, transparent); --gate-soft: #2b1a0c; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; touch-action: manipulation; scroll-padding-bottom: calc(var(--dock-h) + 32px); } /* a field reached by Tab or by the keyboard's next button is never left under the dock */
body { margin: 0; background: var(--backdrop, var(--night)); color: var(--ink); font: 400 var(--fs-body)/1.75 var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* taps on controls never become a double-tap zoom and fire at once (pinch zoom still works) */
button, a, label, summary, input, select, textarea, [role="button"] { touch-action: manipulation; }
a { color: inherit; }
p, h1, h2, h3, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.ic { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cherry); outline-offset: 3px; border-radius: 4px; }
body.is-locked { overflow: hidden; }
/* while a sheet or the lightbox is open the page underneath cannot scroll (iOS ignores overflow alone) */
html.is-held body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
/* the dock steps aside at once under a sheet: sliding its frosted buttons away fought the sheet's own slide */
.dock.is-under { transition: none; }

/* DT monogram: the SVG is a mask so one file serves every colour and size. */
.mono { display: inline-block; background: currentColor; aspect-ratio: 1111 / 939; -webkit-mask: url(/brand/monogram.svg) center / contain no-repeat; mask: url(/brand/monogram.svg) center / contain no-repeat; }
.mono-frame { aspect-ratio: 1660 / 2144; -webkit-mask-image: url(/brand/cartouche.svg); mask-image: url(/brand/cartouche.svg); }
.foot-mono { -webkit-mask-image: url(/brand/monogram-small.svg); mask-image: url(/brand/monogram-small.svg); }

/* ---------- frame ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--backdrop, var(--night)); }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.05) brightness(0.45); transform: scale(1.15); }
/* on a phone the card covers the whole screen: no blurred backdrop to draw behind it */
@media (hover: hover) and (pointer: fine) {
  .dock-wish, .dock-btn { background: color-mix(in srgb, var(--night) 64%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
  .bubble { background: rgba(255, 253, 251, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
@media (max-width: 520px) { .backdrop { display: none; } }
.app { position: relative; z-index: 1; max-width: var(--col); margin: 0 auto; background: var(--paper); min-height: 100vh; overflow: clip; }
@media (min-width: 620px) { .app { margin: 24px auto; border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); min-height: calc(100vh - 48px); } }

/* ---------- type ---------- */
.eyebrow { font: 600 var(--fs-eyebrow)/1.4 var(--font-sans); letter-spacing: 0.32em; text-transform: uppercase; color: var(--cherry); }
.eyebrow.on-dark { color: var(--blush); }
.display, .script-title, .guest, .thanks-title, .tl-name, .sheet-title { text-wrap: balance; }
.display { font: 300 var(--fs-display)/1.1 var(--font-display); font-variation-settings: "opsz" 144; letter-spacing: -0.01em; color: var(--ink); margin-top: var(--s3); }
.display em { font-style: italic; font-weight: 300; color: var(--accent-big); }
/* a brush stroke of ink under each section title (scripts/paper-render: three strokes, painted here in the theme's
   colour through a mask), swept in from the left as the title comes into view */
.ink-line { display: block; width: min(260px, 70%); aspect-ratio: 8 / 1; margin: var(--s1) auto 0; background: var(--cherry); opacity: 0.88;
  -webkit-mask: var(--ink) center / 100% 100% no-repeat; mask: var(--ink) center / 100% 100% no-repeat; clip-path: inset(0 0 0 0); }
.ink-line.is-v1 { --ink: url(/brand/ink-stroke-1.png); }
.ink-line.is-v2 { --ink: url(/brand/ink-stroke-2.png); }
.ink-line.is-v3 { --ink: url(/brand/ink-stroke-3.png); }
.album .ink-line { background: var(--cream); opacity: 0.92; }
.js .ink-line { transition: clip-path 1.3s 0.3s cubic-bezier(0.5, 0, 0.2, 1); }
.js .ink-line.is-below { clip-path: inset(0 100% 0 0); }
.script-title { font: 400 var(--fs-script)/1 var(--font-script); color: var(--accent-big); }
.lead { font-size: var(--fs-lead); font-weight: 300; line-height: 1.8; color: var(--ink); }
.sub { color: var(--ink-2); margin-top: var(--s3); }

.sec { padding: var(--s10) var(--s6); text-align: center; }
.sec + .sec { padding-top: var(--s9); }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 960px; color: var(--cream); overflow: hidden; isolation: isolate; background: var(--night); }
@media (min-width: 620px) { .hero { height: min(880px, calc(100vh - 48px)); } }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* --scrim / --scrim-top / --scrim-mid are measured from the photo itself (app.js) so the names stay readable on any cover. */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(180deg, rgba(24, 14, 16, var(--scrim-top)) 0%, rgba(24, 14, 16, var(--scrim-mid, 0)) 22%, rgba(24, 14, 16, var(--scrim-mid, 0)) calc(var(--scrim-start) - 16%), rgba(24, 14, 16, var(--scrim)) var(--scrim-start), rgba(24, 14, 16, var(--scrim)) var(--foot-start), rgba(24, 14, 16, var(--scrim-foot)) calc(var(--foot-start) + 5%), rgba(24, 14, 16, var(--scrim-foot)) 100%); }
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* names assembled from the cover effect's particles, then the real text takes over */
.hero-morph { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hero.is-forming .hn, .hero.is-formed .hn { overflow: visible; }
/* while the hearts form the names, each line waits hidden and then comes in sharp (a blur made it read as a second,
   ghostly copy of the names on top of the hearts) */
.hero.is-forming .hn > span, .hero.is-forming .hn-amp { opacity: 0; animation: none !important; will-change: opacity; transition: opacity 0.6s var(--ease); }
.hero.is-forming .hn > span.is-in, .hero.is-forming .hn-amp.is-in { opacity: 1; }
.hero.is-formed .hn > span, .hero.is-formed .hn-amp { opacity: 1; animation: none !important; transition: opacity 0.9s var(--ease); }
.hero-top { position: absolute; top: calc(var(--s6) + env(safe-area-inset-top)); left: 0; right: 0; display: grid; justify-items: center; gap: var(--s2); }
.hero-mono { width: 58px; color: var(--cream); filter: drop-shadow(0 1px 2px rgba(20, 12, 14, 0.4)) drop-shadow(0 2px 10px rgba(20, 12, 14, 0.3)); }
.hero-kicker { color: var(--cream); letter-spacing: 0.42em; font-size: 11px; text-shadow: var(--halo-sm); }
.hero-names { position: absolute; left: var(--s6); right: var(--s6); bottom: 196px; margin: 0; font-weight: 300; color: var(--cream); line-height: 0.95; }
.hn { display: block; overflow: hidden; white-space: nowrap; padding: 0.06em 0 0.12em; font: 300 var(--hero-size, 64px)/0.95 var(--font-display); font-variation-settings: "opsz" 144; letter-spacing: -0.02em; text-shadow: var(--halo-lg); }
.hn > span { display: inline-block; }
.hn-1 { text-align: left; }
.hn-2 { text-align: right; }
.hn-amp { display: block; text-align: center; font: 400 calc(var(--hero-size, 64px) * 0.95)/0.6 var(--font-script); color: var(--blush); margin: 0.06em 0 0.02em; text-shadow: var(--halo-lg); }
.hero-tagline { position: absolute; left: var(--s6); right: var(--s6); bottom: 156px; text-align: center; font: italic 300 17px/1.3 var(--font-display); color: var(--cream); opacity: 0.95; text-shadow: var(--halo-sm); }
.hero-foot { position: absolute; left: var(--s6); right: var(--s6); bottom: 98px; display: flex; align-items: center; gap: var(--s3); font: 400 15px/1 var(--font-display); letter-spacing: 0.08em; color: var(--cream); text-shadow: var(--halo-sm); }
.hero-rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 246, 238, 0.75)); }
.hero-rule + .scroll-cue + .hero-rule { background: linear-gradient(90deg, rgba(255, 246, 238, 0.75), transparent); }
/* scroll cue: a mouse whose wheel rolls down, two chevrons lighting in turn */
.scroll-cue { position: relative; flex: none; display: grid; justify-items: center; padding: 0 6px; color: var(--cream); text-decoration: none; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.35)); }
.scroll-cue::after { content: ""; position: absolute; inset: -6px -5px; } /* a 44px target around the small mouse */
.scroll-cue .mouse { position: relative; width: 22px; height: 34px; border: 1.6px solid rgba(255, 246, 238, 0.95); border-radius: 13px; }
.scroll-cue .wheel { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cream); animation: wheel 1.8s var(--ease) infinite; }
.scroll-cue .chevs { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; }
.scroll-cue .chevs .ic { width: 18px; height: 18px; opacity: 0.45; stroke-width: 2.2; animation: chev 1.8s var(--ease) infinite; }
.scroll-cue .chevs .ic + .ic { margin-top: -9px; animation-delay: 0.3s; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 65% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes chev { 0%, 100% { opacity: 0.45; transform: translateY(-1px); } 45% { opacity: 1; transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue .wheel, .scroll-cue .chevs .ic { animation: none !important; opacity: 0.9; } }

/* ---------- invitation ---------- */
.invite-mono { width: 64px; color: var(--accent-big); margin-bottom: var(--s5); }
.guest { font: 400 clamp(44px, 13vw, 56px)/1.15 var(--font-script); color: var(--accent-big); margin: var(--s3) 0 var(--s2); overflow-wrap: anywhere; }
/* the greeting's form of address and name, each kept whole (app.js guestNodes / fitGuest) */
.g-unit { display: inline-block; white-space: nowrap; }
.is-wrapping .g-unit { display: inline; white-space: normal; }
.invite-to { font: italic 300 18px/1.5 var(--font-display); color: var(--ink-2); margin-bottom: var(--s5); }
.invite-to strong { font-style: normal; font-weight: 400; color: var(--ink); }
.flourish { position: relative; width: 264px; max-width: 80%; margin: var(--s6) auto var(--s7); }
.flourish .fl-svg { display: block; width: 100%; height: auto; overflow: visible; }
.flourish .fl-end { stop-color: var(--blush-2); stop-opacity: 0; }
.flourish .fl-mid { stop-color: var(--blush-2); }
.flourish .fl-core { stop-color: var(--accent-big); }
/* the small heart inside the loop: pops in as the pen passes, then beats twice every 1.6 s while on screen */
.fl-beat { position: absolute; left: 50%; top: 42%; width: 9%; aspect-ratio: 1; transform: translate(-50%, -50%); color: var(--accent-big); transition: opacity 0.4s 1.4s, transform 0.7s 1.4s cubic-bezier(0.34, 1.8, 0.64, 1); }
.fl-pulse { display: block; width: 100%; height: 100%; }
.fl-pulse .ic { display: block; width: 100%; height: 100%; }
.flourish.is-live .fl-pulse { animation: fl-beat 1.6s 2.1s ease-in-out infinite; }
@keyframes fl-beat { 0%, 44%, 100% { transform: scale(1); } 11% { transform: scale(1.24); } 22% { transform: scale(1); } 33% { transform: scale(1.14); } }
.flourish .fl-line { fill: none; stroke: url(#fl-ink); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease-io); }
/* Nhà trai / Nhà gái face each other across a hairline, as on a printed invitation; the labels are set large in the
   display face (as the small spaced eyebrow every section opens with, they read like captions), the names a size up
   for the older relatives who read them */
.families { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.families::before { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--accent-big) 55%, transparent) 18%, color-mix(in srgb, var(--accent-big) 55%, transparent) 82%, transparent); }
.family .eyebrow { font: 400 20px/1.2 var(--font-display); font-variation-settings: "opsz" 144; letter-spacing: 0.14em; padding-left: 0.14em; }
.parents { margin-top: var(--s3); font: 400 16.5px/1.6 var(--font-display); color: var(--ink); white-space: pre-line; }
.home { margin-top: var(--s2); font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.couple { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s8); }
.polaroid { background: var(--card); padding: 8px 8px 14px; border-radius: 4px; box-shadow: var(--shadow-1); }
.polaroid .ph { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; background: var(--paper-2); }
.polaroid img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: var(--s3); }
.polaroid .eyebrow { font-size: 11px; }
.pname { font: 400 30px/1.15 var(--font-script); color: var(--ink); }
.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(3deg) translateY(28px); }
.couple-heart { position: absolute; left: 50%; top: 42%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; border-radius: 50%; background: var(--card); color: var(--accent-big); box-shadow: var(--shadow-1); z-index: 2; }
.couple-heart .ic { width: 20px; height: 20px; animation: beat 1.6s var(--ease) infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(0.96); } 45% { transform: scale(1.12); } }

/* ---------- save the date ---------- */
.save { background: var(--paper-2); }
.save-event { margin-top: var(--s4); font: 600 12px/1.4 var(--font-sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--cherry); }
.save-when { margin-top: var(--s2); font: 500 12px/1.4 var(--font-sans); letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-2); }
.save-date { font: 300 var(--fs-date)/1.05 var(--font-display); font-variation-settings: "opsz" 144; letter-spacing: -0.02em; margin-top: var(--s2); font-feature-settings: "lnum"; color: var(--ink); }
.save-lunar { margin-top: var(--s2); color: var(--ink-2); font-size: var(--fs-small); font-style: italic; }
.cal { margin: var(--s7) auto 0; max-width: 360px; background: var(--card); border-radius: var(--r-md); padding: var(--s5) var(--s4) var(--s4); box-shadow: var(--shadow-1); }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--s2) var(--s3); }
.cal-month { font: 400 22px/1 var(--font-display); }
.cal-year { font: 500 12px/1 var(--font-sans); letter-spacing: 0.2em; color: var(--ink-3); }
.cal table { width: 100%; border-collapse: collapse; table-layout: fixed; font-feature-settings: "tnum"; }
.cal th { background: var(--blush); color: var(--cherry); font: 600 12px/1 var(--font-sans); padding: 9px 0; letter-spacing: 0.04em; }
.cal th:first-child { border-radius: 8px 0 0 8px; }
.cal th:last-child { border-radius: 0 8px 8px 0; }
.cal td { text-align: center; padding: 3px 0; height: 40px; font-size: 14px; color: var(--ink); }
.cal-day { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; }
.cal-day.is-event::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--cherry-2); }
.cal-day.is-wedding { color: #fff; font-weight: 600; }
.cal-day.is-wedding svg { position: absolute; inset: -4px; width: 42px; height: 42px; color: var(--cherry); z-index: 0; animation: beat 1.8s var(--ease) infinite; }
.cal-day.is-wedding span { position: relative; z-index: 1; }
/* the countdown is set like type, not tiles: large light figures between fine rules, colons in between */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 360px; margin: var(--s7) auto 0; padding: var(--s5) 0 var(--s4); border-block: 1px solid var(--line); }
.cd { position: relative; display: flex; flex-direction: column; align-items: center; }
.cd + .cd::before { content: ":"; position: absolute; left: 0; top: 0; transform: translateX(-50%); font: 300 34px/1.1 var(--font-display); color: var(--cherry); opacity: 0.55; }
.cd-n { font: 300 44px/1 var(--font-display); font-variation-settings: "opsz" 144; font-feature-settings: "tnum", "lnum"; letter-spacing: -0.01em; color: var(--ink); display: inline-block; }
.cd-n.tick { animation: tick 0.5s var(--ease); }
@keyframes tick { from { transform: translateY(-0.25em); opacity: 0; } to { transform: none; opacity: 1; } }
.cd-l { margin-top: var(--s2); font: 500 12px/1.4 var(--font-sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); }
.cd-done { margin-top: var(--s5); font: 400 22px/1.3 var(--font-display); color: var(--accent-big); }

/* ---------- events ---------- */
.timeline { margin-top: var(--s7); text-align: left; position: relative; }
.timeline::before { content: ""; position: absolute; left: 80px; top: 8px; bottom: 8px; width: 1px; background: var(--line); transform-origin: 50% 0; }
.tl { display: grid; grid-template-columns: 64px 1fr; column-gap: 32px; padding: var(--s4) 0; position: relative; }
/* a small heart hangs on the line at each event, like the hearts on the story lane: outlined, filled for the main one */
.tl-dot { position: absolute; left: 72px; top: 22px; width: 17px; height: 17px; display: grid; place-items: center; z-index: 1; color: var(--paper); }
.tl-dot svg { width: 15px; height: 15px; overflow: visible; stroke: var(--cherry); stroke-width: 2.2; stroke-linejoin: round; }
.tl.is-main .tl-dot { color: var(--accent-big); }
.tl.is-main .tl-dot svg { width: 17px; height: 17px; stroke: none; }
.tl.is-main .tl-dot::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: rgba(var(--accent-rgb), 0.14); }
.tl-time { font: 300 24px/1 var(--font-display); font-feature-settings: "tnum", "lnum"; text-align: right; padding-top: 4px; color: var(--ink); white-space: nowrap; }
.tl-date { display: block; font: 500 12px/1.6 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
/* a small line drawing under the time: rings for a ceremony, glasses for a reception */
.tl-ico { display: block; width: 40px; height: 40px; margin: var(--s3) -4px 0 auto; color: var(--accent-big); opacity: 0.8; }
.tl-body { min-width: 0; }
.tl-side { display: inline-block; font: 600 11px/1 var(--font-sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--cherry); margin-bottom: 6px; }
.tl-name { font: 400 var(--fs-h3)/1.25 var(--font-display); }
.tl-detail { color: var(--ink-2); font-size: var(--fs-small); margin-top: 2px; }
.tl-lunar { color: var(--ink-3); font-size: 12px; font-style: italic; }
/* the place, set to be noticed: the venue's whole name bold in the display face (a hall named after "·" on its own
   line, set the same), then the address */
.tl-place { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.tl-venue { display: block; font: 400 21px/1.25 var(--font-display); font-variation-settings: "opsz" 144; letter-spacing: -0.005em; color: var(--ink); text-wrap: balance; }
.tl-hall { display: block; margin-top: 1px; font: inherit; color: inherit; }
.tl-addr { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tl-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); }
.tl-link { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--font-sans); color: var(--cherry); text-decoration: none; padding: 14px 0; margin: -4px 0; border-bottom: 1px solid transparent; }
.tl-link .ic { width: 16px; height: 16px; }
.tl-link:hover { border-bottom-color: currentColor; }
.tl.is-main .tl-body { background: var(--night); color: var(--cream); border-radius: var(--r-md); padding: var(--s5) 18px; margin-left: 4px; box-shadow: var(--shadow-1); }
.tl.is-main .tl-body::before { content: none; }
.tl.is-main .tl-detail, .tl.is-main .tl-addr, .tl.is-main .tl-lunar { color: rgba(255, 246, 238, 0.74); }
.tl.is-main .tl-place { border-top-color: rgba(255, 246, 238, 0.16); }
.tl.is-main .tl-venue { color: var(--cream); font-size: 23px; }
.tl.is-main .tl-link, .tl.is-main .tl-side { color: var(--blush); }
.tl-tag + .tl-side { margin-left: 10px; }
.tl-tag { display: inline-block; font: 600 11px/1 var(--font-sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--cherry); background: var(--blush); border-radius: var(--r-pill); padding: 5px 9px; margin-bottom: var(--s2); }
.map { margin-top: var(--s4); border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 10; background: var(--night-2); position: relative; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { position: absolute; inset: 0; display: grid; place-items: center; gap: 6px; align-content: center; border: 0; background: transparent; color: var(--blush); font: 500 13px/1 var(--font-sans); }
.map-load .ic { width: 26px; height: 26px; }

/* ---------- album: justified rows, every photo whole, edges aligned ---------- */
/* ---------- album: a printed love-story page (scrapbook board) ---------- */
.album { position: relative; background: var(--album-bg, color-mix(in srgb, var(--night) 76%, #3a2810)); color: var(--cream); padding-left: 0; padding-right: 0; overflow: hidden; isolation: isolate; }
.album::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.album .eyebrow { padding: 0 var(--s6); color: var(--blush); }
/* the title in a large hand, a brush stroke sweeping under it */
.album .display { padding: 0 var(--s5); color: var(--cream); }
.album .display em { color: var(--blush-2); }
/* typed, like the reference's typewriter captions */
.album-note { margin-top: var(--s5); padding: 0 var(--s6); font: italic 300 17px/1.55 var(--font-display); letter-spacing: 0; color: rgba(255, 246, 238, 0.82); }
/* two columns of small groups set close together (a narrow, even gap, as on the reference page); prints lap over
   each other only inside a group */
.gallery { margin-top: var(--s7); padding: 0 3.5%; }
.ab-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4%; align-items: start; }
.ab-col { display: flex; flex-direction: column; }
.ab-col.is-right { padding-top: 10%; }
.ab-unit { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.ab-unit > .ab-item + .ab-item { z-index: 1; }
/* a print standing alone (a one-photo album, or the last print when both columns already end level) is centred */
.ab-solo { display: flex; justify-content: center; margin-top: 5%; }
.ab-cols:empty + .ab-solo, .ab-solo:first-child { margin-top: 0; }
.ab-item { position: relative; display: block; flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; transform: rotate(var(--rot)); transform-origin: 50% 50%; -webkit-tap-highlight-color: transparent; }
.ab-ph { position: relative; display: block; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.ab-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* prints */
.ab-item.is-polaroid { background: #f1eee8; padding: 5% 5% 19%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 24px rgba(0, 0, 0, 0.4); }
.ab-item.is-stack { box-shadow: 5px 7px 0 -1px #e4dfd5, 5px 7px 3px -1px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 26px rgba(0, 0, 0, 0.45); }
.ab-item.is-print, .ab-item.is-plain, .ab-item.is-torn { padding: 0; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42); }
/* torn from a page: white paper's ragged edge across the top */
/* torn across the top: the print is cut along the tear (a mask rendered from the same tear as the strip), and the
   white paper of that tear lies exactly over it, edge to edge; the shadow follows the torn shape */
.ab-item.is-torn { box-shadow: none; filter: drop-shadow(0 8px 9px rgba(0, 0, 0, 0.42)); }
.ab-item.is-torn .ab-ph { --tb: 13%;
  -webkit-mask: url(/brand/torn-strip-mask.png) top / 100% var(--tb) no-repeat, linear-gradient(#000, #000) bottom / 100% calc(100% - var(--tb) + 1px) no-repeat;
  mask: url(/brand/torn-strip-mask.png) top / 100% var(--tb) no-repeat, linear-gradient(#000, #000) bottom / 100% calc(100% - var(--tb) + 1px) no-repeat; }
.ab-item.is-torn .ab-ph::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--tb); z-index: 1; background: url(/brand/torn-strip.webp) center / 100% 100% no-repeat; }
/* a 35 mm frame: black border, the edge printing in film orange */
.ab-item.is-film { background: #0e0d0b; padding: 7% 9%; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5); }
.ab-edge { position: absolute; inset: 0; pointer-events: none; font: 600 7px/1 ui-monospace, Menlo, monospace; color: #e8893a; letter-spacing: 0.08em; }
.ab-edge span:first-child { position: absolute; left: 3%; top: 5%; }
.ab-edge span:nth-child(2) { position: absolute; right: 1.5%; bottom: 12%; writing-mode: vertical-rl; white-space: pre; opacity: 0.9; }
.ab-edge span:last-child { position: absolute; left: 3%; bottom: 5%; }
/* an instant print develops as it lands: the cream fog over the photo clears */
.ab-item.is-polaroid .ab-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, #efe7d7, #d8ccb6); opacity: 0; transition: opacity 2.2s 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.js .ab-item.is-polaroid.is-below .ab-ph::after { opacity: 0.94; transition: none; }
/* a copper push pin, kraft tape, a paper clip */
.ab-pin { position: absolute; left: 50%; top: -9px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 34% 30%, #ffd9bd 0 10%, #e39466 24%, #b8602f 58%, #7a3818 100%);
  box-shadow: inset -1px -2px 3px rgba(60, 20, 5, 0.45), 2px 5px 6px rgba(0, 0, 0, 0.5); transition: transform 0.4s 0.55s cubic-bezier(0.34, 1.8, 0.64, 1); }
.ab-clip { position: absolute; right: 8%; top: -14px; width: 13px; height: 38px; z-index: 2; transform: rotate(6deg); filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, 0.45)); }
.ab-tape { position: absolute; z-index: 2; background: url(/brand/tape-kraft.webp) center / 100% 100% no-repeat; }
.ab-tape.is-top { left: 50%; top: -7%; width: 64%; height: 17%; transform: translateX(-50%) rotate(-2deg); }
.ab-tape.is-both { left: 50%; top: -9%; width: 34%; height: 15%; transform: translateX(-50%) rotate(-2deg); }
@media (hover: hover) { .ab-item:hover { transform: rotate(0deg) scale(1.03); z-index: 3; } }
.ab-item:focus-visible { outline: 2px solid var(--blush); outline-offset: 4px; z-index: 3; }
#gallery-more { margin-top: var(--s7); color: var(--cream); border-color: rgba(255, 246, 238, 0.5); }
#gallery-more:hover { background: var(--cream); color: var(--night); border-color: var(--cream); }

/* ---------- story: a lane down the page ---------- */
.story { background: var(--paper-2); }
.lane { position: relative; max-width: 440px; margin: var(--s8) auto 0; padding: 0; list-style: none; text-align: left; }
/* the dashed line the milestones hang from */
.lane::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: repeating-linear-gradient(180deg, var(--ink-3) 0 5px, transparent 5px 10px); opacity: 0.55; transform-origin: 50% 0; }
.mem { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; align-items: center; }
.mem + .mem { margin-top: var(--s7); }
/* each milestone hangs from the line by a small heart (on a disc of the paper colour, so the dashes stop around it) */
.mem-dot { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); color: var(--accent-big); }
.mem-dot svg { width: 15px; height: 15px; }
.mem.is-right > :first-child { grid-column: 2; grid-row: 1; }
.mem.is-right .mem-body { grid-column: 1; grid-row: 1; text-align: right; }
/* each photo is a polaroid with its year written underneath, tilted away from the line */
.mem-ph { margin: 0; background: var(--card); padding: 7px 7px 2px; border-radius: 3px; box-shadow: var(--shadow-1); transform: rotate(-2.5deg); }
.mem.is-right .mem-ph { transform: rotate(2.5deg); }
.mem-img { aspect-ratio: 1; overflow: hidden; border-radius: 1px; background: var(--paper); }
.mem-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease); }
.mem-year { font: 400 30px/1.3 var(--font-script); color: var(--ink-2); text-align: center; font-feature-settings: "lnum"; }
.mem-year.is-solo { font-size: 40px; color: var(--accent-big); }
.mem-title { font: 400 19px/1.25 var(--font-display); color: var(--ink); text-wrap: balance; }
.mem-text { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
@media (min-width: 420px) { .mem-text { font-size: 14px; } }

/* ---------- rsvp ---------- */
.rsvp-card { position: relative; margin-top: var(--s7); padding: var(--s6) var(--s5); border-radius: 24px; background: var(--card); overflow: hidden; text-align: left;
  box-shadow: 0 1px 2px rgba(31, 23, 25, 0.05), 0 18px 44px rgba(var(--accent-rgb), 0.12); }
.rsvp-form { text-align: left; display: grid; gap: var(--s6); }
.fill-input { width: 100%; border: 1.5px solid transparent; border-radius: 14px; background: var(--paper-2); padding: 14px 16px; font: 400 17px/1.3 var(--font-sans); color: var(--ink); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.fill-input::placeholder { color: var(--ink-3); }
.fill-input:focus, .fill-input:focus-visible { outline: none; border-color: var(--cherry); background: var(--card); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12); }
.fill-input[aria-invalid="true"] { border-color: var(--err); }
/* three answers as tiles, each with its own line drawing; the chosen one fills with the accent and gets a tick */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-face { position: relative; display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 116px; padding: 16px 8px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); text-align: center; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.3s; }
.choice-ic { width: 38px; height: 38px; color: var(--accent-big); transition: color 0.25s, transform 0.45s cubic-bezier(0.34, 1.7, 0.64, 1); }
.choice-label { font: 500 13.5px/1.3 var(--font-sans); text-wrap: balance; }
.choice-tick { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--card); color: var(--cherry); transform: scale(0); transition: transform 0.35s cubic-bezier(0.34, 1.7, 0.64, 1); }
.choice-tick .ic { width: 12px; height: 12px; }
.choice:hover .choice-face { border-color: rgba(var(--accent-rgb), 0.45); }
.choice input:checked + .choice-face { background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.18), transparent 60%), var(--cherry); border-color: transparent; color: var(--cream); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(var(--accent-rgb), 0.3); }
.choice input:checked + .choice-face .choice-ic { color: var(--cream); transform: scale(1.14) rotate(-6deg); }
.choice input:checked + .choice-face .choice-tick { transform: scale(1); }
.choice input:focus-visible + .choice-face { outline: 2px solid var(--cherry); outline-offset: 3px; }
/* the send button: an arrow that lifts on hover, a spinner while sending, a tick once sent */
.btn-send { height: 54px; gap: 10px; font-size: 15.5px; }
.btn-send .ic { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn-send:hover .ic { transform: translate(3px, -3px); }
.btn-send.is-busy .ic { animation: send-wait 0.9s var(--ease-io) infinite alternate; }
.btn-send.is-sent .ic { display: none; }
.btn-send.is-sent:disabled, .btn-send.is-busy:disabled { opacity: 1; }
.btn-send.is-sent::before { content: ""; width: 18px; height: 10px; border: solid currentColor; border-width: 0 0 2.2px 2.2px; transform: translateY(-3px) rotate(-45deg); animation: sent-in 0.35s var(--ease) both; }
@keyframes send-wait { to { transform: translate(5px, -5px); opacity: 0.5; } }
@keyframes sent-in { from { transform: translateY(-3px) rotate(-45deg) scale(0.3); opacity: 0; } }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.flabel { display: block; font: 500 13px/1.4 var(--font-sans); color: var(--ink-2); padding: 0; margin-bottom: var(--s2); }
.field.row .flabel { margin: 0; }
.line-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 0; font: 300 19px/1.4 var(--font-display); color: var(--ink); border-radius: 0; transition: border-color 0.2s; }
.line-input::placeholder { color: var(--ink-3); }
.line-input:focus, .line-input:focus-visible { outline: none; border-bottom-color: var(--cherry); }
.line-input[aria-invalid="true"] { border-bottom-color: var(--err); }
.opts { display: grid; border-top: 1px solid var(--line); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--paper-2); }
.step { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card); color: var(--cherry); font-size: 19px; line-height: 1; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(31, 23, 25, 0.12); transition: transform 0.15s; }
.step:active:not(:disabled) { transform: scale(0.9); }
.step { position: relative; }
.step::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; } /* a 46px target around the 38px button */
.step:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.stepper output { min-width: 34px; text-align: center; font: 600 17px/1 var(--font-sans); font-feature-settings: "tnum"; color: var(--ink); }
.chips { display: flex; gap: var(--s2); }
.chip { position: relative; }
.chip span { display: inline-block; padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); font-size: 14px; transition: background 0.2s, color 0.2s, border-color 0.2s; cursor: pointer; }
.chip input:checked + span { background: var(--cherry); color: var(--cream); border-color: var(--cherry); }
.chip input:focus-visible + span { outline: 2px solid var(--cherry); outline-offset: 2px; }
.ferr { color: var(--err); font-size: 13px; margin-top: 6px; }
/* ---- the answer: a colour band with the answer's line drawing on a badge, then the words, facts and next steps ---- */
.rsvp-done { text-align: center; }
.done-hero { position: relative; height: 118px; margin: calc(-1 * var(--s6)) calc(-1 * var(--s5)) 0;
  background: radial-gradient(70% 120% at 12% 0%, rgba(255, 255, 255, 0.24), transparent 60%), radial-gradient(60% 110% at 92% 110%, rgba(var(--blush-rgb), 0.55), transparent 62%), var(--cherry); }
.done-spark { position: absolute; color: rgba(255, 255, 255, 0.85); width: 14px; height: 14px; }
.done-spark.s1 { left: 22%; top: 26px; } .done-spark.s2 { right: 20%; top: 44px; width: 10px; height: 10px; } .done-spark.s3 { left: 33%; top: 70px; width: 8px; height: 8px; opacity: 0.7; }
.rsvp-done[data-answer="yes"] .done-spark { animation: twinkle-s 2.4s var(--ease-io) infinite; }
.rsvp-done[data-answer="yes"] .done-spark.s2 { animation-delay: 0.8s; } .rsvp-done[data-answer="yes"] .done-spark.s3 { animation-delay: 1.5s; }
@keyframes twinkle-s { 0%, 100% { transform: scale(0.6) rotate(0deg); opacity: 0.4; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
.done-badge { position: absolute; left: 50%; bottom: -46px; width: 92px; height: 92px; margin-left: -46px; border-radius: 50%; display: grid; place-items: center; color: var(--cherry);
  background: radial-gradient(circle at 50% 40%, var(--card) 0 56%, var(--blush) 57% 100%); box-shadow: 0 0 0 6px var(--card), 0 14px 30px rgba(var(--accent-rgb), 0.28); }
.done-ic { width: 50px; height: 50px; }
.done-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 64px; padding: 6px 12px 6px 10px; border-radius: var(--r-pill); background: rgba(var(--accent-rgb), 0.09); color: var(--cherry); font: 600 12px/1.2 var(--font-sans); letter-spacing: 0.02em; }
.done-pill .ic { width: 15px; height: 15px; }
.done-title { margin-top: var(--s3); font: 400 31px/1.18 var(--font-display); color: var(--ink); text-wrap: balance; }
.done-text { margin: var(--s2) auto 0; max-width: 30ch; color: var(--ink-2); font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.done-facts { list-style: none; margin: var(--s5) 0 0; padding: 4px 0; border-radius: 16px; background: var(--paper); text-align: left; }
.done-facts li { display: flex; align-items: center; gap: var(--s3); padding: 10px 14px; }
.done-facts li + li { border-top: 1px solid var(--line-2); }
.fact-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blush); color: var(--cherry); }
.fact-ic .ic { width: 17px; height: 17px; }
.fact-txt { display: grid; min-width: 0; }
.fact-label { font: 500 11px/1.4 var(--font-sans); letter-spacing: 0.06em; color: var(--ink-3); }
.fact-val { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.done-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: var(--s5); }
.done-acts .btn { justify-content: center; gap: 7px; padding-inline: 12px; white-space: nowrap; }
.done-acts .ic { width: 16px; height: 16px; }
.done-edit { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s4); padding: 10px 12px; border: 0; background: none; color: var(--ink-2); font: 500 13.5px/1 var(--font-sans); cursor: pointer; }
.done-edit .ic { width: 15px; height: 15px; }
.done-edit:hover { color: var(--cherry); }
/* arriving right after sending: the band opens, the badge pops, its drawing is traced, the rest follows */
.rsvp-done.is-fresh .done-hero { animation: band-in 0.7s var(--ease) both; }
.rsvp-done.is-fresh .done-badge { animation: badge-pop 0.75s 0.2s cubic-bezier(0.34, 1.6, 0.64, 1) both; }
.rsvp-done.is-fresh .done-ic { stroke-dasharray: 150; stroke-dashoffset: 150; animation: trace 1.3s 0.45s var(--ease) forwards; }
.rsvp-done.is-fresh > :not(.done-hero) { animation: fade-up 0.6s var(--ease) both; }
.rsvp-done.is-fresh .done-pill { animation-delay: 0.45s; } .rsvp-done.is-fresh .done-title { animation-delay: 0.55s; } .rsvp-done.is-fresh .done-text { animation-delay: 0.65s; }
.rsvp-done.is-fresh .done-facts { animation-delay: 0.75s; } .rsvp-done.is-fresh .done-acts { animation-delay: 0.85s; } .rsvp-done.is-fresh .done-edit { animation-delay: 0.95s; }
@keyframes band-in { from { opacity: 0; transform: scaleY(0.6); transform-origin: 50% 0; } to { opacity: 1; transform: none; } }
@keyframes badge-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes trace { to { stroke-dashoffset: 0; } }
/* once there: the glasses tip together now and then; the hourglass turns over; the letter floats */
.rsvp-done[data-answer="yes"] .done-ic { animation: cheers 3.2s 2s var(--ease-io) infinite; }
.rsvp-done[data-answer="maybe"] .done-ic { animation: turn 4s 2s var(--ease-io) infinite; }
.rsvp-done[data-answer="no"] .done-ic { animation: float 3s 2s var(--ease-io) infinite alternate; }
.rsvp-done.is-fresh[data-answer="yes"] .done-ic { animation: trace 1.3s 0.45s var(--ease) forwards, cheers 3.2s 2s var(--ease-io) infinite; }
.rsvp-done.is-fresh[data-answer="maybe"] .done-ic { animation: trace 1.3s 0.45s var(--ease) forwards, turn 4s 2s var(--ease-io) infinite; }
.rsvp-done.is-fresh[data-answer="no"] .done-ic { animation: trace 1.3s 0.45s var(--ease) forwards, float 3s 2s var(--ease-io) infinite alternate; }
@keyframes cheers { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-7deg) scale(1.05); } 86% { transform: rotate(5deg); } }
@keyframes turn { 0%, 60% { transform: none; } 80%, 100% { transform: rotate(180deg); } }
@keyframes float { from { transform: translateY(2px); } to { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .done-ic, .done-spark { animation: none !important; } }
.calls { margin-top: var(--s7); font-size: var(--fs-small); color: var(--ink-2); display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.calls a { display: inline-flex; align-items: center; gap: 6px; color: var(--cherry); text-decoration: none; padding: 11px 0; margin: -3px 0; font-weight: 500; }
.calls .ic { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s6); border-radius: var(--r-pill); border: 1px solid transparent; font: 500 15px/1 var(--font-sans); text-decoration: none; transition: transform 0.15s var(--ease), background 0.2s, color 0.2s, box-shadow 0.2s; }
.btn:active { transform: scale(0.98); }
.btn-ink { background: var(--cherry); color: var(--cream); box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.24); }
.btn-ink:hover { background: var(--cherry-2); }
.btn-ink:disabled { opacity: 0.6; cursor: progress; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn-line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; font-size: 14px; padding: 0 var(--s5); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- thanks ---------- */
.thanks { position: relative; min-height: 640px; display: flex; align-items: flex-end; color: var(--cream); background: var(--night); overflow: hidden; isolation: isolate; }
.thanks-media { position: absolute; inset: 0; z-index: -2; }
.thanks-media img { width: 100%; height: 100%; object-fit: cover; }
.thanks::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--night) 72%, transparent) 64%, var(--night) 100%); }
.thanks-body { padding: var(--s9) var(--s7) var(--s8); text-align: center; width: 100%; display: grid; justify-items: center; }
.thanks-mono { width: 54px; color: var(--blush); margin-bottom: var(--s3); }
.thanks-title { font: 400 clamp(64px, 18vw, 80px)/1 var(--font-script); color: var(--blush); }
.thanks-text { margin: var(--s4) auto var(--s5); max-width: 320px; font-weight: 300; line-height: 1.8; color: rgba(255, 246, 238, 0.9); }
.foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: var(--s5) var(--s5) calc(var(--dock-h) + var(--s8)); background: var(--night); color: rgba(255, 246, 238, 0.72); font-size: 12px; letter-spacing: 0.08em; }
.foot-mono { width: 22px; color: var(--blush); }

/* ---------- floating: music, dock, bubbles, hearts ---------- */
.dock, .bubbles, .hearts-layer, .toast { position: fixed; left: 50%; transform: translateX(-50%); width: min(var(--col), 100%); z-index: 30; pointer-events: none; }
@media (min-width: 620px) { .dock { bottom: 38px !important; } }
.dock { bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: var(--s2); padding: 0 12px; transition: transform 0.4s var(--ease), opacity 0.4s; }
.dock > * { pointer-events: auto; }
.dock.is-hidden { transform: translate(-50%, 140%); opacity: 0; }
.dock-wish { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); height: 48px; padding: 0 var(--s4) 0 var(--s5); border-radius: var(--r-pill); border: 1px solid rgba(255, 246, 238, 0.2); background: color-mix(in srgb, var(--night) 84%, transparent); color: rgba(255, 246, 238, 0.9); font-size: 14px; font-style: italic; text-align: left; }
.dock-wish .ic { width: 18px; height: 18px; color: var(--blush); }
.dock-btn { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 246, 238, 0.2); background: color-mix(in srgb, var(--night) 84%, transparent); color: var(--blush); display: grid; place-items: center; }
#open-gift .ic { animation: wiggle 3.2s var(--ease) infinite; }
@keyframes wiggle { 0%, 82%, 100% { transform: none; } 86% { transform: rotate(-12deg) scale(1.08); } 90% { transform: rotate(10deg) scale(1.08); } 94% { transform: rotate(-6deg); } }
/* music lives in the dock so it never sits on top of headings; while it plays the icon sways and notes float up */
.dock-music { transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s; }
.dock-music[aria-pressed="false"] { color: rgba(255, 246, 238, 0.7); }
/* on = lit: burgundy glass, blush ring, cream icon; off = the plain dark glass of the other buttons */
.dock-music[aria-pressed="true"] { background-color: rgba(var(--music-deep), 0.8); border-color: rgba(var(--blush-rgb), 0.6); box-shadow: 0 0 0 3px rgba(var(--blush-rgb), 0.14); color: var(--cream); }
.dock-music[aria-pressed="true"] .ic { animation: sway 2.4s var(--ease-io) infinite alternate; }
@keyframes sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.music-notes { position: absolute; left: 50%; top: 4px; width: 0; height: 0; pointer-events: none; }
/* blush with a thin dark outline (drawn under the fill) reads on the photos and on the cream paper alike */
.music-notes .note { position: absolute; left: calc(var(--x0) - 8px); top: -8px; width: 16px; height: 16px; color: var(--blush); opacity: 0;
  stroke: rgba(43, 24, 30, 0.8); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke fill; filter: drop-shadow(0 1px 1.5px rgba(31, 23, 25, 0.3)); }
.dock-music[aria-pressed="true"] .note { animation: note-up 3.15s linear infinite; }
/* three lanes (left, middle, right), a new note every 0.35 s taking turns between them */
.music-notes .note:nth-child(3n + 1) { --x0: -15px; --dx: -16px; --rot: -16deg; }
.music-notes .note:nth-child(3n + 2) { --x0: 0px; --dx: 6px; --rot: 10deg; width: 19px; height: 19px; left: -10px; }
.music-notes .note:nth-child(3n) { --x0: 15px; --dx: 18px; --rot: 14deg; width: 14px; height: 14px; }
.music-notes .note:nth-child(2) { animation-delay: 0.35s; } .music-notes .note:nth-child(3) { animation-delay: 0.7s; }
.music-notes .note:nth-child(4) { animation-delay: 1.05s; } .music-notes .note:nth-child(5) { animation-delay: 1.4s; }
.music-notes .note:nth-child(6) { animation-delay: 1.75s; } .music-notes .note:nth-child(7) { animation-delay: 2.1s; }
.music-notes .note:nth-child(8) { animation-delay: 2.45s; } .music-notes .note:nth-child(9) { animation-delay: 2.8s; }
@keyframes note-up {
  0% { opacity: 0; transform: translate(0, 8px) scale(0.5); }
  15% { opacity: 1; }
  50% { transform: translate(calc(var(--dx) * -0.35), -34px) scale(0.9) rotate(calc(var(--rot) * -0.5)); }
  75% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(var(--dx), -70px) scale(1) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) { .music-notes { display: none; } }
.dock-heart { color: #ff8a9a; }
.dock-heart.pop .ic { animation: pop 0.35s var(--ease); }
@keyframes pop { 50% { transform: scale(1.35); } }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--cherry); color: #fff; font: 600 11px/20px var(--font-sans); text-align: center; font-feature-settings: "tnum"; }
.badge:empty { display: none; }
.hearts-layer { top: 0; bottom: 0; height: 100%; overflow: hidden; z-index: 31; }
.burst-layer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.fly-heart { position: absolute; bottom: 70px; width: 22px; height: 22px; color: #ff8a9a; animation: fly 1.8s var(--ease) forwards; }
@keyframes fly { 0% { transform: translate(0, 0) scale(0.4); opacity: 0; } 12% { opacity: 1; transform: translate(0, -20px) scale(1); } 100% { transform: translate(var(--dx), -360px) scale(0.8) rotate(var(--rot)); opacity: 0; } }
.bubbles { bottom: calc(var(--dock-h) + 14px + env(safe-area-inset-bottom)); height: 0; z-index: 29; }
@media (min-width: 620px) { .bubbles { bottom: calc(var(--dock-h) + 40px); } }
.bubble { position: absolute; left: 12px; bottom: 0; max-width: 74%; display: flex; gap: 8px; align-items: flex-start; padding: 8px 14px 9px 8px; border-radius: 18px 18px 18px 6px; background: rgba(255, 253, 251, 0.97); color: var(--ink); box-shadow: 0 6px 18px rgba(31, 23, 25, 0.18); font-size: 13px; line-height: 1.45; animation: bubble 5.6s var(--ease) forwards; pointer-events: auto; cursor: pointer; }
.bubble .av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--blush); font: 600 12px/1 var(--font-sans); color: var(--cherry); }
.bubble b { display: block; font-weight: 600; font-size: 12px; }
.bubble p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes bubble { 0% { opacity: 0; transform: translateY(16px) scale(0.96); } 8% { opacity: 1; transform: none; } 70% { opacity: 1; transform: translateY(-46px); } 100% { opacity: 0; transform: translateY(-110px); } }
.toast { bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); display: flex; justify-content: center; z-index: 60; }
.toast-msg { background: var(--night); color: var(--cream); border-radius: var(--r-pill); padding: 10px 18px; font-size: 14px; box-shadow: var(--shadow-2); animation: toast 2.6s var(--ease) forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- sheets ---------- */
dialog { border: 0; padding: 0; max-width: none; max-height: none; color: var(--ink); background: transparent; }
.sheet { width: min(var(--col), 100%); margin: auto auto 0; }
.sheet::backdrop { background: rgba(20, 12, 14, 0.55); }
.sheet[open]::backdrop { animation: fade-in 0.3s var(--ease); }
.sheet-card { position: relative; background: var(--paper); border-radius: 24px 24px 0 0; padding: var(--s3) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; }
.sheet[open] .sheet-card { animation: sheet-in 0.42s var(--ease); will-change: transform; }
@keyframes sheet-in { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, 0, 0); } }
.sheet-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto var(--s4); }
.sheet-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.sheet-title { font: 400 28px/1.2 var(--font-display); text-align: center; margin-bottom: var(--s4); }
.sheet-sub { font: 600 12px/1.4 var(--font-sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--cherry); margin: var(--s7) 0 var(--s3); }
.sheet-note { text-align: center; color: var(--ink-2); font-size: 14px; margin-bottom: var(--s5); }
.wish-form { display: grid; gap: var(--s3); }
.box-input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 16px; line-height: 1.5; resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; }
.box-input:focus { outline: none; border-color: var(--cherry); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12); }
.wish-msg { position: relative; }
.count { position: absolute; right: 12px; bottom: 10px; font-size: 12px; color: var(--ink-3); font-feature-settings: "tnum"; }
.wish-list { display: grid; gap: var(--s3); }
.wish { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--card); border-radius: 14px; }
.wish .av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--blush); font: 600 14px/1 var(--font-sans); color: var(--cherry); }
.wish-meta { display: flex; gap: var(--s2); align-items: baseline; }
.wish-name { font-weight: 600; font-size: 14px; }
.wish-time { font-size: 12px; color: var(--ink-3); }
.wish-text { font-size: 14.5px; line-height: 1.6; margin-top: 2px; white-space: pre-line; overflow-wrap: anywhere; }
.wish-empty { text-align: center; color: var(--ink-2); font-size: 14px; padding: var(--s5) 0; }
.wish.is-new { animation: wish-in 0.6s var(--ease); }
.wish.is-pending { background: var(--paper); border: 1px dashed var(--blush-2); }
.wish-wait { font-size: 11.5px; font-weight: 600; color: var(--cherry); }
@keyframes wish-in { from { opacity: 0; transform: translateY(-8px); background: var(--blush); } }
.gift-list { display: grid; gap: var(--s3); }
.gift { background: var(--card); border-radius: var(--r-md); padding: var(--s5); text-align: center; box-shadow: var(--shadow-1); }
.gift-label { font: 600 12px/1.4 var(--font-sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--cherry); }
.gift-qr { width: 188px; height: 188px; margin: var(--s4) auto 0; padding: 10px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; }
.gift-qr canvas, .gift-qr img { width: 168px; height: 168px; image-rendering: pixelated; }
.gift-qr img.is-photo { image-rendering: auto; object-fit: contain; }
.gift-bank { font: 400 20px/1.3 var(--font-display); margin-top: var(--s3); }
.gift-num { font: 500 20px/1.3 var(--font-sans); letter-spacing: 0.06em; margin-top: 4px; font-feature-settings: "tnum"; }
.gift-holder { font-size: 13px; color: var(--ink-2); letter-spacing: 0.06em; }
.gift-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

/* ---------- lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; background: rgba(15, 10, 11, 0.96); color: var(--cream); }
.lightbox::backdrop { background: rgba(15, 10, 11, 0.9); }
.lightbox[open] { display: grid; place-items: center; animation: fade 0.3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lb-fig { display: grid; place-items: center; gap: var(--s3); max-width: 100%; padding: 56px 12px; }
.lb-fig img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 4px; }
.lb-fig img.swap { animation: lb-swap 0.4s var(--ease); }
@keyframes lb-swap { from { opacity: 0; transform: scale(0.98); } }
.lb-x, .lb-nav { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 246, 238, 0.25); background: rgba(15, 10, 11, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--cream); display: grid; place-items: center; }
.lb-x { top: 12px; right: 12px; }
.lb-nav { top: 50%; margin-top: -22px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-count { position: absolute; top: 22px; left: 0; right: 0; text-align: center; font-size: 13px; letter-spacing: 0.12em; pointer-events: none; }

/* ---------- intro: monogram, then photo scenes ---------- */
/* Opening screen: burgundy paper, a giant DT monogram blind-embossed into it, fine paper grain. */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden; background: var(--backdrop, var(--night)); }
/* The burgundy paper is the card's own column (like .app), so on a desktop it stays a phone-width card. */
.intro-paper { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 0; width: min(var(--col), 100%); margin: 0 auto; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 85% at 50% 38%, var(--gate-1) 0%, var(--gate-2) 48%, var(--gate-3) 100%); }
.intro-paper::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Cropped like a letterpress card: the D's stem whole near the left edge, the bowl around the names, swash and T
   running off the right/bottom. 2.6x the column wide, at least 1.2x the screen height, never past 1.61x it.
   The filter sits on this wrapper (a filter on the masked element itself would be masked away). */
.intro-emboss { position: absolute; left: 50%; top: 7.5vh; z-index: 0; width: min(max(calc(min(var(--col), 100vw) * 2.6), 120vh), 161vh); transform: translateX(-40%);
  filter: drop-shadow(-1px -1px 0 rgba(var(--emboss-hi))) drop-shadow(1.5px 2.5px 1.5px rgba(var(--emboss-lo))) drop-shadow(0 10px 26px rgba(var(--emboss-lo2))); }
.intro-emboss .mono { display: block; width: 100%; color: var(--emboss); }
.intro-emboss.is-sheen { filter: none; }
.intro-emboss .emboss-sheen { position: static; display: block; color: transparent; background: linear-gradient(110deg, transparent 38%, rgba(var(--sheen)) 50%, transparent 62%) 120% 0 / 300% 100% no-repeat; }
.intro:not(.is-leaving) .intro-emboss { animation: emboss-in 1.8s var(--ease) both; }
.intro:not(.is-leaving) .emboss-sheen { animation: sheen 2.6s 0.9s var(--ease-io) both; }
@keyframes emboss-in { from { opacity: 0; scale: 1.04; } to { opacity: 1; scale: 1; } }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.intro-scenes { position: relative; width: min(var(--col), 100%); height: 100%; overflow: hidden; }
/* everything on the gate scales with the screen's height (phones with browser bars are short), and the logo block is
   centred above the footer line, never on it */
.intro-logo { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: clamp(5px, 1.3vh, 12px); gap: clamp(5px, 1.3svh, 12px); padding: calc(env(safe-area-inset-top) + 12px) 0 calc(env(safe-area-inset-bottom) + 100px); color: var(--gate-ink); pointer-events: none; }
.intro-logo .mono-frame { width: clamp(80px, 16vh, 148px); width: clamp(80px, 16svh, 148px); color: var(--gate-frame); opacity: 0; transform: scale(0.92); filter: blur(6px); }
.intro-names { font: 300 clamp(25px, 4.3svh, 34px)/1.2 var(--font-display); font-variation-settings: "opsz" 144; opacity: 0; transform: translateY(10px); margin-top: clamp(2px, 1.2svh, 12px); }
.intro-date { font: 600 11px/1 var(--font-sans); letter-spacing: 0.42em; color: var(--gate-soft); opacity: 0; }
.intro.logo-on .intro-logo .mono-frame { animation: logo-in 1.6s var(--ease) forwards; }
.intro.logo-on .intro-names { animation: up-in 1s 0.7s var(--ease) forwards; }
.intro.logo-on .intro-date { animation: fade-to 1s 1s var(--ease) forwards; }
.intro.logo-off .intro-logo { animation: logo-out 0.6s var(--ease) forwards; } /* gone before the tear has opened wide */
@keyframes logo-in { to { opacity: 1; transform: none; filter: none; } }
@keyframes up-in { to { opacity: 1; transform: none; } }
@keyframes fade-to { to { opacity: 1; } }
@keyframes logo-out { to { opacity: 0; transform: scale(1.04); } }
.scene { position: absolute; inset: 0; opacity: 0; }
.scene img { width: 100%; height: 100%; object-fit: cover; }
.scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 12, 14, 0.1) 40%, rgba(20, 12, 14, 0.7) 100%); }
.scene h2 { position: absolute; left: 0; right: 0; bottom: 132px; z-index: 1; margin: 0 auto; max-width: 400px; text-align: center; text-wrap: balance; color: var(--cream); font: 300 44px/1.08 var(--font-display); font-variation-settings: "opsz" 144; letter-spacing: 0.06em; text-transform: uppercase; padding: 0 var(--s6); opacity: 0; transform: translateY(14px); filter: blur(8px); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3); }
.scene h2 { white-space: pre-line; }
.scene h2.is-natural { text-transform: none; letter-spacing: 0.01em; font-size: 46px; }
.scene h2.is-natural.is-mid { font-size: 38px; }
.scene h2.is-natural.is-long { font-size: 32px; }
.scene h2.is-mid { font-size: 36px; }
.scene h2.is-long { font-size: 30px; letter-spacing: 0.04em; }
.scene.on { animation: scene-in 1.2s var(--ease-io) forwards; z-index: 1; }
/* The photo keeps drifting and the line stays lit while the scene fades out, so nothing snaps at the hand-over. */
.scene.on img, .scene.off img { animation: ken 4.4s cubic-bezier(0.33, 0, 0.2, 1) forwards; }
.scene.on h2 { animation: title-focus 1.5s 0.45s var(--ease) forwards; }
.scene h2 .sw { display: inline-block; white-space: nowrap; }
.scene h2 .sc { display: inline-block; opacity: 0; transform: translateX(calc(var(--o) * 0.2em)); }
/* *emphasised* words: the handwriting face in the theme's light tint (a dark accent would sink into the photo) */
.scene h2 .sc.is-em { font: 400 1.3em/0.8 var(--font-script); letter-spacing: 0; text-transform: none; color: var(--blush-2); padding: 0 0.06em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 16px rgba(0, 0, 0, 0.35); }
.scene.on h2 .sc { animation: title-gather 1.7s var(--ease) both; animation-delay: calc(0.45s + var(--a) * 34ms); }
/* leaving: the line lifts and softens a beat before the next photo takes over */
.scene.off h2 { opacity: 1; transform: none; filter: none; animation: title-leave 0.8s var(--ease) forwards; }
.scene.off h2 .sc { opacity: 1; transform: none; }
@keyframes title-focus { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes title-gather { from { opacity: 0; transform: translateX(calc(var(--o) * 0.2em)); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes title-leave { to { opacity: 0; transform: translateY(-12px); filter: blur(6px); } }
.scene.off { animation: scene-out 1.2s var(--ease-io) forwards; }
@keyframes scene-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scene-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ken { from { transform: scale(1.06); } to { transform: scale(1); } }
.intro-foot { position: absolute; left: 50%; transform: translateX(-50%); width: min(var(--col), 100%); bottom: 72px; z-index: 4; display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s7); color: rgba(255, 246, 238, 0.8); font: 600 10px/1 var(--font-sans); letter-spacing: 0.4em; text-transform: uppercase; }
.intro:not(.logo-off) .intro-foot { color: rgba(var(--gate-foot)); }
/* the heartbeat trace (app.js heartLine); a plain line drawing itself until the script has made it */
.intro-rule { position: relative; flex: 1; height: 18px; }
.intro-rule:empty { height: 1px; background: currentColor; opacity: 0.6; transform-origin: left; animation: rule 7s linear forwards; }
/* the window reaches 12px past the line's end and shows only up to the pen (12px short of its own edge), so once the
   trace is whole all of it shows */
.intro-rule .hl-win { position: absolute; top: 0; bottom: 0; left: 0; right: -12px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 13.5px), transparent calc(100% - 11px)); mask-image: linear-gradient(90deg, #000 calc(100% - 13.5px), transparent calc(100% - 11px)); }
.intro-rule .hl-in { position: absolute; top: 0; bottom: 0; left: 0; right: 12px; }
.intro-rule svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.75; }
.intro-rule .hl-pen { position: absolute; inset: 0; pointer-events: none; }
/* the pen: a bright point with its glow drawn as a gradient (WebKit darkens a currentColor box-shadow here) */
.intro-rule .hl-dot { position: absolute; top: -6px; right: -6px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, currentColor 30%, color-mix(in srgb, currentColor 35%, transparent) 55%, transparent); opacity: 0; }
@keyframes rule { from { transform: scaleX(0); } }
.intro-skip { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: max(16px, calc(50% - var(--col) / 2 + 16px)); z-index: 5; border: 1px solid rgba(255, 246, 238, 0.3); background: rgba(20, 12, 14, 0.35); color: var(--cream); border-radius: var(--r-pill); padding: 8px 16px; font: 600 11px/1 var(--font-sans); letter-spacing: 0.24em; text-transform: uppercase; }
/* music on/off from the gate on: before opening it decides whether the seal's tap starts the music */
.intro-music { position: absolute; top: calc(9px + env(safe-area-inset-top)); left: max(16px, calc(50% - var(--col) / 2 + 16px)); z-index: 5; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 246, 238, 0.3); border-radius: 50%; background: rgba(20, 12, 14, 0.35); color: var(--cream); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.intro-music::after { content: ""; position: absolute; width: 26px; height: 1.5px; border-radius: 1px; background: currentColor; transform: rotate(-45deg) scaleX(0); transition: transform 0.25s var(--ease); }
.intro-music[aria-pressed="false"]::after { transform: rotate(-45deg) scaleX(1); }
.intro-music[aria-pressed="false"] .ic { opacity: 0.75; }
.intro-music:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.intro-to { color: var(--gate-ink); font: 400 clamp(26px, min(8.6vw, 4.9svh), 38px)/1.15 var(--font-script); text-align: center; text-wrap: balance; max-width: 340px; padding: 0 var(--s6); margin-top: var(--s4); text-shadow: var(--gate-shadow); }
.intro-names { text-wrap: balance; max-width: 340px; text-align: center; }
.intro-to-label { display: block; font: 600 11px/1.6 var(--font-sans); letter-spacing: 0.36em; text-transform: uppercase; color: var(--gate-soft); text-shadow: none; margin-bottom: 2px; }
.intro-to-name { display: block; }
.intro-btn:disabled { cursor: default; }
.intro-logo button { pointer-events: auto; }
.intro-logo .intro-btn { margin-top: clamp(4px, 1.8svh, 20px); gap: clamp(8px, 1.6svh, 14px); }
.intro-to, .intro-logo .intro-btn { opacity: 0; }
.intro.logo-on .intro-to { animation: up-in 0.9s 1.3s var(--ease) forwards; }
.intro.logo-on .intro-btn { animation: up-in 0.9s 1.3s var(--ease) forwards; }
/* a gentle line under the seal: the card is handmade, please read it to the end */
.intro-note { max-width: 270px; margin-top: clamp(2px, 1svh, 10px); padding: 0 var(--s4); font: italic 300 clamp(12.5px, 1.95svh, 15px)/1.45 var(--font-display); color: var(--gate-ink); text-align: center; text-wrap: balance; opacity: 0; text-shadow: var(--gate-shadow); }
.intro.logo-on .intro-note { animation: note-in 1s 2.1s var(--ease) forwards; }
@keyframes note-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 0.82; transform: none; } }
/* the last guard (app.js): on a screen too short even so, the footer line steps aside for the note */
.intro.is-tight:not(.logo-off) .intro-foot { visibility: hidden; }
/* reading progress: a hairline at the top of the card that fills as the guest scrolls to the end */
.read-progress { position: fixed; top: 0; left: 50%; z-index: 40; width: min(var(--col), 100%); height: 2px; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.read-progress::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--blush-2), var(--cherry)); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .is-ready .read-progress { opacity: 1; }
  .read-progress::after { animation: read-fill linear both; animation-timeline: scroll(root block); }
  @keyframes read-fill { to { transform: scaleX(1); } }
}
/* "Mở thiệp": a wax seal with the embossed DT, waves inviting a tap, a light that passes over it now and then */
.intro-btn { display: grid; justify-items: center; gap: 14px; border: 0; padding: 6px 12px; background: none; color: var(--gate-soft); border-radius: 20px; -webkit-tap-highlight-color: transparent; }
.intro-btn:focus-visible { outline: 2px solid var(--gate-soft); outline-offset: 6px; }
.seal { position: relative; display: grid; place-items: center; width: clamp(70px, 12.5svh, 104px); height: clamp(70px, 12.5svh, 104px); will-change: transform; }
.seal-wave { position: absolute; inset: 12px; border-radius: 50%; border: 1px solid var(--gate-soft); opacity: 0; }
/* the seal is drawn twice, each copy clipped to one side of a jagged crack, so it can break open */
/* a rendered wax seal per theme (scripts/seal-render): the picture carries its own light and cast shadow and has a
   margin for that shadow, hence the negative inset */
.seal-half { position: absolute; inset: -14%; background: var(--seal-img) center / contain no-repeat; transition: transform 0.35s var(--ease); }
/* whole until it breaks: two clipped halves side by side leave a hairline seam in Safari */
.seal-l, .seal-r, .intro-btn.is-opening .seal-whole { visibility: hidden; }
.intro-btn.is-opening .seal-l, .intro-btn.is-opening .seal-r { visibility: visible; }
.seal-l { clip-path: polygon(0 0, 53% 0, 47% 17%, 55% 31%, 45% 49%, 54% 66%, 46% 83%, 52% 100%, 0 100%); }
.seal-r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 52% 100%, 46% 83%, 54% 66%, 45% 49%, 55% 31%, 47% 17%); }
.seal-label { font: 600 11px/1 var(--font-sans); letter-spacing: 0.32em; text-transform: uppercase; color: var(--gate-soft); padding-left: 0.32em; }
.intro.logo-on .intro-btn:not(:disabled) .seal-wave { animation: seal-wave 2.6s 2.2s var(--ease) infinite; }
.intro.logo-on .intro-btn:not(:disabled) .seal-wave + .seal-wave { animation-delay: 3.5s; }
.intro.logo-on .intro-btn:not(:disabled) .seal { animation: seal-float 3.4s 2.2s var(--ease-io) infinite alternate; }
@keyframes seal-wave { 0% { transform: scale(0.85); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes seal-float { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-4px) rotate(2.5deg); } }
.intro-btn:hover:not(:disabled) .seal-half, .intro-btn:focus-visible .seal-half { transform: scale(1.05); }
.intro-btn:active:not(:disabled) .seal-half { transform: scale(0.94); transition-duration: 0.1s; }
/* opened: the seal cracks along its jagged line and the halves fall apart */
.intro-logo .intro-btn.is-opening { opacity: 1; } /* stays while it breaks (its entrance animation ends with the logo) */
.intro-btn.is-opening .seal { animation: none; }
.intro-btn.is-opening .seal-half { transition: none; } /* the press's own transition would keep the break off the GPU */
.intro-btn.is-opening .seal-wave { display: none; }
.intro-btn.is-opening .seal-l { animation: seal-break-l 0.9s var(--ease) forwards; }
.intro-btn.is-opening .seal-r { animation: seal-break-r 0.9s var(--ease) forwards; }
.intro-btn.is-opening .seal-label { transition: opacity 0.3s; opacity: 0; }
@keyframes seal-break-l { 18% { transform: translate(-3px, 0) rotate(-4deg); } 100% { transform: translate(-30px, 46px) rotate(-28deg); opacity: 0; } }
@keyframes seal-break-r { 18% { transform: translate(3px, 0) rotate(4deg); } 100% { transform: translate(30px, 50px) rotate(30deg); opacity: 0; } }
/* short screens (a phone held sideways): smaller cartouche, tighter gaps, no footer line, so "Mở thiệp" stays on screen */
@media (max-height: 560px) {
  .intro-logo { gap: var(--s2); }
  .intro-logo .mono-frame { width: 76px; }
  .intro-names { font-size: 26px; margin-top: 0; }
  .intro-to { font-size: 26px; margin-top: var(--s2); }
  .intro-logo .intro-btn { margin-top: var(--s2); gap: 8px; }
  .seal { width: 80px; height: 80px; }
  .intro-foot { display: none; }
}
/* opened: the paper tears in two (app.js tornPaper / pullApart). The pieces stay hidden, so they cost nothing to
   draw, until the tear; the whole sheet under them is then covered by the first photo, or, when there is no photo,
   the gate turns clear and the tear uncovers the card. The footer line steps out while the paper splits under it. */
.intro-tear { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 2; width: min(var(--col), 100%); margin: 0 auto; overflow: hidden; pointer-events: none; visibility: hidden; }
.intro.is-tearing .intro-tear { visibility: visible; }
.intro-tear .tear-piece, .intro-tear .tear-core { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }
.intro-tear .tear-piece { will-change: transform; }
.intro-tear .tear-piece.is-l { transform-origin: 0 100%; }
.intro-tear .tear-piece.is-r { transform-origin: 100% 100%; }
.intro .intro-tear .intro-emboss { animation: none; }
.tear-core { background: #fbf3ea; background: color-mix(in srgb, var(--gate-1) 12%, #fffaf3); }
/* a silk gate is drawn apart like a curtain (app.js silkCurtain): each half gathers about its outer edge, with a soft
   shade along the inner edge where the cloth turns */
.intro-tear.is-curtain .tear-piece.is-l { transform-origin: 0 50%; }
.intro-tear.is-curtain .tear-piece.is-r { transform-origin: 100% 50%; }
.curtain-edge { position: absolute; top: 0; bottom: 0; width: 34px; pointer-events: none; }
.curtain-edge.is-l { right: 50%; background: linear-gradient(to left, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.08) 40%, transparent); }
.curtain-edge.is-r { left: 50%; background: linear-gradient(to right, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.08) 40%, transparent); }
.intro.is-tearing > .intro-paper { visibility: hidden; }
.intro.is-tearing.is-clear { background: transparent; }
.intro.is-tearing .intro-foot { animation: foot-step 1.9s var(--ease-io) both; }
@keyframes foot-step { 0% { opacity: 1; } 18%, 62% { opacity: 0; } 100% { opacity: 1; } }
/* the first photo is already whole under the paper; its line waits for the halves to clear */
.scene.is-first.on { animation: none; opacity: 1; }
.scene.is-first.on h2 { animation-delay: 1.05s; }
.scene.is-first.on h2 .sc { animation-delay: calc(1.05s + var(--a) * 34ms); }
.intro.is-leaving { animation: intro-out 0.9s var(--ease-io) forwards; }
@keyframes intro-out { to { opacity: 0; transform: scale(1.04); visibility: hidden; } }

/* ---------- entrance + scroll motion ---------- */
.is-ready .hero-media img { animation: hero-zoom 2.4s cubic-bezier(0.33, 0, 0.2, 1) both; }
.is-ready .hn > span { animation: rise 1.3s var(--ease) both; }
.is-ready .hn-1 > span { animation-delay: 0.25s; }
.is-ready .hn-2 > span { animation-delay: 0.5s; }
.is-ready .hn-amp { animation: fade-in 1.4s 0.7s var(--ease) both; }
.is-ready .hero-top, .is-ready .hero-foot, .is-ready .hero-tagline { animation: fade-up 1.2s 0.9s var(--ease) both; }
@keyframes hero-zoom { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
.js .reveal { transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js .reveal.is-below { opacity: 0; transform: translateY(26px); }
.js .reveal.from-left.is-below { transform: translateX(-90px) rotate(-14deg) scale(0.9); }
.js .reveal.from-right.is-below { transform: translateX(90px) rotate(14deg) scale(0.9); }
/* ---- hand-made scroll choreography (splitInto in app.js; no library) ---- */
.js .split.reveal.is-below { opacity: 1; transform: none; } /* the words move, not the block */
.split .w { display: inline-block; }
/* each word masks its own rise; the padding leaves room for Vietnamese marks, descenders and italic overhang */
.split-rise .w { overflow: hidden; vertical-align: top; padding: 0.22em 0.08em 0.16em; margin: -0.22em -0.08em -0.16em; }
.js .split .w > span { display: inline-block; transition: transform 0.95s var(--ease), opacity 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .split-rise.is-below .w > span { transform: translateY(118%); }
.js #save-date .w > span { transition-delay: calc(var(--i, 0) * 45ms); }
.js .split-pop .w > span { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), var(--ease); transition-delay: calc(var(--i, 0) * 120ms); }
.js .split-pop.is-below .w > span { opacity: 0; transform: translateY(26px) rotate(-6deg) scale(0.88); }
/* portraits: the photo eases back from a zoom while the card settles */
.polaroid .ph img { transition: transform 1.8s var(--ease); }
.js .polaroid.is-below .ph img { transform: scale(1.3); }
/* the timeline's stops slide in from the side */
.js .tl.reveal.is-below { transform: translateX(34px); }
/* calendar: days appear one after another, the wedding day's heart pops last */
.js .cal .cal-day { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); transition-delay: calc(250ms + var(--i, 0) * 16ms); }
.js .cal.is-below .cal-day { opacity: 0; transform: translateY(8px); }
.js .cal .cal-day.is-wedding { transition: transform 0.7s cubic-bezier(0.34, 1.8, 0.64, 1), opacity 0.3s; transition-delay: 0.95s; }
.js .cal.is-below .cal-day.is-wedding { transform: scale(0); }
/* countdown tiles one after another */
.js .countdown.reveal.is-below { opacity: 1; transform: none; }
.js .countdown .cd { transition: opacity 0.7s var(--ease), transform 0.75s var(--ease); }
.js .countdown .cd:nth-child(2) { transition-delay: 0.1s; } .js .countdown .cd:nth-child(3) { transition-delay: 0.2s; } .js .countdown .cd:nth-child(4) { transition-delay: 0.3s; }
.js .countdown.is-below .cd { opacity: 0; transform: translateY(26px); }
/* the love story slides in from the side it scrolls towards */
/* the album: each print drops onto the board and settles at its tilt; its pin goes in after */
.js .ab-item { transition: transform 0.95s var(--ease), opacity 0.6s var(--ease); transition-delay: var(--d, 0ms); }
.js .ab-item.is-below { opacity: 0; transform: translateY(-28px) rotate(calc(var(--rot) - 8deg)) scale(1.06); }
.js .ab-item.is-below .ab-pin { transform: scale(0); }
/* the lane: each polaroid swings in from its own side and its photo settles from a zoom; the words follow */
.js .mem-ph.reveal.from-left.is-below { transform: translateX(-46px) rotate(-12deg) scale(0.92); }
.js .mem-ph.reveal.from-right.is-below { transform: translateX(46px) rotate(12deg) scale(0.92); }
.js .mem-ph.is-below .mem-img img { transform: scale(1.25); }
.js .mem-dot.reveal { transition-timing-function: cubic-bezier(0.34, 1.8, 0.64, 1); }
.js .mem-dot.reveal.is-below { transform: scale(0); }
/* the RSVP form, field by field */
.js .rsvp-form.reveal.is-below { opacity: 1; transform: none; }
.js .rsvp-form > .field, .js .rsvp-form > button { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .rsvp-form > :nth-child(2) { transition-delay: 0.08s; } .js .rsvp-form > :nth-child(3) { transition-delay: 0.16s; } .js .rsvp-form > :nth-child(4) { transition-delay: 0.24s; }
.js .rsvp-form > :nth-child(5) { transition-delay: 0.32s; } .js .rsvp-form > :nth-child(6) { transition-delay: 0.4s; } .js .rsvp-form > :nth-child(7) { transition-delay: 0.48s; }
.js .rsvp-form.is-below > .field, .js .rsvp-form.is-below > button { opacity: 0; transform: translateY(18px); }
/* the closing monogram turns into place */
.js .thanks-mono.reveal { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.js .thanks-mono.reveal.is-below { transform: rotate(-25deg) scale(0.6); }
/* album photos settle from a slight zoom inside their frames (their own hover transition carries it) */
/* the timeline draws its line as you scroll through it (scroll-driven: the browser runs it off the main thread) */
@supports (animation-timeline: view()) {
  .timeline { view-timeline: --rail block; }
  .js .timeline::before { animation: rail-draw linear both; animation-timeline: --rail; animation-range: entry 20% cover 55%; }
  .lane { view-timeline: --lane block; }
  .js .lane::before { animation: rail-draw linear both; animation-timeline: --lane; animation-range: entry 15% cover 70%; }
  @keyframes rail-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
.js .reveal.zoom.is-below { transform: scale(0.92); }
.js .flourish.is-below .fl-line { stroke-dashoffset: 1; }
.js .flourish.is-below .fl-beat { opacity: 0; transform: translate(-50%, -50%) scale(0); transition: none; }
@media (prefers-reduced-motion: reduce) { .flourish.is-live .fl-pulse { animation: none; } }
@supports (animation-timeline: view()) {
  .thanks-media img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes drift { from { transform: scale(1.18) translateY(-3%); } to { transform: scale(1.12) translateY(3%); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal.is-below, .js .ab-item.is-below { opacity: 1; transform: rotate(var(--rot)); filter: none; }
  .js .timeline::before, .js .lane::before { animation: none; }
  .read-progress { display: none; }
  .bubble { animation: none; opacity: 1; }
}

/* ?perf=1: frames per second and slow frames, to measure on a real phone */
.perf-hud { position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 6px; z-index: 9999; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.78); color: #fff; font: 600 12px/1.35 ui-monospace, Menlo, monospace; pointer-events: none; white-space: pre; }
