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

:root {
    /* Gates of Joy — ivory doors · eucalyptus · brass */
    --ivory: #f4efe6;
    --cream: #ebe3d4;
    --paper: #fbf8f1;
    --sage: #6f8164;
    --sage-deep: #556348;
    --sage-soft: #e7ece3;
    --leaf: #8a9a7a;
    --gold: #c4a574;
    --gold-deep: #9a7b4a;
    --gold-bright: #d4b884;
    --ink: #2f332c;
    --ink-soft: #5c6356;
    --accent: var(--sage);
    --accent-dark: var(--sage-deep);
    --radius-sm: 1.15rem;
    --radius-md: 1.85rem;
    --radius-lg: 2.5rem;
}

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }

body.mint-garden {
    font-family: 'Cormorant Garamond', 'Amiri', Georgia, serif;
    color: var(--ink);
    background:
        radial-gradient(ellipse 90% 50% at 50% -10%, rgba(111, 129, 100, .12), transparent 55%),
        radial-gradient(ellipse 70% 40% at 100% 40%, rgba(196, 165, 116, .08), transparent 50%),
        var(--ivory);
    min-height: 100vh;
    min-height: var(--app-vh, 100svh);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;

    --rsvp-accent: var(--sage-deep);
    --rsvp-text: var(--ink);
    --rsvp-muted: var(--ink-soft);
    --rsvp-border: rgba(111, 129, 100, .35);
    --rsvp-field: var(--paper);
    --if-accent: var(--sage-deep);
    --if-accent-text: #fbf8f1;
    --if-text: var(--ink);
    --if-muted: var(--ink-soft);
    --if-border: rgba(196, 165, 116, .4);
    --if-field: rgba(251, 248, 241, .92);
    --if-surface: rgba(231, 236, 227, .55);
    --if-rsvp-bg: transparent;
}

html[dir="rtl"] body.mint-garden {
    font-family: var(--inv-font-ar-body), 'Noto Naskh Arabic', serif;
}

body.mint-garden .mg-name,
body.mint-garden .mg-names-line {
    font-family: 'Great Vibes', cursive;
}
html[dir="rtl"] body.mint-garden .mg-name,
html[dir="rtl"] body.mint-garden .mg-names-line {
    font-family: var(--inv-font-ar-names), 'Aref Ruqaa', serif;
}

body.mint-garden .mg-room-label,
body.mint-garden .mg-scroll,
body.mint-garden .mg-cta,
body.mint-garden .mg-time-hero,
body.mint-garden .mg-count-value,
body.mint-garden .mg-monogram,
body.mint-garden .mg-path-step h3 {
    font-family: 'Playfair Display', 'Cinzel', serif;
}

a { color: inherit; text-decoration: none; }

/* ── Falling leaves layer ── */
.mg-leaves {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 5;
    overflow: hidden;
}
.mg-leaf {
    position: absolute;
    top: -2rem;
    width: .55rem;
    height: .9rem;
    border-radius: 60% 0 60% 0;
    background: linear-gradient(135deg, var(--leaf), var(--sage-deep));
    opacity: .45;
    animation: mg-leaf-fall linear forwards;
}
@keyframes mg-leaf-fall {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: .5; }
    100% { transform: translate3d(var(--drift, 40px), 110vh, 0) rotate(320deg); opacity: 0; }
}

/* ── Passage reveal ── */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s ease, transform 1s cubic-bezier(.22, 1, .36, 1);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.mg-passage {
    position: relative;
    z-index: 1;
}

/* ── Room labels ── */
.mg-room-label {
    font-size: .72rem;
    letter-spacing: .38em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255, 248, 238, .88);
    margin-bottom: 1rem;
}
.mg-room-label--ink {
    color: var(--sage-deep);
    text-align: center;
}
html[dir="rtl"] .mg-room-label {
    letter-spacing: .1em;
    text-transform: none;
    font-family: var(--inv-font-ar-body), 'Noto Naskh Arabic', serif;
    font-size: .95rem;
}

