/* Malam Zamrud (theme key "emerald"): an art deco evening behind double doors. The fixed .zm-stage is
   the velvet (img/velvet*.webp) with candle bokeh that pulses by opacity; emerald.js sets html.zm-motion
   (gold rules draw from the middle, blocks rise in) and --zm-p / --zm-l (the bokeh drifts, scenes settle).
   Only transform and opacity move. Night is the theme's own look; [data-scheme="light"] is the ballroom
   by day. Without the script, or with prefers-reduced-motion: reduce, every page is simply there. */
@font-face { font-family: "Poiret One"; src: url("/frontend/assets/fonts/poiret-one-latin.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("/frontend/assets/fonts/josefin-sans-latin.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }

:root[data-theme="emerald"] {
    color-scheme: dark;
    --bg: #0f2a24; --surface: #143630; --ink: #f4ead2; --muted: #c9bf9f; --accent: #d9b56c; --accent-ink: #10231f; --line: rgba(217, 181, 108, .42); --radius: 0;
    --heading: "Poiret One", "Josefin Sans", sans-serif; --body: "Josefin Sans", system-ui, sans-serif;
    /* Gold on the velvet is 7.8:1; the text on a gold button 8.4:1. */
    --zm-gold: #d9b56c; --zm-gold-text: #d9b56c; --zm-deep: #081a16; --zm-glow: 255, 214, 140; --zm-field: rgba(8, 26, 22, .7);
    --zm-velvet: url("img/velvet-sm.webp"); --zm-shade: linear-gradient(rgba(8, 26, 22, .6), rgba(8, 26, 22, .78));
    --zm-gutter: max(1.5rem, env(safe-area-inset-left)); --zm-out: cubic-bezier(.16, 1, .3, 1);
}
/* The ballroom by day: cream with gold leaf; text gold darkens to stay at AA (5.3:1). */
:root[data-theme="emerald"][data-scheme="light"] {
    color-scheme: light;
    --bg: #f4ecd8; --surface: #fbf6ea; --ink: #2a2216; --muted: #5e5240; --accent: #7a5c22; --accent-ink: #ffffff; --line: rgba(122, 92, 34, .4);
    --zm-gold: #b08a3e; --zm-gold-text: #7a5c22; --zm-deep: #efe4cb; --zm-glow: 255, 200, 110; --zm-field: #fbf6ea;
    --zm-shade: linear-gradient(rgba(244, 236, 216, .9), rgba(244, 236, 216, .94));
}
@media (min-width: 900px) { :root[data-theme="emerald"] { --zm-velvet: url("img/velvet.webp"); --zm-gutter: clamp(2.5rem, 6vw, 6rem); } }

[data-theme="emerald"] body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.05rem/1.65 var(--body); overflow-x: clip; }
html[data-theme="emerald"] { scroll-snap-type: y proximity; }
/* Inside the Studio preview (iframe or preview page) a swipe must reach Studio: no snapping. */
html[data-theme="emerald"].zm-framed, html[data-theme="emerald"]:has(body.is-preview) { scroll-snap-type: none; }
[data-restricted="true"] .restricted:has(~ #invitation-root:not([hidden])) { display: none; }

/* ---------- Stage: velvet and candlelight ---------- */
.zm { position: relative; isolation: isolate; overflow-x: hidden; overflow-x: clip; }
.zm-stage, .zm-opening-velvet { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--zm-shade), var(--zm-velvet) center / cover no-repeat, var(--bg); }
.zm-stage::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 30%, transparent 40%, rgba(4, 14, 12, .55)); }
:root[data-scheme="light"] .zm-stage::after { background: radial-gradient(120% 80% at 50% 30%, transparent 50%, rgba(176, 138, 62, .16)); }
.zm-bokeh { position: absolute; inset: -10% 0; transform: translate3d(0, calc(var(--zm-p, 0) * -14vh), 0); }
.zm-bokeh span { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--zm-glow), .6), rgba(var(--zm-glow), 0) 70%); opacity: .25;
    animation: zm-candle 5.5s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1); }
