/*
 * Template "Mainan Kayu" (Aqiqah & Kelahiran): a modern Scandinavian / Montessori nursery. Natural wood with
 * grain, linen, muted earthy toy colours (terracotta, mustard, sage) and a warm walnut deep colour; calm,
 * clean and gender-neutral. Mobile-first, one column (~460px) on a walnut backdrop on wide screens.
 *
 * Signature pieces (all original CSS / inline SVG, no image files):
 *   the wooden stacking rainbow arch around a photo (sections/_arch), wooden toy blocks drawn in CSS
 *   (.mk-cube, sections/_block), the pull-along duck (sections/_duck), the nursery name sign (sections/_sign),
 *   the linen wall hanging (prayer), the ring-stacker timeline (rundown), the bead-maze wire (story) and the
 *   toy shelf (wishlist).
 *
 * Colours come from the chosen colour variant (template.json → <x-inv.head>):
 *   --inv-primary (terracotta / forest sage / fjord blue / brick rose: names, titles, buttons)
 *   --inv-accent (mustard: the duck, tags, a block)   --inv-toy (the third toy colour: sage or terracotta)
 *   --inv-background (linen)   --inv-text   --inv-deep (walnut: dark sections)   --inv-shine (light accent
 *   on dark)   --inv-wood (natural beech: planks, shelves, the ABC block)
 * Everything else is mixed from those, so a new variant only needs these eight colours.
 *
 * Section tones (set on each section in its partial): .mk-tone--linen (light linen), --sand (warm wood-tinted
 * linen), --deep (walnut with a faint grain), --clay (a full band of the primary colour). Light and dark
 * alternate down the page.
 *
 * Motion only runs with html.inv-anim (set by <x-inv.head> unless the guest prefers reduced motion);
 * without it everything is shown finished.
 *
 * Contents: 1 base · 2 surfaces & section tones · 3 shared pieces (heading, arch, cube, sign, duck, beads) ·
 *           4 cover · 5 sections in page order · 6 forms (RSVP, wishes) · 7 shared components ·
 *           8 screen sizes · 9 motion
 */

/* ---------- 1. base ---------- */
:root {
    /* defaults = the "Walnut Terakota" variant (the variant's colours override these) */
    --inv-primary: #ad4f2a;
    --inv-accent: #d99a2b;
    --inv-toy: #7e9873;
    --inv-background: #f5ede1;
    --inv-text: #2a1c13;
    --inv-deep: #47301f;
    --inv-shine: #f3c57c;
    --inv-wood: #d9b98b;
    --inv-radius: 16px;

    --mk-serif: 'Young Serif', Georgia, 'Times New Roman', serif;
    --mk-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mk-col: 460px;
    --mk-paper: color-mix(in srgb, #fff 74%, var(--inv-background));
    --mk-sand: color-mix(in srgb, var(--inv-wood) 32%, var(--inv-background));
    --mk-title: color-mix(in srgb, var(--inv-primary) 72%, var(--inv-deep));
    --mk-muted: color-mix(in srgb, var(--inv-text) 80%, var(--inv-background));
    --mk-cream-muted: color-mix(in srgb, var(--inv-background) 86%, transparent);
    --mk-ring: color-mix(in srgb, var(--inv-deep) 16%, transparent);
    --mk-walnut: color-mix(in srgb, var(--inv-deep) 82%, var(--inv-wood));
    --mk-drop: 0 22px 40px -22px color-mix(in srgb, var(--inv-deep) 75%, transparent);
    /* text painted in the toy colours stays readable */
    --mk-accent-ink: color-mix(in srgb, var(--inv-accent) 55%, var(--inv-deep));
    --mk-toy-ink: color-mix(in srgb, var(--inv-toy) 62%, var(--inv-deep));

    /* wood grain: long fibres of fractal noise (brown, mostly transparent), tiled */
    --mk-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='260'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.3' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.13 0 0 0 0 0.05 1.35 0 0 0 -0.52'/%3E%3C/filter%3E%3Crect width='520' height='260' filter='url(%23g)'/%3E%3C/svg%3E");
    /* the woven texture of linen: two fine crossing thread lines */
    --mk-linen:
        repeating-linear-gradient(0deg, color-mix(in srgb, var(--inv-deep) 5%, transparent) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--inv-deep) 4%, transparent) 0 1px, transparent 1px 4px);
    /* the brush stroke under the coloured word of a heading */
    --mk-swash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8C28 4 60 3 98 6' fill='none' stroke='%23000' stroke-width='4.4' stroke-linecap='round'/%3E%3C/svg%3E");
    /* natural wood surface (planks, shelves, the dowel, the name sign) */
    --mk-wood-surface:
        var(--mk-grain) 0 0 / 520px 260px,
        linear-gradient(180deg, color-mix(in srgb, var(--inv-wood) 78%, #fff), var(--inv-wood) 45%, color-mix(in srgb, var(--inv-wood) 86%, #6b4320));

    /* colours of the shared components */
    --inv-ambient-1: var(--inv-accent);
    --inv-ambient-2: var(--inv-toy);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--inv-background);
    color: var(--inv-text);
    font-family: var(--mk-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--inv-primary); }

.mk-preview {
    position: sticky; top: 0; z-index: 60; padding: .5rem 1rem; text-align: center;
    background: #fff4d6; color: #6b4e00; font-size: .8125rem;
}

/* the one column of the page; every section paints its own full-width background */
.mk-main { max-width: var(--mk-col); margin: 0 auto; }
.mk-branding { max-width: var(--mk-col); margin: 0 auto; }

.mk-section { position: relative; isolation: isolate; overflow: hidden; padding: 4.25rem 1.4rem; text-align: center; }
.mk-section > p { margin: 0 auto 1rem; max-width: 34ch; }

.mk-arabic { font-family: 'Amiri', 'Traditional Arabic', serif; line-height: 1.9; color: var(--mk-title); }
.mk-amp { font-family: var(--mk-serif); font-weight: 400; }

/* ---------- 2. surfaces & section tones ---------- */

.mk-sign__plank, .mk-cover__shelf, .mk-baby__bar, .mk-hanging__dowel, .mk-stacker__base, .mk-event__card::after,
.mk-shelf__item::after, .mk-stream__card, .mk-birth__ruler, .mk-message__quote cite, .mk-rsvp__card::before,
.mk-vendors__list::before {
    background: var(--mk-wood-surface);
}

/* linen: warm cream, the woven texture, a mustard glow and a toy-colour glow */
.mk-tone--linen {
    background:
        var(--mk-linen),
        radial-gradient(65% 30% at 100% 0%, color-mix(in srgb, var(--inv-accent) 13%, transparent), transparent 75%),
        radial-gradient(70% 34% at 0% 100%, color-mix(in srgb, var(--inv-toy) 14%, transparent), transparent 75%),
        var(--inv-background);
}
/* sand: linen tinted with natural wood */
.mk-tone--sand {
    background:
        var(--mk-linen),
        radial-gradient(80% 40% at 50% 0%, color-mix(in srgb, #fff 40%, transparent), transparent 75%),
        linear-gradient(180deg, var(--mk-sand), color-mix(in srgb, var(--inv-wood) 22%, var(--inv-background)));
}

/* deep: walnut with a glow of the primary and of the accent and a faint grain */
.mk-tone--deep {
    color: var(--inv-background);
    background:
        radial-gradient(90% 45% at 10% 0%, color-mix(in srgb, var(--inv-primary) 34%, transparent), transparent 75%),
        radial-gradient(60% 34% at 100% 100%, color-mix(in srgb, var(--inv-accent) 16%, transparent), transparent 75%),
        var(--inv-deep);
}
.mk-tone--deep::before, .mk-tone--clay::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--inv-shine); opacity: .12;
    -webkit-mask: var(--mk-grain) 0 0 / 520px 260px; mask: var(--mk-grain) 0 0 / 520px 260px;
}
.mk-tone--deep a:not(.inv-button) { color: var(--inv-shine); }
.mk-tone--deep .mk-arabic { color: var(--inv-shine); }