/* ── Arch lintels between rooms ── */
.mg-lintel {
    display: flex;
    justify-content: center;
    padding: .35rem 0;
    background: transparent;
}
.mg-lintel span {
    display: block;
    width: min(12rem, 42vw);
    height: 1.6rem;
    border: 1.5px solid rgba(196, 165, 116, .45);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    position: relative;
}
.mg-lintel span::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -.15rem;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--gold);
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(196, 165, 116, .45);
}

/* ══════════════════════════════════════
   1. Name threshold
══════════════════════════════════════ */
.mg-threshold {
    position: relative;
    min-height: 100svh;
    min-height: var(--app-vh, 100svh);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    overflow: hidden;
    color: #fff;
    padding: 3rem 1.25rem 4.5rem;
    background:
        linear-gradient(180deg, rgba(47, 51, 44, .15) 0%, rgba(47, 51, 44, .55) 48%, rgba(47, 51, 44, .9) 100%),
        var(--mg-hero) center 30% / cover no-repeat;
}
.mg-threshold-arch {
    position: absolute;
    inset: 8% 8% auto;
    height: 42%;
    pointer-events: none;
    z-index: 0;
}
.mg-arch-pillar {
    position: absolute;
    bottom: 0;
    width: 1.1rem;
    height: 78%;
    background: linear-gradient(180deg, rgba(251, 248, 241, .12), rgba(196, 165, 116, .35));
    border-radius: .4rem;
}
.mg-arch-pillar--start { inset-inline-start: 8%; }
.mg-arch-pillar--end { inset-inline-end: 8%; }
.mg-arch-curve {
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 55%;
    border: 2px solid rgba(212, 184, 132, .45);
    border-bottom: 0;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.mg-threshold-inner {
    position: relative;
    z-index: 1;
    width: min(34rem, 100%);
}
.mg-name {
    font-size: clamp(2.9rem, 12vw, 5.2rem);
    font-weight: 400;
    line-height: .95;
    text-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}
html[dir="rtl"] .mg-name {
    font-style: normal;
    font-weight: 700;
    font-size: clamp(2.5rem, 10vw, 4.2rem);
}
.mg-amp {
    margin: .3rem 0 .1rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.55rem;
    color: var(--gold-bright);
}
.mg-tagline {
    margin: 1.1rem auto 0;
    max-width: 22rem;
    font-style: italic;
    font-size: clamp(1.05rem, 3.2vw, 1.25rem);
    line-height: 1.7;
    color: rgba(255, 248, 238, .9);
}
.mg-scroll {
    display: inline-block;
    margin-top: 1.65rem;
    font-size: .7rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(196, 165, 116, .85);
    padding-bottom: .4rem;
}
html[dir="rtl"] .mg-scroll {
    letter-spacing: .06em;
    text-transform: none;
    font-size: .95rem;
}
.mg-threshold-step {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: min(18rem, 70vw);
    height: 1.1rem;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(196, 165, 116, .55), transparent);
    border-radius: 1rem 1rem 0 0;
}

/* ══════════════════════════════════════
   2. Behind the door
══════════════════════════════════════ */
.mg-behind {
    padding: 2.5rem 1.25rem 3rem;
    text-align: center;
    background:
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(111, 129, 100, .14), transparent 60%),
        var(--ivory);
}
.mg-doorway {
    position: relative;
    max-width: 22rem;
    margin: 1.5rem auto 0;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg) var(--radius-lg) .6rem .6rem;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(47, 51, 44, .14);
    perspective: 1400px;
    background: #2f332c;
}
.mg-doorway-reveal {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.mg-doorway-reveal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transform: scale(1.04);
    transition: transform 1.4s ease;
}
.mg-behind.is-visible .mg-doorway-reveal img,
.mg-behind.is-open .mg-doorway-reveal img {
    transform: scale(1);
}
.mg-doorway-caption {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    z-index: 1;
    font-family: 'Great Vibes', cursive;
    font-size: 1.6rem;
    color: #fff8ee;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .45);
}
html[dir="rtl"] .mg-doorway-caption {
    font-family: var(--inv-font-ar-names), 'Aref Ruqaa', serif;
}

