/* Reversi board. Layout and panels come from common/dojo.css. */
.boardbox { position: relative; width: 100%; max-width: 580px; margin-inline: auto; display: grid; grid-template-columns: 18px minmax(0, 1fr); grid-template-rows: 18px auto; gap: 4px; }
.cols, .rows { display: grid; font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; }
.cols { grid-column: 2; grid-template-columns: repeat(8, 1fr); align-items: end; }
.rows { grid-row: 2; grid-template-rows: repeat(8, 1fr); align-items: center; }
.boardwrap { position: relative; grid-column: 2; grid-row: 2; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 2px; padding: 2px; aspect-ratio: 1; width: 100%; background: var(--felt-line); border: 4px solid var(--felt-line); box-shadow: 6px 6px 0 var(--rule-2); touch-action: manipulation; }
.dojo .board .sq { position: relative; border: 0; padding: 0; border-radius: 0; background: var(--felt); cursor: pointer; min-width: 0; box-shadow: none; transform: none; }
.dojo .board .sq:hover { background: var(--felt); }
.dojo .board .sq:nth-child(odd) { background: var(--felt-2); }
.stars { position: absolute; inset: 6px; pointer-events: none; z-index: 2; }
.stars i { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--felt-line); }
.disc { position: absolute; inset: 10%; border-radius: 50%; z-index: 3; pointer-events: none; }
.disc.b { background: #111316; box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .08), 0 2px 0 rgba(0, 0, 0, .35); }
.disc.w { background: #f7f8f9; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 2px 0 rgba(0, 0, 0, .3); }
.disc.anim { animation: flip .3s ease; }
@keyframes flip { 0% { transform: scaleX(.05); } 100% { transform: scaleX(1); } }
.sq.last .disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16%; height: 16%; margin: -8% 0 0 -8%; background: var(--hl); }
.dot { position: absolute; left: 50%; top: 50%; width: 18%; height: 18%; margin: -9% 0 0 -9%; border-radius: 50%; background: rgba(0, 0, 0, .3); z-index: 3; }
.mk { position: absolute; inset: 6%; border-radius: 50%; z-index: 4; pointer-events: none; border: 4px solid var(--hl); }
.mk.you { border: 3px dashed #ff9aa6; }
.mk.hint { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.86); } }
.sv { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; z-index: 4; font-family: var(--mono); font-size: min(2.4vw, 11px); font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.sv.best { color: var(--hl); }
.pvn { position: absolute; inset: 26%; border-radius: 50%; z-index: 5; display: grid; place-items: center; font-family: var(--mono); font-size: min(3vw, 13px); font-weight: 700; }
.pvn.b { background: rgba(17, 19, 22, .85); color: #fff; }
.pvn.w { background: rgba(255, 255, 255, .92); color: #111316; }
.mini { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; }
.mini.b { background: #111316; }
.mini.w { background: #f7f8f9; border: 1px solid #9aa5b0; }
.kifu .mini, .pvline .mini { width: 10px; height: 10px; }
/* phones: the grade of your last move in one line right above the board (wide screens have the verdict panel beside
   it). Fixed height, so a new grade never moves the board. The stamp alone carries the grade color. */
.vmini { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 8px; border: 1px solid var(--rule-2); background: var(--surface); }
.vmbody { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.vmini .chip { flex: none; font-size: 12px; letter-spacing: .04em; padding: 4px 6px 3px; }
.vmtext { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.vmtext.note { font-family: var(--sans); color: var(--ink-2); }
.dojo .vmini button { flex: none; padding: 5px 8px; font-size: 12px; }
@media (min-width: 920px) { .vmini { display: none; } }
/* phones: the turn-and-eval line stays one line high on every move (the eval is cut short rather than wrapping), so the
   board does not jump; only a long message (hint, take-back, a new level) may take a second line */
@media (max-width: 919px) {
  .status.oneline { display: flex; align-items: center; gap: 6px; line-height: 22px; }
  .status.oneline #status { flex: 0 1 auto; }
  .status.oneline .evalnum { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
