* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: radial-gradient(circle at center, #3b4654 0%, #1c2229 100%); font-family: system-ui, sans-serif; }
#game-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#dock-tools { position: fixed; right: 12px; top: 12px; bottom: 12px; width: 52px; display: flex; flex-direction: column; justify-content: space-between; z-index: 10; pointer-events: none; }
.tool-group { display: flex; flex-direction: column; gap: 10px; pointer-events: auto; }
.ico-btn { width: 50px; height: 50px; padding: 11px; border: none; border-radius: 14px; background: #363e4a; color: #e2e8f0; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
.ico-btn svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ico-btn:active { transform: scale(0.93); }
.ico-btn.c-yellow { background: #f5c542; color: #2b2108; }
.ico-btn.c-green { background: #5cc464; color: #0e2910; }
.ico-btn.c-blue { background: #5eaee8; color: #0b2236; }
.ico-btn.active { outline: 3px solid #fff; }
@media (orientation: portrait) {
  #dock-tools { right: 12px; left: 12px; top: auto; bottom: 120px; width: auto; height: 48px; flex-direction: row; }
  .tool-group { flex-direction: row; gap: 8px; }
  .ico-btn { width: 46px; height: 46px; padding: 10px; }
  body.zoomed #dock-tools { top: 12px; bottom: auto; }
}
select, #btn-start { padding: 8px 12px; border: none; border-radius: 10px; background: #2f3844; color: #fff; font-size: 14px; cursor: pointer; }
#setup-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.78); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
#setup-modal.hidden { display: none; }
.modal-box { background: #28303a; color: #fff; padding: 20px; border-radius: 14px; display: flex; flex-direction: column; gap: 10px; width: min(320px, 100%); max-height: 92vh; overflow-y: auto; }
.modal-box label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #cbd5e1; }
.modal-box label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 8px; color: #fff; }
#btn-start { background: #4a90e2; font-weight: 600; padding: 11px; margin-top: 4px; }