.mg-door {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50.4%;
    z-index: 2;
    transform-style: preserve-3d;
    transition: transform 1.35s cubic-bezier(.22, 1, .36, 1);
}
.mg-door--left {
    left: 0;
    transform-origin: left center;
}
.mg-door--right {
    right: 0;
    transform-origin: right center;
}
.mg-door-panel {
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(251, 248, 241, .08), transparent 30%),
        repeating-linear-gradient(
            90deg,
            #ebe3d4 0,
            #ebe3d4 48%,
            #d9cfbe 48%,
            #d9cfbe 52%,
            #ebe3d4 52%,
            #ebe3d4 100%
        ),
        linear-gradient(160deg, #f0e8d8, #cfc3ad);
    box-shadow: inset 0 0 0 1px rgba(154, 123, 74, .35);
}
.mg-door--left .mg-door-panel {
    border-radius: var(--radius-lg) 0 0 .4rem;
    box-shadow:
        inset -8px 0 18px rgba(47, 51, 44, .12),
        inset 0 0 0 1px rgba(154, 123, 74, .35);
}
.mg-door--right .mg-door-panel {
    border-radius: 0 var(--radius-lg) .4rem 0;
    box-shadow:
        inset 8px 0 18px rgba(47, 51, 44, .12),
        inset 0 0 0 1px rgba(154, 123, 74, .35);
}
.mg-door-knob {
    position: absolute;
    top: 48%;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff8ee, var(--gold) 55%, var(--gold-deep));
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.mg-door--left .mg-door-knob { right: .7rem; }
.mg-door--right .mg-door-knob { left: .7rem; }

.mg-behind.is-open .mg-door--left,
.mg-behind.is-visible.is-open .mg-door--left {
    transform: rotateY(-78deg);
}
.mg-behind.is-open .mg-door--right,
.mg-behind.is-visible.is-open .mg-door--right {
    transform: rotateY(78deg);
}

/* ══════════════════════════════════════
   3. Unfolding letter
══════════════════════════════════════ */
.mg-letter-room {
    padding: 2.2rem 1.25rem 3.2rem;
    background:
        radial-gradient(ellipse 80% 45% at 50% 0%, rgba(111, 129, 100, .14), transparent 62%),
        var(--ivory);
}
.mg-letter {
    position: relative;
    max-width: 28rem;
    margin: 1.4rem auto 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--paper);
    box-shadow: 0 24px 60px rgba(47, 51, 44, .1);
    transform-origin: top center;
    transform: scaleY(.12);
    opacity: .4;
    transition: transform 1.1s cubic-bezier(.22, 1, .36, 1), opacity .7s ease;
}
.mg-letter-room.is-visible .mg-letter,
.mg-letter-room.is-open .mg-letter {
    transform: scaleY(1);
    opacity: 1;
}
.mg-letter-fold {
    position: absolute;
    inset: 0 0 auto;
    height: 42%;
    background: linear-gradient(180deg, rgba(196, 165, 116, .18), transparent);
    pointer-events: none;
    transform-origin: top;
    transition: opacity .8s ease .2s;
}
.mg-letter-room.is-visible .mg-letter-fold { opacity: 0; }
.mg-letter-body {
    position: relative;
    padding: 2.6rem 1.5rem 2.8rem;
    text-align: center;
}
.mg-monogram {
    margin: 0 0 1rem;
    letter-spacing: .28em;
    color: var(--gold-deep);
    font-size: 1.05rem;
}
.mg-invite-copy {
    max-width: 22rem;
    margin: 0 auto 1.35rem;
    font-size: 1.12rem;
    line-height: 1.9;
    color: var(--ink-soft);
    font-style: italic;
}
.mg-names-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: .45rem .7rem;
    font-size: clamp(1.9rem, 6vw, 2.6rem);
    font-weight: 400;
    color: var(--ink);
}
html[dir="rtl"] .mg-names-line {
    font-style: normal;
    font-weight: 700;
}
.mg-names-line em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--gold-deep);
    font-size: .7em;
}
.mg-date-hero {
    margin-top: .85rem;
    font-size: 1.3rem;
    color: var(--ink);
}
.mg-time-hero {
    margin-top: .4rem;
    letter-spacing: .14em;
    font-size: .82rem;
    color: var(--sage-deep);
}
html[dir="rtl"] .mg-time-hero { letter-spacing: .04em; }

