.game-sidebar .game-panel { --panel-tint: var(--accent); position: relative; overflow: hidden; padding: 20px 16px; border-radius: 18px; background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--panel-tint) 8%, transparent), transparent 70%), var(--surface); box-shadow: 0 7px 20px #0000000a; }
.game-panel::before { content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--panel-tint) 55%, transparent), transparent); pointer-events: none; }
.game-panel.score-panel { --panel-tint: #e2b775; }
.game-panel.activity-panel { --panel-tint: var(--accent); }
.game-panel.b-results, .game-panel.history-panel { --panel-tint: var(--green); }
.game-panel-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.panel-mark { display: grid; place-items: center; width: 36px; height: 40px; flex: none; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 11px; transform: rotate(-5deg); }
.panel-mark > svg { transform: rotate(5deg); }
.score-mark { background: #ba843a1c; color: #dbaa64; border-color: #dbaa6438; }
.history-mark { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); border-color: color-mix(in srgb, var(--green) 20%, transparent); }
.game-sidebar .game-panel-heading .eyebrow { font-size: 8px; letter-spacing: .8px; line-height: 1.5; }
.game-sidebar .game-panel-heading h3 { margin: 3px 0 0; font-size: 16px; line-height: 1.25; }
.panel-count { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 5px 7px; flex: none; }
.standings-list { padding: 0; margin: 0; list-style: none; }
.game-sidebar .standings-list .score-row { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-top-color: var(--line); padding: 14px 0; }
.game-sidebar .standings-list .score-row:first-child { border-top-color: transparent; }
.game-sidebar .standings-list .score-row.is-leader { padding: 12px 8px; margin: 0 -8px 4px; border-color: #c3935038; border-radius: 12px; background: linear-gradient(100deg, #c3935014, transparent); }
.score-avatar { position: relative; flex: none; width: 34px; height: 34px; }
.score-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--line); border-radius: 11px; }
.is-you .score-avatar img { border-color: var(--accent); }
.score-rank { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 6px; background: var(--surface-raised); border: 2px solid var(--surface); font-size: 8px; font-weight: 700; color: var(--muted); }
.is-leader .score-rank { color: #332315; background: #e2b775; }
.game-sidebar .score-player-name { display: block; font-size: 12px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.you-chip { display: inline-block; font-size: 7px; letter-spacing: .05em; color: var(--accent); border-radius: 4px; padding: 2px 4px; background: var(--accent-soft); margin-left: 5px; vertical-align: 1px; }
.game-sidebar .score-identity > small { font-size: 10px; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.game-sidebar .score-row > .score-value { min-width: 47px; display: block; flex: none; text-align: center; font-family: Manrope, sans-serif; font-size: 20px; letter-spacing: -.03em; line-height: 1.1; padding: 9px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); font-variant-numeric: tabular-nums; }
.game-sidebar .score-row > .score-value > small { display: block; font-family: 'DM Sans', sans-serif; font-size: 8px; margin-top: 4px; letter-spacing: 0; line-height: 1.2; }
.game-sidebar .is-leader > .score-value { color: #dbaa64; background: #c3935010; border-color: #c3935030; }
.score-footer { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); margin-top: 7px; padding-top: 15px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.score-footer > svg { color: #dbaa64; }
.game-sidebar .activity-timeline { padding: 0; margin: 0; }
.game-sidebar .activity-timeline li { position: relative; display: flex; gap: 10px; padding: 12px 0; margin: 0; font-size: 12px; line-height: 1.65; border: 0; }
.game-sidebar .activity-timeline li::before { content: ''; position: absolute; left: 10px; top: 30px; bottom: -9px; width: 1px; background: var(--line); }
.game-sidebar .activity-timeline li:last-child::before { display: none; }
.activity-node { position: relative; z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; margin-top: 1px; color: var(--muted); }
.activity-node > i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.latest-event .activity-node { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.latest-event .activity-copy { color: var(--text); font-weight: 500; }
.activity-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.game-sidebar .b-results th, .game-sidebar .b-results td { font-variant-numeric: tabular-nums; }
.game-sidebar .b-results tbody td:last-child { font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 7%, transparent); }
.game-sidebar .history-panel summary { align-items: center; gap: 10px; justify-content: flex-start; }
.game-sidebar .history-panel summary > svg { color: var(--green); }
.game-sidebar .history-panel summary > span { margin-left: auto; padding: 3px 7px; border-radius: 6px; background: var(--surface-raised); }
.b-last-trick { background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--accent) 5%, transparent), transparent 75%), var(--surface); }
@media (max-width: 1100px) and (min-width: 761px) { .game-panel-heading .panel-count { display: none; } }
@media (max-width: 760px) {
  .game-sidebar .game-panel { padding: 23px 20px; border-radius: 19px; }
  .game-panel-heading { gap: 13px; margin-bottom: 18px; }
  .panel-mark { width: 43px; height: 47px; border-radius: 13px; }
  .panel-mark > svg { width: 25px; height: 25px; }
  .game-sidebar .game-panel-heading .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .game-sidebar .game-panel-heading h3 { font-size: 20px; margin-top: 5px; }
  .panel-count { padding: 6px 8px; font-size: 11px; }
  .game-sidebar .standings-list .score-row { gap: 14px; padding: 17px 0; }
  .game-sidebar .standings-list .score-row.is-leader { padding: 15px 10px; margin-left: -10px; margin-right: -10px; }
  .score-avatar { width: 42px; height: 42px; }
  .score-avatar img { border-radius: 13px; }
  .score-rank { width: 20px; height: 20px; font-size: 10px; }
  .game-sidebar .score-player-name { font-size: 15px; }
  .you-chip { font-size: 8px; padding: 2px 5px; }
  .game-sidebar .score-identity > small { font-size: 12px; margin-top: 5px; }
  .game-sidebar .score-row > .score-value { min-width: 63px; font-size: 27px; border-radius: 12px; padding: 11px 9px; }
  .game-sidebar .score-row > .score-value > small { font-size: 10px; }
  .score-footer { font-size: 12px; padding-top: 18px; }
  .game-sidebar .activity-timeline li { font-size: 14px; padding: 14px 0; gap: 13px; }
  .activity-node { width: 24px; height: 24px; border-radius: 8px; }
  .game-sidebar .activity-timeline li::before { left: 11px; top: 37px; }
}

/* Completed matches keep their own score sheets, including the original names. */
.game-sidebar .match-history > summary { min-height: 44px; }
.game-sidebar .match-result { margin-top: 12px; border-top: 1px solid var(--line); }
.game-sidebar .match-result > summary { min-height: 66px; padding: 12px 0; justify-content: space-between; cursor: pointer; }
.game-sidebar .match-result > summary > span { margin: 0; padding: 0; background: none; display: grid; gap: 5px; min-width: 0; }
.match-result summary small { color: var(--muted); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.match-result > p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.match-history table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.match-history th, .match-history td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.match-history td:last-child { font-weight: 700; color: var(--green); }
.game-sidebar .b-results-scroll { max-width: 100%; overscroll-behavior-x: contain; }
.game-sidebar .b-results-scroll th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--surface); min-width: 128px; max-width: 150px; white-space: normal; overflow-wrap: anywhere; box-shadow: 1px 0 var(--line); }
.game-sidebar .b-results-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
