/* Fonts (spec C38): Latin subsets only (scripts/fonts-latin.sh), preloaded in each page's head; a character outside them takes the next face in the stack. */
@font-face { font-family: 'Ioskeley Mono'; src: url('/spray-ground/fonts/ioskeley/IoskeleyMono-Regular-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; unicode-range: U+0000-00FF, U+0100-017F, U+0131, U+02C6, U+02DA, U+02DC, U+03BB, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2116, U+2122, U+21B5, U+2190-2199, U+2212, U+2215, U+221E, U+2248, U+2318, U+2500, U+2580-2593, U+25A0, U+25B2, U+25B6, U+25C9, U+25CB, U+25CF, U+2715, U+271D; }
@font-face { font-family: 'Ioskeley Mono'; src: url('/spray-ground/fonts/ioskeley/IoskeleyMono-Bold-latin.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; unicode-range: U+0000-00FF, U+0100-017F, U+0131, U+02C6, U+02DA, U+02DC, U+03BB, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2116, U+2122, U+21B5, U+2190-2199, U+2212, U+2215, U+221E, U+2248, U+2318, U+2500, U+2580-2593, U+25A0, U+25B2, U+25B6, U+25C9, U+25CB, U+25CF, U+2715, U+271D; }
@font-face { font-family: 'Satoshi'; src: url('/spray-ground/fonts/satoshi/Satoshi-Black-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: block; unicode-range: U+0000-00FF, U+0100-017F, U+0131, U+02C6, U+02DA, U+02DC, U+03BB, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2116, U+2122, U+21B5, U+2190-2199, U+2212, U+2215, U+221E, U+2248, U+2318, U+2500, U+2580-2593, U+25A0, U+25B2, U+25B6, U+25C9, U+25CB, U+25CF, U+2715, U+271D; }

html, body { margin: 0; padding: 0; overflow: hidden; }
/* canvases fade in once a frame has been drawn (kit.js sets kit-drawn; spec C38.12), so the page never shows a blank canvas that then pops */
canvas { opacity: 0; transition: opacity 180ms ease-out; }
html.kit-drawn canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) { canvas { transition: none; } }

/* the page's loading mark (kit.js creates #p5_loading; p5 would otherwise write a serif 'Loading...' at the top left): none at first, then a quiet centred mono word */
#p5_loading { position: fixed; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; animation: kit-loading-in 300ms ease-out 400ms forwards; font: 400 10px/1.4 'Ioskeley Mono', 'Ioskeley Mono Fallback', ui-monospace, Menlo, monospace; letter-spacing: 0.3em; text-transform: uppercase; color: #8fa89b; }
html.mode-light #p5_loading { color: #3f4c46; }
@keyframes kit-loading-in { to { opacity: 0.8; } }
/* stills (?frame=N, kit.js adds kit-still): opaque from the first frame, no fade, and the loading mark never shows */
html.kit-still canvas { opacity: 1; transition: none; }
html.kit-still #p5_loading { display: none; animation: none; }
canvas { display: block; }

.kit-label {
  position: fixed;
  left: 6px;
  bottom: 6px;
  z-index: 5;
  pointer-events: none;
  font: 400 10px/1.4 'Ioskeley Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.kit-label b { font-weight: 700; }

/* Game pages (kit.js adds `kit-game` to html): no scrolling or rubber-banding, canvases take every touch. The Menu button and pause sheet are
   chrome.css's; the touch controls are pad.css's. */
html.kit-game, html.kit-game body { overscroll-behavior: none; }
html.kit-game body { position: fixed; inset: 0; width: 100%; height: 100%; }
html.kit-game canvas { touch-action: none; }
html.kit-game button { touch-action: manipulation; }
/* Nothing on a game or a sketch selects (spec C65): no selection by drag, double click or long press, no touch callout, link preview or magnifier, no tap
   flash, no image ghost. Only the games' and sketches' pages load this style sheet (stills and the /explore/ viewer frame too). The selectors are heavy
   enough to beat a rule that turns selection back on for a component. Exceptions: text fields and editable content (the caret and selection stay), and
   the Diamond Hands invite link `[data-online-link]`, the one text a player copies. */
html:root,
html:root :not(input, textarea, [contenteditable]:not([contenteditable='false']), [contenteditable]:not([contenteditable='false']) *, [data-online-link], [data-online-link] *) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
html:root :is(input, textarea, [contenteditable]:not([contenteditable='false']), [contenteditable]:not([contenteditable='false']) *) { -webkit-user-select: text; user-select: text; }
html:root :is([data-online-link], [data-online-link] *) { -webkit-user-select: all; user-select: all; }
html:root :is(img, a) { -webkit-user-drag: none; user-drag: none; }
/* the label's [R] NEW SEED means nothing on touch: sketches hide it on touch screens (the ≡ menu has New seed); games have no label (spec C52.1) */
@media (pointer: coarse) { .kit-label { display: none; } }
html[data-device='phone'] .kit-label { display: none; }
