.welcome-letter{position:fixed;z-index:8;top:20%;left:50%;translate:-50% 0;display:grid;grid-template-columns:90px auto;align-items:center;gap:4px 14px;padding:18px 28px;background:#fff9e9f2;border:2px solid #a9bd90;border-radius:30px;box-shadow:0 12px 35px #25462d30;pointer-events:none;color:#35583e;max-width:90vw}
.welcome-momo{width:90px;height:100px;object-fit:contain;grid-row:1/3}.welcome-letter strong{font-size:clamp(23px,4vw,34px);white-space:nowrap}.welcome-letter button{pointer-events:auto;min-height:44px}.flying-letter{position:absolute;left:30px;top:-34px;font-size:62px;color:#476d5b;filter:drop-shadow(0 5px 2px #243c3b25)}
.welcome-gift{position:absolute;width:36px;height:36px;object-fit:contain;left:13px;top:20px;rotate:-10deg;background:#fff7dc;border-radius:50%;padding:2px}
@media(min-width:700px){.welcome-letter{left:24px;top:110px;translate:0}}
#dialog:has(.momo-request-film){width:min(780px,94vw)}
#dialogBody:has(.momo-request-film)>h2{margin:2px 0 10px}#dialogBody:has(.momo-request-film)>p{font-size:21px;font-weight:700;margin:12px 0}#dialogBody:has(.momo-request-film)>button.primary{width:100%;min-height:56px}
.momo-request-film{position:relative;margin:0;border:1px solid #b7c6a7;border-radius:20px;overflow:hidden;background:#e9efd9}.momo-request-film video{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;max-height:48vh;background:#d8e5c8}.film-control{position:absolute;right:10px;top:10px;min-height:44px;background:#fff9e9e8!important;color:#35583e;font-size:16px}
.gift-route{display:flex;align-items:center;justify-content:center;gap:14px;padding:8px;background:#fff8e8}.gift-route img{width:46px;height:46px;object-fit:contain}.gift-route>span{font-size:27px}.gift-route strong{font-size:16px}.gift-boat{color:#397583}
@media(orientation:landscape){.momo-request-film video{max-height:32vh}}
.cup-practice{position:relative;display:flex;align-items:center;justify-content:center;gap:48px;width:min(100%,560px);height:235px;margin:12px auto 20px;background:radial-gradient(ellipse at 50% 85%,#d7ddbf 0 37%,transparent 38%);isolation:isolate}
.cup-practice .practice-cup{position:relative;z-index:3;width:145px;height:150px;padding:0;border:0;background:transparent;box-shadow:none;touch-action:none;cursor:grab}.practice-cup img{width:100%;height:100%;pointer-events:none}.cup-practice .practice-box{position:relative;width:170px;height:155px;border:0;background:transparent;box-shadow:none;padding:0}.box-opening{position:absolute;top:12px;left:0;width:100%;height:70px;background:#a47f4d;border:9px solid #e6cea3;transform:skewY(-7deg);border-radius:8px}.box-front{position:absolute;inset:57px 0 0;background:#d3b282;border:3px solid #b59365;border-radius:0 0 9px 9px;color:#fff2da;font-size:40px;display:grid;place-items:center;z-index:4;pointer-events:none}.practice-arrow{position:absolute;left:48%;top:60px;font-size:38px;color:#5a8056;pointer-events:none}.cup-held .practice-box{outline:3px dashed #75956a;outline-offset:10px;border-radius:12px}.cup-placed .practice-cup{translate:218px 30px;scale:.7;z-index:2;pointer-events:none}.cup-placed .practice-box{outline:none}.cup-placed .practice-arrow{visibility:hidden}
.cup-practice button:focus-visible{outline:3px solid #527850;outline-offset:5px}.story-welcome:has(.cup-practice){overflow:auto;padding-bottom:30px}.story-welcome:has(.cup-practice)>h2{margin:8px 0}.story-welcome:has(.cup-practice)>p{font-size:20px;margin:8px 0}.story-welcome:has(.cup-practice)>button{min-height:58px}
@media(max-width:550px){.gift-route{gap:8px}.gift-route strong{font-size:14px}.welcome-letter{padding:14px 18px;grid-template-columns:65px auto}.welcome-momo{width:65px;height:80px}}
@media(prefers-reduced-motion:no-preference){.flying-letter{animation:letter-arrives 1.1s cubic-bezier(.2,.7,.2,1) both}.welcome-momo{animation:momo-hello .65s 1.1s ease-in-out 2}.cup-placed .practice-cup{transition:translate .35s ease-out,scale .35s ease-out}.cup-held .practice-arrow{animation:cup-cue .8s ease-in-out 2}@keyframes letter-arrives{from{transform:translate(50vw,-80px) rotate(25deg)}to{transform:translate(0,0) rotate(-12deg)}}@keyframes momo-hello{50%{transform:rotate(-8deg) translateY(-7px)}}@keyframes cup-cue{50%{transform:translateX(12px)}}}

.story-welcome .cup-practice button{margin:0;padding:0;background:transparent;color:#476551;border:0;box-shadow:none}.story-welcome .cup-practice .practice-cup{background:transparent}.story-welcome .cup-practice .practice-box{background:transparent}
@media(prefers-reduced-motion:no-preference){.gift-finished .look-preview:not([data-action]) .parcel-band{animation:ribbon-tighten .4s .15s both}.gift-finished .look-preview:not([data-action]) .parcel-bow{animation:bow-settle .4s .35s both}.gift-finished .look-preview:not([data-action]) .personal-stamp{animation:stamp-press .3s .65s both}.gift-boat{animation:boat-rock 1.5s ease-in-out 2}@keyframes boat-rock{50%{transform:rotate(8deg) translateY(-3px)}}}
.cup-practice{width:min(100%,640px);height:310px;gap:70px;background:radial-gradient(ellipse at 50% 80%,#d7ddbf 0 39%,transparent 40%)}
.cup-practice .practice-cup{width:185px;height:200px;flex:none}.cup-practice .practice-box{width:220px;height:185px;flex:none}.practice-arrow{left:calc(50% - 35px);top:95px;width:35px;text-align:center}.cup-placed .practice-cup{translate:272.5px -40px;scale:.7}
.portrait .story-welcome:has(.cup-practice){padding-top:180px}.portrait .story-welcome:has(.cup-practice)>h2{font-size:34px}.portrait .story-welcome:has(.cup-practice)>p{font-size:24px}.portrait .story-welcome:has(.cup-practice)>.cup-practice{margin-top:45px;margin-bottom:36px}.portrait .story-welcome:has(.cup-practice)>button{min-height:68px;font-size:25px;padding:14px 32px}


#dialogBody:has(.film-finished)>button.primary,.story-welcome:has(.cup-placed)>button{outline:3px solid #98b17d;outline-offset:4px}
@media(prefers-reduced-motion:no-preference){#dialogBody:has(.film-finished)>button.primary,.story-welcome:has(.cup-placed)>button{animation:next-invitation .4s ease-out}@keyframes next-invitation{from{translate:0 4px}to{translate:0 0}}}

.postal-entering #task,.postal-entering #markers,.postal-entering #routeMap,.postal-entering footer{visibility:hidden;pointer-events:none}
#skipPostalEntrance{position:fixed;right:24px;bottom:32px;z-index:10;min-height:52px;padding:12px 28px;background:#fff8e8ed;border:1px solid #aabb94;border-radius:22px;color:#35583e;font-weight:700;box-shadow:0 4px 0 #536b452b}
@media(prefers-reduced-motion:no-preference){.practice-box.drop-ready{animation:cup-target .6s ease-in-out infinite}.cup-placed .box-front{animation:box-settles .35s ease-out}@keyframes cup-target{50%{filter:brightness(1.13)}}@keyframes box-settles{50%{transform:translateY(4px)}}}
.practice-box.drop-ready{outline:4px solid #78996a;outline-offset:8px;border-radius:12px}
/* Entry film fills the viewport; contain preserves the actual frame on portrait tablets. */
dialog.entry-opening[open]{position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;overflow:hidden;background:#25382c;box-shadow:none;color:#fff8e7}
dialog.entry-opening::backdrop{background:#17281e}
.entry-opening:before{content:'';position:absolute;inset:-30px;background:linear-gradient(#23392c66,#23392c66),var(--entry-poster) center/cover;filter:blur(22px);pointer-events:none}
.entry-opening .entry-film{position:relative;display:block;width:100%;height:100%;max-height:none;object-fit:contain}
.entry-opening .entry-skip{position:absolute;right:max(20px,env(safe-area-inset-right));top:max(20px,env(safe-area-inset-top));min-height:48px;padding:10px 22px;border:1px solid #e6ddbd;border-radius:24px;background:#fff8e8eb;color:#375641;font-size:18px;box-shadow:0 3px 10px #14251b33}
.entry-opening .entry-title{position:absolute;bottom:max(25px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);font-size:clamp(18px,3vw,27px);white-space:nowrap;text-shadow:0 2px 5px #1c3022;background:#253a2c88;padding:10px 20px;border-radius:22px;pointer-events:none}
.entry-opening .entry-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);min-height:64px;padding:16px 28px;border-radius:28px;background:#fff6df;color:#375641;border:2px solid #abc08b;font-size:22px;white-space:nowrap}
.entry-opening .entry-play[hidden]{display:none}
