/* The next site's host: only the frames it lays out, and its own loading line,
   in the theme's ground and ink (host.js sets --ground and --ink from the theme's
   card). Everything a visitor sees is drawn by the forged pieces, but for the share
   button after a round and the once-a-visit note on a browser with no graphics card. */
:root { --ground: #08070b; --ink: #ece6ff; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ground); color: var(--ink); }
body { font: 17px/1.4 system-ui, sans-serif; }
iframe { position: fixed; left: 0; top: 0; border: 0; display: block; }
#room, #game, #pages { width: 100%; height: 100%; }
#room { z-index: 1; }
#pages { z-index: 2; background: var(--ground); }
#game { z-index: 3; background: #000; }
/* A page drawn as a card over the room or the game (page contract v6): the place shows round it. */
#pages.card { z-index: 4; background: transparent; }
#chrome { z-index: 10; background: transparent; color-scheme: normal; }
/* The share button after a round (host.js, shareButton): in the middle of the play bar, so it
   covers none of the game (its score, its end card). */
#share { position: fixed; left: 50%; transform: translate(-50%, -50%); z-index: 11; height: 26px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--ground); color: var(--ink);
  font: 700 13px/1 system-ui, sans-serif; letter-spacing: .12em; cursor: pointer;
  max-width: min(36vw, 320px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#share:hover, #share:focus-visible { background: var(--ink); color: var(--ground); }
/* No WebGL, or WebGL on the CPU (host.js, warnNoGpu): one strip along the bottom, over the game's foot,
   never over its title (site audit 2026-11-11: under the play bar it hid LAST FRAME's name on a phone). */
.gpu-note { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; display: flex; gap: 12px; align-items: center;
  justify-content: center; padding: 8px 16px max(8px, env(safe-area-inset-bottom)); background: var(--ground); color: var(--ink);
  border-top: 2px solid var(--ink); font: 600 14px/1.35 system-ui, sans-serif; }
.gpu-note button { flex: none; min-width: 64px; height: 32px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--ground); font: 700 13px/1 system-ui, sans-serif; letter-spacing: .12em; cursor: pointer; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; letter-spacing: .2em; opacity: .7; }
/* The Controls card (next/web/controls.js): the visitor's keys and their controller's buttons, drawn
   by the host over everything, from the site's menu. */
#controls { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, .6); }
#controls .box { width: min(94vw, 640px); max-height: 90vh; overflow: auto; box-sizing: border-box; padding: 18px 22px;
  background: var(--ground); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 0 40px rgba(0, 0, 0, .7); }
#controls h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: .08em; text-transform: uppercase; }
#controls .hint { margin: 0 0 12px; opacity: .85; font-size: 15px; }
#controls table { width: 100%; border-collapse: collapse; font-size: 15px; }
#controls th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; padding: 4px 8px; }
#controls td { padding: 6px 8px; border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); vertical-align: top; }
#controls td small { display: block; opacity: .65; font-size: 12px; }
#controls tr { cursor: pointer; outline: none; }
#controls tr.on td { background: color-mix(in srgb, var(--ink) 18%, transparent); }
#controls tr.on td:first-child { box-shadow: inset 4px 0 0 #29e7ff; }
#controls .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
#controls button { font: 700 14px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px;
  border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
#controls button.on, #controls button:focus-visible { background: var(--ink); color: var(--ground); outline: 3px solid #29e7ff; outline-offset: 2px; }
/* A controller came (host.js, padToast), and the controller's debug overlay (?pad=debug). */
#padtoast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 30; margin: 0; max-width: min(92vw, 640px);
  padding: 10px 16px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ground); color: var(--ink);
  font: 600 14px/1.35 system-ui, sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#padtoast.on { opacity: 1; transform: translate(-50%, 0); }
#paddebug { position: fixed; left: 8px; bottom: 8px; z-index: 31; margin: 0; max-width: calc(100vw - 16px); overflow: hidden;
  padding: 8px 10px; background: rgba(0, 0, 0, .85); color: #7dffb0; border: 1px solid #7dffb0; border-radius: 6px;
  font: 12px/1.4 ui-monospace, Consolas, monospace; white-space: pre-wrap; pointer-events: none; }
