.mobile-tabs{display:none}.help-pages{display:flex;justify-content:space-between;gap:12px}.help-pages button{min-height:44px}button{touch-action:manipulation}#account-form input{font-size:16px}
@media(max-width:700px),(max-height:500px) and (max-width:1000px){
 html{height:100%;overflow:hidden}body{height:100dvh;grid-template-rows:62px minmax(0,1fr) calc(48px + env(safe-area-inset-bottom));padding-top:env(safe-area-inset-top)}
 header{padding:3px 8px;gap:2px;display:grid;grid-template-columns:1fr}header h1{font-size:18px;margin:0}header small,h1 span{display:none}.header-controls{max-width:none;display:flex;justify-content:space-between;gap:3px}.header-controls button{font-size:10px;padding:6px 7px;min-height:30px;max-width:39%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.volume-label{display:none}
 body>main{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 145px 65px;padding:0 5px 4px;gap:4px;height:100%;width:100%;overflow:hidden}
 .board{grid-column:1;grid-row:1;grid-template-rows:28px 66px minmax(0,1fr) 30px;min-height:0;border-radius:12px}.map-top{font-size:10px;padding:4px;gap:4px}.map-top>span{min-width:0}.map-top>span+span{font-size:9px;text-align:right}.map-views{display:flex;flex-wrap:wrap;align-content:center;gap:3px;padding:2px}.map-views button{padding:5px 7px;font-size:10px;min-height:29px}.map-viewport{min-height:0}.legend{gap:5px}.legend button{min-height:28px;font-size:10px}#map{width:100%;height:100%;min-width:0;min-height:0}
 aside{grid-column:1;grid-row:2;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:29px 1fr;gap:4px;overflow:hidden;min-height:0}
 aside>.stats{grid-column:1/-1;grid-row:1;padding:4px 8px;font-size:11px;align-items:center}.stats strong{font-size:16px;display:inline;margin:0 0 0 5px}
 aside>.action{grid-column:1;grid-row:2;display:grid;grid-template-columns:24px 1fr;grid-template-rows:36px auto;gap:2px;padding:4px}.dice{font-size:27px;min-height:0}.action .primary{font-size:11px;padding:5px;min-height:36px}.action p{display:none}.action .item-button{font-size:10px;padding:4px;min-height:30px;margin:0;line-height:1.2}
 aside>.rat-panel{grid-column:2;grid-row:2;display:flex;align-items:center;padding:5px;gap:4px;min-width:0}.rat-panel img{width:30px;height:45px}.rat-panel h2,.rat-panel p{font-size:10px;line-height:1.4;overflow-wrap:anywhere}.rat-panel h2 span{white-space:normal}
 aside>.basket,aside>#travel-items,aside>#restart{display:none}.conversation{grid-column:1;grid-row:3;display:flex;padding:4px 6px;gap:4px;overflow:hidden}.faces{flex:0 0 43px}.faces img{width:29px;height:48px}.faces img+img{width:24px;height:32px;margin-left:-10px}.conversation .speaker{font-size:8px;margin:0}.conversation .speaker.otomo{margin-top:2px}.conversation p:not(.speaker){font-size:10px;line-height:1.25}
 body>footer{display:none}.mobile-tabs{display:flex;grid-row:3;gap:5px;padding:3px 6px calc(3px + env(safe-area-inset-bottom));background:#173e46}.mobile-tabs button{flex:1;padding:5px;font-size:12px;min-height:40px}.mobile-tabs button[aria-pressed=true]{background:#f5d58c;color:#283c32}
 body[data-mobile-view=bag]>main{grid-template-rows:minmax(0,1fr)}body[data-mobile-view=bag] .board,body[data-mobile-view=bag] .conversation{display:none}body[data-mobile-view=bag] aside{grid-row:1;display:flex;gap:6px}body[data-mobile-view=bag] aside>.stats{display:flex;flex:none}body[data-mobile-view=bag] aside>.action,body[data-mobile-view=bag] aside>.rat-panel{display:none}body[data-mobile-view=bag] aside>.basket{display:block;flex:none;padding:9px}body[data-mobile-view=bag] aside>#travel-items{display:block;font-size:12px;min-height:18px}body[data-mobile-view=bag] #ingredients{grid-template-columns:1fr 1fr;gap:0 8px}body[data-mobile-view=bag] .ingredient{font-size:12px;padding:6px 0;white-space:normal}body[data-mobile-view=bag] #shrine-goals .ingredient{font-size:10px;padding:4px 0}body[data-mobile-view=bag] .basket h2{font-size:14px}body[data-mobile-view=bag] .basket p{font-size:11px}
 dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 16px);padding:14px;overflow:hidden;border-radius:14px}dialog h2{font-size:21px;margin:6px 0}dialog p{font-size:13px;line-height:1.5;margin:8px 0}dialog .close{margin-top:8px;padding:10px;min-height:42px}dialog .route-option{font-size:13px;line-height:1.4;margin:7px 0;padding:10px;min-height:42px}dialog .portrait{width:85px;height:95px}.event-otomo{width:65px;height:65px}
 .shrine-dialog,.merchant-dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:0}
 .shrine-dialog #modal,.merchant-dialog #modal{grid-template-rows:minmax(100px,1fr) auto}.shrine-dialog .shop-content{padding:8px 10px;gap:5px}.shrine-dialog .shop-content p{font-size:11px;line-height:1.4}.shrine-dialog .shop-content .notice{padding:6px}.shrine-dialog .shop-stock{grid-template-columns:1fr 1fr;gap:0 8px}.shrine-dialog .shoprow{padding:5px 0;font-size:11px;gap:4px}.shrine-dialog .shoprow small{font-size:10px}.shrine-dialog .shoprow button{padding:6px;min-width:42px;min-height:40px;font-size:12px}.shrine-dialog .trade-row{padding:7px!important}.shrine-dialog .shop-content .close{margin-top:1px;padding:10px;min-height:42px}.shrine-dialog .shrine-label{top:8px;left:8px;max-width:85%;padding:5px 9px}.shrine-dialog .shrine-label h2{font-size:18px}.shrine-dialog .shrine-label span{font-size:11px}.shrine-dialog .scene-pair{width:44%}.shrine-dialog .scene-pair img{max-height:29dvh}.shrine-dialog .official-pair{width:44%}.shrine-dialog .official-pair img{max-height:28dvh}
 .merchant-dialog .merchant-scene{padding:10px;gap:6px}.merchant-dialog .merchant-heading{max-width:68%;padding:6px 8px;font-size:10px}.merchant-dialog .merchant-heading h2{font-size:18px}.merchant-dialog .merchant-scene .shopkeeper{width:100px}.merchant-dialog .merchant-scene figcaption{font-size:12px;padding:4px}.merchant-dialog .merchant-menu{padding:8px 10px;gap:6px}.merchant-dialog .merchant-menu p{font-size:12px}.merchant-dialog .merchant-menu .route-option{font-size:12px;padding:9px;min-height:42px}.merchant-dialog .merchant-menu .notice{font-size:11px;padding:6px}
 #account-dialog{padding:14px}#account-form label{margin:9px 0;font-size:13px}#account-form input{margin-top:4px;padding:9px;font-size:16px}#account-error{margin:3px 0;min-height:15px;font-size:12px}#account-dialog .account-switch{padding:9px;min-height:38px}#tutorial-dialog p{line-height:1.6!important;font-size:13px}#tutorial-dialog .quiet{color:#36554c;padding:8px;min-height:38px}#tutorial-dialog #guide-next{margin-top:0}#tutorial-dialog>div>div{gap:6px!important}
 .fork-dialog{inset:auto 6px calc(52px + env(safe-area-inset-bottom)) auto;width:calc(100vw - 12px);max-width:420px;padding:9px;max-height:43dvh}.fork-dialog h2{font-size:16px;margin:3px 0}.fork-dialog p{font-size:10px;line-height:1.3;margin:3px 0}.fork-dialog .route-option{font-size:12px;margin:5px 0;padding:8px;min-height:40px}.fork-dialog .route-option small{font-size:10px}.home-shrine{padding:12px}.home-shrine h2{font-size:22px}.home-cast img{max-height:27dvh;width:70%}.ending-dialog{padding:10px}.ending-dialog h2{font-size:17px}.ending-dialog video{max-height:65dvh}.ending-controls{margin-top:4px}.ending-controls button{margin:0}.ranking-table{font-size:12px}.ranking-table th,.ranking-table td{padding:6px}.ranking-screen h2{font-size:20px}.ranking-screen p{font-size:11px}.ranking-screen .route-option{padding:8px;margin-top:5px}
}
@media(max-width:700px) and (max-height:680px){body>main{grid-template-rows:minmax(0,1fr) 131px 54px}.board{grid-template-rows:24px 62px minmax(0,1fr) 28px}.conversation p:not(.speaker){font-size:9px}body[data-mobile-view=bag] .ingredient{padding:4px 0;font-size:11px}body[data-mobile-view=bag] aside>.basket{padding:6px}.shrine-dialog .shop-content>p:first-child{display:none}.shrine-dialog .shoprow small{margin:1px 0}.shrine-dialog .shop-content{gap:3px}.shrine-dialog .shop-content .notice{padding:4px;font-size:10px}}
@media(max-height:500px) and (max-width:1000px){
 body{grid-template-rows:40px minmax(0,1fr) 42px}header{display:flex;padding:3px 8px}header h1{font-size:16px}.header-controls button{font-size:10px}body>main{grid-template-columns:minmax(0,1fr) 220px;grid-template-rows:minmax(0,1fr);gap:5px}.board{grid-column:1;grid-row:1;grid-template-rows:23px 60px minmax(0,1fr) 28px}aside{grid-column:2;grid-row:1;display:flex;gap:4px}aside>.action{display:grid;grid-template-columns:30px 1fr;grid-template-rows:auto}aside>.rat-panel{display:flex}.conversation{display:none}.mobile-tabs{grid-row:3;padding:2px 8px}.mobile-tabs button{min-height:36px}body[data-mobile-view=bag]>main{grid-template-columns:1fr}body[data-mobile-view=bag] aside{grid-column:1;display:grid;grid-template-columns:1.7fr 1fr;grid-template-rows:28px 1fr 22px}body[data-mobile-view=bag] aside>.stats{grid-column:1/-1}body[data-mobile-view=bag] aside>.basket{grid-row:2;margin:0}body[data-mobile-view=bag] aside>.basket:first-of-type{grid-column:1}body[data-mobile-view=bag] aside>.basket:last-of-type{grid-column:2}body[data-mobile-view=bag] #ingredients{grid-template-columns:repeat(3,1fr)}body[data-mobile-view=bag] .ingredient{font-size:10px;padding:3px 0}body[data-mobile-view=bag] aside>#travel-items{grid-row:3;grid-column:1/-1;font-size:10px}body[data-mobile-view=bag] .basket p{font-size:10px}
 .shrine-dialog #modal,.merchant-dialog #modal{grid-template-columns:38% 62%;grid-template-rows:minmax(0,1fr)}.shrine-dialog .shrine-stage{border-radius:12px 0 0 12px}.shrine-dialog .shop-content{padding:5px 8px;gap:3px}.shrine-dialog .shop-content>p:first-child,.shrine-dialog .shop-content>.notice:last-of-type{display:none}.shrine-dialog .shoprow{padding:3px 0}.shrine-dialog .shoprow button{min-height:32px}.shrine-dialog .shop-content .close{min-height:34px;padding:6px}.shrine-dialog .scene-pair,.shrine-dialog .official-pair{width:76%;right:6%}.shrine-dialog .scene-pair img,.shrine-dialog .official-pair img{max-height:65dvh}.merchant-dialog .merchant-scene{display:block}.merchant-dialog .merchant-scene .shopkeeper{position:absolute;bottom:6px;right:10px;width:100px}.merchant-dialog .merchant-heading{max-width:100%}.merchant-dialog .merchant-menu{align-content:center}.merchant-dialog .merchant-menu p{font-size:11px}.merchant-dialog .merchant-menu .route-option{min-height:34px}.fork-dialog{width:300px;max-height:78dvh}.home-shrine .home-cast{float:left;width:38%}.home-cast img{max-height:40dvh}.ranking-screen p{margin:2px}.ranking-table th,.ranking-table td{padding:2px}.ranking-screen .close,.ranking-screen .route-option{min-height:30px;padding:5px;margin-top:3px}#food-complete-dialog[open]{grid-template-columns:1fr 1fr;grid-template-rows:1fr}.complete-message{padding:10px}.complete-message h2{font-size:18px}.complete-message p{font-size:12px}.complete-title h2{font-size:20px}.complete-title p{font-size:11px}.ending-dialog video{max-height:58dvh}.ending-dialog h2{margin:0}.ending-controls{display:flex}.ending-controls button{min-height:30px;padding:5px;width:auto}
}
@media(max-height:500px) and (max-width:1000px){
 .inn-sleep{display:grid;grid-template-columns:35% 1fr;gap:4px 12px}.inn-sleep>.speaker,.inn-sleep>h2{grid-column:1/-1;margin:1px}.inn-sleep .sleep-scene{grid-column:1;grid-row:3/5;height:130px}.inn-sleep>p:not(.speaker),.inn-sleep .sleep-results{grid-column:2;margin:2px;font-size:11px}.inn-sleep .sleep-results p{font-size:11px;margin:2px}.inn-sleep>.close{grid-column:1/-1;margin:2px;min-height:32px;padding:5px}
 #account-dialog{width:620px;max-width:96vw;padding:10px}#account-dialog h2{font-size:18px;margin:0}#account-dialog>p{font-size:11px;margin:3px}#account-form{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}#account-form label{margin:0;font-size:11px}#account-form input{padding:6px;margin-top:2px}#account-form #account-error{margin:0;font-size:11px}#account-form button{grid-column:1/-1;min-height:32px;padding:6px;margin:0}#account-dialog .account-switch,#account-dialog #account-close{min-height:30px;padding:5px;margin:2px}#tutorial-dialog{width:620px}#tutorial-dialog p{margin:4px;font-size:12px}#tutorial-dialog h2{font-size:18px}#tutorial-dialog>div>div{flex-wrap:nowrap!important;align-items:center}#tutorial-dialog #guide-next{width:auto;flex:1;min-height:34px}#tutorial-dialog .quiet{font-size:11px;min-height:32px}
}
@media(max-width:700px) and (min-height:501px){.fork-dialog{max-height:46dvh}}
