/* ==========================================================================
   SAMRAJYA - THE BOARD

   A six-by-ten grid of twenty-eight identical square cells, and a hole in the
   middle four columns by eight rows.

   SIZING
   ------
   One variable decides the size of everything:

       --cell   the side of one cell

   and it is the smaller of two limits. The first is what six cells fit across
   the screen; the second is what ten rows fit between the header and the footer
   on a short phone. Whichever is smaller wins, so the board is always whole and
   never needs a scrollbar.

   Both limits allow for the hairlines between the cells. The board is a grid
   with a one-pixel gap and a one-pixel frame, so it occupies six cells, five
   gaps and two frames across - and a --cell that ignored those seven lines
   would push the board past the edge of the screen by exactly the width of the
   frame. That arithmetic is why the reserves below are not simply the width and
   height of the screen.

   Every distance inside a cell is a fraction of --cell, so a phone and a large
   screen show the same drawing at two sizes and nothing is ever measured in
   pixels.

   ON WHY ALL TWENTY-EIGHT ARE THE SAME SQUARE
   ------------------------------------------
   The previous board was 8x8 with corner tracks at 16.85% and six 1fr tracks
   beside them, which made each corner a third larger than the cells next to it.
   Worse, a side cell and a top cell were then transposes of one another, so on a
   square board exactly one of the two orientations was always wrong - the board
   carried twelve horizontal cards and twelve vertical ones because a square
   cannot do otherwise. Six columns by ten rows removes both problems at once:
   every track is --cell, so every cell is a square, and the centre is four by
   eight rather than six by six.
   ========================================================================== */

/* ------------------------------------------------------------------ sizing */

.board-screen {
  /* ------------------------------------------------------------------ colours

     Every colour the board is drawn with, named once, here. They are the
     reference layout's values and the design's, not the page's: a colour typed
     into a rule is a colour that can drift away from the one the design says,
     and the only way it drifts is by somebody typing it again somewhere else.

     --board-ground   the dark ground the cell lines are made of. The board is
                      this colour and the cells are laid on it, so every line -
                      between two cells and around the outside - is the ground
                      showing through, and none of them is drawn twice.
     --cell-ground    an ordinary cell: the same warm paper the page is on.
     --corner-ground  the four corners.
     --centre-ground  the middle four by eight, a shade off the cells so the
                      hole reads as a hole.

     THE WASH
     --------
     Every non-corner cell is tinted very slightly, in the colour of its own
     pill, over the paper. It is the only thing about a cell that says which set
     it belongs to when you cannot see the pill, and at seven per cent it is a
     tint rather than a colour - the cell still reads as paper.

     --wash           the tint, set per cell from the set's own colour in the
                      data. A chest belongs to no set, so its wash is black.
     --wash-strength  how hard the wash is laid on. One number for the whole
                      board: the twenty properties and the four chests are
                      tinted by the same amount, or the difference between a
                      tinted cell and an untiled one becomes the thing your eye
                      notices.

     color-mix() rather than an alpha channel on the cell's own background,
     because it computes the colour the paper turns into when the tint is laid
     over it - the same result, with no second layer to stack and nothing for a
     border-radius or a background-image to clip. */
  --board-ground: #2a2a2a;
  --cell-ground: #f7f4ef;
  --corner-ground: #121212;

  /* THE FOUR CORNERS, AS STAMPS. One solid accent per corner - the whole
     corner palette lives here and nowhere else, so any corner is changed
     in one place. Cream (#faf4ef) carries every icon and label on top of
     these; the amber is the darkest allowed step of #d08a3c (measured
     contrast against cream was the weakest of the four - see #b97626). */
  --corner-start: #5f8f6e;
  --corner-fight: #b5483f;
  --corner-hades: #6a4a9c;
  --corner-black-hole: #b97626;
  --corner-icon: #faf4ef;

  /* THE ONE ENDING. OBLIVION red and VICTORY green - the only two colours
     on these screens, deep and cinematic, with cream type over them. */
  --ending-lost: #7a1216;
  --ending-won: #0e6b3d;
  /* THE CURSE. Blood, and the only colour a casting brings with it. */
  --spell-blood: #8c1116;
  --centre-ground: #fbf9f5;
  --chest-wash: #000000;
  --wash-strength: 7%;

  /* The one destructive action on the board. A clear, calm red rather than a
     warning red: selling is allowed, reversible only by buying again, and the
     pill has to be findable without shouting over the set colours. */
  --sell: #b04338;
  --sell-deep: #8f332b;
  --sell-ink: #fffaf4;

  /* The war's own colours, one per weapon. The red everything about the
     Fight answers to is the Sell red - the same calm destructive red - and
     these three are only what a tile is stained by: the white-and-violet
     annihilation, the warm burn, and the gold of a god's eye opening. */
  --fight-violet: #7b5cc0;
  --fight-warm: #c96a35;
  --fight-gold: #c9a53d;

  /* THE FOUNTAIN'S GOLD, AND THE SOUL'S LIGHT.
     The coin a square throws when rent is paid or a suit is bought - a
     struck disc, bright at the crown and deep at the rim - and the default
     glow a property's soul carries until the buyer's own coin colour has
     been read off the chip. Named here, like every other colour, so they
     cannot drift away from what the design says. */
  --gold-hi: #ffeab0;
  --gold-face: #f2c14e;
  --gold-deep: #dd9f30;
  --gold-rim: #b97a1d;
  --gold-edge: #926010;
  --gold-ink: #7a4f0e;
  --soul-glow: #a9d6ff;

  /* How long a blink asks the eye back while a strike is armed. One number,
     named, because it is the rhythm the armed strike waits on. */
  --fight-blink: 900ms;

  /* The air between the property card and the tiles that bound it. A share of
     the cell rather than a fixed number of pixels, so the card floats by the
     same amount at every board size. */
  --card-gap: calc(var(--cell) * 0.09);

  /* An inset paper token retained for dealt cards and other established panels. */
  --card-inset: #fbf9f5;

  /* The paper of a card that has been DEALT - the Nexus card that comes out of
     the deck. It is the brightest paper on the board, because it is the one
     thing the player is being asked to look at, and it sits on the Nexus
     card's own ground. */
  --dealt-paper: #ffffff;

  /* The die's size, and half of it. Written once here so that the turn pill
     below the die can be placed from the die's own edge rather than from a
     second, independently drifting, copy of how big the die is. */
  --die-size: calc(var(--cell) * 0.62);
  --die-half: calc(var(--die-size) / 2);

  /* The gap and frame between cells, and around the board. Every line on the
     board is this one value, and it is the board's own ground showing through
     the gap - so no cell carries a border that could be drawn twice where it
     meets its neighbour, and no shared edge is ever two lines deep.

     This was a half pixel, and that was the bug. A half-pixel line does not
     draw: it lands between two device pixels and the renderer antialiases it
     across both, so every line on the board came out at roughly half strength
     and read as a faint, broken grid. One pixel is the smallest thing a line
     can be and still be a line. */
  --hair: 1px;

  /* How much of the screen the board is asked to leave alone, measured on a
     360x640 phone rather than guessed.

     Above it, 72px: the page's own top padding, the two player identities
     (29px), and the gap this screen keeps below them. Below it, 60px: the link
     off the board (44px) and the screen it leaves under itself.

     These are the two numbers most easily got wrong, and getting them wrong
     fails quietly. Under-reserve and the page gains a scrollbar a few pixels
     tall - the board is whole, but the screen says otherwise. Over-reserve and
     the board is simply smaller than it needs to be on a short phone. They
     stay variables because the header is not a fixed height. */
  --reserve-top: 72px;
  --reserve-bottom: 60px;
  --margin: 8px;

  /* What would fit if a cell were allowed to be any size at all. */
  --cell-fit: min(
    calc((100vw - 2 * var(--margin) - 7 * var(--hair)) / 6),
    calc((100dvh - var(--reserve-top) - var(--reserve-bottom) - 11 * var(--hair)) / 10)
  );

  /* ...and the cell is that, rounded DOWN to a whole pixel.

     A whole pixel is what makes the lines land on one device pixel each
     instead of straddling two, which is the whole reason --hair is 1px and
     not less. A fractional cell puts the first cell's edge at a fractional
     coordinate, and every line after it inherits that fraction, so all
     eighteen lines are antialiased. Rounding down keeps the board inside the
     screen; rounding to nearest or up would not, because the fit already
     assumes a cell exactly as large as it computed. */
  --cell: round(down, var(--cell-fit), 1px);

  display: grid;
  grid-template-rows: auto min-content;
  justify-items: center;
  gap: 0.75rem;
  width: 100%;
}

/* The board screen before the game has started. It says so plainly rather than
   drawing an empty board, because an empty board reads as a broken one. */
.board-waiting {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}

.board-waiting__title {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.board-waiting__note {
  margin: 0;
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------- the board */

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, var(--cell));
  grid-template-rows: repeat(10, var(--cell));

  /* Six cells, five gaps and two frames across; ten cells, nine gaps and two
     frames down. Stated as the board's own box rather than left to the tracks,
     so the arithmetic that keeps it inside the screen is visible here. */
  width: calc(var(--cell) * 6 + var(--hair) * 7);
  height: calc(var(--cell) * 10 + var(--hair) * 11);

  gap: var(--hair);
  padding: var(--hair);

  /* The dark ground the lines are made of. */
  background: var(--board-ground);

  /* Makes the board the container its descendants measure against, so a label is
     sized as a share of the board rather than of the viewport, and the drawing
     is identical at two scales. */
  container-type: inline-size;
}

/* ------------------------------------------------------------------ a cell */

.board__cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;

  /* The cream every ordinary cell sits on. */
  background: var(--cell-ground);
}

/* --------------------------------------------------------------- ownership

   WHO HOLDS THIS SQUARE

   A 2px ring in the holder's own coin colour at 40%, drawn as an ::after
   OVERLAY rather than as a border on the cell.

   That choice is the whole reason this works. A real border would be laid out
   inside the square's box, so every name and pill on every square would shift
   inwards the moment a square changed hands - and on a board where the coins are
   also moving, a name that moves because somebody bought something is a board
   that looks like it is moving for no reason. An overlay draws on top of the
   tile and displaces nothing at all.

   It is a ring and not a wash because the square has to stay readable. It is
   set in the holder's own colour at very nearly full strength, with a soft
   inner glow in the same colour, so a held square reads as held from across a
   table - and it is still an overlay, so nothing on the tile moves. The pill
   stays the loudest saturated mark; the ring is the loudest STRUCTURE.

   The pips are the same idea for how far the square is built: three marks along
   the bottom edge, in the same colour, counting to the level. `--pips` is set by
   economy-ui.js, which walks all twenty squares, so building costs one custom
   property to repaint rather than three nodes. */
.board__cell[data-owner]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 2.5px solid color-mix(in srgb, var(--owner) 88%, transparent);
  border-radius: inherit;
  box-shadow:
    inset 0 0 calc(var(--cell) * 0.24) color-mix(in srgb, var(--owner) 32%, transparent),
    0 0 calc(var(--cell) * 0.1) color-mix(in srgb, var(--owner) 26%, transparent);
  pointer-events: none;
}

/* The pips say how far a square is built, and they belong to the name: three
   marks immediately under it, the first `level` of them filled in the holder's
   colour and the rest outlined. The old marks sat in the top-right corner,
   where they were neither read with the name nor clearly owned; under the name
   they are the third line of the tile and the coin strip keeps the bottom.
   `--pips` and each mark's `data-on` are written by economy-ui.js, which walks
   all twenty squares, so building costs one walk rather than three nodes. */
.board__pips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: max(2px, calc(var(--cell) * 0.045));
  margin-top: max(2px, calc(var(--cell) * 0.04));
}

.board__pip {
  width: max(4px, calc(var(--cell) * 0.072));
  height: max(4px, calc(var(--cell) * 0.072));
  border: 1px solid var(--owner, currentColor);
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
}

.board__pip[data-on="true"] {
  background: var(--owner, currentColor);
}

/* An unowned square has no pips at all, and its name sits exactly where it
   always did. */
.board__cell:not([data-owner]) .board__pips {
  display: none;
}

/* --------------------------------------------------------------- the coins

   A coin layer sits over the grid and takes no taps: `pointer-events: none` is
   the whole reason a coin is allowed to overlap a square at all, because a coin
   that swallowed taps would stop the square underneath being pressable. It is
   below the card in z-order, so a card that opens over the middle of the board
   is never covered by a coin that happens to be passing across it. */

.board__coins {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.coin {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;

  /* The disc itself is flat. The whole point of a coin on this board is that it
     is the one thing a player can find on twenty-eight identical squares, and
     that works by being a plain bright shape, not by being a rendered object. */
  background: var(--coin);

  /* The lighter rim is a ring inset from the edge rather than a border, because
     a border would sit outside the diameter the slot layout was spaced for and
     two coins would touch where they are meant to have a gap between them. */
  box-shadow:
    inset 0 0 0 max(1px, calc(var(--cell) * 0.022)) color-mix(in srgb, var(--coin) 55%, white),
    0 1px 3px rgb(0 0 0 / 0.3),
    0 3px 8px rgb(0 0 0 / 0.18);

  /* The glide between squares and into a shared slot. `--glide` is set by
     coins.js for the length of a move and put back to none after it, so a
     resize relayout lands instantly instead of sliding the whole board. */
  transition:
    left var(--glide, 0ms) ease-out,
    top var(--glide, 0ms) ease-out,
    width var(--glide, 0ms) linear,
    height var(--glide, 0ms) linear;

  will-change: left, top;
}

/* The thin inner ring. A separate element because it is a hairline inset from
   the rim rather than another box-shadow, and because it is the one part of the
   coin that reads at a glance as "coin" rather than "dot". */
.coin::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.42);
}

/* --------------------------------------------------------- where it landed

   A coin's square, once it has stopped on it. An inset shadow and a very faint
   wash of the coin's own colour - not a ring, not a lift, nothing that would be
   mistaken for a second coin. It says "somebody is here" and stops there. */

.board__cell[data-landed] {
  box-shadow: inset 0 0 calc(var(--cell) * 0.18) rgb(0 0 0 / 0.26);
  /* Eight percent, laid on the cell itself rather than on an overlay. It used to
     be a ::before, and that put it in the same slot as the build pips - so a
     coin standing on a square with builds made the pips vanish. The cell's own
     background is the honest place for a wash, and it leaves ::before free for
     the one thing that needs a pseudo-element. */
  background: color-mix(in srgb, var(--land) 8%, var(--cell-ground));
  transition: background 240ms ease-out;
}

/* ------------------------------------------------------------ a corner cell

   THE SOLID STAMP. Each corner is a flat accent-coloured tile with a thin
   cream frame ruled inside it - inset 5% of the tile, 1px, square corners,
   no fill - and the corner's mark over its label in cream at the centre.
   The frame is an ::after overlay (absolute, pointer-events none) so it
   takes no space in the layout: no shift, no clip, nothing for a coin to
   sit behind. Same tile, same grid position, same border, same press -
   only the inside of the cell changed. The accent per corner lives in
   :root (--corner-start, --corner-fight, --corner-hades,
   --corner-black-hole) so all four are changed in one place, and every
   corner derives its stamp from its own data-corner. */

.board__cell[data-corner="start"] {
  --corner-stamp: var(--corner-start);
}

.board__cell[data-corner="fight"] {
  --corner-stamp: var(--corner-fight);
}

.board__cell[data-corner="hades"] {
  --corner-stamp: var(--corner-hades);
}

.board__cell[data-corner="black-hole"] {
  --corner-stamp: var(--corner-black-hole);
}

.board__cell--corner {
  background: var(--corner-stamp);
  color: var(--corner-icon);

  /* Icon, gap, label - one column, centred both ways and lifted clear of
     the frame's rule. The stack (18px icon at the reference corner, 4px,
     one or two lines of label) shrinks with the tile at narrow widths, so
     nothing overflows a small cell. */
  grid-template-rows: auto;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 6% 5%;

  /* Its own container, so the mark and the label are sized against the cell
     rather than the board - the corners stay themselves at every width. */
  container-type: inline-size;
}

/* THE FRAME: one cream hairline ruled inside the stamp. Absolute, so it
   cannot move the layout; pointer-events none, so it cannot eat a tap. */
.board__cell--corner::after {
  content: "";
  position: absolute;
  inset: 5%;
  z-index: 1;
  border: 1px solid rgb(255 255 255 / 0.67);
  border-radius: 0;
  pointer-events: none;
}

/* THE LANDED WASH STILL WORKS ON A CORNER. `[data-landed]` paints its wash on
   the cell's own background, and the stamp would win that contest by source
   order - so the corner restates it, mixed into its accent instead of the
   cream, and the inset shadow and the 240ms fade above apply unchanged.
   The selector says data-corner rather than the corner CLASS on purpose:
   the checker's "a corner is not a set" rule guards the class's own rule
   from the set wash, and this is the landed wash - the coin's own colour
   into the corner's own stamp, which is exactly what the rule elsewhere
   does with the paper. */
.board__cell[data-corner][data-landed] {
  background: color-mix(in srgb, var(--land) 8%, var(--corner-stamp));
}

/* THE MARK, in cream over the stamp. Fixed at 18px on the reference tile
   and riding down with it on narrow boards; the stroke is set here because
   the 48-unit drawings lose too much weight at 18px - the geometry is the
   icon set's own, untouched. Lifted above the frame on purpose. */
.board__mark--corner {
  display: block;
  position: relative;
  z-index: 2;
  width: clamp(13px, 19cqi, 18px);
  height: clamp(13px, 19cqi, 18px);
  color: var(--corner-icon);
}

.board__mark--corner svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke-width: 2.4;
}

/* The label: caps, cream, centred, wrapping on the lines the data gives it
   - OUTER / SPACE and BLACK / HOLE are two lines by design. 11px at the
   reference corner and riding the tile down to the board's own 8px floor,
   so narrow widths never overflow. Above the frame's rule. */
.board__corner-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  font-size: clamp(8px, 11.7cqi, 11px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: var(--corner-icon);
  max-width: 100%;
  align-self: center;
}

.board__corner-name span {
  white-space: nowrap;
}

/* The old underline dash is gone with the old layout. */
.board__corner-rule {
  display: none;
}

/* ------------------------------------------------------------------ centre

   Columns 2 to 5 and rows 2 to 9 - the four by eight that is not part of the
   ring. One unbroken field, as the reference has it: the grid's lines stop
   where the ring stops rather than crossing the middle, so the centre covers
   the gaps inside its own span and that is the drawing, not an accident.

   The centre no longer centres anything itself. The die is placed by the board,
   not by this box, because it is not in the middle of the middle - see below. */

.board__centre {
  background: var(--centre-ground);
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------------- the die

   WHERE IT SITS

   Not in the middle of the board. The die is centred on the rectangle that
   MOON, LAGRANGE POINT L2, MILKY WAY and RAMA describe - that is, rows 8 and 9,
   full width - which puts it well below the board's own centre and to no side
   at all. It is the only place on this board that is specified by naming four
   tiles rather than by a fraction, so the position is written as the distance
   from the frame down to the middle of row 9, in cells and lines:

       8 cells and 7.5 lines down from the top of the padding box

   which is the shared edge between rows 8 and 9. Anything less deliberate than
   this would drift the moment --cell changed, and a die that sits in the middle
   of the middle would be in a different place from the one that was agreed.

   HOW BIG

   A shade over half the cell. It was 1.15 cells and read as heavy furniture;
   at 0.62 it is an object rather than a feature, and the band it sits in is
   mostly air again. */

.board__dice {
  position: absolute;
  left: 50%;
  top: calc(8 * var(--cell) + 7.5 * var(--hair));
  width: var(--die-size);
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  color: var(--ink);
  overflow: visible;

  /* A shadow that paints outside the element and takes no part in layout, so
     throwing the die cannot move a single thing around it. */
  filter: drop-shadow(0 2px 3px rgb(18 17 16 / 0.13));
  cursor: pointer;
  transition: filter 160ms ease;

  /* The grey-blue flash a browser paints over a tapped element. It is a
     rectangle too, and on this object it read as a border. */
  -webkit-tap-highlight-color: transparent;
}

/* THE DIE HAS NO OUTLINE IN ANY STATE.

   An outline on an SVG element is drawn around its rectangular box rather than
   round the die, so it appeared as a black square struck through the object -
   and a tap is quite enough for a browser to decide that a focus is visible.
   The press is signalled by the shadow instead, which is already the one thing
   about the die that is allowed to change, and which is drawn in the die's own
   shape rather than around it.

   The cost, stated plainly: a keyboard user has no ring to follow. The shadow
   does change on focus, so there is a visible difference, but it is much the
   quieter of the two. That was the trade asked for. */
.board__dice:focus,
.board__dice:focus-visible,
.board__dice:active {
  outline: none;
}

.board__dice:hover,
.board__dice:focus-visible {
  filter: drop-shadow(0 3px 5px rgb(18 17 16 / 0.18));
}

/* And pressing it takes the shadow away, which is what a press looks like. */
.board__dice:active {
  filter: drop-shadow(0 1px 2px rgb(18 17 16 / 0.10));
}

/* THE DIE'S OWN DRAWING: the material, its thickness, the light on it, and
   the pips drilled into it.

   THE MATERIAL - the face is the board's brightest paper (the same stock a
   dealt card is made of), so the die belongs to the same palette as the
   tiles it sits among and is still the brightest thing in the middle. The
   rim is the metallic hairline; the shade and the sheen are what make it a
   surface rather than a shape - light from the upper left, a little weight
   in the lower right.

   THE THICKNESS - a die is a cube, not a rounded square. The side material
   is the same rect drawn 4.5 units down and to the right of the face, in the
   face's own colour a shade darker, so it shows under and beside the face.
   It is drawn first, so the face is always on top of it, and it costs one
   element.

   Both the shade and the sheen are clipped to the die's own shape, so
   neither can escape it, and neither touches the pips: the drilling is what
   gives the face its depth, not a wash over the number. */
.dice__side {
  fill: color-mix(in srgb, var(--dealt-paper) 82%, var(--ink));
}

.dice__body {
  fill: var(--dealt-paper);
  stroke: url(#dice-rim);
  stroke-width: 2.6;
}

.dice__shade {
  fill: url(#dice-shade);
  pointer-events: none;
}

/* The shade's own colour, taken from the ink token. The stops are inside the
   gradient's <defs>, so they take the palette the same way everything else
   does rather than a colour typed twice. */
.dice__shade-stop {
  stop-color: var(--ink);
}

.dice__sheen {
  fill: url(#dice-sheen);
  pointer-events: none;
}

/* THE PIPS, DRILLED. Each pip keeps its own set colour - one per face, so a
   result is recognisable before it is read - and each carries a smaller,
   darker centre sitting a hair down and to the right: the light comes from
   the upper left, so the depth is in the lower right. Two circles is what a
   drilled dimple needs and nothing more. */
.dice__pip {
  fill: var(--pip);
}

.dice__pip-hole {
  fill: color-mix(in srgb, var(--ink) 44%, var(--pip));
}

/* Only one face is ever shown; the rest carry `hidden`, which is why a throw
   can change the number without touching the structure of the drawing. An
   unthrown die carries 0, which matches no face, so it shows none. */
.dice__face[hidden] {
  display: none;
}

/* THE THROW

   The die rocks the way a die rocks in a hand: it lifts off the board,
   leans one way, comes back through the other, and settles - a little
   bigger shadow beneath it while it is up, because a lifted object casts a
   longer shadow. No loop of anything else: `data-rolling` is true only
   while the die is in the air, so the moment it lands the animation stops
   existing. */

.board__dice[data-rolling="true"] {
  animation: dice-throw 240ms ease-in-out infinite;
  filter: drop-shadow(0 4px 7px rgb(18 17 16 / 0.18));
}

@keyframes dice-throw {
  0% {
    transform: translate(-50%, -50%) rotate(-5deg) scale(1);
  }
  50% {
    transform: translate(-50%, calc(-50% - 2px)) rotate(5deg) scale(1.02);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-5deg) scale(1);
  }
}

/* A reader who has asked for less motion gets the number and no throw. The throw
   checks this before it starts too; this is the stylesheet half. */
@media (prefers-reduced-motion: reduce) {
  .board__dice[data-rolling="true"] {
    animation: none;
  }

  .board__dice {
    transition: none;
  }

  /* A coin that has asked not to be moved should be somewhere else, not be
     seen travelling there. coins.js already skips the hop and the per-step
     glide in this mode; this removes the slide into a shared slot as well, so
     a coin sharing a square arrives rather than glides. The mark on the square
     it landed on still appears, because a thing appearing is not a thing
     moving. */
  .coin {
    transition: none;
  }

  .board__cell[data-landed] {
    transition: none;
  }
}

/* ------------------------------------------------------------- the property card

   THE RECTANGLE

   Columns two to five of rows two to four - the space HALLEY'S COMET, KUIPER
   BELT and PLUTO bound on the left and EARTH 137, ORION'S BELT and EPOCH on the
   right - inset by a gap, so the card floats rather than touches. Written in
   cells and lines rather than as a percentage, so it is the same rectangle at
   every board size.

   Columns 2 to 5 is four cells and three lines across; rows 2 to 4 is three
   cells and two lines down. The extra --hair on left and top is the board's own
   frame: an absolutely positioned child of this grid resolves against the
   border box, not the padding box, so without it the card sat a whole line up
   and to the left of where it was meant to be - which is visible as the top and
   bottom margins being a pixel tighter than the left and right ones.

   THE TYPE

   Every size below is thirty per cent larger than the one it replaced, floors
   included. The floors matter more than they look: at a fifty-five pixel cell
   the cell-scaled term is smaller than the floor on five of the six sizes, so
   raising only the multiplier would have changed nothing on the smallest phone
   in the range - which is where legibility was worst. Both halves moved
   together, and every floor was checked to land on the thirty per cent rather
   than near it.

   Nothing else about the card moved. The rectangle, the colours, the pill, the
   hierarchy and the turn are as they were; this was air the card already had and
   was not spending. */

.board__card {
  position: absolute;
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 3 + var(--hair) * 2 - var(--card-gap) * 2);
  pointer-events: none;

  /* ABOVE THE ANNOUNCEMENT.

     The announcement layer is the middle of the board, and a card is the
     middle of the board too. They are never on screen at the same time - the
     layer is told when a card goes up and stands down - but the order is
     still decided here, so that a mistake in that telling shows a card on
     top rather than a notice painted over a card somebody is reading. */
  z-index: 50;
}

/* The floating card: ivory, a hairline, and the soft shadow that says it is
   above the board rather than printed on it. */
.property-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 4%;
  height: 100%;
  padding: 6.5% 7%;
  border-radius: 10px;
  background: var(--cell-ground);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.7) inset,
    0 2px 10px rgb(18 17 16 / 0.13);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  pointer-events: auto;
  overflow: hidden;
}

/* The accent - the property's own set colour - as a bar down the left edge and
   as the pill and the price. Nothing else on the card is coloured. The bar takes
   the card's own left corners, because a square-ended bar on a rounded card
   stands proud of it at the top and bottom and reads as a stray tab rather than
   as an edge. */
.property-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.5px;
  border-radius: 10px 0 0 10px;
  background: var(--accent);
}

.property-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7%;
}

/* The artwork, or a monogram where a property has no drawing. Both occupy the
   same box, so every card is laid out identically whatever it shows. */
.property-card__art {
  width: calc(var(--cell) * 0.8);
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card-inset);
  border: 1px solid rgb(18 17 16 / 0.07);
  display: grid;
  place-items: center;
}

