.focal-point-page{height:100dvh;overflow:hidden}
.focal-point-page main{height:100dvh;min-height:0;max-width:1250px;padding:12px 18px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;overflow:hidden}
.game-header{flex:none;gap:8px;padding:0;border:0;min-height:44px}
.game-header h1{flex:1;text-align:center;font-size:22px}
.game-header button,.game-header .home{display:grid;place-items:center;min-width:44px;height:44px;padding:6px;font-size:20px;border:0;border-radius:10px}
.game-header #hintBtn{font-size:12px}
.game-header .home{color:var(--text);transition:background .15s ease,color .15s ease}
.game-header .home svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.game-header .home:hover{background:#ffffff0d}
#soundBtn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:380px){.game-header{gap:0}.game-header button,.game-header .home{min-width:32px;padding:4px}.game-header h1{font-size:16px;min-width:0}}
.workspace{display:flex;flex:1;min-height:0;gap:0}
.board{position:relative;width:100%;height:100%;min-height:0;display:flex;align-self:stretch;margin:0;border-radius:18px}
#bench{width:100%;height:100%;min-height:0}
.rotate-controls{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.optic-rotate{position:absolute;width:44px;height:44px;padding:0;display:grid;place-items:center;border:1px solid #526d79;border-radius:50%;background:#203640;color:var(--lime);font-size:25px;pointer-events:auto;transform:translate(-50%,-50%);box-shadow:0 2px 8px #06131d55;touch-action:manipulation}
.optic-rotate{border:0;background:transparent;box-shadow:none;cursor:grab;touch-action:none;user-select:none;transform:translate(-50%,-50%) rotate(var(--handle-angle,0deg));font-size:20px}
.optic-rotate::after{content:"";position:absolute;inset:8px;border:2px solid var(--lime);border-radius:50%;background:#203640;z-index:-1}
.optic-rotate::before{content:"";position:absolute;left:21px;top:35px;width:2px;height:21px;background:var(--lime);pointer-events:none}
.optic-rotate:hover{background:transparent}
.optic-rotate:hover::after,.optic-rotate.rotating::after{background:#304b54;box-shadow:0 0 0 3px #d6ec9125}
.optic-rotate.rotating{cursor:grabbing}
.optic-rotate:disabled{opacity:.45;cursor:default}
.stage-footer{display:flex;align-items:center;gap:14px;flex:none;margin:0;font-size:12px;letter-spacing:0;color:var(--muted)}
.stage-footer label{display:flex;align-items:center;gap:8px}
.stage-footer select{margin:0;min-height:44px;padding:6px 10px;width:72px}
.stage-footer #levelTitle{flex:1;text-align:center;font-size:13px;color:var(--text)}
.stage-footer #levelTitle.level-complete{color:var(--lime);font-weight:700}
.stage-footer #nextBtn{min-height:44px;margin:0;background:var(--lime);color:var(--bg);font-size:13px;font-weight:700}
.stage-footer #nextBtn:disabled{background:var(--panel);color:var(--muted);cursor:default}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.optic-kit{flex:none;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;font-size:12px}
#kitLabel{color:var(--muted)}
#opticChoices{display:flex;gap:8px}
.optic-choice{display:flex;align-items:center;gap:6px;min-height:48px;padding:4px 10px;font-size:12px}
.optic-choice[aria-pressed=true]{border-color:var(--lime);background:#d6ec9115;color:var(--lime)}
#testBeam{min-height:44px;background:var(--lime);color:var(--bg);font-size:12px;font-weight:700}
.focal-point-page #bench .optic{cursor:pointer}
@media(max-width:600px){.optic-kit{gap:6px}#kitLabel{flex-basis:100%;text-align:center}.optic-choice{padding:3px 6px;gap:3px;font-size:11px}.optic-choice svg{width:18px;height:36px}#opticChoices{gap:4px}#testBeam{padding:6px 8px}}
dialog{max-height:calc(100dvh - 32px);overflow:auto}
#hint{padding:0;background:none}
@media(max-width:600px){.focal-point-page main{padding-left:8px;padding-right:8px;gap:8px}.game-header{gap:2px}.game-header h1{font-size:18px}.game-header button,.game-header .home{min-width:36px}.stage-footer{gap:8px;flex-wrap:wrap}.stage-footer #levelTitle{order:-1;flex-basis:100%;font-size:12px}.stage-footer #nextBtn{margin-left:auto}.board{border-radius:12px}}
@media(max-height:450px){.focal-point-page main{gap:6px;padding-top:6px;padding-bottom:6px}.stage-footer #levelTitle{order:0;flex-basis:auto}.game-header{min-height:36px}.game-header button,.game-header .home{height:36px}.stage-footer select,.stage-footer #nextBtn{min-height:36px}}

.optic-kit{gap:8px;justify-content:space-between}
#opticChoices{flex-basis:100%;width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;padding:3px 2px 7px;flex-wrap:nowrap;scrollbar-width:thin}
.optic-choice{flex:none;max-width:210px;min-height:48px;text-align:left}
.optic-choice span{max-width:145px;line-height:1.3}
.optic-choice:disabled{opacity:.35}
#kitLabel{flex:1;text-align:left}
#clearSlot{font-size:11px;padding:6px 10px;min-height:36px}
.lab-feedback{flex:none;min-height:16px;margin:0;text-align:center;color:var(--muted);font-size:11px;line-height:1.35}
.focal-point-page #bench .optic{cursor:grab}
.focal-point-page #bench .optic:active{cursor:grabbing}
.focal-point-page #bench .optic,.focal-point-page #bench .optic:active{cursor:pointer}
.light-source{cursor:pointer;outline:none}
.light-source:focus-visible{filter:drop-shadow(0 0 5px #d6ec91)}
.optic-choice[draggable=true]{cursor:grab;user-select:none}
.optic-choice[draggable=true]:active{cursor:grabbing}
.optic-drag-preview{position:fixed;left:-1000px;top:0;pointer-events:none;overflow:visible}
.optic-choice{flex-direction:column;justify-content:center;gap:3px;min-width:52px;max-width:70px;padding:5px 8px;text-align:center}
.optic-choice span{font-size:12px;line-height:1.2}
.tutorial-cue{position:fixed;z-index:40;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;white-space:nowrap}
.tutorial-cue span{font-size:30px;line-height:36px}
.tutorial-hand{animation:tutorial-hand-up 2.4s ease-in-out infinite}
.tutorial-cue span{animation:tutorial-hand-down 2.4s ease-in-out infinite}
@keyframes tutorial-hand-up{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes tutorial-hand-down{0%,100%{transform:translateY(0)}50%{transform:translateY(7px)}}
@media(prefers-reduced-motion:reduce){.tutorial-hand,.tutorial-cue span{animation:none}}
.tutorial-cue small{padding:4px 8px;border-radius:8px;background:#172832;color:#f3d486;font-size:12px}
.tutorial-active .board{background:#19313d;border-color:#708986}
.tutorial-active .game-header .home{pointer-events:none;opacity:.35}
.tutorial-active .game-header button:disabled{opacity:.35;cursor:default}
.tutorial-active #levelSelect:disabled{opacity:.45}
.tutorial-active .stage-footer>label{display:none}
.focal-tutorial{flex:none;border:1px solid #647d6a;background:#1b3037;border-radius:12px;padding:10px 14px;text-align:center}
.focal-tutorial strong{color:var(--lime);font-size:12px}
.focal-tutorial p{font-size:13px;line-height:1.4;margin:6px 0;color:var(--text)}
.focal-tutorial button{font-size:12px;padding:6px 12px;min-height:34px}
.focal-tutorial #tutorialNext{background:var(--lime);color:var(--bg)}
.tutorial-highlight{filter:drop-shadow(0 0 7px #f3c26d)}
.optic-choice.tutorial-choice{outline:3px solid #f3c26d;outline-offset:-1px;animation:focal-tutorial-glow 1s ease-in-out infinite alternate}
@keyframes focal-tutorial-glow{to{box-shadow:inset 0 0 14px #f3c26d55}}
@media(max-height:500px){.focal-tutorial{padding:6px 10px}.focal-tutorial p{font-size:11px;margin:4px 0}}
@media(prefers-reduced-motion:reduce){.optic-choice.tutorial-choice{animation:none}}
.selected-slot{stroke:var(--lime);animation:focal-slot-border 1.2s linear infinite}
@keyframes focal-slot-border{to{stroke-dashoffset:-40}}
.optic-choice[data-installed=true]{opacity:.5;border-style:dashed;cursor:pointer}
.optic-choice[data-hint-disabled=true]{color:#f0a6a6;border:1px solid #c26d76;background:#8c3c472b;opacity:.8;cursor:not-allowed}
.optic-choice[data-hint-disabled=true] svg path{stroke:#df8c96}
@media(prefers-reduced-motion:reduce){.selected-slot{animation:none}}
#diagramBtn{min-height:44px;font-size:12px;padding:8px 12px}
#diagramBtn:disabled{opacity:.4;cursor:default}
#congratulations{flex:none;text-align:center;color:var(--lime);font-weight:700;font-size:18px;line-height:24px;margin:0}
#winEffects{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:30}
.focal-confetti{position:absolute;top:-16px;width:8px;height:13px;border-radius:2px;animation:focal-confetti-fall 1.7s ease-in forwards}
@keyframes focal-confetti-fall{to{translate:35px 90dvh;rotate:540deg;opacity:0}}
@media(prefers-reduced-motion:reduce){.focal-confetti{display:none}}
@media(max-width:600px){#kitLabel{flex-basis:auto;font-size:11px}.optic-choice{max-width:180px}.lab-feedback{font-size:10px}}
