:root {
  --bg: #f4f2ec; --page: #f7f7f7; --fg: #000; --text: #222; --muted: #6a6a6a; --faint: #a3a3a3;
  --line: #ddd; --hair: #ebebeb; --pill: #f2f2f2; --pill-hover: #e8e8e8; --red: #c8302c;
  --back: #0e6a4e; --face: #f7f7f5; --edge: #dcdcd6; --spring: cubic-bezier(.34, 1.56, .64, 1); --back-mid: #5e9c86; --back-soft: #e3f0eb; --felt: #f7f7f7;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --beige: #f4f2ec; --title-green: #103729;   /* the starting screen */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* Type, as in Mahjong Coach: SF Pro Display, mostly weight 500, tight tracking on titles, black titles over #222 text.
   Scale: title 28/32 (24/28 on phones) · section 20/24 · body 15/23 · label 14/19 · small 12/16 · caps label 12/16 */
body { font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
       background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
       /* app-like touch: no text selection, long-press menus or double-tap zoom */
       -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; overscroll-behavior: none; }
p { text-wrap: pretty; }
/* (every paragraph, the landing line, steps, notes and hand note included: text-wrap: pretty, so no line ends with one word on its own) */
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
ol { list-style: none; }

/* ═════════ layout: phone first, picture on top ═════════ */
/* the app fills the whole screen, under Safari's floating address bar too (100lvh: as tall as the screen gets, while 100dvh stops
   above the bar), so the steps and the timeline's line run on under the bar instead of stopping at its top edge. The page
   itself doesn't scroll (only the step list does), so the bar stays put; --under is how much of the screen it covers */
html, body { overflow: hidden; }
.app { height: 100%; height: 100lvh; display: flex; flex-direction: column; --under: calc(100lvh - 100dvh); }
.visual { position: relative; flex: none; height: min(46dvh, calc(100vw + 30px)); min-height: 250px; background: var(--beige);
          padding-top: env(safe-area-inset-top); }
.visual { height: min(52dvh, calc(100vw + 76px)); min-height: 290px; }
.visual > svg { position: absolute; left: 10px; right: 10px; top: calc(44px + env(safe-area-inset-top)); bottom: 46px;
              width: calc(100% - 20px); height: calc(100% - 90px - env(safe-area-inset-top)); transition: opacity .2s var(--ease); }
.visual > svg.fade { opacity: 0; }
.visual > svg { overflow: visible; }   /* the player labels sit out past the table's margin */
/* what's happening in the picture right now */
.visual .cap { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 40px; display: flex; align-items: center; justify-content: center;
       text-align: center; font-size: 14px; line-height: 19px; font-weight: 500; color: var(--text); text-wrap: balance; }
.here .pp { margin-left: auto; flex: none; width: 32px; height: 32px; margin-right: -4px; border-radius: 50%; display: grid; place-items: center;
            background: rgba(0, 0, 0, .06); color: var(--text); }
.here .pp:hover { background: rgba(0, 0, 0, .1); }
.here .pp svg { width: 11px; height: 11px; }
/* as in Figma: the button sits at the picture's bottom right; once an animation has played, it's the word Replay
   with its icon, no circle */
/* Replay: the same size as the players' names (14 of the table's 368 units, so it grows with the picture: the table is
   the picture's height less 95) and on the same line as East · Dealer (its baseline 29.8 units under the table's bottom
   edge, which is 45 above the picture's) */
.here { transition: opacity .3s var(--ease); }
.here.still { opacity: 0; pointer-events: none; }   /* (a picture with nothing to play: app.js controls) */
.visual.bare .here { top: auto; right: 19px; bottom: calc(33px - (var(--pic) - 95px) * 29.8 / 368); }
.visual.bare .here .pp.word { font-size: calc((var(--pic) - 95px) * 14 / 368); }
.visual.bare .here .pp { margin-right: 0; }
.here .pp.word { width: auto; border-radius: 16px; padding: 0 2px; display: flex; align-items: center; gap: 4px; background: none;
                 font-size: 12px; line-height: 10px; font-weight: 500; letter-spacing: -.002em; color: var(--text); }
.here .pp.word:hover { background: none; opacity: .7; }
.here .pp.word svg { width: 11px; height: 11px; }
.here { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; align-items: center;
        gap: 8px; z-index: 1; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.here .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center;
           font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.here .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.here .of { margin-left: auto; flex: none; color: var(--muted); font-weight: 500; font-size: 13px; line-height: 16px; font-variant-numeric: tabular-nums; }
.panel { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; overflow: clip; }   /* one beige page: no line under the picture */
/* the picture has no words of its own: the steps say what's happening */
/* 410 tall on every phone, as in Figma (the 315px table inside stays readable on small phones, and big ones don't
   gain empty picture); plus the notch, where there is one */
/* the picture: as tall as the screen allows (up to 465, plus the notch), keeping about 300 under it for the steps (the
   tallest open card, Roll the dice at 216, with the step after it showing), and
   never under 410, and never so big North and South (just outside the table) come within 16 of the screen's edges (87.2vw + 67:
   the table is the picture's height less 95, and its labels reach .573 of that out from the middle); that last one wins, on
   narrow phones too */
.visual.bare { --pic: min(max(410px, min(100dvh - 300px, 465px)), 87.2vw + 67px); height: calc(var(--pic) + env(safe-area-inset-top)); min-height: 0; }
.visual.bare > svg { top: calc(50px + env(safe-area-inset-top)); bottom: 45px; height: calc(100% - 95px - env(safe-area-inset-top)); }

/* the starting screen (.app.start), as in the Figma mock: on beige, the heap of tiles close up and cropped by the top
   of the screen, with the name, a line on what this is and Get started below it. The heap is sized by the screen's
   height (1.75 times it, its middle a little above the top), so it sits the same way on any screen. Pressing Get
   started, the picture shrinks back to its place (the tiles with it, into the first step's heap), the beige goes to
   the table's grey, and the steps come up from underneath */
.visual { overflow: hidden; }
.visual, .visual > svg { transition: height .7s var(--ease), top .7s var(--ease), left .7s var(--ease), width .7s var(--ease),
                         background-color .7s var(--ease), opacity .2s var(--ease); }
.panel > * { transition: opacity .4s var(--ease) .35s; }
.app.start .visual.bare { height: 100dvh; min-height: 100dvh; background: var(--beige); }
html:has(.app.start) body { background: var(--beige); }
/* (10dvh higher than the mock's heap: the looser heap the hands push about reaches further, and this keeps its lower
   edge where the mock has it, clear of the name) */
.app.start .visual.bare > svg { top: -102.5dvh; left: calc(50% - 87.5dvh); width: 175dvh; height: 175dvh; }
/* (no gliding while on the starting screen: the screen's height can settle a moment after the page opens, and the
   picture shouldn't drift with it. Get started still glides it into place, since the steps' styles carry the
   transitions; only the fade-in is kept here) */
.app.start .visual.bare { transition: none; }
.app.start .visual.bare > svg { transition: opacity .2s var(--ease); }
.app.start .here, .app.start .panel > * { opacity: 0; pointer-events: none; transition: none; }
.intro { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .3s var(--ease), visibility 0s .3s; }
.app:not(.start) .intro { opacity: 0; visibility: hidden; }
/* opening the page: it starts blank (just the beige); first the name, line and Get started slide up in from the bottom one
   after another, fading in, then the tiles spill in from the top, one by one (app.js: spill). (.arrive comes off once the
   words are in: app.js) */
.app.arrive .intro .copy > * { animation: copyIn .8s cubic-bezier(.2, .7, .2, 1) .2s both; }
.app.arrive .intro .copy > p { animation-delay: .32s; }
.app.arrive .intro .copy > .btn { animation-delay: .44s; }
@keyframes copyIn { from { opacity: 0; translate: 0 32px; } }
.app.start .intro { transition: opacity .5s var(--ease); }
.intro .copy { position: absolute; left: 0; right: 0; bottom: calc(51px + env(safe-area-inset-bottom)); display: flex; flex-direction: column;
               align-items: center; text-align: center; }
.intro h1 { font-family: "Instrument Serif", Georgia, serif; font-size: min(72px, 18vw); line-height: .96; font-weight: 400; letter-spacing: -.04em;
            color: var(--title-green); white-space: nowrap; }
.intro p { margin-top: 12px; width: min(300px, calc(100% - 48px));   /* wide enough for two lines */ font-size: 16px; line-height: 18px; letter-spacing: 0; color: #6c6c6c; }
.intro .btn { flex: none; margin-top: 32px; padding: 14px 40px; min-width: 168px; font-size: 16px; line-height: 20px; font-weight: 500;
              color: #fff; pointer-events: auto; }

/* the two views: the whole timeline, or one step at a time */
/* the floating toggle between the two views: two icons, the current one filled */
/* the view switch is hidden for now: the step list only */
.fab { display: none !important; }
.fab { position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 3; display: flex; gap: 2px; padding: 4px;
       border-radius: 100px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 20px rgba(0, 0, 0, .16), 0 1px 3px rgba(0, 0, 0, .12);
       transition: bottom .3s var(--ease); }
.fab button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted);
              transition: background .2s var(--ease), color .2s var(--ease), transform .15s ease; }
.fab button:active { transform: scale(.92); }
.fab button[aria-pressed="true"] { background: var(--text); color: #fff; }
.fab svg { width: 16px; height: 16px; }
.panel.stepview .fab { bottom: calc(84px + env(safe-area-inset-bottom)); }   /* above Back / Next */
/* steps scrolled up fade out at the top of the list instead of being cut off under the picture (only once it's
   scrolled: at rest the first step sits right at the top) */
.pane.scrolled { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32px); mask-image: linear-gradient(to bottom, transparent, #000 32px); }
#timeline { padding-top: 12px; padding-bottom: calc(84px + env(safe-area-inset-bottom) + var(--under, 0px)); }   /* 12 under the picture, as in Figma */      /* room under the last step */
.pane { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overflow-anchor: none; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
.pane[hidden] { display: none !important; }

/* timeline: all the steps down a line; only the selected one opens to its instruction */
.tl { position: relative; }
/* As in Figma (step 2): rows 16 apart, the selected step a white card with a soft shadow */
.tl::before { content: ""; position: absolute; left: 28.5px; top: 22px; bottom: 22px; width: 1px; background: #dfdcd6; }
.tl > li + li { margin-top: 16px; }
.vrow { position: relative; border-radius: 20px; transition: background .25s var(--ease), box-shadow .25s var(--ease), padding .25s var(--ease); }
.vrow.on { background: #fff; padding: 16px 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .1), 0 2px 16px rgba(0, 0, 0, .04), 0 0 0 1px rgba(0, 0, 0, .02); }
.vrow .pick { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 16px; border-radius: 20px; }
.vrow.on .pick { padding: 8px 10px 4px 16px; }
.vrow .dot { position: relative; z-index: 1; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--beige); box-shadow: inset 0 0 0 1px #dfdcd6;
             color: var(--muted); display: grid; place-items: center; font-size: 12px; line-height: 16px; font-weight: 500; font-variant-numeric: tabular-nums;
             transition: background .25s, color .25s, box-shadow .25s; }
.vrow.on .dot { background: var(--text); color: #fff; box-shadow: none; }
/* step titles in Instrument Serif, as in the Figma components (Setup/Step title, Setup/Step title selected) */
.vrow b { font-family: "Instrument Serif", Georgia, serif; font-size: 18px; line-height: 20px; font-weight: 400; color: var(--text); }
.vrow.on b { font-size: 24px; line-height: 22px; font-weight: 400; color: var(--text); letter-spacing: -.012em; }
.vrow .full { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
/* the instruction lines up under the title */
.vrow .full > div { overflow: hidden; padding: 0 32px 0 51px; }
.vrow.on .full { grid-template-rows: 1fr; }
.vrow.on .full > div { padding-bottom: 14px; }
.vrow .full p { font-size: 16px; line-height: 18px; font-weight: 400; letter-spacing: -.002em; color: #6c6c6c; }
/* a short aside under a step's instruction */
.vrow .full p.aside, .say p.aside { margin-top: 8px; font-size: 13px; line-height: 16px; font-weight: 400; letter-spacing: 0; color: #8c8c8c; }   /* Figma's Setup/Aside */
p.aside b, .vrow.on .full p.aside b { font: inherit; letter-spacing: 0; color: inherit; }   /* "Note:" reads as part of the line */
/* in the card: a small label (sentence case) over its control, 14 under the words; round grey − and + */
.vrow .choose { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 14px; }
.vrow .clbl { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #8c8c8c; }
.vrow .stepper { background: none; gap: 2px; }
.vrow .stepper button { width: 32px; height: 32px; background: var(--pill); font-size: 18px; }
.vrow .stepper button:hover { background: var(--pill-hover); }
.vrow .stepper output { min-width: 36px; font-size: 16px; line-height: 20px; font-weight: 500; color: var(--text); }
/* Next step, at the bottom of the open step: small and dark, like a chip that's on */
.next-step { display: inline-flex; margin-top: 22px; padding: 10px 16px; border-radius: 32px; background: var(--text); color: #fff;
             font-size: 14px; line-height: 18px; font-weight: 500; transition: transform .15s ease, opacity .15s ease; }
.next-step:hover { opacity: .85; }
.next-step:disabled { opacity: .35; pointer-events: none; }   /* Start the next hand, until someone's picked under Who won? */
.next-step:active { transform: scale(.97); }
/* a number to step up and down (the dice total) */
.stepper { display: flex; align-items: center; background: var(--pill); border-radius: 32px; }
.stepper button { width: 40px; height: 40px; font-size: 20px; line-height: 1; text-align: center; color: var(--text); border-radius: 50%; }
.stepper button:hover { background: var(--pill-hover); }
.stepper button:disabled { opacity: .3; cursor: default; background: none; }
.stepper output { min-width: 30px; text-align: center; font-size: 17px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.say .choose:first-child, .vrow .full .choose:first-child { margin-top: 2px; }
/* Who won? in the card: a question in the body's grey, 12 under the title, the choices 8 under it */
.vrow .full .choose.who { margin-top: 12px; gap: 8px; }
.vrow .choose.who .clbl { font-size: 16px; line-height: 18px; font-weight: 400; letter-spacing: -.002em; color: #6c6c6c; }
p.after { margin-top: 14px; }
/* the roll, small, as in Figma's Setup / Roll: in a beige box, three little dice in a loose heap (overlapping, each
   tipped a little) and where the count lands, the seat in red */
.roll { display: flex; width: fit-content; align-items: center; gap: 8px; margin-top: 14px; padding: 16px 20px 16px 16px; border-radius: 16px;
        background: var(--beige); }
.mini-dice { display: flex; flex: none; }
.mini-dice .die + .die { margin-left: -6px; }
.mini-dice .die:nth-child(1) { transform: rotate(-2deg); }
.mini-dice .die:nth-child(2) { transform: rotate(-4deg); }
.mini-dice .die:nth-child(3) { transform: translateY(2px) rotate(4deg); }
.die.sm { width: 28px; height: 28px; margin-bottom: 4px; padding: 4px; border-radius: 8px; cursor: default;
          box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 3px 0 var(--edge), 0 4px 0 #c2c2ba, 0 5px 8px rgba(0, 0, 0, .1); }
.roll-t { font: 400 16px/22px "Instrument Serif", Georgia, serif; color: #6c6c6c; letter-spacing: 0; }   /* as in Figma's Setup / Roll */
.roll-t .seat { color: var(--red); }
/* Start the next hand: Next step's pill, a little larger and in the main red */
.next-step.again { padding: 12px 20px; font-size: 16px; line-height: 20px; background: var(--red); }
.next-step.again:disabled { opacity: 1; background: #e4e2dc; color: #a19d94; }   /* (off until someone's picked under Who won?: grey, not a faded red) */
/* Start the next hand: floats in the lower right of the steps while the last step is open, clear of Safari's bar */
.next-fab { position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(16px + env(safe-area-inset-bottom) + var(--under, 0px)); z-index: 4;
            padding: 14px 22px; border-radius: 999px; background: var(--red); color: #fff; font-size: 16px; line-height: 20px; font-weight: 500;
            box-shadow: 0 8px 24px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
            opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none;
            transition: opacity .3s var(--ease), transform .45s var(--spring), background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.next-fab.shown { opacity: 1; transform: none; pointer-events: auto; }
/* the phone has it floating at the bottom; desktop keeps it in the last card (app.js say), as before */
@media (max-width: 859px) { .next-step.again.in-card { display: none; } }
@media (min-width: 860px) { .next-fab { display: none; } }
.next-fab:active { transform: scale(.97); }
.next-fab:disabled { background: #e4e2dc; color: #a19d94; box-shadow: 0 2px 8px rgba(0, 0, 0, .04); pointer-events: none; }   /* (until someone's picked under Who won?) */
/* from the second hand on, the hand's row at the top of the timeline (app.js handRow): a step row with the dealer's 東
   (outlined in red) for its number, "Hand 2" over its title as Up next is, and the line running on from it. It opens
   like a step. Coming in with a new hand, it grows open (.shown) */
.hrow > .hwrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .35s var(--ease), opacity .3s var(--ease); }
.hrow.shown > .hwrap { grid-template-rows: 1fr; opacity: 1; }
.hrow > .hwrap > div { min-height: 0; overflow: hidden; }
.hrow:not(.shown) + li { margin-top: 0; }
.hrow .dot, .hrow.on .dot { background: var(--bg); box-shadow: none; }
.hrow.on .dot { background: #fff; }
.hrow .dot svg { width: 26px; height: 26px; }
.hrow b { display: flex; flex-direction: column; }
.hrow .eb { display: block; margin-bottom: 2px; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif;
            font-size: 12px; line-height: 14px; font-weight: 500; letter-spacing: 0; color: #6c6c6c; white-space: nowrap; }
.note-slot { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .35s var(--ease), opacity .3s var(--ease); }
.note-slot.shown { grid-template-rows: 1fr; opacity: 1; }
.note-slot > div { min-height: 0; overflow: hidden; }
.hand-note { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; margin: 0 0 10px; border-radius: 12px;   /* 16 at the left: the 東 lines up with the step numbers below */
             background: rgba(223, 220, 214, .4); font-size: 13px; line-height: 18px; color: var(--muted); }   /* Figma's Setup / Hand note */
.hand-note svg { flex: none; width: 24px; height: 24px; color: var(--text); }
.hand-note b { color: var(--text); font-weight: 600; }

/* ═════════ summary ═════════ */
.sum-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px 10px; }
.sum-head h1 { font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: -.3px; }
.sum-head p { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 2px; }
.reset { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text); background: var(--pill); border-radius: 32px; padding: 8px 12px; white-space: nowrap; }
.reset:hover { background: var(--pill-hover); }
.row { display: flex; align-items: center; border-radius: 14px; transition: background .2s; }
.row + .row { margin-top: 2px; }
.row.cur { background: var(--pill); }
.row .open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
.row:not(.cur) .open:hover { background: var(--page); }
.num { flex: none; width: 24px; text-align: center; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.row.cur .num { color: var(--text); }
.rt { flex: 1; min-width: 0; }
.rt b { display: block; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--fg); }
.rt span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 2px; }
.row.done .rt b { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line); }
.check { flex: none; width: 44px; height: 44px; margin-right: 2px; display: grid; place-items: center; }
.check::before { content: ""; grid-area: 1 / 1; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
                 box-sizing: border-box; transition: all .2s var(--ease); }
.check:hover::before { border-color: var(--back-mid); }
.row.done .check::before { background: var(--back); border-color: var(--back); }
.row.done .check::after { content: ""; grid-area: 1 / 1; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0;
                          transform: translateY(-1px) rotate(45deg); }

/* ═════════ detail ═════════ */
#detail { display: flex; flex-direction: column; padding-left: 20px; padding-right: 20px; }
.d-top { display: flex; justify-content: space-between; align-items: center; }
.d-top span { font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.back { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--text); padding: 8px 12px 8px 6px; margin-left: -6px; border-radius: 99px; }
.back:hover { background: var(--pill); }
#detail h2 { font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: -.6px; margin: 8px 0 12px; text-wrap: balance; }
.note { display: flex; gap: 10px; align-items: flex-start; background: #fdf1ef; color: #8a2420; border-radius: 16px; padding: 14px 16px;
        font-size: 14px; line-height: 21px; font-weight: 500; margin-bottom: 8px; }
.note::before { content: ""; flex: none; width: 14px; height: 20px; margin-top: 0; border: 2px solid currentColor; border-radius: 4px; }
.say { flex: 1; }
.say > p { font-size: 17px; line-height: 25px; color: var(--fg); font-weight: 500; }
.choose { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.clbl { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* a choice, as in Figma's Pill: outlined, the picked one outlined dark */
.chip { font-size: 14px; line-height: 18px; font-weight: 500; padding: 8px 12px; border-radius: 32px; background: none; color: var(--text);
        box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s ease; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--faint); }
.chip.on { box-shadow: inset 0 0 0 1px var(--text); }
.subs { flex: 1; }
.subs li { display: flex; gap: 12px; padding: 8px 0; }
.subs .l { flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; line-height: 16px; font-weight: 600; display: grid; place-items: center;
           background: var(--pill); color: var(--muted); margin-top: 1px; transition: all .2s; }
.subs .body { flex: 1; min-width: 0; }
.subs p { font-size: 15px; line-height: 23px; color: var(--faint); cursor: pointer; transition: color .2s; }
.subs li.past p { color: var(--muted); }
.subs li.past .l { background: var(--pill); color: var(--text); }
.subs li.cur .l { background: var(--text); color: #fff; }
.subs li.cur p { color: var(--fg); font-weight: 500; cursor: default; }
.nav { display: flex; gap: 10px; padding-top: 14px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 14px); }
.btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 100px;
       background: var(--red); color: #fff; font-size: 16px; line-height: 20px; font-weight: 500; white-space: nowrap;
       transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.97); }
.btn.light { background: var(--pill); color: var(--text); }
.btn.light:hover { background: var(--pill-hover); opacity: 1; }
.btn:disabled { opacity: .3; cursor: default; transform: none; }

.callout { background: var(--felt); border-radius: 16px; padding: 14px 16px; margin-top: 12px; }
.callout .k { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.callout .v { font-size: 20px; line-height: 24px; font-weight: 500; letter-spacing: -.4px; margin-top: 4px; color: var(--fg); text-wrap: balance; }
.dice { display: flex; gap: 10px; margin-top: 12px; }
/* dice: ivory, with the same 3D edge as a face-up tile */
.die { width: 50px; height: 50px; margin-bottom: 7px; padding: 7px; border-radius: 12px; background: linear-gradient(#ffffff, var(--face)); user-select: none;
       box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 5px 0 var(--edge), 0 6px 0 #c2c2ba, 0 8px 14px rgba(0, 0, 0, .12);
       transition: transform .15s var(--spring), box-shadow .15s ease; }
.die svg { display: block; width: 100%; height: 100%; }
.die:hover { transform: translateY(-2px); }
.die:active { transform: translateY(3px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 2px 0 var(--edge), 0 3px 0 #c2c2ba, 0 4px 8px rgba(0, 0, 0, .12); }
.hint, .subs li.cur p.hint { font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 400; margin-top: 8px; }

/* table picture */
/* a stack's sides (filled in by table.js); one tile high, the top tile's layers go and its top drops (inline) */
.stk .sd polygon { transition: opacity .4s var(--ease); }
.stk .fc { transition: transform .5s var(--ease); }
.stk.now .sd polygon, .stk.now .fc { transition: none; }   /* (two high the moment its top tile lands: table.js landed) */
.stk.single .t2, .stk.gone .sd polygon { opacity: 0; }   /* gone: a taken stack, just a ghost of its top */
/* stacks turn about their own middle when they're loose (shuffling, piles) */
.stk { transform-box: fill-box; transform-origin: center; transition: fill .35s var(--ease), opacity .45s var(--ease), transform .65s var(--ease); }
/* the players' labels: never bigger than 16px names (--ls: app.js sizeLabels) */
#table .lbl { transform: scale(var(--ls, 1)); }
/* things that arrive in an animation: they pop in, or (the discard) slide up from your hand */
.over .pop { transform-box: fill-box; transform-origin: center; animation: popIn .4s var(--spring) both; }
.over .slide { transform-box: fill-box; transform-origin: center; animation: slideUp .7s var(--spring) both; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } }
@keyframes slideUp { from { transform: translateY(120px) scale(.6); opacity: 0; } }
/* jump straight to a frame (when an animation starts over) */
/* the starting screen: tiles face up (svg.faceup), then each turns over (table.flipTiles draws it turning) and is
   marked down: face down from then on */
.stk .up { opacity: 0; }
.faceup .stk .up { opacity: 1; }
.faceup .down .up { opacity: 0; }
/* while hands push the tiles about on the starting screen, every tile is drawn exactly where it is, frame by frame */
.pushing .stk, .pushing .stk .fc, .pushing .over > g { transition: none !important; }
.snap .stk, .snap .stk .fc, .snap .stk .sd polygon, .snap .over > g { transition: none !important; }
/* every loose piece glides to its next place, and fades in or out */
.over > g { transition: transform .6s var(--ease), opacity .4s var(--ease), filter .6s var(--ease); }
/* the table zoomed in before the deal (table.js render), easing out as the deal starts */
/* the lab's hands (table.js reachFor): a hand and wrist in one even line, over the tiles */
#table .hand { fill: #5b5955; pointer-events: none; }   /* (a dark grey line) */
#table .hand .in { fill: #fff; opacity: .5; }   /* (see-through: the tiles show under it) */
#table .hand .halo { fill: #f3f1ec; stroke: #f3f1ec; stroke-width: 1.3; stroke-linejoin: round; opacity: .75; }   /* (a pale edge, so the line still shows over the green tiles) */
#table .reach { opacity: .9; }
#table .zoom { transform-box: view-box; transform-origin: 170px 170px; transition: transform .9s cubic-bezier(.45, 0, .2, 1); }
.snap .zoom, .pushing .zoom { transition: none !important; }
/* natural motion (table.js, glide; on in app.js): the pieces' moves are played one by one in script, so
   the transitions here leave their position alone */
.nat .stk { transition: fill .35s var(--ease), opacity .45s var(--ease); }
.nat .over > g { transition: opacity .4s var(--ease), filter .6s var(--ease); }
/* a tile floating over the table (the flower set aside while it's big): a soft shadow, well off down and to the right */
.over > g.float { filter: drop-shadow(4px 10px 5px rgba(0, 0, 0, .22)); }
/* the dice total, fading and sliding up in once the dice land */
.over .tick { animation: tick .5s var(--ease) .1s both; }
@keyframes tick { from { opacity: 0; transform: translateY(8px); } }
/* an arrow that shows for a moment, then fades away (the deal's direction, on each new wall) */
.over .flash { animation: flash 1.6s ease forwards; }
/* the flower marker blooms in: it grows from a bud, turning one petal's width, and settles with a little spring */
.over .bloom { transform-box: fill-box; transform-origin: center; animation: bloom .8s var(--spring) .15s both; }
@keyframes bloom { from { transform: scale(.15) rotate(-72deg); opacity: 0; } 40% { opacity: 1; } }
@keyframes flash { 0% { opacity: 0; } 15%, 65% { opacity: 1; } 100% { opacity: 0; } }
/* once Instrument Serif has loaded, the table's text is laid out again (Safari keeps the fallback font otherwise: app.js) */
#table.fonts-in text { font-kerning: normal; }
/* in play, the player whose turn it is: a soft red ring swells out from their circle and fades, again and again (table.js seatLabel) */
.over .pulse { transform-box: fill-box; transform-origin: center; animation: turnPulse 1.4s cubic-bezier(.2, .6, .4, 1) infinite; }
@keyframes turnPulse { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.75); opacity: 0; } }
/* the deal's arrow: it draws itself on from its tail, drifts slowly the way the deal goes while it lingers, then fades */
.over .deal-arrow { animation: arrowDrift 3.4s cubic-bezier(.3, .6, .5, 1) forwards; }
.over .deal-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: arrowDraw .7s .1s cubic-bezier(.4, 0, .2, 1) forwards; }
/* the first one waits a moment after the step opens (hidden while it waits) */
.over .deal-arrow.late { animation-delay: .8s; animation-fill-mode: both; }
.over .deal-arrow.late path { animation-delay: .9s; }
.over .deal-arrow.after { animation-delay: .45s; animation-fill-mode: both; }   /* (once the last wall's arrow has faded out: .4s) */
.over .deal-arrow.after path { animation-delay: .55s; }
@keyframes arrowDrift { 0% { opacity: 0; transform: translateX(-5px); } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateX(4px); } }
@keyframes arrowDraw { to { stroke-dashoffset: 0; } }

/* ═════════ the steps as cards (the default; Developer settings can switch back to the timeline) ═════════
   A plain list of cards, each opening and closing in place. Closed, a card is flat: the step's number and title on
   white, no shadow; the step you're on is open, raised, with its instructions. (main.cards: app.js) */
.cards .tl::before { display: none; }                       /* no timeline line */
.cards .tl > li + li { margin-top: 12px; }
.cards .vrow { background: #fff; border-radius: 16px; padding: 0; box-shadow: none; }
.cards .vrow.on { padding: 12px 0; border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .04), 0 0 0 1px rgba(0, 0, 0, .03); }
.cards .vrow .pick, .cards .vrow.on .pick { padding: 12px 16px; gap: 12px; text-align: left; border-radius: 16px; }
.cards .vrow.on .pick { padding: 10px 16px 2px; }   /* a 38 header, as in Figma (the title 22 below the card's top) */
.cards .vrow .dot { width: 24px; height: 24px; box-shadow: none; }
.cards .vrow b { font-size: 18px; line-height: 22px; }
.cards .vrow.on b { font-size: 24px; line-height: 26px; }
.cards .vrow .full > div { padding: 0 16px 0 52px; }        /* lined up with the title (16 + 24 + 12) */
.cards .vrow.on .full > div { padding-top: 4px; padding-bottom: 12px; }   /* 4 under the header, as in Figma */
/* no Next step buttons: tap a step to go to it (Start the next hand, on the last step, stays) */
.vrow .next-step:not(.again) { display: none; }   /* (cards and timeline alike) */
/* the timeline: a grey "Up next" over the title of the step after the open one (the cards don't have it; nor does the
   layout lab's Show next, which marks it its own way). Once the open step's picture has played through (app.js nudge:
   .wave), it and the title under it undulate together: each letter rises a little and settles, a moment after the one
   before, both lines starting at once. */
.vrow .up { display: none; }
.app:not(.cards):not(.cta) .vrow.on + .vrow b { display: flex; flex-direction: column; }
.app:not(.cards):not(.cta) .vrow.on + .vrow .up { display: block; margin-bottom: 2px; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif;
                                                  font-size: 12px; line-height: 14px; font-weight: 500; letter-spacing: 0; color: #6c6c6c; white-space: nowrap; }
.vrow .up i, .vrow .ttl i { display: inline-block; font-style: normal; }
.vrow.wave .up i, .vrow.wave .ttl i { animation: undulate .6s cubic-bezier(.4, 0, .3, 1) calc(.8s + var(--k) * 40ms); }   /* (a beat after the picture stops) */
@keyframes undulate { 0%, 100% { transform: none; } 40% { transform: translateY(-3px); } }

/* the iPhone app (app.js NATIVE): like an app, not a page: nothing to select or press and hold for a menu, and no
   developer settings */
.native, .native body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.native .dev-link, .native .dev { display: none !important; }

/* ═════════ developer settings ═════════ */
.dev-link { display: block; width: 100%; height: 72px; margin: 8px 0 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }   /* invisible (app.js); quick taps don't zoom the page or select anything */
.dev { margin: auto; border: 0; border-radius: 20px; padding: 20px 20px 16px; width: min(320px, calc(100% - 48px)); color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .18); }
.dev::backdrop { background: rgba(0, 0, 0, .25); }
.dev h2 { margin: 0 0 4px; font: 400 24px/26px "Instrument Serif", Georgia, serif; letter-spacing: -.012em; }
.dev p { margin: 0 0 12px; font-size: 13px; line-height: 16px; color: #8c8c8c; }
.dev fieldset { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dev legend { padding: 0; margin-bottom: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: #8c8c8c; }
.dev label { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 20px; }
.dev input { margin: 0; width: 18px; height: 18px; accent-color: var(--text); }
.dev .btn { width: 100%; }

/* ═════════ desktop: picture on the left, steps on the right ═════════ */
@media (min-width: 860px) {
  body { background: var(--beige); }
  .app { flex-direction: row; max-width: none; margin: 0; }   /* (the picture takes everything left of the steps, so the table stays in the middle of it) */
  /* on very wide windows the steps' layout stops growing at 1440 across, centred, with the page's beige either side,
     so the steps stay near the table instead of out at the window's right edge (the starting screen keeps the full
     width, its heap uncut) */
  .app { transition: padding .7s var(--ease); }   /* (from the starting screen the margins grow in with the steps sliding in) */
  .app:not(.start) { padding-left: max(0px, (100% - 1440px) / 2); padding-right: max(0px, (100% - 1440px) / 2); }
  .visual { flex: 1; height: auto; padding: 0; }
  .visual > svg { left: 68px; right: 68px; top: 88px; bottom: 96px; width: calc(100% - 136px); height: calc(100% - 184px); }   /* centred in the space left of the steps */
  .visual .cap { left: 40px; right: 40px; bottom: 36px; font-size: 16px; line-height: 22px; }
  .here { top: 36px; left: 40px; right: 40px; font-size: 16px; line-height: 20px; }
  .here .n { width: 28px; height: 28px; font-size: 13px; }
  .here .of { font-size: 14px; line-height: 18px; }
  .panel { flex: none; width: 440px; border-top: 0; background: var(--bg); }   /* no line between the picture and the steps: one beige page */
  .visual.bare { height: auto; }
  .visual.bare > svg { top: 72px; bottom: 64px; height: calc(100% - 136px); }   /* as much room for the tiles as the window gives (and above and below it, for West and East · Dealer at up to 16px) */
  /* (up to 760 across on a big screen, in the middle of the space left of the steps) */
  .app:not(.start) .visual.bare > svg { width: min(100% - 136px, 760px); height: min(100% - 72px - var(--cb, 64px), 760px); bottom: var(--cb, 64px); margin: auto; }
  /* (--cb: room under the table, at least 64px, more on taller windows so the wall's caption, "18 across × 2 high",
     which hangs below the table and grows with it, always ends 36px or more above the bottom: app.js sizeLabels) */
  /* Replay, as the players' names here (--lf: their size, up to 16px, set by app.js), its baseline level with
     East · Dealer's: the table (sz) sits in the middle of the svg, and that baseline is 174.6 of its 368 units below the
     middle plus 39.2 label units */
  .visual.bare { --sz: min(100vw - 576px, 100lvh - 136px, 760px); }
  .visual.bare .here { bottom: calc(64px + (100lvh - 136px) / 2 - var(--sz) * 174.6 / 368 - var(--lf, 12px) * 39.2 / 14 - 12px); }
  .visual.bare .here .pp.word { font-size: var(--lf, 12px); }
  .panel { transition: width .7s var(--ease); }
  .app.start .visual.bare { height: auto; min-height: 0; }
  .app.start .panel { width: 0; box-shadow: none; }
  .panel > .pane { min-width: 440px; }   /* the steps keep their width while the panel slides open */
  .intro .copy { bottom: 64px; }
  .intro h1 { font-size: 96px; }
  .intro p { width: 320px; font-size: 18px; line-height: 22px; }
  .fab { right: 28px; bottom: 28px; }
  .panel.stepview .fab { bottom: 96px; }
  .pane { padding: 20px 40px 32px 28px; }   /* (40 on the right, so the cards stop short of the window's edge) */
  /* the steps sit in the middle of the window, top to bottom (from the top once they're taller than it) */
  #timeline { display: flex; flex-direction: column; }
  #timeline { padding-bottom: 32px; }   /* (no floating switch here for now, so no room kept for it) */
  #timeline > .tl { margin-top: auto; margin-bottom: auto; }
  #detail { padding: 20px 32px 32px; }
  #detail h2 { font-size: 28px; line-height: 32px; letter-spacing: -.8px; }
}
/* ═════════ a phone held sideways (Figma's Mobile landscape frames): picture on the left, steps on the right ═════════
   Any screen on its side that's no taller than a phone's. It comes after the desktop rules, as a big phone on its side
   is wide enough for those too. The table is sized by the screen's height (all of it but the players'
   names above and below it, 16 clear of the edges), the picture just wide enough for it and the names at its sides (1.146 times the table:
   they reach .573 of it out from the middle), 16 in from the notch's side. The names stay their phone size
   (app.js sizeLabels) and Replay keeps to East · Dealer's line (--pic, as on a phone). */
@media (orientation: landscape) and (max-height: 520px) {
  body { background: var(--bg); }
  .app { flex-direction: row; max-width: none; margin: 0; }
  /* (--th: the table's height. West's name reaches .08 of it above the table and East · Dealer's .09 below, so the
     table is as tall as the screen allows with 16 clear above West and below East · Dealer) */
  .visual, .visual.bare { flex: none; padding: 0; min-height: 0; height: 100dvh; --th: calc((100dvh - 32px) / 1.1694); --pic: calc(var(--th) + 95px);
                          /* the picture at least wide enough for the table (sized by the height) and its labels, 24 clear on each
                             side, and at least 60% of the width, so the steps never take more than 40% (the table
                             centred in the picture) */
                          --tw: calc(var(--th) * 1.146);   /* (the table's width as drawn) */
                          --vw: max(60vw, calc(var(--tw) + 48px + env(safe-area-inset-left))); width: var(--vw); }
  .visual > svg, .visual.bare > svg, .app:not(.start) .visual.bare > svg { top: calc(16px + var(--th) * .0797); bottom: auto; height: var(--th); margin: 0;
                                      left: calc(16px + env(safe-area-inset-left)); right: 16px; width: calc(100% - 32px - env(safe-area-inset-left)); }
  /* the play control in the screen's lower left corner */
  .visual.bare .here { left: calc(16px + env(safe-area-inset-left)); right: auto; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .visual.bare .here .pp { margin-left: 0; }
  .visual.bare .here .pp.word { font-size: calc((var(--pic) - 95px) * 14 / 368); }
  .panel { flex: 1; width: auto; background: var(--bg); padding-right: env(safe-area-inset-right); }
  .panel > .pane { min-width: 0; }
  .pane { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
  #timeline { display: block; padding-top: 20px; padding-bottom: 40px; }   /* (room above the first step's card, clear of the screen's top edge) */
  #timeline > .note-slot, #timeline > .tl { margin: 0; }
  /* Start the next hand in the last card, as on desktop (there's no room under the steps for it to float) */
  .next-fab { display: none; }
  .next-step.again.in-card { display: inline-flex; }
  /* the starting screen, as Figma's Mobile landscape · 0 Start (852 × 393): the heap close up (1110 square, its middle
     42 left of the screen's edge), cut off at 470 across, and the name, line and Get started in a 393-wide column
     from 410 across, its middle 20 below the screen's */
  .app.start .visual.bare { width: 100vw; height: 100dvh; }
  .app.start .visual.bare > svg { top: calc(50% - 170dvh); width: 340dvh; height: 340dvh;
    /* (the heap 1.2 times Figma's, its middle far enough left that its tiles end about 24 short of the words'
       column (it reaches about .42 of its width from its middle), wherever that column sits; no fade) */
    left: calc(94.25vw - 393px - 24px - 0.92 * 340dvh); -webkit-mask-image: none; mask-image: none; }
  .app.start .panel { width: 0; flex: none; }
  .intro .copy { top: 40px; bottom: 0; left: auto; width: 393px; right: max(5.75vw, env(safe-area-inset-right)); justify-content: center; }   /* (393 wide, as Figma: on a smaller phone it keeps its width and the heap gives way) */
  .intro h1 { font-size: 72px; }
  .intro p { width: 310px; font-size: 16px; line-height: 18px; }
  .intro .btn { margin-top: 32px; }
}
/* ═════════ phones: the page itself scrolls ═════════
   On a phone (upright or sideways) the steps scroll the page, not a box inside it, so Safari shrinks its address bar
   and tabs as you scroll, as on any site. The picture stays put while they go by (sticky): at the top when upright,
   on the left when sideways. The starting screen doesn't scroll. (On desktop the step list scrolls on its own, as
   before: app.js scroller() tells which. Not in the iPhone app, which has no Safari bars and keeps the step list scrolling on its own) */
@media (max-width: 859px), (orientation: landscape) and (max-height: 520px) {
  html:not(.native), html:not(.native) body { height: auto; overflow: visible; }
  html:not(.native):has(.app.start), html:not(.native):has(.app.start) body { height: 100%; overflow: hidden; }
  html:not(.native) .app { height: auto; min-height: 100lvh; }
  html:not(.native) .app.start { height: 100lvh; overflow: hidden; }
  html:not(.native) .visual { position: sticky; top: 0; z-index: 3; align-self: flex-start; width: 100%; }
  html:not(.native) .panel { flex: none; overflow: visible; overflow-x: clip; }
  html:not(.native) .pane { flex: none; overflow: visible; }
  html:not(.native) #timeline { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html:not(.native) .next-fab { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); }
  /* steps scrolled up fade out at the picture's edge (only once the page has been scrolled: app.js .scrolled) */
  html:not(.native) .pane.scrolled { -webkit-mask-image: none; mask-image: none; }
  html:not(.native) .app { --pich: calc(min(max(410px, min(100dvh - 300px, 465px)), 87.2vw + 67px) + env(safe-area-inset-top)); }   /* (the picture's height upright: .visual.bare) */
  html:not(.native) .panel::before { content: ""; position: sticky; top: var(--pich); z-index: 2; display: block; height: 32px; margin-bottom: -32px; pointer-events: none;
                   background: linear-gradient(var(--bg), rgba(244, 242, 236, 0)); opacity: 0; transition: opacity .2s var(--ease); }
  html:not(.native).scrolled .panel::before { opacity: 1; }
}
@media (orientation: landscape) and (max-height: 520px) {
  html:not(.native) .visual, html:not(.native) .visual.bare { width: var(--vw); }
  html:not(.native) .panel { flex: 1; min-width: 0; }
  html:not(.native) .app.start .panel { flex: none; }
  html:not(.native) .app.start .visual.bare { width: 100vw; }
  html:not(.native) .panel::before { top: 0; }
}
/* ═════════ iPad upright (and other wide upright screens under 860px) ═════════
   The phone's rules, without its 465px cap: the picture as big as it can be while the tallest step card (Roll the
   dice, about 172px at these widths, under 12px of space) still fits whole below it, and still never so big that
   North and South come within 16px of the sides */
@media (min-width: 600px) and (max-width: 859px) and (orientation: portrait) {
  .visual.bare { --pic: min(100dvh - 260px, 87.2vw + 67px); }
  html:not(.native) .app { --pich: calc(min(100dvh - 260px, 87.2vw + 67px) + env(safe-area-inset-top)); }
  /* Replay as the players' names here (--lf, capped at 16px), level with East · Dealer's */
  .visual.bare .here .pp.word { font-size: var(--lf, 12px); }
  .visual.bare .here { bottom: 7px; }
}
/* the starting screen on an upright tablet: the name, line and Get started just under the heap (it reaches about 68%
   of the screen's height down) instead of at the foot of the tall screen */
@media (orientation: portrait) and (min-width: 600px) {
  .intro .copy { top: 72dvh; bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .app.arrive .intro .copy > * { animation: none; }
  .wall, .stk, .vrow .full { transition: none; }
  .over .pop, .over .slide { animation: none; }
  .over .deal-arrow, .over .deal-arrow path { animation: none; stroke-dashoffset: 0; }
  .over .pulse { display: none; }
  .vrow.wave .up i, .vrow.wave .ttl i { animation: none; }   /* (no wave: Up next is just there) */   /* (just there, still) */
}

/* ═════════ tiles, as in Mahjong Coach ═════════ */
.tile {
  --w: 34px; --depth: .13; --tile-r: 1.5;
  position: relative; display: inline-block; flex-shrink: 0; width: var(--w); height: calc(var(--w) * var(--tile-r));
  padding: 0; border: 0; border-radius: calc(var(--w) * .16); background: linear-gradient(#ffffff, var(--face));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 calc(var(--w) * var(--depth)) 0 var(--edge), 0 calc(var(--w) * var(--depth) + 1px) 0 #c2c2ba, 0 calc(var(--w) * (var(--depth) + .04)) calc(var(--w) * .3) rgba(0, 0, 0, .12);
  margin-bottom: calc(var(--w) * var(--depth) + 1px); vertical-align: top;
}
.tile svg { display: block; width: 100%; height: 100%; padding: 8% 6%; }
.tile.sm { --w: 24px; }
.tile.back {
  background: linear-gradient(180deg, #127a5b, #0d6649);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 max(1px, calc(var(--w) * .033)) 0 rgba(150, 235, 200, .35),
    inset 0 0 calc(var(--w) * .15) rgba(90, 200, 155, .22),
    0 calc(var(--w) * var(--depth)) 0 #08493a, 0 calc(var(--w) * var(--depth) + 1px) 0 #053628, 0 calc(var(--w) * (var(--depth) + .04)) calc(var(--w) * .3) rgba(0, 0, 0, .12);
}