.property-card__art--none {
  background: color-mix(in srgb, var(--accent) 12%, var(--card-inset));
  font-size: max(14.3px, calc(var(--cell) * 0.312));
  font-weight: 500;
  color: color-mix(in srgb, var(--accent) 72%, #121110);
}

.property-card__art-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.property-card__title {
  display: grid;
  gap: 20%;
  justify-items: start;
  min-width: 0;
}

/* The tile's pill, at the tile's own proportions - 46.7% of a cell wide and 10%
   tall, sized here off the card. */
.property-card__pill {
  display: block;
  width: 24px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

/* The tile's typography: the same capitals, the same breaks, the same tracking,
   and sized off the cell so it never grows with the artwork. */
.property-card__name {
  display: grid;
  gap: 0.1em;
  margin: 0;
  font-size: max(11.05px, calc(var(--cell) * 0.1625));
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink);
}

.property-card__name span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.property-card__price {
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin: 0;
  font-size: max(12.35px, calc(var(--cell) * 0.208));
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.property-card__price > span:first-child {
  font-size: 0.72em;
  opacity: 0.75;
}

/* Exactly two lines, and the breaks are in the data. */
.property-card__description {
  display: grid;
  align-content: center;
  gap: 0.15em;
  margin: 0;
  font-size: max(12px, calc(var(--cell) * 0.16));
  line-height: 1.4;
  color: var(--ink-soft);
}

.property-card__description span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.property-card__advantage {
  padding-top: 5%;
  border-top: 1px solid rgb(18 17 16 / 0.09);
}

.property-card__label {
  display: block;
  margin-bottom: 1px;
  font-size: max(7.8px, calc(var(--cell) * 0.104));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.property-card__advantage-text {
  display: block;
  overflow: visible;
  margin: 0;
  font-size: max(12px, calc(var(--cell) * 0.16));
  line-height: 1.4;
  color: var(--ink);
}

/* ------------------------------------------------- the standing, and buying

   THE CARD GREW, AND THIS IS WHERE IT WAS ALLOWED TO

   Everything the economy added - the standing, the rent, the Buy button - is
   inside the card box the property popup has always occupied. That box was three
   rows of cells high, and had to stay that way, on the reasoning that a card
   drawn over the middle of the board must not sit on the rows beneath it and
   eventually on the die.

   The reasoning was right and the arithmetic was not: three rows is a hundred and
   seventy-four pixels at the smallest size, the card wants two hundred and forty,
   and what paid for the difference was the last line of the advantage text.

   So the card grows now, and the thing that keeps it off the die is the HOLDER's
   height rather than the card's - see the property holder below, which is capped
   at the die's own top edge. The builds still go below the card rather than
   inside it, which is what makes the holder taller than the card and why it
   scrolls instead of being a fixed box. */

.property-card {
  grid-template-rows: auto auto auto 1fr auto;
}

/* The status and the rent, set as two lines of one small block rather than as
   two separate things with a margin between them: they are one fact - who holds
   this and what it costs - and a gap between them would read as a gap between
   the question and the answer. */
.property-card__standing {
  display: grid;
  gap: 2px;
  padding-bottom: 3%;
  border-bottom: 1px solid rgb(18 17 16 / 0.09);
}

.property-card__status {
  margin: 0;
  font-size: max(12px, calc(var(--cell) * 0.16));
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.property-card__rent {
  margin: 0;
  font-size: max(11.5px, calc(var(--cell) * 0.15));
  line-height: 1.35;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* The full-set rent, when it applies. A quiet line under the rent, saying
   why the number is the number it is. */
.property-card__fullset {
  margin: 1px 0 0;
  font-size: max(10px, calc(var(--cell) * 0.13));
  line-height: 1.35;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.property-card__fullset[hidden] {
  display: none;
}

/* The Buy button.

   Large on purpose, and in the property's own accent rather than in the board's
   action colour: it is the one thing on the card a player is being asked to
   decide, and tying it to the square's colour says "this one" before the words
   are read.

   The shortfall is shown IN the button rather than under it. A greyed button
   with a reason next to it is two things to read on a card that is already the
   busiest thing on the screen, and a reason that fits in the button is a
   reason that is not going to wrap into the die. */
.property-card__buy-slot {
  padding-top: 4%;
}

.property-card__buy-slot[hidden] {
  display: none;
}

.property-card__buy {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  padding: 0.42em 0.6em;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  font-size: max(10.5px, calc(var(--cell) * 0.1422));
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cell-ground);
  cursor: pointer;
  transition: filter 140ms ease-out, opacity 140ms ease-out;
}

.property-card__buy:hover:not(:disabled) {
  filter: brightness(1.08);
}

.property-card__buy:active:not(:disabled) {
  filter: brightness(0.94);
}

.property-card__buy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Out of reach: the button stays exactly the size it was and keeps its place in
   the card, because a layout that reflows when a player cannot afford something
   is a layout that moves the words they were reading. */
.property-card__buy:disabled,
.property-card__buy[aria-disabled="true"] {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--card-inset));
  background: color-mix(in srgb, var(--accent) 8%, var(--card-inset));
  color: color-mix(in srgb, var(--accent) 62%, var(--ink));
  cursor: default;
}

.property-card__buy-label {
  font-weight: 600;
}

.property-card__buy-cost {
  opacity: 0.8;
}

/* ----------------------------------------------------------------- ragnarok

   THE TALL HOLDER

   A property card is three rows of cells high. Ragnarok has three card faces, a
   button, a result and a list of targets in it, so it is taller - but it is
   written as a FRACTION of the middle rather than in cells, so it keeps the same
   proportion of the board at every size and cannot grow into the ring however
   small a cell gets. It starts at the top of the middle, where a property card
   starts, and runs to about two thirds of the way down it.

   THE PROPERTY HOLDER IS TALL TOO, NOW

   The same treatment, for the same reason. A property popup is a card and three
   build rows below it, and that is more than three rows of cells - but it is
   still capped, because the die is there.

   WHAT IT IS CAPPED AT, AND WHY THE CARD STOPPED BEING PINNED

   Both of these were written wrong the first time, and one measurement at three
   hundred and ninety by eight hundred and fifty is what showed it.

   The cap was a flat fraction of the board. The holder started twenty pixels
   short of the die it was supposed to be avoiding, and spent those twenty
   pixels on nothing.

   The card was pinned to exactly three rows, on the reasoning that adding the
   builds below it should not move anything a player was already reading. But
   the card did not only gain things below it - it gained the owner, the rent and
   the Buy button INSIDE it - and three rows is a hundred and seventy-four pixels
   at the size above, against the two hundred and four the card now wants. So the
   pin did not preserve the old card; it sliced the advantage text through the
   middle of a sentence to keep a promise about arithmetic that was no longer
   true.

   So the card is three rows at its shortest and grows when its contents need it.
   The holder is capped at the one distance that means anything here: from its own
   top down to the top of the die, written out of the cell and the die's own size
   so it follows both wherever they go. Whatever still does not fit scrolls. The
   card and the Buy button are always the first thing on screen; the builds
   follow under them.

   THE FADE

   The scrollbar is hidden, because a strip of browser chrome down the middle of
   the board is worse than no affordance at all - so the fade along the bottom
   edge is the affordance. It is painted with a mask rather than with a gradient
   element, which is why the build rows carry matching bottom padding: the fade
   has to land on that padding and not on the last button, whether or not there
   is anything to scroll. */
/* THE CARD OWNS THE MIDDLE

   Property cards and corners share the same centre-panel footprint; the
   property component itself fills that holder and uses a controlled layout.

   There is no scrolling property card. */
.board__card[data-card-kind="property"],
.board__card[data-card-kind="corner"] {
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: none;
  display: block;
  overflow: hidden;
  overscroll-behavior: contain;
}

/* Property cards occupy the same whole-centre box as the corner panels. */

/* THE PANEL IS THE POP-UP'S MEASURE. Every size inside the property card is
   written in cqw - one per cent of THIS box - so the card keeps the exact
   proportions it has at the 390px reference (panel 236.02px, 1cqw = 2.3602px)
   at any screen width. The corner panels are untouched: they keep the
   cell-scaled sizing they already had. */
.board__card[data-card-kind="property"] {
  container-type: inline-size;
}

/* THE SHIELD CHEST OWNS THE SAME MIDDLE.

   The Kronos pop-up is the property pop-up's own card, so it takes the
   property pop-up's exact rectangle - the same four-by-eight middle box -
   and becomes that card's measure: every size inside it is cqw, one per
   cent of THIS box, so the shield chest keeps the property card's exact
   proportions at any screen width. The other chests keep the holder they
   have always had. */
.board__card[data-card-kind="chest"][data-property="kronos"] {
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: none;
  display: block;
  overflow: hidden;
  container-type: inline-size;
}

/* THE TWO DECKS OCCUPY THE SAME MIDDLE.

   Ragnarok and Epoch are the shield chest's own card with their own story, so
   they take the shield chest's rectangle and its measure: the same four-by-
   eight box, the same `container-type`, the same cqw units inside. Without
   this they were content-sized boxes that hugged whatever they held, which is
   why the same three groups could not distribute across the same panel. */
.board__card[data-card-kind="chest"][data-property="ragnarok"],
.board__card[data-card-kind="chest"][data-property="epoch"] {
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: none;
  display: block;
  overflow: hidden;
  container-type: inline-size;
}

.board__card[hidden] {
  display: none;
}

.board__card[data-card-kind="property"]::-webkit-scrollbar {
  display: none;
}

.board__card[data-card-kind="property"] .property-card--corner-family { height: 100%; }

/* The upgrades get the leftover height between the card and the Sell pill. They
   scroll inside themselves rather than moving the two controls that must always
   be reachable. */
.board__card[data-card-kind="property"]:not([data-intro="true"]) .builds {
  align-content: start;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.board__card[data-card-kind="property"]:not([data-intro="true"]) .builds::-webkit-scrollbar {
  display: none;
}

/* ------------------------------------------------------- the introduction

   The card a new game opens with, drawn into the property pop-up's own box:
   the same rectangle in the middle of the board, the same ground, the same
   border and shadow, the same type - so an introduction is a card the player
   already knows how to read, rather than a second kind of screen.

   THE BOX'S THREE ROWS are for a card, its builds and its pills, and the
   introduction has none of those: it is the only child, so it takes all three
   rows and fills the rectangle a property card would have filled. Inside it,
   the card's own three rows do the work they always do - the heading, the
   body, and the one press at the bottom. */

.board__card[data-card-kind="property"] > .intro-card {
  grid-row: 1 / -1;
}

.intro__heading {
  text-align: center;
  letter-spacing: 0.14em;
}

/* The two empires, and the contest said between them. */
.intro__body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--cell) * 0.16);
}

.intro__empire {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--cell) * 0.07);
  text-align: center;
}

/* The board's own coin, in its civilization's colour. */
.intro__coin {
  position: relative;
  left: auto;
  top: auto;
  width: calc(var(--cell) * 0.56);
  height: calc(var(--cell) * 0.56);
  transition: none;
  will-change: auto;
}

.intro__civ {
  font-size: max(11px, calc(var(--cell) * 0.17));
  letter-spacing: 0.05em;
  color: var(--ink);
}

.intro__title {
  display: block;
  font-size: max(8px, calc(var(--cell) * 0.108));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.intro__vs {
  align-self: center;
  font-size: max(8px, calc(var(--cell) * 0.12));
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
}

.intro__copy {
  text-align: center;
  font-size: max(10px, calc(var(--cell) * 0.145));
}

.intro__begin {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: max(10.5px, calc(var(--cell) * 0.15));
}

/* THE INTRODUCTION HAS NO X.

   A property card can be tapped away and this one cannot: nothing dismisses
   it except its own button. The close control is simply not drawn, so there
   is no empty slot and no reserved space where it would have been - the
   heading starts at the top of the card the way it would if the button had
   never existed. */

/* The card itself scrolls rather than the board. A chest card on a short screen
   is taller than the space it was given, and the only two things that may move
   are the card's own contents - never the board under it. */
.chest-card {
  display: flex;
  flex-direction: column;
  gap: calc(var(--cell) * 0.11);
  height: auto;
  max-height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* The scrollbar is never part of what this card looks like. */
  scrollbar-width: none;
}

.chest-card::-webkit-scrollbar {
  display: none;
}

/* THE TYPE

   Every size below is the one it replaces, larger. The title is up by about a
   third and a half and everything else by thirty per cent, which is what a card
   read on a phone at arm's length actually needs - the earlier sizes were
   legible in a screenshot and small on a hand.

   Both the floor and the multiplier move together on every one. Raising only
   the multiplier does nothing at the smallest cell, because the floor is what
   binds there - so a size that looked raised on a large board and had not moved
   at all on the smallest phone would have looked like a change and been none. */
.chest-card .property-card__name {
  font-size: max(15.2px, calc(var(--cell) * 0.2234));
}

/* The head is one column now - the COMMUNITY CHEST label is gone - so the title
   has the whole of it, and the gaps around it can breathe rather than squeeze.

   The pill and the heading were touching: a five-pixel bar and a line of caps
   with a sixth of an em between them read as one crowded object rather than a
   label and a title. */
.chest-card .property-card__head {
  grid-template-columns: 1fr;
  gap: 4%;
}

.chest-card .property-card__title {
  gap: 0.42em;
}

.chest-card__tagline {
  margin: 0;
  font-size: max(11.8px, calc(var(--cell) * 0.1606));
  line-height: 1.32;
  color: var(--ink);
}

.chest-card__body {
  margin: 0;
  font-size: max(10.1px, calc(var(--cell) * 0.1352));
  line-height: 1.44;
  color: var(--ink-soft);
}

/* The three faces. Portrait, because a playing card is taller than it is wide,
   and they sit in one row because three is what there are. Every column is the
   same fraction of the card so no slot can be wider than another, and every
   slot has the same aspect ratio and the same fixed label area, so the three
   are identical whatever their weapon is called. */
.chest-card__slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--cell) * 0.07);
}

.chest-card__slot {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: calc(var(--cell) * 0.04);
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: calc(var(--cell) * 0.05);
  border-radius: 6px;
  background: var(--card-inset);
  border: 1px solid rgb(18 17 16 / 0.08);
  backface-visibility: hidden;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  transition: transform 160ms ease-out, border-color 160ms ease-out;
}

.chest-card__slot:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--weapon, var(--ink)) 40%, rgb(18 17 16 / 0.08));
}

.chest-card__slot:disabled {
  cursor: default;
}

.chest-card__back {
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: color-mix(in srgb, var(--weapon) 14%, var(--card-inset));
  transition: opacity 200ms ease-out;
}

.chest-card__mark {
  font-size: max(15.4px, calc(var(--cell) * 0.266));
  font-weight: 500;
  color: color-mix(in srgb, var(--weapon) 78%, #121110);
}

.chest-card__face {
  position: absolute;
  inset: calc(var(--cell) * 0.05);
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--cell-ground);
  opacity: 0;
  transform: rotateY(180deg);
}

.chest-card__emblem {
  width: 74%;
  height: 74%;
}

.chest-card__pill {
  display: block;
  width: 60%;
  height: 3px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--weapon);
}

.chest-card__slot-name {
  display: grid;
  place-items: center;
  height: 2.36em;
  overflow: hidden;
  font-size: max(8.6px, calc(var(--cell) * 0.1144));
  letter-spacing: 0.02em;
  line-height: 1.18;
  text-align: center;
  color: var(--ink-soft);
}

.chest-card__slot[hidden],
.chest-card__result[hidden] {
  /* An author rule of `display` beats the browser's own `[hidden]` rule, so
     anything with display set here has to say so again. Without this the two
     cards that fade away on a draw stay in the layout as invisible holes: they
     look right, take up 170px of the column, and push the Collect button off
     the bottom of a card that is already taller than the space it was given. */
  display: none;
}

/* The drawn one keeps its column's width and its own aspect ratio. Moving it to
   the middle column centres the answer; changing its size would make the one
   card the player is reading a different object from the three they chose
   between. */
.chest-card__slot.is-drawn {
  grid-column: 2;
}

/* ONCE THE DRAW IS ANSWERED, the card stops explaining itself.

   The tagline, the body and the odds caption have done their job the moment
   there is a weapon in front of you, and keeping them on screen pushes "You drew
   the..." and the Collect button below the fold on a phone. What is left is the
   answer and the button, and that fits. */
.chest-card[data-phase="revealed"] .chest-card__tagline,
.chest-card[data-phase="revealed"] .chest-card__body,
.chest-card[data-phase="revealed"] .chest-card__draw,
.chest-card[data-phase="done"] .chest-card__tagline,
.chest-card[data-phase="done"] .chest-card__body,
.chest-card[data-phase="done"] .chest-card__draw,
.chest-card[data-phase="bad-luck"] .chest-card__tagline,
.chest-card[data-phase="bad-luck"] .chest-card__body,
.chest-card[data-phase="bad-luck"] .chest-card__draw {
  display: none;
}

/* AND THE WELCOME GOES WITH THEM. The header's "Welcome to Ragnarok" belongs
   to the card the player was welcomed with; the moment the shuffle is over
   the card is the WEAPON, and a welcome sitting above it reads as a second
   screen the player has been put back into. The header stays for the shuffle
   itself and for the open stage - it leaves only with the reveal. */
.chest-card[data-phase="revealed"] .property-card__head,
.chest-card[data-phase="done"] .property-card__head {
  display: none;
}

/* What the weapon is, and where it can strike - said under the revealed face,
   in the card's own quiet type. */
.chest-card__weapon-blurb,
.chest-card__weapon-targets {
  margin: 0;
  font-size: max(9.6px, calc(var(--cell) * 0.128));
  line-height: 1.4;
  color: var(--ink-soft);
}

.chest-card__weapon-targets {
  font-size: max(8.8px, calc(var(--cell) * 0.115));
  color: color-mix(in srgb, var(--ink) 62%, var(--cell-ground));
}

.chest-card[data-phase="drawing"] .chest-card__draw {
  display: none;
}

/* THE AREA UNDER THE REVEALED CARD: the four sections that turn a card into
   a deployment - where it comes from, how it works, the three approved
   facts, the colonies that can receive it. The same quiet type as the rest
   of the chest's writing, on the same measure, each heading a caps line
   with a hairline rule running off to its right - the reference layout's
   section rule, drawn in the card's own language. */
.chest-card__section {
  display: grid;
  gap: 0.32em;
  width: 100%;
  text-align: left;
}

.chest-card__section-name {
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin: 0;
  font-size: max(9px, calc(var(--cell) * 0.118));
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.chest-card__section-name::after {
  content: "";
  flex: 1;
  min-width: 1.5em;
  border-top: 1px solid rgb(18 17 16 / 0.16);
}

.chest-card__section-p {
  margin: 0;
  font-size: max(9.6px, calc(var(--cell) * 0.126));
  line-height: 1.42;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* THE THREE FACTS, as their own little box: Counters, Duration, Spent -
   the approved trio, kept out of the prose so they read at a glance, keyed
   to the shield's own colour down the left edge. */
.chest-card__facts {
  display: grid;
  gap: 1px;
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  border: 1px solid rgb(18 17 16 / 0.08);
  border-left: 2px solid var(--card-facts, var(--shield, var(--ink)));
  border-radius: 6px;
  background: var(--card-inset);
}

.chest-card__fact {
  margin: 0;
  font-size: max(9.4px, calc(var(--cell) * 0.122));
  line-height: 1.4;
  color: var(--ink-soft);
}

.chest-card__fact b {
  font-weight: 600;
  color: var(--ink);
}

.chest-card__slot.is-drawn .chest-card__back {
  opacity: 0;
}

.chest-card__slot.is-drawn .chest-card__face {
  opacity: 1;
  transform: rotateY(0deg);
}

/* THE GLASS PILL

   One transparent pill, a hairline border, a little blur behind it. The same
   family as every other pill on the board - the same caps, the same tracking,
   the same border-radius - so it reads as the same control rather than as a
   web button that arrived by accident. */
.chest-card__draw,
.chest-card__collect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: max(26px, calc(var(--cell) * 0.39));
  padding: 0 1.5em;
  margin: 0;
  border: 1px solid rgb(18 17 16 / 0.3);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.2);
  backdrop-filter: blur(5px);
  font: inherit;
  font-size: max(11.1px, calc(var(--cell) * 0.1508));
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.chest-card__draw:disabled {
  cursor: default;
  opacity: 0.38;
  border-style: dashed;
}

.chest-card__collect {
  border-color: color-mix(in srgb, var(--weapon) 70%, #121110);
  color: color-mix(in srgb, var(--weapon) 62%, #121110);
  margin-top: calc(var(--cell) * 0.04);
}

.chest-card__result {
  display: grid;
  gap: calc(var(--cell) * 0.055);
  padding-top: calc(var(--cell) * 0.07);
  border-top: 1px solid rgb(18 17 16 / 0.09);
}

.chest-card__drew {
  margin: 0;
  font-size: max(11.8px, calc(var(--cell) * 0.1606));
  color: var(--ink);
}

.chest-card__reach,
.chest-card__blurb {
  margin: 0;
  font-size: max(10.1px, calc(var(--cell) * 0.1352));
  line-height: 1.36;
  color: var(--ink-soft);
}

.chest-card__targets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* A colony a weapon reaches, named exactly as its own tile names it. */
.chest-card__target {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgb(18 17 16 / 0.16);
  background: rgb(255 255 255 / 0.4);
  font-size: max(8.6px, calc(var(--cell) * 0.1144));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  /* Never squeezed. A flex item will shrink below its own text, and with the
     line held on one line that means PROXIMA CENTAURI loses its last letters
     rather than moving down a line - so a long name is told not to shrink and
     wraps whole, which is what a reader expects of a list of names. */
  flex-shrink: 0;
}

/* AN EPOCH CARD'S NUMBERS, as rows.

   Ragnarok's reveal names the colonies a weapon reaches. Epoch's does the same
   AND says what the spell would move - the original cost and the exact figure
   taken, or the rent and the transfer, or the seal's state - so TARGET and
   FIGURE sit as one column of rows: the property on the left, its number on the
   right, and the whole list readable down the page. The hairline under each row
   is the only divider, and the last row has none.

   The rows are TIGHT on purpose. Kronos puts its colonies in this area of the
   card, and a column of seven figures has to fit the same popup, so the padding
   and the leading are the smallest the card's type can carry and still be read
   at arm's length. */
.chest-card__ledger {
  display: grid;
  width: 100%;
  text-align: left;
}

.chest-card__ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.5em;
  margin: 0;
  padding: 0.22em 0;
  border-bottom: 1px solid rgb(18 17 16 / 0.07);
  font-size: max(9.4px, calc(var(--cell) * 0.122));
  line-height: 1.25;
  color: var(--ink-soft);
}

.chest-card__ledger-row:last-child {
  border-bottom: none;
}

.chest-card__ledger-name {
  color: var(--ink);
  /* A long colony name wraps inside its own column rather than pushing the
     figure off the row. */
  min-width: 0;
}

.chest-card__ledger-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--card-facts, var(--ink)) 78%, var(--ink));
  white-space: nowrap;
}

/* The rival's colony: the one the card can actually be cast on right now. */
.chest-card__ledger-tag {
  margin-left: 0.45em;
  padding: 0 0.45em;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--card-facts, var(--ink)) 34%, transparent);
  font-size: 0.82em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--card-facts, var(--ink)) 72%, var(--ink));
  white-space: nowrap;
}

/* ============================================================ the plain square

   The card for a square that has no other card: the four corners and the two
   chests whose purpose has not been decided yet. It is the smallest card in
   the game - a name, a line about the square, and a way to close it - and it
   uses the same shell as every other card, because it is the same object: a
   thing the board puts in the middle and reads. */

.square-card {
  align-content: start;
  justify-items: center;
  text-align: center;
}

.square-card__kind {
  margin: 0;
  font-size: max(9px, calc(var(--cell) * 0.12));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
}

.square-card__body {
  display: grid;
  gap: 0.5em;
  max-width: 30ch;
  margin: 0;
  font-size: max(10.5px, calc(var(--cell) * 0.14));
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ============================================================ the corner panel

   The four corner tiles - START, HADES, BLACK HOLE and FIGHT - each open
   their own information panel when tapped. All four share one layout inside the
   central hole of the board. The panel fills the four-by-eight cell hole, the
   same rectangle on every screen, so nothing is cramped and nothing spills into
   the board's ring.

   Colours: off-white ground, black typography, fine dark borders, and each
   corner's own accent colour used sparingly - the logo, the key box edge and
   the accent rule. No gradients, no oversized headings, no cards inside cards.

   One panel, one line of poetry: the bottom info block carries a single
   contextual line - never a stacked label and subtitle - written for that
   corner's place in the Samrajya universe. Black Hole is drawn by the same
   component as START, HADES and FIGHT; there is no separate legacy
   reading card. */

.corner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--cell) * 0.1);
  height: 100%;
  padding: calc(var(--cell) * 0.3) calc(var(--cell) * 0.34);
  border-radius: 10px;
  background: var(--cell-ground);
  border: 1px solid rgb(18 17 16 / 0.1);
  box-sizing: border-box;
  overflow: hidden;
}

/* The corner holder holds ONE child - the panel itself - so it is a plain
   box, not the property card's three-row grid. Without this the panel is
   auto-placed into the first auto row and only grows to its content, leaving
   the rest of the four-by-eight hole empty. `display: block` lets the panel's
   own `height: 100%` fill the rectangle. This rule touches the corner holder
   only; the property holder keeps its grid. */
.board__card[data-card-kind="corner"] {
  display: block;
}

.corner-card__close {
  position: absolute;
  top: calc(var(--cell) * 0.07);
  right: calc(var(--cell) * 0.07);
  z-index: 3;
  display: grid;
  place-items: center;
  width: max(26px, calc(var(--cell) * 0.4));
  height: max(26px, calc(var(--cell) * 0.4));
  padding: 0;
  border: 1px solid rgb(18 17 16 / 0.14);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cell-ground) 86%, transparent);
  font-size: max(13px, calc(var(--cell) * 0.22));
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
}

.corner-card__logo {
  width: clamp(30px, calc(var(--cell) * 0.62), 44px);
  height: clamp(30px, calc(var(--cell) * 0.62), 44px);
  color: var(--accent);
  flex: 0 0 auto;
}

.corner-card__logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.corner-card__heading {
  margin: 0;
  font-size: clamp(17px, calc(var(--cell) * 0.28), 24px);
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}

.corner-card__subtitle {
  margin: 0;
  font-size: clamp(10px, calc(var(--cell) * 0.145), 12px);
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: var(--accent);
}

.corner-card__divider {
  width: calc(var(--cell) * 0.7);
  height: 1px;
  background: rgb(18 17 16 / 0.1);
  margin: 0 auto;
  flex: 0 0 auto;
}

.corner-card__description {
  margin: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-size: clamp(10px, calc(var(--cell) * 0.14), 12px);
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  flex: 1 1 auto;
  min-height: 0;
}

.corner-card__key {
  display: flex;
  align-items: center;
  gap: calc(var(--cell) * 0.1);
  padding: calc(var(--cell) * 0.1) calc(var(--cell) * 0.14);
  border-radius: 6px;
  border: 1px solid rgb(18 17 16 / 0.1);
  background: color-mix(in srgb, var(--accent) 6%, var(--cell-ground));
  flex: 0 0 auto;
  align-self: stretch;
  margin-top: calc(var(--cell) * 0.04);
}

.corner-card__key-icon {
  flex: 0 0 auto;
  width: clamp(12px, calc(var(--cell) * 0.24), 18px);
  height: clamp(12px, calc(var(--cell) * 0.24), 18px);
  border-radius: 999px;
  background: var(--accent);
}

.corner-card__key-copy {
  margin: 0;
  font-size: clamp(11px, calc(var(--cell) * 0.15), 13px);
  line-height: 1.35;
  color: var(--ink);
  text-wrap: pretty;
}

/* ============================================================== the nexus

   THE KEEPER'S CARD, AND THE ARCHITECTURE IT NOW LIVES IN.

   The Nexus card's shell, groups and loan screen are written in the corner
   family's own section - "the Nexus, in the family", beside the two decks'
   card further down - because that is the architecture they now follow.
   What stays here is the machinery of the draw itself: the deck that
   shuffles, the card that turns over, and the face it turns to. */

