/* tablut: rules used only by the tablut pages (loaded after base.css). */
/* Tablut board: a 9x9 float-grid (same technique as hnefatafl above -
   note the explicit width override below, since the shared .square
   base class hardcodes 12.5% for an 8-column board). Sides are told
   apart structurally, not by color alone: attackers are a filled
   disc, defenders an outlined disc, and the king gets his own crown
   marker on top of a defender disc - the same convention used for
   the smaller Brandub board. */
#tablut-board {
  display: block;
  width: 100%;
  max-width: 460px;
  border: 3px solid var(--border);
  background: var(--square-light);
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto;
}

.tablut-square {
  width: calc(100% / 9);
  background: var(--square-light);
  border: 1px solid var(--border);
}

.tablut-square-movable {
  background: linear-gradient(135deg, var(--text) 0, var(--text) 12px, transparent 12px) var(--square-dark);
}

.tablut-square.last-move {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.tablut-square-throne,
.tablut-square-corner {
  background: var(--square-dark);
}

.tablut-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74%;
  height: 74%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-sizing: border-box;
  pointer-events: none;
}

.tablut-piece-attacker {
  background: #111;
  border: 2px solid #000;
}

.tablut-piece-defender {
  background: var(--square-light);
  border: 2px solid var(--border);
}

.tablut-piece-king::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48%;
  height: 48%;
  transform: translate(-50%, -50%);
  clip-path: polygon(0% 100%, 0% 40%, 25% 60%, 50% 30%, 75% 60%, 100% 40%, 100% 100%);
  background: var(--border);
  box-sizing: border-box;
}

/* Small icons for the side-choice picker and board placeholder,
   matching the board's own piece styling. */
.tablut-icon-piece {
  display: inline-flex;
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: middle;
}

.tablut-icon-piece-attacker {
  background: #111;
  border: 2px solid #000;
}

.tablut-icon-piece-defender {
  background: var(--square-light);
  border: 2px solid var(--border);
}
