:root {
  --bg: #05070b;
  --glass: rgba(14, 20, 30, 0.62);
  --glass-strong: rgba(14, 20, 30, 0.82);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8eef7;
  --text-dim: #9aa8bb;
  --accent: #4cc3ff;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 10px;
  --blur: blur(14px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  /* safe-area insets (notch, home indicator); 0 on desktop */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); overflow: hidden; }
#app { position: fixed; inset: 0; }
/* Game surface: no page scroll, pinch/double-tap zoom, text selection or callouts (inputs stay selectable). */
html, body, #app { touch-action: none; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
#app { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#app input, #app textarea { -webkit-user-select: text; user-select: text; touch-action: manipulation; }
#app .fs-list, #app .fs-scroll { touch-action: pan-y; }
#canvas-root, #canvas-root canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Own stacking context: overlays inside the canvas root (traffic labels, airport markers) always sit below #hud and #ui. */
#canvas-root { z-index: 0; touch-action: none; }
#canvas-root * { touch-action: none; }
#hud { z-index: 1; }
#ui { z-index: 2; }
#hud, #ui { position: absolute; inset: 0; pointer-events: none; }
#hud > *, #ui > * { pointer-events: auto; }
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.glass button, .btn { font: inherit; color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.glass button:hover, .btn:hover { background: rgba(255,255,255,0.16); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--mono); }
#attribution { position: absolute; left: calc(8px + var(--sal)); bottom: calc(6px + var(--sab)); max-width: calc(100% - 16px); z-index: 3; pointer-events: none; }
#attribution .attr-btn { pointer-events: auto; font: 10px/1.4 var(--font); color: var(--text-dim); opacity: .55; background: none; border: 0; padding: 2px 3px; margin: 0; cursor: pointer;
  text-shadow: 0 0 3px rgba(0,0,0,.9); white-space: nowrap; }
#attribution .attr-i { display: inline-block; width: 11px; height: 11px; line-height: 10px; margin-left: 2px; text-align: center; font: italic 8px/10px serif; border: 1px solid currentColor; border-radius: 50%; vertical-align: 1px; }
#attribution .attr-btn:hover, #attribution .attr-btn[aria-expanded=true], #attribution .attr-btn:focus-visible { opacity: .95; }
#attribution .attr-panel { pointer-events: auto; position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; width: max-content; max-width: min(340px, calc(100vw - 16px - var(--sal) - var(--sar)));
  display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; font-size: 11px; line-height: 1.35; background: rgba(8,14,24,0.88); border: 1px solid var(--border); border-radius: 8px; }
#attribution .attr-panel[hidden] { display: none; }
#attribution .attr-panel a { color: var(--text); text-decoration: none; }
#attribution .attr-panel a:hover { text-decoration: underline; }
#attribution .attr-imagery { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 4px; color: var(--text-dim); }
#attribution .attr-imagery button { font: inherit; color: var(--text); background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
#attribution .attr-imagery button[aria-pressed=true] { background: rgba(76,195,255,0.22); border-color: var(--accent); cursor: default; }
/* Touch flight: the bottom corners hold the stick / throttle / buttons, so tuck the line into the top-left corner (above the speed tape). */
html.fs-touch #attribution[data-mode=FLIGHT] { bottom: auto; top: calc(3px + var(--sat)); }
html.fs-touch #attribution[data-mode=FLIGHT] .attr-panel { bottom: auto; top: 100%; margin: 4px 0 0; }
.globe-ui-shell { position: absolute; top: calc(12px + var(--sat)); left: calc(12px + var(--sal)); padding: 10px 14px; display: flex; gap: 12px; align-items: center; }
.globe-ui-shell h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .02em; }
