/* Morpion (tic-tac-toe) — plateau family (design/Jeu - Morpion). A 3×3 marquetry
   board on the warm leather surface, the same in light and dark. The cross is
   engraved in gold, the ring incised in a cool neutral, so the two camps read by
   line, not only by tint; the winning line is barred in gold. Scoped .ttt-root. */

.ttt-root { display: flex; flex-direction: column; align-items: stretch; inline-size: 100%; color: var(--color-text); --cell: 92px; --tttgap: 10px; }

.ttt-surface {
  inline-size: 100%; box-sizing: border-box;
  background: #43302b; border-block: 1px solid #2c1f1b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: var(--space-6) 0; color: #f4ece5;
}
.ttt-inner { max-inline-size: 1060px; margin-inline: auto; padding-inline: var(--space-4); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; justify-content: center; }

.ttt-planche {
  flex: 0 1 auto; padding: 22px; border-radius: 4px; box-sizing: border-box;
  background: linear-gradient(152deg, #7b5638 0%, #603f2e 40%, #4c3427 78%, #5d3f2d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 6px rgba(0, 0, 0, 0.4), 0 22px 44px rgba(0, 0, 0, 0.40);
}
.ttt-board { display: grid; gap: var(--tttgap); }
.ttt-cell {
  inline-size: var(--cell); block-size: var(--cell); display: grid; place-items: center; border-radius: 10px;
  background: #3f2a20; box-shadow: inset 0 4px 9px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.ttt-cell.playable { cursor: pointer; }
.ttt-cell.playable:hover, .ttt-cell.hint { box-shadow: inset 0 4px 9px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--color-accent-400); }

.ttt-mark { position: relative; inline-size: calc(var(--cell) * 0.58); block-size: calc(var(--cell) * 0.58); }
/* O — an incised ring, cool neutral. */
.ttt-mark.ai { border-radius: 50%; border: calc(var(--cell) * 0.1) solid #cfd3d6; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); }
/* X — an engraved gold cross. */
.ttt-mark.human::before, .ttt-mark.human::after {
  content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 0;
  inline-size: 100%; block-size: calc(var(--cell) * 0.1);
  background: #d9a24a; border-radius: 999px; transform-origin: center; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
.ttt-mark.human::before { transform: translateY(-50%) rotate(45deg); }
.ttt-mark.human::after { transform: translateY(-50%) rotate(-45deg); }
.ttt-mark.win.ai { border-color: var(--color-accent-400); }
.ttt-mark.win.human::before, .ttt-mark.win.human::after { background: var(--color-accent-400); }

@media (prefers-reduced-motion: no-preference) { .ttt-root:not(.no-motion) .ttt-mark { animation: ttt-pop 0.16s ease-out; } }
@keyframes ttt-pop { from { transform: scale(0.6); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* Side panel: turn note + the two camps. */
.ttt-side { flex: 0 1 218px; min-inline-size: 200px; display: flex; flex-direction: column; gap: var(--space-4); color: #f4ece5; }
.ttt-turn { border-inline-start: 2px solid var(--color-accent-400); padding-inline-start: var(--space-3); font-size: 15px; min-block-size: 1.4em; }
.ttt-turn.over { font-family: var(--font-heading); font-weight: 600; color: var(--color-accent-300); }
.ttt-side-k { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244, 236, 229, 0.78); padding-block-end: 6px; border-block-end: 1px solid rgba(244, 236, 229, 0.2); margin-block-end: var(--space-2); }
.ttt-camp { display: flex; align-items: center; gap: 10px; min-block-size: 30px; }
.ttt-pastille { inline-size: 22px; text-align: center; font-size: 15px; }
.ttt-pastille.human { color: #d9a24a; }
.ttt-pastille.ai { color: #cfd3d6; }
.ttt-camp-n { font-family: var(--font-heading); font-weight: 600; font-size: 15px; }
.ttt-camp-c { margin-inline-start: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: rgba(244, 236, 229, 0.72); }

.ttt-hint { text-align: center; font-size: 12px; color: var(--color-neutral-600); max-inline-size: 560px; margin-inline: auto; padding-block-start: var(--space-3); }
.lz-variants.ttt-inline-chips { margin: 0; }
