/* Mancala and Reversi boards on the head-to-head panel (public/boardgames.js). Follows BRAND.md: near-black
   surfaces, lime for what I can do and what is mine, gold for the last move, purple and off-white for the two sides. */
.ch-name small em.rv-d { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }

/* ---------- mancala ---------- */
.mc-board { display: grid; grid-template-columns: minmax(40px, .62fr) minmax(0, 6fr) minmax(40px, .62fr); gap: 8px; margin: 8px auto; padding: 10px; border-radius: 22px; background: var(--raise); border: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.mc-rows { display: grid; gap: 8px; min-width: 0; }
.mc-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.mc-pit { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--text); font: inherit; -webkit-appearance: none; appearance: none; touch-action: manipulation; }
.mc-pit > b { position: absolute; right: -2px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 700 12px/18px var(--display); font-variant-numeric: tabular-nums; text-align: center; }
.mc-st { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; width: 70%; }
.mc-st i { width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--text); box-shadow: inset 0 -1px 0 rgba(11, 11, 17, .35); }
.mc-row:first-child .mc-st i { background: var(--ice); }
.mc-pit.mine.can { border-color: var(--acid); cursor: pointer; }
.mc-pit.mine.can > b { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.mc-pit.mine:disabled { opacity: 1; }
.mc-pit.from { box-shadow: inset 0 0 0 2px rgba(255, 201, 62, .55); }
.mc-pit.last, .mc-store.last { box-shadow: inset 0 0 0 2px var(--gold); }
.mc-store { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.mc-store b { font: 700 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.mc-store small { font: 600 10px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mc-store.mine b { color: var(--acid); }
@media (hover: hover) { .mc-pit.mine.can:hover { background: rgba(182, 255, 30, .12); } }
@media (max-width: 560px) {
  .mc-board { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 5px; padding: 7px; border-radius: 18px; }
  .mc-row { gap: 4px; } .mc-rows { gap: 10px; }
  .mc-pit > b { min-width: 17px; height: 17px; padding: 0 3px; font-size: 11px; line-height: 15px; right: -3px; bottom: -5px; }
  .mc-store b { font-size: 19px; } .mc-store small { font-size: 8px; letter-spacing: .02em; }
}

/* ---------- reversi (the 8 x 8 frame is .ch-board from the chess board) ---------- */
.ch-board.rv { gap: 2px; padding: 2px; background: var(--bg); }
.ch-board.rv .rv-sq { background: var(--raise); border-radius: 5px; }
.ch-board.rv .rv-sq.hint { cursor: pointer; }
.ch-board.rv .rv-sq.last { box-shadow: inset 0 0 0 2px var(--gold); }
.ch-board.rv .rv-sq.flip { box-shadow: inset 0 0 0 100px rgba(255, 201, 62, .12); }
.ch-board.rv .rv-sq:disabled { opacity: 1; }
.rv-d { display: block; border-radius: 50%; }
.rv-sq .rv-d { position: absolute; inset: 11%; box-shadow: inset 0 -3px 0 rgba(11, 11, 17, .3); }
.rv-d.p { background: var(--purple); }
.rv-d.w { background: var(--text); }
