/* Layout: one canvas covering the whole window; game.js scales the room to fit and draws the rest of the set around it.
   #stage only reports the safe-area insets to game.js through its padding.
   Written for old and new iOS Safari: no flex gap, no inset shorthand, fallbacks before max()/env(). */
:root {
  --ground: #16161b; /* graphite, the Factory after hours */
  --foil: #c9ccd6; /* Factory tinfoil */
  --pink: #ff3d8b; /* silkscreen magenta */
  --yolk: #ffd23f; /* silkscreen yellow */
  color-scheme: dark;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ground);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#stage {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
#screen {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  touch-action: none;
  -ms-touch-action: none;
  cursor: pointer;
  outline: none;
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
/* off screen for sighted players, read by screen readers; the links show up while they have keyboard focus */
.sr {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
a.sr:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  width: auto;
  height: auto;
  clip: auto;
  z-index: 2;
  padding: 8px 12px;
  background: #000;
  color: #ffd23f;
  font: bold 16px/1.2 monospace;
  outline: 2px solid #ff3d8b;
}
