:root { --bg: #120a1c; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#app { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#screen { position: relative; line-height: 0; }
#game { display: block; touch-action: none; image-rendering: pixelated; image-rendering: crisp-edges; }

/* Filtre CRT: el mateix que el PolloSword HTML (style.css: .scanlines i .vignette) */
#crt { position: absolute; inset: 0; pointer-events: none; display: none; }
#crt.on { display: block; }
#crt .scanlines {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 10; opacity: 0.6;
}
#crt .vignette {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.85);
  z-index: 11;
}

/* Panell de proves de física (només per provar sensacions) */
#tune { position: absolute; top: 10px; right: 8px; left: 8px; max-width: 360px; margin: 0 auto;
  background: rgba(10, 4, 16, .94); color: #fff; padding: 10px 12px; border-radius: 8px; z-index: 5;
  border: 2px solid #7946b8; font: 13px/1.3 ui-monospace, Menlo, Consolas, monospace; max-height: 80vh; overflow: auto; touch-action: pan-y; }
#tune label { display: block; margin: 6px 0 2px; }
#tune input[type=range] { width: 100%; }
#tune .row { display: flex; gap: 6px; margin-top: 10px; }
#tune button { flex: 1; padding: 8px; border: 0; border-radius: 5px; background: #3a2350; color: #fff; font: inherit; }
.hidden { display: none !important; }