/* clay: a full band of the primary colour */
.mk-tone--clay {
    color: #fff;
    background:
        radial-gradient(80% 60% at 0% 0%, color-mix(in srgb, #fff 14%, transparent), transparent 70%),
        radial-gradient(70% 50% at 100% 100%, color-mix(in srgb, var(--inv-deep) 34%, transparent), transparent 75%),
        var(--inv-primary);
}
.mk-tone--clay::before { background: #fff; opacity: .1; }

/* a client photo behind a section, under a strong gradient of the section's own tone */
.mk-bgphoto { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.mk-bgphoto img { display: block; width: 100%; height: calc(100% + 80px); margin-top: -40px; object-fit: cover; object-position: center 45%; --inv-parallax: 40px; }
.mk-bgphoto::after { content: ''; position: absolute; inset: 0; }
.mk-tone--deep .mk-bgphoto::after {
    background:
        radial-gradient(90% 50% at 20% 10%, color-mix(in srgb, var(--inv-primary) 30%, transparent), transparent),
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-deep) 88%, transparent),
            color-mix(in srgb, var(--inv-deep) 70%, transparent) 45%,
            color-mix(in srgb, var(--inv-deep) 94%, transparent));
}
.mk-tone--deep:has(.mk-bgphoto)::before { opacity: .09; }

/* ---------- 3. shared pieces ---------- */

/* section heading: two tiny painted blocks + a letter-spaced eyebrow, a Young Serif title, the last word coloured */
.mk-heading { margin: 0 0 2rem; }
.mk-heading--left { text-align: left; }
.mk-heading__eyebrow {
    display: inline-flex; align-items: center; gap: .7rem; margin: 0 0 .65rem;
    font-size: .7rem; font-weight: 700; line-height: 1.2; letter-spacing: .24em; text-transform: uppercase; color: var(--mk-title);
}
.mk-heading__eyebrow::before {
    content: ''; width: 8px; height: 8px; flex: none; margin-right: 11px; border-radius: 2px;
    background: var(--inv-accent); box-shadow: 11px 0 0 var(--inv-toy);
}
.mk-heading__title {
    margin: 0; font-family: var(--mk-serif); font-size: 2.3rem; font-weight: 400; line-height: 1.1;
    letter-spacing: -.01em; color: var(--inv-text);
}
.mk-heading__title em { position: relative; z-index: 0; display: inline-block; font-style: normal; color: var(--inv-primary); }
.mk-heading__title em::after {
    content: ''; position: absolute; left: -.04em; right: -.06em; bottom: -.08em; height: .32em; z-index: -1;
    background: var(--inv-accent); opacity: .55;
    -webkit-mask: var(--mk-swash) center / 100% 100% no-repeat; mask: var(--mk-swash) center / 100% 100% no-repeat;
}
.mk-tone--deep .mk-heading__eyebrow { color: var(--inv-shine); }
.mk-tone--deep .mk-heading__title { color: #fff; }
.mk-tone--deep .mk-heading__title em { color: var(--inv-shine); }
.mk-tone--deep .mk-heading__title em::after { background: var(--inv-primary); opacity: .9; }
.mk-tone--clay .mk-heading__eyebrow { color: #fff; }
.mk-tone--clay .mk-heading__eyebrow::before { background: var(--inv-shine); box-shadow: 11px 0 0 #fff; }
.mk-tone--clay .mk-heading__title { color: #fff; }
.mk-tone--clay .mk-heading__title em { color: #fff; }
.mk-tone--clay .mk-heading__title em::after { background: var(--inv-accent); opacity: .85; }

/* icons */
.mk-icon { width: 1.15rem; height: 1.15rem; flex: none; }

/* the wooden stacking arch (sections/_arch): nested bands, each a semicircle-topped piece of painted wood;
   --arch-w = the photo's width, --arch-t = one band's thickness */
.mk-arch {
    --arch-w: 12rem; --arch-t: calc(var(--arch-w) * .068); --arch-pos: center 40%;
    position: relative; margin: 0; flex: none;
    filter: drop-shadow(0 16px 14px color-mix(in srgb, var(--inv-deep) 28%, transparent));
}
.mk-arch__band {
    --band: var(--inv-toy);
    position: relative; padding: var(--arch-t) var(--arch-t) 0; border-radius: 999px 999px 0 0;
    background:
        linear-gradient(180deg, rgb(255 255 255 / .22), transparent 30%, rgb(0 0 0 / .08)),
        var(--mk-grain) 0 0 / 520px 260px,
        repeating-radial-gradient(circle at 50% 100%, transparent 0 5px, color-mix(in srgb, var(--inv-deep) 7%, transparent) 5px 6.5px, transparent 6.5px 11px),
        var(--band);
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .35);
}
/* the fine shadow line where one piece rests inside the next */
.mk-arch__band .mk-arch__band {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-deep) 30%, transparent), 0 -2px 5px -1px color-mix(in srgb, var(--inv-deep) 40%, transparent), inset 0 1.5px 0 rgb(255 255 255 / .35);
}
.mk-arch__band > .mk-arch__window { box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-deep) 30%, transparent), 0 -2px 6px -1px color-mix(in srgb, var(--inv-deep) 45%, transparent); }
.mk-arch__band--1 { --band: var(--mk-walnut); }
.mk-arch__band--2 { --band: var(--inv-primary); }
.mk-arch__band--3 { --band: var(--inv-accent); }
.mk-arch__band--4 { --band: var(--inv-toy); }
.mk-arch__window {
    position: relative; width: var(--arch-w); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px 0 0;
    background: var(--inv-wood);
}
.mk-arch__photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--arch-pos); }
/* no photo: natural wood with the painted initial */
.mk-arch__empty {
    position: absolute; inset: 0; display: grid; place-items: center; padding-top: 18%;
    background:
        var(--mk-grain) 0 0 / 520px 260px,
        radial-gradient(70% 45% at 50% 40%, rgb(255 255 255 / .35), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-wood) 80%, #fff), var(--inv-wood));
}
.mk-arch__initial {
    font-family: var(--mk-serif); line-height: 1; font-size: calc(var(--arch-w) * .5); color: var(--mk-title);
    text-shadow: 0 1px 0 rgb(255 255 255 / .5);
}
.mk-arch__initial--many { font-size: calc(var(--arch-w) * .26); white-space: nowrap; }

/* wooden toy blocks drawn in CSS: the element is the front face, ::before the top face, ::after the side face */
.mk-cube {
    --c: var(--inv-wood); --size: 3rem; --d: calc(var(--size) * .17); --ink: #fff;
    position: relative; display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size);
    margin: var(--d) var(--d) 0 0; border-radius: 3px; color: var(--ink);
    background:
        linear-gradient(160deg, rgb(255 255 255 / .2), transparent 55%, rgb(0 0 0 / .06)),
        var(--mk-grain) 0 0 / 260px 130px,
        var(--c);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06), 0 10px 14px -8px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
.mk-cube::before, .mk-cube::after { content: ''; position: absolute; pointer-events: none; }
.mk-cube::before {
    left: 0; bottom: 100%; width: 100%; height: var(--d); transform-origin: 0 100%; transform: skewX(-45deg); border-radius: 2px 2px 0 0;
    background: var(--mk-grain) 0 0 / 260px 130px, color-mix(in srgb, var(--c) 70%, #fff);
}
.mk-cube::after {
    left: 100%; top: 0; width: var(--d); height: 100%; transform-origin: 0 0; transform: skewY(-45deg); border-radius: 0 2px 2px 0;
    background: var(--mk-grain) 0 0 / 260px 130px, color-mix(in srgb, var(--c) 76%, #2a160a);
}
.mk-cube--primary { --c: var(--inv-primary); }
.mk-cube--accent { --c: var(--inv-accent); --ink: var(--inv-deep); }
.mk-cube--toy { --c: var(--inv-toy); }
.mk-cube--deep { --c: var(--mk-walnut); }
.mk-cube--wood { --ink: var(--inv-primary); }
.mk-cube__face { display: grid; place-items: center; width: 100%; height: 100%; }
/* the natural ABC block: a painted border inside the front face */
.mk-cube--wood .mk-cube__face { border-radius: 4px; box-shadow: inset 0 0 0 calc(var(--size) * .08) transparent, inset 0 0 0 calc(var(--size) * .08 + 2px) var(--inv-primary); }
.mk-cube__letter { font-family: var(--mk-serif); font-size: calc(var(--size) * .58); line-height: 1; }
.mk-cube__symbol { width: 52%; height: 52%; fill: currentColor; }

/* the wooden name sign (sections/_sign): a peg, a cord, a natural wood plank with the painted name */
.mk-sign { position: relative; display: inline-flex; flex-direction: column; align-items: center; max-width: 100%; padding-top: 2.5rem; }
.mk-sign__peg {
    position: absolute; top: 0; left: 50%; z-index: 1; width: 1.15rem; height: 1.15rem; margin-left: -.575rem; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-wood) 50%, #fff), var(--inv-wood) 45%, color-mix(in srgb, var(--inv-wood) 60%, #4a2c12));
    box-shadow: 0 3px 5px -1px rgb(0 0 0 / .35);
}
.mk-sign__cord { position: absolute; left: 0; right: 0; top: .45rem; width: 100%; height: calc(100% - .45rem); overflow: visible; pointer-events: none; }
.mk-sign__cord path { stroke: color-mix(in srgb, var(--inv-deep) 55%, var(--inv-wood)); stroke-width: 1.6; }
.mk-sign__plank {
    position: relative; display: flex; flex-direction: column; align-items: center; min-width: min(13rem, 100%); max-width: 100%; margin: 0;
    padding: .9rem 1.7rem .85rem; border-radius: 16px; color: var(--mk-title);
    box-shadow: inset 0 2px 0 rgb(255 255 255 / .55), inset 0 -3px 0 color-mix(in srgb, var(--inv-wood) 70%, #5b3818), 0 18px 26px -16px color-mix(in srgb, var(--inv-deep) 80%, transparent);
}
/* the two drilled holes the cord runs through */
.mk-sign__plank::before, .mk-sign__plank::after {
    content: ''; position: absolute; top: .5rem; width: .42rem; height: .42rem; border-radius: 50%;
    background: color-mix(in srgb, var(--inv-deep) 85%, #000); box-shadow: 0 1px 0 rgb(255 255 255 / .5);
}
.mk-sign__plank::before { left: calc(9% - .21rem); }
.mk-sign__plank::after { right: calc(9% - .21rem); }
.mk-sign__caption {
    display: inline-flex; align-items: center; gap: .5rem; font-size: .66rem; font-weight: 700; line-height: 1.3; letter-spacing: .22em; text-transform: uppercase;
    color: color-mix(in srgb, var(--inv-deep) 88%, var(--inv-wood));
}
.mk-sign__caption::before, .mk-sign__caption::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--inv-toy); }
.mk-sign__caption::after { background: var(--inv-primary); }
.mk-sign__name {
    font-family: var(--mk-serif); font-size: 3rem; line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; text-align: center;
    text-shadow: 0 1px 0 rgb(255 255 255 / .45);
}
.mk-sign__facts { margin-top: .1rem; font-size: .76rem; font-weight: 600; letter-spacing: .06em; color: color-mix(in srgb, var(--inv-deep) 88%, var(--inv-wood)); }

/* the pull-along duck */
.mk-duck { display: block; overflow: visible; }
.mk-duck__beak { fill: var(--inv-primary); }
.mk-duck__cheek { fill: var(--inv-primary); opacity: .28; }
.mk-duck__cord { stroke: color-mix(in srgb, var(--inv-deep) 60%, var(--inv-wood)); }

/* a row of wooden beads on a string (a divider between babies) */
.mk-beads { position: relative; display: flex; justify-content: center; align-items: center; gap: .35rem; margin: 2.4rem auto; }
.mk-beads::before { content: ''; position: absolute; left: 18%; right: 18%; top: 50%; height: 1.5px; background: color-mix(in srgb, var(--inv-deep) 30%, transparent); }
.mk-beads span {
    position: relative; width: .9rem; height: .9rem; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / .55), transparent 45%) var(--inv-toy);
}
.mk-beads span:nth-child(2), .mk-beads span:nth-child(5) { background-color: var(--inv-accent); }
.mk-beads span:nth-child(3) { width: 1.1rem; height: 1.1rem; background-color: var(--inv-primary); }
.mk-beads span:nth-child(4) { background-color: var(--inv-wood); }

