/* Tic-Tac-Toe and Four/Five in a Row. Builds on table.css. */
.lg { --lg-x: #ff7675; --lg-o: #74b9ff; }
.lg .lg-seats { display: flex; gap: 8px; margin: 6px 0; }
.lg .lg-seat { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 2px solid transparent; min-width: 0; }
.lg .lg-seat.turn { border-color: var(--gold, #f2c14e); }
.lg .lg-seat.won { background: rgba(242, 193, 78, .2); }
.lg .lg-who { display: grid; min-width: 0; } .lg .lg-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lg .lg-who small { opacity: .75; }
.lg .lg-mark .lg-piece { width: 28px; height: 28px; font-size: 20px; }
/* pieces */
.lg .lg-piece { display: inline-grid; place-items: center; width: 78%; height: 78%; border-radius: 50%; font-weight: 900; line-height: 1; }
.lg .lg-piece.x, .lg .lg-piece.o { border-radius: 8px; background: transparent; font-size: clamp(28px, 12vw, 64px); }
.lg .lg-piece.x { color: var(--lg-x); } .lg .lg-piece.o { color: var(--lg-o); }
.lg .lg-piece.red { background: radial-gradient(circle at 35% 30%, #ff9a9a, #d63031 60%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.lg .lg-piece.yellow { background: radial-gradient(circle at 35% 30%, #fff1a8, #f2c14e 60%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.lg .lg-piece.black { background: radial-gradient(circle at 35% 30%, #666, #111 65%); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.lg .lg-piece.white { background: radial-gradient(circle at 35% 30%, #fff, #cfd2d6 70%); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.lg .lg-piece.ghost { opacity: .55; }
/* boards */
.lg .lg-board { display: grid; width: min(100%, 520px); margin: 8px auto; border-radius: 14px; padding: 6px; grid-template-columns: repeat(var(--cols), 1fr); gap: 4px; aspect-ratio: var(--cols) / var(--rows); }
.lg .lg-cell { display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; border: 0; color: inherit; font: inherit; }
.lg .lg-tictactoe { aspect-ratio: 1; background: rgba(255, 255, 255, .08); max-width: min(100%, 360px); }
.lg .lg-tictactoe .lg-cell { background: rgba(255, 255, 255, .08); border-radius: 12px; cursor: pointer; }
.lg .lg-tictactoe .lg-cell:disabled { cursor: default; }
.lg .lg-tictactoe .lg-cell.free:not(:disabled):hover { background: rgba(255, 255, 255, .16); }
.lg .lg-gravity { background: #2d5fd0; gap: 3px; padding: 8px; }
.lg .lg-col { display: grid; grid-template-rows: repeat(var(--rows), 1fr); gap: 3px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 10px; min-height: 44px; }
.lg .lg-col:disabled { cursor: default; opacity: .9; }
.lg .lg-col:not(:disabled):hover, .lg .lg-col:not(:disabled):focus-visible { background: rgba(255, 255, 255, .16); outline: none; }
.lg .lg-gravity .lg-cell { background: #17408f; border-radius: 50%; aspect-ratio: 1; }
.lg .lg-gravity .lg-piece { width: 100%; height: 100%; }
.lg .lg-cell.last .lg-piece { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.lg .lg-cell.win .lg-piece { box-shadow: 0 0 0 3px var(--gold, #f2c14e), 0 0 14px 4px rgba(242, 193, 78, .8); animation: lg-pulse 1s ease-in-out infinite alternate; }
@keyframes lg-pulse { to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .lg .lg-cell.win .lg-piece { animation: none; } }
