/*
 * Board geometry. GENERATED by build/build_board_geometry.py from
 * Design/Content/board-geometry.json — do not edit by hand.
 *
 * Every number here is measured off `Design/Images/Boards/play-board.png` and converted
 * to the stage's own container units, so they are fractions of the board and correct at
 * any window size. **Replacing the board art invalidates all of them.**
 *
 * This file holds POSITIONS ONLY. Everything with a judgement in it — what the objects
 * look like, how they move, what is layered over what — is hand-authored in table.css,
 * economy.css and attunement.css, which consume these properties. If you are looking for
 * why something is shaped the way it is, it is in those files; this one only says where
 * it goes.
 *
 * The properties are declared on every direct child of the stage rather than on `.stage`
 * itself, because a container query unit resolves against the nearest ANCESTOR container
 * and an element is not its own — `cqh` written on the stage would measure the viewport.
 */

.stage > * {
    /* centre of the six carved rings */
    --board-ward-y: 72.891cqh;
    /* the ring's short axis; a socket is round in the world, not on screen */
    --board-ward-size: 8.289cqh;
    /* socket's bottom edge down to the centre of its nameplate */
    --board-ward-plate-drop: 1.668cqh;
    /* 78/86 — a disc lying in a socket, foreshortened */
    --board-ward-tilt: 0.907;
    --board-hand-x: 23.714cqw;
    /* the tray's floor, which is below the middle of the interior you can see */
    --board-hand-y: 73.22cqh;
    /* how far the two tokens sit off each other's line */
    --board-hand-stagger: 0.159cqh;
    /* two coins for a token; takes --board-ward-y for its height */
    --board-exchange-x: 78.098cqw;
    --board-deck-x: 9.121cqw;
    --board-deck-y: 75.122cqh;
    /* a card fitted to the well's 230px height */
    --board-deck-width: 16.295cqh;
    /* the well is a parallelogram: level top and bottom, leaning sides */
    --board-deck-skew: -3.7deg;
    --board-dish-x: 89.414cqw;
    /* the basin, which is a few pixels below the rim's own centre */
    --board-dish-y: 85.813cqh;
    /* 142/164 — coins lie in the bowl at the bowl's own angle */
    --board-dish-tilt: 0.866;
    --board-shelf-x: 52.063cqw;
    --board-shelf-y: 85.962cqh;
    /* the strip's interior, so the controls centre on the furniture not the stage */
    --board-shelf-width: 53.768cqw;
    /* centred between the well's TOP-LEFT and BOTTOM-RIGHT — its narrow corners */
    --board-destiny-x: 10.248cqw;
    --board-destiny-y: 43.73cqh;
    /* the well's sides lean, so the card in it leans with them — a SKEW, like the deck, because a rotation would tilt its level top edge against a painted one */
    --board-destiny-skew: -2.08deg;
    /* the painted Verse Draft panel — a hit area over finished art, so the client draws no border, no label and no logo into it (D5) */
    --board-verse-x: 89.653cqw;
    --board-verse-y: 44.315cqh;
    --board-verse-width: 12.44cqw;
    --board-verse-height: 31.668cqh;
    /* the panel's painted sides lean, so the hover glow that traces them leans with them — a SKEW, like the deck and the DESTINY well, because its top and bottom rules are level and a rotation would tilt them against the paint */
    --board-verse-skew: 2.88deg;
    /* the largest square-on card that clears a leaning well, inset 8px. A bare count of cqh, like a row's --seat-cqh: it is both the card's width and the numerator of its scale, and shipping a length as well would be two values for one number */
    --board-destiny-cqh: 18.349;
}

/*
 * The two rows are not the same size — the table tilts forward, so the far row is
 * both larger and more widely pitched. The gap is the painted pitch minus the card
 * that sits in it, which is why it is derived rather than typed.
 */
/* recess 155 x 202, pitch 202.1, grid centre x 831.7 */
.table__row[data-row='core'] {
    --seat-cqh: 14.311;
    --slot-gap: 4.033cqw;
    inset-block-start: 25.717cqh;
    inset-inline-start: 49.743cqw;
    --board-plate-drop: 2.019cqh;
}

/* recess 158 x 205, pitch 205.5, grid centre x 832 */
.table__row[data-row='optional'] {
    --seat-cqh: 14.524;
    --slot-gap: 4.117cqw;
    inset-block-start: 52.232cqh;
    inset-inline-start: 49.761cqw;
    --board-plate-drop: 2.125cqh;
}

/*
 * Each socket's own centre, because the painted six are NOT evenly pitched, and the
 * angle its token lies at, because six identical discs read as one sprite repeated.
 */
.ward:nth-child(1) { --ward-x: 32.835cqw; --ward-turn: 23deg; }
.ward:nth-child(2) { --ward-x: 40.628cqw; --ward-turn: -47deg; }
.ward:nth-child(3) { --ward-x: 48.403cqw; --ward-turn: 38deg; }
.ward:nth-child(4) { --ward-x: 56.208cqw; --ward-turn: -18deg; }
.ward:nth-child(5) { --ward-x: 63.953cqw; --ward-turn: 55deg; }
.ward:nth-child(6) { --ward-x: 71.477cqw; --ward-turn: -31deg; }