/* the line-drawn stacking arch (opening, closing) */
.mk-rainbow { display: block; overflow: visible; }
.mk-rainbow path { stroke-width: 4.5; }
.mk-rainbow__a { stroke: var(--inv-primary); }
.mk-rainbow__b { stroke: var(--inv-accent); }
.mk-rainbow__c { stroke: var(--inv-toy); }
.mk-rainbow .mk-rainbow__base { stroke: var(--inv-wood); stroke-width: 2.4; }
.mk-tone--deep .mk-rainbow__a { stroke: color-mix(in srgb, var(--inv-primary) 70%, #fff); }

/* ---------- 4. cover ---------- */
.mk-cover {
    --arch-cover: min(46vw, 12.5rem, 28svh);
    position: fixed; inset: 0; z-index: 30; overflow-x: hidden; overflow-y: auto;
    display: flex; flex-direction: column; align-items: center; justify-content: safe center;
    min-height: 100svh; padding: 2rem 1.4rem 2rem;
    isolation: isolate; color: var(--inv-text);
    background:
        var(--mk-linen),
        radial-gradient(60% 36% at 100% 4%, color-mix(in srgb, var(--inv-accent) 18%, transparent), transparent 72%),
        radial-gradient(70% 38% at 0% 70%, color-mix(in srgb, var(--inv-toy) 18%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-background) 55%, var(--mk-sand));
    transition: opacity .9s ease;
}
.mk-cover__inner { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 400px; text-align: center; transition: transform .9s cubic-bezier(.5, 0, .3, 1); }

.mk-cover__title {
    display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem;
    font-size: .72rem; font-weight: 700; line-height: 1.2; letter-spacing: .26em; text-transform: uppercase; color: var(--mk-title);
}
.mk-cover__title::before, .mk-cover__title::after { content: ''; width: 1.4rem; height: 2px; border-radius: 2px; background: var(--inv-accent); }

/* the arch on its shelf, the blocks at its left foot, the duck at its right foot */
.mk-cover__art {
    --outer: calc(var(--arch-cover) * 1.544); --shelf: .8rem;
    position: relative; display: flex; flex-direction: column; align-items: center; width: 100%;
}
.mk-arch--cover { --arch-w: var(--arch-cover); --arch-pos: 52% 50%; }
.mk-cover__shelf {
    position: relative; z-index: 1; display: block; width: min(calc(var(--outer) + 5rem), 100%); height: var(--shelf); border-radius: 4px;
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .55), 0 12px 16px -10px color-mix(in srgb, var(--inv-deep) 80%, transparent);
}
.mk-cover__blocks {
    position: absolute; z-index: 2; bottom: var(--shelf); left: calc(50% - var(--outer) / 2 - var(--arch-cover) * .14);
    display: flex; flex-direction: column; align-items: flex-start;
}
.mk-cover__block { --size: calc(var(--arch-cover) * .29); }
.mk-cover__block--top { --size: calc(var(--arch-cover) * .19); margin-left: calc(var(--arch-cover) * .05); transform: rotate(-6deg); }
.mk-cover__duck {
    position: absolute; z-index: 2; bottom: calc(var(--shelf) - var(--arch-cover) * .03); right: calc(50% - var(--outer) / 2 - var(--arch-cover) * .22);
    width: calc(var(--arch-cover) * .46); height: auto;
    filter: drop-shadow(0 8px 6px color-mix(in srgb, var(--inv-deep) 35%, transparent));
}

.mk-cover__name {
    margin: 1.05rem 0 0; font-family: var(--mk-serif); font-size: 3rem; font-weight: 400; line-height: 1.05; letter-spacing: -.01em;
    color: var(--mk-title); overflow-wrap: anywhere;
}
.mk-cover--many .mk-cover__name { font-size: 2.3rem; }
.mk-cover__date { margin: .35rem 0 0; font-size: .95rem; font-weight: 600; letter-spacing: .02em; color: var(--inv-deep); }
.mk-cover__quote { max-width: 30ch; margin: .3rem 0 0; font-size: .92rem; line-height: 1.45; color: var(--mk-muted); }
.mk-cover__guest {
    width: min(100%, 19rem); margin: .95rem 0 0; padding: .5rem 1rem .6rem; border-radius: 16px; background: var(--mk-paper);
    box-shadow: inset 0 0 0 1.5px var(--mk-ring), 0 10px 22px -16px color-mix(in srgb, var(--inv-deep) 60%, transparent);
}
.mk-cover__guest p { margin: 0; font-size: .64rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); }
.mk-cover__guest-name { display: block; font-family: var(--mk-serif); font-size: 1.18rem; line-height: 1.3; color: var(--inv-text); overflow-wrap: anywhere; }
.mk-cover__open {
    margin-top: 1rem; min-height: 3rem; padding: .7rem 1.9rem; font-weight: 600; letter-spacing: .02em;
    background: var(--inv-primary); color: #fff; border-radius: 999px;
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .25), 0 4px 0 color-mix(in srgb, var(--inv-primary) 60%, var(--inv-deep)), 0 14px 22px -12px color-mix(in srgb, var(--inv-primary) 80%, transparent);
}

/* opening: the cover fades and lifts away (never blocks: .9s) */
.mk-cover--leave { transition: opacity .9s ease .1s; }
.mk-cover--gone { opacity: 0; }
.mk-cover--gone .mk-cover__inner { transform: translateY(-2.5rem); }

/* ---------- 5. sections ---------- */

/* opening: an arch-shaped panel (wood line + an offset accent line) over the faint photo */
.mk-opening { padding: 4.4rem 1.6rem 4.6rem; }
.mk-opening__frame {
    position: relative; max-width: 22rem; margin: 0 auto; padding: 3rem 1.5rem 2.6rem;
    border: 1.5px solid color-mix(in srgb, var(--inv-wood) 85%, transparent); border-radius: 12rem 12rem 22px 22px;
    background: color-mix(in srgb, var(--inv-deep) 46%, transparent);
}
.mk-opening__frame::before {
    content: ''; position: absolute; inset: 0; z-index: -1; transform: translate(9px, 9px); pointer-events: none;
    border: 1.5px solid color-mix(in srgb, var(--inv-accent) 55%, transparent); border-radius: inherit;
}
.mk-opening__rainbow { width: 5.6rem; margin: 0 auto 1rem; }
.mk-opening__basmalah { margin: 0 0 .7rem; font-size: 1.85rem; }
.mk-opening__greeting { margin: 0 auto .8rem; max-width: 22ch; font-family: var(--mk-serif); font-size: 1.32rem; line-height: 1.35; color: #fff; }
.mk-opening__message { margin: 0 auto; max-width: 28ch; color: var(--mk-cream-muted); }

/* baby: the peg rail and name sign, the arch photo + full name, the birth data, the name meaning, the parents */
.mk-babies .mk-heading { margin-bottom: 1.3rem; }
.mk-baby__rail { position: relative; display: flex; justify-content: center; }
.mk-baby__bar {
    position: absolute; top: .3rem; left: -.4rem; right: -.4rem; height: .55rem; border-radius: 999px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 6px 8px -5px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
/* two more pegs on the rail */
.mk-baby__bar::before, .mk-baby__bar::after {
    content: ''; position: absolute; top: 50%; width: .95rem; height: .95rem; margin-top: -.475rem; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-wood) 50%, #fff), var(--inv-wood) 45%, color-mix(in srgb, var(--inv-wood) 60%, #4a2c12));
    box-shadow: 0 3px 5px -1px rgb(0 0 0 / .35);
}
.mk-baby__bar::before { left: 10%; }
.mk-baby__bar::after { right: 10%; }
.mk-baby--many .mk-sign__name { font-size: 2.4rem; }

.mk-baby__intro { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 1.2rem; margin-top: 2.2rem; text-align: left; }
.mk-arch--baby { --arch-w: min(8.6rem, 34vw); --arch-pos: center 40%; }
.mk-baby--many .mk-arch--baby { --arch-w: min(7rem, 28vw); }
.mk-baby__who { min-width: 0; padding-bottom: .2rem; }
.mk-baby__label { margin: 0; font-size: .64rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--mk-muted); }
.mk-baby__name {
    margin: .2rem 0 .7rem; font-family: var(--mk-serif); font-size: 1.5rem; font-weight: 400; line-height: 1.18;
    color: var(--mk-title); overflow-wrap: anywhere; text-wrap: balance;
}
.mk-baby__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.mk-baby__chip {
    padding: .2rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.4;
    color: var(--inv-deep); background: color-mix(in srgb, var(--inv-toy) 26%, var(--inv-background));
}
.mk-baby__chip--accent { background: color-mix(in srgb, var(--inv-accent) 45%, var(--inv-background)); }

/* the birth data: a linen card under a wooden ruler, big numerals in the toy colours */
.mk-birth {
    position: relative; margin: 1.8rem 0 0; overflow: hidden; border-radius: 20px; text-align: left;
    background: var(--mk-linen), var(--mk-paper);
    box-shadow: 0 0 0 1.5px var(--mk-ring), var(--mk-drop);
}
.mk-birth__ruler {
    position: relative; margin: 0; padding: .5rem 1.1rem 1.15rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-deep);
    box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--inv-wood) 60%, #4a2c12);
}
/* the ruler's tick marks: short every 6px, long every 30px */
.mk-birth__ruler::after {
    content: ''; position: absolute; left: .6rem; right: .6rem; bottom: 0; height: .75rem;
    background:
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--inv-deep) 70%, transparent) 0 1.5px, transparent 1.5px 30px) 0 100% / 100% 100% no-repeat,
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--inv-deep) 55%, transparent) 0 1px, transparent 1px 6px) 0 100% / 100% 45% no-repeat;
}
.mk-birth__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.mk-birth__cell { min-width: 0; padding: .95rem 1.1rem 1rem; border-bottom: 1.5px dashed var(--mk-ring); }
.mk-birth__cell:nth-child(odd) { border-right: 1.5px dashed var(--mk-ring); }
.mk-birth__cell:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.mk-birth__cell dt { font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-muted); }
.mk-birth__cell dd { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .35rem; margin: .2rem 0 0; }
.mk-birth__num { font-family: var(--mk-serif); font-size: 2.6rem; line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; color: var(--inv-primary); }
.mk-birth__cell:nth-child(2) .mk-birth__num { color: var(--mk-toy-ink); }
.mk-birth__cell:nth-child(3) .mk-birth__num { color: var(--mk-accent-ink); }
.mk-birth__cell:nth-child(4) .mk-birth__num { color: var(--inv-deep); }
.mk-baby--many .mk-birth__num { font-size: 2.2rem; }
.mk-birth__unit { font-size: .95rem; font-weight: 600; color: var(--inv-deep); }
.mk-birth__month { font-size: .76rem; font-weight: 600; line-height: 1.25; color: var(--inv-deep); }
.mk-birth__place {
    display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .8rem 1.1rem .9rem; font-size: .92rem; font-weight: 500;
    background: color-mix(in srgb, var(--inv-toy) 14%, var(--mk-paper));
}
.mk-birth__place .mk-icon { margin-top: .15rem; color: var(--inv-primary); }
.mk-birth__place small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mk-muted); }

