/* Chặn zoom / cuộn / chọn chữ / menu giữ lâu trên iPad. Safari 16: không CSS nesting. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  font-family: -apple-system, "SF Pro Rounded", system-ui, sans-serif;
  background: linear-gradient(160deg, #1B2A4A, #2E4A7A); color: #fff;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

.screen {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.title { font-size: 72px; margin: 0 0 40px; letter-spacing: 2px; text-shadow: 0 6px 0 rgba(0,0,0,.25); }

.corner { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.corner-left { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 16px; }
.icon-btn { width: 64px; height: 64px; font-size: 32px; border-radius: 50%; background: rgba(255,255,255,.12); }

.players { display: flex; gap: 48px; flex-wrap: wrap; justify-content: center; }
.player { display: flex; flex-direction: column; align-items: center; gap: 16px; transition: transform .12s; }
.player:active { transform: scale(.94); }
.player .name { font-size: 40px; font-weight: 700; }
.player.last .avatar { box-shadow: 0 0 0 8px #fff, 0 10px 0 8px rgba(0,0,0,.25); }

.avatar {
  display: block; width: 220px; height: 220px; border-radius: 50%;
  background: var(--c) center / cover no-repeat; box-shadow: 0 10px 0 rgba(0,0,0,.25);
}
.avatar.small { width: 64px; height: 64px; box-shadow: none; }
[data-id="ken"] .avatar, .avatar[data-id="ken"] { --c: #3DBE6A; }
[data-id="suri"] .avatar, .avatar[data-id="suri"] { --c: #9B5DE5; }

.placeholder { font-size: 160px; opacity: .6; }

.play-btn { width: 180px; height: 180px; font-size: 96px; border-radius: 50%; background: #3DBE6A; box-shadow: 0 10px 0 rgba(0,0,0,.25); margin-top: 24px; }
.play-btn:active { transform: scale(.94); }

/* Chừa dải trên cho nút 🗺/⏸ để không đè hàng bóng đầu. */
#game-canvas { position: absolute; left: 0; right: 0; bottom: 0; top: calc(88px + env(safe-area-inset-top)); width: 100%; height: calc(100% - 88px - env(safe-area-inset-top)); touch-action: none; }
.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; background: rgba(10, 20, 40, .72);
}
.ov-icon { font-size: 140px; }
.ov-row { display: flex; gap: 40px; }
.big-btn { width: 120px; height: 120px; font-size: 64px; border-radius: 50%; background: rgba(255,255,255,.2); }
.big-btn:active { transform: scale(.94); }
