/* Mahj Practice. Tokens and reasons in DESIGN.md.
   The look is the real table: bright tiles on a clear rack on a felt mat. Made for readers around 60: big type, high contrast, big buttons.
   Three layouts on purpose: phone, iPad portrait, iPad landscape (propped on the table). */
:root {
  --paper: #e7efe9;      /* pale jade, taken from the felt */
  --card: #fcfdfb;       /* near white, like the tiles of the home set (no cream) */
  --edge: #dde5de;       /* the quiet edge of a panel that is not a control (about 1.25:1 on the card) */
  --ink: #17202e;
  --soft: #445061;
  --felt: #1c5f49;       /* the mat: brand + primary buttons */
  --felt-deep: #123f31;
  --line: #c5d3c9;
  --good-bg: #e2f1e8;
  --warn-bg: #fdefd2;
  --gold: #f2b531;       /* "this one": the chosen tile, the focus ring */
  --a: #1d4e89; --b: #b3261e; --c: #1f7a4d;   /* three suit colours on OUR practice card */
  --r: 16px;
  --tap: 60px;
  --tw: 54px;            /* the LARGEST a tile gets in a rack; a row of tiles shrinks together to fit the screen */
  --mat-a: #2a8163; --mat-b: #1c5f49; --mat-c: #123f31; --mat-ink: rgba(255, 255, 255, .9);   /* the mat: green felt by default */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 125%; -webkit-text-size-adjust: 100%; }       /* 1rem = 20px by default; follows the reader's own text size */
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); min-height: 100dvh; display: flex; flex-direction: column; }
h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; text-wrap: balance; }
h1 { font-size: 1.95rem; } h2, h1.title { font-size: 1.45rem; }
p { margin: 0 0 .9rem; text-wrap: pretty; }
a { color: var(--felt-deep); }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.tile-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.soft { color: var(--soft); }