@keyframes zm-candle { from { opacity: .12; } to { opacity: .5; } }
@keyframes zm-sway { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
@keyframes zm-bob { 50% { transform: translate3d(0, 4px, 0); } }

/* ---------- Atoms ---------- */
.zm-main { position: relative; outline: none; transition: opacity .8s ease .9s; }
body.is-locked .zm-main { opacity: 0; }
.zm-page { position: relative; min-height: 100svh; box-sizing: border-box; display: grid; align-content: center; scroll-snap-align: start; }
.zm-section { padding: clamp(4.5rem, 12vw, 7rem) var(--zm-gutter); }
.zm-center { text-align: center; }
.zm-narrow { width: 100%; max-width: 36rem; margin-inline: auto; }
.zm-wide { width: 100%; max-width: 56rem; margin-inline: auto; }
.zm-kicker { margin: 0 0 .5rem; font: 600 .76rem/1.4 var(--body); letter-spacing: .38em; text-transform: uppercase; color: var(--muted); }
.zm-kicker-lg { font-size: .9rem; }
.zm-title { margin: 0; font: 400 clamp(2.4rem, 10vw, 3.6rem)/1.08 var(--heading); letter-spacing: .02em; color: var(--zm-gold-text); text-wrap: balance; }
.zm-names { margin: .25rem 0 0; font: 400 clamp(2.5rem, 11vw, 5rem)/1.08 var(--heading); color: var(--zm-gold-text); text-wrap: balance; }
.zm-amp { color: var(--ink); }
.zm-date { margin: 0; font-weight: 600; font-size: .95rem; letter-spacing: .18em; }
.zm-lead { margin: 0 0 1rem; font-size: 1.08rem; }
.zm-muted, .zm-note { color: var(--muted); }
.zm-note { font-size: .85rem; }
/* Gold rule: two lines and a diamond; it draws from the middle when it arrives. */
.zm-rule { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 1rem 0 1.25rem; }
.zm-rule span { width: 3.5rem; height: 1px; background: var(--zm-gold); }
.zm-rule i { width: 7px; height: 7px; background: var(--zm-gold); transform: rotate(45deg); }
.zm-fan { display: block; width: 56px; height: 22px; margin: 0 auto .5rem; fill: none; stroke: var(--zm-gold); stroke-width: 1; }
.zm-button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: 0 1.5rem; box-sizing: border-box; border: 0; border-radius: 0;
    background: var(--accent); color: var(--accent-ink); font: 600 .8rem/1 var(--body); letter-spacing: .22em; text-transform: uppercase; text-decoration: none; cursor: pointer;
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line); }
.zm-button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.zm-button[hidden] { display: none; }
.zm-button-ghost { min-height: 44px; background: transparent; color: var(--zm-gold-text); box-shadow: inset 0 0 0 1px var(--zm-gold); }
.zm :focus-visible, .zm-opening :focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.zm-actions { margin: 1.75rem 0 0; }
.zm-cue { position: absolute; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); translate: -50% 0; display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--zm-gold); border-radius: 50%; color: var(--zm-gold-text); text-decoration: none; }
.zm-cue svg { width: 18px; height: 18px; animation: zm-bob 2s ease-in-out infinite; }

/* ---------- The chandelier (emerald-lamp.blade.php) ---------- */
.zm-lamp { position: relative; isolation: isolate; width: 8.5rem; margin: 0 auto .75rem; }
.zm-chandelier { display: block; width: 100%; height: auto; transform-origin: 50% 0; animation: zm-sway 6s ease-in-out infinite alternate; }
.zm-lamp::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 55%; width: 18rem; height: 18rem; margin: -9rem 0 0 -9rem; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--zm-glow), .3), rgba(var(--zm-glow), 0) 66%); animation: zm-candle 4.5s ease-in-out infinite alternate; }
:root[data-scheme="light"] .zm-lamp::after { opacity: .5; }
/* The evening ends: the lamp dims over the closing words. */
.zm-closing .zm-lamp::after { animation: none; opacity: .1; }
.zm-closing .zm-chandelier { opacity: .6; }

