.invitation-world{height:100svh;min-height:0!important;background:#345c42;overflow:hidden;color:#fff9e8}
.invitation-stage{position:relative;width:100%;height:100%;isolation:isolate;overflow:hidden;touch-action:manipulation;font-family:'PingFang SC','Microsoft YaHei',sans-serif}
.invitation-stage button{color:inherit;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.invitation-stage button:disabled{opacity:1}
.invitation-stage button:focus-visible{outline:4px solid #fff4aa;outline-offset:5px}
.invitation-stage [hidden]{display:none!important}
.inv-scenery{position:absolute;inset:0;z-index:-3;background:url('../public/assets/invitation/square.png') center/100% 100% no-repeat}
.inv-sunlight{position:absolute;inset:0;pointer-events:none;z-index:-2;background:linear-gradient(90deg,#17362363,transparent 39%),linear-gradient(180deg,#092b2b42,transparent 25%,transparent 76%,#322d2f50)}
.inv-hud{position:absolute;left:3%;right:3%;top:3%;display:flex;align-items:center;justify-content:space-between;z-index:20;gap:10px}
.inv-hud>div,.inv-hud-actions{display:flex;align-items:center;gap:12px}
.inv-home,.inv-icon{border:1px solid #fff5ce60;background:#284d41b8;backdrop-filter:blur(12px);box-shadow:0 4px 15px #0c241924;min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px}
.inv-home{padding:10px 16px;border-radius:30px;font-size:13px;font-weight:600}
.inv-icon{height:44px;width:44px;border-radius:50%;padding:0}
.inv-pause-icon{font:900 22px sans-serif;letter-spacing:-3px;margin-left:-3px}
.inv-chapter{font-size:12px;letter-spacing:2px;text-shadow:0 2px 8px #132d23}
.inv-title{position:absolute;left:4%;top:14%;z-index:3;text-shadow:0 2px 10px #163f2d88;pointer-events:none}
.inv-title>span{font-size:11px;letter-spacing:3px;color:#ffe9af;font-weight:700}
.inv-title h1{font-family:'Songti SC','STSong',serif;font-size:clamp(26px,3.6vw,58px);font-weight:900;letter-spacing:2px;line-height:1.35;margin-top:8px}
.inv-title p{font-size:clamp(11px,1.05vw,17px);letter-spacing:1px;margin-top:9px;color:#fff7e1}
.inv-progress{position:absolute;right:4%;top:14%;padding:12px 18px 14px;border-radius:20px;background:#fff8e6ed;color:#3b5748;box-shadow:0 5px 24px #523e1e26;border:1px solid #fffdf1;z-index:5}
.inv-progress small{display:block;font-size:10px;letter-spacing:2px;font-weight:700;margin-bottom:8px;color:#7e795b}
.inv-progress>div{display:flex;align-items:center;gap:8px}
.inv-progress i{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#dedaca;color:#a39677;font-style:normal;transition:background .3s,transform .3s}
.inv-progress i.sent{background:#3a8b6b;color:#fff8cf;transform:rotate(-5deg)}
.inv-count{font-size:13px;margin-left:4px;white-space:nowrap}
.inv-bunting{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;filter:drop-shadow(0 3px 2px #223d4b55)}
.inv-bunting>path{fill:none;stroke:#826743;stroke-width:3;opacity:0;transition:opacity .4s}
.inv-bunting .flag{fill:#ed9b58;opacity:0;transform:translateY(-8px);transition:opacity .4s,transform .4s}
.inv-bunting .flag:nth-child(3n){fill:#427f81}.inv-bunting .flag:nth-child(3n + 2){fill:#e5c866}
.bunting-1>path,.bunting-2>path,.bunting-3>path,.bunting-1 .flag-0,.bunting-2 .flag-0,.bunting-2 .flag-1,.bunting-3 .flag{opacity:1;transform:none}
.sprite{background-repeat:no-repeat;background-size:300% 200%;aspect-ratio:1;filter:drop-shadow(0 9px 5px #38291d35)}
.inv-mimi{position:absolute;background-image:url('../public/assets/invitation/mimi.png');width:24%;left:5.8%;top:49%;z-index:7;pointer-events:none;transition:filter .2s}
.inv-mimi[data-pose="joy"]{animation:inv-cheer .75s ease-in-out infinite alternate}
.inv-resident{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-77%);width:12%;background-color:transparent;background-image:url('../public/assets/invitation/residents.png');border:0;padding:0;z-index:3;transition:left 1s,top 1s,filter .3s;pointer-events:none}
.inv-resident.invited{filter:drop-shadow(0 7px 4px #36221538) drop-shadow(0 0 12px #fcef9c45)}
.inv-resident.invited::after{content:'♪';position:absolute;right:3%;top:0;color:#fff2aa;text-shadow:0 2px 2px #6b5734;font-size:27px;animation:inv-note 1.5s infinite}
.inv-resident:active{transform:translate(-50%,-77%) scale(.95)}
.inv-mailbox{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-25%);width:clamp(72px,7.4vw,120px);height:clamp(90px,10vw,160px);background:none;border:0;padding:0;z-index:6;filter:drop-shadow(0 7px 4px #5138194f)}
.inv-mailbox-body{position:absolute;top:0;left:6%;width:88%;height:65%;display:flex;align-items:center;justify-content:center;border-radius:40% 40% 13% 13%;border:3px solid #ac773f;background:linear-gradient(100deg,#d8ab6b,#fff0bf 40%,#deb67a);box-shadow:inset 3px 0 1px #fff1c57d,inset -4px -5px 0 #b17a3b77,0 2px 0 #86612e;transition:box-shadow .2s}
.inv-mailbox-body::before{content:'';position:absolute;left:-12%;right:-12%;height:18%;top:-1%;border-radius:70% 70% 3px 3px;background:linear-gradient(#5d9b8d,#286153);box-shadow:0 3px 0 #204735;border:2px solid #376653}
.mailbox-1 .inv-mailbox-body::before{background:linear-gradient(#c98b5e,#9c563b);border-color:#9f5c39;box-shadow:0 3px 0 #754329}
.mailbox-2 .inv-mailbox-body::before{background:linear-gradient(#8f9d6a,#5d734a);border-color:#526139;box-shadow:0 3px 0 #405031}
.inv-mailbox-body>b{font-family:Georgia,'Times New Roman',serif;font-size:clamp(27px,3.2vw,52px);font-weight:700;color:#365b4a;line-height:1;margin-top:7%;text-shadow:0 1px #fff8dc}
.inv-mailbox-slot{position:absolute;left:22%;right:22%;height:5%;border-radius:4px;bottom:8%;background:#725538;box-shadow:0 2px 0 #fff5cd}
.inv-post{position:absolute;width:14%;top:65%;height:27%;left:43%;background:linear-gradient(90deg,#87633d,#c6a372,#987448);box-shadow:2px 1px 2px #452b3b35;z-index:-1}
.inv-mailbox small{position:absolute;bottom:1%;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:clamp(9px,.8vw,12px);font-weight:600;background:#fff1cdc9;padding:3px 7px;border-radius:7px;color:#65543c}
.inv-mailbox-check{display:none;position:absolute;right:-13px;top:40%;background:#3c9165;border:2px solid #fff3c5;border-radius:50%;width:28px;height:28px;align-items:center;justify-content:center}
.inv-mailbox-check svg{width:19px;height:19px}
.inv-mailbox.delivered .inv-mailbox-check{display:flex}
.inv-mailbox.delivered .inv-mailbox-body{box-shadow:0 0 20px #ffdd7e,inset 3px 0 1px #fff1c5}
.inv-mailbox:hover .inv-mailbox-body,.inv-mailbox.aim-target .inv-mailbox-body{box-shadow:0 0 0 5px #fff8cba8,0 0 30px #ffe269;transform:translateY(-3px)}
.inv-mailbox:active{transform:translate(-50%,-25%) scale(.95)}
.inv-loose-letter{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:clamp(62px,7.5vw,120px);height:clamp(52px,5.5vw,90px);padding:0;background:transparent;z-index:9;touch-action:none!important;animation:inv-letter 3s ease-in-out infinite;animation-delay:calc(var(--n)*-.7s);filter:drop-shadow(0 9px 8px #273c283f)}
.inv-envelope{position:relative;display:block;width:100%;height:100%;border-radius:8px;border:2px solid #b89562;background:linear-gradient(140deg,#fff6df,#edd6a8);box-shadow:inset 0 0 0 3px #fff6d885,0 4px 0 #ae8753;overflow:hidden}
.inv-fold{position:absolute;width:76%;height:95%;border-bottom:1px solid #b58f5677;border-right:1px solid #b58f5677;transform:rotate(45deg);left:11%;top:-58%;background:linear-gradient(135deg,#fff9e9,#e9c98e)}
.inv-envelope>b{position:absolute;inset:10% 0 0;display:grid;place-items:center;font:700 clamp(28px,3.1vw,49px) Georgia,serif;color:#315844;text-shadow:0 1px #fff9ed;z-index:1}
.inv-envelope>i{position:absolute;right:7%;bottom:5%;font-style:normal;color:#bc7440;font-size:15px}
.inv-catch-label{position:absolute;left:50%;bottom:-25px;transform:translateX(-50%);white-space:nowrap;font-size:11px;color:#fff5d7;text-shadow:0 2px 4px #29452a;font-weight:700}
.inv-loose-letter.dragging{animation:none;z-index:18;filter:drop-shadow(0 15px 10px #26392155);cursor:grabbing}
.inv-finding.is-hidden{display:none}
.inv-bag-ring{position:absolute;left:14%;top:72%;width:15%;height:11%;border:3px dashed #fff9d055;border-radius:50%;transform:rotate(-12deg);pointer-events:none;opacity:0;transition:opacity .2s}
.invitation-stage:has(.inv-loose-letter.dragging) .inv-bag-ring{opacity:1}
.inv-launcher{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:clamp(72px,8vw,125px);height:clamp(72px,8vw,125px);background:none;padding:0;z-index:11;touch-action:none!important;filter:drop-shadow(0 8px 6px #402e2140)}
.inv-launcher-base{position:absolute;left:8%;right:8%;bottom:0;height:44%;border:3px solid #85623e;border-radius:18% 18% 30% 30%;background:repeating-linear-gradient(0deg,#9a764b 0 5px,#d6b780 5px 10px);box-shadow:inset 0 7px 0 #604928;transform:perspective(300px) rotateX(10deg)}
.inv-launcher-base::before,.inv-launcher-base::after{content:'';position:absolute;top:-100%;width:15%;height:130%;background:linear-gradient(90deg,#7b5834,#dbaf71,#88613c);border:2px solid #85562b;border-radius:8px;transform:rotate(-8deg)}
.inv-launcher-base::before{left:4%}.inv-launcher-base::after{right:4%;transform:rotate(8deg)}
.inv-launcher-pouch{position:absolute;left:8%;top:5%;width:84%;height:57%;transform:rotate(-9deg);border-bottom:5px solid #524a34;border-radius:15px;transition:transform .1s}
.dragging .inv-launcher-pouch{transform:rotate(-17deg) translate(-8px,8px)}
.inv-pull-arrow{position:absolute;left:-18%;bottom:13%;font-size:30px;color:#fff9d3;text-shadow:0 2px 5px #3c5532;animation:inv-pull 1.4s ease-in-out infinite}
.inv-trajectory{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:10;opacity:0;filter:drop-shadow(0 2px 2px #496240)}
.inv-trajectory.visible{opacity:1}.inv-trajectory circle{fill:#fff5b1;stroke:#9c8134;stroke-width:1}
.inv-landing{position:absolute;width:36px;height:17px;border:3px solid #fff5a6;box-shadow:0 0 18px #ffee9e;border-radius:50%;transform:translate(-50%,-50%);z-index:10;opacity:0;pointer-events:none}
.inv-landing.visible{opacity:1}.inv-landing.on-target{border-color:#fffde1;background:#ffed7590}
.inv-flight{position:absolute;width:clamp(40px,5vw,80px);height:clamp(30px,3.7vw,59px);transform:translate(-50%,-50%);z-index:17;pointer-events:none;filter:drop-shadow(0 8px 5px #45301955)}
.inv-flight .inv-envelope>b{font-size:26px}
.inv-stage-label{position:absolute;left:4%;bottom:4%;color:#fff7e7;background:#284c3eae;padding:8px 14px;border-radius:20px;font-size:12px;letter-spacing:1px;z-index:5;backdrop-filter:blur(6px)}
.inv-controls{position:absolute;left:59%;bottom:3%;transform:translateX(-50%);width:min(66%,850px);min-height:74px;background:#fff8e9f5;border:1px solid #fffbed;border-radius:24px;display:flex;align-items:center;gap:15px;padding:12px 15px;z-index:19;box-shadow:0 8px 30px #3833222e;color:#3e5547}
.inv-listen{flex-shrink:0;border-radius:15px;background:#337c62;box-shadow:0 3px 0 #225b47;color:#fffaeb!important;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;min-height:48px;font-size:14px;font-weight:700;min-width:135px}
.inv-listen small{font-size:11px;font-weight:500}.inv-listen>b{font:700 30px Georgia,serif}
.inv-directions{flex:1;min-width:0;line-height:1.7}.inv-directions p{font-size:clamp(11px,1.1vw,16px);font-weight:600}
.inv-reference{font-size:10px;color:#89744c}.inv-reference:empty{display:none}
.inv-help{flex-shrink:0;background:#e6dcc5;border-radius:50%;width:44px;height:44px;display:grid;place-items:center;color:#847149!important}
.inv-primary,.inv-secondary{min-height:44px;padding:13px 20px;border-radius:15px;display:inline-flex;gap:8px;align-items:center;justify-content:center;font-size:14px;font-weight:700;white-space:nowrap}
.inv-primary{background:#32795f;box-shadow:0 4px 0 #255944;color:#fff8e5!important}.inv-secondary{background:#e9dec6;color:#665739!important}
.inv-festival-copy{flex:1}.inv-festival-copy b{display:block;font-size:17px}.inv-festival-copy span{font-size:12px;display:block;margin-top:5px;color:#778067}
.is-festival .inv-mailbox{pointer-events:none;opacity:.7}
.is-festival .inv-mimi{left:49%;top:43%;width:24%;animation:inv-cheer .85s infinite alternate}
.is-festival .inv-resident{width:16%;pointer-events:auto;z-index:8;cursor:pointer}
.inv-resident.playing{animation:inv-musician .65s ease-in-out 3}
.inv-bell,.inv-windmill{position:absolute;bottom:22%;width:clamp(48px,5vw,75px);height:clamp(48px,5vw,75px);border:3px solid #d4a957;background:linear-gradient(#ffe6a0,#c99449);color:#674a30!important;border-radius:50%;box-shadow:0 5px 0 #a47841,0 8px 10px #4b3a2240;z-index:10}
.inv-bell{left:15%}.inv-windmill{right:16%;font-size:45px;background:#4e8a76;color:#ffdf8a!important}.inv-windmill.playing{animation:inv-spin 1.4s ease-out}
.inv-burst{position:absolute;pointer-events:none;z-index:18}.inv-burst i{position:absolute;color:#fff1a1;text-shadow:0 2px #ae783c;font:700 24px Georgia;animation:inv-burst 1s ease-out both;--angle:calc(var(--n)*45deg)}
.inv-burst.notes i{color:#fff5c5}
.inv-festival-lights{position:absolute;inset:0;pointer-events:none;z-index:3}.inv-festival-lights i{position:absolute;width:5px;height:5px;background:#fff3a8;border-radius:50%;box-shadow:0 0 13px #ffe579;left:calc(18% + var(--n)*7%);top:calc(38% + var(--n)*3%);animation:inv-glow 1.5s ease-in-out infinite alternate;animation-delay:calc(var(--n)*-.3s)}
.inv-pause-screen{position:absolute;inset:0;background:#153e35ad;backdrop-filter:blur(10px);display:grid;place-items:center;z-index:40}
.inv-pause-screen>div{background:#fff8e5;color:#365746;padding:36px 45px;border:2px solid #f7d8a0;border-radius:32px;text-align:center;box-shadow:0 20px 80px #182d2355}
.inv-pause-screen h2{font:700 28px 'Songti SC',serif;margin:12px 0 24px}.inv-pause-screen>div>span{font-size:12px;color:#9a8869;letter-spacing:3px}.inv-pause-screen button{margin:5px}
.inv-leaves{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}.inv-leaves i{position:absolute;width:12px;height:7px;border-radius:80% 0 80% 0;background:#e2c86d;top:calc(12% + var(--n)*9%);left:-20px;animation:inv-drift 15s linear infinite;animation-delay:calc(var(--n)*-2s);opacity:.6}
.inv-help-glow{filter:drop-shadow(0 0 15px #fff9a3)!important}.inv-wrong{animation:inv-wrong .45s ease-in-out!important}
.invitation-frozen *,.no-motion .invitation-stage *{animation-play-state:paused!important}
@keyframes inv-letter{0%,100%{transform:translate(-50%,-50%) rotate(-8deg)}50%{transform:translate(-50%,-64%) rotate(5deg)}}
@keyframes inv-cheer{from{translate:0 0}to{translate:0 -9px}}
@keyframes inv-note{from{translate:0 8px;opacity:0}40%{opacity:1}to{translate:8px -20px;opacity:0}}
@keyframes inv-pull{50%{translate:-7px 7px;opacity:.6}}
@keyframes inv-drift{to{transform:translate(110vw,15vh) rotate(400deg)}}
@keyframes inv-burst{from{transform:rotate(var(--angle)) translateX(5px) rotate(calc(-1*var(--angle)));opacity:1}to{transform:rotate(var(--angle)) translateX(75px) rotate(calc(-1*var(--angle)));opacity:0}}
@keyframes inv-glow{to{opacity:.2;scale:.5}}
@keyframes inv-spin{to{rotate:720deg}}
@keyframes inv-musician{50%{translate:0 -12px;rotate:-5deg}}
@keyframes inv-wrong{25%{translate:-7px 0}75%{translate:7px 0}}
@media(max-height:560px){.inv-hud{top:3%}.inv-title{top:17%}.inv-title h1{margin-top:3px}.inv-title p{margin-top:4px}.inv-progress{top:18%;padding:8px 12px}.inv-progress small{font-size:9px;margin-bottom:5px}.inv-progress i{width:25px;height:25px;border-radius:8px}.inv-progress svg{width:18px;height:18px}.inv-controls{min-height:60px;padding:8px 10px;gap:10px;border-radius:18px}.inv-listen{min-width:107px;font-size:12px;padding:8px 10px;gap:6px;min-height:44px}.inv-reference{font-size:9px}.inv-title>span{font-size:9px;letter-spacing:2px}.inv-stage-label{font-size:10px;padding:7px 10px}.inv-festival-copy b{font-size:14px}.inv-festival-copy span{font-size:10px}.inv-primary,.inv-secondary{font-size:12px;padding:10px 13px}.inv-catch-label{font-size:10px;bottom:-19px}}
@media(max-width:720px){.inv-chapter{display:none}.inv-home{padding:8px 11px;font-size:11px}.inv-hud-actions{gap:8px}.inv-title h1{font-size:27px}.inv-title p{font-size:10px;letter-spacing:0}.inv-title{top:19%;left:4%}.inv-title>span{display:none}.inv-progress{top:20%;right:3%;border-radius:14px}.inv-progress small{display:none}.inv-progress>div{gap:5px}.inv-count{font-size:11px}.inv-controls{left:62%;width:72%;bottom:3%;gap:7px}.inv-listen{min-width:90px;font-size:11px;padding:8px}.inv-listen small{font-size:9px}.inv-listen>b{font-size:25px}.inv-help{width:44px;height:44px}.inv-directions{line-height:1.4}.inv-directions p{font-size:10px}.inv-reference{font-size:8px}.inv-stage-label{left:3%;bottom:3.5%;font-size:9px;padding:7px 9px}.inv-mimi{top:49%;width:27%;left:4%}.inv-mailbox{width:62px;height:82px}.inv-mailbox-body>b{font-size:30px}.inv-mailbox small{font-size:8px;padding:2px 5px}.inv-mailbox-check{width:21px;height:21px;right:-8px}.inv-mailbox-check svg{width:14px;height:14px}.inv-catch-label{font-size:9px}.inv-launcher{width:62px;height:65px}.inv-pull-arrow{font-size:23px}.inv-loose-letter{width:61px;height:48px}.inv-envelope>b{font-size:30px}.inv-festival-copy b{font-size:12px}.inv-festival-copy span{font-size:9px}.festival-controls{width:78%;left:58%}.inv-primary,.inv-secondary{padding:10px;font-size:11px;gap:5px}.inv-primary svg,.inv-secondary svg{width:17px}.inv-festival-copy{max-width:150px}.inv-resident.invited::after{font-size:18px}}
@media(orientation:portrait){.allow-portrait .invitation-world{display:flex;align-items:center;justify-content:center;background:#2b4f3f}.allow-portrait .invitation-stage{height:min(100svh,70vw);min-height:300px;overflow:visible}.allow-portrait .inv-title h1{font-size:21px}.allow-portrait .inv-title p,.allow-portrait .inv-title>span,.allow-portrait .inv-progress small,.allow-portrait .inv-progress i,.allow-portrait .inv-catch-label{display:none}.allow-portrait .inv-progress{top:24%;padding:7px}.allow-portrait .inv-controls{left:50%;width:96%;bottom:-90px;min-height:78px}.allow-portrait .inv-stage-label{display:none}.allow-portrait .inv-mailbox{width:48px;height:70px}.allow-portrait .inv-mailbox small{display:none}.allow-portrait .inv-loose-letter{width:48px;height:44px}.allow-portrait .inv-envelope>b{font-size:25px}.allow-portrait .inv-launcher{width:52px;height:56px}.allow-portrait .inv-mimi{top:44%;width:31%}.allow-portrait .inv-hud{top:3%}.allow-portrait .inv-title{top:22%}.allow-portrait .inv-hud .inv-icon{width:44px;height:44px}.allow-portrait .inv-pause-screen>div{padding:15px}.allow-portrait .inv-pause-screen h2{font-size:22px;margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){.invitation-stage *{animation:none!important;transition:none!important}}

.invitation-map-entry{display:flex;align-items:center;gap:5px;min-height:44px;padding:5px 0;margin-top:4px;background:transparent;color:#27745b;font-size:11px;font-weight:600}.invitation-map-entry svg{width:15px;height:15px}.continue-card:has(.invitation-map-entry){align-items:center}
