/* Aangan — Table Info (js/61-tableinfo.js)
   ===========================================================================
   Owner 2026-08-19: "incorporate player actions somewhere when we play a
   game. Just like how pressing tab in dota 2... allows to see all the
   information." A quick glance at every player's target/made this hand,
   opened from a small ⓘ beside the ⋯ menu — tap to open, tap again (or
   anywhere on the scrim) to close.

   Deliberately NOT .overlay/.panel: those dim the whole screen and centre-
   lock like a dialog you have to resolve. This is a glance, not a decision —
   lighter scrim, faster transition, and it stays out of the "nine chits are
   one paper" family (chit.css, 2026-08-16) the same way the pause screen
   now does: Marigold Slate, matching the options sheet and game-setup
   drawer, not the sign-in/result/lobby family. */

#tinfoBtn{min-width:34px;letter-spacing:0;font-size:15px;line-height:1}

.tinfo-ov{position:fixed;inset:0;z-index:9350;display:flex;align-items:flex-start;
  justify-content:center;pointer-events:none;
  visibility:hidden;transition:visibility 0s linear .16s}
.tinfo-ov.show{pointer-events:auto;visibility:visible;transition-delay:0s}
.tinfo-ov .tinfo-scrim{position:absolute;inset:0;background:rgba(20,12,4,.5);
  opacity:0;transition:opacity .16s ease}
.tinfo-ov.show .tinfo-scrim{opacity:1}

