/* The scene occupies its own space; controls do not cover the monster. */
:root{--control-width:clamp(340px,42vw,520px);--sheet-space:0px}
#stage{bottom:var(--sheet-space)}
.sheet{overscroll-behavior:contain;scrollbar-gutter:stable;padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));max-height:66dvh}
#start{max-height:69dvh}#end{max-height:none}
.news .line{white-space:normal;overflow:visible;font-size:14px;line-height:1.5}.news .line span{overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.news .tag{display:flex;flex-direction:column;justify-content:center}
.hud b{font-size:clamp(22px,5vw,34px)}.hud small{font-size:10px}.hud .dmg{font-size:12px}
button,a.btn,.filebtn{min-height:44px;touch-action:manipulation}
#qText{font-size:clamp(17px,2vw,21px);line-height:1.6;text-wrap:pretty}
#qBtns button{font-size:15px;line-height:1.6;overflow-wrap:anywhere}#q .wrap{gap:11px}
.story-meter{font-size:12px!important}.action-scene figcaption{font-size:12px}.eyebrow{line-height:1.6}
.rc-stat,.share-hint,.start-note{font-size:12px}.rc-line{font-size:15px}.endbar{padding-bottom:max(4px,env(safe-area-inset-bottom))}
@media(min-width:700px) and (orientation:portrait){
 #q{max-height:54dvh;padding:24px}#q .wrap{max-width:680px;gap:16px}#qBtns{grid-template-columns:1fr 1fr}#qBtns button{font-size:17px;padding:16px}#qText{font-size:22px}.action-scene{grid-template-columns:260px 1fr}.action-scene figcaption{font-size:15px}.news .line{font-size:17px}.hud{padding:12px 24px}
}
@media(min-width:900px),(min-width:640px) and (max-height:600px) and (orientation:landscape){
 #stage{right:var(--control-width);bottom:0!important}.news{right:var(--control-width)}
 .sheet:not(#end){left:auto;right:0;top:0;bottom:0;width:var(--control-width);max-height:none!important;border-top:0;border-left:2px solid var(--alert);padding-top:max(24px,env(safe-area-inset-top));align-content:start;background:#0e1320}
 .sheet:not(#end) .wrap{max-width:none;margin:0;gap:16px}#qBtns{grid-template-columns:1fr}#qBtns button{font-size:16px;padding:15px}#qText{font-size:20px}.action-scene{grid-template-columns:1fr}.action-scene img{max-height:155px;object-fit:contain;background:#d7dcd5}.action-scene figcaption{padding:0 12px 12px;font-size:14px}
 #start h1{font-size:34px}.news .line{font-size:16px}.hud{padding:12px 20px}.hud b{font-size:32px}
 #end .wrap{max-width:740px}#end .rcard h1{font-size:34px}.share-actions a,.share-actions button{font-size:16px}.rc-line{font-size:17px}
}
@media(min-width:640px) and (max-height:600px) and (orientation:landscape){
 :root{--control-width:clamp(300px,48vw,440px)}.sheet:not(#end){padding:14px}.sheet:not(#end) .wrap{gap:10px}#qText{font-size:17px}#qBtns button{font-size:14px;padding:10px;min-height:44px}.news .line{font-size:12px}.news .tag{font-size:12px;padding:5px 8px}.hud{padding:6px 10px}.hud b{font-size:24px}.action-scene{grid-template-columns:1.4fr 1fr}.action-scene img{max-height:90px}.action-scene figcaption{font-size:11px;padding:7px}.story-meter{font-size:11px!important}
}
@media(max-width:359px){.sheet{padding:12px}.news .line{font-size:12px;padding:6px 8px}#q .wrap{gap:8px}#qBtns button{font-size:14px;padding:10px}.action-scene{grid-template-columns:1.2fr 1fr}}

body.ogpmode #stage{right:0;bottom:0!important}

/* Centered controls on every device, as requested. */
:root{--control-width:0px}
#stage{right:0;bottom:var(--sheet-space)!important}.news{right:0}
.sheet:not(#end){left:0;right:0;top:auto;bottom:0;width:auto;max-height:66dvh!important;border-left:0;border-top:3px solid var(--alert);align-content:normal;padding:16px max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom));background:var(--panel)}
.sheet:not(#end) .wrap{max-width:760px;margin:0 auto;gap:12px}#start{max-height:69dvh!important}#start .wrap{max-width:600px}
#qBtns{grid-template-columns:1fr 1fr}#qBtns.response{grid-template-columns:1fr}.action-scene{grid-template-columns:minmax(140px,240px) 1fr}.action-scene img{max-height:110px;object-fit:contain}.action-scene figcaption{padding:10px;font-size:13px}
@media(min-width:900px){#q{max-height:55dvh!important}#qBtns button{font-size:16px;padding:12px 16px}#qText{font-size:20px}}
@media(max-height:600px) and (orientation:landscape){.sheet:not(#end){max-height:62dvh!important;padding:10px 16px}.sheet:not(#end) .wrap{gap:8px}#qText{font-size:16px}#qBtns button{font-size:14px;padding:8px 12px}.hud{padding-top:4px}.hud b{font-size:20px}.action-scene img{max-height:60px}}
