.ccc-selfie-controls{display:grid;gap:8px;max-width:390px;margin:12px auto;padding:12px;border:1px solid #6274ac;border-radius:16px;background:#1b2b53}.ccc-selfie-action,.ccc-selfie-remove{cursor:pointer;border:1px solid #7bb2e3;border-radius:12px;padding:10px 14px;min-height:44px;background:#286cb7;color:#fff;font-weight:800;text-align:center;font:inherit}.ccc-selfie-action{font-weight:800}.ccc-selfie-confirm{background:#178761}.ccc-selfie-remove{background:#4b3354}.ccc-selfie-preview{width:112px;height:112px;border-radius:50%;object-fit:cover;justify-self:center;border:4px solid #ffd368}.ccc-selfie-preview[hidden],.ccc-selfie-confirm[hidden]{display:none!important}.ccc-selfie-message{font-size:12px;color:#c9d9f1;line-height:1.4}.ccc-player-selfie{border-radius:50%!important;object-fit:cover!important;background:#152344}.playerAvatar:has(.ccc-player-selfie){background:#314b83!important;border:2px solid #ffd368;padding:2px!important}.playerAvatar .ccc-player-selfie{width:100%;height:100%}.ccc-selfie-session{margin:8px 0}.ccc-selfie-session summary{cursor:pointer;font-weight:700;color:#f5d888}.ccc-selfie-session .ccc-selfie-controls{margin:8px 0 0}.ccc-selfie-controls input{display:none}.playerAvatar:has(.ccc-player-selfie){position:relative;overflow:visible!important}.ccc-selfie-critter-badge{position:absolute;right:-7px;bottom:-6px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#162a50;border:1px solid #f8d474;font-size:13px;line-height:1;box-shadow:0 1px 4px #080f29}

.ccc-player-selfie-open{display:block;width:100%;margin:7px 0 3px;min-height:42px;border:1px solid #86c9ff;border-radius:12px;background:#214e7e;color:#fff;font:inherit;font-size:clamp(12px,2.4vw,15px);font-weight:800;cursor:pointer;padding:7px 10px}
.ccc-player-photo-dialog{width:min(92vw,430px);max-height:90dvh;overflow:auto;box-sizing:border-box;border:2px solid #8bb8ef;border-radius:20px;background:#182c53;color:white;padding:20px;box-shadow:0 25px 70px #0009}
.ccc-player-photo-dialog::backdrop{background:#040b20b8}
.ccc-player-photo-dialog h2{font-size:clamp(22px,5vw,30px);margin:0 0 8px}
.ccc-player-photo-dialog p{font-size:15px;line-height:1.4;color:#d6e5fa}
.ccc-player-photo-dialog .ccc-selfie-controls{max-width:100%;margin:14px 0}
.ccc-player-photo-dialog>.ccc-selfie-remove{width:100%}

.ccc-opening-player-label{display:inline-flex;align-items:center;gap:10px;min-width:0;font-weight:850}
.ccc-opening-player-photo{width:clamp(32px,4.8vw,55px);height:clamp(32px,4.8vw,55px);border-radius:50%;object-fit:cover;border:2px solid #fbd17a;background:#324774;flex:none}
.ccc-opening-placement{font-weight:900}

/* In-board 3D HUD player portrait, not the animated critter model. */
#raceShowcaseScore .scoreAvatar:has(.ccc-board-hud-selfie){overflow:hidden!important;flex-shrink:0;display:grid!important;place-items:center!important;align-items:center!important;justify-items:center!important;border-radius:50%;aspect-ratio:1/1;}
#raceShowcaseScore .scoreAvatar img.ccc-board-hud-selfie{display:block;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;margin:0!important;border-radius:50%!important;object-fit:cover!important;object-position:center!important;border:2px solid #f8d781;box-sizing:border-box!important;background:#243453;}
@media(max-width:800px){#raceShowcaseScore .scoreAvatar img.ccc-board-hud-selfie{width:100%!important;height:100%!important;}}

/* Keep the animal identity visible even when the player portrait is a photo. */
#raceShowcaseScore .scoreName{display:block!important;min-width:0!important;flex:1 1 auto!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;line-height:1.12!important;font-size:clamp(12px,1.12vw,19px)!important;}
#raceShowcaseScore .ccc-board-critter-label{display:inline-block!important;flex:0 1 auto;white-space:nowrap;max-width:100%;font-size:clamp(10px,.75vw,12px)!important;letter-spacing:.025em;color:#d4e9f5;font-weight:750;line-height:1.15}
.ccc-opening-critter-label{font-size:clamp(11px,1.2vw,15px);color:#d5e8fa;font-weight:750;white-space:nowrap}
.ccc-mg-critter-label{font-size:clamp(10px,1vw,13px);font-weight:750;color:#bce6fa;white-space:nowrap;margin-left:5px;vertical-align:middle}
.ccc-round-critter-label{font-size:clamp(10px,1vw,13px);font-weight:750;color:#bce6fa;white-space:nowrap}

.ccc-opening-player-identity{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;min-width:0;line-height:1.12}
.ccc-opening-player-identity>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#raceShowcaseScore .scoreName .ccc-board-critter-label{pointer-events:none}
.r20-mg-player-name .ccc-mg-critter-label{display:inline!important;line-height:1.1;white-space:nowrap}
.ccc-round-player-name .ccc-round-critter-label,.ccc-round-lead-name .ccc-round-critter-label{display:block;line-height:1.1;padding-top:2px}

/* Same player identity in party, social and trivia mini-games. */
.social-portrait.ccc-player-selfie,.ccc-sprint-avatar.ccc-player-selfie,.ccc-bomb-portrait.ccc-player-selfie{object-fit:cover!important;border-radius:50%!important;}
.ccc-social-player-identity{display:inline-flex;flex-direction:column;gap:1px;align-items:flex-start;min-width:0;line-height:1.12}
.ccc-social-player-identity>strong{font-size:inherit;color:inherit}
.ccc-social-critter-label{font-size:clamp(10px,1vw,12px);font-weight:700;color:#bde6f5;letter-spacing:.03em}
.ccc-quiz-selfie{width:clamp(22px,2.5vw,34px);height:clamp(22px,2.5vw,34px);border-radius:50%!important;object-fit:cover!important;vertical-align:middle;margin-inline-end:7px;border:2px solid #fbd27d}
.ccc-quiz-critter-label{display:inline-block;margin-inline-start:6px;font-size:clamp(10px,.95vw,12px);color:#c5e9f6;white-space:nowrap;font-weight:750}

/* Canonical player identity in all result tables and reveal cards. */
.ccc-player-identity{display:inline-flex;align-items:center;gap:clamp(5px,.65vw,10px);max-width:100%;min-width:0;text-align:left;vertical-align:middle}
.ccc-identity-photo{display:block;width:clamp(27px,3.2vw,42px);height:clamp(27px,3.2vw,42px);min-width:27px;flex:none;border:2px solid #efd29d;border-radius:50%!important;object-fit:cover!important;background:#334975}
.ccc-identity-text{display:inline-flex;flex-direction:column;gap:1px;min-width:0;line-height:1.12}
.ccc-identity-name{font-weight:900;font-size:inherit;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.ccc-identity-critter{font-size:clamp(10px,.86vw,12px);font-weight:750;line-height:1.15;color:#c6e7f4;letter-spacing:.015em;white-space:nowrap}
.r20-mg-round-standings th:has(.ccc-player-identity){text-align:left!important}
.r20-mg-round-standings .ccc-player-identity{max-width:min(100%,360px)}
.hide-seek-portraits.ccc-hide-seek-identities{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px 9px}
.hide-seek-portraits.ccc-hide-seek-identities .ccc-player-identity{max-width:100%;background:#142d4e85;border:1px solid #b1ddc550;border-radius:14px;padding:3px 6px}
.hide-seek-portraits.ccc-hide-seek-identities .ccc-identity-photo{width:clamp(25px,2.2vw,35px);height:clamp(25px,2.2vw,35px)}
.hide-seek-portraits.ccc-hide-seek-identities .ccc-identity-critter{font-size:10px}
.fib-score-name .ccc-player-identity,.r20-party-name .ccc-player-identity{vertical-align:middle}
@media(max-width:600px){.ccc-identity-photo{width:28px;height:28px}.ccc-identity-critter{font-size:10px}.hide-seek-portraits.ccc-hide-seek-identities .ccc-player-identity{padding:2px 5px}}

/* Character registration — the photo choice is visible as its own step, never
   buried below a long 12-critter selection grid. Works in mobile portrait. */
.ccc-registration-photo-dialog{width:min(94vw,440px);max-height:min(92dvh,760px);overflow-y:auto;text-align:center;padding:clamp(14px,3.8vw,22px)}
.ccc-registration-step{font-size:11px;font-weight:900;letter-spacing:.11em;color:#ffdc8e;margin-bottom:6px}
.ccc-registration-photo-dialog h2{font-size:clamp(24px,6vw,32px);margin:4px 0 6px}
.ccc-registration-photo-dialog>p{margin:5px 0 10px;font-size:clamp(13px,3.4vw,16px)}
.ccc-registration-choice-preview{display:flex;align-items:center;justify-content:center;gap:12px;background:#253f70;border-radius:14px;border:1px solid #6c93ce;padding:9px;margin:10px auto 12px;max-width:320px}
.ccc-registration-avatar{width:clamp(48px,13vw,68px);height:clamp(48px,13vw,68px);object-fit:cover;border:3px solid #ffda7c;border-radius:50%}
.ccc-registration-who{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
.ccc-registration-who strong{font-size:clamp(16px,4.3vw,21px);color:white}
.ccc-registration-who small{font-size:12px;font-weight:800;color:#c5e8ff}
.ccc-registration-photo-dialog .ccc-registration-camera{padding:0;margin:8px 0;max-width:none;border:0;background:transparent;gap:8px}
.ccc-registration-photo-dialog .ccc-registration-camera label.ccc-selfie-action{display:block;min-height:53px;background:#15845f;border:2px solid #79e8b1;border-radius:14px;font-weight:950;font-size:clamp(16px,4.5vw,19px);padding:13px 10px}
.ccc-registration-photo-dialog .ccc-registration-camera .ccc-selfie-confirm{display:block;width:100%;background:#187e61;min-height:48px}
.ccc-registration-photo-dialog .ccc-selfie-preview{width:100px;height:100px}
.ccc-registration-keep{display:block;width:100%;min-height:50px;cursor:pointer;background:#2a3c62;border:2px solid #8199ca;border-radius:13px;color:white;font:inherit;font-weight:900;font-size:clamp(13px,3.5vw,16px);padding:10px}
.ccc-registration-photo-status{min-height:21px;color:#b6f4d5;font-weight:850;font-size:13px}
.ccc-registration-hint{display:block;color:#d1ddf2;font-size:11px;line-height:1.35;margin-top:9px}
@media(max-height:630px){.ccc-registration-photo-dialog{padding:11px 16px}.ccc-registration-choice-preview{margin:5px auto}.ccc-registration-photo-dialog .ccc-registration-camera{gap:5px}.ccc-registration-hint{margin-top:4px}}


/* Missing temporary selfie: readable, dismissible phone-only recovery. */
.ccc-missing-selfie-notice{
 position:fixed;z-index:2147483000;left:50%;bottom:calc(14px + env(safe-area-inset-bottom,0px));
 transform:translateX(-50%);width:min(94vw,480px);
 display:flex;align-items:center;flex-wrap:wrap;justify-content:center;
 gap:9px 12px;padding:12px 14px;border:2px solid #8ed6ff;border-radius:16px;
 background:#163454;color:#f3fbff;box-shadow:0 10px 35px #0009;
 font-size:14px;font-weight:650;text-align:center;line-height:1.35;
}
.ccc-missing-selfie-notice span{flex:1 1 100%}
.ccc-missing-selfie-notice button{
 min-height:40px;padding:7px 13px;border:1px solid #9de9d3;border-radius:12px;
 background:#286e70;color:white;font:inherit;font-weight:800;cursor:pointer;
}
.ccc-missing-selfie-notice button:last-child{background:transparent;border-color:#9bb8c9}


/* Board-game TV player HUD: portrait and identity must remain inside each row.
   Scope to the board HUD so mini-game and phone avatars are unaffected. */
#raceShowcaseScore .scoreRow{
 box-sizing:border-box!important;
 min-width:0!important;
 align-items:center!important;
 overflow:hidden!important;
}
#raceShowcaseScore .scoreAvatar:has(.ccc-board-hud-selfie){
 box-sizing:border-box!important;
 width:clamp(36px,4.6vw,54px)!important;
 height:clamp(36px,4.6vw,54px)!important;
 min-width:clamp(36px,4.6vw,54px)!important;
 min-height:0!important;
 max-width:54px!important;
 max-height:54px!important;
 flex:0 0 clamp(36px,4.6vw,54px)!important;
 position:relative!important;
 inset:auto!important;
 margin:0!important;
 padding:0!important;
 align-self:center!important;
 transform:none!important;
 overflow:hidden!important;
}
#raceShowcaseScore .scoreAvatar .ccc-board-hud-selfie{
 width:100%!important;height:100%!important;
 object-fit:cover!important;object-position:center!important;
 border-radius:50%!important;
}
#raceShowcaseScore .scoreName{
 box-sizing:border-box!important;
 display:block!important;
 flex:1 1 0!important;
 width:auto!important;
 max-width:100%!important;
 min-width:0!important;
 margin:0!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
 overflow-wrap:normal!important;
 font-size:clamp(14px,2.4vw,29px)!important;
 line-height:1.18!important;
}
#raceShowcaseScore .scoreRow > *{min-width:0}
#raceShowcaseScore .scoreRow .ccc-board-critter-label{
 display:block!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
}
@media(max-width:650px){
 #raceShowcaseScore .scoreAvatar:has(.ccc-board-hud-selfie){
  width:38px!important;height:38px!important;
  min-width:38px!important;flex-basis:38px!important;
 }
 #raceShowcaseScore .scoreName{font-size:clamp(12px,2.7vw,19px)!important}
}

/* Board HUD: clear player names, aligned selfies, compact critter identity. */
body.tv.board-only #raceShowcaseScore .scoreIdentity{display:flex!important;align-items:center!important;min-width:0!important;gap:8px!important}
body.tv.board-only #raceShowcaseScore .scoreAvatar{position:relative!important;inset:auto!important;transform:none!important;box-sizing:border-box!important;flex:0 0 clamp(34px,3.2vw,44px)!important;width:clamp(34px,3.2vw,44px)!important;height:clamp(34px,3.2vw,44px)!important;display:grid!important;place-items:center!important;align-self:center!important;border-radius:50%!important;overflow:hidden!important;padding:0!important;margin:0!important}
body.tv.board-only #raceShowcaseScore .scoreAvatar img.ccc-board-hud-selfie{width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%!important;display:block!important;border-radius:50%!important}
body.tv.board-only #raceShowcaseScore .scoreName{display:block!important;min-width:0!important;max-width:100%!important;flex:1 1 0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:clamp(13px,1.25vw,19px)!important;line-height:1.2!important}
body.tv.board-only #raceShowcaseScore .ccc-board-critter-label{display:block!important;font-size:clamp(9px,.72vw,11px)!important;line-height:1.15!important;color:#cce9f5!important;font-weight:800!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.tv.board-only #raceShowcaseScore .scoreCoins{flex-shrink:0!important;white-space:nowrap!important}
@media(max-width:800px){body.tv.board-only #raceShowcaseScore .scoreAvatar{flex-basis:34px!important;width:34px!important;height:34px!important}body.tv.board-only #raceShowcaseScore .scoreName{font-size:13px!important}}