.tinfo-card{position:relative;width:min(360px,92vw);box-sizing:border-box;
  margin:calc(64px + env(safe-area-inset-top,0px)) 0 0;
  padding:14px 14px 12px;border-radius:14px;
  background:radial-gradient(140% 90% at 30% -10%, rgba(255,255,255,.08), transparent 55%),
    linear-gradient(180deg,#241606,#1a0f05 70%,#140c04);
  border:2px solid rgba(255,235,200,.16);
  box-shadow:0 20px 44px -18px rgba(0,0,0,.5);
  color:#fbeed9;
  opacity:0;transform:translateY(-8px);transition:opacity .16s ease,transform .16s ease}
.tinfo-ov.show .tinfo-card{opacity:1;transform:translateY(0)}

.tinfo-head{display:flex;align-items:center;justify-content:space-between;
  margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid rgba(255,235,200,.18)}
.tinfo-head h3{font-family:var(--serif);font-weight:600;font-size:16px;margin:0;color:#ffd27a}
.tinfo-trump{display:inline-flex;align-items:center;gap:4px;font-family:var(--num);
  font-size:11px;color:#ffd27a;background:rgba(0,0,0,.18);border:1px solid rgba(255,235,200,.25);
  border-radius:6px;padding:3px 8px}

.tinfo-grid{display:grid;grid-template-columns:1.6fr .8fr .8fr;gap:0;font-size:12px}
.tinfo-gh{font-family:var(--sans);font-size:9px;letter-spacing:.06em;text-transform:uppercase;
  color:#e6c9a6;padding:0 4px 6px;text-align:center}
.tinfo-gh:first-child{text-align:left}
.tinfo-row{display:contents}
.tinfo-row>div{padding:9px 4px;border-top:1px solid rgba(255,235,200,.12);
  display:flex;align-items:center;justify-content:center;text-align:center}
.tinfo-row>div:first-child{justify-content:flex-start;text-align:left;gap:7px;min-width:0}
.tinfo-row.me{background:rgba(255,207,107,.08)}
.tinfo-av{width:22px;height:22px;border-radius:50%;flex:0 0 auto;
  background:radial-gradient(circle at 35% 30%,#e6b97a,#a06a30 70%)}
/* the same four seat colours the pills already use (pillSeat() in 06-render.js) */
.tinfo-av.s0{background:radial-gradient(circle at 35% 30%,#ffe3a0,#e07c00 70%)}
.tinfo-av.s1{background:radial-gradient(circle at 35% 30%,#bfe0ff,#0d84c6 70%)}
.tinfo-av.s2{background:radial-gradient(circle at 35% 30%,#ffc2b0,#b94a36 70%)}
.tinfo-av.s3{background:radial-gradient(circle at 35% 30%,#e6b97a,#a06a30 70%)}
.tinfo-nm{font-family:var(--sans);font-weight:700;font-size:12px;color:#fbeed9;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tinfo-turn{width:5px;height:5px;border-radius:50%;background:#ffd27a;
  box-shadow:0 0 5px rgba(255,210,122,.9);flex:0 0 auto;margin-left:2px}
.tinfo-num{font-family:var(--num);font-variant-numeric:tabular-nums;color:#f3ddb8}
.tinfo-num.hi{color:#ffd27a;font-weight:700}

@media (max-width:360px){
  .tinfo-card{margin-top:calc(52px + env(safe-area-inset-top,0px));padding:12px 10px 10px}
  .tinfo-grid{font-size:11px}
}
@media (prefers-reduced-motion:reduce){
  .tinfo-ov,.tinfo-ov .tinfo-scrim,.tinfo-card{transition:none}
}

/* ===== SCORECARD SIDE TAB (owner 2026-08-26) ==================================
   The twin of #bugFab, mirrored to the RIGHT edge — same 38×64 tab, same teak
   glass, rounded on the inner side and flat against the screen edge. #bugFab is
   left:0 with border-radius:0 13px 13px 0; this is right:0 with the radii
   swapped. Icon is a scorecard (a chit with score lines). It is created inside
   #hud so it only exists during a hand, and hides on the same overlays #bugFab
   does so a dialog is never fought by a floating tab. */
/* Two on-table tabs share this: #tinfoBtn (scorecard) and #logFab (move log).
   Class-based so both get the same shell; #logFab is offset just above. */
.tinfo-fab{position:fixed;right:0;top:50%;transform:translateY(-50%);
  z-index:8999;width:38px;height:64px;border-radius:13px 0 0 13px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(32,20,10,.58);border:1px solid rgba(255,235,200,.30);border-right:0;
  box-shadow:0 3px 10px rgba(0,0,0,.32);cursor:pointer;padding:0 0 0 3px;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:background .15s, transform .15s}
#logFab.tinfo-fab{top:calc(50% - 72px)}        /* sits just above the scorecard tab, never overlaps */
/* KODI puts a seat name at the middle of its RIGHT edge (2026-09-10), the mirror
   of the bug tab's problem on the left (see dev.css). These tabs may sit anywhere
   down the edge; the chip may not, because it says which side that player is on.
   Same offset as the bug tab so the two edges stay symmetrical, with #logFab
   keeping its 72px stack above whichever tab is below it. */
body:has(#kdFrame) .tinfo-fab{top:76%}
body:has(#kdFrame) #logFab.tinfo-fab{top:calc(76% - 72px)}
.tinfo-fab svg{width:21px;height:21px;fill:none;stroke:rgba(255,238,208,.9);
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tinfo-fab:active{transform:translateY(-50%) scale(.94);background:rgba(32,20,10,.85)}
@media (prefers-reduced-motion:reduce){.tinfo-fab{transition:none}}
/* hide both wherever the bug tab hides — over any dialog/overlay, the open log
   drawer, and in the house */
body:has(#confirmOv.show) .tinfo-fab, body:has(#lobbyOv.show) .tinfo-fab,
body:has(#serOv.show) .tinfo-fab,     body:has(#resultOv.show) .tinfo-fab,
body:has(#pauseOv.show) .tinfo-fab,   body:has(#welcomeOv.show) .tinfo-fab,
body:has(#langOv.show) .tinfo-fab,    body:has(#groupOv.show) .tinfo-fab,
body:has(#profileOv.show) .tinfo-fab, body:has(#authOv.show) .tinfo-fab,
body:has(#tinfoOv.show) .tinfo-fab,   body:has(#logPanel.show) .tinfo-fab,
body.rf-room .tinfo-fab{display:none}

/* ── Canonical standings / points table (owner 2026-09-08: "that design should
   be used in every new place a table/scorecard will be set unless said
   otherwise"). NOTEBOOK SKIN (owner 2026-09-09 "these scores should have a page
   and pencil appeal", then 2026-09-10 with the ribbed exam-book photo: "make it
   look like this notebook cover — just the points table"). So the whole card is
   a little schoolbook: .ptbl is the dark-brown CORRUGATED COVER and .ptbl-pg is
   the cream LABEL pasted on it (the SAME cream paper + red margin rule the
   chopadi page uses, chopadi.css .ch-page), so a scorecard reads as an object
   from the house, not a UI panel.

   THE RULED LINES ARE ALLOWED HERE, and were NOT in the chopadi (owner
   2026-08-16: prose "looks weird" when the text doesn't sit on the rule, and
   five scripts can't share one rule pitch). A scorecard is the opposite case:
   every row is ONE short line (a name + a number) of fixed height, so the rule
   is each row's own baseline (border-bottom) and the entry sits on the line
   the way you'd write it — the thing that failed for flowing prose is exactly
   what works for a ledger. Self-contained (literal colours, no --lg vars) so
   it still drops onto the dark Kaali tinfo card as a paper slip.

   Contrast measured on the #f7eeda paper (.claude/mp/contrast.js, warm paper):
   ink names #3b2a12 ≈ 10.5:1, points #6b3410 ≈ 6.6:1, leader #96271c ≈ 5.5:1,
   rank graphite #5a4326 ≈ 6.9:1 — all well clear, darker ink on warm paper as
   the readability rule wants (never a brighter accent). ── */
/* THE COVER (owner 2026-09-10, with the ₹50 ribbed exam-notebook photo: "make
   it look like this notebook cover — just the points table"). .ptbl is now the
   dark-brown corrugated board — vertical ribs of highlight+shadow over a warm
   brown ground — and the scores live on a cream label pasted onto it (.ptbl-pg),
   the way a schoolbook wears its Name/Subject sticker. The rib pitch is 4px so
   it reads as corrugation, not stripes, at the small in-panel size. */
.ptbl{border-radius:6px;padding:11px;position:relative;color:#3b2a12;
  background:
    repeating-linear-gradient(90deg, rgba(255,238,205,.05) 0 1px, rgba(0,0,0,0) 1px 2px, rgba(0,0,0,.24) 2px 3px, rgba(0,0,0,0) 3px 4px),
    linear-gradient(180deg,#4a2c15,#3a2210 55%,#2c1809);
  box-shadow:0 5px 14px rgba(18,9,3,.5), inset 0 0 0 1px rgba(255,224,180,.10), inset 0 1px 0 rgba(255,226,182,.14)}
/* the pasted label — the cream chopadi page, now sitting ON the cover with a
   lifted-sticker shadow */
.ptbl-pg{position:relative;border-radius:3px;overflow:hidden;
  background:linear-gradient(100deg,#fffaf0,#f7eeda 55%,#f2e6cd);
  box-shadow:0 1px 5px rgba(15,8,3,.4), inset 0 0 0 1px rgba(120,85,30,.30)}
/* the red margin rule, a hand's-width in from the left — the chopadi's own
   (chopadi.css .ch-page::after). Runs the full label, but the header band is
   OPAQUE and sits above it, so the rule begins under the title, not through it
   (owner 2026-09-09: "the table cuts a line through the heading"). */
.ptbl-pg::before{content:"";position:absolute;left:32px;top:0;bottom:0;width:1px;
  pointer-events:none;background:rgba(196,76,60,.55);z-index:1}
/* THE HAND. --slab-hand (slabs.css) is the app's handwriting token: Gloria
   Hallelujah for Latin (the score numbers + English names read as pencilled),
   and the Baloo family per Indic script — a real Gujarati/Devanagari/Gurmukhi
   handwriting face isn't in the set, so those names carry the family's voice
   rather than a wrong hand (owner 2026-09-09: "if it's a notebook we need
   handwriting fonts"). Single-weight, so emphasis is size + ink, never bold. */
.ptbl-h{position:relative;z-index:2;font-family:var(--slab-hand,var(--serif));
  font-size:17px;color:#5c2015;padding:8px 12px 6px;
  background:linear-gradient(180deg,#f4e8ce,#efdfbe);
  border-bottom:1.5px solid rgba(140,70,30,.5)}
/* each row is one ruled line, and the writing SITS on it: baseline-aligned with
   a bottom gap so the entry rests on the rule the way you'd write it (owner
   2026-09-09: "the numbers are not sitting exactly on the line"). This works
   here though it failed for the chopadi's prose — a row is one short fixed line,
   not five scripts of flowing text sharing one pitch. */
.ptbl-row{display:grid;grid-template-columns:32px 1fr auto;align-items:baseline;gap:10px;
  padding:13px 12px 1px;font-family:var(--slab-hand,var(--serif));
  font-size:16px;line-height:1;
  border-bottom:1px solid rgba(90,66,38,.5)}   /* the pencil rule; baseline drops onto it, tails hang below like real handwriting */
.ptbl-row:last-child{border-bottom:0}
/* the leader's line — a soft pencil-highlighter wash, no gold bar */
.ptbl-row.lead{background:linear-gradient(90deg,rgba(230,189,92,.34),rgba(230,189,92,.05))}
/* your own line — a faint graphite wash, the way you'd tick your row */
.ptbl-row.me{background:rgba(120,85,30,.08)}
/* numbers ALWAYS in the Gloria hand (owner 2026-09-10) — digits are Latin in
   every language, so the ranks and scores read as pencilled even in gu/hi/mr/pa
   where a name falls back to the Baloo hand. --slab-hand stays as the fallback. */
.ptbl-rank{font-family:"Gloria Hallelujah",var(--slab-hand,var(--serif));font-size:14px;color:#5a4326;text-align:center}
.ptbl-row.lead .ptbl-rank{color:#8d3226}
.ptbl-who{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#3b2a12}
.ptbl-who .crown,.ptbl-who>*{vertical-align:baseline}
.ptbl-row.me .ptbl-who{color:#7a3a08}
.ptbl-pts{font-family:"Gloria Hallelujah",var(--slab-hand,var(--serif));font-size:20px;color:#6b3410}
.ptbl-row.lead .ptbl-pts{color:#96271c}
