  /* Layout: one centred 560px column, like an unrolled scroll of cloth.
     A maroon cover lifts away when the wax seal is tapped. Gold and marigold carry the Hindu wedding vocabulary. */
  :root {
    --night: #2f0a14;
    --wine: #4a0f1d;
    --crimson: #8c252b;
    --gold: #d8ab57;
    --gold-pale: #efd9a4;
    --marigold: #f0901f;
    --leaf: #4d8a52;
    --text: #f6ead6;
    --muted: #cfb49b;
    --paper: #f5e8cf;
    --paper-ink: #3a0d17;
    --line: rgba(216, 171, 87, 0.35);
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-deva: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', serif;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--night);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  body.locked { overflow: hidden; height: 100%; }
  h1, h2, h3, h4, p { margin: 0; }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; text-wrap: balance; }
  a { color: inherit; }
  button, input, textarea { font: inherit; color: inherit; }

  .wrap {
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .band { padding-block: 4.5rem; text-align: center; position: relative; }
  .band.alt { background: var(--wine); }
  .dots {
    background-image: radial-gradient(circle at 1px 1px, rgba(216, 171, 87, 0.13) 1px, transparent 0);
    background-size: 22px 22px;
  }
  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 400;
  }
  .deva { font-family: var(--font-deva); color: var(--gold-pale); font-weight: 400; }
  .lotus { width: 74px; height: 37px; color: var(--gold); display: block; margin: 1.6rem auto; }
  .lead { color: var(--muted); font-size: 1.02rem; }
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .7rem 1.6rem; border-radius: 999px;
    border: 1px solid var(--gold); background: transparent; color: var(--gold-pale);
    text-decoration: none; cursor: pointer; letter-spacing: .08em; font-size: .9rem; font-weight: 400;
    transition: background .25s, color .25s;
  }
  .btn:hover { background: var(--gold); color: var(--night); }
  .btn.solid { background: var(--gold); color: var(--night); font-weight: 500; }
  .btn.solid:hover { background: var(--gold-pale); }
  :is(.btn, .seal, .pill input, .step button, .music):focus-visible { outline: 3px solid var(--gold-pale); outline-offset: 4px; }

  /* ---------- Cover ---------- */
  .cover {
    position: fixed; inset: 0; z-index: 50;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 150px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(16px, env(safe-area-inset-left, 0px));
    background: radial-gradient(120% 90% at 50% 20%, #6a1727 0%, var(--wine) 45%, var(--night) 100%);
    text-align: center; overflow-y: auto;
    transition: transform 1.1s cubic-bezier(.7, 0, .2, 1);
  }
  .cover::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
    background-image: radial-gradient(circle at 1px 1px, rgba(216, 171, 87, 0.14) 1px, transparent 0); background-size: 22px 22px; }
  .cover.gone { transform: translateY(105%); }
  .cover > * { position: relative; }
  .cover .toran { position: absolute; top: env(safe-area-inset-top, 0px); left: 0; right: 0; max-width: 560px; margin-inline: auto; }
  .cover .hi { font-family: var(--font-deva); font-size: 1.35rem; color: var(--gold-pale); }
  .cover .eyebrow { margin-top: .9rem; }
  .cover h1 { font-size: clamp(3.2rem, 15vw, 5.6rem); line-height: .95; margin-top: .6rem; color: var(--text); font-style: italic; font-weight: 500; }
  .cover h1 span { display: block; font-size: .42em; color: var(--marigold); margin-block: .1em; }
  .cover .dates { margin-top: 1.1rem; letter-spacing: .3em; text-transform: uppercase; font-size: .8rem; color: var(--gold-pale); }
  .seal {
    margin-top: 2.2rem; width: 112px; height: 112px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
    background: radial-gradient(circle at 35% 28%, #cf4b50, #8c252b 55%, #5a1017);
    box-shadow: 0 0 0 5px rgba(216, 171, 87, .22), 0 14px 34px rgba(0, 0, 0, .55), inset 0 0 0 7px rgba(0, 0, 0, .12);
    color: var(--gold-pale); font-family: var(--font-display); font-size: 2.1rem; font-style: italic;
    animation: pulse 2.6s ease-in-out infinite;
  }
  .seal::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed rgba(239, 217, 164, .6); }
  .seal i { color: var(--marigold); padding-inline: .05em; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(216, 171, 87, .22), 0 14px 34px rgba(0, 0, 0, .55), inset 0 0 0 7px rgba(0, 0, 0, .12); }
    50% { box-shadow: 0 0 0 14px rgba(216, 171, 87, .08), 0 14px 34px rgba(0, 0, 0, .55), inset 0 0 0 7px rgba(0, 0, 0, .12); }
  }
  .cover .tap { margin-top: 1rem; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
  .cover .where { margin-top: 1.6rem; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--gold-pale); }

  /* ---------- Envelope opener ---------- */
  .cover :is(.hi, .eyebrow, h1, .dates, .tap, .where) { transition: opacity .5s ease; }
  .cover.opening :is(.hi, .eyebrow, h1, .dates, .tap, .where) { opacity: 0; }
  .env {
    position: relative; width: min(300px, 78vw); aspect-ratio: 3 / 2; margin-top: 2.2rem;
    perspective: 900px; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .55));
  }
  .env > * { position: absolute; }
  .env-back { inset: 0; z-index: 1; background: #d2b67c; border-radius: 4px; }
  .env-card {
    left: 7%; right: 7%; top: 8%; bottom: 8%; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: var(--paper); color: var(--paper-ink); border: 1px solid var(--gold); border-radius: 3px;
    transition: transform .8s cubic-bezier(.3, .7, .2, 1) .45s;
  }
  .env-card .eyebrow { color: var(--crimson); font-size: .6rem; margin: 0; }
  .env-card h3 { font-size: 1.9rem; font-style: italic; line-height: 1.1; color: var(--crimson); margin: .25rem 0; }
  .env-card p:last-child { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
  .env-front {
    inset: 0; z-index: 3; border-radius: 4px;
    background: linear-gradient(160deg, #f4e4bd, #e2c78a);
    clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  }
  .env-flap {
    left: 0; top: 0; width: 100%; height: 58%; z-index: 4; transform-origin: top center;
    background: linear-gradient(180deg, #ebd49f, #d3b370);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transition: transform .7s ease, z-index 0s .3s;
  }
  .env .seal {
    left: 50%; top: 56%; width: 58px; height: 58px; margin: 0; z-index: 5; font-size: 1.05rem;
    transform: translate(-50%, -50%);
  }
  .env .seal::after { inset: 5px; }
  .env.open .env-flap { transform: rotateX(180deg); z-index: 1; }
  .env.open .env-card { transform: translateY(-58%); }
  .env.open .seal { opacity: 0; transform: translate(-50%, -50%) scale(.6); pointer-events: none; transition: opacity .3s, transform .3s; }

  /* ---------- Falling petals ---------- */
  .petals { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
  .petal {
    position: absolute; top: -8vh; left: var(--x); width: var(--s); height: calc(var(--s) * 1.35);
    animation: petal-fall var(--d) linear var(--delay) both;
  }
  .petal i {
    display: block; width: 100%; height: 100%; border-radius: 80% 0 80% 0;
    background: radial-gradient(circle at 30% 30%, var(--c1), var(--c2));
    animation: petal-sway var(--sw) ease-in-out infinite alternate;
  }
  @keyframes petal-fall { to { transform: translateY(118vh); } }
  @keyframes petal-sway {
    from { transform: translateX(-16px) rotate(-35deg); }
    to { transform: translateX(16px) rotate(40deg); }
  }

  /* ---------- Reveal (content is visible at rest; only a small lift animates) ---------- */
  .rv { transform: translateY(18px); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .rv.in { transform: none; }

  /* ---------- Blessing ---------- */
  .om {
    width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 1.6rem;
    display: grid; place-items: center; font-family: var(--font-deva); font-size: 2.6rem; color: var(--gold-pale);
    border: 1px solid var(--gold); box-shadow: 0 0 0 7px rgba(216, 171, 87, .12), inset 0 0 0 5px rgba(216, 171, 87, .1);
  }
  .names { font-size: clamp(3rem, 13vw, 4.8rem); line-height: 1; font-style: italic; margin-top: 1.8rem; }
  .names em { color: var(--marigold); font-style: italic; padding-inline: .08em; }
  .getting { margin-top: .5rem; letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; color: var(--gold); }
  .scroll-hint { margin-top: 2rem; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

  /* ---------- Invite ---------- */
  .person { margin-top: 1.4rem; }
  .person h3 { font-size: clamp(2.4rem, 10vw, 3.2rem); font-style: italic; }
  .person p { color: var(--muted); font-size: .98rem; }
  .with { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--marigold); margin-top: 1.2rem; }
  .wherewhen { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 2.6rem; border-block: 1px solid var(--line); }
  .wherewhen > div { padding: 1.4rem 1rem; min-width: 0; }
  .wherewhen > div + div { border-left: 1px solid var(--line); }
  .wherewhen h4 { font-size: 1.5rem; font-style: italic; color: var(--gold-pale); margin-bottom: .2rem; }
  .quote { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.4; margin-top: 2.4rem; color: var(--gold-pale); }

  /* ---------- Save the date ---------- */
  .cal { margin: 2rem auto 1.8rem; max-width: 330px; padding: 1.2rem 1rem 1.3rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(0, 0, 0, .14); }
  .cal h3 { font-size: 1.6rem; font-style: italic; margin-bottom: .7rem; }
  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-variant-numeric: tabular-nums; }
  .cal-grid b { font-weight: 400; font-size: .68rem; letter-spacing: .1em; color: var(--gold); padding-bottom: .35rem; }
  .cal-grid span { aspect-ratio: 1; display: grid; place-items: center; font-size: .92rem; color: var(--muted); border-radius: 50%; }
  .cal-grid span.on { background: var(--marigold); color: var(--night); font-weight: 500; box-shadow: 0 0 0 3px rgba(240, 144, 31, .25); }

  /* ---------- Events ---------- */
  .events { display: grid; gap: 14px; margin-top: 2.4rem; text-align: left; }
  .day-label { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-top: .8rem; text-align: center; }
  .event { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: 1.2rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); }
  .event .glyph { font-family: var(--font-deva); font-size: 1.9rem; line-height: 1.1; color: var(--gold-pale); text-align: center; border-right: 1px solid var(--line); padding-right: 1rem; }
  .event .glyph small { display: block; font-family: var(--font-body); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }
  .event h4 { font-size: 1.6rem; font-style: italic; line-height: 1.15; }
  .event .time { color: var(--marigold); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-top: .15rem; font-weight: 400; }
  .event p { color: var(--muted); font-size: .94rem; margin-top: .35rem; }

  /* ---------- Venue ---------- */
  .arch { width: 150px; margin: 1.6rem auto 1rem; color: var(--gold); display: block; }
  .venue-name { font-size: clamp(2.2rem, 9vw, 3rem); font-style: italic; margin-top: .4rem; }
  .addr { color: var(--muted); margin-top: .6rem; }
  .venue .btn { margin-top: 1.6rem; }

  /* ---------- Countdown ---------- */
  .count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 460px; margin: 2rem auto 1.4rem; }
  .count div { padding: 1rem .3rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .16); }
  .count strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 9vw, 3rem); line-height: 1; color: var(--gold-pale); font-variant-numeric: tabular-nums; }
  .count span { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

  /* ---------- RSVP ---------- */
  .rsvp-form { text-align: left; margin-top: 2rem; display: grid; gap: 1.5rem; }
  .field label.lbl, .field legend { display: block; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: .55rem; padding: 0; }
  fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
  fieldset:disabled { opacity: .4; }
  .txt, textarea.txt {
    width: 100%; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 12px;
    padding: .8rem 1rem; min-height: 48px; color: var(--text);
  }
  .txt::placeholder { color: rgba(207, 180, 155, .6); }
  .txt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  textarea.txt { min-height: 96px; resize: vertical; }
  .pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .pill { position: relative; }
  .pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .pill span { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1.05rem; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; transition: background .2s, color .2s, border-color .2s; }
  .pill input:checked + span { background: var(--gold); color: var(--night); border-color: var(--gold); font-weight: 400; }
  .pill input:focus-visible + span { outline: 3px solid var(--gold-pale); outline-offset: 3px; }
  .step { display: inline-flex; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
  .step button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(216, 171, 87, .18); color: var(--gold-pale); font-size: 1.4rem; cursor: pointer; line-height: 1; }
  .step button:hover { background: var(--gold); color: var(--night); }
  .step output { min-width: 2ch; text-align: center; font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
  .submit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
  .thanks { display: none; margin-top: 2rem; padding: 1.6rem 1.2rem; border: 1px solid var(--gold); border-radius: 18px; background: rgba(0, 0, 0, .2); }
  .thanks.show { display: block; }
  .thanks h3 { font-size: 2rem; font-style: italic; color: var(--gold-pale); }
  .thanks pre { text-align: left; overflow-x: auto; margin: 1.2rem 0 0; padding: 1rem; border-radius: 12px; background: rgba(0, 0, 0, .35); color: var(--gold-pale); font-size: .78rem; line-height: 1.5; }
  .thanks small { display: block; margin-top: .8rem; color: var(--muted); font-size: .8rem; }

  /* ---------- Closing ---------- */
  .closing h2 { font-size: clamp(2.4rem, 10vw, 3.4rem); font-style: italic; }
  .families { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.5; margin-top: 1rem; color: var(--gold-pale); }
  .families em { display: block; color: var(--marigold); font-size: 1.1rem; }
  .top-link { display: inline-block; margin-top: 2.2rem; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
  .toran-end { max-width: 520px; margin: 0 auto; transform: rotate(180deg); opacity: .9; }

  /* ---------- Music toggle ---------- */
  .music {
    position: fixed; z-index: 40; right: calc(max(16px, env(safe-area-inset-right, 0px))); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(47, 10, 20, .88); color: var(--gold-pale);
    cursor: pointer; display: none; place-items: center; backdrop-filter: blur(6px);
  }
  .music.show { display: grid; }
  .music svg { width: 22px; height: 22px; }
  .music .off { display: none; }
  .music[aria-pressed="false"] .on { display: none; }
  .music[aria-pressed="false"] .off { display: block; }

  /* ---------- Template notes (outside the invitation) ---------- */
  .notes { background: var(--paper); color: var(--paper-ink); padding-block: 4rem; }
  .notes h2 { font-size: 2.4rem; font-style: italic; color: var(--crimson); }
  .notes .eyebrow { color: var(--crimson); }
  .notes ol { margin: 1.4rem 0 0; padding-left: 1.3rem; display: grid; gap: .9rem; font-weight: 400; }
  .notes li::marker { color: var(--crimson); font-weight: 500; }
  .notes code { font-size: .86em; background: rgba(58, 13, 23, .09); padding: .1em .4em; border-radius: 5px; }
  .notes p { margin-top: .6rem; }

  @media (max-width: 420px) {
    .event { grid-template-columns: 78px minmax(0, 1fr); gap: .9rem; }
    .event .glyph { font-size: 1.6rem; padding-right: .7rem; }
    .wherewhen > div { padding-inline: .5rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .seal { animation: none; }
    .rv { transform: none; transition: none; }
    .cover { transition-duration: .01s; }
  }