/* ---------- top bar ---------- */
.bar { background: var(--felt); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; padding: .5rem .75rem; position: sticky; top: 0; z-index: 5; }
.bar a.brand { color: #fff; text-decoration: none; font: 700 1.15rem var(--serif); margin-right: auto; display: flex; align-items: center; gap: .5rem; padding: .35rem .25rem; min-width: 0; }
.bar .brand svg { width: 26px; height: auto; display: block; }
.bar button { min-height: 48px; padding: 0 .9rem; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .7); background: transparent; color: #fff; font: 600 .95rem var(--sans); cursor: pointer; }
.bar button:hover { background: rgba(255, 255, 255, .14); }
.bar button:active { background: rgba(255, 255, 255, .28); }
.bar #lang { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 479px) { .bar #back:not([hidden]) + .brand span { display: none; } }      /* on a phone the Back button takes the name's place */

main { width: 100%; max-width: 46rem; margin: 0 auto; padding: 1.1rem 1rem 2rem; flex: 1; overflow-wrap: break-word; }
main * { min-width: 0; }
.step { color: var(--soft); font-size: .9rem; font-weight: 600; margin-bottom: .35rem; display: flex; align-items: center; gap: .6rem; }
.lead { font-size: 1.1rem; }
.clock { margin-left: auto; background: var(--ink); color: #fff; border-radius: 99px; padding: .1rem .7rem; font-variant-numeric: tabular-nums; }

/* ---------- buttons: big, one main action, a clear pressed state ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: var(--tap); padding: .6rem 1.1rem; border-radius: var(--r); border: 2px solid var(--felt); background: var(--felt); color: #fff; font: 700 1.1rem var(--sans); cursor: pointer; text-decoration: none; text-align: center; box-shadow: 0 4px 0 var(--felt-deep); transition: transform .08s ease, box-shadow .08s ease, background .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: #18523f; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--felt-deep); background: var(--felt-deep); }
.btn.ghost { background: var(--card); color: var(--felt-deep); box-shadow: 0 4px 0 var(--line); border-color: var(--felt); }
.btn.ghost:hover { background: #f1f7f2; }
.btn.ghost:active { background: #dfeee4; box-shadow: 0 0 0 var(--line); }
.btn[disabled] { opacity: .5; cursor: default; box-shadow: none; transform: none; }
.btn.right[disabled] { opacity: 1; }
.btn.wrong[disabled] { opacity: 1; border-color: #e2b25c; background: var(--warn-bg); color: #5c3200; }
.row { display: grid; gap: .9rem; margin-top: 1rem; }
.row.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
.choices { display: grid; gap: .9rem; }

/* ---------- home ---------- */
.home h1 { font-size: 2.25rem; letter-spacing: -.01em; margin-top: .4rem; }
.doors { display: grid; gap: 1rem; margin: 1.3rem 0; }
.door { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem 1rem; align-items: center; width: 100%; text-align: left; padding: 1rem 1.1rem; border-radius: 20px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 var(--line); transition: transform .08s ease, box-shadow .08s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.door:hover { border-color: var(--felt); }
.door:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.door .pic { grid-row: span 2; display: flex; }
.door .pic .tile { width: 46px; margin-right: -14px; transform: rotate(calc((var(--k) - 1) * 4deg)); }
.door .pic .tile:last-child { margin-right: 0; }
.door b { font: 700 1.3rem var(--serif); overflow-wrap: normal; word-break: normal; }
.door .sub { color: var(--soft); font-size: .95rem; }
.door.main { background: var(--felt); border-color: var(--felt); color: #fff; box-shadow: 0 4px 0 var(--felt-deep); }
.door.main:active { box-shadow: 0 0 0 var(--felt-deep); }
.door.main .sub { color: #dcebe4; }
.links { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; margin-top: 1.2rem; }
.links a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }

/* ---------- lists (the path, today) ---------- */
.panel { background: var(--card); border: 2px solid var(--edge); border-radius: 20px; padding: 1rem; margin: 0 0 1rem; }
.list { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .6rem; }
.list a { display: flex; align-items: center; gap: .8rem; min-height: var(--tap); padding: .6rem .9rem; border-radius: var(--r); border: 2px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.list a:hover { border-color: var(--felt); }
.list a:active { background: #eef5ef; }
.list a .mark { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--soft); font-size: .9rem; }
.list a.done .mark { background: var(--felt); border-color: var(--felt); color: #fff; }
.list a.next { border-color: var(--felt); box-shadow: 0 0 0 3px #cfe4d9; }
.list a small { display: block; color: var(--soft); font-weight: 400; }
.list a .go { margin-left: auto; color: var(--felt-deep); font-weight: 800; }
.path h2 { margin-top: 1.4rem; }

/* ---------- tiles ---------- */
.tile { display: inline-block; width: var(--tw); aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; line-height: 0; border-radius: 12%; flex: none; }
.tile svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .28)); overflow: visible; }
button.tile { cursor: pointer; transition: transform .14s cubic-bezier(.2, .8, .3, 1.2); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button.tile:active { transform: translateY(-4px); }
button.tile[aria-pressed="true"] { transform: translateY(-18%); }                                 /* a chosen tile is pushed up out of the row, as at the table */
button.tile[aria-pressed="true"] svg { filter: drop-shadow(0 0 0 var(--gold)) drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); outline: 4px solid var(--gold); outline-offset: 1px; border-radius: 12%; }
button.tile.hint svg { outline: 4px dashed #ffd27a; outline-offset: 1px; border-radius: 12%; }
button.tile[disabled] { cursor: default; }
.tile.fly-right { transform: translate(110vw, -30%) rotate(8deg) !important; opacity: 0; transition: transform .42s cubic-bezier(.3, .6, .4, 1), opacity .42s ease-out !important; }
.tile.fly-left { transform: translate(-110vw, -30%) rotate(-8deg) !important; opacity: 0; transition: transform .42s cubic-bezier(.3, .6, .4, 1), opacity .42s ease-out !important; }
.tile.fly-across { transform: translateY(-90vh) scale(.7) !important; opacity: 0; transition: transform .42s cubic-bezier(.3, .6, .4, 1), opacity .42s ease-out !important; }

/* ---------- the table: a felt mat and a clear rack, like the real ones ---------- */
.felt { background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .035) 0 2px, transparent 2px 5px),
    radial-gradient(120% 90% at 50% 0%, var(--mat-a), var(--mat-b) 55%, var(--mat-c));
  border-radius: 22px; padding: 14px 10px 16px; margin: .9rem -0.5rem; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .09), inset 0 2px 16px rgba(0, 0, 0, .28); overflow: hidden; }
.rack { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
/* each row of tiles stands on its own clear rail, like a rack: a pale back wall and a brighter front ledge */
.rrow { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 3px; padding: 10px 6px 15px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07)); border: 1px solid rgba(255, 255, 255, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 8px 14px rgba(0, 0, 0, .22); }
.rrow::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; border-radius: 0 0 11px 11px; background: linear-gradient(rgba(255, 255, 255, .78), rgba(255, 255, 255, .3)); border-top: 1px solid rgba(255, 255, 255, .9); pointer-events: none; }
/* tiles in a row share the width (so seven always fit) and stop growing at --tw; a small gap marks where a group starts */
.grp { display: contents; }
.rrow .tile { flex: 1 1 0; width: auto; min-width: 0; max-width: var(--tw); }
.grp + .grp .tile:first-child { margin-left: 8px; }
.rack.in { --tw: 84px; }
.rack.in .rrow { background: none; border: 0; box-shadow: none; padding: 4px 0; min-width: 0; }
.rack.in .rrow::after { display: none; }
.rack.in .tile { animation: come .5s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--k) * 70ms); }
.rack.from-left .tile { --fx: -70vw; --fy: 0; } .rack.from-right .tile { --fx: 70vw; --fy: 0; } .rack.from-across .tile { --fx: 0; --fy: -50vh; }
@keyframes come { from { transform: translate(var(--fx, 0), var(--fy, 0)) rotate(6deg); opacity: 0; } }
.rack.hop .tile { animation: hop .5s ease both; animation-delay: calc(var(--k) * 35ms); }                 /* Mah Jongg: the row gives a little bow */
@keyframes hop { 40% { transform: translateY(-22%); } }
.mat { display: flex; justify-content: center; gap: .3rem; margin: 0 0 12px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.mat span { color: var(--mat-ink); opacity: .8; padding: .15rem .5rem; border-radius: 99px; border: 1px solid currentColor; }
.mat span.on { color: var(--felt-deep); background: var(--gold); border-color: var(--gold); opacity: 1; }
.mat span.was { text-decoration: line-through; }
.show { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .9rem .5rem; padding: 4px 2px; }
.show figure { margin: 0; text-align: center; font-size: .85rem; font-weight: 700; color: #fff; }
.show .tile { width: min(100%, 104px); }
.solo { display: flex; justify-content: center; padding: 10px 0; }
.solo .tile { width: min(42vw, 180px); }
.pick-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 4px 8px; justify-items: center; }
.pick-tiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 26rem; margin: 0 auto; }
.pick-tiles .tile { width: min(100%, 132px); }

