.board-layout { display: grid; gap: 20px; align-items: start; }
.board-layout.with-moves { grid-template-columns: minmax(0, 1fr) 280px; }
.cell-name { font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92%; }
.cell-boost {
  position: absolute;
  right: 2px;
  bottom: 1px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}
.cell.build .cell-boost { color: var(--accent); }
.cell.xp .cell-boost { color: var(--xp); }
.cell.flag .cell-boost { color: var(--flag); }
.cell.player { background: var(--accent-soft); }
.cell.moved { box-shadow: inset 0 0 0 1px var(--accent); }
.cell.done { outline: 1px dashed var(--faint); outline-offset: -4px; }
.cell.from { box-shadow: inset 0 0 0 3px var(--flag); background: color-mix(in srgb, var(--flag) 18%, var(--surface)); }
.cell.to { box-shadow: inset 0 0 0 3px var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
/* stepping: everything but the move itself fades back */
.board-grid.focus .cell:not(.from):not(.to) > * { opacity: 0.3; }
.swatch.build { background: var(--accent); }
.swatch.xp { background: var(--xp); }
.swatch.flag { background: var(--flag); }
.swatch.moved { box-shadow: inset 0 0 0 1px var(--accent); }
.swatch.done { outline: 1px dashed var(--muted); outline-offset: -1px; }
.swatch.from { box-shadow: inset 0 0 0 2px var(--flag); }
.swatch.to { box-shadow: inset 0 0 0 2px var(--accent); }
.step-text { font-size: 13px; }
.mark-from { color: var(--flag); }
.mark-to { color: var(--accent); }
.moves { position: sticky; top: 16px; border: 1px solid var(--rule); background: var(--surface); }
.moves-head { padding: 8px 12px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.move-list { margin: 0; padding: 0; list-style: none; max-height: 560px; overflow-y: auto; }
.move {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  width: 100%;
  padding: 6px 12px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  text-align: left;
}
.move:hover { background: var(--hover); border-color: var(--rule); }
.move.active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.move-n { grid-row: span 2; font-size: 11px; color: var(--faint); padding-top: 1px; }
.move-cog { font-size: 13px; }
.move-path { font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) {
  .board-layout.with-moves { grid-template-columns: minmax(0, 1fr); }
  .moves { position: static; }
  .move-list { max-height: 320px; }
}
@media (max-width: 820px) {
  .cell-name { font-size: 8px; }
  .cell-boost { font-size: 8px; right: 0; bottom: 0; padding: 0 1px; }
}