/* THE OFFERING'S ANSWER IS A CARD, NOT A PARAGRAPH.

   The draw's result is a card face - a ground, a hairline, a soft shadow -
   and the offering's result used to be bare type on the card's own paper,
   which read as explanatory text under the mythology rather than as the
   payment it is. It wears the same face now: the same chrome as
   `.nexus-card__deck-top-face`, so a gain and an offering are told the same
   way. */
.nexus-card__result {
  flex: 0 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: calc(var(--cell) * 0.05);
  width: 100%;
  max-width: 30ch;
  padding: calc(var(--cell) * 0.12);
  border-radius: 8px;
  background: var(--cell-ground);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow: 0 2px 10px rgb(18 17 16 / 0.13);
}

/* The class's `display: grid` must not defeat the hidden attribute: an empty
   receipt box left under a draw's face is a second card saying nothing. */
.nexus-card__result[hidden] {
  display: none;
}

.nexus-card__result-name {
  margin: 0;
  font-size: max(12px, calc(var(--cell) * 0.17));
  font-weight: 500;
  color: var(--ink);
}

.nexus-card__result-text {
  margin: 0;
  font-size: max(10.5px, calc(var(--cell) * 0.14));
  line-height: 1.4;
  color: var(--ink-soft);
}

.nexus-card__result-amount {
  margin: 2px 0 0;
  font-size: max(18px, calc(var(--cell) * 0.26));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.nexus-card__result-amount--spend {
  color: var(--sell);
}

.nexus-card__result-amount--earn {
  color: color-mix(in srgb, var(--ink) 55%, var(--accent, var(--ink)));
}

/* The offering coin in flight from the player's chip to the Nexus. */
.nexus-card__offering {
  position: fixed;
  z-index: 60;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cell-ground);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(18 17 16 / 0.2);
  pointer-events: none;
}

/* THE PLEDGE, MARKED ON THE BOARD.

   A colony that would be mortgaged for the chosen amount wears the same red
   blink the armed strike and the shield's deployment use: the mark itself is
   drawn below, in "the marks", where this class shares the fight blink's
   ::before rather than inventing a second animation. Nothing is drawn here
   but the cursor. */
.board__cell.is-loan-target {
  cursor: pointer;
}

/* A FULLY-PLEDGED COLONY STOPS ASKING AND HOLDS ITS MARK.

   The required colonies blink; a colony the player has already pledged keeps
   the same red ring but stops blinking and draws solid, so the tap has a
   visible answer even when a second property is still needed. It stays above
   the tile, takes no taps, and dies with the class when the amount changes. */
.board__cell.is-loan-picked {
  cursor: default;
}

.board__cell.is-loan-target.is-loan-picked::before {
  animation: none;
  opacity: 1;
  transform: none;
  border-width: 3px;
  border-color: var(--sell);
  box-shadow:
    0 0 calc(var(--cell) * 0.2) color-mix(in srgb, var(--sell) 42%, transparent),
    inset 0 0 calc(var(--cell) * 0.12) color-mix(in srgb, var(--sell) 18%, transparent);
}

/* ======================================================== the shared chest

   Ragnarok and Nexus are shared screens, so they are drawn from the state on
   both devices. These are the pieces that make that true on the page: the
   deck that shuffles, the card that turns over, and the two quiet lines that
   say who the screen belongs to. */

/* The quiet line that says who is at the chest. It is the ONLY thing that is
   different between the acting player's screen and the waiting player's
   screen, and it is there so the waiting player knows the screen is not
   waiting for them. */
.chest-card__caption {
  margin: calc(var(--cell) * 0.08) 0 0;
  text-align: center;
  font-size: max(10px, calc(var(--cell) * 0.135));
  line-height: 1.35;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
}

.chest-card__caption-name {
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
}

.chest-card__caption-text::before {
  content: " ";
}

/* The waiting line, for the player who is not acting. */
.chest-card__waiting {
  margin: calc(var(--cell) * 0.08) 0 0;
  text-align: center;
  font-size: max(10px, calc(var(--cell) * 0.135));
  line-height: 1.35;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
}

/* The Collect pill. The weapon has been drawn; collecting it is what makes
   it the player's. */
.chest-card__collect-slot:empty {
  display: none;
}

.chest-card__collect {
  display: block;
  width: 100%;
  margin: calc(var(--cell) * 0.08) 0 0;
  padding: 0.58em 1em;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
  background: var(--cell-ground);
  font: inherit;
  font-size: max(12px, calc(var(--cell) * 0.16));
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}

.chest-card__collect:hover {
  background: color-mix(in srgb, var(--ink) 5%, var(--cell-ground));
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}

/* The Done pill. It is the acting player's, and it is the only thing that
   closes the chest. */
.chest-card__done {
  display: block;
  width: 100%;
  margin: calc(var(--cell) * 0.1) 0 0;
  padding: 0.62em 1em;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
  background: var(--cell-ground);
  font: inherit;
  font-size: max(12px, calc(var(--cell) * 0.165));
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}

.chest-card__done:hover {
  background: color-mix(in srgb, var(--ink) 5%, var(--cell-ground));
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}

/* ------------------------------------------------------------- the deck

   A stack of card backs. At most twelve of them: the stack is a picture of
   thirty cards, not thirty cards, and a phone should not be asked to draw
   thirty. */
.nexus-card__deck-wrap {
  position: relative;
  /* The wrap is a BLOCK, and it fills the place it is given. A grid that
     places its children in the middle sizes them by their content, and the
     deck inside is out of the flow - so a centred wrap collapses to nothing
     and a deck of nothing is not a deck. */
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(var(--cell) * 3.2);
  perspective: 800px;
}

.nexus-card__deck {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--cell) * 1.5);
  height: calc(var(--cell) * 2.1);
  /* The stack is CENTRED on the place it is put, and it keeps its own size -
     an absolutely placed box with no size of its own collapses to nothing, and
     a deck of nothing is not a deck. */
  transform: translate(-50%, -50%);
}

.nexus-card__deck-back {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background:
    repeating-linear-gradient(
      45deg,
      color-mix(in srgb, var(--ink) 7%, var(--card-inset)) 0 3px,
      color-mix(in srgb, var(--ink) 11%, var(--card-inset)) 3px 6px
    );
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

/* The layers of the stack. Each one is a little further down the pile, so the
   stack has depth without thirty of anything. The steps are small but they
   have to be SEEN: a stack whose layers are a pixel apart is one card, and a
   deck of one card is not a deck. */
.nexus-card__deck-back:nth-child(1) { transform: translate(0, 0); }
.nexus-card__deck-back:nth-child(2) { transform: translate(0, 2px); }
.nexus-card__deck-back:nth-child(3) { transform: translate(0, 4px); }
.nexus-card__deck-back:nth-child(4) { transform: translate(0, 6px); }
.nexus-card__deck-back:nth-child(5) { transform: translate(0, 8px); }
.nexus-card__deck-back:nth-child(6) { transform: translate(0, 10px); }
.nexus-card__deck-back:nth-child(7) { transform: translate(0, 12px); }
.nexus-card__deck-back:nth-child(8) { transform: translate(0, 14px); }
.nexus-card__deck-back:nth-child(9) { transform: translate(0, 16px); }
.nexus-card__deck-back:nth-child(10) { transform: translate(0, 18px); }
.nexus-card__deck-back:nth-child(11) { transform: translate(0, 20px); }
.nexus-card__deck-back:nth-child(12) { transform: translate(0, 22px); }

/* The stack is behind the top card, and it is behind the top card by a
   hair's breadth - the top card is the one being dealt.

   The top card sits a little ABOVE the pile, because a card that is exactly
   under the top of the stack is not on top of it: the stack's own first layer
   covers it, and the player sees one flat card where there should be a deck
   with a card on it. */
.nexus-card__deck {
  z-index: 1;
}

.nexus-card__deck-top {
  z-index: 2;
  top: calc(50% - 4px);
}

/* ONCE THE CARD IS TURNED OVER, THE DECK AND THE BACK ARE GONE.

   The top card has left the deck, so the rest of it goes with it: a stack of
   card backs behind a face that is being read is a picture of two things at
   once, and the face is the thing being read.

   The BACK goes too. A back and a face are two faces of one card, and which
   of them is painted depends on the order the browser sorts them in - which
   is not an order anybody should have to reason about to see a card. When
   the card has been turned over, its back is simply not there. */
.nexus-card[data-phase="revealed"] .nexus-card__deck,
.nexus-card[data-phase="revealed"] .nexus-card__deck-halves,
.nexus-card[data-phase="revealed"] .nexus-card__deck-top-back {
  display: none;
}

/* AND THE CARD IS A CARD.

   The face is a card the way the rest of the cards are: ivory, a hairline
   and a soft shadow, and big enough to be read at a glance. A face that is
   only words on the middle's ground is a sentence, and the thing that was
   dealt should look like a thing that was dealt.

   It is also BIGGER than the card it came out of - a card that is lifted out
   and turned over comes towards the reader. The size is set here and the
   turn is done by the animation, so the two never fight. */
.nexus-card[data-phase="revealed"] .nexus-card__deck-top {
  width: calc(var(--cell) * 2.1);
  height: calc(var(--cell) * 2.9);
}

.nexus-card[data-phase="revealed"] .nexus-card__deck-top-face {
  /* The card that was dealt is the brightest paper on the board, so it reads
     as a card in the hand rather than as words on the board. */
  background: var(--dealt-paper);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  box-shadow: 0 3px 16px rgb(18 17 16 / 0.2);
}

/* The face is not there until the card is turned over. */
.nexus-card:not([data-phase="revealed"]) .nexus-card__deck-top-face {
  opacity: 0;
}

/* The two halves the deck splits into. */
.nexus-card__deck-halves {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}
.nexus-card__deck-half {
  position: relative;
  width: calc(var(--cell) * 0.7);
  height: calc(var(--cell) * 2.05);
  will-change: transform;
}

.nexus-card__deck-half .nexus-card__deck-back {
  width: 100%;
  height: 100%;
}

/* The top card: the one that lifts out and turns over. */
.nexus-card__deck-top {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--cell) * 1.5);
  height: calc(var(--cell) * 2.1);
  /* The card is CENTRED on the deck, not hung below it: a card that hangs off
     the bottom of the deck is a card half outside the card, and the card's
     own overflow hides it. */
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  will-change: transform;
}

.nexus-card__deck-top-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.nexus-card__deck-top-back,
.nexus-card__deck-top-face {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
}

/* THE TURN IS DONE WITH A FADE, NOT WITH A 3D FLIP.

   A card that turns over in three dimensions is a card whose two faces the
   browser sorts into an order of its own, and which of them is painted is
   not an order anybody should have to reason about to see a card. The card
   turns by its own rotation, and the face REPLACES the back: the back is
   hidden the moment the card is turned over, and the face is there.

   It reads as a card being turned, it works in every browser, and there is
   no moment where the player sees the wrong side of it. */