/* the name meaning: a sage panel opened by a painted heart block */
.mk-meaning {
    position: relative; margin: 2.2rem 0 0; padding: 1.5rem 1.3rem 1.35rem 1.4rem; border-radius: 22px 22px 22px 6px; text-align: left;
    background: var(--mk-linen), linear-gradient(135deg, color-mix(in srgb, var(--inv-toy) 30%, var(--inv-background)), color-mix(in srgb, var(--inv-toy) 14%, var(--inv-background)));
}
.mk-meaning__block { --size: 2.3rem; position: absolute; top: -1.3rem; right: 1.2rem; transform: rotate(5deg); }
.mk-meaning figcaption { font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--mk-toy-ink); }
.mk-meaning blockquote { margin: .45rem 0 0; font-family: var(--mk-serif); font-size: 1.06rem; line-height: 1.55; color: var(--inv-text); }

/* parents: a walnut block with a tiny ring stacker in the corner */
.mk-parents {
    position: relative; isolation: isolate; overflow: hidden; margin: 2.8rem 0 0; padding: 1.5rem 1.4rem 1.4rem; border-radius: 24px; text-align: left;
    color: var(--inv-background); background: radial-gradient(80% 70% at 0% 0%, color-mix(in srgb, var(--inv-primary) 30%, transparent), transparent 70%), var(--inv-deep);
    box-shadow: var(--mk-drop);
}
.mk-parents::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: var(--inv-shine); opacity: .14;
    -webkit-mask: var(--mk-grain) 0 0 / 520px 260px; mask: var(--mk-grain) 0 0 / 520px 260px;
}
.mk-parents__stacker { position: absolute; z-index: -1; right: 1.1rem; top: 1.1rem; display: flex; flex-direction: column; align-items: center; width: 3.6rem; }
.mk-parents__stacker::before { content: ''; width: .7rem; height: .7rem; margin-bottom: -1px; border-radius: 50%; background: var(--inv-wood); }
.mk-parents__stacker span {
    display: block; height: .62rem; margin-top: 1px; border-radius: 999px;
    background: linear-gradient(180deg, rgb(255 255 255 / .3), transparent 50%, rgb(0 0 0 / .15)) var(--inv-toy);
}
.mk-parents__stacker span:nth-child(1) { width: 40%; }
.mk-parents__stacker span:nth-child(2) { width: 58%; background-color: var(--inv-accent); }
.mk-parents__stacker span:nth-child(3) { width: 76%; background-color: var(--inv-primary); }
.mk-parents__stacker span:nth-child(4) { width: 94%; background-color: var(--inv-wood); }
.mk-parents__label { margin: 0 4rem .35rem 0; font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-shine); }
.mk-parents__names { display: flex; flex-direction: column; margin: 0 4rem 0 0; font-family: var(--mk-serif); font-size: 1.36rem; line-height: 1.3; }
.mk-parents__names .mk-amp { font-size: 1.05rem; color: var(--inv-shine); }
.mk-parents__address {
    display: flex; align-items: flex-start; gap: .5rem; margin: .95rem 0 0; padding-top: .85rem; font-size: .86rem; color: var(--mk-cream-muted);
    border-top: 1px dashed color-mix(in srgb, var(--inv-background) 35%, transparent);
}
.mk-parents__address .mk-icon { margin-top: .15rem; color: var(--inv-shine); }

