html { background: #172b32; color: #f5f4ee; font: 16px/1.4 system-ui, sans-serif; touch-action: manipulation; }
body { margin: 0; overflow: hidden; touch-action: manipulation; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
#game { position: fixed; inset: 0; overflow: hidden; }
#factory { display: block; width: 100%; height: 100%; touch-action: none; }
button, select, input, dialog { touch-action: manipulation; }
button { cursor: pointer; }
#boot-status { position: fixed; inset: 40% 10% auto; padding: 20px; background: #172b32; z-index: 60; text-align: center; }
#coach { position: fixed; left: max(90px, env(safe-area-inset-left)); bottom: calc(156px + env(safe-area-inset-bottom));
  z-index: 22; width: 390px; max-width: calc(100vw - 208px); padding: 14px; border: 2px solid #536367; border-radius: 14px;
  color: #263b42; background: #fff4e0; box-shadow: 0 5px 24px #142e3940; touch-action: manipulation; }
#coach h2 { margin: 0; font-size: 18px; }
#coach p { margin: 8px 0; }
#coach button, #help button { min-width: 44px; min-height: 44px; padding: 8px 14px; margin-right: 8px;
  font: inherit; color: #fff4e0; background: #263b42; border: 1px solid #536367; border-radius: 7px; }
#help { width: 480px; max-width: calc(100vw - 24px); border: 2px solid #536367; border-radius: 14px; background: #fff4e0; color: #263b42; }
#help::backdrop { background: #172b3280; }
#focus-marker { position: absolute; width: 52px; height: 30px; transform: translate(-50%, -50%); border: 4px solid #e4a225;
  border-radius: 50%; box-shadow: 0 0 0 3px #fff4e0; pointer-events: none; z-index: 3; }
.ml-menu a { color: #fff4e0; }
.harness *, .harness *::before, .harness *::after { transition: none !important; animation: none !important; }
@media (max-width: 899px), (max-height: 699px) {
  #coach { left: 8px; bottom: calc(148px + env(safe-area-inset-bottom)); max-width: calc(100vw - 116px); width: 360px; font-size: 14px; padding: 8px; }
  .ml-panel { top: auto; bottom: 76px; max-height: 55dvh; width: min(360px, calc(100vw - 24px)); }
  .ml-tray { scroll-padding: 8px; }
}
@media (max-height: 450px) { #coach { bottom: 76px; max-height: calc(100dvh - 144px); overflow-y: auto; } }
#hamper-label { position: absolute; transform: translate(-50%, -100%); padding: 3px 8px; border-radius: 8px;
  color: #263b42; background: #fff4e0; border: 2px solid #536367; pointer-events: none; font-size: 13px; }
