html, body { margin: 0; width: 100%; height: 100%; background: #000; color: #fff; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#debug { position: fixed; top: 0; left: 0; padding: 1rem; margin: 0;
  background: #000c; color: #fff; pointer-events: none; max-height: 90%; overflow: auto; }
[hidden] { display: none !important; }

#info { position: fixed; top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right)); z-index: 2; opacity: 0;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  pointer-events: none; transition: opacity 160ms ease; font: 12px/1.65 system-ui, sans-serif; }
#info.visible { opacity: 1; pointer-events: auto; }
#info button { display: grid; place-items: center; box-sizing: border-box;
  margin-left: auto; width: 36px; height: 36px; padding: 0; appearance: none;
  border: 1px solid #ffffff70; border-radius: 50%; background: #0009; color: #fff;
  cursor: help; font: 22px/1 system-ui, sans-serif; }
#info button svg { display: block; width: 22px; height: 22px; }
#info button:focus-visible { outline: 2px solid white; outline-offset: 4px; }
#info-popover { position: absolute; top: 100%; right: 0; padding-top: 8px;
  width: max-content; max-width: calc(100vw - 32px); }
#info dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px;
  margin: 0; padding: 12px 16px; border: 1px solid #ffffff26; border-radius: 8px;
  background: #111f; box-shadow: 0 4px 20px #0005; font-variant-numeric: tabular-nums; }
#info dt { color: #aaa; }
#info dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
@media (prefers-reduced-motion: reduce) { #info { transition: none; } }

#info .info-details { grid-column: 1 / -1; color: #aaa; margin-top: 5px; }
#info .info-project { grid-column: 1 / -1; margin-top: 5px; }
#info a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
#info a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
