/* CRAFID — template Geranium Cat Air (kit geranium-cat-air), dari desain PSD Inayah & Fauzan. */
/* Kartu cetak cat air: kertas putih abu, kabut biru, bunga geranium merah muda.
     Satu tampilan terang yang disengaja (kartu undangan), jadi semua warna ditetapkan eksplisit. */
  :root {
    color-scheme: light;
    --paper: #f2eeea; --paper-2: #fbf9f6; --ink: #5e5049; --mauve: #907e6e; --rose: #927575;
    --rose-deep: #7a5656; --blush: #ead2cf; --mist: #c9d3da; --line: #90787047; --gold: #c39671;
    --f-serif: 'Libre Baskerville', Baskerville, 'Baskerville Old Face', Georgia, serif;
    --f-ar: 'Amiri', 'Traditional Arabic', serif;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.75 var(--f-serif); -webkit-font-smoothing: antialiased; }
  body.locked { overflow: hidden; }
  img { max-width: 100%; display: block; }
  button, input, textarea { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
  h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
  p { margin: 0; }
  .caps { font-size: 0.72rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--mauve); font-weight: 700; }
  .caps.sm { font-size: 0.64rem; letter-spacing: 0.3em; font-weight: 400; }
  .it { font-style: italic; color: var(--mauve); }

  /* kertas: latar cat air dari PSD */
  .paper { position: relative; background: var(--paper) center / cover no-repeat; }
  .paper.cover { background-image: url("../images/crafid-geranium/paper-cover.webp"); }
  .paper.std { background-image: url("../images/crafid-geranium/paper-std.webp"); }

  /* lapisan PSD ditempatkan dengan persentase kanvas asli 1819 × 2572 */
  .stage { position: relative; aspect-ratio: 1819 / 2572; max-width: none; }
  .stage > img { position: absolute; height: auto; pointer-events: none; user-select: none; }
  /* standar CRAFID: semua bunga bergoyang jelas, ± 2,4–3,6°, tempo 4,6–7 detik, tiap tangkai beda (--a, --d, --dl) */
  .sway { transform-origin: var(--ox, 50%) var(--oy, 100%); animation: sway var(--d, 5.6s) ease-in-out var(--dl, 0s) infinite alternate; }
  @keyframes sway { from { transform: rotate(calc(var(--a, 3deg) * -1)) translateY(0); } to { transform: rotate(var(--a, 3deg)) translateY(-0.4%); } }

  /* ---------- gerbang: Save the Date ---------- */
  .gate { position: fixed; inset: 0; z-index: 50; overflow: hidden; background-color: var(--paper);
    transition: transform 1.1s cubic-bezier(.7,0,.2,1), opacity 1.1s ease; }
  .gate.gone { transform: translateY(-104%); opacity: 0.4; pointer-events: none; }
  .gate { --A: min(115vw, 72svh); --aw: min(88vw, 58svh, 520px); }
  .gate .frame { position: absolute; inset: 0 auto 0 50%; width: min(100vw, var(--A)); transform: translateX(-50%); pointer-events: none; }
  .gate .fl { position: absolute; height: auto; max-width: none; }
  .gate .f2 { left: 0; top: calc(var(--A) * 0.16); width: calc(var(--A) * 0.446); z-index: 1; }
  .gate .f3 { right: 0; top: 0; width: calc(var(--A) * 0.237); z-index: 1; }
  .gate .f4 { left: 0; bottom: 0; width: calc(var(--A) * 0.269); z-index: 1; }
  .gate .f6 { right: 0; top: 0; width: calc(var(--A) * 0.295); z-index: 3; }
  .gate .f7 { left: 0; bottom: 0; width: calc(var(--A) * 0.561); z-index: 3; }
  .gate .f8 { right: 0; bottom: 0; width: calc(var(--A) * 0.206); z-index: 3; }
  .gate .archbox { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + max(3svh, 18px)); bottom: 0; width: var(--aw); display: flex; flex-direction: column; container-type: inline-size; pointer-events: none; }
  .gate .arch-top { width: 100%; height: auto; display: block; flex: none; }
  .gate .arch-pillars { flex: 1 1 auto; margin-top: -1px; background: url("../images/crafid-geranium/arch-pillar.webp") center top / 100% auto repeat-y; }
  .gate .frame { z-index: auto; }
  .gate .f6, .gate .f7, .gate .f8 { z-index: 3; }
  .gate .cv-text { position: absolute; z-index: 4; left: 12%; right: 12%; top: calc(21cqw + max(0px, (100svh - 108cqw - 200px) * 0.36)); display: grid; justify-items: center; text-align: center; color: var(--mauve); }
  .gate .cv-text .k1 { font: 700 4.2cqw/1.3 var(--f-serif); }
  .gate .cv-text .k2 { font: 700 4.8cqw/1.4 var(--f-serif); letter-spacing: 0.28em; text-transform: uppercase; padding-left: 0.28em; }
  .gate .cv-text .mono { width: 33cqw; margin: 5.4cqw 0 6cqw; height: auto; }
  .gate .cv-text .mono .mono-live { font-size: 24cqw; }
  .gate .cv-text .nm { white-space: nowrap; font: 700 4.8cqw/1.3 var(--f-serif); letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose); padding-left: 0.3em; }
  .gate .cv-text .dt { font: 700 4.2cqw/1.6 var(--f-serif); letter-spacing: 0.14em; }
  .gate .cv-text .qt { font: italic 400 4.1cqw/1.4 var(--f-serif); margin-top: 4.4cqw; }
  @media (min-aspect-ratio: 3/4) { .gate .frame { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); } }
  /* kartu tamu ringkas (± 240 px), tengah-bawah ± 7 % tinggi layar */
  .gate-foot { position: absolute; z-index: 6; left: 0; right: 0; margin-inline: auto; bottom: calc(7svh + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 40px), 244px);
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 11px 14px 12px; border-radius: 20px;
    background: #fbf7f4b8; border: 1px solid #ffffffb0; box-shadow: 0 18px 40px -24px #7a5656; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .to { display: grid; gap: 2px; }
  .to b { font-weight: 700; font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere; color: var(--rose-deep); letter-spacing: 0.02em; }
  .open { appearance: none; border: 1px solid var(--rose); background: var(--rose); color: #fffaf8; border-radius: 999px; padding: 12px 18px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
    font: 700 0.64rem/1 var(--f-serif); letter-spacing: 0.2em; text-transform: uppercase; box-shadow: 0 14px 30px -18px #7a5656; }
  .open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .open:hover { background: var(--rose-deep); }

  /* ---------- cover undangan ---------- */
  .hero { min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
  .hero-art { position: absolute; right: 0; bottom: 0; width: min(100%, 760px); }
  .hero-text { position: relative; z-index: 2; width: 100%; max-width: 720px; margin: auto; display: grid; gap: 16px; align-content: start;
    padding-top: clamp(44px, 8vh, 96px); padding-bottom: calc(min(100vw, 760px) * 1.414 * 0.42); padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
  .hero-text .names { width: min(64vw, 400px); height: auto; }
  .hero-text .when { display: grid; gap: 6px; }
  .hero-text .date { font-size: clamp(0.86rem, 3.4vw, 1.02rem); letter-spacing: 0.24em; text-transform: uppercase; font-weight: 700; color: var(--mauve); }
  .hero-text .date sup { font-size: 0.55em; letter-spacing: 0.05em; }
  .hero-text .place { font-size: clamp(0.9rem, 3.6vw, 1.08rem); letter-spacing: 0.24em; text-transform: uppercase; font-weight: 700; color: var(--mauve); }
  .hero-text .follow { font-size: clamp(1.05rem, 4.2vw, 1.3rem); }
  .scrollhint { position: absolute; z-index: 3; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: 34px; height: 54px; border-radius: 20px; border: 1px solid #ffffffcc; background: #92757555; display: grid; place-items: start center; padding-top: 9px; }
  .scrollhint i { width: 4px; height: 9px; border-radius: 4px; background: #fff; animation: dot 1.8s ease-in-out infinite; }
  @keyframes dot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

  /* ---------- bagian isi ---------- */
  main { position: relative; }
  /* standar CRAFID: tiap bagian setinggi satu layar, isi di tengah; isi panjang boleh memanjang */
  .sec { position: relative; min-height: 100svh; display: grid; align-content: center; padding-block: clamp(64px, 11vw, 110px); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); overflow: hidden; }
  .sec.tint { background: var(--paper-2); }
  .wrap { position: relative; z-index: 2; max-width: 640px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; justify-items: center; text-align: center; }
  .orn { width: 150px; height: 18px; color: var(--gold); }
  .sec h2 { font-size: clamp(1.4rem, 5.6vw, 2rem); letter-spacing: 0.28em; text-transform: uppercase; color: var(--rose); font-weight: 400; }
  .lead { font-style: italic; color: var(--mauve); max-width: 34ch; }
  .ayat { font: 400 clamp(1.7rem, 7vw, 2.3rem)/1.9 var(--f-ar); color: var(--rose-deep); direction: rtl; }
  .mono { width: clamp(110px, 30vw, 150px); height: auto; }
  .corner { position: absolute; z-index: 1; pointer-events: none; width: clamp(92px, 24vw, 220px); }
  .corner.tl { top: 0; left: 0; } .corner.br { bottom: 0; right: 0; } .corner.bl { bottom: 0; left: 0; } .corner.tr { top: 0; right: 0; }

  /* V27.85: kolom tidak ikut melebar mengikuti nama panjang; fitOne() membaca lebar kolom ini untuk mengecilkan nama */
  .couple { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; width: 100%; }
  .person { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; min-width: 0; }
  .person .initial { width: 118px; aspect-ratio: 3 / 4; border-radius: 999px 999px 14px 14px; border: 1px solid var(--rose); outline: 6px solid var(--paper-2); outline-offset: -12px;
    background: linear-gradient(180deg, #f6e7e5, #e3e8ec); display: grid; place-items: center; font: italic 400 3rem/1 var(--f-serif); color: var(--rose); }
  .person h3 { font-size: clamp(1.25rem, 5vw, 1.6rem); letter-spacing: 0.2em; text-transform: uppercase; color: var(--rose); }
  .person .of { font-size: 0.9rem; color: var(--ink); max-width: 30ch; }
  .person .of b { display: block; font-weight: 700; color: var(--mauve); }
  .amp { font: italic 400 3rem/1 var(--f-serif); color: var(--blush); }

  .events { display: grid; gap: 14px; width: 100%; }
  .event { border: 1px solid var(--line); border-radius: 18px; padding: 26px 20px; background: #ffffffa8; display: grid; gap: 8px; justify-items: center; }
  .event h3 { font-size: 1.05rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose); font-weight: 700; }
  .event .t { font-size: 1.7rem; color: var(--rose-deep); font-variant-numeric: tabular-nums; }
  .event .v { font-weight: 700; color: var(--mauve); letter-spacing: 0.08em; }
  .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
  .btn { appearance: none; border: 1px solid var(--rose); background: transparent; color: var(--rose-deep); border-radius: 999px; padding: 10px 18px; cursor: pointer; text-decoration: none;
    font: 700 0.62rem/1 var(--f-serif); letter-spacing: 0.24em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
  .btn.solid { background: var(--rose); color: #fffaf8; }
  .btn:disabled { opacity: 0.55; cursor: default; }

  .count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 440px; }
  .tick { display: grid; gap: 4px; padding: 16px 4px; border-radius: 999px 999px 12px 12px; background: #ffffffb3; border: 1px solid var(--line); }
  .tick output { font-size: clamp(1.5rem, 7vw, 2.1rem); color: var(--rose-deep); font-variant-numeric: tabular-nums; line-height: 1.1; }
  .tick span { font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mauve); }
  .done-note { font-style: italic; color: var(--mauve); }

  .gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .gal img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }

  form { display: grid; gap: 14px; width: 100%; text-align: left; }
  label, legend { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--mauve); font-weight: 700; }
  input[type=text], textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfb; padding: 12px 14px; font-size: 0.95rem; color: var(--ink); }
  textarea { min-height: 96px; resize: vertical; }
  fieldset { border: 0; margin: 0; padding: 0; }
  .choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
  .choice { position: relative; flex: 1 1 140px; }
  .choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .choice span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: #fffdfb; font-size: 0.86rem; }
  .choice input:checked + span { background: var(--rose); border-color: var(--rose); color: #fffaf8; }
  .choice input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
  .form-note { font-size: 0.86rem; font-style: italic; color: var(--rose-deep); text-align: center; }
  .wishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; text-align: left; max-height: 360px; overflow-y: auto; }
  .wishes li { background: #ffffffb3; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 2px; }
  .wishes li b { color: var(--rose-deep); font-size: 0.92rem; }
  .wishes li small { color: var(--mauve); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; }
  .wishes li p { font-size: 0.92rem; }
  .empty { font-style: italic; color: var(--mauve); font-size: 0.9rem; }

  .gift { width: 100%; max-width: 420px; border-radius: 20px; padding: 26px 22px; display: grid; gap: 6px; justify-items: center; background: linear-gradient(150deg, #f6e5e3, #e4e9ed); border: 1px solid var(--line); }
  .gift .bank { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 700; color: var(--mauve); }
  .gift .no { font-size: 1.45rem; letter-spacing: 0.12em; color: var(--rose-deep); font-variant-numeric: tabular-nums; user-select: all; overflow-wrap: anywhere; }

  .closing .names { width: min(70vw, 380px); height: auto; }
  footer { text-align: center; padding: 28px 16px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mauve); background: var(--paper-2); }

  #petals { position: fixed; inset: 0; z-index: 40; pointer-events: none; width: 100%; height: 100%; }
  .toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; transition: .4s; background: var(--rose-deep); color: #fffaf8; border-radius: 999px; padding: 10px 18px; font-size: 0.8rem; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  @media (min-width: 760px) { .couple { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; } .events { grid-template-columns: 1fr 1fr; } }
  @media (prefers-reduced-motion: reduce) { .sway, .scrollhint i { animation: none; } .gate { transition: none; } html { scroll-behavior: auto; } }
  /* ---- tambahan untuk struktur 15 bagian CRAFID ---- */
  .stage { container-type: inline-size; }
  .cv-text { position: absolute; z-index: 3; left: 18%; right: 18%; top: 22.5%; display: grid; justify-items: center; text-align: center; color: var(--mauve); pointer-events: none; }
  .cv-text .k1 { font: 700 3.1cqw/1.3 var(--f-serif); }
  .cv-text .k2 { font: 700 3.6cqw/1.4 var(--f-serif); letter-spacing: 0.28em; text-transform: uppercase; padding-left: 0.28em; }
  .cv-text .mono { width: 27cqw; margin: 4.5cqw 0 5cqw; height: auto; }
  .cv-text .nm { font: 700 3.7cqw/1.3 var(--f-serif); letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose); padding-left: 0.3em; }
  .cv-text .dt { font: 700 3.1cqw/1.6 var(--f-serif); letter-spacing: 0.14em; }
  .cv-text .qt { font: italic 400 3.05cqw/1.4 var(--f-serif); margin-top: 3.6cqw; }
  .gate .to .pre { font-size: 0.64rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mauve); }
  .hero-text .kicker { font: italic 400 clamp(1rem, 4vw, 1.2rem)/1.3 var(--f-serif); color: var(--mauve); }
  .hero-text .dmy { font-size: clamp(1rem, 4vw, 1.2rem); letter-spacing: 0.32em; color: var(--rose); font-weight: 700; font-variant-numeric: tabular-nums; }
  .sec .kick { font: italic 400 1rem/1.3 var(--f-serif); color: var(--mauve); }
  .opening h2 { letter-spacing: 0.14em; }
  .person .photo { width: 150px; aspect-ratio: 3 / 4; border-radius: 999px 999px 16px 16px; overflow: hidden; border: 1px solid var(--rose); outline: 6px solid var(--paper-2); outline-offset: -12px; }
  .person .photo img { width: 100%; height: 100%; object-fit: cover; }
  .ig { font-size: 0.62rem; }
  .invite-line { max-width: 40ch; }
  .event .day { font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mauve); font-weight: 700; }
  .stream { width: 100%; max-width: 460px; border: 1px dashed var(--rose); border-radius: 18px; padding: 24px 20px; display: grid; gap: 10px; justify-items: center; background: #ffffffa0; }
  .gal .ph { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; border: 1px dashed var(--line); background: linear-gradient(160deg, #f4e3e1, #e2e8ec); display: grid; place-items: center; font: italic 400 0.82rem/1.2 var(--f-serif); color: var(--mauve); }
  .gal .wide { grid-column: span 2; aspect-ratio: auto; }
  .story { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 480px; display: grid; gap: 0; text-align: left; }
  .story li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding-bottom: 26px; }
  .story li::before { content: ''; position: absolute; left: 31px; top: 30px; bottom: 0; width: 1px; background: var(--line); }
  .story li:last-child::before { display: none; }
  .story .yr { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--rose); display: grid; place-items: center; background: var(--paper-2); color: var(--rose-deep); font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
  .story h3 { font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--rose); font-weight: 700; padding-top: 8px; }
  .story p { font-size: 0.9rem; }
  .gifts { display: grid; gap: 12px; width: 100%; justify-items: center; }
  .gift .addr { font-size: 0.95rem; color: var(--rose-deep); max-width: 30ch; }
  .tag { font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mauve); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; background: #ffffffb0; }
  .qr { width: 188px; height: 188px; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--line); display: grid; place-items: center; }
  .qr canvas, .qr img { width: 164px !important; height: 164px !important; }
  .music { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--rose); background: #fffaf8e6; color: var(--rose-deep); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -14px #7a5656; }
  .music svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .music.on svg { animation: spin 6s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .preview-note { font-size: 0.7rem; font-style: italic; color: var(--mauve); }
  @media (prefers-reduced-motion: reduce) { .music.on svg { animation: none; } }
  /* nama & monogram: gambar khusus (name_art / monogram) atau teks otomatis */
  .names, .mono { display: block; }
  .names img, .mono img { width: 100%; height: auto; display: block; }
  .nm-live { position: relative; display: grid; gap: 0.1em; font: 400 clamp(2rem, 10vw, 3.4rem)/1.05 'Cinzel', 'Trajan Pro', var(--f-serif); letter-spacing: 0.2em; color: var(--rose); text-transform: uppercase; }
  .nm-live .b { padding-left: 1.3em; }
  .nm-live .amp-g { position: absolute; left: 0.9em; top: 50%; transform: translateY(-52%); font: italic 400 2.6em/1 var(--f-serif); color: #9275752e; letter-spacing: 0; z-index: -1; }
  .closing .nm-live { justify-items: center; } .closing .nm-live .b { padding-left: 0; } .closing .nm-live .amp-g { left: 50%; transform: translate(-50%, -52%); }
  .mono-live { display: block; text-align: center; font: italic 400 1em/1 var(--f-serif); background: linear-gradient(160deg, #b9b9b9, #6f6f6f 45%, #c8c8c8 70%, #8a8a8a); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.04em; }
  .cv-text .mono .mono-live { font-size: 20cqw; }
  #quote .mono .mono-live { font-size: clamp(4rem, 18vw, 6rem); }

  /* ================= MOTION GRAPHIC =================
     Token gerak: satu kurva lembut untuk semua, durasi panjang untuk kesan cat air. */
  :root { --ease-soft: cubic-bezier(.22, .8, .24, 1); --ease-out: cubic-bezier(.16, 1, .3, 1); --m-slow: 1.6s; --m-mid: 1s; }

  /* 1 · pembukaan sampul — total 5 detik:
     0,2–2,6 s lengkung naik · 0,4–4,1 s bunga mekar dari sudut · 1,6–4,7 s teks & monogram · 3,9–5,0 s kartu tamu */
  @keyframes archRise { from { opacity: 0; translate: 0 7%; scale: .94; } to { opacity: 1; translate: 0 0; scale: 1; } }
  @keyframes bloomTL { from { opacity: 0; scale: .55; rotate: -10deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
  @keyframes bloomTR { from { opacity: 0; scale: .55; rotate: 10deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
  @keyframes fadeUp { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
  @keyframes inkIn { from { opacity: 0; filter: blur(6px); scale: 1.04; } to { opacity: 1; filter: blur(0); scale: 1; } }
  @keyframes glint { 0%, 70%, 100% { filter: brightness(1) drop-shadow(0 0 0 #fff0); } 82% { filter: brightness(1.45) drop-shadow(0 0 7px #ffffffcc); } }
  @keyframes paperIn { from { opacity: 0; } to { opacity: 1; } }

  .motion .gate .archbox { animation: archRise 2.4s var(--ease-out) .2s both; }
  .motion .gate .fl { animation: sway var(--d, 9s) ease-in-out var(--dl, 0s) infinite alternate, bloomTL 2.6s var(--ease-out) both; }
  .motion .gate .f3, .motion .gate .f6, .motion .gate .f8 { animation: sway var(--d, 9s) ease-in-out var(--dl, 0s) infinite alternate, bloomTR 2.6s var(--ease-out) both; }
  .motion .gate .f6 { animation-delay: var(--dl, 0s), .4s; } .motion .gate .f3 { animation-delay: var(--dl, 0s), .7s; }
  .motion .gate .f7 { animation-delay: var(--dl, 0s), .9s; } .motion .gate .f2 { animation-delay: var(--dl, 0s), 1.1s; }
  .motion .gate .f8 { animation-delay: var(--dl, 0s), 1.3s; } .motion .gate .f4 { animation-delay: var(--dl, 0s), 1.5s; }
  .motion .gate .cv-text > * { animation: fadeUp 1.3s var(--ease-soft) both; }
  .motion .gate .cv-text > :nth-child(1) { animation-delay: 1.6s; } .motion .gate .cv-text > :nth-child(2) { animation-delay: 1.8s; }
  .motion .gate .cv-text > :nth-child(3) { animation-delay: 2.0s; }
  .motion .gate .cv-text > .mono { animation: inkIn 2s var(--ease-soft) 2.1s both, glint 5s ease-in-out 5.4s infinite; }
  .motion .gate .cv-text > :nth-child(5) { animation-delay: 2.9s; } .motion .gate .cv-text > :nth-child(6) { animation-delay: 3.15s; }
  .motion .gate .cv-text > :nth-child(7) { animation-delay: 3.4s; }
  .motion .gate .gate-foot { animation: fadeUp 1.1s var(--ease-soft) 3.9s both; }
  .motion .open { position: relative; overflow: hidden; }
  .motion .open::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, #ffffff66 50%, transparent 65%); translate: -120% 0; animation: sheen 3.6s ease-in-out 5.6s infinite; }
  @keyframes sheen { 0%, 60% { translate: -120% 0; } 85%, 100% { translate: 120% 0; } }

  /* 2 · transisi buka: kamera menembus lengkung, bunga tersibak */
  .motion .gate.gone { transform: none; opacity: 0; transition: opacity .7s ease .45s; }
  .motion .gate.gone .archbox { scale: 1.7; opacity: 0; transition: scale 1.2s cubic-bezier(.6, 0, .3, 1), opacity .9s ease .25s; animation: none; }
  .motion .gate.gone .gate-foot { opacity: 0; translate: 0 20px; transition: opacity .35s ease, translate .35s ease; animation: none; }
  .motion .gate.gone .f2, .motion .gate.gone .f4, .motion .gate.gone .f7 { translate: -45% 0; opacity: 0; transition: translate 1.1s cubic-bezier(.6, 0, .3, 1), opacity .9s ease .2s; }
  .motion .gate.gone .f3, .motion .gate.gone .f6, .motion .gate.gone .f8 { translate: 45% 0; opacity: 0; transition: translate 1.1s cubic-bezier(.6, 0, .3, 1), opacity .9s ease .2s; }

  /* hero setelah dibuka */
  @keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes grow { from { opacity: 0; translate: 0 8%; scale: .9; } to { opacity: 1; translate: 0 0; scale: 1; } }
  .motion .hero:not(.play) .hero-text > *, .motion .hero:not(.play) .hero-art img { opacity: 0; }
  .motion .hero.play .hero-text > * { animation: fadeUp 1.1s var(--ease-soft) both; }
  .motion .hero.play .hero-text > :nth-child(1) { animation-delay: .5s; }
  .motion .hero.play .hero-text > h1 { animation: wipe 1.8s cubic-bezier(.65, 0, .25, 1) .75s both; }
  .motion .hero.play .hero-text > :nth-child(3) { animation-delay: 1.6s; } .motion .hero.play .hero-text > :nth-child(4) { animation-delay: 1.75s; }
  .motion .hero.play .hero-text > :nth-child(5) { animation-delay: 1.9s; } .motion .hero.play .hero-text > :nth-child(6) { animation-delay: 2.05s; }
  .motion .hero.play .hero-art img { animation: sway var(--d, 9s) ease-in-out var(--dl, 0s) infinite alternate, grow 2s var(--ease-out) both; }
  .motion .hero.play .hero-art img:nth-child(1) { animation-delay: var(--dl, 0s), .3s; } .motion .hero.play .hero-art img:nth-child(2) { animation-delay: var(--dl, 0s), .15s; }
  .motion .hero.play .hero-art img:nth-child(3) { animation-delay: var(--dl, 0s), .7s; } .motion .hero.play .hero-art img:nth-child(4) { animation-delay: var(--dl, 0s), .45s; }
  .motion .hero.play .hero-art img:nth-child(5) { animation-delay: var(--dl, 0s), .6s; }
  .hero-art { will-change: transform; }

  /* 3 · muncul saat digulir (hanya elemen yang awalnya di bawah layar) */
  .rv { transition: opacity 1s var(--ease-soft), translate 1s var(--ease-soft), filter 1s var(--ease-soft); }
  .rv.rv-pre { opacity: 0; translate: 0 22px; filter: blur(3px); }
  .orn path { stroke-dasharray: 60; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease-soft) .2s; }
  .rv-pre .orn path, .orn.rv-pre path { stroke-dashoffset: 60; }
  .corner { transition: translate 1.6s var(--ease-out), opacity 1.6s ease; }
  .sec.sec-pre .corner { translate: 0 40px; opacity: 0; }

  /* 4 · angka hitung mundur bergeser */
  @keyframes tickIn { from { opacity: 0; translate: 0 -40%; } to { opacity: 1; translate: 0 0; } }
  .tick output.tk { animation: tickIn .45s var(--ease-out); }
  .tick { transition: box-shadow .4s ease; }

  @media (prefers-reduced-motion: reduce) {
    .motion .gate, .motion .gate *, .motion .hero *, .rv, .tick output { animation: none !important; transition: none !important; }
    .rv.rv-pre, .sec.sec-pre .corner { opacity: 1; translate: none; filter: none; }
    .motion .hero:not(.play) .hero-text > *, .motion .hero:not(.play) .hero-art img { opacity: 1; }
  }

  /* ================= STANDAR CRAFID (V12.10) ================= */
  /* nama satu baris, mengecil otomatis lewat JS */
  .fit { white-space: nowrap; }
  .nm-live .a, .nm-live .b { white-space: nowrap; }
  .person h3 { white-space: nowrap; max-width: 100%; }
  /* varian tanpa foto: nama saja, tanpa bingkai */
  .v-nophoto .person .photo { display: none; }
  .v-nophoto .person h3 { font: 400 clamp(1.6rem, 7.4vw, 2.3rem)/1.2 'Cinzel', var(--f-serif); letter-spacing: .18em; }
  /* foto kosong: bunga PSD memudar ke atas + inisial (tanpa siluet orang) */
  .person .photo { position: relative; }
  .empty-ph { position: absolute; inset: 0; background: linear-gradient(180deg, #f6eeec, #eedcda 70%, #e6cfcd); overflow: hidden; display: block; }
  .empty-ph .efl { position: absolute; left: -22%; bottom: -6%; width: 144%; max-width: none; height: auto; -webkit-mask-image: linear-gradient(to top, #000 35%, transparent 92%); mask-image: linear-gradient(to top, #000 35%, transparent 92%); }
  .empty-ph .ini { position: absolute; left: 0; right: 0; top: 22%; text-align: center; font: italic 400 3.4rem/1 var(--f-serif); color: var(--rose); text-shadow: 0 1px 0 #fff9; }
  .person .photo img.ph { width: 100%; height: 100%; object-fit: cover; }
  /* tangkai pojok di belakang teks, tidak menangkap klik */
  .corner { pointer-events: none; height: auto; max-width: none; }
  .btn, form, .wishes, .gifts, .events, .count { position: relative; z-index: 2; }
  @media (prefers-reduced-motion: reduce) { .sway, .gate .fl, .hero-art img, .corner { animation: none !important; } }