.nexus-card__deck-top-back {
  background:
    repeating-linear-gradient(
      45deg,
      color-mix(in srgb, var(--ink) 7%, var(--card-inset)) 0 3px,
      color-mix(in srgb, var(--ink) 11%, var(--card-inset)) 3px 6px
    );
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.nexus-card__deck-top-face {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: calc(var(--cell) * 0.05);
  padding: calc(var(--cell) * 0.12);
  text-align: center;
  background: var(--cell-ground);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow: 0 2px 10px rgb(18 17 16 / 0.13);
}

/* The face of the card: its heading, its one line, and the amount in large
   type, marked as a gain or a loss. */
.nexus-card__face-name {
  margin: 0;
  font-size: max(11px, calc(var(--cell) * 0.15));
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

.nexus-card__face-text {
  margin: 0;
  font-size: max(9px, calc(var(--cell) * 0.115));
  line-height: 1.3;
  color: var(--ink-soft);
}

.nexus-card__face-amount {
  margin: calc(var(--cell) * 0.04) 0 0;
  font-size: max(17px, calc(var(--cell) * 0.235));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.nexus-card__face-amount--spend {
  color: var(--sell);
}

.nexus-card__face-amount--earn {
  color: color-mix(in srgb, var(--ink) 55%, var(--accent, var(--ink)));
}

/* The dot in flight, on its way to the name at the top. */
.chest-card__flying {
  position: fixed;
  z-index: 60;
  border-radius: 50%;
  background: var(--weapon);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  pointer-events: none;
}

/* THE DOTS ON THE NAME

   Before the name, because that is where a player looks first. Six and then a
   count: the name is the part of that chip that has to survive at 360px, so it
   is the one thing here that is never squeezed.

   aligns its children to the baseline, which put a five-pixel circle half below
   the text and clipped its top - a weapon that looked like a crescent. */
.who__weapons {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 2px;
  flex: 0 0 auto;
  height: 8px;
}

.who__weapon,
.who__ability {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--weapon);
  box-shadow: 0 0 0 1px rgb(18 17 16 / 0.2);
  /* Tappable: a tap opens the card the dot stands for. */
  cursor: pointer;
}

/* AN ABILITY IS A DIAMOND, A WEAPON A COIN. Two kinds of carried card share
   one row in the chip, and the shape is what tells them apart at a glance
   without adding a second colour language. */
.who__ability {
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--ability);
}

.who__count {
  align-self: center;
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* ------------------------------------------------------- a property or a chest

   Two kinds of cell, and the reference draws them differently.

   A PROPERTY has a pill in its set's colour near the top and its name below it.
   The pill is placed by percentages of the cell rather than by a grid, because it
   is not a track and not a share of anything - it is a mark at a fixed spot, and
   the spot has to be the same spot on a 55px cell as on a 67px one:

       top    13.3%     a seventh of the way down
       left   26.7%     centred, a quarter of the cell wide either side
       width  46.7%
       height 10%

   A CHEST belongs to no set, so it has no pill - a pill in no set's colour would
   be saying something untrue about it. It is the dark ground the card artwork
   uses, with the name in the same cream, centred.

   Both take their name from `lines` in the data, which is where the line breaks
   come from: LAGRANGE / POINT L2 is the data's break, not a guess made here. */

.board__cell--property,
.board__cell--chest {
  display: grid;
  place-items: center;
  align-content: center;
  /* Four per cent, not six. WORMHOLE is the longest name on the board and at
     six per cent it fit inside a 55px cell by one tenth of a pixel - which is
     not fitting, it is a coincidence that a different font or a hinting
     difference would end. The brief fixes the pill's position and the label's
     size and tracking; the padding was this board's choice, so the choice is
     made to leave the longest name some air. */
  padding: 0 4%;
  overflow: hidden;
}

/* The wash, and only the wash. A property is tinted in its own set's colour;
   a chest belongs to no set, so its wash is black and it comes out as a warm
   pale grey rather than as a colour of its own. The four corners are not in
   this rule - they stay solid black, because a corner is not a set and has no
   pill to agree with. */
.board__cell--property,
.board__cell--chest {
  background: color-mix(in srgb, var(--wash) var(--wash-strength), var(--cell-ground));
}

.board__cell--chest {
  --wash: var(--chest-wash);
}

/* The button is the cell. Everything about the default button is a decision
   this board has to make explicitly, because the defaults are somebody else's
   page: a grey background, a focus ring in the browser's colour, and a border. */
.board__cell--property {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: color-mix(in srgb, var(--wash) var(--wash-strength), var(--cell-ground));
}

.board__cell--property:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* RAGNAROK IS A CHEST THAT IS ALSO A BUTTON.

   The reset above is written for properties, so when Ragnarok became pressable
   it inherited every default the browser gives a button - including its
   two-pixel outset border, which drew a black frame round a block that had spent
   its whole life having no frame. It is the same button on a black ground rather
   than a tinted one, so the same decisions have to be made explicitly.

   The ground is not set here: `.board__cell--chest` already washes it, and this
   rule is only about what the browser was going to add on top. */
button.board__cell--chest {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
}

button.board__cell--chest:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* A CORNER IS A BUTTON TOO.

   Every square on the board opens a card now, so every square is a button.
   The reset is the same decision the chest button makes: nothing the browser
   adds on its own.

   The ink is NOT inherited here, and that is the whole point of this rule
   saying it out loud. A selector of this weight (`button.board__cell--corner`,
   an element plus a class) beats `.board__cell--corner`, so `color: inherit`
   here would hand the corner the page's ink instead of the stamp's cream
   and the label would vanish into the accent. The corner's colour is
   restated at the same weight as the reset rather than inherited. */
button.board__cell--corner {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  font: inherit;
  color: var(--corner-icon, var(--cell-ground));
  cursor: pointer;
  border: 0;
}

button.board__cell--corner:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.board__pill {
  position: absolute;
  top: 13.3%;
  left: 26.7%;
  width: 46.7%;
  height: 10%;
  border-radius: 999px;
}

.board__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-size: max(8px, calc(var(--cell) * 0.14));
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

.board__label > span {
  white-space: nowrap;
}

/* The name sits below the pill rather than in the middle of the cell, which is
   what the reference draws. A chest has no pill, so its name is centred. */
.board__cell--property .board__label {
  margin-top: 12%;
}

/* A chest's name is left to inherit, exactly as a property's is. When the four
   chests were solid black the name had to be cream to stay readable; now that
   they are washed pale like the rest, the name takes the board's own ink, which
   is the same ink, the same weight and the same position a property's name has.
   Overriding it here would be the only way for a chest's name to differ from a
   property's, and there is no reason for it to. */
.board__cell--chest .board__label {
  color: inherit;
}

   /* --------------------------------------------------------- the card, for later

   The board's cells do not draw card artwork yet - the reference layout puts a
   set-colour pill and a name in each tile, and the artwork belongs behind that.
   These rules are the host the card SVG drops into when it arrives, and the one
   thing that must be true of it from the start: the cell decides the size and
   the card keeps its own proportion inside it. */

.space__card {
  width: 100%;
  display: block;
  line-height: 0;
}

.space__card .title-text {
  font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
  line-height: normal;
}

/* ------------------------------------------------------------------ the die
   (the turn pill is gone: the middle's status lives on .board__announce, so
   the board has one voice rather than two) */

/* ------------------------------------------------------- who is at the board

   Above the board, not on it. The board in the reference is a finished drawing
   and the two player identities are not part of it, so they sit outside and the
   reference stays reference. */

.board-who {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

/* The matchup, said once. Kept to the weight and colour of the civilization
   label beside it and no more - it is punctuation, not a headline, and a VS
   set large enough to notice would be louder than either name it separates.
   aria-hidden is NOT set: this is the only thing in the header that says the
   two of them are playing each other, and hiding it would leave a screen
   reader with two unconnected names. */
.who__vs {
  flex: 0 0 auto;
  padding: 0 0.15em;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.who {
  display: inline-flex;
  align-items: baseline;
  /* The civilization drops to its own line rather than being squeezed out of a
     block that has run out of room. A name of the full twenty-four characters
     and a civilization name cannot share one line on a 360px phone - there is
     not enough width for both at any font size that is still readable - so
     with long names the block goes to two lines and stays even with the other
     one, which is also two lines. */
  flex-wrap: wrap;
  column-gap: 0.4em;
  row-gap: 0.05em;
  padding: 0.3em 0.7em;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  /* Each block may shrink, but the matchup may never wrap onto a second line
     and leave one name above the other. */
  min-width: 0;
  flex: 0 1 auto;
}

.who--me {
  border-color: var(--ink);
}

.who__name {
  font-weight: 300;
  /* Both may give way rather than overflow: the name is the one that matters,
     so it is given the room and the civilization label is what bends. */
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who__civ {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who--me .who__civ {
  color: var(--ink);
}

/* THE PURSE
   ---------
   On its own line under the name and the civilization, because a purse that
   shared a line with a name would either shorten the name or shorten itself, and
   the name is the one that cannot be shortened.

   It is the one number on the header that changes during play, so it is the one
   thing here given full weight rather than the small caps of the label above it:
   a player glancing at the top of the board mid-turn is looking for their own
   money, and it should be the most legible thing in the block.

   `font-variant-numeric: tabular-nums` because it changes in place. Without it
   every purchase re-flows the digits sideways, and a purse that jitters as it
   falls is much harder to read than one that does not. */
.who__money {
  flex: 1 0 100%;
  margin-top: 0.2em;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.who--me .who__money {
  font-weight: 600;
}

/* ==========================================================================
   PHASE ONE - THE LANDING SCREEN, THE CHIPS, AND WHAT AN ACTION LOOKS LIKE

   Everything below is an addition to the board rather than a replacement for
   it. The geometry, the cells and the card's own body are untouched; what is
   here is the phase contract (what is on screen while the turn is in each
   phase), the decision card's full-middle rectangle, the three buttons a card
   can wear, the player chip, and the six small animations.
   ========================================================================== */

/* ------------------------------------------------------------ the phase

   THE DIE AND THE TURN LINE BELONG TO ONE PHASE.

   A throw can only start in AWAITING_ROLL, so that is the only phase in which
   either of them is visible. `data-rollable` is written by board.js from the
   game's phase, and it is deliberately narrower than `data-phase`:
   AWAITING_ROLL with a read-only card open is still not rollable, because a
   tap outside that card must not throw the die underneath it.

   `data-throwing` is the one exception, and it is not a phase: the state has
   already left AWAITING_ROLL by the time the coin starts walking, so the die
   would be hidden before its own throw had been seen. It keeps the die up for
   exactly the length of the throw, then gets out of the way. */

.board__dice {
  transition:
    opacity 250ms ease-out,
    transform 250ms ease-out;
}

.board[data-rollable="false"] .board__dice {
  cursor: default;
}

/* A hidden die is GONE, not transparent. An invisible box the size of the die
   still reserves the middle's centre and still catches a thumb; `display:none`
   removes it from both.

   Whether the die is hidden is one question with one answer, and the answer
   lives in dice.js (`dieVisible`): the die is out of the way when something
   else wants the middle - a card, an announcement, a player's record - and it
   is on the board the rest of the time. It used to follow the phase instead,
   which meant a tap took it off the screen for as long as the server took to
   answer. The stylesheet only carries the answer out. */
.board[data-die="hidden"] .board__dice {
  display: none;
}

.board[data-throwing="true"] .board__dice {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
}

/* The read-only card owns the middle while it is up: the status stands down in
   board.js, and the die waits at the edge of the board rather than being
   pressed through the card. */

/* The profile replaces the whole middle: no die, no status, no card. The card
   and the die are hidden rather than removed, so closing the profile restores
   exactly what was underneath - including a decision that arrived while it was
   open. */
.board[data-profile="true"] .board__card {
  visibility: hidden;
  pointer-events: none;
}

/* --------------------------------------------------- the decision rectangle

   WHEN THE CARD OWNS THE MIDDLE

   A read-only card is a popup: it floats in the top three rows and the board is
   still visible around it. A decision is not a popup. The turn has stopped, the
   player must answer, and the card is allowed the whole four-by-eight middle -
   which is also the only way the card and its three build rows fit a 360x700
   phone without a scroll.

   `data-mode` is written on the holder by property-card.js and it, not the
   phase, is what decides the rectangle: the card has to keep the full-middle
   shape for the 240ms it takes to slide away after Buy, and the phase has
   already changed to RESOLVING by then. */

.board__card[data-mode="decision"] {
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  overflow: hidden;
  overscroll-behavior: contain;
  /* No fade: there is nothing below to scroll to. A mask here would dim the
     last build row and say there was more, which is the one thing this card
     must not say. */
  -webkit-mask-image: none;
  mask-image: none;
}

/* The card is its own height and the holder is exactly the middle. The
   corner-family card keeps its own gap: zeroing the row gap here would pull
   its sections together on decisions only. */
.board__card[data-mode="decision"] .property-card:not(.property-card--corner-family) {
  height: 100%;
  min-height: 0;
  row-gap: 0;
}

/* ------------------------------------------------------- property pop-up v4

   THE PROPERTY POP-UP AT THE REFERENCE MEASUREMENTS (a 390px screen).

   Two type sizes and two weights, and nothing else: 15px for the property
   name and the price, 8px for every other line on the card - 500 for the
   name, price, tagline, upgrade names, the UPGRADES label and the pill
   labels; 400 for everything else. No bold, no italics, no "PRICE" caption.

   The card is one flex column of exactly FOUR groups distributed by
   `space-between`: the free space becomes three equal gaps, so the panel is
   filled from top to bottom and the Upgrade press simply follows the third
   entry instead of being pinned anywhere.

   The pills are 19px tall (Sell 18px), fully rounded and sized to their
   labels. Panel padding is 25/21/20. Type and pills are fixed pixels: when
   a property carries more text it is the three gaps that give way, never
   the fonts and never the pills. */
.property-card--corner-family {
  --property-accent: var(--accent);
  --build-title: 3.241251cqw;
  --build-node: 3.813236cqw;
  --build-track: 1px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  height: 100%;
  padding: 10.592323cqw 8.897551cqw 10.168630cqw;
  border-radius: 4.236929cqw;
  border: 1px solid rgb(18 17 16 / 0.1);
  background: var(--cell-ground);
  box-shadow: none;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.property-card--corner-family::before { display: none; }

/* The corner pop-up's own close: a 24px circle with a 9px cross, 5px in
   from the corner. */
.property-card--corner-family .property-card__close {
  top: 2.118465cqw;
  right: 2.118465cqw;
  width: 10.168630cqw;
  height: 10.168630cqw;
  font-size: 3.813236cqw;
}

.property-card__group {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

/* ------------------------------------------- GROUP 1 - identity, price, answers
   icon (7) name (5) tagline (6) divider (7) description (7) price / rent
   (7) Buy + Pass: one centred column, each step's gap written as the
   margin of the element that follows it. */
.property-card__overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  /* The cluster grows by 6.5px - the air the price / rent / buttons row needs
     (3.5px under the price, 3px more before the answers) - and that growth is
     taken straight back out of this group's share of the card, so every group
     below it keeps the exact position and rhythm it already had. */
  margin-bottom: -2.754004cqw;
}

.property-card__icon {
  width: 12.710787cqw;
  height: 8.473858cqw;
  margin-bottom: 5.084315cqw;
  color: var(--accent);
  flex: 0 0 auto;
}

.property-card__icon svg { display: block; width: 100%; height: 100%; }

.property-card__heading {
  display: block;
  width: 100%;
  margin: 0 0 0.847386cqw;
  font-size: 5.931701cqw;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

.property-card__tagline {
  width: 100%;
  margin: 0 0 0.635539cqw;
  font-size: 3.008220cqw;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  white-space: normal;
}

.property-card--corner-family .corner-card__divider {
  flex: 0 0 auto;
  width: 18.218795cqw;
  height: 1px;
  margin: 0 0 4.660622cqw;
}

.property-card--corner-family .property-card__description {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 4.660622cqw;
  overflow: visible;
  font-size: 3.283620cqw;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  white-space: normal;
}

/* Price and rent. The PRICE caption is not part of the design and is not
   drawn; the price itself is the title's own size and weight, in the
   title's own ink - teal is reserved for the icon, the tagline, the pills
   and the filled timeline dots. */
.property-card__price-block {
  display: grid;
  justify-items: center;
  gap: 0;
}

.property-card--corner-family .property-card__price-label { display: none; }

.property-card--corner-family .property-card__price {
  align-items: baseline;
  gap: 0.423693cqw;
  margin: 0;
  font-size: 5.677485cqw;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.property-card--corner-family .property-card__price-rupee { font-size: 0.7em; opacity: 0.85; }
.property-card--corner-family .property-card__price-was { font-size: 0.65em; text-decoration: line-through; color: var(--ink-soft); }

.property-card--corner-family .property-card__rent {
  /* A breath under the price, and a longer one before the two answers: the
     price / rent / buttons cluster is the one place the card was cramped. */
  margin: 1.482925cqw 0 2.96585cqw;
  font-size: 3.198881cqw;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- the pills
   One shape for all four: 19px tall (Sell 18), fully rounded, 8px medium
   uppercase labels that never wrap. Buy and Pass are a centred pair of 58px
   pills; Upgrade hugs its label; Sell is 49px. Disabled is a light grey
   fill with grey text; an active Sell is the board's calm red. */
.property-card--corner-family .property-card__buy,
.property-card--corner-family .property-card__next,
.property-card--corner-family .build__button,
.property-card--corner-family .property-card__sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 8.050165cqw;
  min-width: 0;
  min-height: 0;
  padding: 0 4.236929cqw;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  font-size: 3.389543cqw;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cell-ground);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  box-sizing: border-box;
}

.property-card--corner-family .property-card__buy-label,
.property-card--corner-family .property-card__next-label,
.property-card--corner-family .build__button-label,
.property-card--corner-family .property-card__sell-label {
  font-weight: 500;
}

.property-card__choice-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.542157cqw;
  width: 100%;
}

.property-card--corner-family .property-card__buy,
.property-card--corner-family .property-card__next {
  min-width: 24.574189cqw;
}

.property-card--corner-family .property-card__next {
  background: transparent;
  color: var(--accent);
}

.property-card--corner-family .property-card__buy:disabled,
.property-card--corner-family .property-card__next:disabled,
.property-card--corner-family .build__button:disabled,
.property-card--corner-family .property-card__sell:disabled {
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
  background: color-mix(in srgb, var(--ink) 7%, var(--cell-ground));
  color: color-mix(in srgb, var(--ink) 45%, var(--cell-ground));
  cursor: default;
}

/* --------------------------------------------- GROUP 2 - the upgrade rail
   Left-aligned: the UPGRADES label shares the timeline's left edge, then
   three rows with 5px of padding above and below. Each row is a 9px hollow
   circle, a 7px breath, and text starting 16px in from the edge: the name
   on the left with "INR 220 . Rent INR 200" on the same line at the right,
   and the description directly beneath. The rail is one hairline drawn per
   row from this node's centre to the next; the last row carries none, so
   the line stops at the third circle. */
.property-card__timeline-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2.542157cqw;
  margin-top: 0;
  padding-top: 0;
  text-align: left;
}

.property-card--corner-family .builds {
  position: relative;
  display: grid;
  grid-template-rows: repeat(3, auto);
  gap: 0;
  width: 100%;
  padding: 0;
  overflow: visible;
  text-align: left;
}

.property-card--corner-family .builds__label {
  margin: 0;
  font-size: 2.987035cqw;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.24em;
  color: color-mix(in srgb, var(--ink) 55%, var(--cell-ground));
  text-align: left;
}

.property-card--corner-family .build {
  position: relative;
  display: grid;
  grid-template-columns: var(--build-node) minmax(0, 1fr);
  column-gap: 2.965850cqw;
  padding: 2.118465cqw 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  align-items: start;
}

.property-card--corner-family .build__node {
  position: relative;
  z-index: 1;
  justify-self: start;
  width: var(--build-node);
  height: var(--build-node);
  /* The circle's centre on the title's own first line: (line - node) / 2. */
  margin-top: calc((var(--build-title) * 1.2 - var(--build-node)) / 2);
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 50%;
  background: var(--cell-ground);
  flex: 0 0 auto;
  box-sizing: border-box;
}

.property-card--corner-family .build[data-state="done"] .build__node {
  border-color: var(--accent);
  background: var(--accent);
}

.property-card--corner-family .build__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.508431cqw;
}

.property-card--corner-family .build__head {
  display: flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
}

.property-card--corner-family .build__name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--build-title);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

/* The figure line: ONE string - "220 . Rent 200" - right-aligned as a
   whole so its right edge meets the description's below it, with a clear
   10px breath after the name. The spaces around the dot are non-breaking
   spaces, so they cannot be trimmed at the end of the cost's line box. */
.property-card--corner-family .build__cost {
  flex: 0 0 auto;
  margin: 0 0 0 4.236929cqw;
  font-size: 3.156512cqw;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.property-card--corner-family .build__cost::after { content: "\00a0\2022"; }

.property-card--corner-family .build__becomes {
  flex: 0 0 auto;
  margin: 0;
  font-size: 3.156512cqw;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.property-card--corner-family .build__becomes::before { content: "\00a0"; }

.property-card--corner-family .build__description {
  display: block;
  margin: 0;
  font-size: 3.389543cqw;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: left;
}

.property-card--corner-family .build__step,
.property-card--corner-family .build__foot { display: none; }
.property-card--corner-family .build__node::before,
.property-card--corner-family .build__node::after { display: none; }

.property-card--corner-family .build::before {
  content: "";
  position: absolute;
  left: calc(var(--build-node) / 2);
  top: calc(2.118465cqw + var(--build-title) * 1.2 / 2);
  height: 100%;
  width: var(--build-track);
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 1px;
}

.property-card--corner-family .build:last-child::before {
  display: none;
}

/* The rail LEADING to a built node takes the property's colour. */
.property-card--corner-family .build:has(+ .build[data-built="true"])::before {
  background: var(--accent);
}

/* --------------------------------------------- GROUP 3 - the upgrade press */
.property-card__upgrade-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.271079cqw;
  margin-top: 0;
  padding-top: 0;
}

/* The pill's label is sized so "UPGRADE TO DEEP-SPACE SURVEY" measures the
   reference's 132px in Jost, which makes the pill itself 154px wide. */
.property-card--corner-family .build__button { font-size: 3.029404cqw; }

.property-card--corner-family .build__button:not(.is-active) { cursor: default; }

.property-card--corner-family .build__button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--cell-ground);
  cursor: pointer;
}

.property-card--corner-family .builds__lock {
  margin: 0;
  font-size: 3.262435cqw;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink-soft);
  text-align: center;
  max-width: 100%;
}

.property-card--corner-family .builds__lock[hidden] { display: none; }

/* ----------------------------------------------- GROUP 4 - the sell pill */
.property-card__sell-group {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.property-card--corner-family .property-card__sell {
  height: 7.626472cqw;
  min-width: 20.760952cqw;
  border-color: var(--sell);
  background: var(--sell);
  color: var(--sell-ink);
}

/* --------------------------------------------- the shield chest's own card

   THE KRONOS POP-UP, IN THIS SAME LANGUAGE.

   The discarded design is gone whole. What stands in its place is this
   shell - the same rectangle, the same padding, the same two voices of
   type, the same pills - carrying the shield chest's own content in four
   groups: the welcome and its rule while the chest is open, the paragraph
   that explains the chest, the deck the shuffle plays on, and the drawn
   shield's name and description once the face is up. The groups are laid
   out by the card itself, which deals the leftover height out between them
   rather than stacking them all at the top.

   ONE CONTROL: DRAW while the chest is open, DONE from the reveal on -
   greyed until a colony has been tapped and the shield's halo has played
   on it. The instruction over it is the one italic on the card. */

/* THE CARD IS FOUR GROUPS AND THE AIR BETWEEN THEM.

   THE COMPOSITION BELONGS TO THE CARD, NOT TO A WRAPPER. This is the property
   card's own flex column - space-between, gap 0, height 100% - and the four
   groups are its DIRECT children, none of which grows. The height the card is
   given is therefore dealt out as three equal gaps between them: the identity
   at the top, the paragraph in the middle, the three faces in the lower half,
   the pill last. A single growing wrapper (which this card used to have)
   swallowed that leftover height itself and left one lump of empty card under
   the deck; no gap below it could distribute, because there was nothing left
   to distribute. */
.kronos-card {
  /* The pill's height, written once. The footer reserves exactly this when
     its control is not drawn, so the tap panel and the landing panel are the
     same composition in the same places. */
  --kronos-pill-height: 8.050165cqw;
  justify-content: space-between;
  /* THE CARD SCROLLS, THE BOARD DOES NOT. The corner-family rule above hides
     the overflow, which silently CLIPPED a card taller than its rectangle -
     a decline on a short phone loses its last line. Scoped to this card:
     every other property pop-up keeps its clipped, non-scrolling box. */
  overflow-x: hidden;
  overflow-y: auto;
}

.kronos-card__identity,
.kronos-card__intro,
.kronos-card__story {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* An author rule of `display` beats the browser's own `[hidden]` rule, so the
   groups that stand down at the reveal have to say so again. */
.kronos-card__identity[hidden],
.kronos-card__intro[hidden],
.kronos-card__story[hidden] {
  display: none;
}

/* THE TITLE BLOCK'S OWN RHYTHM. The property card sets the heading and its
   tagline almost flush, because there the tagline is a caption under a name.
   Here the heading and the subtitle are one composed title, so the step
   between them is larger - scoped to this card, so no property pop-up moves. */
.kronos-card__identity .property-card__heading {
  margin-bottom: 2.541391cqw;
}

/* The rule closes the title block: a short step under the subtitle, and no
   step below itself - the card's distributed gap owns that one. */
.kronos-card__identity .corner-card__divider {
  margin-top: 1.694772cqw;
  margin-bottom: 0;
}

/* The deck is the shared three-face row, untouched - only given the card's
   own width and kept out of the column's growing or shrinking. */
.kronos-card__deck {
  flex: 0 0 auto;
  width: 100%;
}

/* THE SUBTITLE IS ONE LINE. "Protection at the End of Time" is one phrase,
   not two, and the card's own tagline tracking is enough to fit it at every
   phone width - so it is never broken where the sentence is not. */
.kronos-card__identity .property-card__tagline {
  white-space: nowrap;
}

/* THE FACE HAS DONE ITS WORK. Once the shield is up the deck stands down:
   the reveal is the shield's identity and its information, not a row of
   three cards with two holes in it. The shield's artwork is redrawn as the
   compact emblem at the top of the story, at the property icon's level. */
.kronos-card[data-face-shown="true"] .kronos-card__deck {
  display: none;
}

/* THE REVEAL'S OWN COMPOSITION - the same mechanism as the welcome, one level
   down. The story is `display: contents`, so its five groups (the lead and the
   four sections) stop being children of a box and become the CARD's own items,
   beside the footer. The card's space-between then deals the height out as
   five equal gaps - identity, the four questions, the pill - rather than
   leaving one column of information at the top and one hole above the button.

   A story with a box of its own cannot do this: the card would have two items,
   so all the slack would land in the single gap between them. That is exactly
   what this screen used to do (6px between sections, 62-118px above the
   pill), and why it read as packed at the top and disconnected at the foot. */
.kronos-card[data-face-shown="true"] .kronos-card__story:not([hidden]) {
  display: contents;
}

/* THE MINIMUM STEP, when the card is too short to have slack. A narrow screen
   or a long decline gives the groups more height than the card has; the step
   then stops being distribution and becomes this floor, and the card scrolls
   (it is the only pop-up that does). Nothing collapses to zero and nothing is
   cut off. */
.kronos-card[data-face-shown="true"] {
  row-gap: 2.541391cqw;
}

/* GROUP ONE OF THE REVEAL: the weapon's artwork, name, line, rule and myth,
   held together and centred, with the subtitle given the same step under the
   heading that the welcome's title takes. */
.kronos-card__lead {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.kronos-card__lead .property-card__heading {
  margin-bottom: 2.541391cqw;
}

/* THE RULE CLOSES THE TITLE, AND THE MYTH FOLLOWS IT CLOSELY. The property
   card's own divider carries a 4.66cqw step below it, because there the rule
   separates the title from a list of upgrades. Here the rule is punctuation
   inside the title block, so it takes the title's own step on both sides:
   1.69cqw over it, 2.54cqw under it. Left at the shared step the myth sat
   further from its own name than the four sections sit from each other on a
   short card, which pulled it into their group instead of keeping it with
   the title. */
.kronos-card__lead .corner-card__divider {
  margin-top: 1.694772cqw;
  margin-bottom: 2.541391cqw;
}

.kronos-card__icon {
  width: 8.473858cqw;
  height: 10.592323cqw;
  margin-bottom: 3.389543cqw;
}

/* THE COLONY LIST STAYS A LIST, NOT A COLUMN. The shared chip is sized for
   Ragnarok's single column of names; in this card the same names are the
   target list, and at the shared size four of them fall to one per line.
   Slightly smaller and tighter, the six or seven names wrap three to a row -
   the list the section is for, without eating the card. */
.kronos-card__story .chest-card__targets {
  gap: 0.847386cqw;
}

.kronos-card__story .chest-card__target {
  padding: 0.847386cqw 1.694772cqw;
  font-size: 3.389543cqw;
  letter-spacing: 0.05em;
}

/* --------------------------------------------- the third outcome: the reward

   THE SHIELD THAT CAN STAND NOWHERE, AND WHAT KRONOS OFFERS FOR IT.

   Not an error screen, and not a message laid over the reveal: the same
   card, composed again, in the same discipline as the two screens before it
   - identity, the words that explain, the offer, and the footer's one pill,
   four groups whose air comes from the card's own distribution. CLAIM is
   the offer's own press and DONE stays the visit's exit; they are never
   beside each other, so neither has to be told apart by colour alone.

   THE GROUPS ARE THE CARD'S OWN ITEMS, exactly as the reveal's are: this
   section dissolves and hands them to the card, so space-between reaches
   them. A box here would be one item again and every spare pixel would
   land above the pill - which is precisely what the old decline did, and
   why it read as content stuck at the top of an empty card. */
.kronos-card[data-face-shown="true"] .kronos-card__reward:not([hidden]) {
  display: contents;
}

.kronos-card__reward[hidden] {
  display: none;
}

/* The reward's groups, laid out like every other group of this card. */
.kronos-card__reward > * {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* THE OFFER: the sum, its name, and the action's place under them. The sum
   is the one large figure on the card - the reward is the whole point of
   this screen - and the name under it is the subtitle's voice, not a
   heading's: a caption to the figure, not a second title. */
.kronos-card__offer-amount {
  margin: 0 0 1.694772cqw;
  font-size: 10.168630cqw;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.kronos-card__offer-label {
  margin: 0 0 4.236929cqw;
  font-size: 3.008220cqw;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

/* THE ACTION'S PLACE, KEPT IN BOTH OF ITS STATES. The pill and the line
   that replaces it share one box of the pill's own height, so claiming the
   reward swaps one for the other and the composition does not move under
   the player's thumb. */
.kronos-card__offer-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--kronos-pill-height);
  width: 100%;
}

/* CLAIM is this screen's primary press and looks it: the pill's own
   language, a step larger and heavier than the DONE under it, so the
   hierarchy is legible from the size alone. */
.kronos-card__claim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--kronos-pill-height);
  padding: 0 6.779086cqw;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  font-family: inherit;
  font-size: 3.812086cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cell-ground);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

.kronos-card__claim:disabled {
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
  background: color-mix(in srgb, var(--ink) 7%, var(--cell-ground));
  color: color-mix(in srgb, var(--ink) 45%, var(--cell-ground));
  cursor: default;
}

/* An author rule of `display` beats the browser's own `[hidden]` rule, so the
   pill that stands down when the reward is claimed has to say so again. */
.kronos-card__claim[hidden] {
  display: none;
}

/* The money landing, said in the pill's own place and in the caps voice, so
   it reads as the receipt of the press rather than as another offer. */
.kronos-card__credited {
  margin: 0;
  font-size: 3.008220cqw;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

.kronos-card__credited[hidden] {
  display: none;
}

/* The last line of a block carries no step below it: the card's own
   distribution owns the space between the blocks. */
.kronos-card__identity > :last-child,
.kronos-card__intro > :last-child,
.kronos-card__lead > :last-child,
.kronos-card__story > :last-child {
  margin-bottom: 0;
}

.kronos-card__footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 2.118465cqw;
  width: 100%;
}

/* THE CONTROL'S PLACE, KEPT WHEN THE CONTROL IS NOT DRAWN. The peek is the
   information panel and has no button; reserving the pill's own height keeps
   all four group positions identical to the landing screen, so the landing is
   that same panel with one live pill added and nothing else moving. */
.kronos-card__footer[data-reserved="true"] {
  min-height: var(--kronos-pill-height);
}

/* What to do now, directly over the one pill. */
.kronos-card__prompt {
  display: grid;
  gap: 0.847386cqw;
  justify-items: center;
  width: 100%;
}

.kronos-card__prompt:empty {
  display: none;
}

/* The one italic on the card: the instruction, small and quiet, sitting
   over the greyed Done while a colony is being chosen. */
.kronos-card__hint {
  margin: 0;
  font-size: 3.008220cqw;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-align: center;
}

/* The answer where the instructions were: the decline, or the line that
   registers the colony the shield now stands on. */
.kronos-card__status {
  margin: 0;
  font-size: 3.389543cqw;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
}

.kronos-card__status-text {
  margin: 0;
  font-size: 3.008220cqw;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

/* --------------------------------------------- the two decks' own card

   RAGNAROK AND EPOCH ARE KRONOS'S CARD WITH THEIR OWN STORY.

   The shield chest was given its panel, its groups and its air; the two decks
   are the same card - the same shell, the same padding, the same two voices
   of type, the same pill - so they are given the same numbers. Nothing here
   restyles Kronos: these are new class names on the decks' card, and every
   figure is the shield chest's own.

   FOUR GROUPS ON THE LANDING SCREEN: the identity (the place's mark, its
   welcome, its one line, the rule), the paragraph that explains the place,
   the deck the shuffle plays on, and the footer's one pill. The card is a
   space-between column - gap 0 - so the height it is given becomes three
   equal gaps between those groups rather than a lump under the last one.

   AT THE REVEAL the identity, the paragraph and the deck stand down and the
   story takes their place. The story is `display: contents`, so its groups
   (the lead and the face's own sections) become the CARD's items, beside the
   footer - and the same space-between distributes the same height between
   them. A story boxed as one item would put every spare pixel in the single
   gap above the pill, which is the hole this replaces. */
.deck-card {
  /* The pill's height, written once: the footer reserves exactly this when
     its control is not drawn, so the peek and the landing panel are the same
     composition in the same places. */
  --deck-pill-height: 8.050165cqw;
  justify-content: space-between;
  /* The card scrolls, the board does not: the corner-family rule above hides
     the overflow, which would silently clip a card taller than its rectangle.
     Scoped to this card, as it is to the shield chest. */
  overflow-x: hidden;
  overflow-y: auto;
}

.deck-card__identity,
.deck-card__intro,
.deck-card__story {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* An author rule of `display` beats the browser's own `[hidden]` rule, so the
   groups that stand down at the reveal have to say so again. */
.deck-card__identity[hidden],
.deck-card__intro[hidden],
.deck-card__story[hidden] {
  display: none;
}

/* THE TITLE BLOCK'S OWN RHYTHM, the shield chest's numbers exactly: the
   heading's step, and the rule that closes the block - no step below the
   rule, because the card's distributed gap owns that one. */
.deck-card__identity .property-card__heading {
  margin-bottom: 2.541391cqw;
}

.deck-card__identity .corner-card__divider {
  margin-top: 1.694772cqw;
  margin-bottom: 0;
}

/* The deck is the shared three-face row, untouched - only given the card's
   own width and kept out of the column's growing or shrinking. */
.deck-card__deck {
  flex: 0 0 auto;
  width: 100%;
}

/* THE FACE HAS DONE ITS WORK. Once the card is up the deck stands down: the
   reveal is the drawn face's identity and its information, not a row of
   three cards with two holes in it. */
.deck-card[data-face-shown="true"] .deck-card__deck {
  display: none;
}

/* THE REVEAL'S OWN COMPOSITION - the shield chest's, exactly. The story's
   groups become the card's items. */
.deck-card[data-face-shown="true"] .deck-card__story:not([hidden]) {
  display: contents;
}

/* THE MINIMUM STEP, when the card is too short to have slack: the same floor
   as the shield chest's, so nothing collapses to zero and nothing is cut off -
   the card scrolls instead. */
.deck-card[data-face-shown="true"] {
  row-gap: 2.541391cqw;
}

/* GROUP ONE OF THE REVEAL: the face's artwork, name, line, rule and the
   sentence that says what was drawn, held together and centred. */
.deck-card__lead {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.deck-card__lead .property-card__heading {
  margin-bottom: 2.541391cqw;
}

.deck-card__lead .corner-card__divider {
  margin-top: 1.694772cqw;
  margin-bottom: 2.541391cqw;
}

/* The drawn face's mark, at the property icon's level: the shield chest's own
   portrait slot, so the artwork sits where a shield sits. */
.deck-card__icon {
  width: 8.473858cqw;
  height: 10.592323cqw;
  margin-bottom: 3.389543cqw;
}

/* THE COLONY LIST STAYS A LIST, NOT A COLUMN: the shield chest's chip sizes
   exactly, so a reach of six or seven names wraps three to a row. */
.deck-card__story .chest-card__targets {
  gap: 0.847386cqw;
}

.deck-card__story .chest-card__target {
  padding: 0.847386cqw 1.694772cqw;
  font-size: 3.389543cqw;
  letter-spacing: 0.05em;
}

/* The last line of a block carries no step below it: the card's own
   distribution owns the space between the blocks. */
.deck-card__identity > :last-child,
.deck-card__intro > :last-child,
.deck-card__lead > :last-child,
.deck-card__story > :last-child {
  margin-bottom: 0;
}

.deck-card__footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 2.118465cqw;
  width: 100%;
}

/* THE CONTROL'S PLACE, KEPT WHEN THE CONTROL IS NOT DRAWN. The peek has no
   button; reserving the pill's own height keeps every group's position
   identical to the landing screen. */
.deck-card__footer[data-reserved="true"] {
  min-height: var(--deck-pill-height);
}

/* What to do now, directly over the one pill. Empty in the deck's states, so
   it takes no height at all. */
.deck-card__prompt {
  display: grid;
  gap: 0.847386cqw;
  justify-items: center;
  width: 100%;
}

.deck-card__prompt:empty {
  display: none;
}

/* ================================================== the Nexus, in the family

   THE UNNAMED KEEPER, ON THE SHIELD CHEST'S OWN CARD.

   The other three chests were given the property pop-up's own architecture -
   the four-by-eight middle, the corner family's padding and radius, the
   cqw measure, the groups distributed by the card's own space-between - and
   the Nexus was left on the board's base holder: a THREE-cell window it
   filled and scrolled inside, with the keeper's picture eating the fold and
   the title sliced at the bottom, while the loan card set `height: auto`
   and grew straight out of the middle and over the board. That was the
   squeeze: not a spacing accident but a card that had never been given the
   panel the family composes in, so nothing on it could be written in the
   family's measure.

   So the root cause is fixed here: the same middle, the same measure, the
   same groups - and the Nexus's own content composed in them. The keeper's
   portrait keeps its place at the head of the identity (it is the Nexus's
   identity mark - content, not a glyph), the two choices keep their own
   triggers and their own notes, the deck keeps its shuffle and its turn,
   and the loan keeps every figure of its machinery. Only the architecture
   is the family's.

   THE LANDING IS FOUR MOVES OF THE SAME COMPOSITION: identity (the
   portrait, his name, the one line, the rule), the mythology, the two
   choices in the footer, and - once the draw begins - the deck in the
   mythology's place with the card turned over inside it. The loan screen is
   the same card again: identity, the one line, the loan's own step
   distributed through the middle like a reveal's sections, and the one
   control at the foot. */

/* THE NEXUS OWNS THE SAME MIDDLE.

   The base holder is three cells tall, which is the whole of the squeeze:
   every size inside this card is cqw - one per cent of THIS box - and
   without the four-by-eight rectangle and its `container-type` there is no
   box for those sizes to be a per cent of. The numbers are the shield
   chest's exactly. */
.board__card[data-card-kind="chest"][data-property="nexus"] {
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: none;
  display: block;
  overflow: hidden;
  container-type: inline-size;
}

/* THE CARD IS THE FAMILY'S COLUMN. Padding and radius are the corner
   family's, exactly as the shield chest inherits them; the pill's height is
   copied, not shared. The card scrolls, the board does not - the corner
   family's rule above hides the overflow, which would silently clip a card
   taller than its rectangle. */
.nexus-card {
  --nexus-pill-height: 8.050165cqw;
  justify-content: space-between;
  overflow-x: hidden;
  overflow-y: auto;
}

.nexus-card::-webkit-scrollbar {
  display: none;
}

/* THE GROUPS: each a column of its own, kept out of the card's growing or
   shrinking, so the space the card is given becomes equal gaps between them
   rather than a lump under the last one. */
.nexus-card__identity,
.nexus-card__intro,
.nexus-loan__identity,
.nexus-loan__intro {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* An author rule of `display` beats the browser's own `[hidden]` rule, so the
   groups that stand down have to say so again. */
.nexus-card__identity[hidden],
.nexus-card__intro[hidden],
.nexus-loan__identity[hidden],
.nexus-loan__intro[hidden] {
  display: none;
}

/* The last line of a block carries no step below it: the card's own
   distribution owns the space between the blocks. */
.nexus-card__identity > :last-child,
.nexus-card__intro > :last-child,
.nexus-loan__identity > :last-child,
.nexus-loan__intro > :last-child {
  margin-bottom: 0;
}

/* THE TITLE BLOCK'S OWN RHYTHM, the shield chest's numbers exactly: the
   heading's step under it, and the rule that closes the block - no step
   below the rule. */
.nexus-card__identity .nexus-card__title,
.nexus-loan__identity .nexus-card__title {
  margin-bottom: 2.541391cqw;
}

.nexus-card__identity .corner-card__divider,
.nexus-loan__identity .corner-card__divider {
  margin-top: 1.694772cqw;
  margin-bottom: 0;
}

/* THE KEEPER'S PORTRAIT, in the identity mark's place.

   The portrait is not a glyph: it is the Nexus's own picture, and the mark's
   slot is given to it at the portrait's proportions - a fixed share of the
   panel, so the keeper is the same figure on every phone - with the icon's
   own step below it. It is cropped by its box from the top, and the god
   stands on the line the title follows. */
.nexus-card__figure-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 52cqw;
  margin-bottom: 5.084315cqw;
  overflow: hidden;
}

.nexus-card__god {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* THE LOAN SCREENS READ A TIGHTER CROP. The loan is a decision, not an
   arrival: it holds more of its own step, so the keeper gives way to it -
   and on the receipt, where the card belongs to the transaction, the
   picture is smaller still. */
.nexus-card--loan .nexus-card__figure-wrap--loan {
  height: 68cqw;
}

.nexus-card--granted .nexus-card__figure-wrap--loan,
.nexus-card--settled .nexus-card__figure-wrap--loan {
  height: 34cqw;
  margin-bottom: 0;
}

/* Silhouette fallback: used only when the god's picture fails to load. The
   outline is a polygon fill: no request, no gradient, nothing to lose. */
.nexus-card--silhouette .nexus-card__god {
  visibility: hidden;
}

.nexus-card--silhouette .nexus-card__figure-wrap::after {
  content: "";
  position: absolute;
  inset: 8% 0 0;
  background: var(--ink);
  clip-path: polygon(
    58% 0%, 62% 14%, 78% 26%, 84% 48%, 74% 56%, 70% 74%,
    58% 100%, 44% 100%, 34% 72%, 30% 52%, 18% 46%, 22% 24%, 38% 14%, 42% 2%
  );
  opacity: .85;
}

/* THE MYTHOLOGY: the family's own paragraph voice, and the sentences of the
   keeper's words kept one to a line - the card's own way of setting them. */
.nexus-card__mythology span {
  display: block;
}

/* While the deck is in the card, the mythology stands down - and it stands
   down for the offering too. Praying has no deck, but it does have a result
   to show, and the keeper's long words must not read as the card's answer
   in its place. The paragraph and the group that holds it both go: an empty
   group would still take a slot in the card's distribution. */
.nexus-card[data-phase="shuffling"] .nexus-card__mythology,
.nexus-card[data-phase="revealed"] .nexus-card__mythology,
.nexus-card[data-phase="praying"] .nexus-card__mythology,
.nexus-card[data-phase="shuffling"] .nexus-card__intro,
.nexus-card[data-phase="revealed"] .nexus-card__intro,
.nexus-card[data-phase="praying"] .nexus-card__intro {
  display: none;
}

/* THE FOOTER: THE TWO CHOICES.

   Pray and Take My Chances are the corner family's choice row - the acting
   press in the filled pill, its pair in the quiet one - each with the one
   line that says what it is under it. The pills hug their labels and the
   row is centred, exactly as the property card's two answers are. */
.nexus-card__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 2.542157cqw;
  width: 100%;
}

.nexus-card__choice {
  display: grid;
  gap: 0.847386cqw;
  justify-items: center;
  min-width: 0;
}

/* THE QUIET CAPTION UNDER A PILL: the shield chest's own secondary voice,
   so the note reads as the same kind of line the other cards whisper. */
.nexus-card__action-note {
  margin: 0;
  font-size: 3.008220cqw;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

/* THE DECK'S PLACE: a block that fills the place it is given - the stack
   inside is out of the flow, and a centred slot collapses to nothing. */
.nexus-card__deck-slot {
  display: block;
  flex: 0 0 auto;
  width: 100%;
}

.nexus-card__deck-slot[hidden] {
  display: none;
}

/* THE DONE PILL, the family's pill.

   It is appended to the card by the board at the answered stages, and it
   closes the visit. Scoped to this card - the shared pill keeps its own
   shape for every other chest - and copied from the corner family's
   numbers, so it stands exactly where the family's one pill stands. */
.nexus-card .chest-card__done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: var(--nexus-pill-height);
  min-height: 0;
  margin: 0;
  padding: 0 4.236929cqw;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  font-size: 3.389543cqw;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cell-ground);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  box-sizing: border-box;
}

.nexus-card .chest-card__done:hover {
  background: var(--accent);
  color: var(--cell-ground);
  filter: brightness(1.08);
}

/* ================================================ the Nexus loan screen

   THE PEEK AT NEXUS THAT IS NOT A LANDING: the keeper's picture, the single
   line of mythology, and the loan itself, on the landing card's own
   architecture. The loan's step is distributed through the middle the way a
   reveal's sections are - the step's lines hand themselves to the card - so
   the screens read as the same card at every stage, and the one control of
   the stage sits in the footer in the family's pill. */

/* THE LOAN'S STEP IS THE CARD'S OWN ITEMS. A box here would be one item
   again and every spare pixel would land above the pill. */
.nexus-loan__body {
  display: contents;
}

.nexus-loan__body > * {
  margin: 0;
}

/* THE FOOTER: the stage's one control, and the line that explains when
   there is none. The pill's place is kept when the control is not drawn, so
   the four groups distribute across the same card in every stage. */
.nexus-loan__footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 0.847386cqw;
  width: 100%;
}

.nexus-loan__footer[data-reserved="true"] {
  min-height: var(--nexus-pill-height);
}

/* THE CALL AND THE RECEIPT'S LINE: the family's paragraph voice, exactly as
   the mythology carries it. */
.nexus-loan__call,
.nexus-loan__grant-line {
  width: 100%;
  font-size: 3.283620cqw;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
}

/* THE QUIET LINES: the shield chest's secondary voice. */
.nexus-loan__note {
  margin: 0;
  font-size: 3.008220cqw;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

/* THE PLEDGE is the temple's own longer speech. It wears the note's class
   too, so it is written after it: the same paragraph voice as the call. */
.nexus-loan__pledge {
  font-size: 3.283620cqw;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
}

/* HOW MUCH OF THE PLEDGE IS COMPLETE, in the tagline's own tracked caps -
   a label, rewritten by the board on each pick: "1 of 2 pledged". */
.nexus-loan__progress {
  width: 100%;
  margin: 0;
  font-size: 3.008220cqw;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}

/* THE THREE AMOUNTS, side by side. Equal shares of one row, never stacked,
   in the family's pill - the chosen one the card's single filled mark. */
.nexus-loan__options {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: stretch;
  gap: 2.542157cqw;
  width: 100%;
}

.nexus-loan__options .nexus-loan__option {
  flex: 1 1 0;
  min-width: 0;
}

.nexus-loan__options .nexus-loan__option.is-selected,
.nexus-loan__options .nexus-loan__option[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--dealt-paper);
}

/* Out of reach: dashed and quiet, because no set of the player's colonies
   can secure it - the same silence a dead control has everywhere. */
.nexus-loan__options .nexus-loan__option--unavailable {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
  background: transparent;
  opacity: 0.38;
}

.nexus-loan__amount {
  display: block;
  font-size: inherit;
  color: inherit;
}

/* THE LIVE LOAN: what is owed, what it is secured on, and how long is left.
   The sum is the price block's own figure; the two lines under it are the
   section's own quiet voice. */
.nexus-loan__info {
  display: grid;
  gap: 0.847386cqw;
  width: 100%;
  text-align: center;
}

.nexus-loan__outstanding {
  margin: 0;
  font-size: 5.677485cqw;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.nexus-loan__line {
  margin: 0;
  font-size: max(9.6px, calc(var(--cell) * 0.126));
  line-height: 1.42;
  color: var(--ink-soft);
}

/* THE RECEIPT.

   The pledge has been accepted (or the debt paid off) and the money has
   moved. No title, no mythology, no close: the receipt says everything, and
   DONE is the only press on the card. The headline is the title block's own
   voice, the line under it is the paragraph's, and the figures are the
   shield chest's ledger rows - term left, figure right - under one rule. */
.nexus-card--granted .nexus-loan__identity .nexus-card__title,
.nexus-card--granted .nexus-loan__identity .corner-card__divider,
.nexus-card--granted .nexus-loan__intro,
.nexus-card--granted .property-card__close,
.nexus-card--settled .nexus-loan__identity .nexus-card__title,
.nexus-card--settled .nexus-loan__identity .corner-card__divider,
.nexus-card--settled .nexus-loan__intro,
.nexus-card--settled .property-card__close {
  display: none;
}

.nexus-loan__grant {
  width: 100%;
  margin: 0;
  font-size: 5.931701cqw;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}

.nexus-loan__summary {
  width: 100%;
  margin: 0;
  padding-top: 1.694772cqw;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nexus-card--granted {
  animation: nexus-grant-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes nexus-grant-in {
  from { opacity: 0; transform: translateY(7px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}


/* The advantage keeps its whole text on a decision too. The card has the whole
   middle now; there is no fixed three-row rectangle whose edge has to slice a
   sentence, so the words are allowed to finish. */

/* ---------------------------------------------------------- the close button

   Reading only. A decision has no way out except answering it, and a close
   button on a card that cannot be closed is a lie - so `syncCard` hides it and
   the stylesheet makes sure a hidden button is not a tiny empty hole. */

.property-card__close {
  position: absolute;
  top: calc(var(--cell) * 0.045);
  right: calc(var(--cell) * 0.045);
  z-index: 3;
  display: grid;
  place-items: center;
  width: max(20px, calc(var(--cell) * 0.34));
  height: max(20px, calc(var(--cell) * 0.34));
  padding: 0;
  border: 1px solid rgb(18 17 16 / 0.14);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cell-ground) 86%, transparent);
  font-size: max(13px, calc(var(--cell) * 0.19));
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  pointer-events: auto;
}

.property-card__close:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 32%, transparent);
}

.property-card__close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.property-card__close[hidden] {
  display: none;
}

/* ------------------------------------------------------- Pass, Done, Continue

   One pill, three words. It sits directly under Buy, because the two answers to
   an unowned square belong together, and it is quiet in proportion to what it
   does: Pass and Done are secondary, and Continue - the acknowledgement of rent
   or a weapon - is the only one that carries the accent, because it is the only
   one with nothing to decide. */

.property-card__next {
  display: block;
  width: 100%;
  padding: 0.42em 0.7em;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 6px;
  background: transparent;
  font-size: max(10px, calc(var(--cell) * 0.135));
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}

.property-card__next:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-color: color-mix(in srgb, var(--ink) 42%, transparent);
}

.property-card__next:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.property-card__next[data-kind="rent"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--cell-ground);
}

.property-card__next[hidden] {
  display: none;
}

/* --------------------------------------------------------------- the sell pill

   A real pill, in the board's one calm red, with the amount in the label rather
   than in a question that appears afterwards. It is the only destructive action
   in the game, and it is allowed to be findable: a hairline of small caps that
   a player has to hunt for was hiding a decision rather than making it quiet.
   The confirm step is still the label changing, so the button never moves under
   the finger that is using it. */

.property-card__sell {
  justify-self: center;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 30px;
  padding: 6px 16px;
  border: 1px solid var(--sell);
  border-radius: 999px;
  background: var(--sell);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--sell-ink);
  cursor: pointer;
  pointer-events: auto;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}

.property-card__sell:hover {
  background: var(--sell-deep);
  border-color: var(--sell-deep);
}

.property-card__sell[data-armed="true"] {
  background: var(--sell-deep);
  border-color: var(--sell-deep);
}

.property-card__sell:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.property-card__sell[hidden] {
  display: none;
}

/* Hidden is hidden. Several things below carry an author `display`, and an
   author display beats the browser's own `[hidden]` rule - which is how a
   button that is meant to be gone keeps a hole in the layout. */
.builds[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ the chip

   THE CHIP, REDRAWN

   First line: a coin disc in the civilization's own colour, the name, a small
   TURN tag on the active seat, and the civilization in small caps.
   Second line: the balance, in light Jost with tabular digits.

   The disc is not decoration. It is the same `coinColor(civ)` the board coin,
   the owner's ring and the flying rupee tokens use - one source of truth for
   who a player is on this board, so a red coin never belongs to a blue chip.

   NO OVERFLOW AT 360

   Both chips share one row, each `flex: 1 1 0` with `min-width: 0`, and every
   text child is allowed to ellipsis rather than push. A name is the last thing
   to give way, but it is allowed to give way: a chip that overflows its border
   is worse than a name with a dot at the end. */

.board-who {
  gap: 0.35rem;
  align-items: stretch;
}

.who {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.32em;
  row-gap: 0.12em;
  padding: 0.34em 0.55em 0.3em;
  border-radius: 3px;
  flex: 1 1 0;
  min-width: 0;
  /* A real button, because the whole chip is the way into that player's
     profile. The reset keeps it looking exactly as it did as a div. */
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.who:hover {
  background: color-mix(in srgb, var(--coin, var(--ink)) 5%, transparent);
}

.who:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.who__coin {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: max(7px, 0.62em);
  height: max(7px, 0.62em);
  border-radius: 50%;
  background: var(--coin, var(--ink));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--coin, var(--ink)) 55%, white),
    0 1px 2px rgb(18 17 16 / 0.22);
}

.who__name {
  grid-column: 2;
  grid-row: 1;
  font-weight: 300;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who__turn {
  grid-column: 3;
  grid-row: 1;
  padding: 0.08em 0.32em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--coin, var(--ink)) 16%, transparent);
  font-size: max(6.5px, 0.5rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  color: color-mix(in srgb, var(--coin, var(--ink)) 76%, var(--ink));
  white-space: nowrap;
}

.who__turn[hidden] {
  display: none;
}

.who__civ {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who--me .who__civ {
  color: var(--ink);
}

.who__money {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin-top: 0.08em;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.who--me .who__money {
  font-weight: 300;
}

.who__rupee {
  font-size: 0.6em;
  opacity: 0.55;
}

/* THE KAAL COUNTER
   ----------------
   A small clock directly above the chip, not a third figure beside the purse.
   It is absent until the first fragment (syncKaal writes data-kaal-ever), and
   it stays from then on. Kept short and tabular so it fits the strip of space
   above a 44px mobile chip without crowding the board. */
.who__kaal {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

.who__kaal[hidden] {
  display: none;
}

/* The flight's award rides one line above the standing counter, so the two
   never print on top of each other while the numbers are travelling. */
.who[data-kaal-ever="true"] .who__kaal-award {
  bottom: calc(100% + 1.35em);
}

.who__kaal-award {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.66rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.kaal-flight {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  color: var(--ink, #121110);
  font: 600 12px/1 "Jost", system-ui, sans-serif;
  text-shadow: 0 0 3px white, 0 0 6px white;
}

.kaal-flight span {
  position: absolute;
}

.who__weapons {
  grid-column: 4;
  grid-row: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 2px;
  height: 8px;
  min-width: 0;
}

/* (The chip's shield dot is gone with the mechanism it misrepresented: a
   shield is never stored in a hand - it stands on a colony, and that is
   shown on the tile. See .cell-shield below the board's marks.) */

.who--active {
  border-color: color-mix(in srgb, var(--coin, var(--ink)) 58%, var(--line));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--coin, var(--ink)) 22%, transparent),
    0 1px 4px rgb(18 17 16 / 0.08);
}

.who--active .who__name {
  font-weight: 400;
}

/* On a phone the civilization name is the first thing to give way. The coin
   already carries the civilization's colour, and the chip's one job is to keep
   the player's name readable beside the TURN tag. Without this, a name and a
   long civilization cannot both fit a 360px chip, and the name is what a
   player is looking for. */
@media (max-width: 430px) {
  .who__civ {
    display: none;
  }
}

/* ------------------------------------------------ what an action looks like

   Six small pieces of motion, all 300-700ms, all driven from an event rather
   than from a state difference. They are deliberately quiet: this is a board
   game on a phone, and the point of the animation is to show where a number
   went, not to be the thing you watch.

   Every one of them is decorative. The information has already been written by
   the time the animation starts, and reduced motion gets the information with a
   fade instead of the travel. */

.board__lift {
  position: absolute;
  z-index: 32;
  padding: 0.1em 0.35em;
  border-radius: 999px;
  background: var(--centre-ground);
  box-shadow: 0 1px 4px rgb(18 17 16 / 0.16);
  font-size: max(9px, calc(var(--cell) * 0.125));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}

.board__lift--earn {
  color: color-mix(in srgb, var(--ink) 55%, var(--accent, var(--ink)));
}

/* THE PLEDGE, IN FLIGHT.

   One pledged colony's own square, lifted off its tile and drawn into the
   keeper. The card is a clone, so it carries the name, the pill and the price
   the player just chose; the soft edge and the faint halo are the only things
   added, and they are what make it read as essence rather than as a copy.
   The ghost takes no taps and dies at the end of its own flight. */
.board__pledge {
  position: absolute;
  /* ABOVE THE CARD, because the card is where the keeper is. The soul is
     travelling INTO that picture, so it has to be seen crossing it rather
     than disappearing behind its edge. Nothing on the card is pressable
     while the pledge is in flight, so there is nothing to cover. */
  z-index: 60;
  pointer-events: none;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  filter:
    drop-shadow(0 0 5px color-mix(in srgb, var(--sell) 26%, transparent))
    drop-shadow(0 0 12px color-mix(in srgb, var(--ink) 14%, transparent));
}

.board__pledge-face {
  margin: 0;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--cell-ground) 55%, transparent),
    0 3px 12px rgb(18 17 16 / 0.22);
  overflow: hidden;
}

/* The blink that marked the colony as a target belongs to the tile, not to the
   soul leaving it. */
.board__pledge-face::before {
  content: none;
}

.board__rupee {
  position: absolute;
  z-index: 30;
  display: grid;
  place-items: center;
  width: max(12px, calc(var(--cell) * 0.26));
  height: max(12px, calc(var(--cell) * 0.26));
  border-radius: 50%;
  background: var(--cell-ground);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  font-size: max(7px, calc(var(--cell) * 0.13));
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(18 17 16 / 0.2);
  pointer-events: none;
}

/* The two followers are the lead coin's memory, not three payments. They are
   smaller, unlifted and drawn in ink rather than the full coin face, so the eye
   reads one object moving and a wake behind it. */
.board__rupee--echo {
  width: max(8px, calc(var(--cell) * 0.17));
  height: max(8px, calc(var(--cell) * 0.17));
  border-color: transparent;
  background: color-mix(in srgb, var(--cell-ground) 62%, var(--ink));
  font-size: max(6px, calc(var(--cell) * 0.095));
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  box-shadow: none;
}

/* Where the coin lands: one thin ring opening once, then gone. It says "here"
   without adding a number or a second object to read. */
.board__coin-land {
  position: absolute;
  z-index: 29;
  width: max(18px, calc(var(--cell) * 0.36));
  height: max(18px, calc(var(--cell) * 0.36));
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 34%, transparent);
  pointer-events: none;
}

/* THE PROPERTY'S SOUL, IN FLIGHT.

   A clone of the square itself, so the name, the pill and the price crossing
   the board are recognisably the property that changed hands. What makes it
   read as essence rather than as a copy is the light: the buyer's own coin
   colour glowing out of its edge, a soft halo behind it, and a body that is
   never quite solid - it peaks below full opacity and dissolves as it enters
   the chip. Above the card, because it crosses the middle to reach the roster.
   It takes no taps and dies at the end of its own flight. */
.board__soul {
  position: absolute;
  z-index: 60;
  pointer-events: none;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--soul, var(--soul-glow)) 45%, transparent))
    drop-shadow(0 0 16px color-mix(in srgb, var(--soul, var(--soul-glow)) 26%, transparent));
}

