/* The Rami table (public/js/player-rami.js) on the Obsidian Pulse stage: the pieces the Chkoba
   table has no name for (the discard pile and its slot, the melds in the centre, the joker's
   mark, the counts on the result card). Everything else (the felt, the layers, the cards, the
   pills, the header, the overlays, the controls row) is player.css and pulse-*.css. */
.pa-felt-rami .pa-discard > .card, .pa-felt-rami .pa-melds .card { pointer-events: auto; }
.pa-felt-rami .pa-discard > .pa-discard-slot, .pa-felt-rami .pa-deckstack > .pa-stock-slot {
  position: absolute; left: 0; top: 0; width: 119px; height: 170px; box-sizing: border-box; margin: 0;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  border-radius: 14px; border: 2px dashed rgba(207, 199, 230, .28); color: var(--hb-smoke); font: 600 15px/1.2 var(--body);
  transform-style: preserve-3d; backface-visibility: hidden; pointer-events: auto;
}
.pa-felt-rami .pa-discard-slot.target { border-color: var(--hb-silver); color: var(--hb-silver-2); cursor: pointer; }
/* The empty stock's slot on my draw turn (launch-candidate-17): the empty discard pile's slot, the stock's size. */
.pa-felt-rami .pa-deckstack > .pa-stock-slot { width: 100%; height: 100%; font-size: 18px; }
.pa-felt-rami .pa-discard > .card.target { cursor: pointer; --hb-card-shadow: 0 0 0 2px var(--hb-silver), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-melds { pointer-events: none; }
.pa-felt-rami .pa-melds .pa-meld { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
/* A meld's cards are placed on the plane by their transform alone, like every card in a layer; the
   deck's own position: relative stacked them down the table and over my hand. */
.pa-felt-rami .pa-melds .pa-meld > .card, .pa-felt-rami .pa-melds .pa-meld > .card.hb-card { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 50% 50% 0; }
.pa-felt-rami .pa-melds .pa-meld.target .card { cursor: pointer; --hb-card-shadow: 0 0 0 2px var(--hb-silver), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-melds .pa-meld.pa-mine .card { --hb-card-shadow: 0 0 0 1px rgba(155, 92, 255, .55), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-melds .card.target { cursor: pointer; --hb-card-shadow: 0 0 0 2px var(--hb-crimson-2), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-melds .card.pa-mcard { --h: 120px; }
/* The Obsidian Violet deck (the Heartbeat Deck's tokens, public/css/pulse-cards.css): black paper
   with a violet light from the top, violet hearts and diamonds, silver clubs and spades, a
   lavender hairline, pink jewel; the back's lattice in silver with violet rosettes. The drag ghost
   lives on the body, so it takes the same tokens. */
.pa-felt-rami, .pa-handghost {
  --hb-card-paper: #0d0a14; --hb-card-red: #d79bff; --hb-card-ink: #f1eafd; --hb-card-silver: #b5a3e3; --hb-card-jewel: #e7a6ff;
  --hb-card-rim: #e3d5ff; --hb-card-sheen: 0; --hb-card-glow: 1;
  --hb-back-base: #0a0710; --hb-back-line: #e6ddf7; --hb-back-accent: #cf93ff;
}
.card.pa-joker { position: relative; }
.pa-felt-rami .pa-deckn { white-space: nowrap; }
.pa-felt-rami[data-phase="draw"].pa-myturn .pa-deckstack { cursor: pointer; }
/* The result card's counts. */
.pa-rcard .pa-counts li.me strong { color: var(--hb-silver-2); }
/* The controls row holds up to six buttons on a phone: they wrap. */
.pa-controls-rami .pa-cbtns { flex-wrap: wrap; justify-content: flex-end; }
.pa[data-layout="phone"] .pa-controls-rami .btn { --bh: 38px; padding: 0 .8rem; font-size: .88rem; }
/* Touch: the stock is tapped (or dragged) to draw. */
.pa-felt-rami .pa-deckstack.target { pointer-events: auto; cursor: pointer; }
/* The discard pile in the middle: the cards under the top lie turned a little, and take no pointer. */
.pa-felt-rami .pa-discard > .card.pa-under { pointer-events: none; --hb-card-dim: .9; }
/* The opening slots under the melds on my turn: dashed, lit while a card is dragged, filled with
   the cards dropped there and what they are worth. */
.pa-felt-rami .pa-melds > .pa-slot {
  pointer-events: auto; box-sizing: border-box; height: 118px; padding: 0 6px 5px;
  display: flex; align-items: flex-end; justify-content: center; text-align: center;
  border-radius: 14px; border: 2px dashed rgba(207, 199, 230, .3); background: rgba(10, 6, 18, .25);
  color: var(--hb-smoke); font: 700 17px/1.1 var(--body); cursor: pointer; backface-visibility: hidden;
  transition: border-color .15s, background-color .15s;
}
.pa-felt-rami .pa-melds > .pa-slot.filled { border-style: solid; }
.pa-felt-rami .pa-melds > .pa-slot.ready { border-color: var(--hb-silver); color: var(--hb-silver-2); background: rgba(155, 92, 255, .2); }
.pa-felt-rami .pa-melds > .pa-staged { pointer-events: none; }
html.hb-is-dragging .pa-felt-rami .pa-melds > .pa-slot, html.hb-is-dragging .pa-felt-rami .pa-discard-slot { border-color: rgba(207, 199, 230, .7); background: rgba(155, 92, 255, .12); }
html.hb-is-dragging .pa-felt-rami .pa-discard > .card.pa-ptop { --hb-card-shadow: 0 0 0 2px rgba(207, 199, 230, .8), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-slot.hb-drop-over, .pa-felt-rami .pa-meld.hb-drop-over .card, .pa-felt-rami .pa-discard .hb-drop-over { --hb-card-shadow: 0 0 0 3px var(--hb-crimson-2), 0 .6px 1.2px rgba(0, 0, 0, .55); border-color: var(--hb-crimson-2); }
/* Cards in flight (the deal, a draw, a discard, a meld): over everything, never a target. */
.pa-felt-rami .pa-fx { pointer-events: none; }
.pa-felt-rami .pa-fx > .card { pointer-events: none; will-change: transform; }
/* The turn clock: a ring round the avatar that empties as the turn runs out. */
.pa-ringwrap { position: relative; display: inline-flex; flex: none; }
.pa-ringwrap > .pa-ring { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.pa-ring circle { fill: none; stroke-width: 3; }
.pa-ring .bg { stroke: rgba(207, 199, 230, .18); }
.pa-ring .fg { stroke: var(--hb-silver-2, #e6e0f5); stroke-dasharray: 100; stroke-dashoffset: 0; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.pa-ringwrap.urgent .pa-ring .fg { stroke: var(--hb-crimson-2, #ff4d6d); }
@media (prefers-reduced-motion: reduce) { .pa-ring .fg { transition: none; } }
/* The club rules: the card taken from the discard pile, which must go down this turn; a player who
   is out (at 301) is dimmed; the running totals sit with the seat's stats. */
.pa-felt-rami .pa-hand .card.pa-must { --hb-card-shadow: 0 0 0 3px var(--hb-crimson-2), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-seat.pa-out .pa-stag { opacity: .55; }
.pa-felt-rami .pa-stat.pa-total { font-variant-numeric: tabular-nums; }
/* My hand can be arranged at any time (drag a card onto another, or Shift and an arrow): a card
   that cannot be played now looks it, but still takes the pointer. */
.pa-felt-rami .pa-hand > .card.pa-idle:not(.chosen), .pa-felt-rami.pa-myturn .pa-hand > .card.pa-idle:not(.chosen) { --hb-card-dim: .94; --hb-card-shadow: 0 .6px 1.2px rgba(0, 0, 0, .55); cursor: grab; }
.pa-felt-rami .pa-hand > .card.hb-drop-over { --hb-card-shadow: -3px 0 0 0 var(--hb-silver-2, #e6e0f5), 0 .6px 1.2px rgba(0, 0, 0, .55); }
/* Dragging a card in my hand: the others slide to open its place; the card itself is lit. */
.pa-felt-rami .pa-hand.pa-reflow > .card { transition: transform 150ms var(--hb-ease, ease-out); }
.pa-handghost { --hb-card-shadow: 0 0 0 3px var(--hb-gold, #e7c35a), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-handghost.card { box-shadow: 0 0 0 3px var(--hb-gold, #e7c35a); border-radius: calc(var(--h, 200px) * .07); }
@media (prefers-reduced-motion: reduce) { .pa-felt-rami .pa-hand.pa-reflow > .card { transition: none; } }
.pa-felt-rami.pa-reduce .pa-hand.pa-reflow > .card { transition: none; }
/* A card that fits a meld on the table can't be thrown: a dashed gold edge. A pile card reached
   for and put back gives a small shake. */
.pa-felt-rami .pa-hand .card.pa-bound { --hb-card-shadow: 0 0 0 2px rgba(232, 196, 110, .85), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami .pa-hand .card.pa-bound::after { content: ''; position: absolute; inset: 4px; border: 1.5px dashed rgba(232, 196, 110, .7); border-radius: 6px; pointer-events: none; }
@keyframes pa-refused { 0%, 100% { translate: 0 0; } 20% { translate: -7px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 2px 0; } }
.pa-felt-rami .pa-ptop.pa-refused { animation: pa-refused .45s ease-out; }
@media (prefers-reduced-motion: reduce) { .pa-felt-rami .pa-ptop.pa-refused { animation: none; } }
/* ----- The flat Rami table (2026-10-30, the Kartaclub-style layout the owner asked for, in our
   purple): a landscape felt seen straight from above with a dark rim on a darker floor, the club's
   pills on its edges, the gold clock, the "Your turn" pill, the opening's count, the scores note in
   the corner and the status line under my hand. The felt's own flat rules (player.css .pa-flat)
   grey my hand and enlarge the backs for the Chkoba table: Rami keeps its hand lit and its backs
   small. ----- */
/* The room (2026-10-31, after the recordings): a dark tiled floor, the wooden table's frame around
   the mat, and the mat itself, a near-black purple cloth with a faint weave, where the club has
   black. The frame is the plane's ::before, laid just behind the plane in the 3D space so the mat
   covers it; the floor is the scene behind the camera. */
.pa-felt-rami.pa-flat, .pa-felt-rami.pa-flat .hb-stage-host, .pa-felt-rami.pa-flat .hb-stage { background: #0a0612; }
.pa-felt-rami.pa-flat .hb-stage > .hb-scene {
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 132px 132px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 132px 132px,
    radial-gradient(ellipse at 50% 42%, #2a1840 0%, #170d24 48%, #080510 100%);
}
.pa-felt-rami.pa-flat .hb-cam > .hb-plane {
  border-radius: 46px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .6 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px 180px,
    radial-gradient(ellipse at 50% 44%, #221335 0%, #180c26 50%, #0e0717 100%);
  box-shadow: 0 0 0 3px #150a08, 0 0 0 5px rgba(255, 226, 190, .09), inset 0 0 140px rgba(0, 0, 0, .62), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.pa-felt-rami.pa-flat .hb-cam > .hb-plane::before {
  content: ''; position: absolute; inset: -150px -230px; border-radius: 150px; pointer-events: none; transform: translateZ(-1px);
  background:
    linear-gradient(135deg, rgba(170, 110, 255, .12), transparent 38%, transparent 62%, rgba(170, 110, 255, .06)),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .35) 100%),
    repeating-linear-gradient(91deg, rgba(0, 0, 0, .16) 0 2px, rgba(255, 235, 210, .035) 2px 3px, transparent 3px 11px),
    repeating-linear-gradient(89.3deg, rgba(0, 0, 0, .08) 0 5px, transparent 5px 23px),
    linear-gradient(180deg, #4f2f20 0%, #3d2217 48%, #2c1710 100%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .85), 0 0 0 2px #120806, inset 0 2px 0 rgba(255, 225, 190, .1), inset 0 -4px 0 rgba(0, 0, 0, .55), inset 0 0 0 10px rgba(0, 0, 0, .12);
}
.pa-felt-rami.pa-flat:not(.pa-myturn) .pa-hand .card { --hb-card-filter: none; }
.pa-felt-rami.pa-flat .pa-ohand > .card { --h: 144px; }
/* the header strip: the three pieces in one row at the top left (the far pill takes the top centre) */
.pa-felt-rami.pa-flat .pa-thdr { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "l c r"; align-items: center; }
.pa-felt-rami.pa-flat .pa-thdr-c { font-size: 1em; padding-block: .25em; }
/* the pills: avatar, name and chips in a row, the clock at the end */
.pa-felt-rami.pa-flat .pa-seat .pa-stag {
  font-size: 1.22em; flex-direction: row; align-items: center; gap: .6em; padding: .3em 1.1em .3em .35em; border-radius: 999em; max-width: none;
  background: linear-gradient(180deg, #2c1744, #170c29);
  border: .09em solid rgba(255, 209, 102, .32); box-shadow: 0 .5em 1.4em rgba(0, 0, 0, .7), inset 0 .07em 0 rgba(255, 255, 255, .06);
}
.pa-felt-rami.pa-flat .pa-seat.pa-turn > .pa-stag { box-shadow: 0 0 0 .12em rgba(255, 209, 102, .55), 0 .5em 1.4em rgba(0, 0, 0, .7); border-color: rgba(10, 6, 18, .9); }
.pa-felt-rami.pa-flat .pa-seat .pa-avatar { --av: 3.1em; box-shadow: 0 0 0 .13em #ffd166, 0 0 0 .2em rgba(0, 0, 0, .5); }
.pa-felt-rami.pa-flat .pa-seat .pa-sid { align-items: flex-start; gap: .25em; max-width: none; }
.pa-felt-rami.pa-flat .pa-seat .pa-sname { font-size: 1.08em; font-weight: 800; color: #fff; max-width: 9em; }
.pa-felt-rami.pa-flat .pa-seat.pa-turn .pa-sname::before { display: none; }
.pa-felt-rami.pa-flat .pa-seat .pa-chips { display: flex; gap: .3em; flex-wrap: wrap; align-items: center; }
.pa-felt-rami.pa-flat .pa-seat .pa-chip {
  padding: .14em .6em; border-radius: 999em; background: rgba(10, 6, 18, .78); border: .07em solid rgba(232, 196, 110, .4);
  color: #ffd166; font: 800 .62em/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.pa-felt-rami.pa-flat .pa-seat .pa-chip-pts { color: var(--hb-silver-2); border-color: rgba(207, 199, 230, .3); }
.pa-felt-rami.pa-flat .pa-seat .pa-badge { font-size: .62em; }
.pa-felt-rami.pa-flat .pa-seat.pa-out .pa-stag { opacity: .6; }
.pa-felt-rami.pa-flat[data-dense="1"] :is(.pa-pos-left, .pa-pos-right) .pa-avatar { display: inline-grid; }
.pa-felt-rami.pa-flat[data-dense="1"] :is(.pa-pos-left, .pa-pos-right) .pa-stag { gap: .4em; padding: .25em .7em .25em .3em; max-width: none; }
/* the clock: a gold circle with the seconds, its ring emptying */
.pa-felt-rami .pa-clock {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 2.6em; height: 2.6em; border-radius: 50%;
  background: #1a0f2a; box-shadow: 0 0 0 .14em #ffd166, 0 0 .9em rgba(255, 209, 102, .45);
  color: #ffd166; font: 800 .95em/1 var(--display); font-variant-numeric: tabular-nums;
}
.pa-felt-rami .pa-clock > .pa-ring { position: absolute; inset: -.32em; width: calc(100% + .64em); height: calc(100% + .64em); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.pa-felt-rami .pa-clock .pa-ring .bg { stroke: rgba(255, 209, 102, .16); }
.pa-felt-rami .pa-clock .pa-ring .fg { stroke: #ffd166; }
.pa-felt-rami .pa-clock .pa-clock-n:not(:empty)::after { content: 's'; font-size: .62em; margin-left: .06em; opacity: .85; }
.pa-felt-rami .pa-clock.urgent { color: var(--hb-crimson-2); box-shadow: 0 0 0 .14em var(--hb-crimson-2), 0 0 .9em rgba(255, 77, 109, .5); }
.pa-felt-rami .pa-clock.urgent .pa-ring .fg { stroke: var(--hb-crimson-2); }
/* the clock beside the pile is a HUD piece like the others: laid out at the HUD's top left and moved by its pin (the
   clock's own position: relative above would leave it in the line's flow, which starts at the right edge in Arabic) */
.pa-felt-rami .hb-hud > .pa-clock-mid { position: absolute; left: 0; top: 0; width: 3.1em; height: 3.1em; font-size: 1.12em; }
/* "Your turn" under the pile */
.pa-felt-rami .hb-hud > .pa-turnpill {
  padding: .32em 1.1em; border-radius: 999em; border: .1em solid #ffd166; color: #ffd166; background: rgba(14, 9, 23, .82);
  font: 800 .78em/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 0 .8em rgba(255, 209, 102, .35);
}
.pa-felt-rami .hb-hud > .pa-turnpill::before, .pa-felt-rami .hb-hud > .pa-turnpill::after { content: '•'; margin: 0 .55em; opacity: .8; }
/* the opening's count */
.pa-felt-rami .hb-hud > .pa-openn {
  display: inline-flex; gap: .5em; align-items: baseline; white-space: nowrap;
  font: 700 .82em/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: rgba(207, 199, 230, .7); text-shadow: 0 .1em .3em rgba(0, 0, 0, .8);
}
.pa-felt-rami .hb-hud > .pa-openn .pa-openn-n { color: #ffd166; font-size: 1.25em; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
/* the stock's word and count in the corner */
.pa-felt-rami.pa-flat .hb-hud > .pa-stockn { display: flex; flex-direction: column; align-items: flex-end; gap: .1em; font-size: 1em; }
.pa-felt-rami.pa-flat .pa-stockn .pa-deckl { font: 800 .82em/1.1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--hb-silver-2); }
.pa-felt-rami.pa-flat .pa-stockn .pa-deckc { font: 600 .78em/1.1 var(--body); color: var(--hb-smoke); }
/* the scores note: a cream paper on the frame's corner, as the club's torn sheet */
.pa-felt-rami .hb-hud > .pa-scorenote {
  width: 10.4em; padding: .55em .8em .7em; transform: rotate(-1.5deg);
  border-radius: .25em .9em .35em 1.1em / .8em .3em 1em .35em;
  background: linear-gradient(170deg, #fcf8ec, #ede4cc); color: #2b2436; font: 600 1.1em/1.3 var(--body);
  box-shadow: 0 .4em 1.2em rgba(0, 0, 0, .6), inset 0 0 0 .07em rgba(0, 0, 0, .05), inset 0 -.6em 1em rgba(0, 0, 0, .05);
}
.pa-felt-rami .pa-scorenote-t { display: block; font: 800 1.45em/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #2f2744; margin-bottom: .3em; padding-bottom: .15em; border-bottom: .09em solid rgba(43, 36, 54, .3); }
.pa-felt-rami .pa-scorenote-l { list-style: none; margin: 0; padding: 0; }
.pa-felt-rami .pa-scorenote-l li { display: flex; justify-content: space-between; gap: .6em; align-items: baseline; }
.pa-felt-rami .pa-scorenote-l li.me .pa-scorenote-n::before { content: '●'; font-size: .55em; margin-right: .35em; vertical-align: middle; color: #7a1f8f; }
.pa-felt-rami .pa-scorenote-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4a4160; }
.pa-felt-rami .pa-scorenote-l strong { font: 800 1.05em/1.2 var(--display); font-variant-numeric: tabular-nums; color: #2b2436; }
/* the status line under my hand: plain words on the frame, as the club's */
.pa-felt-rami.pa-flat .pa-meline.pa-sline { gap: .5em; padding: 0 .4em; background: none; border: 0; box-shadow: none; }
.pa-felt-rami.pa-flat .pa-sline.pa-turn { box-shadow: none; }
.pa-felt-rami.pa-flat .pa-sline .pa-sline-t { color: #ece5f7; font-weight: 600; font-size: .95em; white-space: nowrap; text-shadow: 0 .1em .4em rgba(0, 0, 0, .9); }
.pa-felt-rami.pa-flat .pa-sline .pa-clock-sm { width: 2.2em; height: 2.2em; font-size: .85em; }
/* the slots: dark wells that turn gold under a dragged card */
.pa-felt-rami.pa-flat .pa-melds > .pa-slot { background: rgba(8, 4, 14, .38); border-color: rgba(207, 199, 230, .22); }
.pa-felt-rami.pa-flat .pa-slot.hb-drop-over { border-color: #ffd166; background: rgba(255, 209, 102, .14); --hb-card-shadow: 0 0 0 3px #ffd166, 0 .6px 1.2px rgba(0, 0, 0, .55); }
html.hb-is-dragging .pa-felt-rami.pa-flat .pa-melds > .pa-slot { border-color: rgba(255, 209, 102, .55); background: rgba(255, 209, 102, .07); }
/* at rest the mat is bare, as the club's: the empty slots appear while cards are selected or dragged */
.pa-felt-rami.pa-flat .pa-melds > .pa-slot:not(.filled) { opacity: 0; pointer-events: none; transition: opacity .25s; }
html.hb-is-dragging .pa-felt-rami.pa-flat .pa-melds > .pa-slot:not(.filled), .pa-felt-rami.pa-flat.pa-sel .pa-melds > .pa-slot:not(.filled), .pa-felt-rami.pa-flat .pa-melds > .pa-slot:not(.filled):focus-visible { opacity: 1; pointer-events: auto; }
/* ----- Between rounds on the flat table (part 2 of the Kartaclub-style redo): the banner, then
   the SCORES paper with the standing and the round history. ----- */
.pa-felt-rami .pa-midover[data-kind="banner"] { background: none; align-items: start; padding-top: clamp(40px, 16%, 160px); pointer-events: none; }
.pa-felt-rami .pa-rbanner {
  display: flex; align-items: center; gap: .9rem; padding: .7rem 1.2rem .7rem .9rem; max-width: min(560px, 96%);
  border-radius: 16px; border: 1px solid rgba(255, 209, 102, .45); color: var(--hb-silver-2);
  background: linear-gradient(180deg, rgba(48, 24, 78, .97), rgba(28, 13, 48, .97));
  box-shadow: 0 18px 50px -14px rgba(0, 0, 0, .9), 0 0 0 4px rgba(255, 209, 102, .08);
  animation: pop-in .3s var(--hb-ease);
}
.pa-felt-rami .pa-rbanner-ic { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid rgba(255, 209, 102, .5); color: #ffd166; flex: none; }
.pa-felt-rami .pa-rbanner-ic .pa-ic { width: 1.4rem; height: 1.4rem; }
.pa-felt-rami .pa-rbanner-t { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pa-felt-rami .pa-rbanner-t small { font: 800 .68rem/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; color: #ffd166; }
.pa-felt-rami .pa-rbanner-t strong { font: 800 1.25rem/1.2 var(--display); color: #fff; }
.pa-felt-rami .pa-rbanner-l { font-size: .72rem; color: var(--hb-smoke); }
.pa-felt-rami .pa-rbanner-n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; flex: none; border: 2px solid #ffd166; color: #ffd166; font: 800 1.1rem/1 var(--display); font-variant-numeric: tabular-nums; }
/* the paper */
.pa-felt-rami .pa-rsheet {
  width: min(820px, 100%); max-height: 100%; overflow: auto; box-sizing: border-box; padding: 1rem 1.3rem 1.1rem;
  border-radius: 6px; color: #2b2436; background: linear-gradient(180deg, #fbf7ea, #f0e8d3);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(0, 0, 0, .05);
  animation: pop-in .3s var(--hb-ease); font-size: .92rem;
}
.pa-felt-rami .pa-rsheet-h { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid rgba(43, 36, 54, .55); padding-bottom: .35rem; margin-bottom: .6rem; }
.pa-felt-rami .pa-rsheet-h h3 { margin: 0; font: 800 1.5rem/1.1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #2b2436; }
.pa-felt-rami .pa-rsheet-sub { color: #6b6380; font-size: .85rem; }
.pa-felt-rami .pa-rsheet-sec { margin-bottom: .7rem; }
.pa-felt-rami .pa-rsheet-st { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; border-bottom: 1px solid rgba(43, 36, 54, .2); padding-bottom: .2rem; margin-bottom: .45rem; }
.pa-felt-rami .pa-rsheet-st h4 { margin: 0; font: 700 1.05rem/1.2 var(--display); color: #2b2436; }
.pa-felt-rami .pa-rsheet-note { font: 800 .62rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #8a809c; }
.pa-felt-rami .pa-rsheet-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .9rem; }
.pa-felt-rami .pa-rsheet-grid li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; border-bottom: 1px dashed rgba(43, 36, 54, .15); }
.pa-felt-rami .pa-rsheet-grid li.me .pa-rsheet-name { font-weight: 800; }
.pa-felt-rami .pa-rsheet-grid strong { margin-left: auto; font: 800 1.2rem/1.1 var(--display); font-variant-numeric: tabular-nums; color: #2b2436; }
.pa-felt-rami .pa-rsheet-rank { width: 1.1rem; text-align: center; font: 700 .7rem/1 var(--display); color: #8a809c; }
.pa-felt-rami .pa-rsheet-av { --av: 1.5rem; width: 1.5rem; height: 1.5rem; font-size: .7rem; flex: none; }
.pa-felt-rami .pa-rsheet-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2b2436; }
.pa-felt-rami .pa-rsheet-rt { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; margin-bottom: .3rem; }
.pa-felt-rami .pa-rsheet-rt strong { font: 800 1.1rem/1.2 var(--display); color: #2b2436; }
.pa-felt-rami .pa-rsheet-rt span { color: #1d6b4a; font-weight: 700; font-size: .85rem; }
.pa-felt-rami .pa-rsheet-tw { overflow: auto; }
.pa-felt-rami .pa-rsheet-t { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pa-felt-rami .pa-rsheet-t th { font: 800 .6rem/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #8a809c; text-align: right; padding: .2rem .45rem; border-bottom: 1px solid rgba(43, 36, 54, .25); white-space: nowrap; }
.pa-felt-rami .pa-rsheet-t th:first-child { text-align: left; }
.pa-felt-rami .pa-rsheet-t td { padding: .32rem .45rem; text-align: right; border-bottom: 1px solid rgba(43, 36, 54, .12); vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pa-felt-rami .pa-rsheet-t td small { display: block; font: 700 .58rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: #8a809c; }
.pa-felt-rami .pa-rsheet-t td.pa-rsheet-p { text-align: left; display: flex; align-items: center; gap: .45rem; }
.pa-felt-rami .pa-rsheet-t tr.me td.pa-rsheet-p { font-weight: 800; }
.pa-felt-rami .pa-rsheet-t .pa-rsheet-dash { color: #b5adc4; }
.pa-felt-rami .pa-rsheet-t .pa-rsheet-v { font-weight: 700; color: #2b2436; }
.pa-felt-rami .pa-rsheet-t .pa-rsheet-plus { color: #b4182f; }
.pa-felt-rami .pa-rsheet-t td.pa-rsheet-tot strong { font: 800 1.05rem/1.1 var(--display); color: #1d6b4a; }
.pa-felt-rami .pa-rsheet-t tr.pa-rsheet-out td { opacity: .6; }
.pa-felt-rami .pa-rsheet-pg { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .5rem; }
.pa-felt-rami .pa-rsheet-pg .btn { color: #2b2436; border-color: rgba(43, 36, 54, .35); background: rgba(255, 255, 255, .5); }
.pa-felt-rami .pa-rsheet-pg .btn:disabled { opacity: .35; }
.pa-felt-rami .pa-rsheet-pn { font: 700 .8rem/1.2 var(--display); color: #4a4160; }
.pa-felt-rami .pa-rsheet-next { margin: .6rem 0 0; text-align: center; font-weight: 700; color: #2b2436; }
.pa-felt-rami .pa-rsheet .pa-reality { color: var(--hb-silver-2); background: #2b2240; }
/* the history block inside the result card (cream on the flat table) */
.pa-felt-rami.pa-flat .pa-rcard .pa-rsheet-hist { text-align: left; margin: .6rem 0; }
.pa-felt-rami.pa-flat .pa-rcard:has(.pa-rsheet-hist) { width: min(760px, 100%); }
@media (max-width: 640px) {
  .pa-felt-rami .pa-rsheet { padding: .7rem .7rem .8rem; font-size: .84rem; }
  .pa-felt-rami .pa-rsheet-grid { grid-template-columns: 1fr; }
  .pa-felt-rami .pa-rsheet-t { font-size: .76rem; }
}
/* The club's room on a phone: the other players' pills are small columns (avatar, name, cards) in
   a row along the top of the mat, the rosettes hang under them; the note and the status line are
   smaller; the controls row is compact. */
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-seat .pa-stag { font-size: .8em; flex-direction: column; gap: .12em; padding: .28em .45em .4em; border-radius: 1.3em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-seat .pa-avatar { --av: 2.7em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-seat .pa-sid { align-items: center; gap: .12em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-seat .pa-sname { max-width: 6.6em; font-size: .95em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-seat .pa-chip { font-size: .72em; }
.pa[data-layout="phone"] .pa-felt-rami .hb-hud > .pa-scorenote { width: 8.4em; font-size: .78em; padding: .4em .6em .5em; }
.pa[data-layout="phone"] .pa-felt-rami .pa-scorenote-t { font-size: 1.25em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-sline .pa-sline-t { font-size: .84em; white-space: normal; text-align: center; max-width: 70vw; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-thdr { font-size: .8em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .hb-hud > .pa-stockn { align-items: center; font-size: .85em; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .hb-hud > .pa-openn { font-size: .85em; }
/* the phone's frame reaches the bar and the controls: the felt itself is wood, the frame is taller */
.pa[data-layout="phone"] .pa-felt-rami.pa-flat, .pa[data-layout="phone"] .pa-felt-rami.pa-flat .hb-stage-host, .pa[data-layout="phone"] .pa-felt-rami.pa-flat .hb-stage { background: #3a2016; }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .hb-stage > .hb-scene {
  background:
    repeating-linear-gradient(91deg, rgba(0, 0, 0, .16) 0 2px, rgba(255, 235, 210, .035) 2px 3px, transparent 3px 11px),
    repeating-linear-gradient(89.3deg, rgba(0, 0, 0, .08) 0 5px, transparent 5px 23px),
    linear-gradient(180deg, #4f2f20 0%, #3d2217 48%, #2c1710 100%);
}
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .hb-cam > .hb-plane::before { inset: -420px -320px; border-radius: 160px; }

/* ---------- The club room, exactly (2026-10-31, evening) ---------- */
/* the gold button under the slots that lays the opening down (the dock's Lay down is away) */
.pa-felt-rami .hb-hud > .pa-openbtn {
  pointer-events: auto; cursor: pointer; appearance: none; border: .1em solid #ffd166; border-radius: 999em; padding: .5em 1.2em;
  background: linear-gradient(180deg, #4a2b12, #2a160a); color: #ffd166; font: 800 .82em/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 0 .9em rgba(255, 209, 102, .4), 0 .4em 1em rgba(0, 0, 0, .6); transition: transform .15s, box-shadow .15s;
}
.pa-felt-rami .hb-hud > .pa-openbtn:hover { transform: translateY(-1px); box-shadow: 0 0 1.2em rgba(255, 209, 102, .6), 0 .5em 1.2em rgba(0, 0, 0, .6); }
.pa-felt-rami .hb-hud > .pa-openbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* the pile's top card: a gold ring when it can be taken, a soft one while a card is dragged (it is the discard spot) */
.pa-felt-rami.pa-flat .pa-discard > .card.target { --hb-card-shadow: 0 0 0 3px #ffd166, 0 0 1.2em rgba(255, 209, 102, .45), 0 .6px 1.2px rgba(0, 0, 0, .55); }
html.hb-is-dragging .pa-felt-rami.pa-flat .pa-discard > .card.pa-ptop { --hb-card-shadow: 0 0 0 2px rgba(255, 209, 102, .85), 0 0 1em rgba(255, 209, 102, .35), 0 .6px 1.2px rgba(0, 0, 0, .55); }
.pa-felt-rami.pa-flat .pa-discard-slot { border-color: rgba(255, 209, 102, .35); color: rgba(255, 209, 102, .6); }
.pa-felt-rami.pa-flat .pa-discard-slot.target, html.hb-is-dragging .pa-felt-rami.pa-flat .pa-discard-slot { border-color: #ffd166; color: #ffd166; background: rgba(255, 209, 102, .08); }
/* the stock: a gold ring on my turn, when it can be drawn from */
.pa-felt-rami.pa-flat .pa-deckstack.target .hb-stack { filter: drop-shadow(0 0 .3em rgba(255, 209, 102, .85)) drop-shadow(0 0 .9em rgba(255, 209, 102, .35)); }
/* the phone's open button under the slot row (launch-candidate-21): the HUD is drawn at the stage's scale (about .3 on a
   phone), so the pill was 3 to 4 px of text in a box 8 to 10 px tall; on phones it is sized from that scale
   (--hb-stage-s, player-rami.js hudScale) to be drawn no smaller than the dock's buttons: 13 px text, a pill about 36 px
   tall, and a tap area 12 px taller again (::before, invisible). Same element, colours and words; at that size it no
   longer fits under the slot row, so on a portrait table it sits above the discard pile (OPEN_PORTRAIT_SPOT). */
.pa[data-layout="phone"] .pa-felt-rami .hb-hud > .pa-openbtn { font-size: calc(13px / var(--hb-stage-s, 1)); padding: .8em 1.2em; border-width: calc(1.5px / var(--hb-stage-s, 1)); }
.pa[data-layout="phone"] .pa-felt-rami .hb-hud > .pa-openbtn::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-6px / var(--hb-stage-s, 1)); bottom: calc(-6px / var(--hb-stage-s, 1)); }
.pa[data-layout="phone"] .pa-felt-rami.pa-flat .pa-melds > .pa-slot .pa-slot-l { font-size: .62em; }
/* A phone's tap areas around the melds (launch-candidate-21; player-rami.js placeMeldZones): invisible, in the stage
   over the table plane and under the HUD (z-index 2), while a hand card is selected on my turn. */
.pa-felt-rami .hb-stage > .pa-meldzones { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pa-felt-rami .pa-meldzone { position: absolute; pointer-events: auto; background: transparent; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
