/* ================= Cờ Caro — bàn (dùng chung: game + trang kỳ phổ / bài tập, js/viewer.js) ================= */
.cboard { display: grid; grid-template-columns: repeat(15, 1fr); aspect-ratio: 1; width: 100%; border-radius: 10px; overflow: hidden; background: var(--cb-bg, #fbf8ef);
  box-shadow: 0 0 0 2px var(--cb-line, #c9d4e3), 0 14px 34px rgba(0, 0, 0, .45); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.cell { position: relative; display: grid; place-items: center; overflow: hidden; border-right: 1px solid var(--cb-line, #c9d4e3); border-bottom: 1px solid var(--cb-line, #c9d4e3); container-type: size; }
.cell.cr { border-right: 0; }
.cell.cb { border-bottom: 0; }
.cell.ban::after { content: "✖"; color: #c0392b; opacity: .55; font-size: 55cqmin; font-weight: 900; }
.cell.ban { cursor: not-allowed; }
.cboard.small .cell { border-width: 2px; }
.cell.free { cursor: pointer; }
@media (hover: hover) { .cell.free:hover { background: color-mix(in srgb, var(--cb-hl, #ffe9a6) 55%, transparent); } }
.cell.last { background: var(--cb-hl, #ffe9a6); }
.cell.win { background: var(--cb-win, #ffd24d); }
.cell i { font-style: normal; font-weight: 900; line-height: 1; font-size: 86cqmin; font-family: "Arial Black", "Segoe UI", Roboto, sans-serif; }
.cell.last i { animation: drop .16s ease-out; }
.cell i.em { font-size: 80cqmin; font-family: inherit; }
/* Classic set: X and O drawn with CSS so every font renders them the same size. */
.cell i.shape { position: relative; width: 80cqmin; height: 80cqmin; }
.cell i.sx.shape::before, .cell i.sx.shape::after { content: ""; position: absolute; left: 50%; top: -6%; width: 17%; height: 112%; margin-left: -8.5%; border-radius: 99px; background: currentColor; transform: rotate(45deg); }
.cell i.sx.shape::after { transform: rotate(-45deg); }
.cell i.so.shape { box-sizing: border-box; border: 12cqmin solid currentColor; border-radius: 50%; }
.sx { color: var(--px, #e5484d); }
.so { color: var(--po, #2f6fe0); }
.cell.win i { animation: pulse .9s ease-in-out infinite alternate; }
@keyframes drop { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { to { transform: scale(1.18); } }
.cboard.dark .cell.win i { filter: drop-shadow(0 0 4px #fff6); }

/* ---------- bộ xem ván (js/viewer.js) ---------- */
.cv { max-width: 520px; margin: 0 auto; }
.cv-ctl { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.cv-ctl button { flex: 1; padding: 9px 4px; border: 1px solid #2b3646; border-radius: 10px; background: #151c26; color: #e8eef6; font: inherit; font-weight: 800; cursor: pointer; }
.cv-ctl span { min-width: 64px; text-align: center; color: #93a3b8; font-weight: 700; font-variant-numeric: tabular-nums; }
.cv-note { min-height: 2.6em; margin: 8px 0 0; color: #c9d4e3; line-height: 1.45; }
.cv-mini { display: grid; gap: 0; width: 132px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 2px #c9d4e3; }