.board__soul-face {
  margin: 0;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--soul, var(--soul-glow)) 55%, transparent),
    0 4px 14px rgb(18 17 16 / 0.25);
  overflow: hidden;
}

/* The wash that marked the square as a target belongs to the tile, not to the
   soul leaving it. */
.board__soul-face::before {
  content: none;
}

/* GOLD OUT OF THE TILE.

   The fountain's own coin: a struck gold disc with the rupee on it, so what
   bursts from the square is the game's money and not a generic particle. The
   glow is what lets a dozen of them read as one magical event over cream
   cells, and `pointer-events` keeps every one of them out of the way of the
   taps the board is still waiting for. */
.board__coin-gold {
  position: absolute;
  z-index: 56;
  display: grid;
  place-items: center;
  width: max(11px, calc(var(--cell) * 0.22));
  height: max(11px, calc(var(--cell) * 0.22));
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 28%,
    var(--gold-hi),
    var(--gold-face) 46%,
    var(--gold-deep) 76%,
    var(--gold-rim)
  );
  border: 1px solid var(--gold-edge);
  box-shadow:
    0 1px 3px rgb(60 40 5 / 0.35),
    0 0 6px color-mix(in srgb, var(--gold-face) 45%, transparent),
    inset 0 0 3px rgb(255 255 255 / 0.5);
  font-size: max(6px, calc(var(--cell) * 0.11));
  font-weight: 700;
  line-height: 1;
  color: var(--gold-ink);
  pointer-events: none;
  will-change: transform, opacity;
}

.board__coin-gold--small {
  width: max(8px, calc(var(--cell) * 0.16));
  height: max(8px, calc(var(--cell) * 0.16));
  font-size: max(5px, calc(var(--cell) * 0.085));
}

.board__coin-gold--big {
  width: max(14px, calc(var(--cell) * 0.27));
  height: max(14px, calc(var(--cell) * 0.27));
  font-size: max(7px, calc(var(--cell) * 0.13));
}

/* The still reader's whole fountain: one warm glow where the money came
   from, with no coins thrown at all. */
.board__coin-gold--flash {
  width: max(26px, calc(var(--cell) * 0.52));
  height: max(26px, calc(var(--cell) * 0.52));
  font-size: 0;
}

.board__passed {
  position: absolute;
  z-index: 31;
  padding: 0.2em 0.55em;
  border-radius: 999px;
  background: var(--corner-ground);
  font-size: max(7.5px, calc(var(--cell) * 0.1));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cell-ground);
  white-space: nowrap;
  pointer-events: none;
}

/* The ring draws itself clockwise from the top left. `clip-path` is animated on
   the ::after rather than a conic gradient, because the border is already the
   right colour and shape and only needs revealing. */
.board__cell.is-just-bought::after {
  animation: ring-sweep 620ms cubic-bezier(0.22, 0.7, 0.3, 1) both;
}

@keyframes ring-sweep {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* A pip filling, with a soft pulse. Scale only, so nothing around it moves. */
.board__cell.is-just-built::before {
  animation: pip-pop 460ms cubic-bezier(0.22, 0.7, 0.3, 1) both;
  transform-origin: right center;
}

@keyframes pip-pop {
  0%   { transform: scale(0.6); opacity: 0.4; }
  55%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.board__cell.is-just-landed {
  animation: land-pulse 400ms ease-out both;
}

@keyframes land-pulse {
  0%   { box-shadow: inset 0 0 0 rgb(0 0 0 / 0); }
  45%  { box-shadow: inset 0 0 calc(var(--cell) * 0.3) rgb(0 0 0 / 0.32); }
  100% { box-shadow: inset 0 0 calc(var(--cell) * 0.18) rgb(0 0 0 / 0.26); }
}

/* ----------------------------------------------------------- the lap paid

   THE START TILE ALONE LIGHTS GREEN when a lap's salary is credited. It is
   the tile the coin crossed, so the tile says so - nothing travels, no coins
   fly between squares, and no other cell changes. The glow is built from the
   corner's OWN green (--corner-start), so a lit Start is the same Start,
   brighter. One class for about three seconds: a smooth fade in, a held
   breath, a smooth fade out, and then the tile is exactly as it was. */

.board__cell.is-redeeming {
  animation: start-glow 3000ms ease-in-out both;
}

@keyframes start-glow {
  0%, 100% {
    box-shadow:
      0 0 0 0 color-mix(in srgb, var(--corner-start) 0%, transparent),
      inset 0 0 0 0 color-mix(in srgb, var(--corner-start) 0%, transparent);
  }
  18%, 74% {
    box-shadow:
      0 0 calc(var(--cell) * 0.55) calc(var(--cell) * 0.1)
        color-mix(in srgb, var(--corner-start) 88%, transparent),
      inset 0 0 calc(var(--cell) * 0.4)
        color-mix(in srgb, var(--corner-start) 55%, transparent);
  }
}

/* ============================================================== the profile

   One player's record, in the same cell as the die and the card and above
   both. It is a scrolling sheet with the scrollbar hidden: the middle of the
   board is the one place a strip of browser chrome would be worse than no
   affordance. Everything inside uses the same 4px spacing scale, the same
   hairline and the same soft shadow as the property card. */

.board__profile {
  grid-area: 1 / 1;
  place-self: stretch;
  position: relative;
  z-index: 20;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 16px;
  border-radius: 10px;
  background: var(--cell-ground);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.7) inset,
    0 2px 10px rgb(18 17 16 / 0.13);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}

.board__profile::-webkit-scrollbar {
  display: none;
}

.profile__head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
}

.profile__coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coin, var(--ink));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--coin, var(--ink)) 55%, white),
    0 1px 2px rgb(18 17 16 / 0.22);
}

.profile__name {
  margin: 0;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.profile__civ {
  margin: 2px 0 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.profile__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgb(18 17 16 / 0.16);
  border-radius: 50%;
  background: color-mix(in srgb, var(--cell-ground) 88%, transparent);
  font-size: 18px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.profile__close:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 34%, transparent);
}

.profile__close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.profile__money {
  margin-top: 12px;
}

.profile__cash {
  margin: 0;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.profile__worth {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.profile__section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgb(18 17 16 / 0.09);
}

.profile__label {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.profile__empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ONE COLONY THE PLAYER OWNS. The name and its three upgrade dots share the
   first line; the rent sits directly beneath the name in the quiet voice, so
   the row reads name first and figure second. The old set groups - their
   labels and their "Full set" / "1 of 2" badges - are gone with the ownership
   statistics they carried: these rows are the whole of what the player holds.
   The rent keeps the pill's own column at its left edge, which puts it
   exactly under the name. */
.profile-colony {
  display: grid;
  gap: 2px;
  padding: 6px 0;
  border-top: 1px solid rgb(18 17 16 / 0.06);
}

.profile-colony__head {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.profile-colony__pill {
  width: 10px;
  height: 4px;
  border-radius: 999px;
}

.profile-colony__name {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.profile-colony__rent {
  margin: 0;
  padding-left: 18px;
  font-size: 11px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  white-space: nowrap;
}

.profile-pips {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.profile-pip {
  width: 5px;
  height: 5px;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  box-sizing: border-box;
}

.profile-pip[data-on="true"] {
  border-color: var(--ink);
  background: var(--ink);
}

.profile-weapons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
}

.profile-weapon {
  display: grid;
  grid-template-rows: auto 4px auto auto 1fr;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgb(18 17 16 / 0.08);
  border-radius: 6px;
  background: var(--card-inset);
}

.profile-weapon__face {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--weapon, var(--ink)) 10%, var(--card-inset));
}

.profile-weapon__emblem {
  width: 28px;
  height: 35px;
}

.profile-weapon__emblem .chest-card__emblem {
  width: 100%;
  height: 100%;
}

.profile-weapon__pill {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--weapon, var(--ink));
}

.profile-weapon__name {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.profile-weapon__reach {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.profile-weapon__targets {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-content: start;
}

.profile-weapon__target {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ shields

   The STANDING shields, as their own rows: the glyph in the shield's own
   colour on the left, and the three facts on the right - what it protects,
   what it counters, how long it stands - every one of them read from
   game.shields at the moment the panel is drawn, so the record can never
   list a shield that has blocked or expired. */
.profile-shields {
  display: grid;
  gap: 6px;
}

.profile-shield {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgb(18 17 16 / 0.08);
  border-radius: 6px;
  background: var(--card-inset);
}

.profile-shield__emblem {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
}

.profile-shield__emblem .chest-card__emblem {
  width: 100%;
  height: 100%;
}

.profile-shield__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-shield__name {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.profile-shield__line {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.profile-shield__line--turns {
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--shield, var(--ink)) 70%, var(--ink));
}

/* ----------------------------------------------------------- magical cards

   THE EPOCH CARDS A PLAYER CARRIES, as their own rows: the chip's own ability
   indicator - the diamond that already says "magical item" wherever one is
   shown - in the card's own colour, the card's name and its one line, and the
   count held, because the deck can deal the same card twice. Every figure is
   read from `game.abilities` at the moment the panel is drawn, so the record
   can never list a card that has been cast or carried off. */
.profile-magics {
  display: grid;
  gap: 6px;
}

.profile-magic {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgb(18 17 16 / 0.08);
  border-radius: 6px;
  background: var(--card-inset);
}

.profile-magic__mark {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--ability);
  box-shadow: 0 0 0 1px rgb(18 17 16 / 0.2);
}

.profile-magic__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-magic__name {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.profile-magic__line {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.profile-magic__count {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgb(18 17 16 / 0.14);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  white-space: nowrap;
}

.profile-ledger__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgb(18 17 16 / 0.06);
}

.profile-ledger__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.profile-ledger__turn {
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.profile-ledger__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-ledger__money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.profile-ledger__amount {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.profile-ledger__balance {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ========================================================== the announcement

   One layer, the whole middle, one thing at a time. The label is the quiet
   line, the amount or the name is the loud one, and the sub-line says who or
   what. The motif is a soft disc in the acting player's own coin colour - the
   same colour as their chip, their coin and their owner's ring. */

.board__announce {
  grid-area: 1 / 1;
  place-self: stretch;
  position: relative;
  /* THE NOTIFICATION IS BELOW THE THINGS IT MUST NOT COVER.

     The middle of the board holds three things that can be on screen at once:
     a card (z-index 50, a child of the board), a player's record (z-index 20,
     a child of the middle) and the notification (this one).

     The record used to sit BELOW the notification, so a notification that was
     on screen when the record opened was painted over it - the record's sheet
     with a notice on top of it. The layer is now the lowest of the three, so a
     mistake in the telling shows the record on top rather than a notice painted
     over a record somebody is reading.

     The card is above the middle and the middle is not a stacking context, so
     the card still wins against the notification in the board's own order. */
  z-index: 10;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--centre-ground) 92%, var(--motif, var(--ink)));
  text-align: center;
  cursor: pointer;

  /* The layer is over the middle of the board, and a card is in the middle
     too. The layer takes no taps while it is only holding the status, so it
     can never be the thing that swallows a press meant for a card. */
  pointer-events: none;

  /* THE LAYER IS CONTAINED BY THE MIDDLE.

     A notification that runs past the edge of the middle is a notification
     painted over the board's ring - over a square, over a name, over a coin.
     Nothing inside the layer may leave it: the words wrap inside the width
     they are given, and the layer itself clips whatever would rather not. */
  max-width: 100%;
  overflow: hidden;
}

.board__announce--announce {
  pointer-events: auto;
}

.board__announce[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- the status

   The resting line, and the only thing in the middle on the phone that is not
   acting. It is deliberately not the announcement rectangle: a second card in
   the middle would look like something to read or press, and the waiting player
   needs one glance, not one more surface. So it is a small capsule high in the
   centre, above the die, taking no taps.

   "Your Turn" and "Opponent's Turn" are the same object in two temperatures:
   the turn you own is inked and still, the turn you are waiting on is softer
   and carries a slow pulse, so the waiting screen never looks frozen. */

.board__announce--status {
  place-self: start center;
  width: auto;
  max-width: calc(100% - 28px);
  margin-top: calc(var(--cell) * 1.15);
  padding: 0.5em 1em 0.55em;
  gap: 1px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--centre-ground) 90%, var(--motif, var(--ink)));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--motif, var(--ink)) 16%, transparent),
    0 2px 10px rgb(18 17 16 / 0.06);
  cursor: default;
  pointer-events: none;
}

/* The turn mode is the capsule too: the same shape as the status, written as
   its own rule so the group above keeps its own declaration block. */
.board__announce--turn {
  place-self: start center;
  width: auto;
  max-width: calc(100% - 28px);
  margin-top: calc(var(--cell) * 1.15);
  padding: 0.5em 1em 0.55em;
  gap: 1px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--centre-ground) 90%, var(--motif, var(--ink)));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--motif, var(--ink)) 16%, transparent),
    0 2px 10px rgb(18 17 16 / 0.06);
  cursor: default;
  pointer-events: none;
}

