/* Full illustrated spaces, with interactive objects and readable paper above them. */
body:not([data-view=login]){background:#ede1c7;overflow:hidden}
html[data-theme=night] body:not([data-view=login]){background:#17282e}
body[data-view=about]{overflow:auto}
.immersive-shell{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100vh;height:100svh;height:100dvh;min-height:0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);overflow:hidden}
.immersive-stage.friends-town{position:relative;width:min(100%,calc((100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .47126));width:min(100%,calc((100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .47126));height:100%;padding:0;border:0;border-radius:0;transform:none;box-shadow:0 0 70px #67412424;background:#e7cf9e;isolation:isolate;overflow:hidden;container-type:inline-size;color:#633c25}
.immersive-stage>.immersive-image{position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:fill}
.immersive-stage button{touch-action:manipulation}
.immersive-stage button:focus-visible{outline:3px dashed #a9583d;outline-offset:2px}
.illustrated-title{position:absolute;left:12%;top:5.7%;width:34%;font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;font-size:clamp(19px,5.7cqw,29px);font-style:normal;font-synthesis:none;letter-spacing:2px;text-align:center;line-height:1.4;color:#613c24;z-index:2;font-weight:600;text-shadow:0 1px #ffedc6;pointer-events:none}
.home-room .illustrated-title{left:15.5%;top:7%;width:32%;height:3%;display:grid;place-items:center;font-size:12px;font-size:clamp(12px,3.4cqw,18px);letter-spacing:.4px;line-height:1.2;white-space:nowrap}
.mail-room .illustrated-title{left:24%;top:6%;width:52%;font-size:clamp(21px,6.7cqw,33px)}
.garden-room .illustrated-title{left:11%;top:8%;width:32%;font-size:clamp(18px,5.6cqw,28px)}
.illustrated-nav{position:absolute;z-index:30;left:3%;right:3%;bottom:2.6%;height:9%;display:flex;align-items:end;justify-content:space-between;gap:3%;padding:0}
.nav-token{position:relative;flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-width:0;min-height:54px;height:80%;padding:5px 1px 4px;background:repeating-linear-gradient(2deg,transparent 0 7px,#b77c3525 8px 9px),linear-gradient(100deg,#ffe1a8,#e4b67b 70%,#ffdda0);border:1.5px solid #a36c3b;border-radius:42% 38% 23% 23%;box-shadow:0 4px 0 #9f693b,0 6px 4px #60402035;color:#663d22;font-weight:650;font-size:clamp(11px,3.2cqw,15px);transition:transform .15s}
.nav-token>.icon{margin-top:-25%;width:clamp(25px,9.4cqw,47px);height:clamp(25px,9.4cqw,47px);stroke:#6a432a;stroke-width:1.5;filter:drop-shadow(0 2px #fff4cb);fill:#ffead3}
.nav-token:nth-child(1)>.icon{fill:#f4caa2}.nav-token:nth-child(2)>.icon{fill:#fff9e7}.nav-token:nth-child(3)>.icon{fill:#e89178}.nav-token:nth-child(4)>.icon{fill:#d1dba7}.nav-token:nth-child(5)>.icon{fill:#f0b0af}
.nav-token.active{outline:2px solid #fff8d8;outline-offset:3px;background-color:#ffdeb2;box-shadow:0 4px 0 #b27e44,0 0 17px #ffedb2;font-weight:800}
.nav-token .nav-dot{position:absolute;right:12%;top:5%;width:8px;height:8px;border:1px solid #fff6e6}
.scene-identity{position:absolute;z-index:4;left:10%;top:12.8%;display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;min-width:84px;padding:2px 10px;background:linear-gradient(100deg,#ffebc9,#e6bb85);border:1.5px solid #9e6b3e;border-radius:23px;color:#6d452c;font-size:13px;font-weight:700;box-shadow:0 3px 0 #b67d4855}
.scene-identity .avatar{width:25px;height:25px;font-size:12px;border-color:#fff1d1}
.immersive-stage .theme-control{position:absolute;z-index:4;top:6.7%;right:4%;margin:0;display:block;width:39%}
.immersive-stage .theme-control [data-theme-status]{display:none}
.immersive-stage .theme-options{width:100%;border-radius:15px;background:linear-gradient(105deg,#ffdc9c,#f4c78b);padding:2px;border:1.5px solid #aa7346;box-shadow:0 4px 0 #a46e3a55}
.immersive-stage .theme-options button{min-width:0;flex:1;min-height:44px;font-size:clamp(10px,2.8cqw,14px);padding:2px 3px;border-radius:12px;color:#775434;font-weight:700}
.immersive-stage .theme-options button[aria-pressed=true]{background:#ffefc6;color:#67401f;outline:2px solid #fff8df;outline-offset:-2px;box-shadow:0 0 9px #fff2bc}
.building-link{position:absolute;z-index:3;font-size:clamp(12px,3.3cqw,17px);font-weight:750;letter-spacing:1px;min-height:44px;padding:4px 7px;background:repeating-linear-gradient(0deg,transparent 0 8px,#c8975a22 9px),#f5d79c;border:1.5px solid #a37140;border-radius:8px;color:#6c4227;box-shadow:1px 3px 0 #9b693d50;white-space:nowrap}
.home-house{left:12%;top:28%;width:31%}.home-mail{left:67%;top:39%;width:25%}.home-tree{left:73%;top:21.5%;width:23%}
.scene-calendar{position:absolute;left:6%;top:44%;width:30%;height:11%;background:linear-gradient(110deg,#ffedc8,#fff6d7);border:2px solid #bd8850;border-radius:7px;transform:rotate(-5deg);box-shadow:2px 4px 0 #aa7742;display:flex;align-items:center;justify-content:center;flex-direction:column;z-index:2;color:#754b2f;padding:5px;line-height:1.4}
.scene-calendar>span{font-size:clamp(9px,2.8cqw,13px);white-space:nowrap}.scene-calendar>strong{font-family:Georgia,serif;font-weight:650;font-size:clamp(26px,9cqw,45px);line-height:1.2;color:#a6543c}.scene-calendar small{font-family:inherit;font-size:13px;margin-left:3px}.scene-calendar b{font-weight:650}
.immersive-stage .wall-frame{width:14.8%;height:8.4%;padding:0;z-index:2;min-height:44px;overflow:hidden}
.immersive-stage .frame-1{left:11.4%;top:15%}.immersive-stage .frame-2{left:31%;top:15%}.immersive-stage .frame-3{left:11.4%;top:25%}.immersive-stage .frame-4{left:31%;top:25%}
.immersive-stage .wall-frame>img,.immersive-stage .wall-frame>.frame-placeholder{width:100%;height:75%;border:1px solid #fff6e5;background:#eddfcc;box-shadow:none;display:grid;place-items:center;color:#bcaa95}
.immersive-stage .wall-frame>.frame-placeholder svg{width:22px;height:22px}
.immersive-stage .wall-frame>span:last-child:not(.frame-placeholder){font-size:8px;line-height:1.5;width:100%;height:25%;border:0;margin:0;background:#ffe7c0;color:#8e6c49;padding:0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.closed-journal{position:absolute;z-index:3;left:23%;top:56%;width:53%;height:12%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;transform:rotate(9deg);color:#71452e;border-radius:8px;background:transparent}
.closed-journal>span>.icon{width:28px;height:28px;fill:#af8860;color:#fff0cd;stroke-width:1.7}.closed-journal>b{font-size:clamp(15px,5.3cqw,26px);letter-spacing:2px}.closed-journal>i{position:absolute;left:4%;top:15%;font-size:20px;color:#ffd8a4}
.journal-pencil{position:absolute;left:82%;top:66.8%;width:13%;height:10%;z-index:4;display:grid;place-items:center;padding:0;color:#75482a;font-size:11px;font-size:clamp(11px,2.9cqw,14px);writing-mode:horizontal-tb;direction:ltr;transform:translate(-50%,-50%) rotate(-10deg);min-height:44px;min-width:44px}
.journal-pencil-label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;writing-mode:horizontal-tb;pointer-events:none}
.journal-pencil-copy{display:block;writing-mode:vertical-rl;text-orientation:upright;direction:ltr;white-space:nowrap;line-height:1;letter-spacing:1.5px;flex:none}
.journal-pencil .icon{width:12px;height:12px;flex:none}
.immersive-stage .mail-cubby{top:26%;height:5%;width:19%;min-height:44px;font-size:clamp(11px,3cqw,15px);padding:3px 0;justify-content:center;flex-direction:row;gap:2px;background:#f4d6a0;border:1px solid #b0804c;box-shadow:0 2px 0 #a9764344;border-radius:5px;text-shadow:none;z-index:3}
.immersive-stage .mail-cubby::before{display:none}.immersive-stage .cubby-received{left:9%}.immersive-stage .cubby-sent{left:31%}.immersive-stage .unread-pill{position:absolute;right:-6px;top:-7px;background:#c77364;border:1px solid #fff0ca;color:#fff9ef;min-width:18px;padding:0 4px;font-size:10px}
.immersive-stage .birthday-envelope{left:8%;top:50%;height:8%;width:22%;z-index:4;min-height:44px;font-size:12px}.immersive-stage .birthday-envelope .icon{height:26px;width:26px}.immersive-stage .birthday-envelope span{font-size:12px}
.immersive-stage .counter-letter{left:20%;top:58.5%;width:61%;height:8%;padding:3%;transform:rotate(0);z-index:3;align-items:center;justify-content:center;gap:0;min-height:44px;border:0;box-shadow:none;background:transparent;color:#724b31}
.immersive-stage .counter-letter>.icon{width:28px;height:28px}.immersive-stage .counter-letter>b{min-height:0;margin:0;padding:0;border:0;align-self:auto;background:none;box-shadow:none;color:#70472b;font-size:clamp(17px,6cqw,28px);letter-spacing:3px}
.immersive-stage .delivery-animation{z-index:25;bottom:24%;left:8%;right:8%;color:#795435;min-height:54px}.immersive-stage .delivery-animation strong{font-size:12px}
.immersive-stage .tree-wish-tag{width:12%;height:8%;min-height:44px;z-index:4;padding:3% 1% 1%;border-radius:7px;background:#fff0c9;color:#704f2d}
.immersive-stage .tag-copy{font-size:clamp(10px,2.9cqw,14px);line-height:1.3;letter-spacing:1px;max-height:90%;max-width:100%}
.immersive-stage .tag-ribbon{height:20px;top:-14px}.immersive-stage .tag-ribbon::after{width:12px;height:6px;top:10px}
.immersive-stage .tree-wish-tag>.wish-flower{right:-15px;top:-12px;transform:scale(.65);transform-origin:50% 50%}
.immersive-stage .wish-book-object,.immersive-stage .wish-basket-object{top:63%;height:8%;font-size:clamp(13px,4cqw,20px);min-height:44px;z-index:4;border:0;box-shadow:none;background:#ffecc1a1}
.immersive-stage .wish-book-object{left:9%;width:32%;transform:rotate(-6deg)}.immersive-stage .wish-basket-object{left:67%;width:28%;transform:rotate(3deg)}
.immersive-stage .wish-book-object svg,.immersive-stage .wish-basket-object svg{height:23px;width:23px}
/* Independent actors stay visible, so the same elements can move without leaving a copy. */
.immersive-stage .scene-residents{position:absolute;inset:0;display:block;padding:0;width:100%;height:100%;pointer-events:none;z-index:5;isolation:auto}
.immersive-stage .scene-residents .town-character{position:absolute;display:block;pointer-events:auto;min-width:44px;min-height:44px;width:28%;height:auto;aspect-ratio:1;border:0;padding:0;bottom:auto;border-radius:42%;background:none;box-shadow:none;transform:none}
.immersive-stage .scene-residents .resident-motion{position:relative;left:0;top:0;width:100%;height:100%;opacity:1;background:none;box-shadow:none;border-radius:0}
.immersive-stage .scene-residents .sprite{width:100%;height:100%;filter:drop-shadow(0 3px 2px #76502320)}
.immersive-stage .scene-residents .resident-name{display:none}
.immersive-stage .scene-residents .resident-reaction{font-size:12px;min-width:60px;max-width:160px;bottom:96%;left:50%;padding:7px 9px;color:#765333}
.immersive-stage[data-scene=home] .chii{left:8%;top:60%}.immersive-stage[data-scene=home] .hachi{left:38%;top:58%}.immersive-stage[data-scene=home] .usagi{left:70%;top:55%}
.immersive-stage[data-scene=daily] .chii{left:6%;top:35%}.immersive-stage[data-scene=daily] .hachi{left:39%;top:43%}.immersive-stage[data-scene=daily] .usagi{left:70%;top:32%}
.immersive-stage[data-scene=mail] .chii{left:3%;top:38%}.immersive-stage[data-scene=mail] .hachi{left:35%;top:34%}.immersive-stage[data-scene=mail] .usagi{left:69%;top:32%}
.immersive-stage[data-scene=garden] .chii{left:8%;top:47%}.immersive-stage[data-scene=garden] .hachi{left:42%;top:48%}.immersive-stage[data-scene=garden] .usagi{left:69%;top:38%}
.immersive-stage .scene-loading-note{display:none;position:absolute;left:10%;right:10%;bottom:25%;z-index:40;pointer-events:auto;padding:8px 12px;border:1px dashed #ab8351;background:#fff5dce8;border-radius:8px;font-size:12px;color:#755536}
.immersive-stage:has(.immersive-image[data-scene-image=failed]) .scene-loading-note{display:block}.scene-loading-note button{text-decoration:underline;min-height:44px}
/* A real scrollable book or stationery, above the unchanged scene. */
#modal.object-dialog{--ink:#694b33;--muted:#9a7f5c;--line:#dec7a1;--green:#89956a;--green-dark:#697a4a;padding:0;width:min(760px,calc(100% - 20px));max-height:78vh;max-height:78svh;max-height:78dvh;overflow:hidden;border:3px solid #b17a49;border-radius:22px 22px 12px 12px;background:#fff1d7;color:#694b33;box-shadow:0 5px 0 #805537,0 10px 0 #d6ae77,0 22px 55px #2f211a55;margin:auto auto max(8svh,env(safe-area-inset-bottom));}
#modal.object-dialog::backdrop{background:#32241566;backdrop-filter:blur(1.5px)}
#modal-content{display:flex;flex-direction:column;max-height:inherit;min-height:0;padding:0;background:radial-gradient(ellipse at 0 0,#efd8a238,transparent 45%),repeating-linear-gradient(0deg,transparent 0 30px,#e5ce9b1f 31px),#fff5df}
#modal-content>.dialog-header{position:relative;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:8px;margin:0;padding:17px 18px 14px;border-bottom:1px dashed #d8b887;background:linear-gradient(110deg,#f7e5c7,#fff5dd);min-height:68px}
#modal-content>.dialog-header::before{content:'✿';color:#dbaa7d;font-size:23px;line-height:1}
#modal-content .dialog-header h2{font-family:ui-rounded,"PingFang SC",sans-serif;font-size:21px;font-weight:750;letter-spacing:2px;flex:1;text-align:left;color:#714b2a;overflow-wrap:anywhere}
#modal-content .modal-close{display:flex;flex-direction:column;align-items:center;justify-content:center;width:45px;min-width:45px;height:54px;background:#eaa99b;border:1px solid #c47d69;border-radius:5px 5px 13px 13px;color:#804636;font-size:26px;box-shadow:0 2px 0 #b8765e}
#modal-content .modal-close small{display:block;font-size:11px;line-height:1.5}
#modal-content .object-back{min-height:44px;min-width:54px;font-size:12px;padding:3px 7px;background:#f3dfbb;border-radius:8px;color:#7a5938}
.object-pages{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:20px 19px 28px;scrollbar-width:thin;scrollbar-color:#d6b080 transparent;scroll-padding:18px 0 90px;color:#725136}
#modal[data-scene=daily] #modal-content{background:linear-gradient(90deg,transparent 49.5%,#d6b78038 49.9%,transparent 51%),repeating-linear-gradient(0deg,transparent 0 30px,#dec49222 31px),#fff5df}
#modal[data-scene=mail],#modal[data-scene=birthday]{border-style:dashed;border-width:2px;border-color:#bd9362;border-radius:5px;box-shadow:0 3px 0 #bf9669,0 15px 45px #37251655}
#modal[data-scene=mail] #modal-content{background:radial-gradient(ellipse at 0 100%,#d8dfa944,transparent 40%),#fff5e0}
#modal .object-tabs{position:sticky;top:-20px;z-index:2;padding:9px 0;background:#fff2dcf5;gap:5px;display:flex;flex-wrap:nowrap;margin-bottom:20px;border-bottom:1px dashed #d5b885}
#modal .object-tabs .filter{min-height:44px;flex:1;white-space:nowrap;padding:5px 8px;color:#947553;font-size:13px;border:1px solid #dbbf96;background:#fae8c9;border-radius:9px 9px 3px 3px}
#modal .object-tabs .filter.active{color:#785131;background:#f1cbb8;border-color:#c99273}
#modal .object-add{display:flex;position:sticky;bottom:-22px;margin:20px 0 0 auto;width:max-content;min-height:44px;background:#edc28e;color:#78512f;border:1px solid #bf8f59;box-shadow:0 3px 0 #bd8d5655;border-radius:8px;padding:8px 17px;z-index:2;font-size:13px}
#modal .journal-tools{gap:8px;flex-wrap:nowrap}.journal-tools input,.journal-tools select{color:#735132!important;background:#fff9e9!important}
#modal .journal-tools label{min-width:0}#modal .journal-tools label:first-child{flex:.7}.journal-tools label:last-of-type{flex:1}
#modal .blank-book-page{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;border:1px dashed #dac29b;border-radius:12px;color:#b09a7e}
.blank-book-page .icon{width:40px;height:40px;stroke-width:1}.blank-book-page span{font-size:13px}
#modal .scrapbook-entry{padding:16px 12px;border-radius:5px;border:0;border-bottom:1px dashed #d0b38c;box-shadow:none;background:none;color:#735436}
#modal .entry-head{margin-bottom:12px;gap:4px}.entry-head .icon-button{min-width:38px;min-height:44px}
#modal .entry-author{font-size:10px;max-width:calc(100% - 122px);gap:4px}#modal .entry-author .avatar{display:none}.entry-author time{font-size:11px}
#modal .entry-memory{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:13px}#modal .memory-caption{padding-left:10px;border-color:#dbbe93}
#modal .memory-caption h3{font-size:15px;line-height:1.65;margin-bottom:8px;color:#755135}#modal .memory-caption .entry-body{font-size:13px;line-height:1.95;color:#7c5e40;white-space:pre-wrap;overflow-wrap:anywhere}
#modal .entry-memory .photo-grid.single button{aspect-ratio:4/5}#modal .entry-memory .photo-grid.single img{object-fit:cover}.memory-placeholder span{font-size:11px}
#modal .entry-actions{flex-wrap:nowrap;margin-left:auto}.featured-mark{font-size:9px}
#modal .field{margin:14px 0;gap:6px}#modal .field input,#modal .field textarea,#modal .field select{background:#fffaf0;color:#705337;border-color:#dec69f;font-size:16px;border-radius:7px;min-height:45px}
#modal .field>span{color:#8c6c4c;font-size:12px}.field-row{gap:9px}.checkbox-label{color:#8a6e4e}
#modal .button{min-height:44px}#modal .modal-actions{padding-top:14px;margin-top:16px;gap:8px;position:sticky;bottom:-24px;padding-bottom:8px;background:#fff3ddf5;z-index:2}
#modal .modal-actions .button{font-size:13px;min-width:0;padding:8px 13px;flex:1}#modal .form-error:empty{margin:0;min-height:0}
#modal .stationery-form{position:relative}#modal .stationery-stamp{position:absolute;right:2px;top:-7px;color:#b3bd81;border:2px dotted #d7b887;border-radius:3px;padding:1px 5px;font-size:23px}
#modal .stationery-form .field:first-of-type{padding-right:45px}#modal .stationery-form .field textarea{min-height:260px;background:repeating-linear-gradient(transparent 0 29px,#dec49d44 30px),#fff9eb;line-height:30px}
#modal .stationery-form .modal-actions .button[type=submit]{background:#d97864;box-shadow:0 3px 0 #b55d4c;border-radius:22px;color:#fff5e8;font-size:16px}
#modal .letter-paper{padding:20px 15px;background:repeating-linear-gradient(transparent 0 33px,#dcc69e66 34px),#fff9e9;font-size:16px;line-height:34px;border-color:#dfc7a1;color:#735334}
#modal .wish-journal-page{background:#fff6df;border:1px solid #dbc59d;border-radius:10px 5px;box-shadow:2px 3px 0 #b99a6530;padding:16px}
#modal .wish-journal-page.completed{background:#fff0df}.wish-page-heading h3{font-size:19px}.wish-page-actions .text-button{min-height:44px;font-size:13px}.wish-body{font-size:13px;color:#8e765b}.wish-detail .wish-body{color:#806044}
#modal .reply{background:#f2e7ce}.reply-body{font-size:14px}.birthday-heading{font-size:24px}.birthday-aside{font-size:11px}
#toast{z-index:100}.about-main{max-width:900px;padding:25px 20px 130px}.about-main .page-heading p{display:none}.about-main .page-heading h1{font-size:26px}.about-main .about-couple p:nth-of-type(n+4){display:none}
body[data-view=about]>.illustrated-nav,body[data-view=about] #app>.illustrated-nav{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));height:70px;left:50%;right:auto;width:min(420px,94%);transform:translateX(-50%)}
.site-footer:empty{display:none}.site-footer{font-size:10px;display:flex;flex-wrap:wrap;justify-content:center;gap:12px;padding:14px 0}
html[data-theme=night] .immersive-stage{color:#684327;background:#725333}
html[data-theme=night] .illustrated-title{color:#633d22;text-shadow:0 1px #ffdda2}
html[data-theme=night] .immersive-stage .theme-options{background:linear-gradient(105deg,#f2c686,#cf995f)}
html[data-theme=night] .immersive-stage .theme-options button{color:#76502f}html[data-theme=night] .immersive-stage .theme-options button[aria-pressed=true]{background:#ffe9ba;color:#704825}
html[data-theme=night] .immersive-stage .nav-token{filter:brightness(.92);color:#70462a}html[data-theme=night] .immersive-stage .nav-token.active{filter:none;box-shadow:0 4px 0 #a97640,0 0 21px #ffd06d}
html[data-theme=night] #modal .paper-card{--ink:#735436;--muted:#927956;--line:#dcc59e;--green-dark:#748450;color:#735436;background:none}
@media(max-height:640px){.illustrated-nav{bottom:2%}.nav-token{height:83%;font-size:11px;min-height:48px}.nav-token>.icon{width:26px;height:26px}.scene-calendar{top:44%;width:32%}.scene-calendar>span{font-size:10px}.scene-calendar>strong{font-size:28px}.immersive-stage .theme-control{width:42%;right:2%}.scene-identity{top:13%;min-height:40px;font-size:11px}.illustrated-title{letter-spacing:1px}#modal.object-dialog{max-height:83dvh;margin-bottom:20px}}
@media(min-width:651px){#modal .object-pages{padding:24px 30px 32px}.object-pages .entry-memory{gap:25px}#modal .memory-caption h3{font-size:21px}#modal .memory-caption .entry-body{font-size:15px}.about-grid{grid-template-columns:1fr 1fr}}
@media(max-width:375px){#modal-content>.dialog-header{padding:12px 12px;gap:5px}#modal-content .dialog-header h2{font-size:18px}.object-pages{padding:15px 12px 24px}#modal .entry-author{font-size:9px}.entry-head .icon-button{min-width:35px}#modal .entry-memory{gap:9px}#modal .memory-caption{padding-left:7px}#modal .memory-caption .entry-body{font-size:12px}.field-row{flex-direction:column;gap:0}.scene-calendar{width:31%}}
@media(prefers-reduced-motion:reduce){.nav-token{transition:none}.wish-flower{animation:none!important}}
/* Touch targets remain usable when a short display narrows the stage. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.immersive-stage .theme-control{width:max(39%,146px);right:3%}
.immersive-stage .theme-options button{min-width:44px;min-height:44px}
.immersive-stage .tree-wish-tag{min-width:44px;min-height:44px}
.immersive-stage .journal-pencil{min-width:44px;min-height:44px}
#modal .entry-head .icon-button{min-width:44px;min-height:44px}
#modal .entry-author{max-width:calc(100% - 136px)}
.immersive-stage .scene-identity{min-height:44px}
.immersive-stage .building-link{left:var(--sign-x);top:var(--sign-y);width:var(--sign-width);height:44px;min-width:44px;min-height:44px;display:grid;place-items:center;padding:0;transform:translate(-50%,-50%);font-size:11px;font-size:clamp(11px,3.1cqw,16px);letter-spacing:.5px;line-height:1;background:none;border:0;box-shadow:none;text-shadow:0 1px #ffe6bc}
.immersive-stage .home-house{--sign-x:31.5%;--sign-y:30%;--sign-width:19%}
.immersive-stage .home-mail{--sign-x:76.2%;--sign-y:40.9%;--sign-width:16%}
.immersive-stage .home-tree{--sign-x:87.9%;--sign-y:24%;--sign-width:16%}
.building-copy{display:block;white-space:nowrap;line-height:1;pointer-events:none}
.building-link .nav-dot{position:absolute;right:0;top:4px;margin:0;border:1px solid #fff3cd}
/* Resident-specific resting artwork is managed in resident-poses.css. */
@supports(height:100dvh){.immersive-stage.friends-town{width:min(100%,calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .47126))}}
@media(orientation:landscape) and (max-height:500px){.immersive-stage.friends-town{width:270px;max-width:100%}.illustrated-nav{height:14%;bottom:2%}.immersive-stage .scene-play-toolbar{top:71%;height:10%}.illustrated-title{font-size:17px}.immersive-stage .theme-control{top:3%;right:1%}.scene-identity{top:16%}.scene-calendar{font-size:10px}}
/* Real delivery uses only the three existing actors and one moving envelope. */
.real-delivery-token{position:absolute;z-index:12;left:23%;top:46%;width:18%;height:5%;background:#fff0d2;border:1.5px solid #b38352;border-radius:3px;box-shadow:1px 3px 4px #66432035;transition:left .75s ease,top .75s ease,transform .75s ease;pointer-events:none}
.real-delivery-token::before{content:'';position:absolute;inset:0 0 25%;background:#e6c899;clip-path:polygon(0 0,100% 0,50% 100%)}
.real-delivery-token::after{content:'♡';position:absolute;left:38%;top:20%;font-size:17px;color:#c47969;opacity:0}
.mail-room[data-delivery-step=hachi] .real-delivery-token{left:46%;top:46%}.mail-room[data-delivery-step=hachi] .real-delivery-token::after,.mail-room[data-delivery-step=usagi] .real-delivery-token::after{opacity:1}
.mail-room[data-delivery-step=usagi] .real-delivery-token{left:82%;top:35%;transform:rotate(-15deg) scale(.55)}
.immersive-stage.mail-room[data-delivery-step=chii] .town-character.chii .resident-motion{animation:delivery-fold .75s ease-in-out}
.immersive-stage.mail-room[data-delivery-step=hachi] .town-character.hachi .resident-motion{animation:delivery-stamp .75s ease-in-out}
.immersive-stage.mail-room[data-delivery-step=usagi] .town-character.usagi .resident-motion{animation:delivery-run .75s ease-in-out}
@keyframes delivery-fold{40%{transform:rotate(-8deg) translateY(3px)}75%{transform:rotate(5deg)}}
@keyframes delivery-stamp{40%{transform:translateY(-8px)}60%{transform:translateY(4px) scale(1.03,.97)}}
@keyframes delivery-run{30%{transform:translate(7px,-5px) rotate(-5deg)}70%{transform:translate(13px,-11px) rotate(6deg)}}
@media(prefers-reduced-motion:reduce){.real-delivery-token{transition:none}.immersive-stage.is-delivering .resident-motion{animation:none!important}}

@supports not (font-size:1cqw){.illustrated-title{font-size:22px}.home-room .illustrated-title{font-size:12px}.mail-room .illustrated-title{font-size:24px}.garden-room .illustrated-title{font-size:21px}.closed-journal>b{font-size:19px}.scene-calendar>strong{font-size:34px}.scene-calendar>span{font-size:11px}.building-link{font-size:11px}}
@supports not (height:100svh){#modal.object-dialog{margin:auto auto max(8vh,env(safe-area-inset-bottom))}}

@media(orientation:landscape) and (max-height:500px){.home-room .illustrated-title{font-size:10.5px}}
