/* ---------- Games Hall rounds with friends (protocol 5): the round card, the arena board and the ⏳ wait ---------- */
/* Loaded before style.css (its variables and keyframes); the card borrows network.css's .invite-card look and place. */

/* A friend's round: the pad (a 3×3 ring of portal stone round a glowing centre with 🎮), their face with the game's
   picture, and ▶. */
.round-card .invite-box { border-color: #7ff3ff; }
.round-pad { display: grid; grid-template-columns: repeat(3, 18px); grid-template-rows: repeat(3, 18px); gap: 2px; padding: 3px; border-radius: 10px; background: #0e0a1c; box-shadow: 0 0 14px 2px rgba(127,243,255,.45); flex: none; }
.round-pad i { display: block; border-radius: 3px; background: linear-gradient(135deg, #3b2a63, #1a1230); font-style: normal; }
.round-pad i.c { display: grid; place-items: center; background: radial-gradient(circle, #ffffff, #c9fbff 60%, #7ff3ff); font-size: 13px; line-height: 1; animation: pulse 1.6s ease-in-out infinite; }
.round-card .round-game { right: -16px; }
/* Over a finished round's end screen the card goes to the top, clear of the 🔁 and 🏠. */
.round-card.over-arena { top: calc(12px + var(--safe-t)); bottom: auto; }

/* The board beside the floor, clear of the tiles and the duel's numbers: the team first, then each player's face over
   their count. Desktop and taller landscape: down the left under 🏠 and the top bar; short landscape phones: on the
   right under the music bar; portrait phones: a row under the top bar. */
.arena-board { display: flex; flex-wrap: wrap; gap: 6px; }
.arena-board-side { position: absolute; left: calc(10px + var(--safe-l)); top: calc(136px + var(--safe-t)); width: 196px; }
.arena-duel > .arena-board-side { top: calc(110px + var(--safe-t)); }
.arena-chip { display: flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 17px; border: 3px solid var(--line); background: rgba(12,16,30,.86); box-shadow: 0 3px 0 rgba(0,0,0,.3); font-size: 15px; white-space: nowrap; }
.arena-chip b { font-family: var(--display); font-size: 18px; line-height: 1; }
.arena-board-side .arena-chip { flex-direction: column; gap: 2px; min-width: 42px; padding: 3px 4px 4px; border-radius: 12px; }
.arena-board-side .arena-chip b { font-size: 14px; }
.arena-chip.me { background: rgba(120,90,10,.9); box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 rgba(0,0,0,.3); }
.arena-chip-team { background: rgba(40,90,50,.92); }
.arena-chip-icon { display: grid; place-items: center; width: 26px; height: 26px; font-size: 18px; }
.arena-chip-face { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #2f3657; image-rendering: pixelated; object-fit: cover; font-size: 16px; }
.ended .arena-board-side, .waiting .arena-board-side { display: none; }

/* Finished first: ⏳ and a bigger board in the middle until the round ends. Centred with inset + margin auto, since it
   pops in with a transform (CLAUDE.md gotcha 3). */
.arena-wait { position: absolute; inset: 0 0 12% 0; margin: auto; width: max-content; max-width: 92vw; height: max-content; display: none; }
.waiting:not(.ended) .arena-wait { display: block; animation: popIn .32s cubic-bezier(.2,1.5,.4,1); }
/* While you wait, your last question (and its 🔊) and the music bar go, so nothing looks like it still needs an answer. */
.waiting:not(.ended) .arena-q, .waiting:not(.ended) .arena-music { visibility: hidden; }
.arena-wait-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 18px 16px; border-radius: 22px; border: 4px solid var(--line); background: rgba(12,16,30,.9); box-shadow: 0 8px 0 rgba(0,0,0,.35); }
.arena-wait-icon { font-size: 54px; line-height: 1; animation: bob 1.4s ease-in-out infinite; }
.arena-board-big .arena-chip { height: 46px; padding: 3px 12px 3px 4px; border-radius: 23px; }
.arena-board-big .arena-chip b { font-size: 24px; }
.arena-board-big .arena-chip-face { width: 36px; height: 36px; }

@media (max-width: 700px), (max-height: 600px) {
  .arena-board-side { top: calc(140px + var(--safe-t)); width: 172px; gap: 4px; }
  .arena-duel > .arena-board-side { top: calc(84px + var(--safe-t)); }
  .arena-board-side .arena-chip { min-width: 36px; padding: 2px 3px 3px; border-width: 2px; }
  .arena-board-side .arena-chip b { font-size: 12px; }
  .arena-board-side .arena-chip-face, .arena-board-side .arena-chip-icon { width: 22px; height: 22px; font-size: 15px; }
  .round-pad { grid-template-columns: repeat(3, 14px); grid-template-rows: repeat(3, 14px); }
  .round-pad i.c { font-size: 10px; }
}
@media (orientation: portrait) and (max-width: 700px) {
  .arena-board-side { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); width: auto; justify-content: center; top: calc(150px + var(--safe-t)); }
  .arena-duel > .arena-board-side { top: calc(70px + var(--safe-t)); }
}
@media (max-height: 430px) {
  .arena-board-side, .arena-duel > .arena-board-side { left: auto; right: calc(12px + var(--safe-r)); top: calc(126px + var(--safe-t)); justify-content: flex-end; }
}
