/* The game's page (#502): the canvas fills the window, the notes sit above it. The site's colours and type (../styles.css). */
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/archivo-black-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
}
:root { --bg: #0e0f12; --panel: #15171b; --ink: #f2f2ee; --muted: #9a9da3; --accent: #c6ff3d;
        --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--mono); }
[hidden] { display: none !important; }
html:not(.handheld) .only-handheld { display: none !important; }
.play { position: relative; display: flex; flex-direction: column; height: 100%; }
.play__note { position: relative; z-index: 2; flex: 0 0 auto; margin: 0; padding: 14px 18px; background: var(--panel); border-bottom: 2px solid var(--accent); }
#canvas { display: block; width: 100%; flex: 1 1 0; min-height: 0; min-width: 0; background: #000; outline: none; }
.play__back { position: relative; z-index: 2; background: var(--bg); flex: 0 0 auto; margin: 0; padding: 8px 18px; font-size: 13px; color: var(--muted); }
.play__back a { color: var(--accent); }
/* A phone gets the note, not a game it cannot ride. */
html.handheld .play { height: auto; min-height: 100%; }
html.handheld #canvas, html.handheld .load { display: none !important; }

/* The loading screen lies over the game's box until the game has drawn. */
.load { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background: var(--bg); }
.load__bg, .load__shade { position: absolute; inset: 0; }
/* The home page's own still (usually in the browser's cache already), never fetched by a phone. */
html:not(.handheld) .load__bg { background: url("../img/shots/world-v3-1920.webp") center / cover; animation: load-zoom 18s ease-out forwards; }
@keyframes load-zoom { from { transform: scale(1); } to { transform: scale(1.09); } }
.load__shade { background: linear-gradient(rgba(14, 15, 18, .4) 0%, rgba(14, 15, 18, .2) 40%, rgba(14, 15, 18, .95) 85%); }
.load__box { position: absolute; left: 8%; right: 8%; bottom: 11%; }
.load__box p { margin: 0; max-width: 620px; }
.load__box p.load__name { margin-bottom: 20px; font: 400 clamp(44px, 8vw, 104px)/1 "Archivo Black", "Arial Black", sans-serif; }
.load__bar { height: 8px; max-width: 620px; background: rgba(255, 255, 255, .14); }
.load__bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s linear; }
.load__box p.load__row { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; color: #c9cbcf; }
.load__box p.load__tip { margin-top: 22px; min-height: 1.5em; color: var(--muted); }
/* Something went wrong: the words alone, no bar and no tip. Once the game has been on screen, they sit over it. */
.load--failed .load__bar, .load--failed .load__tip, .load--failed #play-percent { display: none; }
.load--over { background: none; }
.load--over .load__bg, .load--over .load__name { display: none; }
@media (prefers-reduced-motion: reduce) {
  .load__bg { animation: none !important; }
  .load__bar i { transition: none; }
}