/* ---------- Opening: the doors ---------- */
.zm-opening { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; justify-items: center; gap: .75rem; overflow-y: auto; text-align: center;
    padding: max(.5rem, env(safe-area-inset-top)) var(--zm-gutter) max(1.5rem, env(safe-area-inset-bottom)); color: var(--ink); transition: opacity .6s ease 1s; }
.zm-opening[hidden] { display: none; }
.zm-opening-velvet { position: absolute; }
.zm-opening .zm-lamp { width: 6.5rem; margin: 0; }
.zm-opening-head .zm-rule { margin: .6rem 0; }
.zm-opening-title { margin: 0; font: 400 clamp(2.6rem, 12vw, 4.25rem)/1.05 var(--heading); color: var(--zm-gold-text); }
.zm-opening-date { margin: 0; font-weight: 600; font-size: .9rem; letter-spacing: .2em; }
.zm-doorway { position: relative; align-self: stretch; justify-self: center; display: flex; gap: 3px; height: 100%; min-height: 11rem; max-height: 26rem; aspect-ratio: .78;
    padding: 9px 9px 0; border: 1px solid var(--zm-gold); border-bottom: 0; border-radius: 999px 999px 0 0; box-sizing: border-box;
    box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px var(--line); transition: transform 1.4s var(--zm-out) .2s; }
.zm-door-light { position: absolute; inset: 9px 9px 0; border-radius: 999px 999px 0 0; background: radial-gradient(70% 60% at 50% 45%, rgba(var(--zm-glow), .9), rgba(var(--zm-glow), .15) 70%, transparent);
    opacity: 0; transition: opacity 1s ease .25s; }
.zm-door { position: relative; flex: 1; transition: transform 1.15s cubic-bezier(.6, 0, .2, 1); }
.zm-door::before { content: ""; position: absolute; inset: 0; background: url("img/door.webp") center / 100% 100% no-repeat; box-shadow: inset 0 0 18px rgba(0, 0, 0, .45); }
.zm-door-l { transform-origin: 0 50%; border-top-left-radius: 999px 40%; overflow: hidden; }
.zm-door-r { transform-origin: 100% 50%; border-top-right-radius: 999px 40%; overflow: hidden; }
/* The original leaf has its handle on the left: mirrored, it becomes the left leaf of the pair. */
.zm-door-l::before { transform: scaleX(-1); }
.zm-guest { display: grid; justify-items: center; gap: .15rem; }
.zm-guest p { margin: 0; }
.zm-guest-name { font: 400 clamp(1.6rem, 7vw, 2rem)/1.2 var(--heading); color: var(--ink); --ct-shine: var(--zm-gold-text); }
.zm-guest .zm-note { max-width: 20rem; margin-bottom: 1.1rem !important; }
.zm-opening-head, .zm-guest, .zm-opening .zm-lamp { transition: opacity .5s ease, transform .6s var(--zm-out); }
.zm-opening.is-closing { opacity: 0; pointer-events: none; }
.zm-opening.is-closing .zm-door-l { transform: perspective(1100px) rotateY(-104deg); }
.zm-opening.is-closing .zm-door-r { transform: perspective(1100px) rotateY(104deg); }
.zm-opening.is-closing .zm-door-light { opacity: 1; }
.zm-opening.is-closing .zm-doorway { transform: scale(1.18); }
.zm-opening.is-closing :is(.zm-opening-head, .zm-guest) { opacity: 0; transform: translate3d(0, 1rem, 0); }

