/* Pisti game connection and player presentation; loaded after accepted game styles. */
body.pisti-hub-page #pisti-play [hidden]{display:none!important}
body.pisti-hub-page.is-playing #pisti-play[data-game-ready="false"] :is(.center-play,.salon-felt-widget,.salon-captured-stack,.salon-backcards,#pisti-hand,.pisti-seat-cards){display:none!important}
body.pisti-hub-page.is-playing #pisti-play .pisti-waiting-note{
 position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:7;
 width:min(70%,28rem);box-sizing:border-box;padding:18px 20px;border:1px solid #c6a26a;border-radius:12px;
 background:#082b31ed;color:#f8e7c4;text-align:center;font:600 14px/1.6 system-ui;
 box-shadow:0 8px 24px #001c1c66;overflow-wrap:anywhere;
}
body.pisti-hub-page.is-playing #pisti-play[data-player-count="4"] .pisti-waiting-note{width:54%;font-size:13px}
body.pisti-hub-page.is-playing #pisti-play :is(.salon-side,.salon-left-column,.salon-right-column){min-width:0;box-sizing:border-box}
body.pisti-hub-page.is-playing #pisti-play :is(#pisti-self,#pisti-rival){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.pisti-hub-page.is-playing #pisti-play :is(.salon-self-banner,.salon-opponent-banner){width:184px;min-width:0;max-width:58%;box-sizing:border-box}
body.pisti-hub-page.is-playing #pisti-play :is(#salon-table-self,#salon-table-opponent){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.pisti-hub-page.is-playing #pisti-play :is(.salon-self-banner,.salon-opponent-banner) small{flex:none;white-space:nowrap}
body.pisti-hub-page.is-playing #pisti-play :is(.salon-avatar,.salon-board-avatar,.pisti-seat-avatar){overflow:hidden;flex-shrink:0;display:grid;place-items:center}
body.pisti-hub-page.is-playing #pisti-play .pisti-player-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
body.pisti-hub-page.is-playing #pisti-play .pisti-avatar-symbol{display:block;line-height:1}
body.pisti-hub-page.is-playing #pisti-play .pisti-avatar-empty{opacity:.7}
body.pisti-hub-page.is-playing #pisti-play .pisti-name-pro{color:#ffe0a0;text-shadow:0 1px 5px #9d6b3666}
body.pisti-hub-page.is-playing #pisti-play .pisti-seat-avatar{
 width:28px;height:28px;border:1px solid #e5b75e;border-radius:50%;
 background:radial-gradient(circle at 30% 20%,#fff0b6,#bd812c 52%,#3b250c 100%);
 color:#082136;font:700 18px/1 system-ui;box-sizing:border-box;
}
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-message{font:500 10px/1.4 system-ui;color:#edc996;margin:5px 0 0}
@media(min-width:1240px){body.pisti-hub-page.is-playing #pisti-play .salon-layout{grid-template-columns:190px minmax(0,1fr) 190px 150px}}
@media(min-width:901px) and (max-width:1239px){body.pisti-hub-page.is-playing #pisti-play .salon-layout{grid-template-columns:190px minmax(0,1fr) 190px}}
@media(min-width:901px) and (max-width:1060px){body.pisti-hub-page.is-playing #pisti-play .salon-layout{grid-template-columns:145px minmax(0,1fr) 145px}}
@media(max-width:900px){
 body.pisti-hub-page.is-playing #pisti-play :is(.salon-self-banner,.salon-opponent-banner){width:155px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-seat-avatar{width:22px;height:22px;font-size:14px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-waiting-note{font-size:12px;padding:12px}
}
@media(max-width:520px){
 body.pisti-hub-page.is-playing #pisti-play[data-player-count="4"] .pisti-waiting-note{top:54%;font-size:11px;padding:10px 8px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-seat-avatar{width:20px;height:20px;font-size:13px}
}

/* v2: compact in-game player profile facts and persistent Pişti stats. */
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-facts{
 display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin:4px 0 5px;
 min-width:0;color:#d9e7e8;font:600 9px/1.15 system-ui;text-align:center;
}
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-facts span{
 min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-facts span+span:before{content:'•';margin-right:6px;color:#d7a84d}
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;width:100%;margin:0 0 6px;
}
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats span{
 min-width:0;padding:4px 2px;border:1px solid #2b5a6d;border-radius:5px;background:#0b3140cc;
 color:#a9c6cf;font:600 8px/1.05 system-ui;text-align:center;text-transform:uppercase;letter-spacing:.02em;
}
body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats b{
 display:block;margin-top:2px;color:#ffd06d;font:800 11px/1 system-ui;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
@media(max-width:1060px){
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-facts{gap:3px;font-size:8px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-facts span+span:before{margin-right:3px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats{gap:2px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats span{padding:3px 1px;font-size:7px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats b{font-size:10px}
}
@media(max-width:900px){
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-facts{font-size:8px}
 body.pisti-hub-page.is-playing #pisti-play .pisti-profile-stats span{font-size:7px}
}

/* v3: keep the game header aligned; override the legacy compact-header shrink only on desktop. */
@media(min-width:801px){
 body.pisti-hub-page.is-playing .site-header{height:60px!important;min-height:60px!important}
 body.pisti-hub-page.is-playing .site-header .nav.wrap{
  width:min(1280px,calc(100% - 32px));height:100%;margin-inline:auto;
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:22px;
 }
 body.pisti-hub-page.is-playing .site-header .brand{font-size:27px!important}
 body.pisti-hub-page.is-playing .site-header .brand-symbol{font-size:30px!important;margin-right:8px!important}
 body.pisti-hub-page.is-playing .site-header .nav-links{display:flex;justify-content:center;align-items:center;gap:6px;min-width:0}
 body.pisti-hub-page.is-playing .site-header .nav-links a{padding:7px 10px!important;font-size:12px!important}
 body.pisti-hub-page.is-playing .site-header .nav-actions{justify-self:end}
}
