/* ============================================================================
   38 · "Grace & Kevin" (olan, cream/maroon garden wedding) — HOUSE UX LAYER
   Loaded LAST: converts the locked gate shell into the house pattern of
   natural continuous scroll while keeping the template's own aesthetic:

     · Desktop keeps the side-by-side design (§0): fixed hero pane left
       (61%, garden portrait + names), scrolling invitation column right
       (39%) — now starting below the header.
     · Mobile: the fixed top-cover gate is gone. body.olan scrolls
       naturally; the top-cover is the first stacked scene and the
       "Open Invitation" button a scroll cue.
     · House chrome on tokens: --header-h enforced on the header, cover cap
       and anchor offsets derived from it; scroll-spy header + dock; mobile
       slide-down sheet; zoom lightbox; print + no-JS fallbacks.
     · Palette comes from the template's own preset tokens: the cream
       --background-primary paper, the sand --background-secondary and the
       maroon --background-tertiary dress header, sheet, dock and lightbox.

   Nothing here changes the platform morph bindings (selectors, ids, the
   RSVP/guestbook forms, countdown, copy buttons, calendar export).
   ============================================================================ */

/* ── 1. Tokens ──────────────────────────────────────────────────────────── */
html {
    --header-h: 56px;                                   /* enforced on .site-head */
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --head-chrome: calc(var(--header-h) + var(--safe-t));
    --dock-space: 124px;                                /* end-of-page reserve above the dock */
    --ease: cubic-bezier(.23, .56, .38, .78);
    /* House palette rides the template's preset tokens (with fallbacks):
       olan's paper is the cream background-primary, the ink is the maroon
       background-tertiary, the soft accent is the sand background-secondary */
    --house-ink: var(--background-tertiary, #7E3942);
    --house-ink-rgb: var(--background-tertiary-rgb, 126, 57, 66);
    --house-paper: var(--background-primary, #EEE8E5);
    --house-paper-rgb: var(--background-primary-rgb, 238, 232, 229);
    --house-soft: var(--background-secondary, #E4D5C0);
    --house-soft-rgb: var(--background-secondary-rgb, 228, 213, 192);
    --house-text-rgb: var(--text-primary-rgb, 126, 57, 66);
    --house-on-ink: var(--button-text-secondary, #EEE8E5);
    /* Anchor offsets live ONLY on [data-panel] scroll-margin-top (§2 below):
       a container-level scroll-padding would add on top of it and land
       every jump a header-height too far down. */
}

/* ── 2. Page under the chrome ───────────────────────────────────────────── */
body.olan {
    padding-top: var(--head-chrome);                    /* fixed header reserve */
    overflow: visible !important;                        /* the ≤960px scroll lock is gone — belt & braces */
}
body.olan.js-dock {                                       /* set by house.js when the dock shows */
    padding-bottom: var(--dock-space);
}
/* The end-of-page reserve also lives on the FOOTER itself: a body-only
   reserve can vanish from the scrollable area, so at max scroll the
   Kundangi link must clear the dock via its own padding. */
body.olan.js-dock section.footer .footer-inner {
    padding-bottom: calc(16px + var(--dock-space));
}
html { -webkit-text-size-adjust: 100%; }

/* Sections land exactly below the header — native anchors included. */
body.olan [data-panel] {
    scroll-margin-top: calc(var(--head-chrome) + 10px);
}

/* ── 3. Header ──────────────────────────────────────────────────────────── */
.site-head {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(var(--house-paper-rgb), .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--house-ink-rgb), .18);
    transition: box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-head.is-scrolled {
    background: rgba(var(--house-paper-rgb), .97);
    box-shadow: 0 6px 24px rgba(var(--house-ink-rgb), .16);
}
.head-inner {
    width: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.head-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 0;
    cursor: pointer;
    /* exclusive-olan colours every span (color: inherit) at 0,1,1 — the
       chrome re-asserts its palette at matching or higher specificity */
    color: var(--house-ink);
}
body.olan .head-brand { color: var(--house-ink); text-decoration: none; }
.head-mark {
    width: 30px; height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--house-ink);
    color: var(--house-on-ink);
    font-family: var(--heading-family, 'Playfair Display', serif);
    font-size: 12px;
    letter-spacing: .04em;
}
.head-word {
    font-family: var(--heading-family, 'Playfair Display', serif);
    font-size: 19px;
    line-height: 1.1;
    color: var(--house-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.olan .head-brand .head-word { color: var(--house-ink); font-weight: 600; }
.head-nav {
    margin-left: auto;
    display: none;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.tab-btn {
    appearance: none;
    border: 0;
    background: none;
    padding: 8px 9px;
    font-family: var(--body-text-family, 'Inter', sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(var(--house-text-rgb), .72);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color .2s var(--ease);
}
.tab-btn::after {
    content: '';
    position: absolute;
    left: 9px; right: 9px; bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--house-ink);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s var(--ease);
}
.tab-btn:hover { color: var(--house-ink); }
.tab-btn.is-current { color: var(--house-ink); }
.tab-btn.is-current::after { transform: scaleX(1); }
body.olan .tab-btn { color: rgba(var(--house-text-rgb), .72); text-transform: uppercase; }
body.olan .tab-btn.is-current { color: var(--house-ink); }
@media (min-width: 1200px) {
    .head-nav { display: flex; }
    .menu-btn { display: none !important; }
}

/* Burger */
.menu-btn {
    appearance: none;
    margin-left: auto;
    width: 42px; height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: var(--house-ink);
    transition: background .2s var(--ease);
}
.menu-btn:hover { background: rgba(var(--house-ink-rgb), .1); }
.menu-box {
    width: 20px; height: 14px;
    position: relative;
    display: block;
}
.menu-box span {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.menu-box span:nth-child(1) { top: 0; }
.menu-box span:nth-child(2) { top: 6px; }
.menu-box span:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .menu-box span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-box span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-box span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
@media (min-width: 1200px) {
    .menu-btn { display: none; }
}

/* Progress hairline */
.scroll-progress {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--house-soft), var(--house-ink));
    transform: scaleX(0);
    transform-origin: left center;
    pointer-events: none;
}

/* ── 4. Mobile slide-down sheet ─────────────────────────────────────────── */
.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 940;
    background: rgba(var(--house-ink-rgb), .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease);
}
.menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.menu-sheet {
    position: fixed;
    top: var(--head-chrome);
    left: 0; right: 0;
    z-index: 950;
    max-height: calc(100dvh - var(--head-chrome) - 24px);
    overflow-y: auto;
    background: var(--house-paper);
    border-bottom: 1px solid rgba(var(--house-ink-rgb), .2);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 24px 48px rgba(var(--house-ink-rgb), .3);
    padding: 8px 10px calc(10px + var(--safe-b));
    transform: translateY(-12px);
    opacity: 0;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.menu-sheet.is-open {
    transform: translateY(0);
    opacity: 1;
}
.menu-sheet:focus { outline: none; }
.menu-sheet-list {
    list-style: none;
    margin: 0; padding: 0;
    display: block;
}
.menu-item {
    width: 100%;
    appearance: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 12px;
    border: 0;
    border-bottom: 1px solid rgba(var(--house-ink-rgb), .12);
    background: none;
    border-radius: 10px;
    font-family: var(--body-text-family, 'Inter', sans-serif);
    font-size: 15px;
    color: var(--house-ink);
    text-align: left;
    cursor: pointer;
    transition: background .2s var(--ease);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: rgba(var(--house-soft-rgb), .4); }
.menu-item.is-current { background: rgba(var(--house-ink-rgb), .1); }
.menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-label { flex: 1 1 auto; min-width: 0; }
.menu-num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: rgba(var(--house-text-rgb), .5);
    flex-shrink: 0;
}
/* exclusive-olan span overrides (0,1,1) — re-assert the sheet palette */
body.olan .menu-item { color: var(--house-ink); }
body.olan .menu-item .menu-num { font-size: 10px; color: rgba(var(--house-text-rgb), .5); letter-spacing: .12em; }
body.olan .menu-item .menu-label { flex: 1 1 auto; min-width: 0; }

/* ── 5. Dock (bottom-center pill, <1200px) ──────────────────────────────── */
.dock {
    position: fixed;
    z-index: 900;
    left: 50%;
    bottom: calc(10px + var(--safe-b));
    transform: translateX(-50%);
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 5px;
    background: rgba(var(--house-paper-rgb), .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--house-ink-rgb), .2);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(var(--house-ink-rgb), .26);
}
.dock button {
    appearance: none;
    border: 0;
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: none;
    color: rgba(var(--house-text-rgb), .72);
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.dock button svg { width: 17px; height: 17px; }
.dock button:hover { background: rgba(var(--house-soft-rgb), .55); color: var(--house-ink); }
.dock button.is-current { background: var(--house-ink); color: var(--house-on-ink); }
@media (max-width: 1199.98px) {
    html.js .dock { display: flex; }
}

/* ── 6. No-JS: the document reads perfectly, chrome is gone ─────────────── */
html:not(.js) .site-head,
html:not(.js) .dock,
html:not(.js) .menu-sheet,
html:not(.js) .menu-backdrop,
html:not(.js) .scroll-progress,
html:not(.js) .menu-btn { display: none !important; }
html:not(.js) body.olan { padding-top: 0; padding-bottom: 0; }

/* ── 7. Gate removal — the top-cover becomes scene one ──────────────────── */
/* The fixed overlay + ≤960px body lock are gone (overflow unlock above; the
   slide transition and 999999 z-index are meaningless in flow). On ≤960px it
   is the first full-viewport scene; on desktop it stays display:none — the
   side-by-side cover (fixed hero pane + invitation column) IS the cover.
   The leftover platform .hide class (startTheJourney) is neutralised. */
body.olan section.top-cover {
    position: static;
    z-index: auto;
    height: calc(var(--body-height, 100dvh) - var(--head-chrome));
    transition: none;
    -webkit-transition: none;
}
body.olan section.top-cover.hide {
    top: auto;
    bottom: auto;
    pointer-events: auto;
}
body.olan section.top-cover .inner {
    padding: 8vh 0;
}
body.olan section.top-cover .inner .details {
    /* lifted clear of the floating dock so the CTA + cue are never covered */
    margin-top: 0;
    margin-bottom: calc(clamp(24px, 9vh, 15vh) + var(--dock-space) - 16px);
}
/* The scroll cue (former gate button). */
body.olan section.top-cover .inner .details a.link,
body.olan section.top-cover .inner .details a.link:focus {
    margin: 28px auto 10px;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
section.top-cover .cue-hint {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 auto;
    width: 22px; height: 22px;
    color: var(--text-tertiary, #EEE8E5);
    opacity: .85;
    animation: cue-bob 2.2s var(--ease) infinite;
}
@keyframes cue-bob {
    0%, 100% { transform: translateY(0); opacity: .85; }
    50% { transform: translateY(6px); opacity: .45; }
}
/* Cover photo missing (morph stripped) → gradient fallback, never a hole */
section.top-cover .inner .highlight,
.kat-page__side-to-side .primary-pane .inner .highlight,
section.cover .inner .body .cover-frame {
    background-color: var(--background-secondary, #E4D5C0);
    background-image: linear-gradient(160deg, var(--background-secondary, #E4D5C0) 0%, var(--background-tertiary, #7E3942) 130%);
}
section.top-cover .highlight.is-empty,
.kat-page__side-to-side .primary-pane .highlight.is-empty,
section.cover .inner .body.is-empty { display: none; }

/* ── 8. Invitation cover — exactly one screen ───────────────────────────── */
/* The olan cover is the arch-frame portrait card. Cap the scene to
   100dvh − header and size the arch frame fluidly so it stops growing
   past ~700px-tall viewports and shrinks on smaller ones. */
body.olan section.cover {
    height: calc(100dvh - var(--head-chrome));
    min-height: 0;
}
body.olan section.cover .inner {
    /* the garden bleeds (clouds/flowers) are clipped like the original
       design — the cover never scrolls internally; the fluid frame below
       plus the house.js trim ladder keep the real content to one screen */
    overflow: hidden;
}
body.olan section.cover .inner .body {
    height: clamp(240px, calc(100dvh - var(--head-chrome) - 30vh), 480px);
    max-height: 480px;
}
@media (max-height: 560px) {
    /* landscape compaction: tame the vw-scaled head so the scene stays one screen */
    body.olan section.cover .inner .head {
        margin-top: 0 !important;
        margin-bottom: 3% !important;
        padding-top: 4px;
    }
    body.olan section.cover .inner .head .couple-name {
        font-size: min(var(--heading-size), 11vh) !important;
    }
    body.olan section.cover .inner .head .opening-title,
    body.olan section.cover .inner .head .date {
        font-size: min(var(--body-text-size), 3.2vh) !important;
    }
    body.olan section.cover .inner .body {
        height: clamp(170px, calc(100dvh - var(--head-chrome) - 22vh), 480px);
    }
}

/* ── 9. Side-by-side geometry under the header (desktop untouched elsewise) */
@media only screen and (min-width: 961px) {
    body.olan .kat-page__side-to-side .primary-pane {
        top: var(--head-chrome);
        width: 61%;
    }
}

/* ── 10. Media click affordances (house lightbox owns every image) ──────── */
.couple-picture a.img-wrap,
.photo-box > a,
a.bank-img-link,
.free-figure,
.couple-picture a.img-wrap .img,
.photo-box > a img,
.story-chitra__slider-for__item .story-overlay { cursor: zoom-in; }
.agenda-head img { cursor: zoom-in; border-radius: 10px; }
#cover-main .picture img,
#cover-opening .picture img,
#cover-pane .picture img { cursor: zoom-in; }

/* Click-to-open switch OFF: media renders inline only, no affordances */
html[data-media-lightbox="off"] .couple-picture a.img-wrap,
html[data-media-lightbox="off"] .photo-box > a,
html[data-media-lightbox="off"] a.bank-img-link,
html[data-media-lightbox="off"] .free-figure,
html[data-media-lightbox="off"] .agenda-head img,
html[data-media-lightbox="off"] #cover-main .picture img,
html[data-media-lightbox="off"] #cover-opening .picture img,
html[data-media-lightbox="off"] #cover-pane .picture img { pointer-events: none; cursor: default; }
html[data-media-lightbox="off"] .story-chitra__slider-for__item .story-overlay { cursor: default; }
html[data-media-lightbox="off"] .video-chip { display: none !important; }
html[data-media-lightbox="off"] .video-inline { pointer-events: auto; }

/* ── 11. Free pages ─────────────────────────────────────────────────────── */
.free-page {
    position: relative;
    overflow: hidden;
    background-color: var(--background-secondary, #E4D5C0);
    padding: 30px 0 40px;
}
.free-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 20px;
    text-align: center;
}
.free-eyebrow {
    font-family: var(--body-text-family, 'Inter', sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-secondary, #1E3F43);
    margin-bottom: 10px;
}
.free-page .free-page-title {
    font-family: var(--heading-family, 'Playfair Display', serif) !important;
    font-size: clamp(28px, 7.5vw, 34px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: var(--text-primary, #7E3942);
    margin-bottom: 22px;
}
.free-figure {
    margin: 0 0 18px;
    display: block;
    cursor: zoom-in;
}
.free-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 14px 40px rgba(var(--house-ink-rgb), .28);
    background: #fff;
}
.free-text {
    font-family: var(--body-text-family, 'Inter', sans-serif) !important;
    font-size: 15px;
    color: var(--text-secondary, #1E3F43);
    max-width: 420px;
    margin: 0 auto;
}
.film-figure { margin: 0; }
.film-frame {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(var(--house-ink-rgb), .28);
    background: #000;
}
.film-frame .video-inline {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}
.video-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 24px;
    border: 0;
    border-radius: 25px;
    background: var(--button-background-secondary, #7E3942);
    color: var(--button-text-secondary, #EEE8E5);
    font-family: var(--body-text-family, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .25s var(--ease);
}
.video-chip svg { width: 14px; height: 14px; }
.video-chip:hover { opacity: .85; }
.film-cap {
    margin-top: 14px;
    font-family: var(--body-text-family, 'Inter', sans-serif) !important;
    font-size: 14px;
    color: var(--text-secondary, #1E3F43);
}

/* ── 12. Empty-state + trim classes: visual only, print restores ────────── */
.is-empty, .fit-hidden { display: none !important; }

/* Cover-fit measuring: AOS resting transforms (zoom-out starts at
   scale(1.2)) inflate scrollHeight and would make the trim ladder see
   phantom overflow. house.js neutralises them only while measuring. */
body.olan .fit-measuring [data-aos] {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
}

/* ── 13. Lightbox — a deep maroon veil over the palette ─────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    background: rgba(var(--house-ink-rgb), .96);
}
.lightbox.is-open { display: flex; }
html.lb-open, html.lb-open body.olan { overflow: hidden; }
.lightbox-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(92vw, 980px);
    max-height: 76vh;
    touch-action: none;
}
.lightbox img, .lightbox video, .lightbox iframe {
    display: block;
    max-width: min(92vw, 980px);
    max-height: 76vh;
    width: auto;
    height: auto;
    border: 1px solid rgba(var(--house-soft-rgb), .5);
    border-radius: 6px;
    background: transparent;
}
.lightbox img { cursor: zoom-in; touch-action: none; user-select: none; -webkit-user-select: none; }
.lightbox.is-zoomed .lightbox-media { overflow: visible; }
.lightbox img { transition: transform .2s var(--ease); }
.lightbox.is-panning img { transition: none; cursor: grabbing; }
.lightbox iframe { width: min(92vw, 960px); height: min(51.75vw, 540px); }
.lightbox-cap, .lightbox-hint, .lightbox-original { align-self: center; }
.lightbox-cap {
    margin: 14px 0 0;
    font-family: var(--heading-family, 'Playfair Display', serif);
    font-size: 17px;
    color: var(--text-tertiary, #EEE8E5);
    text-align: center;
}
.lightbox-hint {
    margin: 6px 0 0;
    font-family: var(--body-text-family, 'Inter', sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(var(--house-soft-rgb), .95);
    text-align: center;
}
.lightbox-original {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid rgba(var(--house-soft-rgb), .7);
    border-radius: 6px;
    font-family: var(--body-text-family, 'Inter', sans-serif);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--text-tertiary, #EEE8E5);
    text-decoration: none;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lightbox-original:hover { border-color: var(--text-tertiary, #EEE8E5); }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(var(--house-soft-rgb), .7);
    border-radius: 50%;
    background: rgba(var(--house-ink-rgb), .88);
    color: var(--text-tertiary, #EEE8E5);
    font-size: 16px;
    cursor: pointer;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--text-tertiary, #EEE8E5); }
.lightbox-close { top: calc(14px + var(--safe-t)); right: 14px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-prev.is-hidden, .lightbox-next.is-hidden { display: none; }
.lightbox-original.is-hidden { display: none; }
@media (max-width: 560px) {
    .lightbox { padding: 12px; }
    .lightbox-prev { left: 6px; }
    .lightbox-next { right: 6px; }
}

/* ── 14. Scrollbars in the palette (sheet, dropdowns) ───────────────────── */
.menu-sheet::-webkit-scrollbar,
.selectize-dropdown::-webkit-scrollbar { width: 8px; }
.menu-sheet::-webkit-scrollbar-track,
.selectize-dropdown::-webkit-scrollbar-track { background: var(--house-soft, #E4D5C0); }
.menu-sheet::-webkit-scrollbar-thumb,
section.cover .inner::-webkit-scrollbar-thumb,
.selectize-dropdown::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: var(--house-ink, #7E3942);
    border: 2px solid var(--house-soft, #E4D5C0);
}
.menu-sheet { scrollbar-width: thin; scrollbar-color: var(--house-ink, #7E3942) var(--house-soft, #E4D5C0); }

/* ── 15. Small screens & landscape compaction ───────────────────────────── */
@media (max-width: 380px) {
    .dock { padding: 4px; bottom: calc(8px + var(--safe-b)); }
    .dock button { width: 30px; height: 32px; }
    .dock button svg { width: 15px; height: 15px; }
    .head-word { font-size: 17px; }
    :root { --dock-space: 112px; }
}
@media (max-height: 520px) {
    :root { --dock-space: 68px; }
    .dock { bottom: calc(6px + var(--safe-b)); }
    .dock button { width: 30px; height: 28px; }
    .dock button svg { width: 14px; height: 14px; }
    body.olan section.top-cover .inner .details { margin-bottom: calc(12px + var(--dock-space)); }
}

/* ── 16. Print — the full document on paper ─────────────────────────────── */
@media print {
    @page { margin: 12mm; }
    .site-head, .dock, .menu-sheet, .menu-backdrop, .scroll-progress,
    .lightbox, .video-chip, .cue-hint { display: none !important; }
    /* Visual-only hiding is undone on paper */
    .is-empty, .fit-hidden { display: revert !important; }
    html, body.olan { background: #fff; }
    body.olan { padding: 0 !important; }
    body.olan [data-panel] { scroll-margin-top: 0; }
    /* The cover scene is a mobile concept — print shows the invitation only */
    body.olan section.top-cover { display: none !important; }
    body.olan .kat-page__side-to-side .primary-pane {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 420px;
        display: block;
        page-break-after: always;
    }
    body.olan .kat-page__side-to-side .primary-pane .inner .details h1 {
        color: var(--text-primary, #7E3942);
        text-shadow: none;
    }
    body.olan section.cover,
    body.olan section.couple-wrap,
    body.olan section.guestbook-section { break-before: page; }
    .event-item, .bank-item, .free-figure, .film-figure { break-inside: avoid; }
    /* AOS never decides what paper shows */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    body.olan img { max-width: 100%; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; }
}

/* ── 17. Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cue-hint { animation: none; }
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
