
/* 縦持ちのゲーム画面。中央の視界を残し、操作は下、情報は上にまとめる。 */
@media(orientation:portrait){
 body.touch.portrait{--portrait-dock:calc(60px + env(safe-area-inset-bottom,0px))}
 body.touch.portrait #rankBox{left:8px;top:calc(8px + env(safe-area-inset-top,0px));width:calc(100% - 136px);min-width:0;padding:6px 8px;border-width:1px;border-radius:10px}
 body.touch.portrait #rankName{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.touch.portrait #rankNote{display:none}
 body.touch.portrait #kicked{font-size:10px;margin-top:2px;white-space:nowrap}body.touch.portrait #kicked b{font-size:14px}
 body.touch.portrait #progWrap{height:3px;margin-top:4px}
 body.touch.portrait #sysbar{left:auto;right:8px;top:calc(8px + env(safe-area-inset-top,0px));gap:4px;display:flex}
 body.touch.portrait #sysbar button{font-size:11px;padding:7px 5px;min-width:48px;min-height:42px;border-radius:10px;white-space:nowrap}
 body.touch.portrait #bag{left:8px;right:8px;top:calc(72px + env(safe-area-inset-top,0px));bottom:auto;width:auto;max-height:34px;display:flex;flex-wrap:nowrap;gap:12px;overflow-x:auto;overflow-y:hidden;padding:5px 8px;border-width:1px;font-size:11px;pointer-events:auto;touch-action:pan-x;scrollbar-width:none}
 body.touch.portrait #bag>div{flex-shrink:0}body.touch.portrait #bag span{font-size:11px}
 body.touch.portrait #place{left:8px;right:8px;top:calc(112px + env(safe-area-inset-top,0px));max-width:none;font-size:11px;padding:4px 8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 body.touch.portrait #viewControls{left:8px;right:8px;top:calc(146px + env(safe-area-inset-top,0px));display:flex;gap:6px;width:auto}
 body.touch.portrait #viewControls>button{flex:1;min-width:0;min-height:40px;white-space:nowrap;font-size:11px;padding:6px 4px;border-radius:10px}
 body.touch.portrait #humanList{right:8px;top:calc(194px + env(safe-area-inset-top,0px));width:min(190px,57vw);max-height:min(23dvh,174px);overflow-y:auto;pointer-events:auto;touch-action:pan-y;scrollbar-width:thin;gap:3px}
 body.touch.portrait #humanList .hrow{padding:4px 6px;font-size:11px;line-height:1.3}body.touch.portrait #humanList .hrow .st{display:none}body.touch.portrait #humanList .hbar{height:3px;margin-top:3px}
 body.touch.portrait #gauges{left:8px;right:auto;top:calc(194px + env(safe-area-inset-top,0px));bottom:auto;width:86px;gap:5px}body.touch.portrait .g{font-size:10px;padding:4px 6px}body.touch.portrait .g .bar{height:4px}
 body.touch.portrait #hotbar{left:8px!important;right:8px;bottom:max(8px,env(safe-area-inset-bottom,0px));height:52px;gap:4px;transform:none;max-width:none;width:auto;flex-wrap:nowrap;padding:4px;border-radius:10px;overflow-x:auto}
 body.touch.portrait #hotbar .slot{width:40px;height:40px;font-size:18px;border-radius:8px}body.touch.portrait #hotbar .slot .cnt{font-size:9px}
 body.touch.portrait #actionPad{right:8px;bottom:calc(var(--portrait-dock) + 12px);grid-template-columns:repeat(2,54px);gap:6px}
 body.touch.portrait #actionPad .tbtn{width:54px;height:50px;font-size:10px}body.touch.portrait #actionPad #bScare{width:114px;height:56px;font-size:12px}
 body.touch.portrait #charChip{left:8px;bottom:calc(var(--portrait-dock) + 190px);max-width:calc(100% - 140px);font-size:10px;padding:4px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.touch.portrait #toasts{left:8px;top:calc(298px + env(safe-area-inset-top,0px));width:min(205px,57vw);max-height:90px;overflow:hidden}body.touch.portrait #toasts .toast{font-size:11px;padding:6px 8px}
 body.touch.portrait #battleBar{left:8px;right:8px;top:calc(194px + env(safe-area-inset-top,0px));transform:none;width:auto;grid-template-columns:auto 1fr;padding:6px 9px}
 body.touch.portrait:has(#battleBar:not([hidden])) #gauges{top:calc(270px + env(safe-area-inset-top,0px))}body.touch.portrait:has(#battleBar:not([hidden])) #humanList{top:calc(270px + env(safe-area-inset-top,0px));max-height:16dvh}
 body.touch.portrait #findBar{bottom:calc(var(--portrait-dock) + 196px);left:8px;right:8px;max-width:none;transform:none;padding:5px 8px;gap:6px}body.touch.portrait #findText{flex:1;min-width:0;overflow:hidden}body.touch.portrait #findName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.touch.portrait #adventureHud{left:8px;bottom:calc(var(--portrait-dock) + 24px);transform:none;max-width:calc(100% - 144px);font-size:10px}body.touch.portrait #adventureHud .advActions{flex-wrap:wrap;gap:4px}body.touch.portrait #adventureHud button{font-size:11px;min-height:34px;padding:5px 7px}
 body.touch.portrait #chatToggle{left:8px;bottom:calc(var(--portrait-dock) + 64px);transform:none;font-size:11px;padding:6px 9px}
 body.touch.portrait #halloweenHud{left:8px;top:calc(270px + env(safe-area-inset-top,0px));transform:none;max-width:calc(100% - 16px)}
 body.touch.portrait #roomChat{right:8px;bottom:calc(var(--portrait-dock) + 8px);max-height:58dvh;width:calc(100% - 16px)}
 body.touch.portrait .cwrap{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);margin:0}body.touch.portrait .ctabs{flex-wrap:nowrap;overflow-x:auto;flex-shrink:0}body.touch.portrait .ctab{white-space:nowrap;flex-shrink:0}
}

@media(orientation:portrait){body.touch.portrait #sysbar{transform:none}body.touch.portrait #shards{left:auto;right:8px;bottom:calc(var(--portrait-dock) + 196px);max-width:114px;flex-wrap:wrap;font-size:10px}body.touch.portrait #hint{top:auto;left:8px;right:8px;bottom:calc(var(--portrait-dock) + 226px);width:auto;max-width:none;transform:none;font-size:11px;max-height:44px;overflow:hidden}}

@media(orientation:portrait){body.touch.portrait #rankBox{width:calc(100% - 144px)}html:not([lang="ja"]) body.touch.portrait #viewControls{max-width:none}body.touch.portrait #actionPad .tbtn{overflow:hidden}}

@media(orientation:portrait){body.touch.portrait .ctabs>.pbtn,body.touch.portrait .ctabs>.adventureOpen{width:auto;flex:0 0 auto;margin:0;min-height:38px;padding:6px 10px;font-size:12px}}

@media(orientation:portrait){body.touch.portrait #stick:not(.floating){bottom:calc(env(safe-area-inset-bottom,0px) + var(--fixed-stick-y,76px))!important}}

@media(orientation:portrait){body.touch.portrait .cwrap,body.touch.portrait #pause .pbox{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 16px)}}
