  :root { color-scheme: dark; }
  * { box-sizing: border-box; }
  body { margin: 0; background: #0e1116; color: #d7dae0; overflow: hidden;
    font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; height: 100dvh; }
  .stage { position: fixed; inset: 0; touch-action: none; }
  canvas { position: absolute; inset: 0; width: 100vw; height: 100dvh; display: block; }
  #fx { cursor: crosshair; }
  .fps { position: fixed; top: 8px; left: 8px; z-index: 5; font: 12px/1.35 ui-monospace, Menlo, monospace;
    color: #cfe6ff; background: rgba(8,12,18,.62); padding: 6px 9px; border-radius: 7px;
    border: 1px solid rgba(127,178,255,.25); white-space: pre; pointer-events: none; }
  .fps b { color: #8fe08a; } .fps .warn { color: #ffcf6b; } .fps .bad { color: #ff7d7d; }
  .err { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30;
    padding: 24px; text-align: center; font-size: 16px; color: #ff9a8a; background: #0e1116; }

  .mtools { display: flex; gap: 8px; position: fixed; left: 8px; bottom: 8px; z-index: 20; }
  .mtool { width: 46px; height: 46px; font-size: 20px; display: flex; align-items: center; justify-content: center;
    background: rgba(8,12,18,.62); border: 1px solid rgba(127,178,255,.3); border-radius: 10px; color: #cfe6ff; }
  .mtool.active { background: #7fb2ff; color: #0e1116; border-color: #7fb2ff; }

  .mdrive { display: flex; position: fixed; z-index: 15; gap: 12px; align-items: center; }
  .mdrive-l { left: 14px; bottom: 82px; }
  .mdrive-r { right: 14px; bottom: 18px; }
  .drivebtn { width: 60px; height: 60px; font-size: 26px; border-radius: 50%; padding: 0;
    background: rgba(34,48,63,.72); border: 1px solid rgba(127,178,255,.35);
    display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; }
  .jumpbtn { background: rgba(38,64,52,.78); border-color: rgba(127,255,178,.35); }
  .mfire { position: fixed; right: 132px; bottom: 28px; z-index: 16; }
  .firebtn { width: 84px; height: 84px; font-size: 32px; border-radius: 50%; padding: 0;
    background: rgba(107,51,51,.82); border: 1px solid #8a4444;
    display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; }
  .aimpad { position: relative; width: 104px; height: 104px; border-radius: 50%;
    background: rgba(8,12,18,.5); border: 1px solid rgba(127,178,255,.3); touch-action: none; }
  .aimpad::after { content: "🎯"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: .35; }
  .aimstick { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
    border-radius: 50%; background: rgba(127,178,255,.9); border: 2px solid #cfe6ff; pointer-events: none; }

  .drawer { position: fixed; inset: 0; z-index: 30; display: none; background: rgba(6,9,14,.72);
    backdrop-filter: blur(3px); padding: 14px; overflow-y: auto; flex-direction: column; gap: 10px; }
  .drawer.open { display: flex; }
  .panel { max-width: 640px; margin: 0 auto; width: 100%; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px;
    background: #151a22; padding: 14px 16px; border-radius: 10px; border: 1px solid #232b36; }
  .ctrl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
  .ctrl label { display: flex; justify-content: space-between; opacity: .8; }
  .ctrl label b { font-weight: 600; color: #7fb2ff; }
  input[type=range] { width: 100%; accent-color: #7fb2ff; }
  .drawer-close { align-self: flex-end; width: 42px; height: 42px; font-size: 20px; padding: 0; border-radius: 10px;
    background: #22303f; color: #d7dae0; border: 1px solid #33475c; }
  .panel.mp { display: block; }
  .mprow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .mpbtn { background: #22303f; color: #d7dae0; border: 1px solid #33475c; border-radius: 7px; padding: 8px 12px; font-size: 13px; }
  #mpRoom { background: #0e1319; color: #d7dae0; border: 1px solid #33475c; border-radius: 7px; padding: 7px 11px;
    font-family: ui-monospace, Menlo, monospace; font-size: 14px; letter-spacing: 3px; text-transform: uppercase; width: 96px; }
  .mpstat { display: block; margin-top: 8px; font-size: 12px; opacity: .7; }
  .mphint { font-size: 11.5px; opacity: .55; margin: 8px 0 0; line-height: 1.45; }
