/* Finished logo images stay intact. The title uses the requested upper-left area. */
#game[data-screen=title] .title-logo{left:2.5%;top:4%;bottom:auto;width:48%;height:43%;object-position:center center}
#game[data-screen=briefing]{grid-template-rows:42px minmax(0,1fr)}
#game[data-screen=briefing] .scene-head{font-size:19px;font-weight:900;letter-spacing:.035em}
#game[data-screen=briefing] .mission-logo{left:3%;top:2%;width:50%;height:30%}
#game[data-screen=briefing] .stage-copy{top:6%;left:59%;right:4%;bottom:auto}
#game[data-screen=intro][data-intro="4"] .stage-copy{left:40%;right:3%;top:39%;bottom:auto}
#game[data-screen=intro][data-intro="4"] .panic-speech{padding:30px 32px;font-size:clamp(25px,3.6cqw,43px);line-height:1.35;text-align:center;white-space:normal;--bubble-fill:var(--paper);--bubble-stroke:var(--orange)}
.panic-speech .bubble-shape{stroke-width:4;filter:drop-shadow(0 7px 0 #132f2970)}
#game[data-screen=intro][data-intro="4"] .bubble-text{display:block;font-weight:900;animation:panic-word 220ms cubic-bezier(.16,1,.3,1) both}
@keyframes panic-word{from{transform:scale(1.16);opacity:.1}to{transform:scale(1);opacity:1}}
footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.footer-gallery{font:700 12px/1.4 var(--body);background:none;padding:3px 0;text-decoration:underline;text-underline-offset:3px;min-height:24px}
.result-sheet>.gallery-result-tools{flex:none;margin-top:0}
.result-sheet>.gallery-result-tools .gallery-result-buttons{grid-template-columns:repeat(4,minmax(0,1fr))}
.result-sheet>.gallery-result-tools .gallery-result-buttons :is(button,a){font-size:14px}
.result-sheet{overflow:auto;overscroll-behavior:contain}
body:has(.sentence-gallery-dialog[open]) #game{pointer-events:none}
@media(max-width:600px){
 #game[data-screen=title] .title-logo{left:4%;top:3%;width:92%;height:26%}
 #game[data-screen=briefing]{grid-template-rows:36px minmax(0,1fr)}
 #game[data-screen=briefing] .scene-head{font-size:17px}
 #game[data-screen=briefing] .mission-logo{left:4%;top:1%;width:92%;height:19%}
 #game[data-screen=briefing] .stage-copy{top:21%;left:5%;right:5%}
 #game[data-screen=intro][data-intro="4"] .stage-copy{top:62%;left:4%;right:4%;bottom:auto}
 #game[data-screen=intro][data-intro="4"] .panic-speech{font-size:clamp(22px,6.4cqw,30px);padding:28px 18px;line-height:1.4}
 .result-sheet>.gallery-result-tools .gallery-result-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
 .footer-gallery{font-size:11px}
}
@media(max-width:600px) and (max-height:640px){
 #game[data-screen=briefing] .mission-logo{height:20%}
 #game[data-screen=briefing] .stage-copy{top:23%}
 #game[data-screen=briefing] .speech{font-size:17px;padding:14px 17px 40px}
 #game[data-screen=intro][data-intro="4"] .stage-copy{top:61%}
 #game[data-screen=result] .result-sheet{top:2%;max-height:96%;height:96%;gap:8px;padding:12px 14px;overflow:hidden}
 #game[data-screen=result] .result-reason{display:none}
 #game[data-screen=result] .result-heading h1{font-size:36px;padding-block:8px}
 #game[data-screen=result] .result-score{font-size:27px}
 #game[data-screen=result] .result-actions{flex-direction:row;gap:6px}
 #game[data-screen=result] .result-actions button{min-height:44px;padding:8px 5px;font-size:14px}
 #game[data-screen=result] .result-document{flex:1 1 auto;min-height:58px}
 #game[data-screen=result] .result-document p{font-size:16px;line-height:1.65;margin-bottom:7px}
 #game[data-screen=result] .result-measures{gap:6px;padding-bottom:6px}
}
@media(min-width:601px) and (max-height:610px){
 #game[data-screen=briefing]{grid-template-rows:34px minmax(0,1fr)}
 #game[data-screen=briefing] .scene-head{font-size:17px}
 #game[data-screen=briefing] .stage-copy{top:3%}
}
