/* "My hands" (profile): list + trick-by-trick replay (myhands.js). NS #5AB4FF · EW #FFB547 */
.mh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mh-row { width: 100%; display: grid; grid-template-columns: 7.5em 1fr auto auto; gap: 8px; align-items: center; text-align: left; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: inherit; font: inherit; font-size: .85rem; cursor: pointer; }
.mh-row:hover { background: rgba(255,255,255,.08); }
.mh-when, .mh-partner { opacity: .75; }
.mh-res.won { color: #4cd07d; } .mh-res.lost { color: #ff6b6b; }
.mh-pager, .mh-steps, .mh-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mh-steps { justify-content: center; }
.mh-felt { position: relative; display: grid; grid-template-columns: 1fr 1.2fr 1fr; grid-template-areas: ". n ." "w m e" ". s ."; gap: 6px; margin-top: 8px; padding: 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); }
.mh-felt > .g5-board { position: absolute; top: 4px; right: 4px; z-index: 3; }
.mh-N { grid-area: n; } .mh-W { grid-area: w; } .mh-E { grid-area: e; } .mh-S { grid-area: s; } .mh-mid { grid-area: m; text-align: center; align-self: center; }
.mh-seat { position: relative; font-size: .78rem; min-width: 0; }
.mh-seat { display: block; } .mh-seat.mh-ns .mh-name { color: #5AB4FF; } .mh-seat.mh-ew .mh-name { color: #FFB547; }
.mh-seat.mh-me .mh-name { text-decoration: underline; }
.mh-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-meta { opacity: .75; }
.mh-dealer { display: inline-block; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.2); font-size: .7rem; }
.mh-hand { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.mh-card { display: inline-block; min-width: 1.9em; padding: 1px 3px; border-radius: 4px; background: #f6f6f2; color: #111; font-size: .78rem; font-weight: 600; text-align: center; }
.mh-card.red { color: #c8102e; }
.mh-card.played { background: #4a4e55; color: #c3c8cf; text-decoration: line-through; opacity: 1; } /* played: solid grey, never translucent (cards are never see-through) */
.mh-card.win { outline: 2px solid #4cd07d; }
.mh-trick { display: grid; grid-template-areas: ". n ." "w . e" ". s ."; gap: 2px; justify-content: center; margin-bottom: 4px; }
.mh-tN { grid-area: n; } .mh-tW { grid-area: w; } .mh-tE { grid-area: e; } .mh-tS { grid-area: s; }
.mh-bids { display: block; font-size: .78rem; }
.mh-score { margin-top: 6px; text-align: center; }
.mh-score .mh-ns { color: #5AB4FF; } .mh-score .mh-ew { color: #FFB547; }
.mh-top .ghost { white-space: nowrap; }
@media (max-width: 520px) {
  .mh-row { grid-template-columns: 1fr auto; row-gap: 2px; }
  .mh-felt { grid-template-columns: 1fr 1fr; grid-template-areas: "n n" "w e" "m m" "s s"; }
}

/* Jack, the mascot (assets/mascot): sign-in hero art (>=980 px) and the small head on empty states. Never on the felt. */
.jack-hero, .jack-hero img { display: block; }
.jack-hero img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.hero { position: relative; }
.jack-auth { display: none; }
@media (min-width: 980px) { .jack-auth { display: block; position: absolute; top: 84px; right: 24px; width: min(240px, 20vw); pointer-events: none; } }
.jack-empty-row { display: flex; align-items: center; gap: 12px; }
.jack-empty img { width: 56px; height: 56px; opacity: .92; }
/* replay: who sits at the bottom (player names, never compass letters) + jump to a trick */
.mh-south { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.mh-south .mh-sw { min-height: 36px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-south .mh-sw.on { border-color: #5AB4FF; color: #5AB4FF; font-weight: 700; }
#mhJump { min-height: 36px; border-radius: 8px; padding: 0 8px; background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); }
#mhJump option { color: #111; }
/* Last 50 / Favourites tabs + stars */
.mh-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.mh-tabs button.on { border-color: #5AB4FF; color: #5AB4FF; font-weight: 700; }
.mh-li { display: flex; align-items: stretch; gap: 4px; }
.mh-li .mh-row { flex: 1; min-width: 0; }
.mh-star { background: transparent; border: 0; color: rgba(255,255,255,.55); font-size: 20px; min-width: 40px; min-height: 40px; cursor: pointer; }
.mh-star.on { color: #FFD15A; }
#mhStar.on { color: #FFD15A; border-color: #FFD15A; }
/* ---- replay v2 (Oct 21 2026): card by card, autoplay, share, show / hide hands, every table, play from here ---- */
.mh-card.back { width: 1.9em; min-width: 1.9em; height: 1.45em; padding: 0; border: 1px solid #9aa0a8; opacity: 1;
  background: repeating-linear-gradient(45deg, #1d3a5f 0 3px, #24497a 3px 6px); } /* solid card backs, never see-through */
.mh-closed { gap: 2px; }
.mh-eye { margin-left: 6px; padding: 1px 8px; min-height: 26px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: .72rem; cursor: pointer; }
.mh-eye[aria-pressed="true"] { border-color: #9aa0a8; }
.mh-steps { flex-wrap: wrap; gap: 6px; }
.mh-steps .ghost.small { min-width: 40px; min-height: 40px; font-size: .95rem; }
.mh-steps .mh-playbtn { min-width: 92px; font-weight: 700; border-color: #5AB4FF; color: #5AB4FF; }
.mh-steps .mh-playbtn[aria-pressed="true"] { background: rgba(90,180,255,.14); }
.mh-steps2 { margin-top: 6px; }
.mh-pace { display: inline-flex; align-items: center; gap: 6px; color: #c9ced4; }
.mh-pace input { width: 110px; accent-color: #5AB4FF; }
.mh-pace span { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.mh-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.mh-actions .ghost.small { min-height: 40px; }
.mh-mid #mhStatus { min-height: 1.3em; }
.mh-seat.mh-turn .mh-name::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #5ee08a; vertical-align: middle; }
/* practice: your cards are plain buttons (no legal-card highlighting) */
.mh-play { gap: 4px; }
.mh-pc { min-height: 40px; min-width: 2.4em; font-size: .95rem; border: 1px solid #b9bec5; cursor: pointer; font-family: inherit; }
.mh-pc:active { translate: 0 -2px; }
.mh-practice { margin-top: 8px; padding: 8px; border-radius: 12px; border: 1px solid rgba(90,180,255,.4); background: rgba(90,180,255,.06); }
.mh-pr-note { font-size: .8rem; text-align: center; color: #c9ced4; }
.mh-pr-result { margin-top: 8px; text-align: center; font-weight: 700; }
.mh-pr-result .mh-ns { color: #5AB4FF; } .mh-pr-result .mh-ew { color: #FFB547; }
/* layer for shared replays and every table on a board (opens over any screen, under the nav bar) */
.rv-layer { position: fixed; inset: 0; top: var(--hdr-h, 56px); z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding: 10px; overflow-y: auto; background: rgba(4,6,9,.78); }
.rv-layer[hidden] { display: none; }
.rv-sheet { position: relative; width: min(100%, 760px); margin-block: auto; padding: 14px 14px 16px; border-radius: 18px; background: linear-gradient(180deg, #1c1f24, #0f1114); border: 1px solid #5b6066; box-shadow: 0 18px 50px rgba(0,0,0,.6); color: #f1f3f5; }
.rv-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; font-size: 1rem; cursor: pointer; }
.rv-sheet .mh-top { padding-right: 44px; }
.bt-wrap h3 { margin: 6px 44px 6px 0; } .bt-wrap h3 small { font-weight: 500; font-size: .8rem; }
.bt-wrap .mh-ns { color: #5AB4FF; } .bt-wrap .mh-ew { color: #FFB547; }
.bt-head, .bt-pair { display: grid; grid-template-columns: minmax(0, 1fr) 3.2em 2.6em 2.6em 3.4em 7.2em; gap: 6px; align-items: baseline; font-size: .8rem; }
.bt-head { padding: 4px 92px 4px 30px; color: #a9b0b8; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.bt-head span:not(:first-child), .bt-pair > :not(.bt-names) { text-align: right; font-variant-numeric: tabular-nums; }
.bt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bt-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 86px; gap: 6px; align-items: center; padding: 8px 6px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.bt-row.mine { border-color: #5AB4FF; background: rgba(90,180,255,.08); }
.bt-rank { font-weight: 700; color: #a9b0b8; text-align: center; }
.bt-pairs { display: grid; gap: 3px; min-width: 0; }
.bt-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bt-pair.mh-ns .bt-names { color: #5AB4FF; } .bt-pair.mh-ew .bt-names { color: #FFB547; }
.bt-pair small { color: #a9b0b8; font-size: .7rem; }
.bt-pair > span:last-child { white-space: nowrap; }
.bt-open { justify-self: end; min-height: 40px; white-space: nowrap; }
.bt-pair .pos { color: #4cd07d; } .bt-pair .neg { color: #ff6b6b; }
@media (max-width: 520px) {
  .bt-head { display: none; }
  .bt-row { grid-template-columns: 20px minmax(0, 1fr); }
  .bt-open { grid-column: 1 / -1; justify-self: stretch; }
  .bt-pair { grid-template-columns: repeat(5, auto); justify-content: start; column-gap: 10px; }
  .bt-pair .bt-names { grid-column: 1 / -1; }
  .bt-pair > span:nth-child(2)::before { content: 'Bid '; color: #a9b0b8; }
  .bt-pair > span:nth-child(3)::before { content: 'Took '; color: #a9b0b8; }
  .bt-pair > span:nth-child(4)::before { content: 'Bags '; color: #a9b0b8; }
  .bt-pair > span:nth-child(6)::before { content: 'MP '; color: #a9b0b8; }
  .mh-pace input { width: 90px; }
}
.rp-all { margin-top: 8px; width: 100%; min-height: 40px; }
#mhJump { width: auto; max-width: 12em; flex: 0 0 auto; }
@media (max-width: 420px) { .mh-steps { gap: 3px; } .mh-steps .ghost.small { min-width: 44px; padding: 4px 0; } .mh-steps .mh-playbtn { min-width: 44px; } .mh-pl-t { display: none; } }

/* Replay hands (user, 21 Oct 2026 9:41 PM ET): the table's card faces, much bigger, ONE row per hand (never wraps):
 * an overlapping fan sorted by suit; the overlap tightens to fit the width (the corner index always shows); played
 * cards drop out. Compass: partner top, opponents left / right, you bottom, the trick in the middle. Portrait: the side
 * hands are vertical overlapping stacks. */
.mh-replay { --rc-w: 46px; --rc-h: 64px; }
@media (min-width: 900px) and (min-height: 600px) { .mh-replay { --rc-w: 60px; --rc-h: 84px; } }
@media (max-height: 500px) and (orientation: landscape) { .mh-replay { --rc-w: 38px; --rc-h: 53px; } }
.mh-replay .mh-card.card { --card-w: var(--rc-w); --card-h: var(--rc-h); width: var(--rc-w); height: var(--rc-h); min-width: 0; padding: 0; font-size: inherit; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.mh-replay .mh-card.back { width: var(--rc-w); height: var(--rc-h); min-width: 0; border-radius: 6px; }
.mh-felt { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
.mh-seat { min-width: 0; }
.mh-fan { display: flex; flex-wrap: nowrap; gap: 0; width: 100%; min-width: 0; margin-top: 4px; }
.mh-fan > .mh-card { flex: 0 0 var(--rc-w); margin: 0; }
.mh-fan > .mh-card + .mh-card { margin-left: clamp(calc(var(--rc-w) * -.6), calc((100% - var(--n, 13) * var(--rc-w)) / (var(--n, 13) - 1)), 2px); }
.mh-fan > .mh-card:hover { transform: none; }
.mh-play > .mh-pc { cursor: pointer; } .mh-play > .mh-pc:hover, .mh-play > .mh-pc:focus-visible { transform: translateY(-6px); z-index: 2; }
.mh-N .mh-fan, .mh-S .mh-fan { justify-content: center; }
.mh-trick { grid-template-columns: repeat(3, var(--rc-w)); gap: 4px; }
.mh-replay .mh-trick .mh-card.card { --card-w: calc(var(--rc-w) * .9); --card-h: calc(var(--rc-h) * .9); width: calc(var(--rc-w) * .9); height: calc(var(--rc-h) * .9); }
/* portrait: side hands as vertical stacks (each card shows its top corner), the felt keeps the compass */
@media (max-width: 600px) and (orientation: portrait) {
  .mh-felt { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n n n" "w m e" "s s s"; }
  .mh-W .mh-fan, .mh-E .mh-fan { flex-direction: column; width: var(--rc-w); margin-left: auto; margin-right: auto; }
  .mh-W .mh-fan > .mh-card, .mh-E .mh-fan > .mh-card { flex: 0 0 var(--rc-h); }
  .mh-W .mh-fan > .mh-card + .mh-card, .mh-E .mh-fan > .mh-card + .mh-card { margin-left: 0; margin-top: calc(var(--rc-h) * -.66); }
  .mh-W, .mh-E { max-width: 92px; text-align: center; }
  .mh-W .mh-meta, .mh-E .mh-meta, .mh-W .mh-name, .mh-E .mh-name { font-size: .7rem; overflow-wrap: anywhere; }
  .mh-trick { grid-template-columns: repeat(3, calc(var(--rc-w) * .9)); }
}
/* Replay uses the play table's compass. Trick cards are 90% of a hand card; the bidding line stays a grid. */
.mh-replay .mh-trick:not(.mh-bids) {
  position: relative; display: block; margin-left: auto; margin-right: auto;
  width: calc(var(--rc-w) * .9 * 2.86); height: calc(var(--rc-w) * .9 * 2.86);
}
.mh-replay .mh-trick:not(.mh-bids) .mh-tc { position: absolute; }
.mh-replay .mh-trick:not(.mh-bids) .mh-tN { top: max(0px, calc(50% - var(--rc-w) * .9 * 1.414)); left: 50%; transform: translateX(-50%); }
.mh-replay .mh-trick:not(.mh-bids) .mh-tS { bottom: max(0px, calc(50% - var(--rc-w) * .9 * 1.414)); left: 50%; transform: translateX(-50%); }
.mh-replay .mh-trick:not(.mh-bids) .mh-tW { left: max(0px, calc(50% - var(--rc-w) * .9 * 1.41)); top: 50%; transform: translateY(-50%); }
.mh-replay .mh-trick:not(.mh-bids) .mh-tE { right: max(0px, calc(50% - var(--rc-w) * .9 * 1.41)); top: 50%; transform: translateY(-50%); }
