/* ════════════════════════════════════════════════════════════════
   LOVE QUEST — pastel pixel-art RPG wedding invitation
   ════════════════════════════════════════════════════════════════ */
:root {
    --col: 480px;
    --b: 3px;                               /* one "pixel" of border */
    --plum: #4a3358;
    --plum-d: #2f2140;
    --plum-s: rgba(74, 51, 88, .2);
    --cream: #fff8ec;
    --cream-d: #f3e3c9;
    --paper: #fffdf8;
    --lav: #c9bcf5;
    --lav-l: #e7e0fb;
    --lav-d: #a998e0;
    --peri: #aebcf2;
    --mint: #a9e5c2;
    --mint-d: #6fbf91;
    --peach: #ffd2b5;
    --pink: #f7a1bb;
    --pink-d: #e6799a;
    --gold: #f4b955;
    --gold-l: #ffe08a;
    --ink: #3d2a4a;
    --muted: #7c6a8a;
    --f-px: 'Press Start 2P', monospace;
    --f-ui: 'Pixelify Sans', system-ui, sans-serif;
    --f-num: 'VT323', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 400 16px/1.55 var(--f-ui);
    color: var(--ink);
    background-color: #d8cff7;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, .22) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .22) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, .22) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .22) 75%),
        linear-gradient(180deg, #cfc4f6 0%, #f3d3e6 60%, #ffe3cf 100%);
    background-size: 32px 32px, 32px 32px, 100% 100%;
    background-position: 0 0, 16px 16px, 0 0;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.no-scroll { overflow: hidden; height: 100vh; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.spr { display: block; overflow: visible; image-rendering: pixelated; }

/* pixel-notched box: four flat shadows draw a border with cut corners */
.pbox {
    position: relative;
    background: var(--cream);
    margin: var(--b);
    box-shadow:
        0 calc(var(--b) * -1) 0 0 var(--plum),
        0 var(--b) 0 0 var(--plum),
        calc(var(--b) * -1) 0 0 0 var(--plum),
        var(--b) 0 0 0 var(--plum),
        inset 0 calc(var(--b) * -1) 0 0 var(--cream-d),
        inset var(--b) var(--b) 0 0 #fff,
        calc(var(--b) * 2) calc(var(--b) * 3) 0 0 var(--plum-s);
}

.pbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: var(--b);
    padding: 11px 16px 10px;
    border: 0;
    background: var(--pink);
    color: var(--plum-d);
    font: 400 10px/1.4 var(--f-px);
    letter-spacing: .02em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        0 calc(var(--b) * -1) 0 0 var(--plum),
        0 var(--b) 0 0 var(--plum),
        calc(var(--b) * -1) 0 0 0 var(--plum),
        var(--b) 0 0 0 var(--plum),
        inset 0 calc(var(--b) * -1) 0 0 var(--pink-d),
        inset var(--b) var(--b) 0 0 #ffd0dd;
    transition: transform .1s steps(2);
    -webkit-tap-highlight-color: transparent;
}
.pbtn:hover { background: #f9b2c8; }
.pbtn:active { transform: translateY(var(--b)); }
.pbtn.big { width: calc(100% - var(--b) * 2); padding: 14px 16px 13px; font-size: 11px; }
.pbtn.sent { background: var(--mint); box-shadow: 0 calc(var(--b) * -1) 0 0 var(--plum), 0 var(--b) 0 0 var(--plum), calc(var(--b) * -1) 0 0 0 var(--plum), var(--b) 0 0 0 var(--plum), inset 0 calc(var(--b) * -1) 0 0 var(--mint-d); }
.pbtn:disabled { cursor: default; }

/* twinkling sparkle */
.tw { position: absolute; width: 10px; animation: twinkle 2.4s steps(3) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }

/* ════════════════════════════════════════════════════════════════
   COVER · TITLE SCREEN
   ════════════════════════════════════════════════════════════════ */
.intro {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
}
.title-screen {
    position: relative;
    width: 100%;
    max-width: var(--col);
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #b9acf0 0%, #cbbdf5 26%, #f2c6dc 58%, #ffdcc4 78%, #ffe9d2 100%);
    box-shadow: 0 0 0 var(--b) var(--plum), 0 30px 80px -30px rgba(47, 33, 64, .5);
}

.ts-sky { position: absolute; inset: 0; pointer-events: none; }
.ts-sky .t1 { top: 9%; left: 10%; width: 12px; }
.ts-sky .t2 { top: 6%; right: 16%; animation-delay: -.8s; }
.ts-sky .t3 { top: 36%; left: 7%; width: 8px; animation-delay: -1.6s; }
.ts-sky .t4 { top: 31%; right: 8%; width: 12px; animation-delay: -.4s; }

.cloud-lane { position: absolute; left: 0; width: 200%; display: flex; }
.cloud-lane .spr { position: absolute; }
.cloud-lane.far { top: 18%; opacity: .75; animation: drift 60s linear infinite; }
.cloud-lane.near { top: 44%; animation: drift 38s linear infinite; }
.cloud-lane .c1 { left: 6%; width: 64px; }
.cloud-lane .c2 { left: 34%; width: 48px; }
.cloud-lane .c3 { left: 30%; width: 88px; }
.cloud-lane .c4 { left: 2%; width: 56px; top: 34px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* the lane is twice as wide; the .d copies sit one viewport later so the loop is seamless */
.cloud-lane .d { margin-left: 50%; }

.ts-top {
    position: relative;
    z-index: 3;
    padding: max(48px, 7vh) 22px 0;
    text-align: center;
}
.ts-kicker .spr { width: 9px; animation: twinkle 2.4s steps(3) infinite; }
.ts-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 18px;
    font: 400 9px/1.6 var(--f-px);
    letter-spacing: .12em;
    color: var(--plum);
    text-transform: uppercase;
}
.logo {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font: 400 46px/1 var(--f-px);
    letter-spacing: .02em;
    color: #fff3f7;
    /* stepped outline + drop: classic 8-bit title */
    text-shadow:
        3px 0 var(--plum), -3px 0 var(--plum), 0 3px var(--plum), 0 -3px var(--plum),
        3px 3px var(--plum), -3px -3px var(--plum), 3px -3px var(--plum), -3px 3px var(--plum),
        0 9px var(--pink-d), 3px 9px var(--pink-d), -3px 9px var(--pink-d),
        0 12px var(--plum), 3px 12px var(--plum), -3px 12px var(--plum);
    animation: logoIn .9s steps(6) both;
}
.logo-l1 { color: #fff4f8; }
.logo-l2 { color: var(--gold-l); font-size: 40px; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }

.ts-names {
    margin: 26px auto 0;
    max-width: 22ch;
    font: 600 23px/1.25 var(--f-ui);
    color: var(--plum-d);
    overflow-wrap: anywhere;
    animation: fadeStep .8s steps(4) .4s both;
}
.ts-names > span { display: block; }
.ts-names .amp { color: var(--pink-d); }
.ts-date {
    display: inline-block;
    margin: 12px 0 0;
    padding: 6px 10px 5px;
    font: 400 10px/1.3 var(--f-px);
    color: var(--plum);
    background: rgba(255, 248, 236, .7);
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum);
    animation: fadeStep .8s steps(4) .6s both;
}
@keyframes fadeStep { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── scene: fills the space between the title and the dialog ── */
.title-screen { display: flex; flex-direction: column; }
.ts-scene {
    position: relative;
    flex: 1;
    min-height: 130px;
    z-index: 2;
    pointer-events: none;
}
.hill { position: absolute; left: 0; bottom: 0; width: 100%; }
.h-back { height: 74%; }
.h-back path { fill: #c4ead4; }
.h-mid { height: 50%; }
.h-mid path { fill: #a2dcbb; }
.h-front { height: 26%; }
.h-front path { fill: #7fcca2; }
.ts-castle {
    position: absolute;
    left: 50%;
    bottom: 60%;
    width: 96px;
    transform: translateX(-50%);
}
.ts-tree { position: absolute; width: 36px; }
.ts-tree.a { left: 8%; bottom: 36%; }
.ts-tree.b { right: 9%; bottom: 40%; width: 30px; }
.ts-flower { position: absolute; width: 14px; bottom: 8%; }
.ts-flower.f1 { left: 10%; }
.ts-flower.f2 { left: 19%; bottom: 4%; width: 12px; }
.ts-flower.f3 { right: 12%; bottom: 7%; }

.ts-duo {
    position: absolute;
    left: 50%;
    bottom: 14%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    transform: translateX(-50%);
}
.hero { width: 52px; animation: bob 1.2s steps(2) infinite; }
.hero.b { animation-delay: -.6s; }
.ts-duo::after {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: -5px;
    height: 6px;
    z-index: -1;
    background: repeating-linear-gradient(90deg, #6fbf91 0 64px, transparent 64px 90px);
    background: linear-gradient(90deg, #6aba8c 0 38%, transparent 38% 62%, #6aba8c 62%);
}
.duo-heart { width: 22px; margin-bottom: 64px; animation: heartBob 1.6s steps(4) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes heartBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.1); } }

/* ── dialog box (start button) on the grass ── */
.ts-ground {
    position: relative;
    z-index: 4;
    padding: 18px 22px max(22px, 3.5vh);
    background: #7fcca2;
}
.ts-dialog {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 14px 14px;
    border: 0;
    background: var(--cream);
    text-align: center;
    cursor: pointer;
    box-shadow:
        0 -4px 0 0 var(--plum), 0 4px 0 0 var(--plum), -4px 0 0 0 var(--plum), 4px 0 0 0 var(--plum),
        inset 0 -4px 0 0 var(--cream-d), inset 4px 4px 0 0 #fff,
        8px 10px 0 0 rgba(47, 33, 64, .22);
    animation: fadeStep .8s steps(4) .8s both;
    -webkit-tap-highlight-color: transparent;
}
.ts-dialog:active { transform: translateY(3px); }
.dl-tag {
    position: absolute;
    top: -14px;
    left: 14px;
    padding: 5px 8px 4px;
    font: 400 8px/1.3 var(--f-px);
    color: #fff;
    background: var(--plum);
    text-transform: uppercase;
}
.dl-label { font-size: 13px; color: var(--muted); }
.dl-guest {
    max-width: 100%;
    font: 700 22px/1.2 var(--f-ui);
    color: var(--plum-d);
    overflow-wrap: anywhere;
}
.dl-start {
    margin-top: 8px;
    font: 400 11px/1.4 var(--f-px);
    color: var(--pink-d);
    animation: blink 1s steps(1) infinite;
}
.cursor { font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }

/* ── pixel wipe transition ── */
.wipe {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.wipe i {
    flex: 1;
    background: var(--plum);
    transform: scaleX(0);
    transform-origin: left center;
}
.wipe i:nth-child(even) { transform-origin: right center; background: #5b4270; }
.intro.closing .wipe i { animation: wipeIn .5s steps(6) both; }
.intro.closing .wipe i:nth-child(2n) { animation-delay: .05s; }
.intro.closing .wipe i:nth-child(3n) { animation-delay: .1s; }
.intro.reveal { pointer-events: none; }
.intro.reveal .wipe i { transform: scaleX(1); animation: wipeOut .55s steps(6) both; }
.intro.reveal .wipe i:nth-child(2n) { animation-delay: .06s; }
.intro.reveal .wipe i:nth-child(3n) { animation-delay: .12s; }
@keyframes wipeIn { to { transform: scaleX(1); } }
@keyframes wipeOut { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ════════════════════════════════════════════════════════════════
   MUSIC BUTTON
   ════════════════════════════════════════════════════════════════ */
.music-toggle-btn {
    position: fixed;
    top: 8px;
    right: max(12px, calc(50vw - var(--col) / 2 + 12px));
    z-index: 1002;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: var(--gold-l);
    color: var(--plum);
    box-shadow:
        0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum),
        inset 0 -3px 0 0 var(--gold);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s steps(3);
    -webkit-tap-highlight-color: transparent;
}
body.opened .music-toggle-btn { opacity: 1; pointer-events: auto; }
.music-toggle-btn svg { width: 18px; height: 18px; }
.music-toggle-btn.playing svg { animation: noteHop .8s steps(2) infinite; }
@keyframes noteHop { 50% { transform: translateY(-2px); } }

/* ════════════════════════════════════════════════════════════════
   WORLD SHELL
   ════════════════════════════════════════════════════════════════ */
.world {
    position: relative;
    max-width: var(--col);
    min-height: 100vh;
    margin: 0 auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, #ece6fd 0%, #fbe9f1 40%, #fff0e4 70%, #eef8f1 100%);
    box-shadow: 0 0 0 var(--b) var(--plum), 0 30px 80px -30px rgba(47, 33, 64, .45);
    overflow: clip;               /* clip, not hidden: keeps the sticky HUD working */
}
body.has-qr .world { padding-bottom: 96px; }

.hud {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 62px 0 14px;
    background: var(--plum);
    color: #fff;
    box-shadow: 0 3px 0 0 var(--plum-d), 0 6px 0 0 rgba(47, 33, 64, .15);
}
.hud-hp { display: flex; gap: 3px; }
.hud-hp .spr { width: 15px; }
.hud-title {
    flex: 1;
    text-align: center;
    font: 400 10px/1 var(--f-px);
    letter-spacing: .08em;
    color: var(--gold-l);
}
.hud-coin { display: flex; align-items: center; gap: 5px; font: 400 20px/1 var(--f-num); color: #fff; }
.hud-coin .spr { width: 15px; }
.hud-coin.bump { animation: bump .3s steps(2); }
@keyframes bump { 50% { transform: scale(1.25); } }

main { padding: 0 0 8px; }

/* ── stage scaffolding ── */
.stage { position: relative; padding: 46px 18px 10px; }
.stage-head { text-align: center; margin-bottom: 22px; }
.st-no {
    display: inline-block;
    padding: 5px 8px 4px;
    font: 400 8px/1.3 var(--f-px);
    letter-spacing: .1em;
    color: #fff;
    background: var(--lav-d);
    box-shadow: 0 -2px 0 0 var(--plum), 0 2px 0 0 var(--plum), -2px 0 0 0 var(--plum), 2px 0 0 0 var(--plum);
}
.st-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 0;
    font: 700 30px/1.15 var(--f-ui);
    color: var(--plum-d);
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(169, 152, 224, .35);
}

/* reveal: chunky stepped entrance */
[data-reveal] { opacity: 0; }
[data-reveal].shown { animation: pxIn .55s steps(5) both; }
@keyframes pxIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* collectible coins */
.coin-pick {
    position: absolute;
    top: 50px;
    right: 26px;
    z-index: 5;
    width: 38px;
    height: 38px;
    padding: 6px;
    border: 0;
    background: none;
    cursor: pointer;
    animation: coinSpin 1.2s steps(4) infinite;
    -webkit-tap-highlight-color: transparent;
}
.coin-pick.r { right: auto; left: 26px; }
.coin-pick::before { content: ''; position: absolute; inset: 2px; background: radial-gradient(circle, rgba(255, 224, 138, .55), transparent 70%); }
.coin-pick .spr { width: 100%; }
.coin-pick.got { animation: coinGot .5s steps(4) forwards; pointer-events: none; }
@keyframes coinSpin { 0%, 100% { transform: scaleX(1) translateY(0); } 25% { transform: scaleX(.55) translateY(-2px); } 50% { transform: scaleX(.2) translateY(-3px); } 75% { transform: scaleX(.55) translateY(-2px); } }
@keyframes coinGot { to { transform: translateY(-40px); opacity: 0; } }

/* ════════════════════════════════════════════════════════════════
   STAGE 1 · PROLOG
   ════════════════════════════════════════════════════════════════ */
.prolog { padding-top: 24px; }
.prolog .coin-pick { top: 40px; right: 34px; }
.scene-card {
    position: relative;
    height: 170px;
    margin: var(--b) var(--b) 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #c8bbf4 0%, #f5cde0 70%, #ffe3cb 100%);
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum), 6px 9px 0 0 var(--plum-s);
}
.sc-cloud { position: absolute; width: 60px; animation: floatX 7s steps(8) infinite alternate; }
.sc-cloud.a { top: 18px; left: 14%; }
.sc-cloud.b { top: 46px; right: 10%; width: 44px; animation-delay: -3s; }
.sc-sky .t5 { top: 16px; right: 34%; }
.sc-sky .t6 { top: 60px; left: 40%; width: 8px; animation-delay: -1s; }
@keyframes floatX { from { transform: translateX(-10px); } to { transform: translateX(10px); } }
.sc-hill { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.sc-hill path { fill: #8fd3ad; }
.sc-walk {
    position: absolute;
    left: 50%;
    bottom: 50px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    transform: translateX(-50%);
}
.walker { width: 40px; }
.prolog.shown .walker.g { animation: walkIn 1.4s steps(7) both, bob .5s steps(2) 1.4s 4; }
.prolog.shown .walker.b { animation: walkInR 1.4s steps(7) both, bob .5s steps(2) 1.4s 4; }
.walk-heart { width: 18px; margin-bottom: 54px; opacity: 0; }
.prolog.shown .walk-heart { animation: heartPop .5s steps(3) 1.4s forwards, heartBob 1.6s steps(4) 2s infinite; }
@keyframes walkIn { from { transform: translateX(-120px); } to { transform: none; } }
@keyframes walkInR { from { transform: translateX(120px) scaleX(-1); } to { transform: none; } }
@keyframes heartPop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }

.story { padding: 26px 20px 20px; text-align: center; }
.story .st-no { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.story p { margin: 0 0 12px; font-size: 16px; }
.story p:last-child { margin-bottom: 0; }
.salam { font-weight: 600; color: var(--pink-d); }
.story b { color: var(--plum-d); }

/* ════════════════════════════════════════════════════════════════
   STAGE 2 · CHARACTER SELECT
   ════════════════════════════════════════════════════════════════ */
.char { padding: 20px 18px 18px; }
.char.groom { background: linear-gradient(180deg, #e4ebff 0%, var(--cream) 46%); }
.char.bride { background: linear-gradient(180deg, #ffe4ee 0%, var(--cream) 46%); }
.char-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    font: 400 10px/1 var(--f-px);
    color: var(--lav-d);
}
.char.bride .char-tag { color: var(--pink-d); }
.char-top { display: flex; align-items: center; gap: 16px; }
.portrait {
    flex: none;
    width: 92px;
    height: 104px;
    display: grid;
    place-items: center;
    margin: var(--b);
    background:
        linear-gradient(0deg, #9fdcb9 0 22%, transparent 22%),
        linear-gradient(180deg, #c9e6ff, #e4f2ff);
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum), inset 0 -3px 0 0 #7fcca2;
}
.char.bride .portrait { background: linear-gradient(0deg, #9fdcb9 0 22%, transparent 22%), linear-gradient(180deg, #ffd8e5, #fff0f5); }
.pt-spr { width: 56px; margin-top: 8px; animation: bob 1.2s steps(2) infinite; }
.char.bride .pt-spr { animation-delay: -.6s; }
.char-id { min-width: 0; }
.char-class { display: block; font: 400 8px/1.4 var(--f-px); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.char-name { margin: 6px 0 4px; font: 700 24px/1.15 var(--f-ui); color: var(--plum-d); overflow-wrap: anywhere; }
.char-job { display: block; font-size: 14px; color: var(--pink-d); }
.char.groom .char-job { color: #5868ae; }

.stats { list-style: none; margin: 16px 0 0; padding: 12px 12px 10px; background: rgba(74, 51, 88, .06); }
.stats li { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.stats li:last-child { margin-bottom: 0; }
.sr-l { flex: none; width: 86px; font-size: 14px; color: var(--muted); }
.sr-bar { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 12px; padding: 2px; background: var(--plum); }
.sr-bar i { background: #6a5379; }
.sr-bar i.on { background: var(--pink); box-shadow: inset 0 -2px 0 var(--pink-d); }
.char.groom .sr-bar i.on { background: #9fb0f0; box-shadow: inset 0 -2px 0 #6f80c9; }
.char.shown .sr-bar i.on { animation: fill .3s steps(2) both; }
.char.shown .sr-bar i.on:nth-child(n+4) { animation-delay: .15s; }
.char.shown .sr-bar i.on:nth-child(n+7) { animation-delay: .3s; }
@keyframes fill { from { opacity: 0; } to { opacity: 1; } }
.char-bio { margin: 14px 0 0; font-size: 15px; line-height: 1.5; text-align: center; }
.char-bio b { color: var(--plum-d); font-weight: 600; }

.party-up {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 22px 0;
    font: 400 10px/1.4 var(--f-px);
    color: var(--pink-d);
    text-align: center;
}
.pu-heart { width: 18px; animation: heartBob 1.6s steps(4) infinite; }

/* ════════════════════════════════════════════════════════════════
   STAGE 3 · NPC DIALOG
   ════════════════════════════════════════════════════════════════ */
.npc { display: flex; flex-direction: column; align-items: center; }
.npc-spr { width: 64px; margin-bottom: 12px; animation: bob 1.4s steps(2) infinite; }
.dialog { width: calc(100% - var(--b) * 2); padding: 26px 18px 30px; background: #f2fbf4; box-shadow:
        0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum),
        inset 0 -3px 0 0 #cfeedb, inset 3px 3px 0 0 #fff, 6px 9px 0 0 var(--plum-s); }
.dialog::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--plum);
    transform: translateX(-50%);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
.npc-name {
    position: absolute;
    top: -12px;
    left: 14px;
    padding: 5px 8px 4px;
    font: 400 8px/1.3 var(--f-px);
    color: #fff;
    background: var(--mint-d);
    box-shadow: 0 -2px 0 0 var(--plum), 0 2px 0 0 var(--plum), -2px 0 0 0 var(--plum), 2px 0 0 0 var(--plum);
}
.twr { position: relative; margin: 0; font-size: 17px; line-height: 1.6; }
.twr .tw-live { position: absolute; inset: 0; }
.twr.typing .tw-ghost { visibility: hidden; }
.twr.typing .tw-live::after { content: '▌'; animation: blink .7s steps(1) infinite; color: var(--mint-d); }
.twr.typed .tw-live::after { content: none; }
.npc-cite { display: block; margin-top: 12px; font: 400 9px/1.4 var(--f-px); color: var(--mint-d); font-style: normal; text-align: right; }
.npc-next { position: absolute; right: 14px; bottom: 8px; font-size: 12px; color: var(--plum); animation: nudge .8s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }

/* ════════════════════════════════════════════════════════════════
   STAGE 4 · BOSS BATTLE / COUNTDOWN
   ════════════════════════════════════════════════════════════════ */
.arena {
    position: relative;
    margin: var(--b);
    padding: 26px 16px 24px;
    text-align: center;
    color: #fff;
    background:
        linear-gradient(0deg, #3b2a52 0 18%, transparent 18%),
        linear-gradient(180deg, #2f2147 0%, #4b3570 60%, #6d4f8e 100%);
    box-shadow: 0 -3px 0 0 var(--plum-d), 0 3px 0 0 var(--plum-d), -3px 0 0 0 var(--plum-d), 3px 0 0 0 var(--plum-d), 6px 9px 0 0 var(--plum-s);
    overflow: hidden;
}
.ar-stars .t7 { top: 14px; left: 10%; }
.ar-stars .t8 { top: 30px; right: 12%; width: 8px; animation-delay: -1s; }
.ar-stars .t9 { bottom: 26%; left: 6%; width: 8px; animation-delay: -1.8s; }
.ar-warn { margin: 0 0 18px; font: 400 9px/1.6 var(--f-px); color: var(--gold-l); letter-spacing: .04em; }
.ar-warn span { display: inline-block; color: #ff8fa8; animation: blink 1s steps(1) infinite; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 4px; }
.cd-box {
    padding: 6px 0 8px;
    background: #fff8ec;
    color: var(--plum-d);
    box-shadow: 0 -3px 0 0 #1f1630, 0 3px 0 0 #1f1630, -3px 0 0 0 #1f1630, 3px 0 0 0 #1f1630, inset 0 -3px 0 0 var(--cream-d);
}
.cd-box b { display: block; font: 400 44px/1 var(--f-num); }
.cd-box span { display: block; font: 400 7px/1.4 var(--f-px); text-transform: uppercase; color: var(--muted); }
.hp { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 22px 0 0; flex-wrap: wrap; }
.hp-l { font: 400 8px/1 var(--f-px); color: #ffb9cb; }
.hp-bar { display: flex; gap: 3px; }
.hp-h { position: relative; width: 20px; height: 18px; }
.hp-h .spr { position: absolute; inset: 0; width: 100%; height: 100%; }
.hp-h .on { opacity: 0; }
.hp-h.full .on { opacity: 1; animation: heartPop .4s steps(3) both; }
.ar-date { margin: 18px 0 14px; font-size: 17px; color: #f4ecff; }
.arena .pbtn { background: var(--gold-l); box-shadow: 0 -3px 0 0 #1f1630, 0 3px 0 0 #1f1630, -3px 0 0 0 #1f1630, 3px 0 0 0 #1f1630, inset 0 -3px 0 0 var(--gold); }

/* ════════════════════════════════════════════════════════════════
   STAGE 5 · QUEST LOG
   ════════════════════════════════════════════════════════════════ */
.qlog { padding: 20px 18px 18px; margin-bottom: 26px; background: var(--paper); }
.qlog::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 6px;
    background: repeating-linear-gradient(180deg, var(--pink) 0 6px, transparent 6px 12px);
}
.qlog.two::before { background: repeating-linear-gradient(180deg, var(--lav-d) 0 6px, transparent 6px 12px); }
.q-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.q-ico {
    flex: none;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: var(--b);
    background: #ffe9f0;
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum);
}
.qlog.two .q-ico { background: #ece6ff; }
.q-ico .spr { width: 36px; }
.q-kind { display: flex; align-items: center; gap: 6px; font: 400 8px/1.4 var(--f-px); color: var(--pink-d); text-transform: uppercase; }
.qlog.two .q-kind { color: var(--lav-d); }
.q-mark { width: 6px; animation: nudge 1s steps(2) infinite; }
.q-title { margin: 6px 0 0; font: 700 28px/1.1 var(--f-ui); color: var(--plum-d); }
.q-rows { margin: 0; padding: 0; }
.q-rows div { display: flex; gap: 12px; padding: 8px 0; border-bottom: 2px dashed #eadcef; }
.q-rows dt { flex: none; width: 72px; font: 400 8px/2.2 var(--f-px); color: var(--muted); text-transform: uppercase; }
.q-rows dd { margin: 0; flex: 1; min-width: 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.q-obj { margin: 12px 0 6px; font-size: 15px; }
.q-obj b { color: var(--pink-d); }
.q-reward { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 14px; color: #b07a1d; }
.rw { width: 10px; flex: none; }
.qlog .pbtn { width: calc(100% - var(--b) * 2); }

/* ════════════════════════════════════════════════════════════════
   STAGE 6 · WORLD MAP
   ════════════════════════════════════════════════════════════════ */
.mapbox { padding: 10px; }
.map-frame {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #bfe8cf;
    box-shadow: 0 0 0 3px var(--plum);
}
.leaflet-map { width: 100%; height: 100%; z-index: 1; }
.leaflet-map .leaflet-tile-pane { filter: saturate(.75) hue-rotate(-12deg) brightness(1.04); }
.lq-marker { background: none; border: 0; }
.lq-marker svg { width: 28px; height: 40px; animation: nudge .9s steps(2) infinite; }

.map-illu {
    position: absolute;
    inset: 0;
    display: block;
    background-color: #a9e2c0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .18) 2px, transparent 2px),
        linear-gradient(0deg, rgba(255, 255, 255, .18) 2px, transparent 2px);
    background-size: 24px 24px;
}
.mi-lake { position: absolute; left: 6%; bottom: 10%; width: 34%; height: 30%; background: #9fd0f5; box-shadow: 0 -6px 0 -0px #9fd0f5, 6px 0 0 #9fd0f5, inset 0 -4px 0 #7fb8e6; }
.mi-road { position: absolute; background: repeating-linear-gradient(90deg, #f6e4c4 0 12px, #efd5a8 12px 24px); }
.mi-road.r1 { left: 0; right: 0; top: 56%; height: 12px; }
.mi-road.r2 { top: 0; bottom: 0; left: 58%; width: 12px; background: repeating-linear-gradient(180deg, #f6e4c4 0 12px, #efd5a8 12px 24px); }
.mi-tree { position: absolute; width: 26px; }
.mi-tree.t1 { left: 8%; top: 10%; }
.mi-tree.t2 { left: 22%; top: 18%; width: 22px; }
.mi-tree.t3 { right: 6%; bottom: 6%; }
.mi-tree.t4 { left: 44%; bottom: 8%; width: 22px; }
.mi-castle { position: absolute; right: 9%; top: 12%; width: 74px; }
.mi-pin { position: absolute; right: calc(9% + 25px); top: 0; width: 22px; animation: nudge .9s steps(2) infinite; }
.mi-you { position: absolute; left: 34%; top: 40%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mi-you .spr { width: 24px; animation: bob .6s steps(2) infinite; }
.mi-you em { font: 400 6px/1.3 var(--f-px); font-style: normal; color: #fff; background: var(--plum); padding: 3px 4px 2px; white-space: nowrap; }

.loc { padding: 18px 8px 8px; text-align: center; }
.loc-k { display: inline-flex; align-items: center; gap: 6px; font: 400 8px/1 var(--f-px); color: var(--pink-d); text-transform: uppercase; }
.loc-pin { width: 9px; }
.loc-name { margin: 10px 0 6px; font: 700 22px/1.2 var(--f-ui); color: var(--plum-d); overflow-wrap: anywhere; }
.loc-addr { margin: 0 0 14px; font-size: 15px; color: var(--muted); }

/* ════════════════════════════════════════════════════════════════
   STAGE 7 · ALBUM
   ════════════════════════════════════════════════════════════════ */
.album { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 4px; }
.ph-frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    padding: 6px 6px 22px;
    margin: var(--b);
    border: 0;
    background: var(--paper);
    cursor: pointer;
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum), 5px 8px 0 0 var(--plum-s);
}
.ph-frame:nth-child(4n+2), .ph-frame:nth-child(4n+3) { transform: translateY(14px); }
.ph-frame img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 0 0 2px var(--plum); }
.ph-no { position: absolute; left: 0; right: 0; bottom: 5px; font: 400 8px/1 var(--f-px); color: var(--muted); text-align: center; }
.ph-frame.ph { cursor: default; display: flex; }
.ph-frame.ph::before { content: ''; position: absolute; inset: 6px 6px 22px; box-shadow: 0 0 0 2px var(--plum); }
.ph-frame.ph { align-items: center; justify-content: center; }
.ph.a, .ph.d { background-image: linear-gradient(180deg, #d5cbf7 0 58%, #a9e2c0 58% 100%); background-clip: content-box; }
.ph.b { background-image: linear-gradient(180deg, #ffd8e5, #ffeef3); background-clip: content-box; }
.ph.c { background-image: linear-gradient(180deg, #ffe7cf, #fff3e3); background-clip: content-box; }
.ph-spr { width: 36%; }
.ph-spr.wide { width: 56%; margin-top: -12%; }
.album-cap { margin: 34px 10px 0; text-align: center; font-size: 15px; color: var(--muted); }

/* ════════════════════════════════════════════════════════════════
   INVENTORY (gift partial)
   ════════════════════════════════════════════════════════════════ */
.gift-wrap:not(:has(#gift-section)) { display: none; }
.inv-chest { width: 30px; }
.inv-box { padding: 4px 0; background: var(--paper); overflow: hidden; }
.gift-wrap #gift-section { background: transparent !important; padding: 18px 0 20px !important; font-family: var(--f-ui) !important; }
.gift-wrap .gs-heading h2 { font-family: var(--f-ui) !important; font-weight: 700 !important; color: var(--plum-d) !important; }
.gift-wrap .gs-heading h2::after { background: var(--pink) !important; }
.gift-wrap .gs-heading p, .gift-wrap .gs-sub-label { font-family: var(--f-ui) !important; }
.gift-wrap .gs-card, .gift-wrap .gs-bank-card { border-radius: 0 !important; box-shadow: 0 0 0 3px var(--plum), 4px 6px 0 0 var(--plum-s) !important; border: 0 !important; }
.gift-wrap .gs-btn, .gift-wrap .gs-bank-copy { border-radius: 0 !important; font-family: var(--f-ui) !important; }
.gift-wrap .gs-bank-logo { border-radius: 0 !important; }

/* ════════════════════════════════════════════════════════════════
   STAGE 8 · SAVE POINT (RSVP) + PARTY CHAT
   ════════════════════════════════════════════════════════════════ */
.save-crystal { position: relative; width: 120px; height: 130px; margin: 0 auto 6px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.save-crystal .glow {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    background: radial-gradient(circle, rgba(191, 227, 255, .95) 0 22%, rgba(201, 188, 245, .55) 45%, transparent 70%);
    animation: glow 1.8s steps(4) infinite;
}
.save-crystal .cr { position: relative; width: 44px; animation: crystal 1.6s steps(4) infinite; }
.save-crystal .pedestal { position: relative; width: 70px; height: 14px; margin-top: 10px; background: #c9bfdf; box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum), inset 0 -4px 0 #a99fc4; }
.save-crystal.saved .cr { animation: crystalSave .4s steps(3) 3; }
@keyframes glow { 0%, 100% { opacity: .6; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes crystal { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes crystalSave { 50% { transform: translateY(-14px) scale(1.2); } }
.save-lead { margin: 0 10px 22px; text-align: center; font-size: 16px; }

.save-form { padding: 20px 16px 16px; }
.f-l { display: block; margin: 0 0 8px; font: 400 8px/1.4 var(--f-px); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.f-in {
    display: block;
    width: calc(100% - 6px);
    margin: 0 3px 18px;
    padding: 11px 12px;
    border: 0;
    border-radius: 0;
    background: #fff;
    font: 500 16px/1.4 var(--f-ui);
    color: var(--ink);
    box-shadow: 0 0 0 3px var(--plum), inset 3px 3px 0 #efe7f8;
    outline: none;
    resize: vertical;
    -webkit-appearance: none;
}
.f-in:focus { box-shadow: 0 0 0 3px var(--plum), inset 3px 3px 0 #efe7f8, 0 0 0 6px var(--lav); }
.f-in::placeholder { color: #b3a6c0; }

.menu { margin: 0 3px 18px; padding: 8px 6px; background: var(--plum); box-shadow: 0 0 0 3px var(--plum-d); }
.mi { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 10px; cursor: pointer; color: #e8def3; font-size: 16px; -webkit-tap-highlight-color: transparent; }
.mi input { position: absolute; opacity: 0; pointer-events: none; }
.mi .cur { width: 12px; font: 400 10px/1 var(--f-px); color: var(--gold-l); visibility: hidden; }
.mi:has(input:checked) { background: #5f4874; color: #fff; }
.mi:has(input:checked) .cur { visibility: visible; animation: nudgeX .6s steps(2) infinite; }
.mi:has(input:focus-visible) { outline: 2px dashed var(--gold-l); outline-offset: -2px; }
@keyframes nudgeX { 50% { transform: translateX(3px); } }

.chat-head { display: flex; align-items: center; justify-content: space-between; margin: 40px 4px 14px; }
.chat-online { display: inline-flex; align-items: center; gap: 6px; font: 400 8px/1 var(--f-px); color: var(--mint-d); }
.chat-online i { width: 8px; height: 8px; background: var(--mint-d); animation: blink 1.4s steps(1) infinite; }

.wishes-list { display: flex; flex-direction: column; gap: 16px; max-height: 560px; overflow-y: auto; padding: 6px 6px 12px; scrollbar-width: thin; }
.wish-item { display: flex; align-items: flex-start; gap: 12px; }
.wish-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    margin: 3px;
    display: grid;
    place-items: center;
    font: 400 14px/1 var(--f-px);
    color: #fff;
    text-transform: uppercase;
    background: var(--av, var(--pink));
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum), inset 0 -4px 0 rgba(0, 0, 0, .12);
    text-shadow: 2px 2px 0 rgba(47, 33, 64, .35);
}
.wish-body {
    position: relative;
    flex: 1;
    min-width: 0;
    margin: 3px 3px 3px 6px;
    padding: 10px 12px 9px;
    background: var(--paper);
    box-shadow: 0 -3px 0 0 var(--plum), 0 3px 0 0 var(--plum), -3px 0 0 0 var(--plum), 3px 0 0 0 var(--plum), 4px 6px 0 0 var(--plum-s);
}
.wish-body::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -12px;
    width: 9px;
    height: 12px;
    background: var(--plum);
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
.wish-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.wish-name { font-weight: 700; font-size: 16px; color: var(--plum-d); overflow-wrap: anywhere; }
.wish-badge { padding: 3px 6px 2px; font: 400 7px/1.3 var(--f-px); text-transform: uppercase; color: var(--plum-d); }
.wish-badge.hadir { background: var(--mint); }
.wish-badge.tidak { background: #ffc7d3; }
.wish-badge.ragu { background: var(--gold-l); }
.wish-message { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.wish-time { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.wish-item.new { animation: pxIn .5s steps(5) both; }
.wish-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 10px; text-align: center; color: var(--muted); }
.wish-empty p { margin: 0; font-size: 15px; }
.we-heart { width: 34px; animation: heartBob 1.6s steps(4) infinite; }

/* ════════════════════════════════════════════════════════════════
   THE END
   ════════════════════════════════════════════════════════════════ */
.ending {
    position: relative;
    margin-top: 46px;
    padding: 44px 22px 34px;
    text-align: center;
    color: #efe7fb;
    background:
        linear-gradient(0deg, #7fcca2 0 34px, #5fb487 34px 40px, transparent 40px),
        linear-gradient(180deg, #2f2147 0%, #4b3570 55%, #8a64a8 100%);
    overflow: hidden;
}
.end-sky .e1 { top: 22px; left: 12%; }
.end-sky .e2 { top: 60px; right: 14%; width: 8px; animation-delay: -1s; }
.end-sky .e3 { top: 160px; left: 8%; width: 8px; animation-delay: -.5s; }
.end-sky .e4 { top: 120px; right: 8%; animation-delay: -1.7s; }
.end-title {
    margin: 0;
    font: 400 30px/1 var(--f-px);
    color: var(--gold-l);
    text-shadow: 3px 3px 0 var(--pink-d), 6px 6px 0 var(--plum-d);
}
.end-duo { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 26px 0 18px; }
.end-duo .hero { width: 44px; }
.end-heart { width: 20px; margin-bottom: 56px; animation: heartBob 1.6s steps(4) infinite; }

.credits {
    position: relative;
    height: 170px;
    margin: 0 auto 20px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.cr-roll { animation: roll 22s linear infinite; padding-top: 120px; }
.cr-roll p { margin: 0 0 18px; }
.cr-roll span { display: block; font: 400 7px/1.6 var(--f-px); color: #c8b8e8; text-transform: uppercase; letter-spacing: .08em; }
.cr-roll b { display: block; font: 600 17px/1.35 var(--f-ui); color: #fff; overflow-wrap: anywhere; }
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(-100%); } }

.end-copy { margin: 0 auto 18px; max-width: 34ch; font-size: 15px; color: #e6dcf7; }
.end-thanks { margin: 0; font: 400 10px/1.6 var(--f-px); color: var(--gold-l); animation: blink 1.4s steps(1) infinite; }
.end-names { margin: 12px 0 6px; font: 700 26px/1.2 var(--f-ui); color: #fff; overflow-wrap: anywhere; }
.end-salam { margin: 0 0 60px; font-size: 14px; color: #e6dcf7; }
.end-credit { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; font-size: 13px; color: var(--plum-d); }

/* ════════════════════════════════════════════════════════════════
   FX · TOAST · LIGHTBOX
   ════════════════════════════════════════════════════════════════ */
.fx-layer { position: fixed; inset: 0; z-index: 3000; pointer-events: none; overflow: hidden; }
.burst { position: fixed; display: block; margin: -8px 0 0 -8px; animation: burst 1s steps(8) forwards; }
.burst svg { display: block; width: 100%; height: 100%; }
@keyframes burst {
    0% { transform: translate(0, 0); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)); opacity: 0; }
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 3100;
    max-width: calc(100vw - 40px);
    padding: 11px 14px 10px;
    background: var(--plum);
    color: #fff;
    font: 400 9px/1.5 var(--f-px);
    text-align: center;
    box-shadow: 0 -3px 0 0 var(--plum-d), 0 3px 0 0 var(--plum-d), -3px 0 0 0 var(--plum-d), 3px 0 0 0 var(--plum-d);
    opacity: 0;
    transform: translate(-50%, 16px);
    transition: opacity .25s steps(3), transform .25s steps(3);
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-qr .toast { bottom: 90px; }

.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 7000;
    align-items: center;
    justify-content: center;
    background: rgba(47, 33, 64, .94);
    opacity: 0;
    transition: opacity .3s steps(3);
}
.lb-img-wrap { max-width: 92vw; max-height: 80vh; }
.lb-img-wrap img { max-width: 92vw; max-height: 80vh; box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--plum-d); }
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    width: 42px;
    height: 42px;
    border: 0;
    display: grid;
    place-items: center;
    background: var(--cream);
    color: var(--plum);
    font: 400 12px/1 var(--f-px);
    cursor: pointer;
    box-shadow: 0 -3px 0 0 var(--plum-d), 0 3px 0 0 var(--plum-d), -3px 0 0 0 var(--plum-d), 3px 0 0 0 var(--plum-d);
}
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; font: 400 10px/1 var(--f-px); }

.leaflet-container { font-family: var(--f-ui); }
.leaflet-control-attribution { font-size: 9px !important; }

/* ════════════════════════════════════════════════════════════════
   SMALL SCREENS + REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .logo { font-size: 38px; }
    .logo-l2 { font-size: 33px; }
    .ts-names { font-size: 20px; }
    .stage { padding-left: 14px; padding-right: 14px; }
    .portrait { width: 78px; height: 92px; }
    .char-name { font-size: 21px; }
    .sr-l { width: 74px; font-size: 13px; }
    .cd { gap: 7px; }
    .cd-box b { font-size: 36px; }
    .hp-h { width: 16px; height: 14px; }
}
@media (max-height: 700px) {
    .ts-top { padding-top: 26px; }
    .ts-kicker { margin-bottom: 10px; }
    .ts-date { margin-top: 8px; }
    .dl-label { font-size: 12px; }
    .dl-start { margin-top: 4px; }
    .ts-ground { padding-bottom: 16px; }
    .logo { font-size: 36px; }
    .logo-l2 { font-size: 31px; }
    .ts-names { margin-top: 18px; font-size: 20px; }
    .hero { width: 44px; }
    .ts-dialog { padding: 12px 12px 10px; }
    .ts-ground { padding-top: 12px; }
    .dl-guest { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html { scroll-behavior: auto; }
    .cr-roll { animation: none; padding-top: 0; }
    .credits { height: auto; -webkit-mask-image: none; mask-image: none; }
}
