/* The private table ledger: the host's page (private-games.php) and the window at the table (assets/private-ledger.js). */
body.pl-page{margin:0;background:var(--muck-bg,#0e0e0e);color:var(--muck-text);font-family:Inter,system-ui,sans-serif}
.pl-main{box-sizing:border-box;width:100%;max-width:720px;margin:0 auto;padding:var(--muck-space-6) var(--muck-space-4) var(--muck-space-7)}
.pl-main h1{margin:0;font-size:32px;line-height:1.15;font-weight:800;letter-spacing:-.02em;overflow-wrap:anywhere}
.pl-sub{margin:var(--muck-space-2) 0 var(--muck-space-5);color:var(--muck-text-2);font-size:15px;line-height:1.5}
.pl-actions{display:flex;flex-wrap:wrap;gap:var(--muck-space-3)}
.pl-back{margin:var(--muck-space-4) 0 0;font-size:14px}
.pl-back a{color:var(--muck-gold,#ffd34f);text-decoration:none}
.pl-back a:hover{text-decoration:underline}

.pl-ledger{border:1px solid var(--muck-line);border-radius:12px;background:var(--muck-surface-1);text-align:left}
.pl-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--muck-space-3);row-gap:2px;padding:var(--muck-space-3) var(--muck-space-4);border-bottom:1px solid var(--muck-line)}
.pl-who{min-width:0;display:flex;align-items:center;gap:var(--muck-space-2)}
.pl-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600;color:var(--muck-text)}
.pl-you{flex:none;padding:1px 6px;border-radius:4px;background:var(--muck-surface-3);color:var(--muck-text-2);font-size:11px;font-weight:600;line-height:1.5;white-space:nowrap}
.pl-net{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--muck-text-2);white-space:nowrap;text-align:right}
.pl-net--up{color:var(--muck-green)}
.pl-net--down{color:var(--muck-red)}
.pl-detail{grid-column:1/-1;color:var(--muck-text-3);font-size:13px;font-variant-numeric:tabular-nums}
.pl-row--other .pl-name{font-weight:500;color:var(--muck-text-2)}
.pl-row--other .pl-net{color:var(--muck-text-2)}
.pl-total{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px var(--muck-space-3);padding:var(--muck-space-3) var(--muck-space-4);color:var(--muck-text-2);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}