/* ---------- a hand, written the way a card is read (OUR card: our own colours and layout) ---------- */
.hand-box { container-type: inline-size; }
.hand { display: flex; flex-wrap: nowrap; white-space: nowrap; align-items: baseline; gap: 0 .5em; font: 800 1.3rem/1.3 var(--sans); font-size: min(1.55rem, 6.5cqw); letter-spacing: .09em; font-variant-numeric: tabular-nums lining-nums; }   /* a line of the card is ONE line: it shrinks to its box, it never wraps */
.hand.mini { display: inline-flex; font-size: 1rem; gap: 0 .5em; }
.hand .a { color: var(--a); } .hand .b { color: var(--b); } .hand .c { color: var(--c); } .hand .n { color: var(--ink); }
.hand-box { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: .7rem .9rem; margin: .6rem 0; }
.hand-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; color: var(--soft); font-size: .9rem; margin-top: .25rem; }
.hand-meta b { color: var(--ink); }
.family h2 { margin-top: 1.6rem; } .family > p { color: var(--soft); }
.key { display: grid; gap: .35rem; font-size: .95rem; }
.key i { font-style: normal; font-weight: 800; letter-spacing: .06em; }
.claim { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 1rem; font-family: var(--serif); font-size: 1.3rem; }

.say { border-radius: var(--r); padding: .8rem 1rem; margin: 1rem 0 0; font-weight: 600; border: 2px solid transparent; }
.say.good { background: var(--good-bg); color: #123f31; border-color: #b9dcc8; }
.say.warn { background: var(--warn-bg); color: #5c3200; border-color: #f0d49a; }
.say b { display: block; font: 700 1.2rem var(--serif); }
.dots { display: flex; gap: 6px; margin: 0 0 .8rem; }
.dots i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.dots i.on { background: var(--felt); } .dots i.miss { background: #e2b25c; }
.pass { display: flex; align-items: center; gap: .7rem; margin: 0 0 .5rem; } .pass:last-child { margin: 0; }
.pass .arrow { font-size: 1.6rem; line-height: 1; font-weight: 800; color: var(--felt); width: 1.6rem; text-align: center; }
.toggle { display: flex; align-items: center; gap: .6rem; min-height: 48px; font-size: .95rem; color: var(--soft); margin-top: .4rem; }
.toggle input { width: 26px; height: 26px; accent-color: var(--felt); flex: none; }
.v-actions > p:first-child { margin-top: .2rem; }

footer { padding: 1.4rem 1rem 1.2rem; color: var(--soft); font-size: .8rem; text-align: center; width: 100%; max-width: 46rem; margin: 0 auto; }

/* ---------- small phones in landscape and other mid widths ---------- */
@media (min-width: 480px) { :root { --tw: 60px; } }

/* ---------- iPad portrait: bigger type and tiles, two calm columns where it helps ---------- */
@media (min-width: 700px) {
  html { font-size: 137.5%; }                                     /* 22px */
  :root { --tw: 104px; --tap: 68px; }
  main, footer { max-width: 760px; }
  main { padding: 1.6rem 1.5rem 2.5rem; }
  .door { padding: 1.2rem 1.3rem; gap: .15rem 1.4rem; } .door .pic .tile { width: 62px; margin-right: -20px; } .door .pic { min-width: 150px; }
  .felt { padding: 22px 18px 24px; margin: 1.1rem -0.75rem; border-radius: 28px; }
  .rack { gap: 16px; } .rrow { gap: 4px; padding: 14px 12px 20px; } .rrow::after { height: 13px; } .grp + .grp .tile:first-child { margin-left: 12px; }
  .mat { font-size: .75rem; gap: .5rem; }
  .show { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } .show .tile { width: min(100%, 120px); }
  .solo .tile { width: 200px; }

  .doc.narrow { max-width: 34rem; margin: 0 auto; }
}

/* ---------- iPad landscape, propped on the table: the rack runs the full width at the bottom, like her own rack in front of her;
   the explanation and the buttons sit side by side above it ---------- */
@media (min-width: 1000px) and (orientation: landscape) {
  :root { --tw: 86px; }
  main, footer { max-width: 1180px; }
  main { padding: 1.1rem 1rem 1.5rem; }
  .view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2.2rem; align-items: start; grid-template-areas: "head head" "side actions" "table table"; }
  .view.no-side { grid-template-areas: "head actions" "table table"; }
  .view.no-table { grid-template-areas: "head head" "side actions"; }
  .view.no-side.no-table { grid-template-columns: minmax(0, 34rem); justify-content: center; grid-template-areas: "head" "actions"; }
  .v-head { grid-area: head; } .v-side { grid-area: side; } .v-actions { grid-area: actions; } .v-table { grid-area: table; }
  .v-actions > .row:first-child, .v-actions > .choices:first-child { margin-top: .6rem; }
  /* one rack, one row, the full width: the rows flatten and the rail belongs to the whole rack */
  .rack { position: relative; flex-direction: row; justify-content: center; align-items: flex-end; gap: 4px; padding: 16px 12px 22px; border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07)); border: 1px solid rgba(255, 255, 255, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 8px 14px rgba(0, 0, 0, .22); }
  .rack::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; border-radius: 0 0 13px 13px; background: linear-gradient(rgba(255, 255, 255, .78), rgba(255, 255, 255, .3)); border-top: 1px solid rgba(255, 255, 255, .9); pointer-events: none; }
  .rrow { display: contents; }
  .rack .tile { flex: 1 1 0; width: auto; min-width: 0; max-width: var(--tw); }
  .rrow + .rrow .grp:first-child .tile:first-child { margin-left: 12px; }
  .rack.in { --tw: 84px; background: none; border: 0; box-shadow: none; padding: 4px 0; } .rack.in::after { display: none; }
  .felt { margin: .9rem 0 0; padding: 24px 12px 28px; }
  .v-side .felt { padding: 14px; }
  .v-side .felt { margin-top: .4rem; }
  .doors { grid-template-columns: repeat(4, 1fr); }
  .doors.five { grid-template-columns: repeat(5, 1fr); } .doors.five .main { grid-column: auto; }
  .door { grid-template-columns: minmax(0, 1fr); align-content: start; gap: .3rem; } .door .pic { grid-row: auto; margin-bottom: .5rem; } .door .pic .tile { width: 70px; margin-right: -20px; }
  .home { max-width: 1040px; margin: 0 auto; }
  .families { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
  .path { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-items: start; } .path > div:first-child section:first-child h2, .path > div + div section:first-child h2 { margin-top: .4rem; }
  .seats { height: 230px; }
  .show { grid-template-columns: repeat(9, minmax(0, 1fr)); } .show .tile { width: min(100%, 104px); }
  .pick-tiles { max-width: 44rem; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .bar, footer, .noprint { display: none; } body { background: #fff; } .hand-box { break-inside: avoid; } .families { display: block; } }

/* ---------- "Mi juego se ve así": her own look ---------- */
body.mat-rose { --mat-a: #f6b3be; --mat-b: #ee8fa0; --mat-c: #e2738a; --mat-ink: rgba(60, 20, 40, .7); }
body.mat-rose .felt { box-shadow: inset 0 0 0 3px #1f4f9c, inset 0 0 0 7px rgba(255, 255, 255, .55), inset 0 2px 16px rgba(0, 0, 0, .12); }
body.mat-rose .show figure { color: #3c1428; }
.looks { display: grid; gap: 1rem; margin: 1rem 0; }
.look { display: grid; gap: .6rem; width: 100%; padding: 1rem; border-radius: 20px; border: 3px solid var(--line); background: var(--card); color: var(--ink); font: 700 1.15rem var(--serif); text-align: left; cursor: pointer; box-shadow: 0 4px 0 var(--line); -webkit-tap-highlight-color: transparent; }
.look:active { transform: translateY(4px); box-shadow: none; }
.look[aria-pressed="true"] { border-color: var(--felt); box-shadow: 0 0 0 4px var(--gold); }
.look .sample { display: flex; gap: 6px; padding: 12px 10px; border-radius: 14px; }
.look .sample .tile { flex: 1 1 0; width: auto; max-width: 84px; min-width: 0; }
.look small { font: 400 .9rem var(--sans); color: var(--soft); }
.swatch { height: 64px; border-radius: 14px; }
@media (min-width: 700px) { .looks { grid-template-columns: 1fr 1fr; } }

/* ---------- arranging the rack by hand ---------- */
.rack.sortable button.tile { touch-action: none; }                      /* a finger on a tile moves the tile, not the page */
button.tile.drag { z-index: 4; transition: none; cursor: grabbing; }
button.tile.drag svg { filter: drop-shadow(0 14px 10px rgba(0, 0, 0, .4)); }
.toggle.big { font-size: 1.05rem; color: var(--ink); min-height: var(--tap); background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: .4rem 1rem; }
.steps { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .8rem; counter-reset: s; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; font-size: 1.05rem; }
.steps .ico { width: 54px; height: 54px; border-radius: 14px; background: var(--felt); color: #fff; display: grid; place-items: center; }
.steps .ico .tile { width: 30px; }

.ck { vertical-align: -3px; }
.list a .mark .ck { vertical-align: 0; }
/* the table seen from above, for the Charleston: you at the bottom, and where each pass of three goes */
.seats { position: relative; height: clamp(230px, 46vw, 330px); max-width: 560px; margin: 0 auto; color: #fff; font-weight: 700; }
.seat { position: absolute; padding: .2rem .8rem; border-radius: 99px; border: 1px solid var(--mat-ink); color: var(--mat-ink); font-size: .85rem; }
.seat.you { left: 50%; bottom: 0; transform: translateX(-50%); background: var(--gold); border-color: var(--gold); color: var(--felt-deep); }
.seat.top { left: 50%; top: 0; transform: translateX(-50%); } .seat.left { left: 0; top: 52%; } .seat.right { right: 0; top: 52%; }
.hop3 { position: absolute; left: 50%; top: 68%; display: flex; gap: 3px; align-items: center; transform: translate(-50%, -50%); }
.hop3 .tile { width: clamp(22px, 5vw, 32px); }
.hop3 b { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; color: var(--felt-deep); font-size: .85rem; margin-right: 4px; }
.hop3.to-right { animation: toRight 6s ease-in-out infinite; } .hop3.to-top { animation: toTop 6s ease-in-out infinite; } .hop3.to-left { animation: toLeft 6s ease-in-out infinite; }
@keyframes toRight { 0%, 4% { left: 50%; top: 68%; opacity: 0; } 8% { opacity: 1; } 26%, 100% { left: 80%; top: 28%; opacity: 1; } }
@keyframes toTop { 0%, 34% { left: 50%; top: 68%; opacity: 0; } 38% { opacity: 1; } 56%, 100% { left: 50%; top: 30%; opacity: 1; } }
@keyframes toLeft { 0%, 64% { left: 50%; top: 68%; opacity: 0; } 68% { opacity: 1; } 86%, 100% { left: 20%; top: 28%; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hop3.to-right { left: 80%; top: 28%; } .hop3.to-top { left: 50%; top: 30%; } .hop3.to-left { left: 20%; top: 28%; } }

/* ---------- the Charleston tray: the three tiles she has pulled out to pass, waiting on the mat ---------- */
.tray { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 12px; min-height: calc(var(--tw) * 1.05); }
.tray-label { color: var(--mat-ink); font-weight: 700; font-size: .85rem; margin-right: .4rem; }
.tray .tile, .tray .slot { width: min(var(--tw), 13vw, 72px); flex: none; }
.tray .slot { aspect-ratio: 3 / 4; border-radius: 12%; border: 2px dashed var(--mat-ink); opacity: .55; }
.tray button.tile[aria-pressed="true"] { transform: none; }
.tray button.tile[aria-pressed="true"] svg { outline-width: 3px; }
