/* The laptop's and the tablet's table (bigtable.js; checklist 107, 22 Nov 2026). Every rule here is under html.bt, a class the
   upright phone never has, so the phone's table is exactly as phonetable.css makes it. */

/* ---- one sort control: the Sort button on the rack (More and Table settings no longer repeat it) ---- */
html.bt .auto-sort { display: none; }

/* ---- 2. a wind letter by every name, East in red and ringed in gold ---- */
html.bt .bt-wind { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 1.5em; height: 1.5em; margin-right: 6px;
  border-radius: 50%; vertical-align: middle; font: 800 0.8rem/1 var(--g-font-body, system-ui); background: rgba(0, 0, 0, 0.55); color: #fff6e2; border: 1px solid rgba(255, 246, 226, 0.55); flex: none; }
html.bt .bt-wind.east { width: 1.8em; height: 1.8em; font-size: 0.9rem; background: #c8321f; color: #fff; border-color: #ffd98a; box-shadow: 0 0 0 2px #f6c443; }
html.bt .around .seat-name .east-mark { display: none; }     /* the wind letter beside the name says it */

/* ---- 1. whose turn: strong gold on the name, the row of tiles and the seat; the rack and the status line on your turn ---- */
html.bt .around .seat.bt-turn .seat-name { background: linear-gradient(180deg, #ffe9a3, #f6c443); border-color: #fff3c4; box-shadow: 0 0 0 3px #fff3c4, 0 0 24px 8px rgba(255, 211, 77, 0.95); }
html.bt .around .seat.bt-turn .seat-name .seat-who, html.bt .around .seat.bt-turn .seat-name .seat-sub, html.bt .around .seat.bt-turn .seat-name .seat-where { color: #2a1a02; }
html.bt .around .seat.bt-turn .seat-name .seat-count { background: rgba(42, 26, 2, 0.85); color: #ffe9a3; }
html.bt .around .seat.bt-turn .seat-tiles { box-shadow: 0 0 0 4px #ffd34d, 0 0 22px 8px rgba(255, 211, 77, 0.9); border-radius: 6px; }
html.bt .around .seat.bt-turn .seat-person::after { background: #ffd34d; box-shadow: 0 0 12px 5px rgba(255, 211, 77, 0.95); }
html.bt .rack.bt-turn #hand { outline: 4px solid #ffd34d; outline-offset: 2px; box-shadow: 0 0 26px 10px rgba(255, 211, 77, 0.85); }
html.bt .rack.bt-turn .rack-plate .me-name { box-shadow: 0 0 0 3px #ffd34d, 0 0 18px 6px rgba(255, 211, 77, 0.9); }
html.bt #ask.bt-turn:not(.ask-over) { border-color: #ffd34d; box-shadow: 0 0 0 3px #ffd34d, 0 0 22px 7px rgba(255, 211, 77, 0.8); }
html.bt .slot-centre { position: relative; }

/* ---- 3. Going for: a strip in the rack's row, and the Change list ---- */

html.bt .bt-go-shade { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.1s ease-out; }
html.bt .bt-go-shade.open { opacity: 1; pointer-events: auto; }
html.bt .bt-go-change { position: fixed; left: 50%; top: 50%; width: min(620px, calc(100vw - 32px)); max-height: min(78vh, 720px); z-index: 61; display: flex; flex-direction: column;
  background: #f8f1e0; color: #2a2418; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); transform: translate(-50%, -50%); visibility: hidden; opacity: 0; transition: opacity 0.1s ease-out, visibility 0s linear 0.1s; }
html.bt .bt-go-change.open { visibility: visible; opacity: 1; transition: opacity 0.1s ease-out, visibility 0s; }
html.bt .bt-go-change .go-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 4px 18px; }
html.bt .bt-go-change .go-head b { flex: 1; font: 400 1.3rem/1.15 var(--g-font-display, inherit); }
html.bt .go-close, html.bt .more-close { min-height: 44px; min-width: 80px; padding: 0 18px; border-radius: 999px; border: 2px solid #3a2e1a; background: #fff; color: #2a2418; font: 800 1rem/1 var(--g-font-body, system-ui); cursor: pointer; }
html.bt .bt-go-change .go-sub { margin: 0; padding: 0 18px 8px; font-size: 0.95rem; color: #5a5040; }
html.bt .bt-go-change .go-list { overflow-y: auto; padding: 0 12px 14px; display: flex; flex-direction: column; gap: 6px; }
html.bt .bt-go-change .go-line { box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; flex: none; padding: 8px 12px; text-align: left; border-radius: 12px; border: 1px solid #d8cba9; background: #fff; color: #2a2418; cursor: pointer; }
html.bt .bt-go-change .go-line:hover { background: #fff7dc; }
html.bt .bt-go-change .go-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html.bt .bt-go-change .go-line b { font-size: 1.05rem; }
html.bt .bt-go-change .go-away { font-weight: 800; background: #f6e7b0; border-radius: 999px; padding: 2px 10px; }
html.bt .bt-go-change .go-pts { font-size: 0.85rem; color: #6a5d44; }
html.bt .bt-go-change .go-mark { align-self: flex-end; font-style: normal; font-size: 0.8rem; font-weight: 800; color: #7a4d08; }
html.bt .bt-go-change .go-line.now { border: 2px solid #d68c12; background: #fff7dc; }
html.bt .bt-go-change .go-tiles { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; min-height: 28px; }
html.bt .bt-go-change .go-tiles .tile { --tile-base-w: 20px; --tile-base-h: 28px; --tile-scale: 1; --fit: 1; --tile-size: 1; width: 20px; height: 28px; border-radius: 3px; flex: none; margin: 0; position: relative; }
html.bt .bt-go-change .go-tiles .need-tile { opacity: 0.4; }
html.bt .bt-go-change .go-tiles .have-tile { opacity: 1; }

/* ---- 4. More: a Close at its top ---- */
html.bt .more-list.more-sheet { overflow-y: auto; max-height: 88vh; }
html.bt .more-list.more-sheet > .more-head { position: sticky; top: 0; z-index: 2; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 8px 4px; margin: 0 0 4px;
  background: #174632; border: 0; box-shadow: 0 2px 0 rgba(255, 233, 163, 0.25); }
html.bt .more-head b { font: 400 1.4rem/1 var(--g-font-display, inherit); color: #ffe9a3; }
html.bt .more-list.more-sheet > .more-head .more-close { background: #fff6e2; }

/* back from a live game: stay or leave */
html.bt .bt-leave { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 90; width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px; border-radius: 16px;
  background: #f8f1e0; color: #2a2418; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 12px 40px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; gap: 10px; }
html.bt .bt-leave[hidden] { display: none; }
html.bt .bt-leave b { font: 400 1.4rem/1.1 var(--g-font-display, inherit); }
html.bt .bt-leave p { margin: 0; }
html.bt .bt-leave button { min-height: 48px; border-radius: 999px; border: 2px solid #3a2e1a; background: #fff; color: #2a2418; font: 800 1rem/1 var(--g-font-body, system-ui); cursor: pointer; }
html.bt .bt-leave button.primary { background: #f6c443; }

/* ---- the thrown tiles: the size that fits the middle (bigtable.js fitPool) ---- */
html.bt .centre .pool .tile { --tile-scale: var(--bt-pool, 0.44); }

/* the end of a game on a tablet held upright: the card chip would lie under the player across, whose plate is centered */
@media (max-width: 1000px) { html.bt .table:has(#ask.ask-over) #gbCard { display: none; } }

/* the buttons of a call wrap inside the question's box on a narrow middle, never run out of it */
html.bt .table-ask:not(.ask-over) .ask-go { flex-wrap: wrap; justify-content: center; max-width: 100%; box-sizing: border-box; }
html.bt .table-ask:not(.ask-over) { box-sizing: border-box; max-width: 100%; }

/* the pill that says whose turn it is has its own strip at the top of the middle, so it never lies over a thrown tile */
html.bt .table-ask:not(.ask-over) { padding-top: 8px; padding-bottom: 8px; gap: 4px; }
html.bt .table #ask[data-phase="claim-offer"]:not(.ask-over) .ask-go { flex-wrap: wrap; justify-content: center; }

/* the Coach More line is a small tab, so it fits whole in the short box the table leaves her late in a game */
html.bt #coachBox.scrolls:not(.at-end) > .coach-more { min-height: 0; height: 26px; line-height: 1; padding: 0 12px; }

/* a short screen: the question and the pile sit closer, so the middle holds them without scrolling (a scrolled middle cut the plate of the player across) */
@media (max-height: 900px) {
  html.bt .slot-centre .centre { gap: 4px; }
  html.bt .table-ask:not(.ask-over) .ask-line { font-size: 1.3rem; line-height: 1.15; }
  html.bt .table-ask:not(.ask-over) { gap: 2px; }
  html.bt .centre .now { margin: 0; }
}

html.bt #coachBox.no-more > .coach-more { display: none !important; }
/* a short screen: the thrown tile in the question is a little smaller, so the question takes less of the middle */
@media (max-height: 900px) { html.bt .ask-thrown .tile { --tile-scale: 0.58; } }

/* ================================================================================================================================
   The stable frame (23 Nov 2026). bigtable.js frame() works every size out once for the screen and sets them as variables on the
   page: --bt-u (an opponent's tile back, wide), --bt-bh (tall), --bt-pitch (one place on a rack), --bt-p (rack wood), --bt-plate (a
   name plate's height), --bt-sw and --bt-sh (a tile in a called-tiles strip), --bt-st (a strip's thickness), --bt-sl (a strip's
   length: fourteen tiles and the gaps between five sets), --bt-pg (the gap between a rack and its strip), --bt-acrossh and
   --bt-sidew (a rack and the strip in front of it), --bt-felth (the felt's height, which is the side racks' length), --bt-rackh
   (her rack), --bt-strip (the strip over her rack), --bt-mew (the column at her rack's left end for her plate and her line) and
   --bt-rowh (the row of buttons under her rack). Nothing below depends on a move.
   ================================================================================================================================ */
html.bt .table { gap: 10px; }
html.bt .around { display: grid; grid-template-columns: var(--bt-sidew, 120px) minmax(0, 1fr) var(--bt-sidew, 120px); grid-template-rows: var(--bt-acrossh, 120px) var(--bt-felth, 400px);
  grid-template-areas: ". across ." "left centre right"; gap: 10px; align-content: start; align-items: stretch; overflow: visible; scrollbar-gutter: auto; }
html.bt .slot-across { height: var(--bt-acrossh); }
html.bt .slot-left, html.bt .slot-right { height: var(--bt-felth); padding: 0; }
html.bt .around .seat { position: relative; padding: 0; gap: var(--bt-pg, 3px); height: 100%; }
html.bt .around .seat-across { flex-direction: column; align-items: center; }
html.bt .around .seat-left { flex-direction: row; align-items: flex-start; }
html.bt .around .seat-right { flex-direction: row-reverse; align-items: flex-start; }
html.bt .around .seat-person { position: relative; flex: none; display: block; gap: 0; }
html.bt .around .seat-across .seat-person { width: var(--bt-felth); height: calc(var(--bt-bh) + 2 * var(--bt-p)); }
html.bt .around :is(.seat-left, .seat-right) .seat-person { width: calc(var(--bt-bh) + 2 * var(--bt-p)); height: var(--bt-felth); }

/* one wooden rack, the same kind as hers, for all three: the same places, the same size */
html.bt .around .seat-tiles:not(.face-up) { box-sizing: border-box; display: flex; flex: none; gap: calc(var(--bt-pitch) - var(--bt-u)); padding: var(--bt-p);
  background:
    linear-gradient(180deg, rgba(255, 235, 200, 0.16), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(90deg, rgba(255, 230, 190, 0.05) 0 3px, transparent 3px 11px, rgba(0, 0, 0, 0.05) 11px 13px, transparent 13px 29px),
    linear-gradient(180deg, var(--wood-light) 0%, var(--wood) 30%, var(--wood-2) 100%);
  border-radius: 10px; box-shadow: inset 0 2px 0 rgba(255, 240, 210, 0.28), inset 0 -5px 0 rgba(0, 0, 0, 0.30), 0 8px 16px rgba(0, 0, 0, 0.35); }
html.bt .around .seat-across .seat-tiles:not(.face-up) { flex-direction: row; width: var(--bt-felth); height: calc(var(--bt-bh) + 2 * var(--bt-p)); }
html.bt .around :is(.seat-left, .seat-right) .seat-tiles:not(.face-up) { flex-direction: column; width: calc(var(--bt-bh) + 2 * var(--bt-p)); height: var(--bt-felth);
  background:
    linear-gradient(90deg, rgba(255, 235, 200, 0.16), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(0deg, rgba(255, 230, 190, 0.05) 0 3px, transparent 3px 11px, rgba(0, 0, 0, 0.05) 11px 13px, transparent 13px 29px),
    linear-gradient(90deg, var(--wood-light) 0%, var(--wood) 30%, var(--wood-2) 100%); }
/* the whole rack, plate and tiles, runs the full height of the felt (bigtable.js sideRacks sets --bt-xu and --bt-xd on the seat): the wood grows up and down, the
   tiles and her plate stay centered in it */
html.bt .around :is(.seat-left, .seat-right) .seat-person { margin-top: calc(-1 * var(--bt-xu, 0px)); height: calc(var(--bt-felth) + var(--bt-xu, 0px) + var(--bt-xd, 0px)); }
html.bt .around :is(.seat-left, .seat-right) .seat-tiles:not(.face-up) { height: 100%; }
/* the backs are centered in the rack, with no empty places drawn, and stand in groups with small uneven gaps (bigtable.js gaps puts grp1, grp2 or grp3
   on the first back of each group); an empty rack of the end of a game draws nothing */
html.bt .around .seat-tiles:not(.face-up) { justify-content: center; }
html.bt .around .seat-tiles:not(.face-up) .seat-back.none { display: none; }
html.bt .around .seat-across .seat-back.grp1 { margin-left: calc(var(--bt-u) * 0.25); }
html.bt .around .seat-across .seat-back.grp2 { margin-left: calc(var(--bt-u) * 0.45); }
html.bt .around .seat-across .seat-back.grp3 { margin-left: calc(var(--bt-u) * 0.7); }
html.bt .around :is(.seat-left, .seat-right) .seat-back.grp1 { margin-top: calc(var(--bt-u) * 0.25); }
html.bt .around :is(.seat-left, .seat-right) .seat-back.grp2 { margin-top: calc(var(--bt-u) * 0.45); }
html.bt .around :is(.seat-left, .seat-right) .seat-back.grp3 { margin-top: calc(var(--bt-u) * 0.7); }
html.bt .around .seat-across .seat-back { width: var(--bt-u); height: var(--bt-bh); flex: none; border-radius: 4px; }
html.bt .around :is(.seat-left, .seat-right) .seat-back { width: var(--bt-bh); height: var(--bt-u); flex: none; border-radius: 4px; }

/* an opponent's name plate (wind, name, count of tiles, AI) lies ON the tile backs of her rack, in its middle. The left player's text
   turns to read from top to bottom, the right player's from bottom to top, both facing into the table. A press on it opens her card. */
html.bt .seat-name, html.bt .rack-plate .me-name { box-sizing: border-box; height: var(--bt-plate, 34px); min-height: 0; padding: 0 10px 0 4px; font-size: 0.95rem; line-height: 1; gap: 6px; flex: none; }
html.bt .seat-name .seat-who-btn { height: 100%; flex-direction: row; align-items: center; gap: 6px; min-width: 0; }
html.bt .seat-name .seat-face { width: calc(var(--bt-plate, 34px) - 6px); height: calc(var(--bt-plate, 34px) - 6px); flex: none; }
html.bt .seat-name .seat-face .avatar-wrap, html.bt .seat-name .seat-face .avatar-wrap .avatar { width: calc(var(--bt-plate, 34px) - 10px); height: calc(var(--bt-plate, 34px) - 10px); }
html.bt .seat-name .seat-face .avatar-wrap .avatar-art { width: calc(var(--bt-plate, 34px) - 6px); height: calc(var(--bt-plate, 34px) - 6px); }
html.bt .seat-name .seat-text { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; line-height: 1; }
html.bt .seat-name .seat-who { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
html.bt .seat-name .seat-sub { display: inline-flex; gap: 6px; font-size: 0.85rem; flex: none; }
html.bt .seat-name .seat-sub .seat-where { display: none; }
html.bt .around .seat-person > .seat-name { position: absolute; z-index: 3; left: 50%; top: 50%; width: max-content; max-width: calc(var(--bt-felth) - 24px); margin: 0; }
html.bt .around .seat-across .seat-person > .seat-name { transform: translate(-50%, -50%); }
html.bt .around .seat-left .seat-person > .seat-name { transform: translate(-50%, -50%) rotate(90deg); }
html.bt .around .seat-right .seat-person > .seat-name { transform: translate(-50%, -50%) rotate(-90deg); }

/* each player's called tiles: a strip on the felt directly in front of her rack, there from the deal on, empty or not, big enough
   for fourteen tiles and the gaps between five sets. The side players' strips turn with their racks, so a set reads as one group
   (the left player's tiles lie with their tops to the right, the right player's to the left). Face-up sets go only here. At the
   end of a game her whole hand lies face up in it, after her sets. */
html.bt .around .seat > .seat-sets, html.bt #yourSets { box-sizing: border-box; flex: none; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: var(--bt-gs);
  padding: var(--bt-sp); border-radius: 6px; border: 1px dashed rgba(246, 196, 67, 0.32); background: rgba(0, 0, 0, 0.1); position: static;
  min-height: 0; min-width: 0; }                     /* a strip is a button (it zooms its sets): the 44 px touch size of a button must not grow it */
html.bt .around .seat-across > .seat-sets { width: var(--bt-sl); height: var(--bt-st); flex-direction: row; }
html.bt .around :is(.seat-left, .seat-right) > .seat-sets { width: var(--bt-st); height: var(--bt-sl); flex-direction: column; }
html.bt .around .seat-set, html.bt #yourSets .seat-set { display: flex; flex: none; gap: var(--bt-tg, 1px); padding: 0; background: none; border-radius: 0; }
html.bt .around .seat-across .seat-set, html.bt #yourSets .seat-set { flex-direction: row; }
html.bt .around :is(.seat-left, .seat-right) .seat-set { flex-direction: column; align-items: center; }
html.bt .around .seat-sets .tile, html.bt #yourSets .tile { --tile-base-w: var(--bt-sw); --tile-base-h: var(--bt-sh); --tile-scale: 1; --tile-size: 1; --fit: 1; --zoom: 1;
  flex: none; margin: 0; border-radius: 3px; box-shadow: 0 1px 0 var(--tile-shadow); }
html.bt .around .seat-sets .sl { position: relative; flex: none; display: block; width: var(--bt-sh); height: var(--bt-sw); }
html.bt .around .seat-sets .sl .tile { position: absolute; left: 50%; top: 50%; margin-left: calc(var(--bt-sw) / -2); margin-top: calc(var(--bt-sh) / -2); }
html.bt .around .seat-left .seat-sets .sl .tile { transform: rotate(90deg); }
html.bt .around .seat-right .seat-sets .sl .tile { transform: rotate(-90deg); }
html.bt .around .seat-sets[role="button"]:hover { background: rgba(0, 0, 0, 0.2); }

/* her strip sits right against the top of her rack, centered over it; the strip is a child of the rack */
html.bt .rack > #yourSets { position: absolute; z-index: 5; left: calc((100% - var(--bt-sl)) / 2); bottom: calc(100% + var(--bt-pg, 3px)); width: var(--bt-sl); height: var(--bt-st); max-width: none; right: auto; margin: 0; }
html.bt #yourSets[hidden] { display: flex; }
html.bt #yourSets { cursor: zoom-in; }

/* the felt: fills its place, the thrown tiles from the top, a question lies over the lower part and never moves the pile */
html.bt .slot-centre { position: relative; height: var(--bt-felth); }
html.bt .slot-centre .centre { position: absolute; inset: 0; box-sizing: border-box; padding: 8px 140px 8px; justify-content: flex-start; align-items: center; gap: 4px; overflow: hidden; scrollbar-gutter: auto; }
html.bt .centre .pool { max-width: none; width: 100%; box-sizing: border-box; }
html.bt .centre #ask:not(.ask-over) { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%) scale(var(--bt-ask-scale, 1)); transform-origin: 50% 100%; max-width: 80%; z-index: 6; margin: 0; }
/* (24 Nov: the turn line, "Your turn. You drew the 5 Dot.", shows on the big table too) */
/* the call question, "Tap Take it (or press T) to pick up the 5 Bam, or Let it go.", is one line: its box may take up to 92% of the felt, and the
   words are sized to the felt's width (never under 15 px, so on a very narrow felt they wrap to a second line instead of shrinking further) */
html.bt .slot-centre .centre { container-type: inline-size; }
html.bt .centre #ask[data-phase="claim-offer"]:not(.ask-over) { width: max-content; max-width: 92%; }   /* max-content: left 50% would leave an absolute box only half the felt, and the line would wrap */
html.bt .centre #ask[data-phase="claim-offer"]:not(.ask-over) .ask-line { max-width: none; font-size: clamp(0.95rem, calc((92cqw - 64px) / 31), 1.3rem); }
@media (min-width: 1001px) { html body.bt-end .table-ask.ask-over, html.bt body .table-ask.ask-over { max-height: var(--end-h, var(--bt-felth)); } }

/* her rack: her strip over it; her name plate and her line in the margin at its left end, never over her tiles */
html.bt .rack { height: var(--bt-rackh); box-sizing: border-box; margin-top: var(--bt-strip, 40px); flex: none; overflow: visible; }
html.bt .rack > .rack-plate { top: 0; right: calc(100% + 10px); left: auto; transform: none; width: var(--bt-mew, 168px); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
html.bt .rack > .rack-plate .me-name { margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* her name never makes the plate wider than its column: the name's own box holds the dots, and the boxes round it may shrink to the column (a long name,
   "Pat Player (test)", with the East badge, ran 25 px out of the plate and lay over her rack: the button's text cannot be shorter than itself unless these say so) */
html.bt .rack > .rack-plate .rack-me, html.bt .rack > .rack-plate .rack-east { max-width: 100%; min-width: 0; box-sizing: border-box; }
html.bt .rack > .rack-plate .me-name .me-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* no room in the margin left of her rack (bigtable.js puts bt-plate-up on the page): the plate lies above the rack's left end with a 10 px gap, never touching the rack's wood, its lit edge or the tiles, and the small line is left out */
html.bt.bt-plate-up .rack > .rack-plate { right: auto; left: 0; top: auto; bottom: calc(100% + 30px); width: auto; max-width: var(--bt-mew, 168px); }      /* 30 px: a tile chosen for a pass rises 20 px above the rack and must not touch it */
html.bt.bt-plate-up .rack > .rack-plate .bt-line { display: none; }
html.bt.bt-plate-up .rack > .rack-plate { flex-direction: row; align-items: flex-end; min-height: 0; }
html.bt.bt-plate-up .rack > .rack-plate .rack-east:empty { display: none; }
html.bt.bt-plate-up .rack > .rack-plate .rack-east { min-height: 0; }
html.bt .bt-line { display: block; width: 100%; overflow: hidden; white-space: normal; font: 700 0.85rem/1.25 var(--g-font-body, system-ui); color: #ffe9a3; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
html.bt .rack-row { flex-wrap: nowrap; height: var(--bt-rowh, 84px); box-sizing: border-box; align-items: center; gap: 10px; }
html.bt .rack-row .actions { flex: 0 0 auto; flex-wrap: nowrap; margin: 0; }
html.bt .bt-turn-pill { display: none !important; }
html.bt .centre .pool .tile { --tile-scale: var(--bt-pool, 0.72); }
/* small steady parts: a count never changes a plate's width */
html.bt .seat-name .seat-count { min-width: 2.6em; justify-content: center; }
html.bt .rack > .rack-plate { min-height: var(--bt-plate, 34px); }

/* Going for: the whole line in card order, 26 px tiles at least, the tiles she holds in full color and the ones she needs pale */
html.bt .bt-going { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 4px; width: var(--bt-goingw, 490px); margin-left: auto; margin-right: -60px; padding: 4px 10px; overflow: hidden; box-sizing: border-box; height: calc(var(--bt-rowh, 84px) - 4px);
  border-radius: 12px; background: rgba(8, 36, 26, 0.82); border: 1px solid rgba(255, 233, 163, 0.5); color: #fff6e2; min-width: 0; }
html.bt .bt-going .going-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
html.bt .bt-going .going-head b { flex: 1 1 auto; min-width: 0; max-height: 2.3em; overflow: hidden; white-space: normal; overflow-wrap: anywhere; font: 400 0.9rem/1.15 var(--g-font-display, inherit); color: #ffe9a3; }
html.bt .bt-going .going-away { font-size: 0.8rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: rgba(255, 233, 163, 0.18); white-space: nowrap; flex: none; }
html.bt .bt-going button.going-change { flex: none; width: auto; height: auto; min-height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 233, 163, 0.7); background: rgba(255, 233, 163, 0.16); box-shadow: none; font: 800 0.85rem/1 var(--g-font-body, system-ui); color: #ffe9a3; cursor: pointer; }
html.bt .bt-going .going-fit { flex: none; height: 32px; overflow: hidden; display: flex; align-items: center; }
html.bt .bt-going .going-tiles { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; flex: none; width: max-content; transform: scale(var(--gs, 1)); transform-origin: 0 50%; }
html.bt .bt-going .going-set { display: flex; gap: 1px; flex: none; }
html.bt .bt-going .going-tiles .tile { --tile-base-w: 26px; --tile-base-h: 36px; --tile-scale: 1; --tile-size: 1; --fit: 1; --zoom: 1; flex: none; margin: 0; border-radius: 3px; box-shadow: 0 1px 0 var(--tile-shadow); }
html.bt .bt-going .going-tiles .have-tile { opacity: 1; }
html.bt .bt-going .going-tiles .need-tile { opacity: 0.36; }

/* her rack, Sorted: the tiles are centered in the rack at the same size as ever (a nineteenth of the rack less the gaps), with a gap of a third of a
   tile before each new suit group (craks, bams, dots, winds and dragons, flowers, jokers); the empty places are not drawn */
html.bt #hand.slots.bt-sorted { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-end; gap: 4px; }
html.bt #hand.slots.bt-sorted .rack-gap { display: none; }
html.bt #hand.slots.bt-sorted .tile { flex: none; width: calc((100% - 72px) / 19); }
html.bt #hand.slots.bt-sorted .tile.group-start { margin-left: calc((100% - 72px) / 57); }

/* ---- the table's options: no "Menu" in the top bar. #tableMenu's button is a small gear chip in the table's top right corner (its place is set by
   bigtable.js in --bt-gear-top and --bt-gear-right), its list opens just under it. Table settings are in the list, so the bar's own gear is not shown. ---- */
html.bt header #gearBtn { display: none !important; }
html.bt header #tableMenu { width: 0; min-width: 0; margin: 0; padding: 0; overflow: visible; }
html.bt header #tableMenu > summary { position: fixed; top: var(--bt-gear-top, 12px); right: var(--bt-gear-right, 12px); z-index: 46; box-sizing: border-box; width: 40px; height: 40px; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.42); border: 1.5px solid var(--g-line);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
html.bt header #tableMenu > summary::before { content: "\2699"; font-size: 1.5rem; line-height: 1; color: var(--g-cream); }
html.bt header #tableMenu > summary::after { display: none; }
html.bt header #tableMenu .menu-list { position: fixed; top: calc(var(--bt-gear-top, 12px) + 46px); right: var(--bt-gear-right, 12px); left: auto; z-index: 47; width: max-content; min-width: 15rem; max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--bt-gear-top, 12px) - 60px); overflow-y: auto; }
/* Coin Shop, in the top bar: a plain labeled link */
html.bt header .site-bar > .menu-shop { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 999px; color: var(--g-cream, #fff6e2); text-decoration: none; font-weight: 700; font-size: 0.98rem; white-space: nowrap; }
html.bt header .site-bar > .menu-shop:hover { background: rgba(255, 233, 163, 0.16); }

/* ---- the card: no "2026 card" pill in the top bar and no card chip on the felt; the gold Card tab on the right edge (with a C key cap) is how it opens and shuts ---- */
html.bt header .site-bar #cardName, html.bt header .site-bar.fit-card #cardName, html.bt #gbCard { display: none !important; }
html.bt .card-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; position: fixed; right: var(--bt-tab-right, 0px); top: calc(50vh - 75px); z-index: 30;
  box-sizing: border-box; width: var(--bt-tab-w, 34px); height: 150px; padding: 0; border: 0; border-radius: 12px 0 0 12px; background: linear-gradient(90deg, #d68c12, #f6c443); color: #3a2606; cursor: pointer;
  font: 400 min(1.05rem, calc(var(--bt-tab-w, 34px) - 8px))/1 var(--g-font-display, inherit); box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 243, 196, 0.7) inset; }
html.bt .card-tab span { writing-mode: vertical-rl; letter-spacing: 0.04em; }
html.bt .card-tab kbd { font: 800 0.85rem/1 var(--g-font-body, system-ui); min-width: min(22px, calc(var(--bt-tab-w, 34px) - 8px)); height: min(22px, calc(var(--bt-tab-w, 34px) - 8px)); display: inline-flex; align-items: center; justify-content: center; border-radius: 6px;
  background: #fff6e2; color: #3a2606; border: 1px solid #8a5a08; box-shadow: 0 2px 0 #8a5a08; }
html.bt .card-tab:hover { filter: brightness(1.08); }
html.bt.bt-card-covered .card-tab, html.bt body:has(#shuffle:not([hidden])) .card-tab { display: none; }

/* ---- the table's gear: a chip in the felt's top right corner, the same height, dark fill, border and weight as the wall chip ("99 left") in the top left, with the bar's
   own 24 unit gear picture drawn large and centered in it. Its list hangs from it (app.js sets --bt-menu-top and --bt-menu-right). Only a phone held sideways (whose bar is
   just the Menu in the corner) and the phone app keep their own menu. ---- */
.gb-gear { display: none; }
@media not ((orientation: landscape) and (max-height: 500px) and (pointer: coarse)) {
  html.bt:not(.app-mode) .table > button.gb-gear { display: inline-flex; position: absolute; top: 12px; right: 12px; z-index: 6; box-sizing: border-box; width: 60px; height: 44px; min-height: 44px; padding: 0;
    align-items: center; justify-content: center; gap: 0; cursor: pointer; background: rgba(0, 0, 0, 0.42); border: 1.5px solid var(--g-line); color: var(--g-gold-1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
  html.bt:not(.app-mode) .table > button.gb-gear svg { display: block; flex: none; width: 28px; height: 28px; margin: 0; }
  html.bt:not(.app-mode) .table > button.gb-gear:hover:not(:disabled), html.bt:not(.app-mode) .table > button.gb-gear[aria-expanded="true"] { background: rgba(255, 233, 163, 0.16); border: 1.5px solid var(--g-line); color: var(--g-gold-1); }
  html.bt:not(.app-mode) header #tableMenu > summary { display: none; }
  html.bt:not(.app-mode) header #tableMenu .menu-list { position: fixed; top: var(--bt-menu-top, 60px); right: var(--bt-menu-right, 12px); left: auto; bottom: auto; z-index: 80;
    width: max-content; min-width: 15rem; max-width: calc(100vw - 24px); max-height: calc(100vh - var(--bt-menu-top, 60px) - 12px); overflow-y: auto; }
}
body:has(#shuffle:not([hidden])) .gb-gear { visibility: hidden; }

/* a narrow Going for strip (the card open beside the table): the name of the line takes the room of the "needs N more" pill */
html.bt .bt-going.bt-narrow .going-away { display: none; }
html.bt .bt-going.bt-narrow .going-head b { font-size: 0.82rem; }
