/* COLD IMPACT — mise en page : zone de jeu 16:9 centrée (letterbox), HUD canvas superposé. */
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
/* v010 : bloque le balayage deux doigts « page précédente » du trackpad Mac, qui faisait quitter la partie en visant */
html, body { overscroll-behavior: none; }
body { display: flex; align-items: center; justify-content: center; }
#game { position: relative; background: #000; }
#game canvas { position: absolute; left: 0; top: 0; display: block; image-rendering: pixelated; }
#game canvas.hud { cursor: crosshair; }
#cc-error { position: fixed; left: 16px; right: 16px; bottom: 16px; padding: 12px 16px; background: #300; color: #fcc; font: 13px/1.4 monospace; white-space: pre-wrap; z-index: 10; }

/* v022 : écran tactile — plein écran ; v033-ux : boutons posés sur le jeu (src/ui/dombuttons.js) et zones système */
:root { --cc-white: #f4f4f4; --cc-ink: #1a1a1a; --cc-glass: rgba(20, 20, 20, 0.45); --cc-yellow: #fdfd02; }
/* sonde des zones système (encoche, barre d'accueil) : le jeu en lit les marges calculées (Game.readSafe). Pour les tester
   sur ordinateur : document.documentElement.style.setProperty('--cc-safe-top', '47px') */
#cc-safe {
  position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: var(--cc-safe-top, env(safe-area-inset-top, 0px)) var(--cc-safe-right, env(safe-area-inset-right, 0px))
           var(--cc-safe-bottom, env(safe-area-inset-bottom, 0px)) var(--cc-safe-left, env(safe-area-inset-left, 0px));
}
body.cc-touch, body.cc-touch * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body.cc-touch { touch-action: none; align-items: flex-start; justify-content: flex-start; }
.cc-dombtn {
  position: fixed; z-index: 5; box-sizing: border-box; touch-action: none; margin: 0; padding: 0; cursor: pointer;
  background: var(--cc-glass); border: 3px solid var(--cc-white); box-shadow: 0 0 0 2px var(--cc-ink);
  color: var(--cc-white); font: bold 16px monospace; transition: transform 0.08s, background 0.08s;
}
.cc-dombtn[hidden] { display: none; }
.cc-dombtn:active { transform: scale(0.92); background: rgba(253, 253, 2, 0.35); }   /* état « enfoncé » */
.cc-pause {
  top: calc(var(--cc-safe-top, env(safe-area-inset-top, 0px)) + 12px); right: calc(var(--cc-safe-right, env(safe-area-inset-right, 0px)) + 12px);
  width: 60px; height: 60px; border-radius: 50%;
}
/* deux barres de pause, dessinées en CSS (aucune image à charger) */
.cc-pause::before, .cc-pause::after {
  content: ''; position: absolute; top: 17px; width: 7px; height: 20px; background: var(--cc-white); box-shadow: 0 0 0 2px var(--cc-ink);
}
.cc-pause::before { left: 17px; }
.cc-pause::after { right: 17px; }
.cc-skip {
  top: calc(var(--cc-safe-top, env(safe-area-inset-top, 0px)) + 12px); left: calc(var(--cc-safe-left, env(safe-area-inset-left, 0px)) + 12px);
  min-width: 96px; height: 52px; padding: 0 16px; border-radius: 26px;
}

/* v032 : saisie d'une graine (générateur de missions) — champ au-dessus du jeu, style du HUD */
#cc-seedbox {
  position: fixed; z-index: 20; left: 50%; top: 26%; transform: translate(-50%, -50%); display: none; gap: 10px; align-items: center;
  padding: 12px 14px; background: #101014; border: 3px solid #fdfd02; box-shadow: 0 0 0 2px #1a1a1a; font: bold 16px monospace; color: #fdfd02;
}
#cc-seedbox input {
  width: 13ch; padding: 8px; font: bold 20px monospace; text-transform: uppercase; background: #000; color: #f4f4f4; border: 2px solid #8a8a8a;
  -webkit-user-select: text; user-select: text; touch-action: auto;
}
#cc-seedbox button { min-width: 48px; min-height: 48px; font: bold 16px monospace; background: #1a1a1a; color: #f4f4f4; border: 2px solid #f4f4f4; }