.mg-cta {
    display: inline-block;
    margin-top: 1.55rem;
    padding: .85rem 1.9rem;
    border-radius: 999px;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 600;
    color: #fbf8f1;
    background: linear-gradient(135deg, var(--sage-deep), var(--sage) 55%, var(--gold-deep));
    box-shadow: 0 14px 32px rgba(85, 99, 72, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}
html[dir="rtl"] .mg-cta {
    letter-spacing: .04em;
    text-transform: none;
    font-size: .95rem;
}
.mg-cta:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(85, 99, 72, .22); }

/* ══════════════════════════════════════
   4. Path steps
══════════════════════════════════════ */
.mg-path-room {
    padding: 2rem 1.25rem 3.2rem;
    background: linear-gradient(180deg, transparent, var(--sage-soft) 45%, transparent);
}
.mg-path {
    list-style: none;
    max-width: 26rem;
    margin: 1.75rem auto 0;
    position: relative;
    padding-inline-start: .25rem;
}
.mg-path::before {
    content: '';
    position: absolute;
    inset-inline-start: 1.35rem;
    top: .5rem;
    bottom: .5rem;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--gold) 12%, var(--sage) 88%, transparent);
    opacity: .55;
}
.mg-path-step {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    margin-bottom: 1.6rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}
.mg-path-step:last-child { margin-bottom: 0; }
.mg-path-room.is-visible .mg-path-step.is-shown,
.mg-path-room.is-open .mg-path-step.is-shown {
    opacity: 1;
    transform: none;
}
.mg-path-stone {
    flex-shrink: 0;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Playfair Display', 'Cinzel', serif;
    font-size: .95rem;
    color: var(--sage-deep);
    background: linear-gradient(160deg, var(--paper), var(--cream));
    box-shadow:
        0 0 0 2px rgba(196, 165, 116, .55),
        0 10px 24px rgba(47, 51, 44, .08);
    position: relative;
    z-index: 1;
}
.mg-path-step h3 {
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--sage-deep);
}
html[dir="rtl"] .mg-path-step h3 {
    letter-spacing: .04em;
    text-transform: none;
    font-size: .95rem;
    font-family: var(--inv-font-ar-body), 'Noto Naskh Arabic', serif;
}
.mg-path-step p {
    margin-top: .35rem;
    font-size: 1.2rem;
}
.mg-path-step small {
    display: block;
    margin-top: .25rem;
    color: var(--ink-soft);
    font-size: .9rem;
}

