/* Shared leaderboard badges.
   ONE file, ONE look. The flight-home board (.leaderboard-row) and every game
   intro board (#leaderboard) used to draw their own podium coins: the intro
   ones were flat colour circles with a washed-out number, while the home
   board had proper gold / silver / bronze coins. Both now resolve to the
   same medal and the same VIP badge image, so the two screens cannot drift
   apart again. */
.podium .leaderboard-rank,
body.table-home-theme #leaderboard li .rank-medal.rank-1,
body.table-home-theme #leaderboard li .rank-medal.rank-2,
body.table-home-theme #leaderboard li .rank-medal.rank-3{
  --metal-light:#fff5b5;--metal-mid:#efbe45;--metal-dark:#94621b;
  position:relative;place-items:center;
  border-radius:50%;border:1px solid var(--metal-dark);
  background:radial-gradient(circle at 35% 25%,#ffffffa0,transparent 43%),
    conic-gradient(from 35deg,var(--metal-mid),var(--metal-light),var(--metal-mid),
      var(--metal-dark),var(--metal-light),var(--metal-mid));
  box-shadow:inset 0 0 0 2px var(--metal-light),inset 0 0 0 4px var(--metal-mid),
    inset 0 -3px 3px #6f481b55,0 3px 4px #36527730;
  color:#805213;font-weight:900;text-shadow:0 1px 0 var(--metal-light);
}
.podium .leaderboard-rank::after,
body.table-home-theme #leaderboard li .rank-medal.rank-1::after,
body.table-home-theme #leaderboard li .rank-medal.rank-2::after,
body.table-home-theme #leaderboard li .rank-medal.rank-3::after{
  content:"";position:absolute;inset:5px;border:1px solid var(--metal-dark);
  opacity:.5;border-radius:50%;pointer-events:none;
}
.podium-1 .leaderboard-rank,
body.table-home-theme #leaderboard li .rank-medal.rank-2{
  --metal-light:#f5fcff;--metal-mid:#b8c9d8;--metal-dark:#697b90;color:#526579;
}
.podium-2 .leaderboard-rank,
body.table-home-theme #leaderboard li .rank-medal.rank-3{
  --metal-light:#ffe1bd;--metal-mid:#d49a63;--metal-dark:#825033;color:#754424;
}
/* The intro board is a compact ten-row grid: keep its 24px coin but make
   the number legible again instead of the old 10px washed-out grey. */
body.table-home-theme #leaderboard li .rank-medal.rank-1,
body.table-home-theme #leaderboard li .rank-medal.rank-2,
body.table-home-theme #leaderboard li .rank-medal.rank-3{font-size:12px}

/* 4th place and below stay a plain number on both boards. */
.leaderboard-row:not(.podium) .leaderboard-rank,
body.table-home-theme #leaderboard li .rank-medal:not(.rank-1):not(.rank-2):not(.rank-3){
  border:0;background:none;box-shadow:none;color:#a4b3d1;text-shadow:none;
}

/* The VIP badge is a single shared image. Declare it once for both boards
   (a real span on game intros, an ::after on the flight-home board) so the
   proportions and the file in use can never diverge. */
body.table-home-theme #leaderboard .member-label,
[data-member="true"]::after{
  content:"";display:inline-block;flex:none;
  width:40px;height:20px;margin-left:5px;padding:0;
  border:0;border-radius:0;box-shadow:none;vertical-align:middle;
  background:url('/assets/member/vip-laurel-v3.png') center/contain no-repeat;
  color:transparent;font-size:0;
}
/* Annual members get the YEAR VIP artwork instead of the plain VIP one.
   Both boards resolve to the same two shared files, so the intro standings
   and the flight-home standings can never show different medals. */
body.table-home-theme #leaderboard .member-label.annual,
[data-member="true"][data-annual-member="true"]::after{
  background-image:url('/assets/member/annual-vip-laurel-v3.png');
}

/* Portrait frames follow the artwork, not the medal.
   Every shipped avatar is a rounded-SQUARE peach face on a transparent 256px
   canvas (rect x=16 y=16 w=224 h=224 rx=27 fill=#F3D2AD). The old 50% ring
   left four dark crescents around that face, so both standings now use the
   same soft-square frame as the shop cards: the transparent margin is filled
   with the artwork's peach and the white / VIP gold border follows a square
   with rounded corners. A percentage radius keeps the shape at every size
   (29px mobile -> 45px desktop) without another breakpoint. */