.board__announce--status .announce__motif,
.board__announce--turn .announce__motif {
  display: none;
}

.board__announce--status .announce__label,
.board__announce--turn .announce__label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
}

.board__announce--status .announce__big,
.board__announce--turn .announce__big {
  font-size: clamp(13px, calc(var(--cell) * 0.42), 19px);
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.board__announce--status .announce__sub,
.board__announce--turn .announce__sub {
  font-size: 10.5px;
  line-height: 1.3;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

/* THE TWO TEMPERATURES OF THE TURN PILL.
   Yours is green, the opponent's is red - the two colours of go and wait,
   mixed far into the paper so they read as temperature rather than paint. */

.board__announce--turn:not(.board__announce--wait) {
  background: color-mix(in srgb, var(--centre-ground) 76%, #6f9a7b);
  box-shadow:
    0 0 0 1px color-mix(in srgb, #6f9a7b 40%, transparent),
    0 2px 10px rgb(18 17 16 / 0.06);
}

.board__announce--turn:not(.board__announce--wait) .announce__big {
  color: color-mix(in srgb, #3f6a4e 78%, var(--ink));
}

.board__announce--wait {
  background: color-mix(in srgb, var(--centre-ground) 80%, #b04338);
  box-shadow:
    0 0 0 1px color-mix(in srgb, #b04338 34%, transparent),
    0 2px 10px rgb(18 17 16 / 0.06);
}

.board__announce--wait .announce__big {
  color: color-mix(in srgb, #8f332b 82%, var(--ink));
}

/* An event takes taps - it can be skipped. */
.board__announce--event {
  pointer-events: auto;
}

/* Waiting is the quieter temperature, but it must never read as disabled. The
   dot is the only motion on a screen where the other player is deciding; it
   says "still here" about twice a second and nothing else moves. The colour
   comes from the red rule higher up; the weight stays here. */
.board__announce--wait .announce__big {
  font-weight: 400;
}

.board__announce--wait .announce__label::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.55em;
  border-radius: 50%;
  background: var(--motif, var(--ink));
  vertical-align: 0.08em;
  animation: wait-pulse 2400ms ease-in-out infinite;
}

@keyframes wait-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1); }
}

.announce__motif {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58%, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--motif, var(--ink)) 16%, transparent) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.announce__label {
  position: relative;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  /* The line box is as tall as the type needs: a tracked capital at 15px
     asks for about 22px, and a line-height of 1.2 gives it 18 and cuts the
     tops of the letters off. */
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* EPOCH'S NOTICES ARE TITLED.
   The three spell notices already carry a Title Case label - Witchcraft,
   Sorcery, The Curse - and the layer must draw it as written. Every other
   notice keeps the uppercase it has always had. */
.announce__label--title {
  text-transform: none;
}

.announce__big {
  position: relative;
  margin: 0;
  max-width: 100%;
  font-size: 44px;
  font-weight: 300;
  /* THE LINE BOX IS AS TALL AS THE TYPE NEEDS.

     A line-height smaller than the font's own line box clips the ink: the
     ascenders and descenders of a big figure do not fit in the box they are
     given, and the top and the bottom of the figure are cut off. The line box
     is 1.45 of the type here, which is the height the face asks for, so the
     whole figure is inside it - and a word long enough to wrap is two whole
     lines, not one and a half. */
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.announce__sub {
  position: relative;
  margin: 0;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

@media (max-width: 370px) {
  .announce__big {
    font-size: 38px;
  }

  .profile__cash {
    font-size: 32px;
  }
}

/* The gentle refusal. A pill that cannot do what it was pressed for shakes
   once, briefly, and stays exactly where it was. */
.board__shake {
  animation: pill-shake 260ms ease-in-out both;
}

@keyframes pill-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  50%      { transform: translateX(3px); }
  75%      { transform: translateX(-2px); }
}

/* Reduced motion: the information, no travel. */

@media (prefers-reduced-motion: reduce) {
  .board__dice,
  .board__cell[data-landed] {
    transition: none;
  }

  .board__cell.is-just-bought::after,
  .board__cell.is-just-built::before,
  .board__cell.is-just-landed {
    animation: none;
  }

  /* The lap's green is information, not travel: a still glow, no animation. */
  .board__cell.is-redeeming {
    animation: none;
    box-shadow:
      0 0 calc(var(--cell) * 0.45) calc(var(--cell) * 0.08)
        color-mix(in srgb, var(--corner-start) 80%, transparent);
  }

  .nexus-card--granted {
    animation: none;
  }

  .board__announce--wait .announce__label::before {
    animation: none;
    opacity: 0.7;
  }

  .board__lift,
  .board__rupee,
  .board__coin-land,
  .board__soul,
  .board__coin-gold,
  .board__passed {
    animation: none;
  }

  /* THE FIGHT ASKS FOR LESS, AND IT IS GIVEN LESS.
     The blink turns into the glow it rests on - the same tiles, saying the
     same thing without moving - and the war's own pieces are asked for no
     motion at all: the flash that the board-fx plays by hand is not the
     stylesheet's to quiet, and these are. */
  .board__cell.is-fight-blink::before,
  .board__cell.is-loan-target::before {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .board.is-quake,
  .board.is-shield-jolt {
    animation: none;
  }

  .board__war-eye,
  .board__war-flash,
  .board__war-ring,
  .board__war-streak,
  .board__war-vignette {
    animation: none;
  }
}


/* ================================================================ the fight

   The bottom-right corner, from the state.

   THE CARD
   --------
   The Fight is a shared screen drawn into the same holder the cards and the
   chests use, but it is not one card among them: it takes the whole middle,
   from its own edge to the ring, because two players' weapons and their
   live ranges cannot be read off a smaller thing. The halves are
   viewer-relative - the BOTTOM half is always the viewer's own player - and
   each half scrolls inside itself if its cards outgrow it, so the other
   half is never pushed off the screen.

   THE MARKS
   ---------
   What the tiles say while somebody is choosing lives here and nowhere
   else. The glow is a still, soft ring; the blink is the same ring asked
   for again, forever, on a named rhythm (--fight-blink). Both are drawn on
   a ::before, because the owner's own ring will come back to that corner of
   the tile the moment the marks are cleared, and it should not find its
   pseudo overridden by a guest.
   Nothing in either of them shifts the tile's text: transform and opacity,
   an absolute overlay, and nothing measured.
   ================================================================= */

.board__card[data-card-kind="fight"],
.board__card[data-card-kind="hades"] {
  /* THE WHOLE MIDDLE, DECLARED AS A RECTANGLE. The header tiles above and the
     ring around the middle are still the board's; everything between them is
     the Fight - the same eight-by-four rectangle the property decision uses.

     The height has to be WRITTEN here; it cannot be left to the content. The
     halves inside the card are laid out with `flex: 1 1 0` so that they SHARE
     whatever height the field is given, and that is also the height they are
     asked to contribute when the box is content-sized. A container whose height
     comes from zero-based items is a container that measures its own items at
     zero: the browser sizes the card from the field, the field sizes itself
     from the halves, the halves contribute their flex base size - nothing - and
     the weapon grid beneath them comes out zero pixels tall while the heading,
     the foot and the Leave pill keep their intrinsic heights and make the card
     look as though it had drawn. The weapon cards are not "too small to see":
     their box was never given a height to be seen in.

     So the rectangle is stated, the card fills it, the field takes what the
     heading and the foot leave over, the halves split that between them, and
     anything they outgrow scrolls inside the half that outgrew it.

     HADES IS THE SAME RECTANGLE. It is the same screen built from the same
     parts, so it names the same box rather than repeating the arithmetic. */
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
}

/* The card fills that rectangle, and says so in its own right. The property
   decision's rules also match this card - it wears the same `.property-card`
   class, and a holder left carrying `data-mode="decision"` from an earlier
   square would hand it `height: auto` from three selectors up - so the Fight
   names its height here, later and just as specifically, and the halves cannot
   be handed a collapsed box by somebody else's rule. Hades, wearing the same
   classes, is named here too. */
.board__card[data-card-kind="fight"] .fight-card,
.board__card[data-card-kind="hades"] .fight-card {
  height: 100%;
  gap: calc(var(--cell) * 0.12);
}

/* THE ARENA'S CARDS SIT ON ONE BASELINE.

   Every face is the same size and every card carries the same three things -
   the face, the line that says what it reaches, and the action - but only the
   acting player's half is given the action pill, and a range line can be one
   line or two. Left alone, the three cards in a row end at three different
   heights and the row reads as ragged.

   So in THIS arena, and only here: the range line reserves two lines whether it
   needs them or not, the action row reserves the pill's height whether it holds
   a pill or not, and the action row is pinned to the foot of the card. The
   three cards of a row therefore start and finish on the same lines, on both
   halves, and the pill of every card in the row sits on one baseline.

   Scoped to the Hades card, so the Fight's own cards are untouched. */
.hades-card .fight-card__range {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4em;
}

.hades-card .fight-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: max(20px, calc(var(--cell) * 0.26));
}

.fight-card {
  display: flex;
  flex-direction: column;
  gap: calc(var(--cell) * 0.12);
  padding: calc(var(--cell) * 0.16) calc(var(--cell) * 0.2);
  overflow: hidden;
  text-align: center;
}

.fight-card__title {
  flex: 0 0 auto;
  margin: 0;
  font-size: max(15.2px, calc(var(--cell) * 0.2234));
  letter-spacing: 0.02em;
  color: var(--ink);
}

.fight-card__explain {
  flex: 0 0 auto;
  margin: calc(var(--cell) * 0.04) 0 0;
  font-size: max(10.4px, calc(var(--cell) * 0.115));
  line-height: 1.45;
  color: var(--ink-soft, var(--ink));
}

.fight-card__field {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--cell) * 0.1);
  /* The halves meet on a line, not on a gap: this is one field, split. */
  isolation: isolate;
}

.fight-half {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--cell) * 0.07);
  padding: calc(var(--cell) * 0.08) calc(var(--cell) * 0.06);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 4%, var(--cell-ground));
  text-align: left;
  overflow: hidden;
}

/* The half that is being watched and not acted on is a little quieter than
   the viewer's own half - not hidden, just a step back in the ink. */
.fight-half--top {
  color: var(--ink);
  opacity: 0.96;
}

.fight-half__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(var(--cell) * 0.09);
  min-width: 0;
}

.fight-half__disc {
  flex: 0 0 auto;
  width: max(13px, calc(var(--cell) * 0.2));
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coin, var(--ink));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--coin, var(--ink)) 30%, transparent);
}

.fight-half__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fight-half__name {
  font-size: max(11.5px, calc(var(--cell) * 0.145));
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fight-half__civ {
  font-size: max(9px, calc(var(--cell) * 0.1));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 62%, var(--cell-ground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fight-half__weapons {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  display: grid;
  /* THREE TO A ROW, every face the same size. The track is a share of the
     half's own width rather than of the cell, so three faces and their gaps
     always come to exactly one row's worth of half. */
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--cell) * 0.08);
  align-content: start;
  align-items: stretch;
}

.fight-half__weapons::-webkit-scrollbar {
  display: none;
}

.fight-half__empty {
  grid-column: 1 / -1;
  margin: 0;
  font-size: max(10px, calc(var(--cell) * 0.11));
  color: color-mix(in srgb, var(--ink) 55%, var(--cell-ground));
  text-align: center;
  padding: calc(var(--cell) * 0.1) 0;
}

.fight-card__slot {
  display: flex;
  flex-direction: column;
  gap: calc(var(--cell) * 0.05);
  min-width: 0;
}

.fight-card__slot.is-selected .fight-card__face {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--weapon, var(--ink)) 62%, transparent),
    0 0 calc(var(--cell) * 0.18) color-mix(in srgb, var(--weapon, var(--ink)) 26%, transparent);
}

.fight-card__face {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: calc(var(--cell) * 0.04);
  width: 100%;
  aspect-ratio: 1 / 1.18;
  padding: calc(var(--cell) * 0.08) calc(var(--cell) * 0.04);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 8px;
  background: var(--cell-ground);
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
}

.fight-card__face:disabled {
  cursor: default;
}

.fight-card__emblem {
  width: calc(var(--cell) * 0.34);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.fight-card__emblem svg {
  width: 100%;
  height: 100%;
}

.fight-card__weapon-name {
  font-size: max(8.4px, calc(var(--cell) * 0.096));
  line-height: 1.25;
  text-align: center;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fight-card__pillmark {
  width: 55%;
  height: max(3px, calc(var(--cell) * 0.045));
  border-radius: 999px;
  background: var(--weapon, var(--ink));
  opacity: 0.85;
}

.fight-card__range {
  margin: 0;
  /* The live line, centred under the face it belongs to. */
  font-size: max(8.6px, calc(var(--cell) * 0.098));
  text-align: center;
  color: color-mix(in srgb, var(--ink) 68%, var(--cell-ground));
}

/* THE ATTACK PILL. The calm red the Sell token already names: a request,
   not a warning, and it answers only when it is live. */
.fight-card__attack {
  padding: calc(var(--cell) * 0.045) calc(var(--cell) * 0.06);
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sell) 16%, transparent);
  color: var(--sell);
  font-size: max(9px, calc(var(--cell) * 0.105));
  letter-spacing: 0.04em;
  cursor: pointer;
}

.fight-card__attack:not([disabled]) {
  background: var(--sell);
  color: var(--sell-ink);
}

.fight-card__attack[disabled] {
  cursor: default;
  color: color-mix(in srgb, var(--sell) 62%, var(--cell-ground));
}

.fight-card__foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--cell) * 0.1);
}

.fight-card__waiting {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: max(9.6px, calc(var(--cell) * 0.108));
  color: color-mix(in srgb, var(--ink) 58%, var(--cell-ground));
  text-align: center;
}

/* A STRIKE A SHIELD STOPPED says so in the same quiet line, marked with a dot
   in the shield's own colour - the same dot the chips carry, so the two say
   the same thing about the same shield. No new surface and no splash: the
   foot of the card the fight has been in all along, one shade darker so the
   sentence reads as an outcome rather than as the idle line it replaced. */
.fight-card__waiting--blocked {
  color: color-mix(in srgb, var(--ink) 72%, var(--cell-ground));
}

.fight-card__waiting--blocked::before {
  content: "";
  display: inline-block;
  width: max(5px, calc(var(--cell) * 0.06));
  height: max(5px, calc(var(--cell) * 0.06));
  margin-right: 0.5em;
  border-radius: 50%;
  background: var(--shield, var(--ink));
  box-shadow: 0 0 0 1px rgb(18 17 16 / 0.2);
  vertical-align: middle;
}

/* --------------------------------------------------------- the black hole

   THE CINEMATIC, THE PANEL, AND THE MARK.

   The veil takes the whole document to absolute black - board, header, die
   and every control - holds the singularity's line for a beat, and gives
   the interface back. One element, one keyframe sequence: three beats of
   two seconds, written here beside the rest of the board's motion so the
   timing cannot drift from the stylesheet. It sits above everything at a
   z-index the board itself never reaches. */

.hole-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 0;
  /* THE PAPER, RE-DECLARED AT THE VEIL'S OWN SCOPE - the root cause of the
     missing message. `--cell-ground` is defined on .board-screen, and the
     veil lives at the body, outside it: an out-of-scope token invalidates
     at computed-value time and the colour falls back to the INHERITED ink -
     black text on a black screen. The message therefore names the same
     paper here, where the veil can see it. If the board's paper ever
     changes, this line changes with it - it is the one value that cannot
     ride the token down to this element. */
  --veil-paper: #f7f4ef;
}

.hole-veil.is-live {
  animation: hole-veil-fall 5.5s ease-in-out forwards;
}

/* FIVE SECONDS OF BLACK. The veil reaches full black at a quarter of a
   second, holds it for five full seconds, and gives the interface back
   over the last quarter - so the blackout, and everything under it, is
   gone from view for exactly the five seconds the singularity keeps. */
@keyframes hole-veil-fall {
  0% { opacity: 0; }
  4.55% { opacity: 1; }
  95.45% { opacity: 1; }
  100% { opacity: 0; }
}

/* A reader who asked for less motion gets the line, plainly, for the same
   five seconds, and then the board again - no fades. */
.hole-veil--still {
  opacity: 1;
}

.hole-veil__line {
  margin: 0;
  display: grid;
  gap: 0.7em;
  text-align: center;
  /* The paper, from the veil's own scope above - THE ROOT-CAUSE FIX: this
     used to read `var(--cell-ground)`, which is defined on .board-screen
     and therefore unset at the body. An out-of-scope token invalidates at
     computed-value time and the colour fell back to the INHERITED ink, so
     the message printed black on black and vanished while the blackout
     itself worked perfectly. The line is a CHILD of the veil, so it paints
     ON the black - above the overlay by construction. */
  color: var(--veil-paper);
  opacity: 0;
}

.hole-veil.is-live .hole-veil__line {
  animation: hole-veil-line 5.5s ease-in-out forwards;
}

.hole-veil--still .hole-veil__line {
  opacity: 1;
}

/* THE MESSAGE IS THERE FROM THE FIRST FRAME OF THE FADE. The line itself
   is at full opacity immediately; what the viewer sees rise out of nothing
   is the veil's own group opacity carrying it. So the text appears AS the
   fade begins - never a beat after the screen has gone black - it holds
   for all five seconds of the blackout, and it leaves with it. */
@keyframes hole-veil-line {
  0%, 95.45% { opacity: 1; }
  100% { opacity: 0; }
}

.hole-veil__title {
  font-size: max(12px, calc(var(--cell) * 0.2));
  /* A touch heavier than the board's quietest type: white-on-black wants
     the stroke to hold at phone size. */
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-indent: 0.3em;
}

.hole-veil__sub {
  font-size: max(9.6px, calc(var(--cell) * 0.13));
  letter-spacing: 0.14em;
  opacity: 0.66;
}

/* THE PANEL.

   The Black Hole is a CORNER, and its card is built from the corner's own
   design language: the same ivory ground, the same hairline, the same
   mark-then-name hierarchy START, HADES and FIGHT use. What the
   confinement adds is only what it must - one figure, one meter, the two
   presses - so a player who has tapped a corner already knows how to read
   this card, and nothing on it has to be learned twice.

   THE HOLDER IS GIVEN THE WHOLE MIDDLE, the way the Fight and chest cards
   are: the base .board__card is only three cells tall, and a panel clipped
   to that would have its presses cut off. The card fills the rectangle,
   and `display: block` lets its own height do the work - the corner
   holder's rule, for the corner's reason. */

.board__card[data-card-kind="hole"] {
  display: block;
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  max-height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  overflow: hidden;
}

.hole-simple {
  height: 100%;
  padding: calc(var(--cell) * 0.2) calc(var(--cell) * 0.14);
  justify-content: flex-start;
  gap: clamp(4px, calc(var(--cell) * 0.09), 7px);
  text-align: center;
}

/* THE TAPPED CORNER IS A READING CARD, NOT A GAME STAGE. It borrows the
   corner card's centred hierarchy, leaving one soft instruction at the foot. */
.hole-read {
  height: 100%;
  justify-content: center;
  gap: calc(var(--cell) * 0.13);
  text-align: center;
}

.hole-read .corner-card__subtitle {
  text-transform: none;
  letter-spacing: 0.05em;
}

.hole-read__mythology {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  max-width: 34ch;
  margin: 0;
  font-size: clamp(11px, calc(var(--cell) * 0.15), 13px);
  line-height: 1.6;
  color: var(--ink);
  text-align: center;
  text-wrap: pretty;
}

.hole-read__instruction {
  display: flex;
  align-items: center;
  gap: calc(var(--cell) * 0.1);
  align-self: stretch;
  padding: calc(var(--cell) * 0.1) calc(var(--cell) * 0.14);
  border: 1px solid rgb(18 17 16 / 0.1);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 6%, var(--cell-ground));
  margin-top: auto;
}

.hole-read__instruction .corner-card__key-icon {
  width: clamp(12px, calc(var(--cell) * 0.24), 18px);
  height: clamp(12px, calc(var(--cell) * 0.24), 18px);
}

.hole-read__instruction .corner-card__key-copy {
  font-size: clamp(10px, calc(var(--cell) * 0.145), 13px);
  line-height: 1.35;
  text-align: left;
}

.hole-simple .corner-card__subtitle {
  text-transform: none;
  letter-spacing: 0.05em;
}

.hole-simple__explanation {
  width: 100%;
  max-width: none;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: calc(var(--cell) * 0.12);
  margin-top: calc(var(--cell) * 0.045);
  margin-bottom: calc(var(--cell) * 0.04);
}

.hole-simple__explanation-group {
  white-space: pre;
  margin: 0;
  font-size: clamp(8px, calc(var(--cell) * 0.16), 9px);
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
}

.hole-simple__explanation-group--emphasis {
  color: color-mix(in srgb, var(--accent) 78%, var(--ink));
}

.hole-simple__explanation-group--vessel {
  margin-bottom: calc(var(--cell) * 0.04);
}

/* THE FIGURE. It takes the air the card has left, so it sits in the middle
   of the composition rather than hugging the heading: the free space above
   and below it is shared, which is what makes three groups read as a
   centred card on every board size. */
.hole-simple__gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--cell) * 0.065);
  width: 100%;
  margin: calc(var(--cell) * 0.02) 0;
}

.hole-simple__figure {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.1em;
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.hole-simple__value {
  font-size: clamp(23px, calc(var(--cell) * 0.5), 38px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.hole-simple__of {
  font-size: clamp(11px, calc(var(--cell) * 0.16), 14px);
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 55%, var(--cell-ground));
}

.hole-simple__meter {
  width: min(100%, calc(var(--cell) * 2.6));
  height: max(4px, calc(var(--cell) * 0.07));
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, var(--cell-ground));
  overflow: hidden;
}

.hole-simple__meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 240ms ease;
}

/* THE TWO WAYS OUT. The pills share one equal-width row at every viewport;
   shrink their type and padding before allowing any label or price to wrap. */
.hole-simple__actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(6px, calc(var(--cell) * 0.12), 10px);
  width: 100%;
  margin-top: calc(var(--cell) * 0.1);
}

.hole-simple__action {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, calc(var(--cell) * 0.055), 6px);
  min-width: 0;
  width: 0;
  box-sizing: border-box;
  min-height: max(34px, calc(var(--cell) * 0.48));
  margin: 0;
  pointer-events: auto;
  padding: 0.38em clamp(5px, calc(var(--cell) * 0.1), 10px);
  font-size: clamp(7.8px, calc(var(--cell) * 0.15), 9px);
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0.035em;
  white-space: nowrap;
  overflow: hidden;
}

.hole-simple__action--primary {
  font-weight: 500;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.hole-simple__action--vessel {
  justify-content: center;
  gap: clamp(3px, calc(var(--cell) * 0.055), 6px);
}

.hole-simple__action:disabled {
  cursor: default;
  opacity: 0.52;
}

.hole-simple__button-label,
.hole-simple__vessel,
.hole-simple__price {
  min-width: 0;
  flex: 0 1 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.hole-simple__price {
  flex: 0 0 auto;
  font-size: 0.96em;
  letter-spacing: 0;
}

/* THE QUIET LINE: where the vessel goes, said once, beneath the press it
   belongs to. Nothing else is written on the card. */
.hole-simple__note {
  margin: 0;
  padding-top: calc(var(--cell) * 0.015);
  font-size: max(9px, calc(var(--cell) * 0.115));
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink) 52%, var(--cell-ground));
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .hole-simple__meter-fill {
    transition: none;
  }
}

/* ----------------------------------------------------- the protected tile

   A STANDING SHIELD'S OWN MARK: a small glyph in the shield's colour, in
   the tile's free top-right corner (where the build pips used to sit). The
   shield is PERMANENT, so the body of the glyph carries no number - it
   says "protected", not "for N more turns". It changes no
   dimension of the cell - it is absolutely placed over a cell that already
   has room - and it sits above the ownership ring so a protected colony
   reads as protected whoever holds it. Both screens paint it from the same
   state, so it cannot appear on one phone and not the other, and it is
   removed on the same repaint that removes the shield. */
.cell-shield {
  position: absolute;
  top: max(3px, calc(var(--cell) * 0.07));
  right: max(3px, calc(var(--cell) * 0.07));
  z-index: 3;
  display: block;
  line-height: 0;
  width: max(12px, calc(var(--cell) * 0.2));
  height: auto;
  pointer-events: none;
}

.cell-shield__svg {
  display: block;
  width: 100%;
  height: auto;
}

/* One restrained ring at the moment of deployment: a halo that widens and
   fades once, then leaves the glyph standing plain. Re-triggered by class,
   never by repaint. */
.cell-shield.is-new::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  color: var(--ink);
  opacity: 0;
  animation: cell-shield-halo 900ms ease-out 1;
}

