/* Only laboratory. Desktop keeps existing layout. */
.mobile-gamebar{display:none}.game-wrap .touch-controls{display:none}.stick,.stick *{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.stick{--dx:0px;--dy:0px;position:relative;width:100px;height:100px;border-radius:50%;border:1px solid #72777b;background:#35383a;box-shadow:inset 0 0 0 9px #252729;color:#d4d7da;flex-shrink:0}.stick-knob{position:absolute;width:44px;height:44px;left:50%;top:50%;border:1px solid #aeb2b4;border-radius:50%;background:#666d71;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy)));pointer-events:none;box-shadow:0 2px 6px #0005}.stick.held .stick-knob{background:#a1a7aa}.fire-stick{border-color:#b47748;box-shadow:inset 0 0 0 9px #322b26}.fire-stick .stick-knob{border-color:#f6cb8f;background:#a9663c}.fire-stick.held .stick-knob{background:#edb46e}.stick-arrow,.stick-cross{position:absolute;pointer-events:none;font-size:12px;line-height:1}.stick-arrow.up{left:50%;top:8px;transform:translateX(-50%)}.stick-arrow.left{left:8px;top:50%;transform:translateY(-50%)}.stick-arrow.right{right:8px;top:50%;transform:translateY(-50%)}.stick-cross{font-size:23px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1;color:white}.touch-side{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative}.stick-label{font:11px/1.2 Arial,sans-serif;color:#c5c7c9;text-align:center;white-space:nowrap}.fire-side #throw{position:absolute;right:-49px;top:5px;width:44px;height:44px;min-height:44px;background:#35383a;border:1px solid #72777b;font:700 15px Arial,sans-serif;color:white;margin:0;border-radius:50%;touch-action:manipulation}.fire-side #throw:active{background:#91663e}.mobile-gamebar button{touch-action:manipulation}
@media (pointer:coarse),(max-width:600px){
.lab-page .game-page{width:100%;padding:0 0 20px}.lab-page .game-top{padding:10px 12px 0;margin-bottom:10px;display:block}.game-top h1{font-size:20px}.game-top .game-actions{margin-top:8px;gap:5px}.lab-page .game-actions button,.lab-page .game-actions .btn{min-height:44px;padding:7px 10px}.game-wrap{border:0}.mobile-gamebar{display:flex;align-items:center;gap:5px;background:#252729;color:#f1f1f1;padding:5px 8px;min-height:49px}.mobile-gamebar span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.mobile-gamebar button{background:#35383a;border-color:#64686b;color:#fff;min-height:40px;padding:5px 9px;font-size:12px;white-space:nowrap}.mobile-gamebar #mobile-reset,.mobile-gamebar #mobile-undo,.mobile-gamebar #mobile-next{font-size:22px;min-width:40px}.game-field canvas{min-height:0;max-height:none;width:100%;height:auto;object-fit:contain;touch-action:none}.hud{top:6px;left:6px;padding:6px 8px;min-width:100px;font-size:9px}.hud b{font-size:16px}.game-wrap .touch-controls{display:flex;position:static;pointer-events:auto;justify-content:space-between;align-items:center;padding:10px 62px 7px 16px;gap:0;touch-action:none;user-select:none;background:#252729}.game-bottom{padding:5px 7px 8px}.game-bottom .arsenal{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.arsenal button{min-height:48px;touch-action:manipulation;font-size:11px;padding:4px 2px}.arsenal button svg{height:20px;width:30px}.arsenal small{display:none}.game-help{padding:5px 2px 0;font-size:11px}.game-help span{display:none}.game-under{padding:0 12px}.game-footnote{padding:0 12px;margin-top:8px}.game-focus{overflow:hidden;overscroll-behavior:none}.game-focus .game-wrap{position:fixed;inset:0;z-index:10000;height:100dvh;width:100%;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);overscroll-behavior:none}.game-focus .game-field{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}.game-focus .game-field canvas{height:100%;width:100%;max-height:100%;object-fit:contain}.game-focus .game-bottom,.game-focus .mobile-gamebar,.game-focus .touch-controls{flex-shrink:0}.game-focus .game-help{display:none}.game-focus .touch-controls{padding-top:7px;padding-bottom:7px}.game-focus .mobile-gamebar span{font-size:11px}.game-focus .game-bottom{padding-bottom:7px}
}
@media (orientation:landscape) and (max-height:600px){
.game-focus .game-wrap{display:grid;grid-template-columns:112px minmax(0,1fr) 126px;grid-template-rows:44px minmax(0,1fr) auto;gap:0}.game-focus .mobile-gamebar{grid-column:1/-1;min-height:44px;padding:2px 7px}.game-focus .game-field{grid-column:2;grid-row:2}.game-focus .touch-controls{display:contents}.game-focus .move-side{grid-column:1;grid-row:2}.game-focus .fire-side{grid-column:3;grid-row:2;justify-content:center;padding-bottom:39px}.game-focus .fire-side #throw{top:auto;bottom:2px;right:calc(50% - 22px);width:40px;height:40px;min-height:40px}.game-focus .stick-label{font-size:10px}.game-focus .game-bottom{grid-column:1/-1;grid-row:3;padding:4px 6px}.game-focus .game-bottom .arsenal{grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}.game-focus .arsenal button{min-height:44px;font-size:10px;gap:1px}.game-focus .arsenal svg{height:18px;width:26px}.game-focus .game-field canvas{max-height:100%;height:100%;width:100%}.game-focus .game-field .hud{top:4px;left:4px}
}
@media (max-width:350px){.stick{width:88px;height:88px}.stick-knob{width:38px;height:38px}.game-wrap .touch-controls{padding-left:12px;padding-right:58px}.mobile-gamebar #mobile-focus{font-size:11px;padding:4px 5px}}
@media (max-height:620px) and (orientation:portrait){.game-focus .stick{width:82px;height:82px}.game-focus .stick-knob{width:36px;height:36px}.game-focus .touch-controls{padding-top:3px;padding-bottom:3px}.game-focus .arsenal button{min-height:43px}.game-focus .arsenal svg{height:16px}}

@media (pointer:coarse),(max-width:600px){.game-wrap:not(:fullscreen) .game-field canvas{max-height:58dvh}.game-focus .game-wrap .game-field canvas{max-height:100%}.mobile-gamebar #mobile-focus{background:#e8e8e3;color:#202124;border-color:#e8e8e3;font-weight:700}.mobile-gamebar #mobile-focus:active{background:#ccc}}