/* ══════════════════════════════════════
   5. Lantern countdown
══════════════════════════════════════ */
.mg-lantern-room {
    padding: 2rem 1.25rem 3.4rem;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 40% at 50% 20%, rgba(196, 165, 116, .16), transparent 55%),
        var(--ivory);
}
.mg-lanterns {
    margin-top: 1.6rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.mg-count-item {
    position: relative;
    width: 4.8rem;
    padding: 1.35rem .5rem 1rem;
    border-radius: 50% 50% 42% 42% / 48% 48% 52% 52%;
    background:
        radial-gradient(ellipse at 50% 28%, rgba(255, 248, 238, .85), transparent 55%),
        linear-gradient(180deg, rgba(212, 184, 132, .35), var(--paper) 40%, var(--sage-soft));
    box-shadow:
        0 16px 36px rgba(85, 99, 72, .1),
        inset 0 -8px 16px rgba(111, 129, 100, .08);
}
.mg-count-item::before {
    content: '';
    position: absolute;
    top: -.55rem;
    left: 50%;
    width: 1px;
    height: .55rem;
    background: var(--gold-deep);
    transform: translateX(-50%);
}
.mg-count-item::after {
    content: '';
    position: absolute;
    top: -.85rem;
    left: 50%;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--gold);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(196, 165, 116, .5);
}
.mg-count-value {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--sage-deep);
}
.mg-count-label {
    margin-top: .25rem;
    font-size: .62rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
html[dir="rtl"] .mg-count-label {
    letter-spacing: 0;
    text-transform: none;
    font-size: .78rem;
}
.mg-count-done {
    font-style: italic;
    font-size: 1.3rem;
    color: var(--gold-deep);
}

/* ══════════════════════════════════════
   Final door / RSVP wrap
══════════════════════════════════════ */
.mg-final-door {
    padding: 2.5rem 1.25rem 1rem;
    text-align: center;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(111, 129, 100, .16), transparent 58%),
        linear-gradient(180deg, var(--cream), var(--ivory));
}
.mg-final-hint {
    margin: 0 auto 1.5rem;
    max-width: 22rem;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.mg-features-passage .inv-if-section {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Footer ── */
.mg-footer {
    padding: 2.8rem 1.25rem 5rem;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(111, 129, 100, .2), transparent 30%),
        #3a4036;
    color: rgba(251, 248, 242, .78);
    font-size: .92rem;
}
.mg-footer-mono {
    margin-bottom: .7rem;
    font-family: 'Cinzel', serif;
    letter-spacing: .32em;
    color: var(--gold-bright);
    font-size: .95rem;
}
.mg-footer-tag {
    margin-top: .85rem;
    font-size: .78rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(212, 184, 132, .75);
}
html[dir="rtl"] .mg-footer-tag {
    letter-spacing: .06em;
    text-transform: none;
    font-size: .9rem;
}

/* ── Feature sections themed ── */
body.mint-garden .inv-if-section {
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(111, 129, 100, .1), transparent 60%);
}
body.mint-garden .inv-if-title { color: var(--sage-deep); }
body.mint-garden .inv-if-kicker { color: var(--gold-deep); }
body.mint-garden .inv-if-submit,
body.mint-garden .ml-rsvp-submit {
    background: linear-gradient(135deg, var(--sage-deep), var(--gold-deep)) !important;
    color: #fbf8f1 !important;
    border: 1px solid rgba(196, 165, 116, .45);
    border-radius: 999px;
}
body.mint-garden .inv-if-guestbook-entry,
body.mint-garden .inv-if-programme-item,
body.mint-garden .inv-if-notes,
body.mint-garden .inv-if-welcome {
    border-color: rgba(196, 165, 116, .35);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(251, 248, 241, .95), rgba(231, 236, 227, .45));
}
body.mint-garden .inv-if-guestbook-entry strong,
body.mint-garden .inv-if-guestbook-badge {
    color: var(--sage-deep);
}
body.mint-garden .inv-if-polaroid {
    background: #fffdf8;
    box-shadow: 0 14px 32px rgba(47, 51, 44, .1);
}
body.mint-garden .inv-if-polaroid::after {
    color: var(--sage-deep);
}

.inv-if-showcase,
.inv-if-showcase-shell,
.inv-if-section {
    max-width: 100%;
    overflow-x: hidden;
}
.inv-if-showcase-viewport {
    min-width: 0 !important;
    overflow: hidden;
}

/* ── Invitation gate (knock ×3) ── */
@keyframes gate-spin { to { transform: rotate(360deg); } }
.gate-spinner {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(196, 165, 116, .25);
    border-top-color: var(--gold);
    animation: gate-spin .9s linear infinite;
}