@keyframes cell-shield-halo {
  0% {
    opacity: 0.55;
    transform: scale(0.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cell-shield.is-new::after {
    animation: none;
  }
}

/* THE CURSE, ON THE PROPERTY IT DESTROYS.

   THREE PHASES, ONE CONTINUOUS ACT.

   1. CHARGE. The property's own three indicators light one after another - a
      hard orange core, a hot rim and a halo that swells - so the energy is
      visibly gathering rather than the marks simply changing colour. Nothing is
      filled for good: each charge returns to the hollow mark it already is.
   2. BURST. The tile takes the hit: a white-hot core, a shockwave ring, a
      fracture sheet drawn over the tile, and fragments and sparks thrown from
      the centre. The tile shudders and flares with them.
   3. DUST. The fragments fall away, the smoke thins, and the tile is left as it
      was - hollow indicators, no residue, its keeper's ring intact.

   THE CELL IS THE CONTAINER. `.board__cell` is `overflow: hidden` and
   `position: relative`, so every piece here - thrown as far as it likes - is cut
   at the tile's own edge and can never cross onto a neighbour. Nothing is laid
   out inside the tile: every piece is absolutely placed, so the name and the
   pill never move.

   THE BURST NODES ARE TEMPORARY. board-fx appends them with the class and takes
   both away when the act is over; the stylesheet leaves nothing behind. */
.board__cell.is-burning {
  --burn-spark: #ffe6a8;
  --burn-hot: #ff8a1f;
  --burn-flame: #ff5a12;
  --burn-deep: #d62a14;
  --burn-ash: #8c120a;
  --boom: 1350ms;
  animation: cell-curse-impact 620ms cubic-bezier(0.2, 0.7, 0.3, 1) var(--boom) 1 both;
}

/* PHASE 1 - each indicator takes its charge, one after the other. */
.board__cell.is-burning .board__pip {
  position: relative;
  animation: curse-charge 760ms cubic-bezier(0.35, 0, 0.3, 1) backwards;
}

.board__cell.is-burning .board__pip:nth-child(2) {
  animation-delay: 280ms;
}

.board__cell.is-burning .board__pip:nth-child(3) {
  animation-delay: 560ms;
}

/* The halo around each charging indicator: energy leaving the mark. */
.board__cell.is-burning .board__pip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--cell) * 0.3);
  height: calc(var(--cell) * 0.3);
  margin: calc(var(--cell) * -0.15) 0 0 calc(var(--cell) * -0.15);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--burn-hot) 0 18%,
    color-mix(in srgb, var(--burn-flame) 55%, transparent) 42%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  animation: curse-charge-halo 760ms ease-out backwards;
}

.board__cell.is-burning .board__pip:nth-child(2)::after {
  animation-delay: 280ms;
}

.board__cell.is-burning .board__pip:nth-child(3)::after {
  animation-delay: 560ms;
}

/* PHASE 2 AND 3 - the burst, laid over the tile and clipped by it. */
.cell-curse-burst {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.cell-curse-burst__core {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 52%,
    var(--burn-spark) 0 10%,
    var(--burn-hot) 24%,
    var(--burn-flame) 40%,
    color-mix(in srgb, var(--burn-deep) 72%, transparent) 60%,
    transparent 76%
  );
  opacity: 0;
  animation: curse-core 470ms ease-out var(--boom) 1 both;
}

.cell-curse-burst__shock {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--cell) * 0.14);
  height: calc(var(--cell) * 0.14);
  margin: calc(var(--cell) * -0.07) 0 0 calc(var(--cell) * -0.07);
  border: 2px solid var(--burn-hot);
  border-radius: 50%;
  box-shadow:
    0 0 calc(var(--cell) * 0.12) var(--burn-flame),
    inset 0 0 calc(var(--cell) * 0.1) var(--burn-deep);
  opacity: 0;
  animation: curse-shock 640ms cubic-bezier(0.1, 0.7, 0.3, 1) var(--boom) 1 both;
}

.cell-curse-burst__cracks {
  position: absolute;
  inset: 0;
  color: var(--burn-hot);
  opacity: 0;
  animation: curse-cracks 1020ms ease-out var(--boom) 1 both;
}

.cell-curse-burst__cracks svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cell-curse-burst__dust {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 55%,
    color-mix(in srgb, var(--burn-ash) 45%, transparent) 0 32%,
    color-mix(in srgb, var(--burn-deep) 24%, transparent) 56%,
    transparent 74%
  );
  opacity: 0;
  animation: curse-dust 1450ms ease-out calc(var(--boom) + 120ms) 1 both;
}

.cell-curse-burst__shard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(3px, calc(var(--cell) * 0.08));
  height: max(2px, calc(var(--cell) * 0.055));
  background: linear-gradient(140deg, var(--burn-hot), var(--burn-ash));
  clip-path: polygon(0 18%, 100% 0, 72% 100%, 14% 76%);
  box-shadow: 0 0 calc(var(--cell) * 0.05) var(--burn-deep);
  opacity: 0;
  animation: curse-shard 880ms cubic-bezier(0.15, 0.6, 0.3, 1) both;
  animation-delay: calc(var(--boom) + var(--lag, 0ms));
}

.cell-curse-burst__spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(2px, calc(var(--cell) * 0.022));
  height: max(2px, calc(var(--cell) * 0.022));
  border-radius: 50%;
  background: var(--burn-spark);
  box-shadow: 0 0 calc(var(--cell) * 0.045) var(--burn-hot);
  opacity: 0;
  animation: curse-spark 760ms ease-out both;
  animation-delay: calc(var(--boom) + var(--lag, 0ms));
}

/* A colony with nothing built on it is still cursed, and still answers - but
   there is no accumulated development to blow apart, so the burst is held in. */
.board__cell.is-burning.is-burn-quiet .cell-curse-burst__shard {
  display: none;
}

.board__cell.is-burning.is-burn-quiet .cell-curse-burst__core,
.board__cell.is-burning.is-burn-quiet .cell-curse-burst__dust {
  opacity: 0;
  animation: curse-core-quiet 600ms ease-out var(--boom) 1 both;
}

@keyframes curse-charge {
  0% {
    border-color: var(--owner, currentColor);
    box-shadow: none;
    transform: scale(1);
  }
  30% {
    border-color: var(--burn-spark);
    box-shadow:
      0 0 calc(var(--cell) * 0.12) var(--burn-hot),
      inset 0 0 calc(var(--cell) * 0.09) var(--burn-hot);
    transform: scale(1.15);
  }
  52% {
    border-color: var(--burn-spark);
    box-shadow:
      0 0 calc(var(--cell) * 0.26) var(--burn-flame),
      0 0 calc(var(--cell) * 0.36) var(--burn-deep);
    transform: scale(1.55);
  }
  76% {
    border-color: var(--burn-hot);
    box-shadow: 0 0 calc(var(--cell) * 0.18) var(--burn-deep);
    transform: scale(1.3);
  }
  100% {
    border-color: var(--owner, currentColor);
    box-shadow: none;
    transform: scale(1);
  }
}

@keyframes curse-charge-halo {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  38% {
    opacity: 0.9;
    transform: scale(1.1);
  }
  62% {
    opacity: 0.5;
    transform: scale(1.7);
  }
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

@keyframes cell-curse-impact {
  0% {
    transform: none;
    filter: none;
  }
  8% {
    transform: translate(-1px, 1px) scale(1.03);
    filter: brightness(1.7) saturate(1.4);
  }
  18% {
    transform: translate(2px, -1px) scale(1.04);
    filter: brightness(1.45) saturate(1.3);
  }
  34% {
    transform: translate(-1.5px, -1px) scale(1.02);
    filter: brightness(1.1);
  }
  52% {
    transform: translate(1px, 1px) scale(1.01);
    filter: none;
  }
  100% {
    transform: none;
    filter: none;
  }
}

@keyframes curse-core {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  12% {
    opacity: 1;
    transform: scale(0.8);
  }
  52% {
    opacity: 0.92;
    transform: scale(1.12);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes curse-core-quiet {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  35% {
    opacity: 0.4;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

@keyframes curse-shock {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  12% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: scale(5);
  }
}

@keyframes curse-cracks {
  0% {
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  46% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

@keyframes curse-dust {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  20% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes curse-shard {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(1);
  }
  7% {
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--a) + var(--spin)))
      translateY(calc(var(--cell) * var(--d) * -1)) scale(0.35);
  }
}

@keyframes curse-spark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(1);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--a))
      translateY(calc(var(--cell) * var(--d) * -1)) scale(0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board__cell.is-burning,
  .board__cell.is-burning .board__pip,
  .board__cell.is-burning .board__pip::after,
  .cell-curse-burst__core,
  .cell-curse-burst__shock,
  .cell-curse-burst__cracks,
  .cell-curse-burst__dust,
  .cell-curse-burst__shard,
  .cell-curse-burst__spark {
    animation: none;
  }
}

/* THE MARK.

   The confinement between the held seat's turns, when the middle belongs to
   the opponent: a dark dot and the entropy number, in the same eight pixels
   the weapon dots and shield marks already live in. */

.who__hole {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  height: 8px;
}

.who__hole-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 40%, white);
}

.who__hole-entropy {
  align-self: center;
  font-size: max(6.5px, 0.46rem);
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.fight-card__waiting-line {
  margin: 0;
  text-align: center;
  font-size: max(9px, calc(var(--cell) * 0.1));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 55%, var(--cell-ground));
  padding-bottom: calc(var(--cell) * 0.05);
}

/* THE STEP BACK, and the way out. Both are the calm red: Cancelling an
   armed strike and leaving the fight are the same kind of request. */
.fight-card__cancel,
.fight-card__leave {
  flex: 0 0 auto;
  padding: calc(var(--cell) * 0.05) calc(var(--cell) * 0.13);
  border: none;
  border-radius: 999px;
  background: var(--sell);
  color: var(--sell-ink);
  font-size: max(9.6px, calc(var(--cell) * 0.112));
  letter-spacing: 0.03em;
  cursor: pointer;
}

/* ------------------------------------------------------------ the marks

   The tiles the armed strike is looking at. Their own pseudo, not the
   owner ring's: the ring returns to that corner when the marks go. */

.board__cell.is-fight-glow::before {
  content: "";
  position: absolute;
  inset: 3%;
  z-index: 3;
  border-radius: inherit;
  box-shadow:
    0 0 0 2.5px color-mix(in srgb, var(--sell) 62%, transparent),
    inset 0 0 calc(var(--cell) * 0.26) color-mix(in srgb, var(--sell) 30%, transparent);
  pointer-events: none;
}

.board__cell.is-fight-blink::before,
.board__cell.is-loan-target::before {
  content: "";
  position: absolute;
  inset: 3%;
  z-index: 3;
  border-radius: inherit;
  border: 2.5px solid color-mix(in srgb, var(--sell) 96%, transparent);
  box-shadow:
    0 0 calc(var(--cell) * 0.18) color-mix(in srgb, var(--sell) 45%, transparent),
    inset 0 0 calc(var(--cell) * 0.14) color-mix(in srgb, var(--sell) 30%, transparent);
  pointer-events: none;
  animation: fight-blink var(--fight-blink) cubic-bezier(.4, .6, .4, 1) infinite;
}

.board--fight-armed .board__cell.is-fight-blink {
  cursor: pointer;
}

/* The shield's offering reads as pressable the same way - a lit colony is
   one the chest is asking for, while it is asking. */
.board--shield-targeting .board__cell.is-fight-blink {
  cursor: pointer;
}

/* And the underworld's: an armed casting lights the same colonies, and a lit
   one takes the casting when it is tapped. */
.board--hades-armed .board__cell.is-fight-blink {
  cursor: pointer;
}

@keyframes fight-blink {
  0%, 100% { transform: scale(.8); opacity: 0.22; }
  50%      { transform: scale(1);   opacity: 0.95; }
}

/* -------------------------------------------------------------- the war

   Everything the strike looks like, played by board-fx.js from the event.
   Transform and opacity only; nothing measured; nothing moved. */

.board.is-quake {
  animation: board-quake 1400ms cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes board-quake {
  0%   { transform: translate(0, 0); }
  9%   { transform: translate(5px, -4px); }
  18%  { transform: translate(-4px, 4px); }
  30%  { transform: translate(4px, -2px); }
  44%  { transform: translate(-3px, 2px); }
  60%  { transform: translate(2px, 2px); }
  76%  { transform: translate(-1px, -1px); }
  90%  { transform: translate(1px, 0); }
  100% { transform: translate(0, 0); }
}

.board__war-vignette {
  position: absolute;
  inset: calc(var(--hair) * -1);
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at center,
    rgb(18 17 16 / 0) 46%,
    rgb(18 17 16 / 0.42) 100%
  );
}

.board__war-streak {
  position: absolute;
  z-index: 45;
  height: max(6px, calc(var(--cell) * 0.14));
  border-radius: 999px;
  transform-origin: 0 50%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--war, var(--ink)) 55%, var(--dealt-paper)),
    var(--dealt-paper)
  );
  box-shadow: 0 0 calc(var(--cell) * 0.2) color-mix(in srgb, var(--war, var(--ink)) 55%, transparent);
}

.board__war-ring {
  position: absolute;
  z-index: 45;
  width: calc(var(--cell) * 1.5);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  border: 3px solid color-mix(in srgb, var(--war, var(--ink)) 80%, transparent);
  box-shadow: 0 0 calc(var(--cell) * 0.22) color-mix(in srgb, var(--war, var(--ink)) 45%, transparent);
}

/* The flavours. Each is the tile being stained by its own weapon for the
   moment the strike lands - and none of them is a second element on the
   board: they live in the cell and die with it. */

.board__war-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}

.board__war-flash--antimatter {
  background: radial-gradient(
    circle at 50% 50%,
    var(--dealt-paper) 0%,
    var(--fight-violet) 82%
  );
}

.board__war-flash--nuclear {
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in srgb, var(--fight-warm) 30%, var(--dealt-paper)) 0%,
    var(--fight-warm) 84%
  );
}

.board__war-flash--shiva,
.board__war-flash--plain {
  background: radial-gradient(
    circle at 50% 50%,
    var(--dealt-paper) 0%,
    color-mix(in srgb, var(--ink) 22%, var(--dealt-paper)) 82%
  );
}

.board__war-ring--antimatter {
  border-color: color-mix(in srgb, var(--fight-violet) 82%, transparent);
}

.board__war-ring--nuclear {
  border-color: color-mix(in srgb, var(--fight-warm) 82%, transparent);
}

/* THE EYE OF SHIVA. A vertical eye opening on the tile, in gold light: the
   ellipse grows along its height and not its width, and the iris inside it
   opens with it. scaleY only, so nothing around it moves. */

.board__war-eye {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 68%;
  height: 78%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0.08);
  background: radial-gradient(
    ellipse at 50% 50%,
    color-mix(in srgb, var(--fight-gold) 22%, var(--dealt-paper)) 0%,
    color-mix(in srgb, var(--fight-gold) 62%, var(--dealt-paper)) 62%,
    var(--fight-gold) 100%
  );
  box-shadow: 0 0 calc(var(--cell) * 0.24) color-mix(in srgb, var(--fight-gold) 66%, transparent);
  animation: fight-eye 1050ms cubic-bezier(.25, .7, .3, 1) both;
}

.board__war-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  height: 72%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scaleY(0.1);
  background: color-mix(in srgb, var(--board-ground) 86%, transparent);
  animation: fight-eye 1400ms cubic-bezier(.3, .7, .3, 1) both;
  animation-delay: 130ms;
}

@keyframes fight-eye {
  0%   { transform: translate(-50%, -50%) scaleY(0.08); opacity: 0.4; }
  55%  { transform: translate(-50%, -50%) scaleY(1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scaleY(1); opacity: 0.85; }
}

/* ------------------------------------------------------------- the castings

   AN EPOCH CARD, SPENT. Three spells, three signatures, and NONE of them is
   the war. `fightWar` is a blow landing and a colony changing hands; a casting
   moves money or lays a seal and the colony KEEPS its keeper - so no tile is
   stained, none is taken, and no casting borrows the quake.

   Every piece is `pointer-events: none`, every piece is taken down by board-fx
   when its flight is over, and the animation is awaited before the notice that
   follows it - so nothing is left over the board and no sentence is painted
   under a spell still playing. */

/* WITCHCRAFT - dark smoke out of the colony it robs.

   Drawn on the BOARD, not inside the cell: a colony is fifty pixels wide and
   this is the one casting that has to be seen from across the table, and a cell
   clips its own contents. The anchor is the tile's centre, so the cloud comes
   out of the property and spreads over the ground around it. */
.board__smoke {
  position: absolute;
  z-index: 30;
  width: 0;
  height: 0;
  pointer-events: none;
}

.board__smoke-puff {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--cell) * 1.35);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(7px);
  background: radial-gradient(
    circle at 50% 52%,
    color-mix(in srgb, var(--ink) 66%, transparent) 0%,
    color-mix(in srgb, var(--ink) 40%, transparent) 46%,
    transparent 73%
  );
  animation: smoke-puff 1500ms cubic-bezier(.2, .55, .3, 1) both;
}

/* Seven puffs, each a beat after the last and drifting its own way: one column
   would read as a plume, and seven read as smoke. The last one ends with the
   spell's own three seconds. */
.board__smoke-puff:nth-child(1) { --dx: -72%; animation-delay: 0ms; }
.board__smoke-puff:nth-child(2) { --dx: -38%; animation-delay: 210ms; }
.board__smoke-puff:nth-child(3) { --dx: 0%;   animation-delay: 420ms; }
.board__smoke-puff:nth-child(4) { --dx: 40%;  animation-delay: 630ms; }
.board__smoke-puff:nth-child(5) { --dx: 76%;  animation-delay: 840ms; }
.board__smoke-puff:nth-child(6) { --dx: -20%; animation-delay: 1100ms; }
.board__smoke-puff:nth-child(7) { --dx: 24%;  animation-delay: 1400ms; }

@keyframes smoke-puff {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 14%) scale(.45);
  }
  16% {
    opacity: 0.94;
  }
  55% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx, 0%), -118%) scale(2.6);
  }
}

/* SORCERY - a vortex over the colony it draws from.

   A well, three spiral arms, a counter-turning ring and a breathing core, all
   laid INSIDE the tile. The cell clips its own contents and is the containing
   block for them, so the spell cannot spill onto a neighbour and nothing outside
   it moves - no board tilt, no shake.

   THE TURNING IS ONE TRANSFORM. The arms are a static SVG path; the rotation is
   a single keyframe on the wrapper, so a phone composites it rather than
   repainting. Colours follow the spell's own set: the amber of Sorcery's card,
   over a violet well for depth. */
.cell-spiral {
  --spiral-line: #c9a24a;
  --spiral-glow: #ffe9b0;
  --spiral-deep: #7b5cc0;
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--spiral-line);
  pointer-events: none;
  animation: spell-vortex 3000ms cubic-bezier(0.3, 0.1, 0.35, 0.95) both;
}

.cell-spiral__well {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in srgb, var(--spiral-deep) 42%, transparent) 0 26%,
    color-mix(in srgb, var(--spiral-deep) 22%, transparent) 52%,
    transparent 76%
  );
  animation: spell-vortex-well 1200ms ease-in-out infinite;
}

.cell-spiral__arms {
  position: relative;
  width: calc(var(--cell) * 1.02);
  height: calc(var(--cell) * 1.02);
  animation: spell-vortex-turn 3000ms cubic-bezier(0.32, 0.08, 0.3, 0.94) both;
}

.cell-spiral__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cell-spiral__line {
  opacity: 0.95;
}

.cell-spiral__glow {
  opacity: 0.3;
  color: var(--spiral-glow);
}

.cell-spiral__ring {
  position: absolute;
  width: calc(var(--cell) * 0.8);
  height: calc(var(--cell) * 0.8);
  border: 1px dashed color-mix(in srgb, var(--spiral-glow) 62%, transparent);
  border-radius: 50%;
  opacity: 0.55;
  animation: spell-vortex-ring 3000ms linear both;
}

.cell-spiral__core {
  position: absolute;
  width: calc(var(--cell) * 0.24);
  height: calc(var(--cell) * 0.24);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--spiral-glow) 0 22%,
    color-mix(in srgb, var(--spiral-line) 70%, transparent) 46%,
    transparent 72%
  );
  animation: spell-vortex-core 900ms ease-in-out infinite;
}

@keyframes spell-vortex {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  9% {
    opacity: 1;
    transform: scale(1);
  }
  82% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes spell-vortex-turn {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(560deg);
  }
}

@keyframes spell-vortex-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-380deg);
  }
}

@keyframes spell-vortex-core {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes spell-vortex-well {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* THE CURSE - blood across the whole screen, held at half for three seconds and
   then let go. It is the one casting that covers the screen, and it can never
   block a press: the veil takes no pointer events at all, and it sits below the
   ending. */
.board__spell-veil {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in srgb, var(--spell-blood) 50%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .cell-spiral,
  .cell-spiral__arms,
  .cell-spiral__ring,
  .cell-spiral__core,
  .cell-spiral__well,
  .board__smoke-puff {
    animation: none;
  }
}



/* -------------------------------------------------------------- the breach

   A STRIKE THAT MEETS A SHIELD, played by board-fx.js from the
   shieldBlocked event - and deliberately not the war. No blackout, no
   quake, no staining of the colony: the weapon's streak (the war's own
   element, in the weapon's colour) crosses, and then the SHIELD answers in
   its own colour - a shield-shaped flare inside the tile, a ring opening
   over the colony, six shards scattering, and the ground giving once.
   Transform and opacity only; every piece is `pointer-events: none` and
   removes itself after its own flight. The colour arrives as `--shield`
   from the shield's own record, never typed into a rule. */

.board__shield-break {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 30% 30% 46% 46% / 24% 24% 62% 62%;
  border: 2px solid color-mix(in srgb, var(--shield, var(--ink)) 85%, transparent);
  background: color-mix(in srgb, var(--shield, var(--ink)) 30%, transparent);
  box-shadow:
    0 0 calc(var(--cell) * 0.2) color-mix(in srgb, var(--shield, var(--ink)) 70%, transparent),
    inset 0 0 calc(var(--cell) * 0.12) color-mix(in srgb, var(--shield, var(--ink)) 55%, transparent);
  pointer-events: none;
  will-change: transform, opacity;
}

.board__shield-ring {
  position: absolute;
  z-index: 44;
  width: max(26px, calc(var(--cell) * 0.5));
  height: max(26px, calc(var(--cell) * 0.5));
  border-radius: 50%;
  border: 2px solid var(--shield, var(--ink));
  box-shadow: 0 0 calc(var(--cell) * 0.16) color-mix(in srgb, var(--shield, var(--ink)) 55%, transparent);
  pointer-events: none;
  will-change: transform, opacity;
}

.board__shield-shard {
  position: absolute;
  z-index: 44;
  width: max(5px, calc(var(--cell) * 0.1));
  height: max(7px, calc(var(--cell) * 0.14));
  background: color-mix(in srgb, var(--shield, var(--ink)) 64%, var(--cell-ground));
  clip-path: polygon(50% 0%, 100% 62%, 38% 100%, 0% 44%);
  box-shadow: 0 0 6px color-mix(in srgb, var(--shield, var(--ink)) 50%, transparent);
  pointer-events: none;
  will-change: transform, opacity;
}

/* The ground giving once under the breach: a quarter of the war's quake,
   over before the fight card says what stopped the strike. */
.board.is-shield-jolt {
  animation: shield-jolt 460ms cubic-bezier(.36, .07, .19, .97) 1;
}

@keyframes shield-jolt {
  0%   { transform: translate(0, 0); }
  24%  { transform: translate(-2.5px, 1.5px); }
  52%  { transform: translate(2px, -1.5px); }
  78%  { transform: translate(-1px, 0.5px); }
  100% { transform: translate(0, 0); }
}

/* --------------------------------------------------------------- the test panel

   A compact panel that replaces the die when Test mode is active. It lets the
   active player type a step count and move the coin instantly. */

.board__test-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--cell) * 0.1);
  z-index: 25;
  background: var(--centre-ground);
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 12px;
  padding: calc(var(--cell) * 0.2) calc(var(--cell) * 0.25);
}

.board__test-label {
  font-size: max(10px, calc(var(--cell) * 0.12));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
}

.board__test-input {
  width: calc(var(--cell) * 1.2);
  height: calc(var(--cell) * 0.5);
  font-size: max(16px, calc(var(--cell) * 0.22));
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 6px;
  background: var(--cell-ground);
  color: var(--ink);
}

.board__test-input:focus {
  outline: none;
  border-color: var(--ink);
}

.board__test-move,
.board__test-back {
  min-height: calc(var(--cell) * 0.4);
  padding: 0.3em 0.8em;
  font-size: max(11px, calc(var(--cell) * 0.13));
}

/* The disabled state for the Test pill in the footer. */
.btn--disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}


/* ================================================== A CARRIED CARD, LOOKED AT

   The reader's own peek, opened by a tap on a chip dot. The same family shell
   as every other read card - ivory ground, hairline, set-coloured edge - with
   the card's emblem, name, text and its reach. It is the smallest of the
   panels: the emblem, four lines and a list, and it scrolls inside itself on a
   short screen. */

.hand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--cell) * 0.09);
  text-align: center;
  overflow-y: auto;
}

.hand-card__figure {
  width: max(34px, calc(var(--cell) * 0.6));
  height: max(42px, calc(var(--cell) * 0.76));
  margin-top: calc(var(--cell) * 0.1);
  color: var(--hand, var(--ink));
}

.hand-card__figure svg,
.hand-card__figure .chest-card__emblem {
  display: block;
  width: 100%;
  height: auto;
}

.hand-card__name {
  margin: 0;
  font-size: max(15px, calc(var(--cell) * 0.2));
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.hand-card__tagline {
  margin: 0;
  font-size: max(10px, calc(var(--cell) * 0.125));
  font-style: italic;
  color: var(--ink-soft);
}

.hand-card__body {
  margin: 0;
  max-width: 34ch;
  font-size: max(10px, calc(var(--cell) * 0.13));
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hand-card__reach {
  width: 100%;
  margin-top: auto;
  padding-top: calc(var(--cell) * 0.1);
}

.hand-card__reach-label {
  margin: 0 0 calc(var(--cell) * 0.06);
  font-size: max(9px, calc(var(--cell) * 0.1));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 55%, var(--cell-ground));
}

.hand-card__reach-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: max(4px, calc(var(--cell) * 0.05));
}

.hand-card__reach-colony {
  padding: 0.25em 0.6em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hand, var(--ink)) 16%, transparent);
  font-size: max(9px, calc(var(--cell) * 0.1));
  letter-spacing: 0.04em;
  color: var(--ink);
}


/* ================================================== OBLIVION / VICTORY

   The whole viewport, once: a fixed sheet above everything the board owns
   (z over the board, the announcements and the singularity's veil) that
   swallows every pointer event, so nothing beneath it can be pressed. One
   solid token colour per outcome with an inset vignette deepening the
   edges - no gradient, no ornament - and cream type in the established
   caps: OBLIVION over "Your Kaalchakra has ended." in red, VICTORY over
   "You have conquered your enemy." in green.

   IT IS DRAWN INSIDE THE BOARD SCREEN, not on the document body, because
   these tokens live on the screen: an overlay appended outside it inherits
   none of them. The loser's own colonies come apart beneath it - see the
   disintegration that follows. */

.ending {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 8vh 8vw;
  text-align: center;
  color: var(--cell-ground);
  box-shadow: inset 0 0 40vmax rgb(0 0 0 / 0.5);
  animation: ending-in 700ms ease-out both;
}

.ending--lost {
  background: var(--ending-lost);
}

.ending--won {
  background: var(--ending-won);
}

.ending__inner {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 3vmin, 26px);
}

.ending__inner::before,
.ending__inner::after {
  content: "";
  width: clamp(120px, 40vw, 340px);
  height: 1px;
  background: rgb(255 255 255 / 0.55);
}

.ending__title {
  margin: 0;
  font-size: clamp(34px, 10vmin, 72px);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cell-ground);
}

.ending__sub {
  margin: 0;
  font-size: clamp(11px, 3.2vmin, 20px);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cell-ground);
  opacity: 0.9;
}

@keyframes ending-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* A reader who asked for less motion gets the ending, plainly. */
@media (prefers-reduced-motion: reduce) {
  .ending {
    animation: none;
  }
}

/* ------------------------------------------------ the disintegration

   THE LOSER'S EMPIRE COMES APART. Every colony the losing seat held is given a
   slow shatter, staggered outward from the first, and the class is taken off
   again by board.js when the last one has played - so the board is left clean
   and no animation runs forever. Transform, filter and opacity only; the tile's
   own box is untouched, so nothing else on the board moves. */

.board__cell.is-disintegrating {
  animation: cell-shatter 1400ms cubic-bezier(.4, .05, .5, .95) var(--shatter-delay, 0ms) both;
  pointer-events: none;
}

