/* Shared game surfaces: Tic-Tac-Toe, Ludo, Snake Ludo, Guess the Person. */
.game-surface { display: grid; gap: 12px; padding: 4px 0 12px; justify-items: center; }
.game-surface.solo { justify-items: stretch; }
.game-info { text-align: center; font-weight: 600; min-height: 2.6em; }

/* dice */
.dice-row { display: flex; align-items: center; gap: 16px; justify-content: center; }
.die { font-size: 3.4rem; line-height: 1; width: 64px; text-align: center; }
.die.rolled { animation: tumble 0.45s ease-out; }
@keyframes tumble { 0% { transform: rotate(-200deg) scale(0.5); } 70% { transform: rotate(12deg) scale(1.15); } 100% { transform: rotate(0) scale(1); } }

/* Tic-Tac-Toe */
.ttt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(88vw, 380px); }
.ttt-cell { aspect-ratio: 1; border-radius: var(--radius); background: var(--card); border: 2px solid var(--line); font-family: var(--font-display); font-size: clamp(2.6rem, 16vw, 4.4rem); font-weight: 800; display: grid; place-items: center; }
.ttt-cell:not(:disabled):active { transform: scale(0.96); }
.ttt-cell.x { color: var(--accent); }
.ttt-cell.o { color: var(--teal); }
.ttt-cell.last { border-color: var(--gold); }
.ttt-cell.win { background: var(--gold); color: #3a2a00; border-color: var(--gold); }
.ttt-cell:disabled { opacity: 1; cursor: default; }

/* Ludo */
.ludo-board, .snake-board { width: min(94vw, 520px); height: auto; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.ludo-piece { transition: transform 0.28s ease; cursor: default; }
.ludo-piece.legal { cursor: pointer; animation: glow 0.9s ease-in-out infinite alternate; }
.ludo-piece.legal circle { stroke: var(--gold); stroke-width: 0.14; }
.ludo-piece.home { opacity: 0.85; }
@keyframes glow { to { filter: drop-shadow(0 0 0.25px var(--gold)) drop-shadow(0 0 0.4px var(--gold)); } }

/* Snake Ludo */
.snake-holder { width: 100%; display: grid; justify-items: center; }
.snake-token { transition: transform 0.45s ease; }
.snake { opacity: 0.82; filter: drop-shadow(0 0.04px 0.05px rgba(0, 0, 0, 0.4)); }

/* Guess the Person */
.gp-mine { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; }
.gp-mine .avatar-svg, .gp-reveal .avatar-svg { border-radius: 50%; }
.gp-reveal { display: flex; align-items: center; gap: 8px; }
.gp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.gp-grid.small { grid-template-columns: repeat(3, 1fr); }
.gp-card { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: var(--radius-sm); background: var(--card); border: 2px solid var(--line); font-size: 0.72rem; font-weight: 700; transition: transform 0.2s, opacity 0.2s; }
.gp-face { border-radius: 50%; overflow: hidden; width: 60px; height: 60px; }
.gp-grid.small .gp-face { width: 52px; height: 52px; }
.gp-face svg { width: 100%; height: 100%; }
.gp-card.selected { border-color: var(--accent); transform: scale(1.05); }
.gp-card.mine { border-color: var(--teal); }
.gp-card.flipped { opacity: 0.22; filter: grayscale(1); transform: scale(0.92); }
.gp-card:disabled { opacity: 1; }
.gp-card.flipped:disabled { opacity: 0.22; }
.gp-filters { display: grid; gap: 8px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.gp-filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gp-filter-row strong { width: 76px; font-size: 0.85rem; }
.chip.small { padding: 5px 12px; font-size: 0.85rem; }
.chip.on { background: var(--accent); color: #fff; border-color: transparent; }
.gp-filter-bar { display: flex; gap: 10px; justify-content: center; }
.gp-history-box { width: 100%; }
.gp-history-box h4 { margin: 0 0 6px; font-size: 0.95rem; }
.gp-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 180px; overflow: auto; }
.gp-history li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--card); border-left: 4px solid var(--line); font-size: 0.88rem; }
.gp-history li.yes { border-left-color: var(--good); }
.gp-history li.no { border-left-color: var(--bad); }