#mint-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #2f332c;
    height: var(--app-vh, 100svh);
    transition: opacity .7s ease;
}
#mint-gate.is-fading { opacity: 0; pointer-events: none; }
#mint-gate.is-hidden { display: none; }
#mint-gate video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #2f332c;
}
#mint-gate .gate-loading,
#mint-gate .gate-waiting {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#mint-gate .gate-loading.is-active,
#mint-gate .gate-waiting.is-active { display: flex; }
#mint-gate .gate-loading {
    background: #2f332c;
    color: var(--gold);
    z-index: 3;
}
#mint-gate .gate-loading-text {
    margin-top: 1.4rem;
    font-family: 'Cinzel', 'Amiri', serif;
    font-size: .75rem;
    letter-spacing: .32em;
    text-transform: uppercase;
}
html[dir="rtl"] #mint-gate .gate-loading-text {
    letter-spacing: .06em;
    text-transform: none;
    font-size: .95rem;
}
#mint-gate .gate-waiting {
    z-index: 4;
    cursor: pointer;
    gap: 1.2rem;
    overflow: hidden;
    background: rgba(47, 51, 44, .28);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
#mint-gate .gate-waiting.is-knocking { animation: gate-knock-shake .28s ease; }
@keyframes gate-knock-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
}
.gate-ripple {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    box-shadow: 0 0 0 1.5px rgba(255, 248, 238, .8);
    animation: gate-ripple .7s ease-out forwards;
}
.gate-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 1.5px rgba(196, 165, 116, .7);
    animation: gate-ripple .7s ease-out .12s forwards;
    opacity: 0;
}
@keyframes gate-ripple {
    0% { transform: scale(.4); opacity: .8; }
    100% { transform: scale(16); opacity: 0; }
}
.gate-knocker {
    position: relative;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .3));
}
.gate-knocker-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(251, 248, 242, .9);
    box-shadow: inset 0 0 0 7px rgba(196, 165, 116, .22);
}
.gate-knocker-ball {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff8ee, #e8d5b3 46%, #9a7b4a 100%);
    box-shadow: 0 5px 0 #2f332c, 0 10px 16px rgba(0, 0, 0, .3);
}
#mint-gate .gate-waiting.is-knocking .gate-knocker-ball {
    animation: gate-knocker-hit .28s ease;
}
@keyframes gate-knocker-hit {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(9px) scale(.96); }
}
#mint-gate .gate-waiting .tap-to-open {
    font-family: 'Cinzel', 'Amiri', serif;
    font-size: .78rem;
    color: #fff8ee;
    padding-bottom: .35rem;
    border-bottom: 1px solid rgba(196, 165, 116, .75);
    letter-spacing: .26em;
    text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
html[dir="rtl"] #mint-gate .gate-waiting .tap-to-open {
    letter-spacing: .06em;
    text-transform: none;
    font-size: 1rem;
    font-family: var(--inv-font-ar-body), 'Noto Naskh Arabic', serif;
}
.gate-knock-dots { display: flex; gap: .5rem; }
.gate-knock-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 248, 238, .75);
    background: transparent;
    transition: background .2s ease, transform .2s ease;
}
.gate-knock-dots span.is-lit {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.15);
}
#mint-gate.is-playing .gate-waiting { display: none !important; }

.mint-mute-btn {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    z-index: 40;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: rgba(251, 248, 242, .94);
    color: var(--sage-deep);
    box-shadow: 0 6px 20px rgba(47, 51, 44, .16);
    cursor: pointer;
    font-size: 1rem;
}
html[dir="rtl"] .mint-mute-btn { right: auto; left: 1.4rem; }

@media (min-width: 768px) {
    .mg-letter-body { padding: 3rem 2.2rem 3.2rem; }
    .mg-count-item { width: 5.4rem; }
    .mg-doorway { max-width: 24rem; }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    .mg-letter,
    .mg-door,
    .mg-path-step,
    .mg-doorway-reveal img {
        transition: none !important;
        animation: none !important;
    }
    .mg-leaf { display: none !important; }
    [data-reveal],
    .mg-letter,
    .mg-path-step {
        opacity: 1 !important;
        transform: none !important;
    }
    .mg-door--left { transform: rotateY(-78deg) !important; }
    .mg-door--right { transform: rotateY(78deg) !important; }
}