@keyframes cell-shatter {
  0% {
    opacity: 1;
    filter: none;
    transform: none;
  }
  35% {
    opacity: 0.82;
    filter: grayscale(0.4) brightness(1.06);
  }
  100% {
    opacity: 0;
    filter: grayscale(1) brightness(1.4) blur(1.5px);
    transform: translateY(6px) scale(0.9);
  }
}

/* A reader who asked for less motion still sees the board yield, without the
   shatter. */
@media (prefers-reduced-motion: reduce) {
  .board__cell.is-disintegrating {
    animation: none;
    opacity: 0.25;
  }
}

/* ----------------------------------------------- the struck list price

   Shown beside the figure on a property card while the throne asks no
   tribute: the number the gift came off. */
.property-card__price-was {
  margin-left: 0.4em;
  font-size: 0.72em;
  color: var(--ink-soft);
  text-decoration: line-through;
}

/* ==========================================================================
   THE PHONE LAYER

   Everything above is a board drawn inside the four-by-eight hole in the
   middle of the ring: a beautiful miniature on a desktop, and a 49px cell on a
   360px phone. At that size a property card is 190px wide, its type is 8-12px,
   its buttons are 20-32px tall, and the Fight's two halves cannot show a rule
   at a size a person can read. None of that is a colour or a rule problem, so
   none of it is fixed by changing the game - it is fixed by giving a phone a
   different stage.

   Three things happen here, and only for widths up to 480px:

   1. THE BOARD FITS THE GLASS. Its height is the viewport (dvh, not vh, so a
      phone's collapsing address bar cannot crop it), the safe areas are read
      from --safe-top/--safe-bottom with env() as the fallback, and the two
      reserves are the real heights of the header and the footer rather than
      guesses. The cells keep a 44px floor wherever the glass can give it.

   2. THE CARD BECOMES A SHEET. A decision is not a miniature any more: the
      card leaves the hole and covers the screen, on the board's own paper,
      clear of the notch and the home indicator, with 14px type and 44px
      controls. The board is still underneath, so dismissing a read card gives
      it straight back.

   3. THE FIGHT AND THE PROPERTY CARD RE-FLOW. The two halves of the Fight
      become stacked rows, the property card's table is read at 14px with its two
      answers pinned at 44px. The order of information does not change; only
      its size does.
   ========================================================================== */

@media (max-width: 480px) {
  /* ---------------------------------------------------------- the screen */

  .board-screen {
    /* The two reservations, measured from the real chrome: 64px above the
       board (6px stage + 6px body + a 44px roster + an 8px gap) and 56px below
       it (6px body + a 44px footer + 6px stage). The safe insets are added on
       top, because a notch is not part of either. */
    --reserve-top: calc(64px + var(--safe-top, env(safe-area-inset-top)));
    --reserve-bottom: calc(56px + var(--safe-bottom, env(safe-area-inset-bottom)));
    gap: 8px;
  }

  .stage--board {
    height: 100dvh;
    min-height: 100dvh;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: max(6px, var(--safe-top, env(safe-area-inset-top))) 8px
      max(6px, var(--safe-bottom, env(safe-area-inset-bottom)));
  }

  .stage--board .stage__body {
    padding-block: 6px;
    align-content: center;
  }

  .stage--board .stage__foot {
    padding-top: 0;
  }

  .board-foot .btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* ------------------------------------------------------- the two players

     One line of name and turn, one line of money, and a 44px frame around
     both. The civilization goes - it is already carried by the coin and it is
     the first thing that can be spared at 360px (the desktop rule above says
     so too, at 430px). */

  .board-who {
    gap: 6px;
  }

  .who {
    min-height: 44px;
    padding: 3px 8px;
    column-gap: 6px;
    row-gap: 1px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.2;
  }

  .who__name {
    font-size: 14px;
  }

  .who__money {
    margin-top: 1px;
    font-size: 14px;
  }

  .who__rupee {
    font-size: 14px;
  }

  .who__turn {
    padding: 1px 5px;
    font-size: 14px;
    letter-spacing: 0.06em;
  }

  .who__vs {
    padding: 0 2px;
    font-size: 14px;
  }

  .who__civ {
    display: none;
  }

  /* ---------------------------------------------------------------- the die

     A die is the board's primary control; 30px is a decoration. 44px is the
     floor, and the centre has room for it at every size in the range. */

  .board-screen {
    --die-size: max(44px, calc(var(--cell) * 0.62));
  }

  /* WAITING IS SAID ON THE DIE ITSELF.

     The middle already says whose turn it is in words. The die is the one thing
     a thumb reaches for, so it says the same thing in its own language: full
     strength when it is this seat's to throw, half strength while the other
     seat has the turn. Nothing here is the lock - the lock is `data-rollable`
     in board.js - this is only the lock made visible.

     NEVER WHILE A REQUEST IS IN FLIGHT. The lock is taken the instant a die is
     pressed and released when the answer comes back, so a die that dimmed with
     the lock faded exactly as it was tapped, under the player's own thumb, and
     stayed faded through the whole throw. That was the bug: on this breakpoint
     the die greyed out the moment it was touched and did not come back until
     the turn was over. A request in flight is the moment the die matters most,
     so it is full strength for it, and for the tumble and the walk that
     follow. Only an idle die that is not this seat's to throw is quiet. */
  .board[data-rollable="false"]:not([data-busy="true"]) .board__dice {
    opacity: 0.55;
  }

  .board[data-throwing="true"] .board__dice,
  .board .board__dice[data-rolling="true"] {
    opacity: 1;
  }

  .board[data-busy="true"] {
    cursor: progress;
  }

  .board__mark--corner {
    width: clamp(13px, calc(var(--cell) * 0.36), 18px);
    height: clamp(13px, calc(var(--cell) * 0.36), 18px);
  }

  .board__corner-name {
    font-size: clamp(8px, calc(var(--cell) * 0.22), 11px);
  }

  /* --------------------------------------------------- the waiting message */

  .board__announce--status .announce__sub,
  .board__announce--turn .announce__sub,
  .announce__sub {
    font-size: 14px;
  }

  /* A card that could not be drawn says so, rather than leaving a blank
     middle. It carries the one thing that can fix it. */
  .draw-failure {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    min-height: 60vh;
    padding: 24px 8px;
    text-align: center;
  }

  .draw-failure__title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--ink);
  }

  .draw-failure__note {
    margin: 0;
    max-width: 30ch;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-soft);
  }

  .draw-failure__retry {
    min-height: 44px;
    min-width: 132px;
    padding: 0 18px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: var(--ink);
    font: inherit;
    font-size: 15px;
    color: var(--cell-ground);
    cursor: pointer;
  }
}

/* ==========================================================================
   THE WRATH OF NEXUS

   A seizure is one of Samrajya's own major moments, so it is told in Samrajya's
   own language. The board goes quiet behind a veil of ink; an ivory card - the
   same paper, hairline and radius the other cards use - comes up holding the
   keeper's throne picture and his verdict. The headline borrows the ending's
   tracked capitals, the pill is the board's own CTA, and the entrance is the
   game's existing `ending-in` and `nexus-grant-in` rather than a second
   animation vocabulary.

   The overlay lives at the body, outside .board-screen's token scope, so the
   few tokens it needs are named here with exactly the values they have there -
   the same fix the singularity's veil already uses. The approved composition
   and every word of the verdict are unchanged.
   ========================================================================== */

.nexus-judgement {
  /* The house palette, re-declared at the body for scope, not invented here. */
  --paper: #f7f4ef;
  --ink: #121110;
  --ink-soft: #6c6862;
  --gold-ink: #7a4f0e;
  --loss: #7a1216;

  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  /* The phone is the base case: safe areas first, and a short screen scrolls
     the card rather than clipping its Continue. */
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  font-family: "Jost", ui-sans-serif, system-ui, sans-serif;
  /* The board's own fade for a fact that has arrived. */
  animation: ending-in 700ms ease-out both;
}

.nexus-judgement.is-leaving {
  animation: none;
  opacity: 0;
  transition: opacity 240ms ease-in;
}

.nexus-judgement__panel {
  width: min(100%, 560px);
  margin: auto;
  padding: 18px 18px 20px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 10px;
  background: var(--paper);
  text-align: center;
  /* The Nexus card's own entrance, a touch slower for the weight of this one. */
  animation: nexus-grant-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) 120ms both;
}

.nexus-judgement__figure {
  display: flex;
  justify-content: center;
}

.nexus-judgement__god {
  display: block;
  width: auto;
  max-width: 132px;
  max-height: 22vh;
  object-fit: contain;
  animation: nexus-grant-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) 200ms both;
}

.nexus-judgement--silhouette .nexus-judgement__god {
  visibility: hidden;
}

.nexus-judgement--silhouette .nexus-judgement__figure::after {
  content: "\039D";
  font-size: 64px;
  color: var(--gold-ink);
}

.nexus-judgement__eyebrow,
.nexus-judgement__title,
.nexus-judgement__line,
.nexus-judgement__seized-title,
.nexus-judgement__item,
.nexus-judgement__continue {
  animation: nexus-grant-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.nexus-judgement__eyebrow {
  margin: 2px 0 6px;
  font-size: clamp(9px, 2.4vw, 11px);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-ink);
  animation-delay: 260ms;
}

.nexus-judgement__title {
  margin: 0;
  font-size: clamp(24px, 6.4vw, 38px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  animation-delay: 320ms;
}

.nexus-judgement__rule {
  width: 40%;
  height: 1px;
  margin: 10px auto;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
}

.nexus-judgement__line {
  margin: 0 0 8px;
  font-size: clamp(12px, 3.3vw, 15px);
  line-height: 1.5;
  color: var(--ink);
  animation-delay: var(--judgement-stagger, 400ms);
}

/* The one line the lost trust turns red - the ending's own oblivion red. */
.nexus-judgement__line--breach {
  font-weight: 500;
  color: var(--loss);
}

.nexus-judgement__seized {
  margin: 12px 0 0;
  text-align: left;
}

.nexus-judgement__seized-title {
  margin: 0 0 4px;
  font-size: clamp(9px, 2.4vw, 11px);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation-delay: 620ms;
}

.nexus-judgement__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nexus-judgement__item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45em;
  padding: 3px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  font-size: clamp(11px, 3.1vw, 14px);
  animation-duration: 360ms;
  animation-delay: var(--judgement-stagger, 400ms);
}

.nexus-judgement__item-glyph {
  color: var(--gold-ink);
}

.nexus-judgement__item-name {
  font-weight: 500;
  color: var(--ink);
}

.nexus-judgement__item-note {
  font-size: 0.82em;
  color: var(--ink-soft);
}

/* The board's own filled pill, in its decisive size. */
.nexus-judgement__continue {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 14px 0 0;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  font: inherit;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* The global :focus-visible ring is currentColor (cream here); keep it ink
     so it reads on the ivory card, as every other control's does. */
  outline-color: var(--ink);
  animation-delay: 700ms;
  transition: filter 140ms ease-out;
}

.nexus-judgement__continue:hover {
  filter: brightness(1.35);
}

.nexus-judgement__continue:active {
  filter: brightness(0.85);
}

.nexus-judgement__continue:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* A reader who asked for less motion gets the whole judgement at once, with
   no fades or rises - the same courtesy the rest of the board gives. */
@media (prefers-reduced-motion: reduce) {
  .nexus-judgement,
  .nexus-judgement__panel,
  .nexus-judgement__god,
  .nexus-judgement__eyebrow,
  .nexus-judgement__title,
  .nexus-judgement__line,
  .nexus-judgement__seized-title,
  .nexus-judgement__item,
  .nexus-judgement__continue {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .nexus-judgement.is-leaving {
    opacity: 0 !important;
  }
}

/* Desktop only widens the same card; the stacked phone layout above is the
   design, not a squeezed version of this one. */
@media (min-width: 620px) {
  .nexus-judgement__panel {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
    width: min(100%, 720px);
    padding: 24px 28px;
    text-align: left;
  }

  .nexus-judgement__god {
    max-width: 220px;
    max-height: 44vh;
  }

  .nexus-judgement__rule {
    margin-left: 0;
  }
}

/* ------------------------------------------------- the loan observer card

   The watching seat's read-only view. It reuses the Nexus loan card's identity
   and ledger rows; only these three lines are new. */

.nexus-card--observer .nexus-card__eyebrow {
  margin: 0 0 0.5em;
  font-size: max(9px, calc(var(--cell) * 0.1));
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nexus-card--observer .nexus-card__observer-line {
  margin: 0 0 0.9em;
  font-size: max(11px, calc(var(--cell) * 0.118));
  line-height: 1.5;
  color: var(--ink);
}

.nexus-card--observer .nexus-card__observer-note {
  margin: 0.9em 0 0;
  font-size: max(9px, calc(var(--cell) * 0.1));
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------------------------------------------- the completed colour set

   A colour group closes and the middle of the board becomes one more card in
   the property family: TEMPORAL BREACH DETECTED, a line of prose, the god
   standing small inside the card's own middle, the Kaal copy, and a COLLECT
   pill. He takes a slow draw on the cigar in his raised hand; the smoke that
   leaves the tip is the only movement. The squares of the set take their own
   colour, the composition is held long enough to be read, and it fades back
   to the game.

   NOTHING HERE IS LIGHTNING. The smoke is a soft warm grey, seeded per set
   and per seat in nexus-awakening.js, and the squares glow in their own land
   colour - never the soul blue, which belongs to transfers alone.

   THE SHELL. .board__awak-card is the absolutely positioned wrapper that
   copies the board's 4x8 centre panel - the same footprint as a property card
   - and carries the fade. It is a size container, so the corner family's cqw
   metrics inside it measure this panel and not the board. The article inside
   is .property-card.property-card--corner-family: every type size, gap,
   border and the pill come from that family, and nothing is restated here.

   THE BLEND. The artwork is blended with `multiply` on its wrapper, which
   turns its white ground into the card's ivory; a transform or an opacity on
   that wrapper would isolate the blend and put the white rectangle back.
   Everything that moves moves on the image inside it.

   TIMING. The delays live in nexus-awakening.js; the durations here have to
   agree with them: 320ms panel, 620ms rise at 60, 560ms smoke, headline at
   320, lede at 620, rule at 820, copy at 920, COLLECT at 1080, squares at
   980, 680ms fade. Nothing ends the card but the press on COLLECT.
   ========================================================================== */

.board-screen {
  --awak-fade: 680ms;
  --awak-smoke: #8d867c;
  --awak-ink: #121110;
  --awak-ink-soft: #6c6862;
}

.board__awakening {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Only the card shell sits on the stage; the card, the smoke and the pill are
   inside it and inherit the rest. */
.board__awakening > * {
  position: absolute;
  pointer-events: none;
}

/* The die is the one thing in the middle that competed with the card. It
   steps aside for the ceremony and returns with the board afterwards. The
   transition is declared unconditionally, so it is there on the way back too. */
.board .board__dice {
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    filter 160ms ease;
}

.board.is-awakening .board__dice {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  pointer-events: none;
}

/* THE SHELL. The 4x8 centre panel, exactly as .board__card measures it, and a
   size container so the family's cqw metrics scale with the panel. */
.board__awak-card {
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  z-index: 50;
  container-type: inline-size;
  opacity: 0;
  animation: board-awak-card-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* The family shell is the card; the base floating-card hints must not fight
   it. */
.board__awak-panel {
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}

/* THE TOP GROUP: the family heading and one line of prose. */
.board__awak-top,
.board__awak-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.board__awak-head {
  opacity: 0;
  animation: board-awak-word-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.board__awak-sub {
  display: block;
  width: 100%;
  margin: 0 0 4.660622cqw;
  font-family: "Jost", ui-sans-serif, system-ui, sans-serif;
  font-size: 3.283620cqw;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--awak-ink-soft);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0;
  animation: board-awak-word-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* THE MIDDLE. The only flexible piece on the card: it takes the slack, so the
   god always has room, and it clips the smoke to the paper. */
.board__awak-mid {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* The wrapper only places the picture and carries the blend; the image inside
   carries the rise, where its opacity cannot isolate the group. */
.board__awak-god {
  position: absolute;
  z-index: 1;
  mix-blend-mode: multiply;
}

.board__awak-god-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 90%;
  opacity: 0;
  animation: board-awak-god-in 620ms cubic-bezier(0.22, 0.9, 0.28, 1) both;
}

/* THE SMOKE. One layer over the card's middle, in front of him and behind the
   copy. It fades in as he settles and goes out with the composition; the
   plumes inside are already running when the layer appears. */
.board__awak-smoke {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  animation: board-awak-smoke-in 520ms ease-out both;
}

/* A plume is placed by its centre on the cigar tip, grows as it climbs, and
   drifts off his face to the right. Size, travel and life all come from the
   seeded stream, so the same set draws the same smoke on both screens. */
.board__awak-plume {
  position: absolute;
  width: var(--smoke-size);
  height: var(--smoke-size);
  margin-left: calc(var(--smoke-size) * -0.5);
  margin-top: calc(var(--smoke-size) * -0.5);
  border-radius: 50%;
  filter: blur(calc(var(--smoke-size) * 0.16));
  background: radial-gradient(
    circle at 50% 58%,
    color-mix(in srgb, var(--awak-smoke) 52%, transparent),
    color-mix(in srgb, var(--awak-smoke) 30%, transparent) 46%,
    transparent 72%
  );
  opacity: 0;
  will-change: transform, opacity;
  animation: board-awak-plume var(--smoke-duration) linear infinite both;
  animation-delay: var(--smoke-delay);
}

/* THE COPY. The family's divider and description do the styling; only their
   entrances live here. */
.board__awak-divider,
.board__awak-body,
.board__awak-collect {
  opacity: 0;
  animation: board-awak-word-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.board__awak-panel .board__awak-collect {
  pointer-events: auto;
}

.property-card--corner-family :is(.board__awak-collect, .doomsday__cta):disabled {
  border-color: color-mix(in srgb, var(--ink) 25%, var(--card-inset));
  background: color-mix(in srgb, var(--ink) 9%, var(--card-inset));
  color: var(--ink-soft);
}

/* THE SQUARES. Each cell clips anything painted outside its edge, so the glow
   is inset and the set's own land colour - the wash the cell already carries -
   is the only colour it uses. */
.board__cell.is-awakened {
  z-index: 4;
  --awak-set: var(--land, var(--wash, #121110));
  --awak-cell-clear:
    inset 0 0 0 0 color-mix(in srgb, var(--awak-set) 0%, transparent),
    inset 0 0 0 0 color-mix(in srgb, var(--awak-set) 0%, transparent);
  --awak-cell-held:
    inset 0 0 calc(var(--cell) * 0.34) calc(var(--cell) * 0.05)
      color-mix(in srgb, var(--awak-set) 50%, transparent),
    inset 0 0 calc(var(--cell) * 0.95) calc(var(--cell) * 0.08)
      color-mix(in srgb, var(--awak-set) 22%, transparent);
  animation: board-awak-cell-in 900ms ease-out both;
}

.board__cell.is-awakened.is-fading {
  animation: board-awak-cell-out var(--awak-fade) ease-in both;
}

/* THE EXIT. Each piece still has its own entrance animation, so the exit has
   to replace it by name rather than fade the stage: an opacity on the stage
   would only show the card's own paper changing, not the composition. */
.board__awakening.is-leaving .board__awak-card {
  animation: board-awak-card-out var(--awak-fade) ease-in both;
}

.board__awakening.is-leaving .board__awak-god-img {
  animation: board-awak-god-out var(--awak-fade) ease-in both;
}

.board__awakening.is-leaving .board__awak-smoke {
  animation: board-awak-smoke-out var(--awak-fade) ease-in both;
}

.board__awakening.is-leaving .board__awak-head,
.board__awakening.is-leaving .board__awak-sub,
.board__awakening.is-leaving .board__awak-divider,
.board__awakening.is-leaving .board__awak-body,
.board__awakening.is-leaving .board__awak-collect {
  animation: board-awak-word-out calc(var(--awak-fade) * 0.8) ease-in both;
}

@keyframes board-awak-card-in {
  0% {
    opacity: 0;
    transform: translateY(2%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes board-awak-card-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-1.5%);
  }
}

@keyframes board-awak-god-in {
  0% {
    opacity: 0;
    transform: translateY(16%) scale(0.9);
  }
  42% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes board-awak-god-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(6%) scale(0.96);
  }
}

@keyframes board-awak-smoke-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes board-awak-smoke-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes board-awak-word-in {
  0% {
    opacity: 0;
    transform: translateY(0.4em);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes board-awak-word-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-0.3em);
  }
}

@keyframes board-awak-plume {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.42);
  }
  16% {
    opacity: var(--smoke-peak);
  }
  50% {
    opacity: calc(var(--smoke-peak) * 0.72);
    transform: translate3d(
        calc(var(--smoke-drift) * 0.45 + var(--smoke-sway)),
        calc(var(--smoke-rise) * -0.52),
        0
      )
      scale(calc(var(--smoke-grow) * 0.62));
  }
  82% {
    opacity: calc(var(--smoke-peak) * 0.3);
    transform: translate3d(
        calc(var(--smoke-drift) * 0.82 - var(--smoke-sway) * 0.4),
        calc(var(--smoke-rise) * -0.84),
        0
      )
      scale(calc(var(--smoke-grow) * 0.88));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--smoke-drift), calc(var(--smoke-rise) * -1), 0)
      scale(var(--smoke-grow));
  }
}

@keyframes board-awak-cell-in {
  from {
    box-shadow: var(--awak-cell-clear);
  }
  55%,
  to {
    box-shadow: var(--awak-cell-held);
  }
}

@keyframes board-awak-cell-out {
  from {
    box-shadow: var(--awak-cell-held);
  }
  to {
    box-shadow: var(--awak-cell-clear);
  }
}

/* REDUCED MOTION. The information stays, the movement goes: the card, the god,
   the words and the pill fade, the squares take their glow without travelling,
   and no smoke is drawn at all. */
@media (prefers-reduced-motion: reduce) {
  .board-screen {
    --awak-fade: 300ms;
  }

  .board__awak-smoke {
    display: none;
  }

  .board__awak-card,
  .board__awak-god-img,
  .board__awak-head,
  .board__awak-sub,
  .board__awak-divider,
  .board__awak-body,
  .board__awak-collect {
    animation: board-awak-still-in 420ms ease-out both;
  }

  .board__awakening.is-leaving .board__awak-card,
  .board__awakening.is-leaving .board__awak-god-img,
  .board__awakening.is-leaving .board__awak-head,
  .board__awakening.is-leaving .board__awak-sub,
  .board__awakening.is-leaving .board__awak-divider,
  .board__awakening.is-leaving .board__awak-body,
  .board__awakening.is-leaving .board__awak-collect {
    animation: board-awak-still-out var(--awak-fade) ease-in both;
  }

  .board__cell.is-awakened {
    animation: board-awak-cell-still 420ms ease-out both;
  }

  .board__cell.is-awakened.is-fading {
    animation: board-awak-cell-out var(--awak-fade) ease-in both;
  }
}

@keyframes board-awak-still-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes board-awak-still-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes board-awak-cell-still {
  from {
    box-shadow: var(--awak-cell-clear);
  }
  to {
    box-shadow: var(--awak-cell-held);
  }
}

/* ============================================================ the doomsday clock

   THE START LANDING CARD.

   It wears the corner family's own article - the same paper, border, close,
   heading, rule, description and pill as the property and chest cards - and
   keeps the same three-part rhythm those cards use: identity at the top, the
   object itself in the middle, the reading and its press at the foot.

   The middle is the only piece that takes the card's slack, so the clock has
   room on every phone and the copy below it never moves to make that room.
   Every size is a cqw of the 4x8 centre panel, exactly like the family it
   belongs to. ========================================================================== */

.board__doomsday {
  position: absolute;
  inset: 0;
  z-index: 45;
  overflow: hidden;
  pointer-events: auto;
}

.board__doomsday-card {
  position: absolute;
  left: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  top: calc(var(--cell) + var(--hair) * 2 + var(--card-gap));
  width: calc(var(--cell) * 4 + var(--hair) * 3 - var(--card-gap) * 2);
  height: calc(var(--cell) * 8 + var(--hair) * 8 - var(--card-gap) * 2);
  z-index: 50;
  container-type: inline-size;
  animation: board-doomsday-panel-in 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.board__doomsday.is-leaving .board__doomsday-card {
  animation: board-doomsday-panel-out 300ms ease-in both;
}

/* The die is the one thing in the middle that competed with the card. */
.board.is-doomsday .board__dice {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  pointer-events: none;
}

.board__doomsday .doomsday-card {
  width: 100%;
  height: 100%;
  --doomsday-alert: var(--sell);
}

.doomsday__top,
.doomsday__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* The header follows the property card's own rhythm: icon, heading, tagline,
   each with the family's existing gaps. The mark keeps the icon's 12.71 x
   8.47 box and its 5.08 margin, so the first line of type begins exactly where
   a property card's does. */
.doomsday__heading {
  margin-bottom: 0.847386cqw;
}

.doomsday__sub {
  display: block;
  width: 100%;
  margin: 0 0 1.694773cqw;
  font-family: "Jost", ui-sans-serif, system-ui, sans-serif;
  font-size: 3.05cqw;
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* THE MIDDLE. The clock takes the slack; the reading sits directly below it
   and both stay inside the card. */
.doomsday__mid {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.doomsday__face-wrap {
  width: 88cqw;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.doomsday__clock {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The wedge. Its long edge is the rim, and the rim is the only line that is
   allowed to be heavy. */
.doomsday__face {
  fill: color-mix(in srgb, var(--accent) 8%, var(--cell-ground));
}

.doomsday__rim {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 72%, transparent);
  stroke-width: 1.1;
  stroke-linejoin: round;
}

/* The last three minutes, marked in the one alarm colour the board uses. */
.doomsday__final {
  fill: none;
  stroke: var(--doomsday-alert);
  stroke-width: 2.8;
  stroke-linecap: round;
}

.doomsday__tick {
  stroke: color-mix(in srgb, var(--ink) 55%, transparent);
  stroke-width: 0.7;
  stroke-linecap: round;
}

.doomsday__tick.is-major {
  stroke: color-mix(in srgb, var(--ink) 82%, transparent);
  stroke-width: 1.15;
}

.doomsday__hand line {
  stroke: var(--ink);
  stroke-linecap: round;
}

.doomsday__hand--hour line { stroke-width: 4.2; }
.doomsday__hand--minute line { stroke-width: 2.6; }

.doomsday__pivot { fill: var(--ink); }

.doomsday__pivot-inner { fill: var(--cell-ground); }

.doomsday__midnight {
  fill: var(--doomsday-alert);
  transform-box: fill-box;
  transform-origin: center;
  animation: board-doomsday-midnight 2.8s ease-in-out infinite;
}

.doomsday__readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.635539cqw;
  margin-top: 3.178446cqw;
}

.doomsday__time {
  margin: 0;
  font-family: "Jost", ui-sans-serif, system-ui, sans-serif;
  font-size: 6.2cqw;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.doomsday__remaining {
  margin: 0;
  font-size: 2.9cqw;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--doomsday-alert);
  text-align: center;
  white-space: nowrap;
}

.doomsday__foot .corner-card__divider {
  margin-bottom: 2.330311cqw;
}

.doomsday__body {
  margin-bottom: 3.178446cqw;
  font-size: 3.2cqw;
  line-height: 1.5;
}

/* ACCELERATE keeps the family pill's exact size, shape and placement; only its
   fill changes, from the card's accent to the board's ink. */
.property-card--corner-family .doomsday__cta {
  min-width: 32cqw;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cell-ground);
}

@keyframes board-doomsday-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes board-doomsday-panel-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(4px) scale(0.99);
  }
}

@keyframes board-doomsday-midnight {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .board__doomsday-card {
    animation: none;
  }

  .board__doomsday.is-leaving .board__doomsday-card {
    animation: none;
  }

  .doomsday__midnight {
    animation: none;
  }
}
