:root { --paper: #f1ead8; --ink: #3b2f2b; --card: #fbf7ec; --line: #d9cfb8; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); color: var(--ink);
  font: 15px/1.4 ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, sans-serif; overscroll-behavior: none; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#map.dragging { cursor: grabbing; }
#controls { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom)); display: grid; gap: 6px; }
#controls button { width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink);
  font-size: 21px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 0 var(--ink); padding: 0; }
#controls button:active { transform: translateY(2px); box-shadow: none; }
#controls button:focus-visible, #map:focus-visible { outline: 3px solid #2f6fb0; outline-offset: 2px; }
#compass svg { width: 34px; height: 34px; }
#status { position: fixed; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); padding: 5px 12px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--ink); font-size: 13px; pointer-events: none; }
#debug { position: fixed; left: 8px; bottom: 8px; padding: 6px 8px; background: rgba(0, 0, 0, 0.65); color: #fff; font: 11px/1.35 ui-monospace, monospace; white-space: pre; border-radius: 6px; pointer-events: none; }
#fatal { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; background: var(--paper); font-size: 17px; }
[hidden] { display: none !important; }