/* message: on the primary band; a faint line arch in the corner, big words, a wooden tag signature */
.mk-message { text-align: left; padding-right: 1.6rem; }
.mk-message__arch { position: absolute; z-index: -1; right: -3rem; bottom: -.5rem; width: 15rem; stroke: #fff; stroke-width: 7; opacity: .12; }
.mk-message__quote { position: relative; margin: 0; }
.mk-message__mark {
    display: grid; place-items: center; width: 2.9rem; height: 2.9rem; margin: 0 0 1rem; border-radius: 6px; transform: rotate(-4deg);
    background: linear-gradient(160deg, rgb(255 255 255 / .25), transparent 60%), var(--mk-grain) 0 0 / 260px 130px, var(--inv-accent);
    box-shadow: 4px 4px 0 color-mix(in srgb, var(--inv-accent) 60%, var(--inv-deep)), 0 10px 16px -8px rgb(0 0 0 / .4);
}
.mk-message__mark svg { width: 1.5rem; height: 1.2rem; fill: var(--inv-deep); }
.mk-message__quote p { margin: 0; font-family: var(--mk-serif); font-size: 1.3rem; line-height: 1.5; color: #fff; }
.mk-message__quote cite {
    display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.3rem; padding: .4rem 1rem .4rem .55rem; border-radius: 10px;
    font-style: normal; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-deep);
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .5), 0 8px 14px -8px rgb(0 0 0 / .45);
}
.mk-message__quote cite::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: color-mix(in srgb, var(--inv-deep) 85%, #000); box-shadow: 0 1px 0 rgb(255 255 255 / .5); }

/* events: a white card standing on a wooden shelf edge; the photo with an arched top; the date as a block */
.mk-event + .mk-event { margin-top: 3rem; }
.mk-event__card {
    position: relative; margin: 0 6px 12px; padding: 0 0 1.3rem; border-radius: 26px 26px 14px 14px; background: var(--mk-paper); text-align: left;
    box-shadow: 0 0 0 1.5px var(--mk-ring), var(--mk-drop);
}
.mk-event__card::after {
    content: ''; position: absolute; left: -10px; right: -10px; bottom: -12px; height: 12px; border-radius: 3px;
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .5), 0 10px 14px -8px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
.mk-event__media { padding: .55rem .55rem 0; }
.mk-event__photo { display: block; width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; object-position: center 50%; border-radius: 10rem 10rem 16px 16px; }
.mk-event__top { display: flex; align-items: flex-end; gap: 1.15rem; padding: 1.4rem 1.15rem 0; }
.mk-event__media + .mk-event__top { margin-top: -3.2rem; }
/* only the date block rises over the photo; the name always starts below it */
.mk-event__media + .mk-event__top .mk-event__head { padding-top: 3.4rem; }
.mk-event--flip .mk-event__top { flex-direction: row-reverse; text-align: right; }
.mk-event__date { --size: 4.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: .1rem; }
.mk-event__weekday { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.mk-event__day { font-family: var(--mk-serif); font-size: 2.15rem; line-height: 1; }
.mk-event__month { font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mk-event__head { min-width: 0; padding-bottom: .2rem; }
.mk-event__name { margin: 0; font-family: var(--mk-serif); font-size: 1.5rem; font-weight: 400; line-height: 1.15; color: var(--mk-title); }
.mk-event__full { margin: .25rem 0 0; font-size: .8rem; font-weight: 500; color: var(--mk-muted); }
.mk-event__rows { display: grid; gap: .75rem; margin: 1.1rem 1.15rem 0; padding: 1rem 0 0; list-style: none; font-size: .9rem; border-top: 1.5px dashed var(--mk-ring); }
.mk-event__rows li { display: flex; align-items: flex-start; gap: .7rem; }
.mk-event__rows .mk-icon { width: 2.1rem; height: 2.1rem; padding: .45rem; border-radius: 8px; color: var(--inv-deep); background: color-mix(in srgb, var(--inv-toy) 22%, var(--inv-background)); }
.mk-event--flip .mk-event__rows .mk-icon { background: color-mix(in srgb, var(--inv-accent) 28%, var(--inv-background)); }
.mk-event__rows li > span { padding-top: .3rem; }
.mk-event__venue { display: block; font-weight: 600; }
.mk-event__address { display: block; font-size: .85rem; color: var(--mk-muted); }
.mk-event .inv-maps { margin: 1.15rem 1.15rem 0; text-align: center; }
.mk-event .inv-maps .inv-button { width: 100%; font-weight: 600; border-radius: 999px; }
.mk-event .inv-maps__frame { height: 190px; border-radius: 16px; }

/* countdown: four painted wooden blocks; the calendar on a linen card well below the buttons */
.mk-countdown .inv-countdown { gap: clamp(.85rem, 4vw, 1.2rem); padding-top: .6rem; }
.mk-countdown .inv-countdown__item {
    --c: var(--inv-primary); --size: clamp(3.75rem, 17vw, 4.4rem); --d: calc(var(--size) * .17); --ink: #fff;
    position: relative; display: grid; place-content: center; width: var(--size); min-width: 0; height: var(--size); padding: 0;
    margin: var(--d) var(--d) 0 0; border-radius: 3px; color: var(--ink);
    background: linear-gradient(160deg, rgb(255 255 255 / .2), transparent 55%, rgb(0 0 0 / .06)), var(--mk-grain) 0 0 / 260px 130px, var(--c);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06), 0 14px 18px -10px rgb(0 0 0 / .6);
}
.mk-countdown .inv-countdown__item::before, .mk-countdown .inv-countdown__item::after { content: ''; position: absolute; pointer-events: none; }
.mk-countdown .inv-countdown__item::before {
    left: 0; bottom: 100%; width: 100%; height: var(--d); transform-origin: 0 100%; transform: skewX(-45deg); border-radius: 2px 2px 0 0;
    background: var(--mk-grain) 0 0 / 260px 130px, color-mix(in srgb, var(--c) 70%, #fff);
}
.mk-countdown .inv-countdown__item::after {
    left: 100%; top: 0; width: var(--d); height: 100%; transform-origin: 0 0; transform: skewY(-45deg); border-radius: 0 2px 2px 0;
    background: var(--mk-grain) 0 0 / 260px 130px, color-mix(in srgb, var(--c) 76%, #2a160a);
}
.mk-countdown .inv-countdown__item:nth-child(2) { --c: var(--inv-accent); --ink: var(--inv-deep); }
.mk-countdown .inv-countdown__item:nth-child(3) { --c: var(--inv-toy); }
.mk-countdown .inv-countdown__item:nth-child(4) { --c: var(--inv-wood); --ink: var(--inv-deep); }
.mk-countdown .inv-countdown__value { font-family: var(--mk-serif); font-size: 1.7rem; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.mk-countdown .inv-countdown__label { margin-top: .1rem; font-size: .54rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .92; }
.mk-countdown .inv-countdown__done { font-family: var(--mk-serif); font-size: 1.3rem; color: var(--inv-shine); }
.mk-countdown .inv-countdown__actions { flex-direction: column; align-items: center; gap: .6rem; margin-top: 2.2rem; }
.mk-countdown .inv-countdown__actions .inv-button {
    width: min(100%, 17rem); min-height: 2.75rem; padding: .6rem 1rem; font-size: .84rem; font-weight: 600; border-radius: 999px;
    color: var(--inv-background); background: color-mix(in srgb, var(--inv-background) 10%, transparent);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-background) 55%, transparent);
}
.mk-countdown .inv-countdown__actions .inv-button:first-child { color: var(--inv-deep); background: var(--inv-shine); box-shadow: none; }
.mk-countdown .inv-cal {
    --inv-cal-bg: var(--mk-paper); --inv-cal-mark: var(--inv-primary);
    max-width: 19rem; margin: 2.8rem auto 0; border-radius: 20px; background: var(--mk-linen), var(--mk-paper);
    box-shadow: 0 12px 0 -4px var(--inv-wood), 0 22px 40px -24px rgb(0 0 0 / .6);
}
.mk-countdown .inv-cal__month { font-family: var(--mk-serif); font-size: 1.4rem; color: var(--mk-title); }

/* prayer: a linen wall hanging on a wooden dowel */
.mk-prayer { padding-top: 3.4rem; padding-bottom: 4.4rem; }
.mk-hanging { position: relative; max-width: 22rem; margin: 0 auto; padding-top: 3.2rem; }
.mk-hanging__cord { position: absolute; left: 4%; top: 0; width: 92%; height: 3.6rem; overflow: visible; }
.mk-hanging__cord path { stroke: color-mix(in srgb, var(--inv-deep) 55%, var(--inv-wood)); stroke-width: 1.6; }
.mk-hanging__dowel {
    position: relative; z-index: 2; display: block; height: .95rem; margin: 0 -.2rem; border-radius: 999px;
    box-shadow: inset 0 2px 0 rgb(255 255 255 / .5), inset 0 -2px 0 color-mix(in srgb, var(--inv-wood) 60%, #4a2c12), 0 8px 10px -6px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
/* the turned knobs at both ends */
.mk-hanging__dowel::before, .mk-hanging__dowel::after {
    content: ''; position: absolute; top: 50%; width: 1.35rem; height: 1.35rem; margin-top: -.675rem; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-wood) 45%, #fff), var(--inv-wood) 45%, color-mix(in srgb, var(--inv-wood) 55%, #4a2c12));
    box-shadow: 0 3px 5px -1px rgb(0 0 0 / .35);
}
.mk-hanging__dowel::before { left: -.9rem; }
.mk-hanging__dowel::after { right: -.9rem; }
.mk-hanging__linen {
    position: relative; margin: -.45rem .5rem 0; padding: 2.4rem 1.4rem 4rem; color: var(--inv-text);
    background:
        var(--mk-linen),
        radial-gradient(90% 60% at 50% 0%, rgb(255 255 255 / .55), transparent 70%),
        color-mix(in srgb, #fff 55%, var(--inv-background));
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.4rem), 50% 100%, 0 calc(100% - 2.4rem));
}
.mk-hanging { filter: drop-shadow(0 14px 12px color-mix(in srgb, var(--inv-deep) 26%, transparent)); }
/* the stitched running-thread border (sides and top; the foot is left as a clean point) */
.mk-hanging__linen::before {
    content: ''; position: absolute; inset: .7rem .7rem 0; pointer-events: none; opacity: .7;
    background:
        repeating-linear-gradient(90deg, var(--inv-primary) 0 7px, transparent 7px 12px) 0 0 / 100% 1.5px no-repeat,
        repeating-linear-gradient(180deg, var(--inv-primary) 0 7px, transparent 7px 12px) 0 0 / 1.5px calc(100% - 3.4rem) no-repeat,
        repeating-linear-gradient(180deg, var(--inv-primary) 0 7px, transparent 7px 12px) 100% 0 / 1.5px calc(100% - 3.4rem) no-repeat;
}
.mk-hanging__eyebrow {
    display: inline-block; margin: 0 0 1rem; padding: .3rem .9rem; border-radius: 8px; font-size: .68rem; font-weight: 700;
    letter-spacing: .2em; text-transform: uppercase; color: #fff; background: var(--mk-grain) 0 0 / 260px 130px, var(--mk-toy-ink);
}
.mk-prayer__arabic { margin: 0 0 1rem; font-size: 1.55rem; }
.mk-prayer__text { margin: 0; }
.mk-prayer__text p { margin: 0; font-family: var(--mk-serif); font-size: 1.02rem; line-height: 1.6; }
.mk-prayer__text cite {
    display: inline-block; margin-top: 1rem; padding: .28rem .8rem; border-radius: 8px; font-style: normal; font-size: .72rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--inv-deep); background: var(--inv-accent);
}

/* rundown: the ring stacker — a peg with a knob, rings growing towards the base, the steps beside */
.mk-stacker { --peg-x: 3.3rem; position: relative; text-align: left; }
.mk-stacker::before {
    content: ''; position: absolute; left: calc(var(--peg-x) - 6px); top: .6rem; bottom: 1rem; width: 12px; border-radius: 6px;
    background: var(--mk-grain) 0 0 / 260px 130px, linear-gradient(90deg, color-mix(in srgb, var(--inv-wood) 60%, #4a2c12), color-mix(in srgb, var(--inv-wood) 85%, #fff) 40%, var(--inv-wood) 60%, color-mix(in srgb, var(--inv-wood) 60%, #4a2c12));
    transform-origin: bottom;
}
.mk-stacker__knob {
    position: relative; z-index: 1; display: block; width: 1.7rem; height: 1.7rem; margin: 0 0 .5rem calc(var(--peg-x) - .85rem); border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-wood) 45%, #fff), var(--inv-wood) 45%, color-mix(in srgb, var(--inv-wood) 55%, #4a2c12));
    box-shadow: 0 4px 6px -2px rgb(0 0 0 / .5);
}
.mk-stacker__list { position: relative; margin: 0; padding: 0; list-style: none; }
.mk-stacker__item { position: relative; display: grid; grid-template-columns: calc(var(--peg-x) * 2) minmax(0, 1fr); align-items: center; column-gap: .55rem; padding: 0 0 .65rem; }
.mk-stacker__ring {
    --c: var(--inv-toy); --ink: #fff;
    position: relative; justify-self: center; display: grid; place-items: center;
    width: calc(3.7rem + var(--ring) * .42rem); height: 2.5rem; border-radius: 999px;
    font-size: .86rem; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--ink);
    background:
        radial-gradient(60% 50% at 40% 22%, rgb(255 255 255 / .38), transparent 70%),
        linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .2)),
        var(--mk-grain) 0 0 / 260px 130px,
        var(--c);
    box-shadow: 0 8px 12px -6px rgb(0 0 0 / .55), inset 0 -2px 0 rgb(0 0 0 / .12);
}
.mk-stacker__ring--toy { --c: color-mix(in srgb, var(--inv-toy) 88%, var(--inv-deep)); }
.mk-stacker__ring--accent { --c: var(--inv-accent); --ink: var(--inv-deep); }
.mk-stacker__ring--primary { --c: var(--inv-primary); }
.mk-stacker__ring--wood { --c: var(--inv-wood); --ink: var(--inv-deep); }
.mk-stacker__body { padding: .7rem 1rem .75rem; border-radius: 16px; background: color-mix(in srgb, var(--inv-background) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-background) 16%, transparent); }
.mk-stacker__body h3 { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; color: #fff; }
.mk-stacker__body p { margin: .15rem 0 0; font-size: .86rem; color: var(--mk-cream-muted); }
.mk-stacker__base {
    position: relative; z-index: 1; display: block; width: calc(var(--peg-x) * 2 + 1.4rem); height: 1rem; margin: .1rem 0 0 -.7rem; border-radius: 6px 6px 4px 4px;
    box-shadow: inset 0 2px 0 rgb(255 255 255 / .5), 0 10px 14px -6px rgb(0 0 0 / .55);
}

/* story: a bead-maze wire on the left, a bead for every chapter, photos in a one-band arch */
.mk-story__list { position: relative; display: grid; gap: 2.2rem; margin: 0; padding: 0 0 0 2.2rem; list-style: none; text-align: left; }
.mk-story__list::before {
    content: ''; position: absolute; left: .7rem; top: .6rem; bottom: .6rem; width: 3px; border-radius: 3px;
    background: color-mix(in srgb, var(--inv-deep) 55%, var(--inv-wood));
}
.mk-story__item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.1rem; }
.mk-story__item--flip { grid-template-columns: minmax(0, 1fr) auto; }
.mk-story__item--flip .mk-arch { order: 2; }
.mk-story__bead {
    --c: var(--inv-primary);
    position: absolute; left: -2.25rem; top: .3rem; width: 1.45rem; height: 1.45rem; border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, rgb(255 255 255 / .6), transparent 40%), radial-gradient(circle at 60% 70%, rgb(0 0 0 / .18), transparent 60%), var(--c);
    box-shadow: 0 4px 6px -2px color-mix(in srgb, var(--inv-deep) 60%, transparent);
}
.mk-story__bead--accent { --c: var(--inv-accent); }
.mk-story__bead--toy { --c: var(--inv-toy); }
.mk-arch--story { --arch-w: min(7.4rem, 30vw); --arch-t: calc(var(--arch-w) * .08); }
.mk-arch--story .mk-arch__band--4 { --band: var(--inv-wood); }
.mk-story__when {
    display: inline-block; padding: .22rem .7rem; border-radius: 7px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--inv-deep); background: color-mix(in srgb, var(--inv-accent) 55%, var(--inv-background));
}
.mk-story__body h3 { margin: .5rem 0 0; font-family: var(--mk-serif); font-size: 1.28rem; font-weight: 400; line-height: 1.22; color: var(--mk-title); }
.mk-story__body p { margin: .4rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--mk-muted); }
.mk-story__item--text { display: block; padding: 1.1rem 1.2rem 1.15rem; border-radius: 18px; background: var(--mk-linen), var(--mk-sand); box-shadow: inset 0 0 0 1px var(--mk-ring); }
.mk-story__item--text .mk-story__bead { top: 1.15rem; }

/* gallery: the first photo tall with an arched top, every photo with a fine natural wood rim */
.mk-gallery .inv-gallery { gap: .65rem; }
.mk-gallery .inv-gallery__item { border-radius: 14px; box-shadow: 0 0 0 3px var(--inv-wood), 0 16px 28px -18px rgb(0 0 0 / .7); }
.mk-gallery .inv-gallery__item:first-child { grid-row: span 2; aspect-ratio: auto; border-radius: 999px 999px 14px 14px; box-shadow: 0 0 0 3px var(--inv-accent), 0 16px 28px -18px rgb(0 0 0 / .7); }

