/* Chapter camera and interaction overlays only. Cover, inventory and notebook keep their existing styles. */
#controls button{touch-action:none;user-select:none;-webkit-user-select:none;min-height:44px}
#transition.chapter-fade{background:#090d0b;transition:opacity .7s;opacity:1;z-index:25}
#transition.chapter-fade.leaving{opacity:0;pointer-events:none}
#transition.chapter-fade p{letter-spacing:3px}#transition.chapter-fade h2{font-size:clamp(26px,5vw,60px)}
#game.chapter-one #landscape{object-fit:cover;transition:opacity .35s ease,transform .7s ease}
#game.chapter-one #rotate{display:none}#game.chapter-one .crosshair{display:none}
#game.chapter-one .shade{background:linear-gradient(0deg,#080d0eb0,transparent 26%,transparent 80%,#080d0e88);pointer-events:none}
#hotspots.image-map{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none}
#hotspots.image-map button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;min-width:48px;min-height:48px}
#hotspots.image-map .hotspot{white-space:normal;text-align:center}
.rope-target,.knot-target-point{position:absolute;transform:translate(-50%,-50%);border:1px solid #e8d3a5;border-radius:50%;font-size:11px;letter-spacing:1px;text-shadow:0 1px 4px #000;background:#1e211780;padding:9px;color:#f6e7c7;z-index:2}
.rope-target{left:34.5%;top:53.5%;cursor:grab}.rope-target:active{cursor:grabbing}.rope-target.selected{box-shadow:0 0 0 8px #f4df9b3d;border-color:#fff4cc}
.knot-target-point{left:40%;top:44%;border-style:dashed;background:#d4bd6f25;box-shadow:0 0 18px #e1c78544}
.rope-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:0;transition:opacity .3s}.rope-overlay path{fill:none;stroke:#bda57a;stroke-width:3;stroke-linecap:round;filter:drop-shadow(1px 2px 1px #221d15)}
.rope-tied .rope-overlay{opacity:1}.rope-tied .rope-target,.rope-tied .knot-target-point{opacity:0;pointer-events:none}
.hand-target{width:14%;height:19%;border:1px solid #e5cf9160;border-radius:45%;background:#c9b58a14}
#debug-chapters{position:fixed;bottom:8px;right:12px;z-index:24;background:#212821;color:#ddd;padding:8px;max-width:200px}
#game.chapter-placeholder #landscape{visibility:hidden}#game.chapter-placeholder #scene{background:#111a16}
@media(orientation:portrait){#game.chapter-one #landscape{object-fit:contain}#game.chapter-one .immersive-inspect{visibility:visible}#game.chapter-one #objective{top:85px}#game.chapter-one #subtitle{bottom:140px}#game.chapter-one #controls{bottom:70px}#game.chapter-one .shade{background:linear-gradient(0deg,#080d0e88,transparent 40%,transparent 75%,#080d0e66)}}
@media(max-height:450px){#game.chapter-one #subtitle{bottom:80px;font-size:15px}#game.chapter-one #controls{bottom:27px}#game.chapter-one #objective{top:55px;font-size:12px}#debug-chapters{font-size:10px;padding:4px;bottom:3px;max-width:160px}}

#game.chapter-two #rotate,#game.chapter-two .crosshair{display:none}
#game.chapter-two #landscape{object-fit:contain;transition:opacity .4s,transform .5s}
#game.chapter-two .shade{background:linear-gradient(0deg,#080d0eb0,transparent 28%,transparent 78%,#080d0e88);pointer-events:none}
#hotspots .grass-target{background:transparent;border:1px solid #f4e8c655;color:transparent;border-radius:50%;width:8%;height:9%;min-width:44px;min-height:44px;text-shadow:none;box-shadow:0 0 14px #f4e8c622}
#hotspots .grass-target:hover,#hotspots .grass-target:focus-visible,#hotspots .grass-target.done{border-color:#f5e8bd;background:#f5e8bd22}
#hotspots .grass-target.gripping{box-shadow:0 0 22px #f5e8bd99}
@media(orientation:portrait){#game.chapter-two #objective{top:85px}#game.chapter-two #subtitle{bottom:140px}#game.chapter-two #controls{bottom:70px}}
#game.chapter-two .immersive-inspect{visibility:visible}

.tie-path{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.tie-path path{fill:none;stroke:#baa477;stroke-width:4;stroke-linecap:round;filter:drop-shadow(1px 2px 2px #18160f)}.tie-path circle{fill:#d6c49218;stroke:#e8d5a788;stroke-dasharray:4 5;stroke-width:1.5}
.carry-meter{position:relative;width:min(280px,70vw);height:4px;background:#f2e2b22b;margin:0 auto 26px;border-radius:3px}.carry-meter>span{display:block;height:100%;width:0;background:#e7d5a9;transition:width .05s linear}.carry-meter small{position:absolute;top:10px;width:100%;left:0;text-align:center;font-size:12px;color:#e7d5a9;letter-spacing:2px}.carry-grip.gripping{background:#e7d5a933!important;border-color:#fff0c9!important}
/* Independent cutout layers: pointer movement transforms equipment and arms, not the scene. */
#game.carrying-radio #landscape{opacity:0!important}
.radio-scene{position:absolute;inset:0;overflow:hidden;isolation:isolate;opacity:1;transition:opacity .35s;touch-action:none}
.radio-scene.loading{opacity:0;pointer-events:none}
.radio-scene>img,.radio-rig,.radio-rig>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none;-webkit-user-drag:none}
.radio-backdrop{z-index:0}.radio-comrade{z-index:1;transform-origin:45% 80%;transition:transform 1s ease}
.radio-rig{z-index:2;transform-origin:65% 72%;will-change:transform;transition:transform .18s ease-out}
.radio-rig>img{transition:transform .3s cubic-bezier(.2,.7,.2,1);transform-origin:50% 90%}
.radio-rig .radio-device{z-index:1}.radio-rig .radio-left-hand{z-index:2}.radio-rig .radio-right-hand{z-index:3}
.radio-scene.lifting .radio-rig{transition:none}.radio-scene[data-stage=balance] .radio-rig{transition:none}
.radio-inputs{position:absolute;inset:0;z-index:4;pointer-events:none}
#hotspots .radio-inputs button{position:absolute;pointer-events:auto;touch-action:none;transform:translate(-50%,-50%);background:transparent;color:#f3e3bc;border:1px solid #f3e3bc77;text-shadow:0 1px 4px #0009;box-shadow:0 0 16px #efddb51a;font-size:11px;letter-spacing:1px;cursor:grab;padding:4px;min-height:44px;min-width:44px}
#hotspots .radio-inputs button:focus-visible{outline:2px solid #fff0c0;outline-offset:4px}
#hotspots .radio-inputs button:disabled{opacity:0;pointer-events:none}
#hotspots .radio-hand-control{width:9%;height:12%;border-radius:50%;background:#151a1755!important}
#hotspots .radio-hand-control.dragging{cursor:grabbing;border-color:#fff5d8;box-shadow:0 0 22px #f5e2ba55}
.radio-grip-target{position:absolute;transform:translate(-50%,-50%);width:8%;height:11%;min-width:40px;min-height:40px;border:1px dashed #f6e5bf99;border-radius:45%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:10px;color:#f5e9ca;text-shadow:0 2px 5px #000;transition:background .2s,opacity .2s}
.radio-grip-target.near{background:#e8d79c55;border-color:#fff4bd;box-shadow:0 0 15px #e8d79c55}.radio-grip-target.secured{opacity:.25;border-style:solid}
#hotspots .radio-lift-control,#hotspots .radio-balance-control{left:65%;top:64%;width:32%;height:38%;border-radius:25%;border-color:#f3e3bc44;color:transparent;text-shadow:none}
.radio-lift-guide{position:absolute;left:68%;top:38%;font-size:clamp(12px,2vw,20px);color:#f5e5c5;text-shadow:0 2px 6px #000;pointer-events:none;animation:lift-guide 1.5s ease-in-out infinite}
@keyframes lift-guide{50%{transform:translateY(-9px);opacity:.6}}
.radio-balance{position:absolute;z-index:5;left:calc(50% - 55px);top:8%;width:110px;height:4px;background:#e9d4a344;border-radius:5px;opacity:0;pointer-events:none}
.radio-balance .balance-center{position:absolute;left:38%;right:38%;height:6px;top:-1px;background:#c5d8ac99;border-radius:2px}.radio-balance i{display:block;position:absolute;left:calc(50% - 3px);top:-4px;width:6px;height:12px;background:#fff0cb;border-radius:2px;box-shadow:0 0 10px #f5dfaa55}
.radio-scene[data-stage=balance] .radio-balance{opacity:1}
.radio-stage-label{position:absolute;top:1%;left:50%;transform:translateX(-50%);z-index:6;font-size:11px;letter-spacing:3px;color:#f2e7cc;text-shadow:0 2px 6px #000;pointer-events:none}
.radio-control-hint{font-size:12px!important;letter-spacing:1px!important;text-align:center;max-width:80vw;color:#e7d7b5;text-shadow:0 1px 5px #000;line-height:1.8;margin:0 auto}
.radio-scene.handoff-complete .radio-comrade{transform:translate(-1.8%,1%) rotate(-1.5deg)}
.radio-scene.handoff-complete .radio-rig{transition:transform .85s}
@media(prefers-reduced-motion:reduce){.radio-lift-guide{animation:none}.radio-rig,.radio-rig>img,.radio-comrade{transition:none}}

.radio-arms{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}

.radio-rig>img.radio-arm-long{width:100%;height:auto;object-fit:contain;max-height:none;max-width:none;transform-origin:0 0}

.radio-rig>img.radio-grip-occlusion{z-index:4;opacity:0;pointer-events:none}
.radio-grip-occlusion.left{clip-path:polygon(46% 64%,53% 64%,53% 84%,46% 84%)}
.radio-grip-occlusion.right{clip-path:polygon(79% 66%,86% 66%,86% 85%,79% 85%)}
.radio-scene.left-secured .radio-grip-occlusion.left,.radio-scene.right-secured .radio-grip-occlusion.right{opacity:1}

/* Readable chapter dates on desktop and landscape phones. */
#transition > p{font-size:clamp(19px,2vw,28px);line-height:1.5;letter-spacing:.18em;margin:0 5%;max-width:90%;}
@media(orientation:landscape) and (max-height:550px){#transition > p{font-size:20px;line-height:1.4}}
