@import url('tokens.css');
@import url('components.css');
:root {
  /* colours, type, space, elevation, motion: css/tokens.css (design system) */
  --font: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  /* stage box: 9:19.5 portrait, letterboxed */
  --stage-w: min(100vw, calc(100vh * 9 / 19.5));
  --stage-h: min(100vh, calc(100vw * 19.5 / 9));
  --u: calc(var(--stage-w) / 360);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: #000; overflow: hidden;
  font-family: var(--font); color: var(--navy);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
#stage {
  position: absolute; left: 50%; top: 50%;
  width: var(--stage-w); height: var(--stage-h);
  transform: translate(-50%, -50%);
  overflow: hidden; background: #3DB6F0;
}
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#world-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#ui-root { position: absolute; inset: 0; pointer-events: none; }
#ui-root > * { pointer-events: auto; }

/* floating world text (+x.xx) */
.float-text {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none;
  font: 900 calc(var(--u) * 15) / 1 var(--font); color: #FFD84A;
  -webkit-text-stroke: calc(var(--u) * 1.1) #5A3A12; paint-order: stroke fill;
  text-shadow: 0 calc(var(--u) * 1.5) 0 rgba(60, 30, 0, .35);
  will-change: transform, opacity;
}
.float-text.small { font-size: calc(var(--u) * 12); }
.float-icon {
  position: absolute; left: 0; top: 0; pointer-events: none;
  font: 900 calc(var(--u) * 14) / 1 var(--font); color: #fff;
  -webkit-text-stroke: calc(var(--u) * 1) #8A1E1E; paint-order: stroke fill;
}

#err-overlay {
  display: none; position: fixed; left: 4px; right: 4px; bottom: 4px; z-index: 9999;
  max-height: 45vh; overflow: auto; white-space: pre-wrap;
  background: rgba(160, 0, 0, .88); color: #fff; font: 11px/1.3 monospace; padding: 6px; border-radius: 6px;
}