/* live streaming: a natural wood card like a toy radio, a painted play block */
.mk-stream__card {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem 1.1rem; max-width: 24rem; margin: 0 auto; padding: 1.5rem 1.35rem 1.4rem;
    border-radius: 24px; color: var(--inv-deep); text-align: left;
    box-shadow: inset 0 2px 0 rgb(255 255 255 / .55), inset 0 -3px 0 color-mix(in srgb, var(--inv-wood) 70%, #5b3818), var(--mk-drop);
}
.mk-stream__icon { --size: 3.1rem; margin-left: .1rem; }
.mk-stream__icon .mk-icon { width: 1.6rem; height: 1.6rem; }
.mk-stream__title { margin: 0 0 .15rem; font-family: var(--mk-serif); font-size: 1.55rem; font-weight: 400; line-height: 1.1; color: var(--mk-title); }
.mk-stream__text p { margin: 0; font-size: .88rem; color: var(--inv-deep); }
.mk-stream__text .mk-stream__note { margin-top: .3rem; font-weight: 700; color: var(--mk-title); }
.mk-stream__button { grid-column: 1 / -1; min-height: 2.75rem; border-radius: 999px; color: #fff !important; background: var(--inv-primary) !important; font-weight: 600; }

/* RSVP card: linen with a wooden ruler strip on top */
.mk-rsvp__card {
    position: relative; overflow: hidden; padding: 2.3rem 1.15rem 1.4rem; border-radius: 22px; color: var(--inv-text);
    background: var(--mk-linen), var(--mk-paper);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-wood) 50%, transparent), 0 22px 40px -24px rgb(0 0 0 / .6);
}
.mk-rsvp__card::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: .95rem;
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--inv-wood) 60%, #4a2c12);
}
.mk-rsvp__card::after {
    content: ''; position: absolute; left: .5rem; right: .5rem; top: .45rem; height: .5rem;
    background:
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--inv-deep) 70%, transparent) 0 1.5px, transparent 1.5px 30px) 0 100% / 100% 100% no-repeat,
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--inv-deep) 55%, transparent) 0 1px, transparent 1px 6px) 0 100% / 100% 50% no-repeat;
}
.mk-rsvp__intro { margin: 0 auto 1.1rem; max-width: 30ch; font-size: .9rem; color: var(--mk-muted); }
.mk-rsvp__sent { margin-bottom: 1rem; }
.mk-rsvp__check { display: block; width: 4.25rem; height: 4.25rem; margin: 0 auto .5rem; }
.mk-rsvp__check circle { fill: var(--mk-toy-ink); }
.mk-rsvp__check path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
html.inv-anim .mk-rsvp__sent .mk-rsvp__check { animation: mk-bounce .8s cubic-bezier(.34, 1.56, .64, 1) both; }
html.inv-anim .mk-rsvp__sent .mk-rsvp__check path { animation: mk-draw .45s ease-out .35s both; }
.mk-rsvp__thanks { margin: 0; font-family: var(--mk-serif); font-size: 1.6rem; color: var(--mk-title); }
.mk-rsvp__line { margin: .1rem 0 0; font-size: .9rem; color: var(--mk-muted); }
.mk-rsvp .inv-rsvp__deadline { margin: 0 0 1rem; font-size: .84rem; font-weight: 600; color: var(--inv-primary); }