/* ---------- Pengantar, mempelai ---------- */
.zm-hero .zm-lamp { width: 10rem; margin-bottom: 1.5rem; }
.zm-verse { position: relative; margin: 2rem 0 0; padding: 1.75rem 1.5rem; background: rgba(8, 26, 22, .5); border: 1px solid var(--zm-gold); outline: 1px solid var(--line); outline-offset: -8px; }
:root[data-scheme="light"] .zm-verse { background: rgba(251, 246, 234, .8); }
.zm-verse blockquote { margin: 0; font-size: 1.1rem; line-height: 1.7; }
.zm-verse figcaption { margin-top: .75rem; font-weight: 600; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--zm-gold-text); }
/* 18 Nov 2026: one page per partner (see emerald.blade.php). */
.zm-person p { margin: 0 0 .25rem; }
.zm-arch { display: block; width: 100%; height: auto; max-width: min(17rem, 72vw, 46svh * .75); aspect-ratio: 3 / 4; margin: 1.25rem auto 1.5rem; object-fit: cover; box-sizing: border-box; border: 1px solid var(--zm-gold);
    border-radius: 999px 999px 0 0; outline: 1px solid var(--line); outline-offset: 5px; }
.zm-arch-initial { display: grid; place-items: center; background: var(--surface); font: 400 clamp(3.5rem, 18vw, 6rem)/1 var(--heading); color: var(--zm-gold-text); }
.zm-person-name { margin: .25rem 0 .35rem; font: 400 clamp(1.45rem, 6.5vw, 2.1rem)/1.15 var(--heading); color: var(--zm-gold-text); }
.zm-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1rem; }
.zm-socials a { display: inline-flex; align-items: center; min-height: 44px; color: var(--zm-gold-text); text-underline-offset: 4px; }

