/* piece-size.css — the CSS half of the ONE size rule for board pieces (Piece Standard, Clement 2026-12-01;
 * job P1).
 *
 * figure-size.js fits every sprite piece's ink to its board cell (RULE.fit of the cell, feet RULE.foot
 * below the cell centre) with one transform on the sprite itself, in the board's own units. For that to be
 * the piece's size, nothing else may scale or shift the figure. Earlier layers did (experience.css M1 and
 * SHOT-24, board-skins.css per board skin, and until P1 a phone-only 2x block), each with !important and
 * different numbers per board skin and per viewport width. This file is the last word: a sprite figure
 * carries NO CSS transform. There is no media query here and there must never be one: a piece is the same
 * share of its cell at 390 px as at 1440 px.
 *
 * Not touched: the vector fallback figure (no .warrior-sprite), the idle breath (individual translate /
 * scale / rotate properties, piece-idle.css), filters, opacity, tap targets and the token's position. */
#board-svg .warrior-figure:has(.warrior-sprite):not(:has(.ludo-aaa-character-art)),
#screen-game #board-svg #token-layer .game-token .warrior-figure:has(.warrior-sprite):not(:has(.ludo-aaa-character-art)),
#screen-game #board-svg #token-layer .game-token.token-in-base.selectable .warrior-figure:has(.warrior-sprite):not(:has(.ludo-aaa-character-art)) {
  transform: none !important;
}

/* Board-only stillness (Clement 2026-12-02): inactive board pieces sit still at rest size — no CSS
 * breathing, bounce or idle motion on the board. Home page and Locker are untouched. */
#board-svg #token-layer .game-token > .token-body > .warrior-figure,
#board-svg #token-layer .game-token .ludo-character-idle-visual {
  animation: none !important;
}
#board-svg #token-layer .game-token .ludo-character-idle-visual {
  transform: none !important;
  filter: none !important;
}

/* Two or more colours on one square share the cell: each piece is drawn at RULE.shared (.62) of the rule's
 * size, shrunk about its token centre, so every piece on the square stays inside the cell. app.js spreads
 * the tokens 7 units either side of the centre; piece-grounding.js puts the shadow under the smaller feet. */
#screen-game #board-svg #token-layer .game-token.token-shared-cell:not(.token-in-base) .warrior-figure:has(.warrior-sprite):not(:has(.ludo-aaa-character-art)) {
  transform-box: view-box !important;
  transform-origin: 0 0 !important;
  transform: scale(.62) !important;
}

/* The board never lets a figure draw past its own edge (the phone-only overflow: visible is gone with the
 * phone-only sizes). Every resting piece is inside its cell, and the cells stop a margin short of the edge. */

/* ---------- NOT YET UNDER THE RULE: the World Cup board's own vector characters ----------
 * The World Cup renderer hides the sprite and draws its own vector character in the figure
 * (.ludo-aaa-character-art, board/scene/aaa-visual-*.js), with its own art scale and a per-character
 * polish scale (board/scene/character-polish-service.js, .89-.95). That art is not a measured sprite, so
 * figure-size.js cannot fit it yet; bringing it under the rule is a follow-up in the Piece Standard track.
 * Until then it keeps the sizes it had on a wide screen before P1 (figure .90 on a square, .60 in the yard,
 * contents 10 units down), and P1 still removes its phone-only 2x: it is the same at every viewport width.
 * No media query here either. */
#screen-game #board-svg #token-layer .game-token:not(.token-in-base) .warrior-figure:has(.ludo-aaa-character-art) {
  transform-box: fill-box !important;
  transform-origin: 50% 88% !important;
  transform: translateY(0) scale(.90) !important;
}
#screen-game #board-svg #token-layer .game-token.selectable:not(.token-in-base) .warrior-figure:has(.ludo-aaa-character-art) {
  transform: translateY(-1px) scale(.93) !important;
}
#screen-game #board-svg #token-layer .game-token.token-in-base .warrior-figure:has(.ludo-aaa-character-art) {
  transform-box: fill-box !important;
  transform-origin: 50% 88% !important;
  transform: translateY(0) scale(.60) !important;
}
#screen-game #board-svg #token-layer .game-token.token-in-base.selectable .warrior-figure:has(.ludo-aaa-character-art) {
  transform: translateY(-1px) scale(.62) !important;
}
#board-svg #movement-presentation-layer .m2-movement-clone:not(.m2-capture-clone) .warrior-figure:has(.ludo-aaa-character-art) {
  transform-box: fill-box;
  transform-origin: 50% 88%;
  transform: scale(.90);
}
#board-svg .warrior-figure:has(.ludo-aaa-character-art) > * {
  translate: 0 10px;
}
#board-svg #token-layer .game-token.selectable[data-ludo-ground="on"]:not(.token-in-base):has(.ludo-aaa-character-art) > .sel-ring {
  translate: 0 10px;
}
#board-svg #token-layer .game-token.selectable[data-ludo-ground="on"].token-in-base:has(.ludo-aaa-character-art) > .sel-ring {
  translate: 0 22px;
}