body.table-home-theme #leaderboard .seat-avatar,
.leaderboard-avatar{
  border-radius:22%;
  background-color:#F3D2AD;
}
/* The gold / cloud / night crest is a circular VIP ornament that surrounds
   the portrait. Keep its inner portrait round so the crest still fits;
   ordinary rows all share the square frame above. */
.leaderboard-avatar[data-frame="gold"],
.leaderboard-avatar[data-frame="cloud"],
.leaderboard-avatar[data-frame="night"]{
  border-radius:50%;
}

/* Flight Party play screen and lobby (2026-11-15).
   visual-v2.css still gives .player-avatar / .seat-avatar a 50% circle, which
   clips the rounded-SQUARE peach artwork and exposes --seat as four coloured
   crescents. Use the same 22% soft square + peach fill as both standings
   boards. The #players / #seat-grid IDs are unique to this page, so the table
   games' own seat frames and round VIP crests stay untouched. */
#players .player-avatar,
#seat-grid .seat-avatar{
  border-radius:22%;
  background-color:#F3D2AD;
}
#players .player-avatar[data-frame="gold"],
#players .player-avatar[data-frame="cloud"],
#players .player-avatar[data-frame="night"]{
  border-radius:50%;
}

/* ---------------------------------------------------------------------------
   No circular portrait frames anywhere (2026-11-15 13:48).
   Every shipped avatar is a rounded-SQUARE peach face on a transparent 256px
   canvas, so a 50% ring always clipped the corners into four dark crescents.
   The room "ready" dialog, the in-game player panel, the standings, the
   account / appearance previews and the Flight Party portraits all share
   this one 22% soft square. Purely circular UI (close buttons, counters,
   medals, status dots) is deliberately untouched. The circular VIP crest
   keeps its round inner portrait below so the ornament still fits.
   --------------------------------------------------------------------------- */
.seat-avatar,
.account-button-avatar,
.account-dialog-avatar,
.room-seat-avatar,
.appearance-preview,
.result-avatar,
.victory-portrait,
.header-account-avatar,
.system-avatar-image,
.reaction-avatar,
.pool-matchup .seat-avatar,
.snooker-matchup .seat-avatar{
  border-radius:22%;
  background-color:#F3D2AD;
}

/* ---------------------------------------------------------------------------
   NO portrait frames at all (2026-11-16 17:30).
   The user asked to remove EVERY existing avatar frame: the gold / cloud /
   night member crests, the injected .avatar-frame artwork, the white 2px
   ring, podium gold/silver/bronze outlines, the 22% soft square AND the
   peach #F3D2AD backing. Portraits now show only the artwork itself on a
   transparent background, at exactly the same sizes as before.
   The historical frame rules above stay in this file so the look can be
   restored later; this block is the shipped look on every host that loads
   rank-badges.css (flight home, native flight, native table, table home).
   !important is needed because visual-v2/v3/v5/v7, table.css, pool-shell,
   snooker-shell, room-dialog and flight-home-theme each declare their own
   borders / radii, and seat-frame-square.css uses an !important radius.
   --------------------------------------------------------------------------- */
[data-frame="gold"]::after,
[data-frame="cloud"]::after,
[data-frame="night"]::after{
  content:none!important;background-image:none!important;
}
.avatar-frame{display:none!important}
.leaderboard-avatar,
body.table-home-theme #leaderboard .seat-avatar,
#players .player-avatar,
#seat-grid .seat-avatar,
.seat-avatar,
.player-avatar,
.account-button-avatar,
.account-dialog-avatar,
.room-seat-avatar,
.appearance-preview,
.result-avatar,
.victory-portrait,
.header-account-avatar,
.system-avatar-image,
.reaction-avatar,
.pool-matchup .seat-avatar,
.snooker-matchup .seat-avatar{
  border:0!important;
  box-shadow:none!important;
  background-color:transparent!important;
  border-radius:0!important;
}
/* seat-frame-square.css loads AFTER this sheet and uses an !important
   play-state radius; raise specificity with html to win that one too. */
html body.table-home-theme[data-screen="play"] #seats .seat-avatar{
  border-radius:0!important;
}
/* The "waiting for player" placeholder is a seat marker, not a portrait. */
.room-seat-avatar.empty-seat-avatar{
  border:1px dashed #b3d2eb!important;
  background-color:#e4f1fc!important;
  border-radius:50%!important;
}
