/* v50: ownership, counts and artwork are one coherent player card. */
#screen-game #playerRail .pchip {height:84px!important;min-height:84px!important;display:grid!important;grid-template-columns:32px minmax(48px,1fr) auto!important;grid-template-rows:1fr!important;gap:7px!important;padding:8px!important;align-items:center!important;align-content:center!important;}
#screen-game #playerRail .pchip.has-turn-hud {grid-template-columns:32px minmax(48px,1fr) auto 28px!important;padding-right:6px!important;}
#screen-game #playerRail .pchip .pchip-av {grid-column:1!important;grid-row:1!important;width:32px!important;height:32px!important;min-width:32px!important;}
#screen-game #playerRail .pchip .pchip-body {grid-column:2!important;grid-row:1!important;gap:4px!important;min-width:0!important;}
#screen-game #playerRail .pchip .pchip-name {font-size:14px!important;line-height:1.15!important;}
#screen-game #playerRail .pchip .pchip-meta {display:flex!important;flex-wrap:wrap;align-items:center;gap:3px 7px!important;min-height:0!important;}
.pchip-card-count {color:var(--chrome-muted);font:600 11px/1.2 var(--ui-display);white-space:nowrap;}
#screen-game #playerRail .pchip .pchip-score {height:auto!important;}
#screen-game #playerRail .pchip .pchip-score strong {font-size:11px!important;}
#screen-game #playerRail .pchip .opponent-hand {grid-column:3!important;grid-row:1!important;justify-content:flex-end!important;gap:3px!important;padding:0!important;height:56px!important;min-width:0;}
#screen-game #playerRail .opponent-back,#screen-game #playerRail .opponent-card-stack {width:31px;height:44px;flex-basis:31px;}
#screen-game #playerRail .pchip .pchip-turn-hud {grid-column:4!important;grid-row:1!important;width:28px!important;max-width:28px!important;height:39px!important;}
#screen-game #playerRail .pchip .pchip-role {font-size:10px!important;}
#screen-game #playerRail .pchip.is-me {background:var(--chrome-raised)!important;}
/* A section shared by self and public profiles, with equal deck/table tiles. */
.profile-loadout {margin:16px 0 4px;padding:12px;border:2px solid var(--chrome-border);border-radius:9px;background:var(--chrome-well);}
.profile-loadout h3 {font:700 13px/1.2 var(--ui-display);color:var(--chrome-muted);margin:0 0 9px;}
.profile-loadout-items {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
#modal-profile .profile-loadout-items>button {display:flex;align-items:center;gap:11px;min-width:0;min-height:71px;margin:0;padding:9px 11px;border:2px solid var(--chrome-border-strong);border-radius:7px;background:var(--chrome-raised);color:var(--cream);cursor:pointer;text-align:left;}
#modal-profile .profile-loadout-items>button:hover {border-color:var(--gold);}
.profile-loadout-items button>span:last-child {display:flex;flex-direction:column;gap:5px;min-width:0;}
.profile-loadout-items small {font:600 11px/1.1 var(--ui-display);color:var(--chrome-muted);}
.profile-loadout-items strong {font:700 14px/1.15 var(--ui-display);overflow-wrap:anywhere;}
#profileDeckBadge img {width:35px;height:49px;flex:0 0 35px;object-fit:contain;}
.profile-table-swatch {width:49px;height:49px;flex:0 0 49px;border:2px solid var(--chrome-border-strong);border-radius:6px;background-size:cover;background-position:center;}
/* The frame remains visible at the top, including when its pane is scrolled. */
#settingsStylePreview {border:2px solid var(--chrome-border-strong);border-radius:9px;overflow:hidden;}
#settingsStylePreview .settings-preview-table {border-radius:6px 6px 0 0!important;}
#settingsStylePreview::before {display:none;}
#modal-settings .settings-pane-v12[data-settings-pane="style"] {background:var(--chrome-raised);}
.practice-table {border-top:3px solid #655347!important;border-radius:12px!important;}
.help-modal-v29[data-guide-view="practice"] .help-scroll {scroll-padding-top:8px;}
/* Reward cards get more room without changing their portrait geometry. */
#progressTrack .progress-node-rewards>.progress-reward-icon.deck,.founder-next-preview>.progress-reward-icon.deck {width:58px!important;height:80px!important;min-height:80px!important;flex-basis:58px!important;}
.cosmetic-preview-rail-item {height:92px!important;min-height:92px!important;}
.cosmetic-preview-rail-item>.progress-reward-icon.deck {width:54px!important;height:76px!important;}
/* Deletion is deliberately separate from the routine sign-out action. */
.account-actions {display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px;}
#btnDeleteAccount {color:#ffb1aa;border-color:#a96060;background:var(--chrome-well);}
body.light #btnDeleteAccount {color:#8b232c;border-color:#b26666;}
.delete-account-modal {max-width:500px!important;}
.delete-account-modal p {font:500 14px/1.5 var(--ui-display);color:var(--chrome-muted);margin:14px 0;}
.delete-account-modal label {display:block;margin:14px 0 8px;color:var(--cream);font-size:14px;}
.delete-account-modal .delete-actions {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px;}
#btnConfirmDeleteAccount {background:#ad3847;color:#fff4df;border-color:#582532;}
#deleteAccountError {color:#ffb1aa;min-height:1.2em;}
body.light #deleteAccountError {color:#8b232c;}
@media(min-width:761px) and (max-width:1200px){
 #screen-game #playerRail .pchip,#screen-game #playerRail .pchip.has-turn-hud {grid-template-columns:25px minmax(0,1fr) 25px!important;grid-template-rows:30px 45px!important;height:94px!important;min-height:94px!important;gap:3px 5px!important;padding:5px!important;}
 #screen-game #playerRail .pchip .pchip-av {width:25px!important;height:25px!important;min-width:25px!important;}
 #screen-game #playerRail .pchip .pchip-turn-hud {grid-column:3!important;height:30px!important;}
 #screen-game #playerRail .pchip .opponent-hand {grid-column:1/-1!important;grid-row:2!important;justify-content:center!important;height:45px!important;}
 #screen-game #playerRail .pchip .pchip-body {gap:2px!important;}
 #screen-game #playerRail .pchip .pchip-name {font-size:12px!important;}
 .pchip-card-count {font-size:10px;}
}
@media(max-width:760px){
 #screen-game #playerRail .pchip,#screen-game #playerRail .pchip.has-turn-hud {grid-template-columns:23px minmax(0,1fr) 21px!important;grid-template-rows:34px 38px!important;height:86px!important;min-height:86px!important;gap:3px!important;padding:4px!important;}
 #screen-game #playerRail .pchip .pchip-av {width:23px!important;height:23px!important;min-width:23px!important;}
 #screen-game #playerRail .pchip .pchip-name {font-size:11px!important;}
 #screen-game #playerRail .pchip .pchip-body {grid-column:2/-1!important;gap:2px!important;}
 #screen-game #playerRail .pchip.has-turn-hud .pchip-body {grid-column:2!important;}
 #screen-game #playerRail .pchip .pchip-meta {gap:1px 4px!important;}
 .pchip-card-count {font-size:9px;}
 #screen-game #playerRail .pchip .pchip-role {font-size:8px!important;}
 #screen-game #playerRail .pchip .opponent-hand {grid-column:1/-1!important;grid-row:2!important;height:38px!important;justify-content:center!important;gap:3px!important;}
 #screen-game #playerRail .opponent-back,#screen-game #playerRail .opponent-card-stack {width:22px;height:31px;flex-basis:22px;}
 #screen-game #playerRail .pchip .pchip-turn-hud {grid-column:3!important;width:21px!important;max-width:21px!important;height:33px!important;}
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me {height:43px!important;min-height:43px!important;grid-template-rows:31px!important;grid-template-columns:25px minmax(0,1fr) 30px!important;}
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me .opponent-hand {display:none!important;}
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me .pchip-body {grid-column:2!important;gap:8px!important;}
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me .pchip-meta {flex-wrap:nowrap!important;}
 .profile-loadout {padding:10px;margin-top:12px;}
 #modal-profile .profile-loadout-items>button {padding:8px;gap:8px;}
 .profile-loadout-items strong {font-size:12px;}
 .profile-table-swatch {width:35px;height:42px;flex-basis:35px;}
 #progressTrack .progress-node-rewards>.progress-reward-icon.deck,.founder-next-preview>.progress-reward-icon.deck {width:46px!important;height:64px!important;min-height:64px!important;flex-basis:46px!important;}
 .cosmetic-preview-rail-item {height:83px!important;min-height:83px!important;}
 .cosmetic-preview-rail-item>.progress-reward-icon.deck {width:46px!important;height:65px!important;}
}
@media(max-width:360px){
 #screen-game #playerRail .opponent-back,#screen-game #playerRail .opponent-card-stack {width:18px;height:26px;flex-basis:18px;}
 #screen-game #playerRail .pchip .opponent-hand {gap:2px!important;}
}
@media(max-height:550px) and (min-width:620px){
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me {height:94px!important;min-height:94px!important;grid-template-rows:30px 45px!important;grid-template-columns:25px minmax(0,1fr) 25px!important;}
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me .opponent-hand {display:flex!important;}
 #screen-game #playerRail:not([data-players="2"]) .pchip.is-me .pchip-body {flex-direction:column!important;align-items:flex-start!important;gap:2px!important;}
}

#modal-delete-account {z-index:10050!important;}
/* Account identity and its two equal actions fit one compact card. */
body #modal-profile #profileAccount.profile-account {grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;padding:12px 14px!important;margin:0!important;align-items:center!important;}
body #modal-profile #profileAccount .profile-account-head {gap:10px!important;}
body #modal-profile #profileAccount .profile-account-head img {width:38px!important;height:38px!important;flex:0 0 38px!important;}
body #modal-profile #profileAccount .profile-account-head>div {min-width:0;}
body #modal-profile #profileAccount .profile-account-head strong {font-size:19px!important;line-height:1.15!important;}
body #modal-profile #profileAccount .profile-account-head span {margin-top:3px!important;font-size:11px!important;line-height:1.2!important;}
#profileAccount #accountEmail {display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px;font:500 12px/1.2 var(--ui-display);color:var(--chrome-muted);}
body #modal-profile #profileAccount #accountSignedState {display:block!important;grid-template-columns:none!important;width:auto!important;margin:0!important;}
body #modal-profile #profileAccount #accountGuestState {grid-column:1/-1;}
body #modal-profile #profileAccount :is(#accountGuestState,#accountSignedState).hidden {display:none!important;}
body #modal-profile #profileAccount .account-actions {display:grid;grid-template-columns:repeat(2,minmax(0,150px));gap:10px;margin:0;padding-bottom:4px;align-items:stretch;}
body #modal-profile #profileAccount .account-actions>.btn {display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:48px!important;min-height:48px!important;margin:0!important;padding:8px 12px!important;font-size:14px!important;line-height:1.1!important;white-space:normal!important;box-shadow:0 4px 0 #100e0c,inset 0 1px 0 #fff1!important;}
body.light #modal-profile #profileAccount .account-actions>.btn {box-shadow:0 4px 0 #b39874,inset 0 1px 0 #fff4bd!important;}
@media(max-width:760px){
 body #modal-profile #profileAccount.profile-account {grid-template-columns:minmax(0,1fr)!important;gap:11px!important;padding:12px!important;}
 body #modal-profile #profileAccount .profile-account-head img {width:34px!important;height:34px!important;flex-basis:34px!important;}
 body #modal-profile #profileAccount .account-actions {grid-template-columns:repeat(2,minmax(0,1fr));}
 body #modal-profile #profileAccount .account-actions>.btn {font-size:13px!important;padding:7px!important;}
}
body #modal-profile #profileAccount .account-actions>.btn {grid-column:auto!important;grid-row:auto!important;justify-self:stretch!important;align-self:stretch!important;order:0!important;}