.pl-games{border:1px solid var(--muck-line);border-radius:12px;background:var(--muck-surface-1)}
.pl-game{display:flex;align-items:center;justify-content:space-between;gap:var(--muck-space-3);min-height:44px;padding:var(--muck-space-3) var(--muck-space-4);border-bottom:1px solid var(--muck-line);color:inherit;text-decoration:none}
.pl-game:last-child{border-bottom:0;border-radius:0 0 12px 12px}
.pl-game:first-child{border-radius:12px 12px 0 0}
.pl-game:hover{background:var(--muck-surface-2)}
.pl-game:focus-visible{outline:2px solid var(--muck-gold,#ffd34f);outline-offset:-2px}
.pl-game-main{min-width:0;display:block}
.pl-game-date{display:block;font-size:15px;font-weight:600;color:var(--muck-text)}
.pl-game-what{display:block;margin-top:2px;font-size:13px;color:var(--muck-text-3)}
.pl-game-side{flex:none;display:flex;align-items:center;gap:var(--muck-space-2)}
.pl-arrow{color:var(--muck-text-3)}

/* On the table's endings: the finish window and "Everyone else left" */
#game-over-modal .gom-ledger:not(.hidden){order:5;align-self:center;display:inline-flex;align-items:center;gap:var(--muck-space-2);min-height:44px;margin-top:var(--muck-space-1);padding:0 var(--muck-space-3);border:0;background:none;color:var(--muck-gold,#ffd34f);font:600 14px var(--muck-font);cursor:pointer}
#game-over-modal .gom-ledger:hover{text-decoration:underline}
#game-over-modal .gom-ledger:focus-visible{outline:2px solid var(--muck-gold,#ffd34f);outline-offset:2px}
#game-over-modal .gom-ledger .material-symbols-rounded{font-size:18px}

:is(html,#gp-a) :is(body,#gp-b) #game-dim-ledger-btn{border:1px solid var(--muck-line-strong,#4a5a5c);background:var(--muck-surface-2);color:var(--muck-text)}
:is(html,#gp-a) :is(body,#gp-b) #game-dim-ledger-btn:hover{border-color:var(--muck-gold-muted,#a8904f);color:var(--muck-gold,#ffd34f)}
/* Two labels this long fill the row at 375 wide; narrower, "Back to lobby" stuck out of the card */
@media(max-width:374px){
  :is(html,#gp-a) :is(body,#gp-b) .game-dim-actions:has(#game-dim-ledger-btn:not(.hidden)){flex-direction:column}
  :is(html,#gp-a) :is(body,#gp-b) .game-dim-actions:has(#game-dim-ledger-btn:not(.hidden)) > .btn:not(.hidden){flex:0 0 auto}
}

/* On a player's profile (assets/leaderboard.js): profile-v3.css hides .pv-link on anyone else's, and this one is for exactly that */
#profile-body:not(.pv-me) #pv-private-link,#profile-body #pv-private-link{display:inline-flex;align-items:flex-end;min-height:44px;text-decoration:none}
#profile-body #pv-private-link:hover{text-decoration:underline}

/* Your games and hands: the first card on your own profile (assets/leaderboard.js _profileProof) */
#profile-body .pv-proof{grid-column:1/-1}
#profile-body .pv-proof[hidden]{display:none}
#profile-body .pv-proof-list{border-top:1px solid var(--muck-warm-line)}
#profile-body .pv-proof-row{display:flex;align-items:center;gap:var(--muck-space-3);min-height:44px;padding:var(--muck-space-3) 0;border-bottom:1px solid var(--muck-warm-line);color:inherit;text-decoration:none}
#profile-body .pv-proof-row:hover .pv-proof-go{color:var(--muck-gold)}
#profile-body .pv-proof-row:focus-visible{outline:2px solid var(--muck-gold);outline-offset:2px}
#profile-body .pv-proof-main{flex:1;min-width:0;display:block}
#profile-body .pv-proof-main b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;color:var(--muck-text)}
#profile-body .pv-proof-main small{display:block;margin-top:2px;font-size:12px;color:var(--muck-text-3)}
#profile-body .pv-proof-row .pl-net{flex:none;font-size:14px}
#profile-body .pv-proof-go{flex:none;color:var(--muck-text-3)}
#profile-body .pv-proof-all{display:inline-flex;align-items:center;min-height:44px;color:var(--muck-gold);font-size:13px;font-weight:600;text-decoration:none}
#profile-body .pv-proof-all:hover{text-decoration:underline}
#profile-body .pv-proof-lookup{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--muck-space-3);margin-top:var(--muck-space-4);padding-top:var(--muck-space-4);border-top:1px solid var(--muck-warm-line)}
#profile-body .pv-proof-lookup .mk-field{flex:1 1 200px;max-width:320px}
#profile-body .pv-proof-lookup .mk-input{text-transform:uppercase;font-variant-numeric:tabular-nums}
#profile-body .pv-proof-lookup .mk-input::placeholder{text-transform:none}
#profile-body .pv-proof-hint{margin:var(--muck-space-2) 0 0;font-size:12px;line-height:1.5;color:var(--muck-text-3)}

/* In the window at the table */
.pl-window{margin-top:var(--muck-space-3);max-height:min(56vh,420px);overflow-y:auto}
.pl-window-host{margin:var(--muck-space-3) 0 0;font-size:14px;text-align:center}
.pl-window-host a{color:var(--muck-gold,#ffd34f);text-decoration:none}

@media(max-width:719px){
  .pl-main{padding:var(--muck-space-5) var(--muck-space-4) var(--muck-space-6)}
  .pl-main h1{font-size:26px}
}

/* Receipts: the money behind a player's totals (includes/PrivateLedger.php renderMoves) */
.pl-receipts{grid-column:1/-1;margin-top:var(--muck-space-1)}
.pl-receipts summary{display:inline-flex;align-items:center;min-height:44px;cursor:pointer;color:var(--muck-text-2);font-size:13px;font-weight:600}
.pl-receipts summary:hover{color:var(--muck-gold,#ffd34f)}
.pl-receipts summary:focus-visible{outline:2px solid var(--muck-gold,#ffd34f);outline-offset:2px}
.pl-receipt{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--muck-space-3);padding:var(--muck-space-2) 0;border-top:1px solid var(--muck-line);font-size:13px}
.pl-receipt-what{color:var(--muck-text)}
.pl-receipt-amt{grid-column:2;grid-row:1/span 2;align-self:center;color:var(--muck-text);font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.pl-receipt-when{grid-column:1;color:var(--muck-text-3);font-size:12px}
.pl-receipts-gone{grid-column:1/-1;margin:var(--muck-space-1) 0 0;color:var(--muck-text-3);font-size:13px;line-height:1.45}

/* Your hands, under the ledger, each with its ID (includes/HandId.php) */
.pl-hands{margin-top:var(--muck-space-4);border:1px solid var(--muck-line);border-radius:12px;background:var(--muck-surface-1)}
.pl-hands summary{display:flex;align-items:center;min-height:44px;padding:var(--muck-space-2) var(--muck-space-4);cursor:pointer;color:var(--muck-text);font-size:15px;font-weight:600}
.pl-hands summary:hover{color:var(--muck-gold,#ffd34f)}
.pl-hands summary:focus-visible{outline:2px solid var(--muck-gold,#ffd34f);outline-offset:-2px;border-radius:12px}
.pl-hand{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:var(--muck-space-3);min-height:44px;padding:var(--muck-space-2) var(--muck-space-4);border-top:1px solid var(--muck-line);color:var(--muck-text);text-decoration:none;font-size:14px;font-variant-numeric:tabular-nums}
.pl-hand:last-child{border-radius:0 0 12px 12px}
.pl-hand:hover{background:var(--muck-surface-2)}
.pl-hand:focus-visible{outline:2px solid var(--muck-gold,#ffd34f);outline-offset:-2px}
.pl-hand-num{color:var(--muck-text-3);font-size:13px}
.pl-hand-id{font-weight:600}

/* One hand: hand.php */
.hl-board{display:flex;align-items:center;justify-content:space-between;gap:var(--muck-space-3);padding:var(--muck-space-3) var(--muck-space-4);margin-bottom:var(--muck-space-3)}
.hl-board-label{color:var(--muck-text-2);font-size:15px;font-weight:600}
.hl-none{color:var(--muck-text-3);font-size:14px}
.hl-seat{display:grid;grid-template-columns:minmax(0,1fr) auto 84px;align-items:center;gap:var(--muck-space-3);min-height:44px;padding:var(--muck-space-3) var(--muck-space-4);border-bottom:1px solid var(--muck-line)}
.hl-seat:last-child{border-bottom:0}
.hl-seat .mh-cards{flex-wrap:nowrap}
.hl-head{margin:var(--muck-space-5) 0 var(--muck-space-3);font-size:18px;font-weight:700;color:var(--muck-text)}
.hl-log{margin:0;padding:var(--muck-space-2) var(--muck-space-4);list-style:none}
.hl-log li{padding:var(--muck-space-2) 0;border-bottom:1px solid var(--muck-line);color:var(--muck-text-2);font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.hl-log li:last-child{border-bottom:0}
.hl-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--muck-space-3);max-width:420px}
.hl-form .mk-field{flex:1 1 200px}
.hl-form .mk-input{font-variant-numeric:tabular-nums;text-transform:uppercase}
.hl-form .mk-input::placeholder{text-transform:none}
@media(max-width:480px){
  .hl-seat{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who net" "cards cards"}
  .hl-seat .pl-who{grid-area:who}.hl-seat .pl-net{grid-area:net}.hl-seat .mh-cards{grid-area:cards;flex-wrap:wrap}
}

/* A hand's ID in Hand History at the table (My Hands has its own, assets/gto-hands.css) */
.hhi-id{display:inline-block;margin-top:2px;color:var(--muck-text-3);font-size:12px;font-variant-numeric:tabular-nums;text-decoration:none;white-space:nowrap}
.hhi-id:hover{color:var(--muck-gold,#ffd34f);text-decoration:underline}

/* Receipts and Your hands open on a tap, so they say so: an arrow drawn here, pointing down closed and up open */
.pl-receipts summary,.pl-hands summary{list-style:none}
.pl-receipts summary::-webkit-details-marker,.pl-hands summary::-webkit-details-marker{display:none}
.pl-receipts summary::after,.pl-hands summary::after{content:"";flex:none;width:7px;height:7px;margin-left:var(--muck-space-2);border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.pl-receipts[open] summary::after,.pl-hands[open] summary::after{transform:translateY(2px) rotate(-135deg)}
