:root{font-family:'Yu Gothic UI','Meiryo',sans-serif;color:#344d43;background:#f4f6ee;font-synthesis:none}*{box-sizing:border-box}body{margin:0;padding:0 max(16px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px,env(safe-area-inset-left));max-width:1920px;margin:auto}button{font:inherit;cursor:pointer;color:inherit;border:1px solid #d9e3d9;background:#fffef8;border-radius:13px;padding:10px 15px;transition:background .15s,transform .15s}button:hover{background:#e9f4df;transform:translateY(-1px)}button:focus-visible,canvas:focus-visible{outline:3px solid #d89643;outline-offset:3px}button:disabled{opacity:.45;cursor:default}button:active{transform:translateY(1px)}[hidden]{display:none!important}header{height:91px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;align-items:center;gap:13px}.logo{background:#76927c;color:#fffbe9;font-family:serif;font-size:29px;border-radius:17px;padding:6px 13px;box-shadow:inset 0 0 0 4px #8ba18b}.brand small{font-size:10px;letter-spacing:2px;color:#899287}.brand h1{font-size:22px;letter-spacing:2px;font-weight:650;margin:5px 0}.top-stats{display:flex;align-items:center;gap:16px;font-size:13px}.top-stats strong{color:#937438;background:#f3e9c8;border-radius:20px;padding:11px 19px;font-size:17px}.top-stats button{border-radius:50%;width:38px;height:38px;padding:0}main{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;height:calc(100dvh - 247px);min-height:450px;max-height:1000px}#world{position:relative;border-radius:24px;overflow:hidden;background:#bce0dc;border:1px solid #c4d6c5;min-width:0}#canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}#canvas:active{cursor:grabbing}.map-title{position:absolute;top:19px;left:20px;background:#fffef3e8;border:1px solid #fff7;box-shadow:0 4px 16px #3562500c;border-radius:14px;padding:11px 17px;font-size:13px;pointer-events:none}.map-title small{display:block;font-size:10px;color:#8a9789;margin:4px 0 0 14px}.live-dot{display:inline-block;background:#82ad72;border-radius:50%;width:7px;height:7px;margin-right:7px}#hint{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);white-space:nowrap;background:#fffdf0ed;border:1px solid #fff;border-radius:24px;padding:11px 22px;font-size:12px;pointer-events:none;box-shadow:0 4px 18px #3d4a3820}.view-tools{position:absolute;top:18px;right:18px;display:flex;gap:5px}.view-tools button{padding:0;width:36px;height:36px;background:#fffef4e8;font-size:22px}.view-tools #pause{font-size:16px}#labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}.person-label{position:absolute;transform:translate(-50%,-100%);padding:4px 10px;font-size:11px;white-space:nowrap;border:1px solid #fff9;background:#fffdf3e6;box-shadow:0 2px 6px #50715c18;pointer-events:auto;touch-action:none;user-select:none}.person-label:hover{transform:translate(-50%,-100%)}.person-label.selected{background:#426b55;color:white}.person-label small{display:block;font-size:9px;max-width:132px;overflow:hidden;text-overflow:ellipsis}.plot-label{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;border:2px dashed #adc494;background:#f9fff4d9;font-size:11px;padding:8px 12px}.house-label{position:absolute;transform:translate(-50%,-50%);pointer-events:none;background:#fffff6b8;border-radius:8px;padding:3px 8px;font-size:9px}.bubble{position:absolute;transform:translate(-50%,-100%);max-width:220px;background:#fffef5;border-radius:16px;padding:10px 15px;font-size:13px;box-shadow:0 4px 18px #34483c20;pointer-events:none}.bubble:after{content:'';position:absolute;bottom:-6px;left:50%;width:12px;height:12px;background:#fffef5;transform:rotate(45deg)}#personPanel{position:relative;background:#fffef9;border:1px solid #e1e7da;border-radius:24px;overflow:auto;scrollbar-width:thin}.portrait-wrap{height:205px;background:radial-gradient(ellipse at bottom,#d8e7c7,#f2f4e7 80%);border-radius:24px 24px 70% 40%;position:relative}#portrait{display:block;width:100%;height:100%}#mood{position:absolute;bottom:7px;right:14px;font-size:10px;padding:5px 10px;border-radius:20px;background:#fffdf4de}.person-body{padding:17px 22px}.person-body small{font-size:10px;color:#8c9b89;letter-spacing:1px}.person-body h2{margin:5px 0 6px;font-size:23px;letter-spacing:3px}#activity{font-size:11px;color:#6b8d70;margin:0 0 14px}#speech{font-size:13px;line-height:1.8;border-left:3px solid #d6e3c8;padding-left:11px;min-height:47px;margin:17px 0}#needs{display:flex;gap:8px}.need{flex:1;font-size:9px;color:#8b9587}.need i{height:5px;display:block;background:#ecefe4;border-radius:5px;margin-top:5px;overflow:hidden}.need b{display:block;height:100%;background:#9fbe85;border-radius:5px}.person-actions{display:grid;gap:7px}.person-actions button{font-size:12px;text-align:left;padding:10px 12px}.person-actions button:after{content:'→';float:right;color:#8aa07c}#friendInfo{font-size:10px;line-height:1.8;color:#8c9987}.close{position:absolute;top:9px;right:9px;z-index:2;width:28px;height:28px;border:0;background:#ffffffb0;padding:0;font-size:19px;display:none}.bottom{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 0 10px}#residents{display:flex;gap:8px;overflow:auto;min-width:0}.resident{display:flex;gap:8px;align-items:center;white-space:nowrap;font-size:11px;padding:8px 12px}.resident.selected{border-color:#789e73;background:#e7efd9}.resident .dot{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--c);color:white;font-size:12px}.bottom nav{display:flex;gap:7px;flex-shrink:0}.bottom nav button{font-size:12px;white-space:nowrap}.bottom nav span{font-size:21px;vertical-align:middle;margin-right:6px}.bottom nav b{border-radius:50%;font-size:10px;background:#e7eddf;padding:2px 6px;margin-left:5px}footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;color:#95a08e;padding:8px 0 14px}footer button{font-size:10px;padding:6px 10px;border:0;background:transparent}#saveStatus.warning{color:#ab673e}#loading{position:absolute;inset:0;display:grid;place-items:center;background:#e9f0de;font-size:17px}dialog{width:min(700px,calc(100% - 26px));max-height:85dvh;border:1px solid #e5ebdb;border-radius:25px;padding:25px;background:#fbfcf5;color:#344d43;box-shadow:0 24px 80px #243d3630}dialog::backdrop{background:#2c473b60;backdrop-filter:blur(4px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid #e4e9dc;margin-bottom:18px}.dialog-head small{letter-spacing:3px;font-size:9px;color:#93a58b}.dialog-head h2{font-size:23px;margin:7px 0 0}.dialog-head button{font-size:23px;border:0;background:transparent}.shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shop-card{border:1px solid #e2e8d9;border-radius:15px;padding:15px;background:#fffef9}.shop-card strong{font-size:14px}.shop-card p{font-size:11px;color:#82917c;line-height:1.7;min-height:38px}.shop-card button{width:100%;font-size:12px;background:#e9efdc}.shop-card em{font-size:10px;color:#8ca477;font-style:normal;display:block;margin-top:6px}.journal-entry{border-bottom:1px solid #e3e9dd;padding:12px 0;font-size:13px;line-height:1.8}.journal-entry small{display:block;color:#97a68c;font-size:10px}.dialog-note{font-size:12px;line-height:1.9;margin-bottom:18px;color:#7c8c74}#toast{position:fixed;bottom:140px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:20;background:#385841;color:#fffbe8;padding:12px 23px;border-radius:22px;font-size:13px;max-width:90%;transition:.2s}#toast.visible{opacity:1;transform:translate(-50%,0)}#placebar{position:absolute;left:12px;right:12px;bottom:12px;background:#f7fcebdc;backdrop-filter:blur(8px);padding:12px 16px;border-radius:14px;display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:8px}.room-list{font-size:14px;line-height:2}.big-number{font-size:27px;color:#8aaa76}body.panel-closed main{grid-template-columns:1fr}body.panel-closed #personPanel{display:none}@media(max-width:1100px){.brand h1{font-size:18px}.bottom{align-items:flex-start;flex-direction:column}.bottom nav{align-self:flex-end}main{height:calc(100dvh - 290px)}.top-stats{gap:8px}#personPanel{max-height:100%}}@media(max-width:700px){body{padding-left:10px;padding-right:10px}header{height:75px}.brand{gap:7px}.brand h1{font-size:13px;letter-spacing:0}.brand small{font-size:8px;letter-spacing:0}.logo{font-size:20px;padding:5px 10px}.top-stats{gap:4px}.top-stats #date{display:none}.top-stats strong{font-size:12px;padding:8px 10px}.top-stats button{width:28px;height:28px}main{display:block;height:calc(100dvh - 250px);min-height:350px;position:relative}#world{height:100%;border-radius:19px}#personPanel{position:absolute;right:8px;top:62px;bottom:10px;width:240px;z-index:5;box-shadow:0 10px 35px #35473535;border-radius:18px}.close{display:block}.portrait-wrap{height:130px}.person-body{padding:12px 16px}.person-body h2{font-size:18px}.map-title{top:12px;left:12px;padding:8px 10px;font-size:10px}.map-title small{font-size:8px}.view-tools{top:12px;right:10px;gap:3px}.view-tools button{height:29px;width:29px;font-size:18px}.view-tools #pause{display:none}.map-title small{max-width:90px}.view-tools #turnRight{display:none}#hint{font-size:9px;padding:9px 11px;bottom:10px;max-width:95%;white-space:normal;text-align:center;width:max-content}#residents{width:100%}.resident{font-size:10px;padding:5px 9px}.resident .dot{width:25px;height:25px}.bottom{gap:10px;padding-top:12px}.bottom nav{align-self:stretch;justify-content:space-between;gap:4px}.bottom nav button{font-size:10px;padding:8px}.bottom nav span{font-size:16px;margin-right:3px}footer{font-size:8px;flex-wrap:wrap;justify-content:center}footer #saveStatus{margin-left:auto}dialog{padding:17px}.shop-grid{gap:7px}.shop-card{padding:11px}.shop-card strong{font-size:12px}.person-label{font-size:10px;padding:3px 7px}.person-label small{display:none}#toast{bottom:170px;font-size:11px}.dialog-head h2{font-size:20px}#placebar{font-size:10px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* 2026-09-28: the game owns its available frame; host ads remain outside it. */
:root{background:#f4f2e7;color:#31493d}
html{height:100%}
body{max-width:none;width:100%;height:100dvh;min-height:0;margin:0;padding:0 max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px,env(safe-area-inset-left));display:grid;grid-template-rows:54px 36px minmax(0,1fr) auto 28px;overflow:hidden}
header{height:auto;gap:10px;padding:5px 8px}.brand h1{font-size:18px;margin:0;letter-spacing:1px}.brand small{display:none}.logo{font-size:23px;padding:2px 10px;border-radius:11px}.top-stats strong{padding:7px 15px}
.screen-nav{display:flex;align-items:center;gap:12px;padding:0 8px 5px}.screen-nav h2{font-size:14px;margin:0;white-space:nowrap}.screen-nav button{font-size:12px;padding:5px 11px}.screen-nav span{font-size:11px;color:#596b5b;margin-left:auto}
main,body.panel-closed main{display:block;position:relative;height:auto;min-height:0;max-height:none;overflow:hidden}
#world{height:100%;width:100%;border-radius:8px;border-color:#c9c8af;background:#ddd9c6}
.map-title{top:10px;left:10px;padding:7px 10px}.view-tools{top:10px;right:10px}.view-tools #homeView{width:52px;font-size:12px}.map-title small{color:#536c56}.view-tools #pause{display:block}
#hint{bottom:10px;padding:7px 14px;font-size:11px}
#personPanel,body.panel-closed #personPanel{position:relative;inset:auto;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);width:100%;height:100%;max-height:none;border-radius:8px;overflow:auto;background:#fffdf6;box-shadow:none}
.portrait-wrap{height:100%;min-height:0;border-radius:0;background:radial-gradient(ellipse at center,#e8eedc,#d6e1c6)}
#portrait{height:100%;min-height:180px}#mood{bottom:24px;right:24px;font-size:14px;padding:9px 16px}.person-body{padding:clamp(20px,4vw,64px);align-self:center;max-width:660px;width:100%}.person-body h2{font-size:clamp(24px,3vw,40px);margin:8px 0 12px}.person-body small{font-size:12px;color:#52684e}#activity{font-size:14px;color:#506d51}.need{font-size:12px;color:#576550}.need i{height:8px}#speech{font-size:17px;min-height:50px;margin:24px 0}.person-actions{gap:12px}.person-actions button{font-size:15px;padding:14px 16px}#friendInfo{font-size:13px;color:#586d51}.close{display:none}
#roomScreen,#roomBody{position:relative;width:100%;height:100%;overflow:hidden;border-radius:8px;background:#e7edde}
#roomCanvas{display:block;width:100%;height:100%}
#roomBody>.dialog-note{position:absolute;left:16px;top:10px;background:#fffdf1e8;border-radius:12px;padding:10px 15px;margin:0;color:#42573e;pointer-events:none}
.room-actions{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:flex;gap:10px;padding:10px;background:#fffdf1ed;border-radius:16px;white-space:nowrap}
.bottom{padding:6px 0;gap:10px;flex-direction:row;align-items:center}.bottom nav{align-self:center}#residents{width:auto;flex:1}.resident{padding:5px 10px}.resident .dot{width:25px;height:25px}.bottom nav button{padding:8px 12px}
footer{padding:0 6px;font-size:9px;flex-wrap:nowrap;justify-content:space-between;overflow:hidden}footer #saveStatus{margin-left:auto}footer button{font-size:10px;padding:4px 8px;white-space:nowrap}#toast{bottom:104px}
@media(max-width:900px){.screen-nav span{display:none}.bottom{flex-wrap:wrap;gap:5px}.bottom nav{margin-left:auto}.person-body{padding:18px}#speech{margin:14px 0;font-size:14px}.person-actions button{padding:10px 12px}}
@media(max-width:700px){body{grid-template-rows:44px 32px minmax(0,1fr) auto 30px;padding-left:5px;padding-right:5px}.brand h1{font-size:13px;letter-spacing:0}.logo{font-size:18px;padding:3px 8px}.top-stats #date{display:none}.top-stats strong{padding:5px 9px}.screen-nav{gap:6px;padding:0 3px 4px}.screen-nav h2{font-size:12px}.screen-nav button{padding:4px 7px;font-size:11px}#world{border-radius:6px}.map-title{top:8px;left:8px;font-size:9px;padding:6px 7px}.map-title small{font-size:8px;max-width:none}.view-tools{top:8px;right:7px;gap:3px}.view-tools button{width:28px;height:30px}.view-tools #homeView{width:38px;font-size:10px}.view-tools #turnLeft,.view-tools #turnRight{display:none}#hint{font-size:10px;max-width:94%;white-space:normal}#personPanel,body.panel-closed #personPanel{grid-template-columns:1fr;grid-template-rows:minmax(125px,36%) auto;overflow:auto}.portrait-wrap{min-height:125px}#portrait{min-height:125px}#mood{bottom:8px;right:10px;font-size:11px;padding:5px 10px}.person-body{padding:12px 16px;align-self:start}.person-body h2{font-size:24px;margin:4px 0 6px}.person-body small{font-size:10px}#activity{font-size:12px;margin-bottom:9px}#speech{font-size:13px;min-height:0;margin:12px 0}.person-actions{gap:7px}.person-actions button{font-size:12px;padding:9px 12px}#friendInfo{font-size:11px;margin:10px 0}.need{font-size:10px}.bottom{padding:5px 0;gap:4px;flex-direction:column;align-items:stretch}#residents{width:100%;flex:none}.resident{padding:4px 8px;font-size:11px}.bottom nav{margin:0;align-self:stretch;justify-content:stretch}.bottom nav button{flex:1;font-size:10px;padding:6px}.bottom nav span{font-size:14px}footer{font-size:8px;gap:4px}footer>span:first-child{max-width:42%;line-height:1.2}footer #saveStatus{font-size:7px;max-width:28%}footer button{font-size:9px;padding:4px}#roomBody>.dialog-note{top:8px;left:8px;right:8px;padding:7px 10px;font-size:11px}.room-actions{bottom:9px;width:calc(100% - 14px);gap:5px;padding:7px;white-space:normal}.room-actions button{flex:1;font-size:11px;padding:9px 5px}#toast{bottom:145px;font-size:11px}}
@media(max-height:500px) and (min-width:701px){body{grid-template-rows:40px 28px minmax(0,1fr) auto 24px}.brand h1{font-size:15px}.bottom{flex-wrap:nowrap}.resident{padding:3px 8px}.bottom nav button{padding:5px 8px}#personPanel{grid-template-columns:40% 60%}.person-body{padding:10px 18px}.person-body h2{font-size:23px;margin:3px 0}#activity{margin-bottom:7px;font-size:11px}#speech{margin:8px 0;min-height:0;font-size:12px}.person-actions{grid-template-columns:repeat(3,1fr);gap:5px}.person-actions button{font-size:11px;padding:7px}.person-actions button:after{display:none}#friendInfo{font-size:11px;margin:8px 0}.portrait-wrap{min-height:0}#portrait{min-height:0}}
@media(max-width:700px){.plot-label{font-size:0;width:25px;height:25px;padding:0;border-radius:8px}.plot-label:before{content:"＋";font-size:15px;line-height:21px}}
.brand,.brand>div{min-width:0}.brand h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-stats{flex-shrink:0}

html{overflow:hidden}body>*{min-width:0}
#orientationPrompt{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:14px;padding:24px max(24px,env(safe-area-inset-right)) 24px max(24px,env(safe-area-inset-left));background:#f3f1e5;color:#31493d}
#orientationPrompt h2{font-size:24px;margin:0}#orientationPrompt p{font-size:15px;line-height:1.8;margin:0;max-width:310px}.rotate-phone{width:106px;height:64px;border:5px solid #779278;border-radius:13px;display:grid;place-items:center;font-size:42px;margin-bottom:15px;transform:rotate(-12deg);background:#e1e8d2}
#orientationPrompt button{background:#3e6650;color:#fffdf1;font-size:14px;padding:13px 18px}#orientationPrompt #orientationStatus{font-size:12px;color:#596b55}
.portrait-blocked>header,.portrait-blocked>.screen-nav,.portrait-blocked>main,.portrait-blocked>.bottom,.portrait-blocked>footer{visibility:hidden}
@media(max-height:430px) and (orientation:landscape){body{grid-template-rows:36px 26px minmax(0,1fr) auto 23px}.brand h1{font-size:14px}.screen-nav{padding-bottom:2px}.bottom{flex-direction:row;flex-wrap:nowrap;align-items:center;padding:4px 0;gap:7px}#residents{width:auto;flex:1}.resident{padding:3px 7px;font-size:10px}.resident .dot{width:22px;height:22px}.bottom nav{flex-shrink:0;align-self:center}.bottom nav button{padding:5px 7px;font-size:10px}.bottom nav span{font-size:14px}#personPanel,body.panel-closed #personPanel{grid-template-columns:40% 60%;grid-template-rows:1fr}.portrait-wrap,#portrait{min-height:0;height:100%}.person-body{padding:10px 14px;align-self:center}.person-body h2{font-size:20px;margin:3px 0}#activity{font-size:10px;margin:0 0 7px}.need{font-size:9px}.need i{height:5px}#speech{margin:8px 0;font-size:12px;min-height:0}.person-actions{grid-template-columns:repeat(3,1fr);gap:5px}.person-actions button{font-size:10px;padding:7px 5px}.person-actions button:after{display:none}#friendInfo{font-size:10px;margin:7px 0}.room-actions{bottom:8px;padding:6px}.room-actions button{font-size:11px;padding:8px}#roomBody>.dialog-note{font-size:10px;padding:6px 9px}#hint{font-size:9px;padding:5px 9px}footer{font-size:8px}.view-tools #turnLeft,.view-tools #turnRight{display:none}}

/* One header row; credits, save explanation and day skip live in Help. */
body{grid-template-rows:44px minmax(0,1fr) auto}
header{padding:4px 6px;gap:10px;min-width:0}.brand{flex:0 1 auto}.brand h1{font-size:16px}.logo{font-size:20px;padding:2px 9px}
.screen-nav{padding:0;flex:1;gap:7px;min-width:0}.screen-nav span{display:none}.screen-nav h2{font-size:13px;overflow:hidden;text-overflow:ellipsis}.screen-nav button{font-size:11px;white-space:nowrap;padding:5px 9px;flex-shrink:0}
body[data-screen="map"] #screenTitle{display:none}body:not([data-screen="map"]) .brand h1{display:none}.top-stats{gap:8px;font-size:11px}.top-stats strong{font-size:14px;padding:5px 10px}.top-stats button{width:30px;height:30px}.bottom{padding:5px 0}
@media(max-width:700px){body{grid-template-rows:38px minmax(0,1fr) auto}header{gap:6px;padding:3px}.brand h1{font-size:12px}.logo{font-size:17px;padding:2px 7px}.screen-nav{gap:4px}.screen-nav h2{font-size:11px}.screen-nav button{font-size:10px;padding:4px 6px}.top-stats{gap:4px}.top-stats strong{font-size:11px;padding:5px 7px}.top-stats button{height:27px;width:27px}}
@media(max-height:430px) and (orientation:landscape){body{grid-template-rows:34px minmax(0,1fr) auto}.brand h1{font-size:12px}.logo{font-size:16px}.top-stats strong{font-size:12px}.top-stats button{width:26px;height:26px}.screen-nav{padding:0}.bottom{padding:3px 0}}
/* Landscape phone: controls on both sides, full-height stage in the middle. */
@media(max-width:1000px) and (orientation:landscape){
 body{display:grid;padding:4px 0;height:100dvh;--rail-left:max(56px,calc(env(safe-area-inset-left) + 50px));--rail-right:max(70px,calc(env(safe-area-inset-right) + 64px));grid-template-columns:var(--rail-left) minmax(0,1fr) var(--rail-right);grid-template-rows:auto minmax(0,1fr);gap:5px 0}
 main,body.panel-closed main{position:absolute;left:var(--rail-left);right:var(--rail-right);top:max(4px,env(safe-area-inset-top));bottom:max(4px,env(safe-area-inset-bottom));width:auto;height:auto}
 header{position:static;grid-column:1;grid-row:1;margin-left:env(safe-area-inset-left);width:50px;height:auto;display:flex;flex-direction:column;gap:5px;padding:0 2px}
 .brand{display:none}.screen-nav{display:flex;flex-direction:column;gap:4px;flex:none;width:100%;padding:0}.screen-nav h2,.screen-nav span{display:none}.screen-nav button{font-size:10px;white-space:normal;line-height:1.2;padding:5px 2px;width:100%;min-height:28px}
 .top-stats{flex-direction:column;gap:4px;justify-content:center;width:100%}.top-stats #date{display:none}.top-stats strong{font-size:10px;padding:4px 2px;border-radius:7px;white-space:nowrap}.top-stats button{width:30px;height:28px}
 .bottom{display:contents}#residents{position:static;grid-column:1;grid-row:2;margin-left:calc(env(safe-area-inset-left) + 3px);width:47px;height:100%;min-height:0;display:flex;flex-direction:column;gap:4px;overflow-x:hidden;overflow-y:auto;flex:none;scrollbar-width:thin}
 .resident{padding:4px 2px;gap:2px;font-size:9px;flex-direction:column;flex-shrink:0;border-radius:9px}.resident .dot{width:22px;height:22px;font-size:10px}
 .bottom nav{position:absolute;right:calc(env(safe-area-inset-right) + 3px);top:4px;width:61px;display:flex;flex-direction:column;gap:5px;margin:0}.bottom nav button{width:100%;min-height:41px;padding:5px 2px;font-size:10px;line-height:1.2;white-space:normal;border-radius:9px;flex:none}.bottom nav span{display:block;font-size:17px;line-height:1;margin:0 0 3px}.bottom nav b{font-size:8px;padding:1px 3px;margin:1px}
 .view-tools{position:fixed;top:auto;right:calc(env(safe-area-inset-right) + 3px);bottom:max(4px,env(safe-area-inset-bottom));width:61px;display:grid;grid-template-columns:1fr 1fr;gap:4px;z-index:3}.view-tools button{width:100%;height:29px;border-radius:8px}.view-tools #homeView{grid-column:1/-1;width:100%;font-size:11px}.view-tools #pause{grid-column:1/-1;width:100%;font-size:13px}.view-tools #turnLeft,.view-tools #turnRight{display:none}
 .map-title{top:7px;left:7px;font-size:10px;padding:5px 8px}.map-title small{font-size:8px}#hint{font-size:9px;padding:4px 7px;bottom:6px}
 #roomBody>.dialog-note{left:8px;top:8px;font-size:10px;padding:6px 9px;max-width:80%}
 .room-actions{position:fixed;top:auto;left:auto;right:calc(env(safe-area-inset-right) + 3px);bottom:max(4px,env(safe-area-inset-bottom));transform:none;width:61px;padding:0;background:transparent;display:flex;flex-direction:column;gap:5px;z-index:4}.room-actions button{font-size:10px;padding:7px 3px;white-space:normal;min-height:35px;line-height:1.25;flex:none}
 #toast{bottom:14px;max-width:calc(100% - 150px);font-size:11px;padding:8px 12px}
}
/* Only the town map expands to the whole frame; detail screens stay comfortable. */
@media(min-width:1001px){body[data-screen="person"] main{width:min(1080px,100%);height:min(620px,100%);align-self:center;justify-self:center}body[data-screen="room"] main{width:min(1200px,100%);height:min(720px,100%);align-self:center;justify-self:center}body[data-screen="person"] #personPanel{grid-template-columns:minmax(0,1fr) minmax(320px,1fr)}body[data-screen="person"] .person-body{padding:26px 32px}.person-body h2{font-size:28px}.person-body #speech{font-size:15px}.person-actions button{font-size:13px;padding:11px 14px}}

@media(max-width:1000px) and (orientation:landscape){.person-label small{display:none}.person-label{font-size:10px;padding:3px 7px}.plot-label{font-size:0;width:32px;height:32px;padding:0;border-radius:9px;white-space:nowrap}.plot-label:before{content:'＋';font-size:18px;line-height:28px}.resident{min-height:42px}.room-actions button{min-height:40px}.view-tools button{min-height:32px}}

/* Park menus keep the town available, including on short landscape phones. */
.park-label{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;background:#fff5ce;color:#36523d;border:1px solid #899b65;font-size:12px;padding:7px 12px;white-space:nowrap}.park-label:hover{transform:translate(-50%,-50%)}
#parkCard{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);width:min(470px,calc(100% - 26px));background:#fffdf3f5;border:1px solid #bdccad;border-radius:16px;padding:12px 16px;box-shadow:0 6px 26px #263f3824;color:#304b3c;font-size:14px;z-index:4}#parkCard p{margin:6px 0 0;line-height:1.5}#parkCard small{font-size:11px}.park-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.park-card-head button,#parkMemories{font-size:11px;padding:5px 9px}#world:has(#parkCard:not([hidden])) #hint{display:none}
.park-select{display:grid;grid-template-columns:1fr 1fr;gap:14px}.park-select label{font-size:13px;display:grid;gap:7px}.park-select select{font:inherit;color:#344d43;background:#fffef8;border:1px solid #99b198;border-radius:10px;padding:10px;width:100%}.park-activities{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.park-activities small{display:block;font-size:10px;margin-top:4px}.facility-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.facility-grid small{font-size:11px}#dialogBody h3{font-size:16px;margin-top:25px}#dialogBody h3 small{font-size:12px;margin-left:8px}.memory-entry{padding:14px;background:#eef2df;border-radius:12px;margin:9px 0;font-size:13px;line-height:1.7}.memory-entry small{display:block;font-size:11px}.dialog-note,.shop-card p{color:#566951}.person-actions{grid-template-columns:1fr 1fr}
@media(max-width:1000px) and (orientation:landscape){#parkCard{bottom:8px;padding:7px 11px;font-size:11px;width:min(440px,calc(100% - 20px))}.park-label{font-size:10px;padding:5px 9px}.bottom nav button{min-height:36px;padding:4px 2px}.bottom nav span{font-size:13px}.view-tools #pause{grid-column:auto}.view-tools #homeView{grid-column:auto;font-size:10px}.view-tools{grid-template-columns:1fr 1fr}.view-tools #zoomIn{grid-row:1;grid-column:1}.view-tools #zoomOut{grid-row:1;grid-column:2}#parkCard small{font-size:9px}.person-actions button{font-size:10px;padding:7px 5px}#speech{font-size:12px}}
@media(max-height:360px) and (orientation:landscape){.bottom nav span{display:none}.bottom nav button{min-height:32px}.bottom nav{gap:4px}.facility-grid{gap:6px}.facility-grid .shop-card{padding:8px}#parkCard{width:min(380px,calc(100% - 16px));padding:6px 10px}.park-card-head button{padding:4px 7px}.dialog-head{margin-bottom:10px;padding-bottom:8px}.dialog-head h2{font-size:18px}.person-body{padding:8px 12px}}
@media(max-width:1000px) and (max-height:360px) and (orientation:landscape){.room-actions{gap:4px}.room-actions button{min-height:38px;padding:4px 3px}}

.cast-thumb{display:block;width:100%;height:155px;object-fit:contain;background:#eeeede;border-radius:12px;margin-bottom:8px}.dialog-note a{display:inline-block;color:#356047;margin-left:8px}@media(max-height:430px){.cast-thumb{height:105px}}

/* Keep the fullscreen exit available on every screen. */
.top-stats #fullscreenToggle{display:flex;align-items:center;justify-content:center;gap:5px;width:auto;min-width:92px;height:34px;padding:4px 10px;border-radius:10px;background:#3e6650;color:#fffdf1;font-size:13px;white-space:nowrap}
#fullscreenToggle>span:first-child{font-size:23px;line-height:1}.version{font-size:.8em;letter-spacing:0}html:fullscreen,html:fullscreen body{width:100%;height:100dvh;max-width:none}body.fullscreen-active[data-screen="map"] #world{border-radius:0}#orientationExit{background:#fffdf1!important;color:#31493d!important;border:2px solid #3e6650!important}
@media(max-width:1000px) and (orientation:landscape){.top-stats #fullscreenToggle{width:44px;min-width:0;height:44px;padding:2px;flex-direction:column;gap:0;font-size:10px;line-height:1.1}#fullscreenToggle>span:first-child{font-size:22px}.fullscreen-label{display:block}}