/* gift: linen cards hung from a wooden strip with two drilled holes, two per row; the address below */
.mk-gift__intro { color: var(--mk-cream-muted); }
.mk-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1.3rem; }
.mk-gift .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mk-gift .inv-gift__account,
.mk-gift .inv-gift__address {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; margin: 0; overflow: hidden;
    padding: 2.1rem .75rem 1rem; border-radius: 16px; color: var(--inv-text); background: var(--mk-linen), var(--mk-paper);
    box-shadow: 0 18px 30px -20px rgb(0 0 0 / .6);
}
.mk-gift .inv-gift__account::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1.2rem;
    background:
        radial-gradient(circle, color-mix(in srgb, var(--inv-deep) 85%, #000) 3px, transparent 3.6px) 30% center / 1.2rem 1.2rem no-repeat,
        radial-gradient(circle, color-mix(in srgb, var(--inv-deep) 85%, #000) 3px, transparent 3.6px) 70% center / 1.2rem 1.2rem no-repeat,
        var(--mk-wood-surface);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--inv-wood) 60%, #4a2c12);
}
.mk-gift .inv-gift__account p, .mk-gift .inv-gift__address p { margin: 0; }
.mk-gift .inv-gift__bank { font-weight: 700; font-size: .85rem; color: var(--mk-title); }
.mk-gift .inv-gift__logo { height: 1.6rem; padding: .2rem .5rem; border-radius: .4rem; background: #fff; }
.mk-gift .inv-gift__logo img { max-width: 5rem; }
.mk-gift .inv-gift__number {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .98rem; font-weight: 700;
    letter-spacing: .03em; line-height: 1.3; overflow-wrap: anywhere; color: var(--inv-text);
}
.mk-gift .inv-gift__holder { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-muted); overflow-wrap: anywhere; }
.mk-gift .inv-button { margin-top: .35rem; min-height: 2.25rem; padding: .35rem .9rem; font-size: .74rem; font-weight: 600; border-radius: 999px; }
.mk-gift .inv-gift__address { margin-top: .9rem; padding-top: 1.1rem; font-size: .875rem; box-shadow: 0 12px 0 -5px var(--inv-wood), 0 18px 30px -20px rgb(0 0 0 / .6); overflow: visible; }
.mk-gift .inv-gift__address .inv-gift__holder { font-size: .72rem; }

/* wishlist: toy-shelf cards, two per wooden shelf */
.mk-wishlist__intro { color: var(--mk-muted); font-size: .92rem; }
.mk-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1.1rem; margin: 1.6rem 0 0; padding: 0 .3rem .8rem; list-style: none; text-align: left; }
.mk-shelf__item {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 1.2rem .9rem 1rem;
    border-radius: 14px 14px 4px 4px; background: var(--mk-linen), var(--mk-paper);
    box-shadow: 0 0 0 1.5px var(--mk-ring), 0 12px 18px -14px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
/* the shelf plank under the card; the planks of a row meet in the gap */
.mk-shelf__item::after {
    content: ''; position: absolute; left: -.6rem; right: -.6rem; bottom: -.75rem; height: .75rem; border-radius: 2px;
    box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .5), 0 9px 10px -6px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
.mk-shelf__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mk-shelf__block { --size: 2.3rem; margin-bottom: .75rem; }
.mk-shelf__photo { display: block; width: 3rem; aspect-ratio: 4 / 5; margin-bottom: .7rem; object-fit: cover; border-radius: 999px 999px 4px 4px; box-shadow: 0 0 0 2.5px var(--inv-wood); }
.mk-shelf p { margin: 0; }
.mk-shelf__name { font-family: var(--mk-serif); font-size: 1.04rem; line-height: 1.3; color: var(--mk-title); overflow-wrap: anywhere; }
.mk-shelf__note { margin-top: .2rem !important; font-size: .82rem; line-height: 1.45; color: var(--mk-muted); }
.mk-shelf__shop { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.2rem; margin-top: .25rem; font-size: .8rem; font-weight: 700; text-decoration: none; }
.mk-shelf__shop .mk-icon { width: 1rem; height: 1rem; }

/* co-hosts: the names in Young Serif on the primary band, split by tiny bead rows */
.mk-cohosts__list { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.mk-cohosts__list li { max-width: 26ch; font-family: var(--mk-serif); font-size: 1.14rem; line-height: 1.35; color: #fff; }
.mk-cohosts__list li + li::before {
    content: ''; display: block; width: 2.4rem; height: 8px; margin: 0 auto .6rem;
    background:
        radial-gradient(circle, var(--inv-shine) 3.4px, transparent 4px) 0 50% / 8px 8px no-repeat,
        radial-gradient(circle, #fff 3.4px, transparent 4px) 50% 50% / 8px 8px no-repeat,
        radial-gradient(circle, var(--inv-shine) 3.4px, transparent 4px) 100% 50% / 8px 8px no-repeat;
}

/* contacts: rows with the initial on a painted block and a WhatsApp button */
.mk-contacts__list { display: grid; gap: .85rem; max-width: 24rem; margin: 0 auto; }
.mk-contact {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .7rem .6rem .6rem .75rem; border-radius: 18px;
    background: var(--mk-paper); text-align: left; box-shadow: 0 0 0 1.5px var(--mk-ring), 0 10px 18px -14px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
.mk-contact__avatar { --size: 2.5rem; }
.mk-contact p { margin: 0; }
.mk-contact__name { font-weight: 600; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.mk-contact__role { font-size: .78rem; color: var(--mk-muted); }
.mk-contact__phone { font-size: .85rem; }
.mk-contact__button { min-height: 2.5rem; padding: .45rem .95rem; font-size: .8rem; font-weight: 600; border-radius: 999px; }
.mk-contact__button .mk-icon { width: 1.05rem; height: 1.05rem; }

/* health protocol: white chips */
.mk-protocol__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.mk-protocol__list li {
    display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px; font-size: .84rem; font-weight: 500;
    background: var(--mk-paper); box-shadow: inset 0 0 0 1px var(--mk-ring);
}
.mk-protocol__list .mk-icon { width: 1rem; height: 1rem; color: var(--inv-primary); }
.mk-protocol__note { font-size: .88rem; color: var(--mk-muted); }

/* vendors: a white card with a natural wood top edge, rows split by dashed lines */
.mk-vendors__list {
    position: relative; overflow: hidden; max-width: 24rem; margin: 0 auto; padding: .9rem 1.15rem .3rem; list-style: none; border-radius: 20px;
    background: var(--mk-paper); box-shadow: 0 0 0 1.5px var(--mk-ring), var(--mk-drop);
}
.mk-vendors__list::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: .55rem; }
.mk-vendor { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 0; text-align: left; border-bottom: 1.5px dashed var(--mk-ring); }
.mk-vendor:last-child { border-bottom: 0; }
.mk-vendor__text { display: flex; flex-direction: column; min-width: 0; }
.mk-vendor__role { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.mk-vendor__name { font-family: var(--mk-serif); font-size: 1.08rem; line-height: 1.3; color: var(--inv-text); overflow-wrap: anywhere; }
.mk-vendor__link {
    display: inline-flex; align-items: center; gap: .3rem; flex: none; min-height: 2.2rem; padding: .3rem .7rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; text-decoration: none; background: color-mix(in srgb, var(--inv-toy) 22%, var(--inv-background)); color: var(--inv-deep);
}
.mk-vendor__link .mk-icon { width: .95rem; height: .95rem; }

/* closing: the full photo fading into walnut, the line arch, the thanks and the name sign */
.mk-closing { padding: 3rem 1.6rem 1.8rem; }
.mk-closing--photo { padding-top: 0; }
.mk-closing__photo { position: relative; z-index: -1; height: min(56svh, 27rem); margin: 0 -1.6rem; overflow: hidden; }
.mk-closing__photo img { display: block; width: 100%; height: calc(100% + 60px); margin-top: -30px; object-fit: cover; object-position: center 30%; --inv-parallax: 30px; }
.mk-closing__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 38%, color-mix(in srgb, var(--inv-deep) 55%, transparent) 66%, var(--inv-deep) 97%);
}
.mk-closing__body { position: relative; }
.mk-closing--photo .mk-closing__body { margin-top: -5.8rem; }
.mk-closing__rainbow { width: 3.8rem; margin: 0 auto .6rem; }
.mk-closing__eyebrow { margin: 0 0 .35rem; font-size: .7rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--inv-shine); }
.mk-closing__title { margin: 0 0 .7rem; font-family: var(--mk-serif); font-size: clamp(1.9rem, 8.5vw, 2.4rem); font-weight: 400; line-height: 1.05; color: #fff; }
.mk-closing__title em { font-style: normal; color: var(--inv-shine); }
.mk-closing__message { margin: 0 auto; max-width: 32ch; font-size: .92rem; line-height: 1.6; color: var(--mk-cream-muted); }
.mk-closing__salam { margin: .8rem auto 0; max-width: 30ch; font-family: var(--mk-serif); font-size: 1.02rem; line-height: 1.4; color: var(--inv-shine); }
.mk-closing__signature { margin: .7rem auto 0; max-width: 30ch; font-size: .86rem; color: var(--mk-cream-muted); }
.mk-closing__sign { margin-top: .9rem; }
.mk-closing__sign .mk-sign__name { font-size: 2rem; }
.mk-closing__sign .mk-sign__cord path { stroke: color-mix(in srgb, var(--inv-wood) 75%, transparent); }

/* ---------- 6. forms (shared RSVP + wishes, restyled) ---------- */
.mk-main .inv-form { gap: 1rem; text-align: left; }
.mk-main .inv-form label, .mk-main .inv-form__choices legend { font-size: .82rem; font-weight: 600; color: var(--inv-text); }
.mk-main .inv-form input:not([type=radio]):not([type=checkbox]),
.mk-main .inv-form select,
.mk-main .inv-form textarea {
    width: 100%; min-height: 2.9rem; padding: .7rem .9rem; border: 0; border-radius: 12px;
    font: 400 .95rem/1.4 var(--mk-sans); color: var(--inv-text); background: #fff;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-deep) 20%, transparent);
    transition: box-shadow .2s ease;
}
.mk-main .inv-form select {
    appearance: none; padding-right: 2.4rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right .8rem center / 1.1rem no-repeat;
}
.mk-main .inv-form input:not([type=radio]):focus-visible,
.mk-main .inv-form select:focus-visible,
.mk-main .inv-form textarea:focus-visible {
    outline: none; box-shadow: inset 0 0 0 2px var(--inv-primary), 0 0 0 4px color-mix(in srgb, var(--inv-accent) 40%, transparent);
}
.mk-main .inv-form button[type=submit] { width: 100%; min-height: 3rem; font-weight: 600; border-radius: 999px; box-shadow: 0 4px 0 color-mix(in srgb, var(--inv-primary) 60%, var(--inv-deep)), 0 12px 22px -12px color-mix(in srgb, var(--inv-primary) 80%, transparent); }
.mk-main .inv-form .inv-button--outline { width: 100%; min-height: 2.75rem; border-radius: 999px; }
.mk-main .inv-form__notice { text-align: center; }

/* the three answers as big cards with icons (the radio dot is hidden but still focusable) */
.mk-rsvp .inv-form__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.mk-rsvp .inv-form__choices legend { margin-bottom: .5rem; padding: 0; }
.mk-rsvp .inv-form__choices label {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .45rem;
    min-height: 5.4rem; padding: .85rem .3rem .75rem; border-radius: 14px; cursor: pointer; text-align: center;
    font-size: .84rem; font-weight: 600; line-height: 1.2; color: var(--inv-text); background: #fff;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-deep) 18%, transparent);
    transition: background-color .25s ease, color .25s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.mk-rsvp .inv-form__choices input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* icon: a tinted square block (::before) with a check, a cross or a question mark on it (::after, a mask in the text colour) */
.mk-rsvp .inv-form__choices label::before {
    content: ''; width: 2.1rem; height: 2.1rem; border-radius: 6px; flex: none; background: color-mix(in srgb, var(--inv-toy) 26%, var(--inv-background));
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .25s ease;
}
.mk-rsvp .inv-form__choices label::after {
    content: ''; position: absolute; left: 50%; top: 1.3rem; width: 1.2rem; height: 1.2rem; margin-left: -.6rem;
    background: currentColor; color: var(--inv-primary); pointer-events: none;
    -webkit-mask: var(--mk-choice-icon) center / contain no-repeat; mask: var(--mk-choice-icon) center / contain no-repeat;
}
.mk-rsvp .inv-form__choices label:nth-of-type(1) {
    --mk-choice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.mk-rsvp .inv-form__choices label:nth-of-type(2) {
    --mk-choice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}
.mk-rsvp .inv-form__choices label:nth-of-type(3) {
    --mk-choice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M8.5 8.8a3.5 3.5 0 1 1 4.9 3.2c-.9.4-1.4 1.1-1.4 2v.5M12 19h.01'/%3E%3C/svg%3E");
}
.mk-rsvp .inv-form__choices label:has(input:checked) {
    color: #fff; background: var(--inv-primary); transform: translateY(-3px);
    box-shadow: 0 4px 0 color-mix(in srgb, var(--inv-primary) 60%, var(--inv-deep)), 0 12px 24px -12px color-mix(in srgb, var(--inv-primary) 80%, transparent);
}
.mk-rsvp .inv-form__choices label:has(input:checked)::before { background-color: rgb(255 255 255 / .2); transform: scale(1.1) rotate(-6deg); }
.mk-rsvp .inv-form__choices label:has(input:checked)::after { color: #fff; }
.mk-rsvp .inv-form__choices label:has(input:focus-visible) { outline: 2px solid var(--inv-accent); outline-offset: 3px; }

/* wishes: the form on a white card with a wood shadow, the wishes in a scroll box of about three */
.mk-wishes .inv-wishes { --inv-wishes-height: 20rem; }
.mk-wishes .inv-form {
    padding: 1.3rem 1.1rem; border-radius: 20px; background: #fff;
    box-shadow: 0 12px 0 -5px var(--inv-wood), 0 18px 30px -22px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
.mk-wishes .inv-wishes__list { margin-top: 1.6rem; }
.mk-wishes .inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    padding: .55rem; border-radius: 18px; background: color-mix(in srgb, #fff 45%, transparent); box-shadow: inset 0 0 0 1px var(--mk-ring);
}
.mk-wishes .inv-wish { padding: .75rem .9rem; border-radius: 14px; background: #fff; text-align: left; box-shadow: 0 2px 10px rgb(0 0 0 / .05); border-left: 4px solid var(--inv-toy); }
.mk-wishes .inv-wish:nth-child(even) { border-left-color: var(--inv-accent); }
.mk-wishes .inv-wish__name { font-weight: 700; color: var(--mk-title); }
.mk-wishes .inv-wish__message { font-size: .88rem; line-height: 1.5; }
.mk-wishes .inv-wish__time { font-size: .72rem; color: var(--mk-muted); }

/* ---------- 7. shared components ---------- */
.mk-main .inv-button { font-weight: 600; }
body .inv-nav {
    --inv-nav-bg: color-mix(in srgb, #fff 94%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 74%, transparent);
    --inv-nav-active: var(--inv-primary);
    font-family: var(--mk-sans);
}

/* ---------- 8. screen sizes ---------- */

/* short phones: the cover art and type step down so everything fits without scrolling */
@media (max-height: 760px) {
    .mk-cover { --arch-cover: min(46vw, 12rem, 27svh); padding-top: 1.7rem; padding-bottom: 1.7rem; }
    .mk-cover__title { margin-bottom: .9rem; }
    .mk-cover__name { margin-top: .85rem; font-size: 2.7rem; }
    .mk-cover__quote { font-size: .88rem; }
    .mk-cover__guest { margin-top: .8rem; }
    .mk-cover__open { margin-top: .9rem; }
}
@media (max-height: 660px) {
    .mk-cover { --arch-cover: min(46vw, 25.5svh); padding-top: 1.4rem; padding-bottom: 1.4rem; }
    .mk-cover__title { margin-bottom: .75rem; font-size: .66rem; }
    .mk-cover__name { margin-top: .7rem; font-size: 2.35rem; }
    .mk-cover--many .mk-cover__name { font-size: 1.9rem; }
    .mk-cover__date { margin-top: .2rem; font-size: .86rem; }
    .mk-cover__quote { font-size: .82rem; line-height: 1.35; }
    .mk-cover__guest { margin-top: .65rem; padding: .4rem .85rem .5rem; }
    .mk-cover__guest-name { font-size: 1.06rem; }
    .mk-cover__open { min-height: 2.75rem; margin-top: .75rem; padding: .6rem 1.6rem; }
}
/* very short screens (in-app browsers): a smaller arch and quote, so everything fits */
@media (max-height: 600px) {
    .mk-cover { --arch-cover: min(40vw, 20svh); padding-top: 1.1rem; padding-bottom: 1.1rem; }
    .mk-cover__title { margin-bottom: .6rem; }
    .mk-cover__name { margin-top: .55rem; font-size: 2.05rem; }
    .mk-cover__quote { max-width: 34ch; font-size: .78rem; line-height: 1.3; }
    .mk-cover__guest { margin-top: .55rem; }
    .mk-cover__open { margin-top: .65rem; }
}

/* wide screens: the phone-width column on a walnut backdrop with a faint grain */
@media (min-width: 560px) {
    body.mk-body {
        background:
            radial-gradient(70vw 60vh at 50% 0%, color-mix(in srgb, var(--inv-primary) 30%, transparent), transparent 70%),
            var(--inv-deep);
        background-attachment: fixed;
    }
    body.mk-body::before {
        content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .14; background: var(--inv-shine);
        -webkit-mask: var(--mk-grain) 0 0 / 520px 260px; mask: var(--mk-grain) 0 0 / 520px 260px;
    }
    .mk-main { box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
}

/* ---------- 9. motion ---------- */
@keyframes mk-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mk-bounce { 0% { transform: scale(0); } 55% { transform: scale(1.15); } 75% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes mk-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes mk-zoom-out { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes mk-drop { 0% { opacity: 0; transform: translateY(-36px); } 55% { opacity: 1; transform: translateY(0); } 72% { transform: translateY(-7px); } 100% { opacity: 1; transform: none; } }
@keyframes mk-drop-tilt { 0% { opacity: 0; transform: translateY(-36px) rotate(-14deg); } 55% { opacity: 1; transform: translateY(0) rotate(-4deg); } 72% { transform: translateY(-5px) rotate(-7deg); } 100% { opacity: 1; transform: rotate(-6deg); } }
@keyframes mk-roll-in { from { opacity: 0; transform: translateX(70px); } 15% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes mk-spin { from { transform: rotate(240deg); } to { transform: rotate(0); } }
@keyframes mk-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* cover (≤ 2.5 s, once): the arch rises in and its photo settles from a slight zoom (0–1.1 s), the blocks
   drop onto the shelf (.85–1.7 s), the duck rolls in from the right with turning wheels (1–2 s); the text
   follows through its inv-enter delays */
html.inv-anim .mk-arch--cover { animation: mk-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
html.inv-anim .mk-arch--cover .mk-arch__photo { animation: mk-zoom-out 1.1s cubic-bezier(.2, .7, .2, 1) both; }
html.inv-anim .mk-cover__block:not(.mk-cover__block--top) { animation: mk-drop .65s cubic-bezier(.3, .7, .4, 1) .85s both; }
html.inv-anim .mk-cover__block--top { animation: mk-drop-tilt .65s cubic-bezier(.3, .7, .4, 1) 1.05s both; }
html.inv-anim .mk-cover__duck { animation: mk-roll-in 1s cubic-bezier(.2, .7, .3, 1) 1s both; }
html.inv-anim .mk-cover__duck .mk-duck__wheel { animation: mk-spin 1s cubic-bezier(.2, .7, .3, 1) 1s both; }

/* the line arches draw themselves once when their section part is revealed */
html.inv-anim .mk-draw path[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.inv-anim :is(.is-revealed .mk-draw, .mk-draw.is-revealed) path[pathLength] { animation: mk-draw 1s ease-out .2s both; }
html.inv-anim :is(.is-revealed .mk-draw, .mk-draw.is-revealed) .mk-rainbow__b { animation-delay: .35s; }
html.inv-anim :is(.is-revealed .mk-draw, .mk-draw.is-revealed) .mk-rainbow__c { animation-delay: .5s; }

/* scroll-drawn detail (the default, without support, is the finished peg) */
@supports (animation-timeline: view()) {
    html.inv-anim .mk-stacker::before { animation: mk-grow linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
}

@media (prefers-reduced-motion: reduce) {
    .mk-cover, .mk-cover--leave, .mk-cover__inner { transition: none; }
}

/* ---------- 10. intro scene "Rak Mainan Kayu" (scene.json + sections/_scene) ----------
   The intro is teleported to <body>, so only top-level rules reach it. The linen wall, a bead garland, the shelf
   plank, the stacking rainbow dropped band by band, the ABC blocks, the pull-along duck; the name card is the
   wooden name sign hanging from a peg. */
.mk-scene-wall { position: absolute; inset: 0; background: var(--mk-linen), radial-gradient(60% 34% at 100% 6%, color-mix(in srgb, var(--inv-accent) 20%, transparent), transparent 72%), radial-gradient(70% 36% at 0% 62%, color-mix(in srgb, var(--inv-toy) 18%, transparent), transparent 75%), linear-gradient(180deg, var(--inv-background) 50%, var(--mk-sand) 84%, color-mix(in srgb, var(--inv-wood) 40%, var(--inv-background))); }
.mk-scene-garland { overflow: visible; filter: drop-shadow(0 4px 3px color-mix(in srgb, var(--inv-deep) 22%, transparent)); }
.mk-scene-garland path { stroke: color-mix(in srgb, var(--inv-deep) 55%, var(--inv-wood)); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.mk-scene-bead { fill: var(--inv-toy); }
.mk-scene-bead--accent { fill: var(--inv-accent); }
.mk-scene-bead--primary { fill: var(--inv-primary); }
.mk-scene-bead--wood { fill: var(--inv-wood); }
.mk-scene-peg { fill: color-mix(in srgb, var(--inv-wood) 70%, var(--inv-deep)); }
.mk-scene-shelf { position: absolute; inset: 0; border-radius: 4px; background: var(--mk-wood-surface); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .55), 0 14px 18px -10px color-mix(in srgb, var(--inv-deep) 80%, transparent); }
/* one band of the stacking rainbow: a half ring of painted wood standing on the shelf (the hole cut by a mask) */
.mk-scene-stacker { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 6px 5px color-mix(in srgb, var(--inv-deep) 30%, transparent)); }
.mk-scene-band {
    --band: var(--mk-walnut); --hole: 80%;
    display: block; width: 100%; aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, rgb(255 255 255 / .24), transparent 35%, rgb(0 0 0 / .08)), var(--mk-grain) 0 0 / 520px 260px, var(--band);
    -webkit-mask: radial-gradient(ellipse calc(var(--hole) / 2) var(--hole) at 50% 100%, transparent 98.5%, #000 100%);
    mask: radial-gradient(ellipse calc(var(--hole) / 2) var(--hole) at 50% 100%, transparent 98.5%, #000 100%);
}
.mk-scene-band--2 { --band: var(--inv-primary); --hole: 75%; width: 80%; }
.mk-scene-band--3 { --band: var(--inv-accent); --hole: 66.7%; width: 60%; }
.mk-scene-band--4 { --band: var(--inv-toy); --hole: 45%; width: 40%; }
.mk-scene-block { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.mk-scene-block .mk-cube { --size: 7.2svh; }
.mk-scene-block .mk-cube--toy { --size: 4.6svh; }
.inv-scene__art > .mk-scene-duck { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; filter: drop-shadow(0 8px 6px color-mix(in srgb, var(--inv-deep) 35%, transparent)); }
/* the wheels turn while the duck rolls in (layer start .28 × 6.4 s, for .34 × 6.4 s) */
@keyframes mk-scene-roll { from { transform: rotate(1500deg); } to { transform: rotate(0); } }
html.inv-anim .mk-scene-duck .mk-duck__wheel { animation: mk-scene-roll 2.18s cubic-bezier(.25, .6, .35, 1) 1.79s both; }

/* the name card = the wooden name sign on its cord and peg, swinging in */
body.mk-body .inv-scene__card {
    top: clamp(40%, calc(71% - 50vw), 50%); aspect-ratio: auto; padding: 1.7rem 1.4rem 1.5rem; border-radius: 18px; overflow: visible;
    -webkit-mask: none; mask: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    background: radial-gradient(circle at 14% .75rem, color-mix(in srgb, var(--inv-deep) 85%, #000) .2rem, transparent .23rem), radial-gradient(circle at 86% .75rem, color-mix(in srgb, var(--inv-deep) 85%, #000) .2rem, transparent .23rem), var(--mk-wood-surface);
    box-shadow: inset 0 2px 0 rgb(255 255 255 / .55), inset 0 -3px 0 color-mix(in srgb, var(--inv-wood) 70%, #5b3818), 0 22px 30px -16px color-mix(in srgb, var(--inv-deep) 80%, transparent);
    transform-origin: 50% -3.4rem;
}
body.mk-body .inv-scene__card::before, body.mk-body .inv-scene__card::after { content: ''; position: absolute; pointer-events: none; }
body.mk-body .inv-scene__card::before {
    left: 14%; right: 14%; bottom: calc(100% - .75rem); height: 4.15rem;
    --cord: color-mix(in srgb, var(--inv-deep) 55%, var(--inv-wood));
    background:
        linear-gradient(to bottom right, transparent calc(50% - 1px), var(--cord) calc(50% - 1px), var(--cord) calc(50% + .7px), transparent calc(50% + .7px)) left / 50% 100% no-repeat,
        linear-gradient(to bottom left, transparent calc(50% - 1px), var(--cord) calc(50% - 1px), var(--cord) calc(50% + .7px), transparent calc(50% + .7px)) right / 50% 100% no-repeat;
}
body.mk-body .inv-scene__card::after {
    left: 50%; bottom: calc(100% + 2.8rem); width: 1.25rem; height: 1.25rem; margin-left: -.625rem; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-wood) 50%, #fff), var(--inv-wood) 45%, color-mix(in srgb, var(--inv-wood) 60%, #4a2c12));
    box-shadow: 0 3px 5px -1px rgb(0 0 0 / .35);
}
body.mk-body .inv-scene__card .inv-intro__label { color: color-mix(in srgb, var(--inv-deep) 88%, var(--inv-wood)); }
body.mk-body .inv-scene__card .inv-intro__names { color: var(--mk-title); text-shadow: 0 1px 0 rgb(255 255 255 / .45); }
body.mk-body .inv-scene__card .inv-intro__date { color: var(--inv-deep); }
body.mk-body .inv-scene__card .inv-intro__rule { background: linear-gradient(90deg, var(--inv-toy) 0 33%, var(--inv-accent) 33% 66%, var(--inv-primary) 66%); height: 3px; border-radius: 3px; }
@keyframes mk-scene-sign {
    0% { opacity: 0; transform: translate(-50%, -58%) rotate(-9deg); }
    40% { opacity: 1; transform: translate(-50%, -50%) rotate(5deg); }
    62% { transform: translate(-50%, -50%) rotate(-2.6deg); }
    80% { transform: translate(-50%, -50%) rotate(1.2deg); }
    100% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
}
html.inv-anim body.mk-body .inv-intro--scene.is-playing .inv-scene__card { animation-name: mk-scene-sign; animation-duration: 1.8s; animation-timing-function: ease-out; }
html.inv-anim body.mk-body .inv-intro--scene.is-ending .inv-scene__card { animation: none; }
