/* Mini Arcade shared game-page styles */
:root { --bg:#14102a; --panel:#221b44; --ink:#fff7e6; --muted:#b9b0d9; --acc:#ffcc33; --acc2:#ff5a7a; --ok:#4fe39a; --line:#0c0918; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: "Kanit", "Prompt", "Leelawadee UI", "Tahoma", system-ui, sans-serif; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
#stage { position: fixed; inset: 0; display: grid; place-items: center; }
.game-canvas { image-rendering: pixelated; image-rendering: crisp-edges; background: #000; box-shadow: 0 0 0 4px var(--line), 0 12px 40px #0008; }
.overlay { position: fixed; inset: 0; display: grid; place-items: center; background: #0b0820cc; z-index: 20; padding: 16px; }
.ov-card { background: var(--panel); border: 4px solid var(--line); box-shadow: inset 0 0 0 3px #3b3170, 0 10px 0 var(--line);
  border-radius: 6px; padding: 22px 26px; max-width: 520px; width: 100%; text-align: center; max-height: 100%; overflow: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.ov-card h1 { margin: 0 0 4px; font-size: 34px; color: var(--acc); text-shadow: 3px 3px 0 var(--line); letter-spacing: .5px; }
.ov-cover { width: 100%; max-height: 180px; object-fit: cover; image-rendering: pixelated; border: 3px solid var(--line); margin-bottom: 10px; }
.ov-sub { color: var(--muted); margin: 0 0 10px; }
.ov-howto { text-align: left; margin: 0 auto 14px; padding-left: 20px; color: var(--ink); font-size: 15px; line-height: 1.6; }
.ov-diff { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 12px 0 8px; color: var(--muted); }
.ov-card button, .pause-btn { font: inherit; font-size: 17px; color: var(--ink); background: #3b3170; border: 3px solid var(--line);
  border-radius: 4px; padding: 8px 16px; cursor: pointer; box-shadow: 0 4px 0 var(--line); }
.ov-card button:hover { filter: brightness(1.2); }
.ov-card button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.ov-card button.pri { background: var(--acc2); }
.ov-back { display: inline-block; margin-top: 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.res-win { color: var(--ok) !important; } .res-lose { color: var(--acc2) !important; }
.pause-btn { position: fixed; top: 10px; right: 10px; z-index: 15; padding: 4px 10px; font-size: 14px; }
.touchpad { display: none; }
body.touch .touchpad { display: flex; position: fixed; left: 0; right: 0; bottom: 0; justify-content: space-between; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 10; pointer-events: none; }
.tp-side { display: flex; gap: 10px; pointer-events: auto; flex-wrap: wrap; max-width: 50%; }
.tp-side.right { justify-content: flex-end; }
.tp-btn { width: 64px; height: 64px; border-radius: 50%; font-size: 22px; color: #fff; background: #ffffff22; border: 3px solid #ffffff55; touch-action: none; }
.tp-btn.on { background: #ffcc3366; }
