/* Keep the image and its controls in the same reading context. */
.charthead .scene-zoom,.skill-visual .scene-zoom {
 min-height:44px; min-width:44px; margin:0; padding:.45rem .7rem;
 border:1px solid #688897; border-radius:.55rem; color:#173d4b; background:#fff;
 font:700 .9rem/1.2 Arial,sans-serif; text-transform:none; letter-spacing:0;
}
.skill-visual {position:relative; margin:0 auto; max-width:32rem; background:#f3f8f8; border-radius:.65rem}
.skill-visual .scene-zoom {display:block;margin-left:auto}
.skill-visual .decision-photo {margin:0 auto;max-height:36svh;object-fit:contain}
.skill-visual .rope-target {margin:0}
.scene-detail-frame {overflow:auto; overscroll-behavior:contain; max-height:61svh; border:1px solid #a7c2be; border-radius:.65rem; background:#d5e9e3}
.scene-detail-frame > svg,.scene-detail-frame > img {display:block;width:max(100%,44rem);height:auto;max-width:none;max-height:none;margin:0;border:0}
.scene-detail-frame.fit-scene > * {width:100%}
dialog:has(.scene-detail-frame) {width:min(58rem,calc(100% - 1rem));max-height:95svh}
#sceneScale {margin-top:.6rem;min-height:44px}
@media(max-width:760px){
 main:has(.guide-hud) {width:calc(100% - 1rem);margin-inline:auto;scroll-margin-top:.25rem}
 .guide-hud {margin:.4rem 0;gap:.35rem;font-size:.88rem}
 .guide-hud button {min-height:44px}
 .game .view {position:sticky;top:0;align-self:stretch;z-index:3;box-shadow:0 2px 5px #16364224}
 .game .charthead {min-height:44px;padding:0 .45rem;gap:.45rem;font-size:.78rem;letter-spacing:.02em}
 .game .charthead span:nth-child(2){display:none}
 .game .charthead .scene-zoom {margin-left:auto}
 .game .chartfoot {display:none}
 .game .chartbox {align-self:center;width:min(100%,60svh);max-width:none;margin:0 auto}
 .game .chartbox:has(svg[viewBox="0 0 640 568"]){width:min(100%,43svh)}
 .game .panel {min-width:0;padding:.8rem}
 .game .panel h1 {font-size:clamp(1.35rem,5.5vw,1.85rem);margin:.2rem 0 .5rem}
 .game .panel .eyebrow {display:none}
 .game .panel p {line-height:1.4}
 .game button,.decision-card button {touch-action:manipulation}
 .game .panel :is(button,summary,[tabindex]),.decision-card :is(.choices button,summary){scroll-margin-block-start:43svh}
 .decision-card .skill-visual {position:sticky;top:0;z-index:2;box-shadow:0 2px 6px #16364224}
 .decision-card .decision-chart {max-height:none}
 .decision-card .skill-visual .decision-photo {max-height:26svh}
 .decision-card .decision-prompt {font-size:1rem;line-height:1.4}
 .decision-card .deck-tip {margin-block:.4rem}
}
@media(max-height:530px){.game .view,.decision-card .skill-visual{position:static}}