/* ---------- Jam, acara ---------- */
.zm-countdown { margin-top: 1.5rem; }
.zm-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.zm-clock span { display: grid; gap: .3rem; padding: .9rem .2rem .7rem; border: 1px solid var(--line); background: rgba(8, 26, 22, .45);
    font: 600 .75rem/1.2 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
:root[data-scheme="light"] .zm-clock span { background: var(--surface); }
.zm-clock b { font: 400 clamp(2rem, 9vw, 3.5rem)/1 var(--heading); letter-spacing: 0; color: var(--zm-gold-text); font-variant-numeric: tabular-nums; }
.zm-event-list { display: grid; gap: 1.5rem; width: 100%; max-width: 30rem; margin: .5rem auto 0; }
/* A jewellery box: a gold edge, a dark inset and a fine gold line, corners cut. */
.zm-jewel { --cut: 18px; padding: 1px; background: var(--zm-gold); text-align: center;
    clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.zm-jewel-inner { padding: 2rem 1.5rem 1.75rem; background: radial-gradient(ellipse at 50% 0, #1b4038, var(--bg) 72%); box-shadow: inset 0 0 0 5px var(--zm-deep), inset 0 0 0 6px var(--line);
    clip-path: polygon(calc(var(--cut) - 1px) 0, calc(100% - var(--cut) + 1px) 0, 100% calc(var(--cut) - 1px), 100% calc(100% - var(--cut) + 1px), calc(100% - var(--cut) + 1px) 100%, calc(var(--cut) - 1px) 100%, 0 calc(100% - var(--cut) + 1px), 0 calc(var(--cut) - 1px)); }
:root[data-scheme="light"] .zm-jewel-inner { background: radial-gradient(ellipse at 50% 0, #fffaf0, var(--surface) 72%); }
.zm-jewel p { margin: 0 0 .2rem; }
.zm-event-title { margin: 0 0 .6rem; font: 400 clamp(1.8rem, 8vw, 2.25rem)/1.1 var(--heading); color: var(--zm-gold-text); }
.zm-event-date, .zm-event-place { font-weight: 600; }
.zm-event-place { margin-top: .6rem !important; }
.zm-jewel .zm-button { margin-top: 1rem; }

/* ---------- Busana, kisah, galeri, video ---------- */
.zm-gems { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.25rem; }
.zm-gem { width: 3.25rem; height: 3.25rem; transform: rotate(45deg); background: var(--swatch); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--zm-gold), 0 10px 20px rgba(0, 0, 0, .35); }
.zm-story-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 1.25rem; border: 1px solid var(--zm-gold); outline: 1px solid var(--line); outline-offset: 5px; }
.zm-timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.zm-timeline li { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.zm-timeline h3 { margin: 0 0 .35rem; font: 400 1.6rem/1.2 var(--heading); color: var(--zm-gold-text); }
.zm-timeline p { margin: 0 0 .25rem; }
.zm-timeline img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: .5rem 0; }
.zm-salon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; width: 100%; max-width: 62rem; margin: .5rem auto 0; }
.zm-salon-item { margin: 0; min-width: 0; padding: 5px; border: 1px solid var(--zm-gold); }
.zm-salon-item:nth-child(3n + 1) { grid-column: span 2; }
.zm-salon .gallery-item { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zm-salon img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.zm-salon-item:nth-child(3n + 1) img { aspect-ratio: 16 / 10; }
.zm-salon figcaption { padding: .4rem .2rem .1rem; font-size: .85rem; color: var(--muted); text-align: center; }
.zm-video { aspect-ratio: 16 / 9; border: 1px solid var(--zm-gold); background: var(--zm-deep); }
.zm-video iframe { display: block; width: 100%; height: 100%; border: 0; }
#zm-video .zm-note { margin-top: .75rem; }

/* ---------- Tanda kasih, RSVP, ucapan, penutup ---------- */
.zm-gift-shell summary { list-style: none; }
.zm-gift-shell summary::-webkit-details-marker { display: none; }
.zm-gift-shell[open] summary { background: transparent; color: var(--zm-gold-text); box-shadow: inset 0 0 0 1px var(--zm-gold); }
.zm-gift-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.zm-gift { padding: 1.25rem; border: 1px solid var(--line); background: rgba(8, 26, 22, .5); }
:root[data-scheme="light"] .zm-gift { background: var(--surface); }
.zm-gift p { margin: 0 0 .25rem; }
.zm-gift-number { font: 400 1.6rem/1.3 var(--heading); color: var(--zm-gold-text); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.zm-gift .zm-button { margin-top: .6rem; }
.zm-form { margin-top: 1.5rem; }
.zm-form > fieldset, .zm-attendance { min-width: 0; margin: 0; padding: 0; border: 0; }
.zm-field { display: grid; gap: .4rem; margin-bottom: 1rem; font-weight: 600; font-size: .9rem; letter-spacing: .04em; }
.zm-field[hidden] { display: none; }
.zm-field :is(input, select, textarea) { width: 100%; min-height: 48px; box-sizing: border-box; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 0; background: var(--zm-field); color: var(--ink); font: 400 1rem/1.4 var(--body); }
.zm-field textarea { min-height: 7rem; resize: vertical; }
.zm-field :is(input, textarea)::placeholder { color: var(--muted); opacity: .85; }
.zm-attendance legend { margin-bottom: .4rem; font-weight: 600; font-size: .9rem; }
.zm-attendance-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.zm-attendance-options input { position: absolute; opacity: 0; pointer-events: none; }
.zm-attendance-options label { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); background: var(--zm-field); cursor: pointer; letter-spacing: .08em; }
.zm-attendance-options input:checked + label { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.zm-attendance-options input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 3px; }
.zm-submit { width: 100%; margin-top: .5rem; }
.zm-submit:disabled { opacity: .6; cursor: progress; }
.zm-form-status { min-height: 1.3rem; margin: .9rem 0 0; color: var(--muted); font-size: .9rem; text-align: center; }
.zm-wish-list { display: grid; gap: .6rem; max-height: min(60svh, 32rem); margin: 1rem 0 0; padding: 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.zm-wish-list .cine-wish { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--line); background: rgba(8, 26, 22, .5); }
:root[data-scheme="light"] .zm-wish-list .cine-wish { background: var(--surface); }
.zm-wish-list .cine-wish strong { display: block; color: var(--zm-gold-text); letter-spacing: .04em; }
.zm-wish-list .cine-wish p { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.zm-wish-list .cine-like { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; min-width: 44px; min-height: 44px; padding: 0 .7rem; border: 1px solid var(--line); border-radius: 0;
    background: transparent; color: var(--muted); font: 600 .85rem var(--body); cursor: pointer; }
.zm-wish-list .cine-like svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.zm-wish-list .cine-like.is-liked { color: var(--zm-gold-text); }
.zm-wish-list .cine-like.is-liked svg { fill: currentColor; }
.zm-closing { padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
.zm-closing-title { margin: 1.25rem 0 0; font: 400 1.5rem/1.35 var(--heading); color: var(--ink); }
.zm-closing-names { margin: .25rem 0 0; font: 400 clamp(2.75rem, 13vw, 4.75rem)/1.05 var(--heading); color: var(--zm-gold-text); }
.zm-credit { display: grid; justify-items: center; gap: .25rem; margin-top: 3.5rem; font-size: .75rem; color: var(--muted); }
.zm-credit p { margin: 0; }
.zm-logo { width: 5.5rem; height: auto; }
.zm-logo-ink { display: none; }
:root[data-scheme="light"] .zm-logo-light { display: none; }
:root[data-scheme="light"] .zm-logo-ink { display: block; }

/* ---------- Music and light/dark controls ---------- */
[data-theme="emerald"] .music-toggle { border: 1px solid var(--zm-gold); background: var(--zm-deep); color: var(--zm-gold-text); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line); }
[data-theme="emerald"] .music-toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
[data-theme="emerald"] .scheme-toggle { border: 1px solid var(--zm-gold); background: var(--zm-deep); color: var(--zm-gold-text); }

/* ---------- Motion (only once emerald.js has marked the page) ---------- */
[data-rv] { transition: opacity 1s ease, transform 1.2s var(--zm-out); transition-delay: calc(var(--i, 0) * 100ms); }
.zm-motion [data-rv]:not(.is-in) { opacity: 0; transition: none; }
.zm-motion [data-rv="up"]:not(.is-in) { transform: translate3d(0, 22px, 0); }
.zm-motion [data-rv="line"]:not(.is-in) { opacity: 0; transform: scaleX(0); }
[data-rv="line"] { transition: opacity .6s ease, transform 1.3s var(--zm-out) .15s; }
.zm-motion .zm-scene { opacity: calc(1 - var(--zm-la, 0) * .9); transform: translate3d(0, calc(var(--zm-l, 0) * 6vh), 0); }

/* ---------- Wide screens ---------- */
@media (min-width: 900px) {
    .zm-opening .zm-lamp { width: 7.5rem; }
    .zm-event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 62rem; gap: 2.5rem; }
    .zm-salon { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .zm-salon-item:nth-child(3n + 1) { grid-column: auto; }
    .zm-salon-item:nth-child(3n + 1) img { aspect-ratio: 3 / 4; }
}

@media (prefers-reduced-motion: reduce) {
    .zm *, .zm *::before, .zm *::after, .zm-opening, .zm-opening *, .zm-opening *::after, [data-theme="emerald"] .music-toggle { animation: none !important; transition: none !important; }
    .zm-bokeh, .zm-scene { transform: none !important; }
}

/* 18 Nov 2026 (owner request): the closing words stay centred; the logo and copyright rest at the foot of the page. */
.zm-closing { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; }
.zm-closing > :not(.zm-credit) { align-self: center; }
.zm-closing > .zm-credit { align-self: end; margin-top: 2.5rem; }
