#playerProfileDialog{box-sizing:border-box;width:min(940px,96vw);max-height:94vh;overflow:auto;padding:26px;border:1px solid #718991;border-radius:18px;background:linear-gradient(145deg,#26373e,#111d23);color:#e8f4fa;box-shadow:0 20px 80px #000a;font:16px system-ui}
#playerProfileDialog::backdrop{background:#02090dd9;backdrop-filter:blur(5px)}
#playerProfileDialog #profileClose{width:auto;white-space:nowrap;font-size:13px}
#playerProfileDialog header,#playerProfileDialog footer{display:flex;align-items:center;gap:12px}
#playerProfileDialog header{justify-content:space-between}#playerProfileDialog h1{font-size:30px;margin:4px 0}#playerProfileDialog small{color:#65cfff;letter-spacing:2px;font-size:11px}#playerProfileDialog p{color:#adc3cb;font-size:14px;line-height:1.5}#playerProfileDialog h2,#playerProfileDialog label{display:block;font-size:15px;margin:12px 0 9px}
#playerProfileDialog button,#playerProfileDialog select{color:#e8f4fa;background:#2b404a;border:1px solid #526c76;border-radius:8px;padding:10px 16px;font:700 14px system-ui;cursor:pointer}
#playerProfileDialog button:hover,#playerProfileDialog button:focus-visible{border-color:#65cfff;box-shadow:0 0 16px #65cfff44}#playerProfileDialog button:disabled{opacity:.5;cursor:wait}#playerProfileDialog button[aria-pressed=true]{border-color:#65cfff;box-shadow:0 0 0 2px #65cfff,0 0 16px #65cfff44}
.profile-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px}.profile-preview{padding:18px 10px;border:1px solid #49606a;border-radius:12px;background:radial-gradient(ellipse at center,#334f5a,#14252c 75%);text-align:center}.profile-team-previews{display:flex}.profile-team-previews>div{width:50%;color:#65cfff}.profile-team-previews>div+div{color:#ff7165}.profile-team-previews canvas{display:block;width:100%;height:auto}.profile-turn{display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px}
#profileFaces{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}#playerProfileDialog #profileFaces button{padding:0;aspect-ratio:1}#profileFaces img{display:block;width:100%;height:100%;object-fit:contain}#profileHat{width:100%}#profileColors{display:flex;flex-wrap:wrap;gap:10px;padding:3px}#playerProfileDialog #profileColors button{background:var(--swatch);width:28px;height:28px;min-width:28px;flex:0 0 28px;border-radius:50%;padding:0}#playerProfileDialog footer{margin-top:22px;border-top:1px solid #49606a;padding-top:15px}#profileStatus{margin-right:auto}#playerProfileDialog #profileSave{background:#254f62;border-color:#65cfff}#homeProfile{border-color:#65cfff;color:#b9eaff}
@media(max-width:660px){#playerProfileDialog{padding:16px}.profile-layout{grid-template-columns:1fr}.profile-team-previews canvas{max-height:150px;object-fit:contain}.profile-preview{padding:8px}.profile-preview p{margin:6px}#profileFaces{grid-template-columns:repeat(5,1fr)}#profileFaces img{max-height:64px}#playerProfileDialog footer{flex-wrap:wrap}#profileStatus{flex-basis:100%}}

#playerProfileDialog canvas{position:static!important;inset:auto!important;background:transparent!important;image-rendering:auto!important}

.profile-zoom{display:flex;align-items:center;gap:12px;margin:18px 12px 8px}.profile-zoom input{min-width:0;flex:1;accent-color:#65cfff}.profile-zoom output{min-width:48px;font:700 12px system-ui;color:#b9eaff}#playerProfileDialog .profile-zoom label{margin:0;font-size:12px}.profile-team-previews canvas{cursor:zoom-in}

#homeAccount #homeProfile{margin:14px 12px 0 0!important}

.profile-anatomy{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;margin-top:10px}.profile-anatomy select{width:100%;min-width:0}#playerProfileDialog .profile-anatomy label{font-size:12px;margin-bottom:6px}.profile-preview{align-self:start;position:sticky;top:0}#playerProfileDialog{scrollbar-width:thin;scrollbar-color:#526c76 #14252c}@media(max-width:660px){.profile-preview{position:static}}

.profile-faction-switch{display:flex;justify-content:center;gap:12px;margin-bottom:12px}.profile-faction-switch button{min-width:100px}#playerProfileDialog [data-preview-team="fire"][aria-pressed="true"]{border-color:#ff7165;box-shadow:0 0 0 2px #ff7165,0 0 16px #ff716544}.profile-team-previews{justify-content:center}.profile-team-previews>div{width:100%;max-width:320px}#profileFaces{grid-template-columns:repeat(6,1fr)}

#profileCharacter{touch-action:none;cursor:grab;user-select:none}#profileCharacter.is-rotating{cursor:grabbing}

#playerProfileDialog .profile-shared-colors{font-size:11px;margin:8px 0 4px;color:#adc3cb}

.profile-hat-picker{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:10px;min-height:44px}.profile-hat-picker span{text-align:center;font-weight:700}#playerProfileDialog .profile-hat-picker button{display:grid;place-items:center;width:44px;height:44px;padding:10px;border-radius:12px;background:linear-gradient(145deg,#344e59,#22353f);color:#b9eaff}.profile-hat-picker svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}#playerProfileDialog #profileHat[hidden]{display:none}

.dosenpfand-balance{display:grid;grid-template-columns:24px auto;grid-template-rows:auto auto;align-content:center;column-gap:10px;min-width:120px;box-sizing:border-box;padding:8px 12px;border:1px solid #b9a45e77;border-radius:12px;background:linear-gradient(135deg,#3a3522aa,#18262c);text-align:left;color:#f4d76b}.dosenpfand-balance img{grid-row:1/3;align-self:center;width:22px;height:42px;object-fit:contain}.dosenpfand-balance strong{font:800 19px system-ui;line-height:1.2;font-variant-numeric:tabular-nums}.dosenpfand-balance span{font:12px system-ui;color:#d9d1b0;line-height:1.4}#homeAccount .dosenpfand-balance{margin-top:12px;width:100%}#homeAccount .dosenpfand-balance strong{color:#f4d76b}#playerProfileDialog .profile-header-actions{display:flex;align-items:center;gap:14px}#playerProfileDialog header{flex-wrap:wrap}#roundDosenpfandStatus{margin:12px 0 0;color:#f4d76b;font-weight:700}.report-dosenpfand-icon{height:22px;width:12px;object-fit:contain;vertical-align:middle;margin-right:5px}@media(max-width:480px){#playerProfileDialog .profile-header-actions{margin-left:auto}.dosenpfand-balance{min-width:110px}}

#roundDosenpfandStatus:empty{display:none}

.round-reward-card{display:grid;grid-template-columns:minmax(170px,.7fr) minmax(300px,1.4fr) minmax(220px,1fr);align-items:center;gap:24px;margin:0 0 22px;padding:18px 22px;border:1px solid #b8a06388;border-radius:14px;background:linear-gradient(120deg,#443d2480,#142a25 60%);text-align:left}.round-reward-heading{display:flex;align-items:center;gap:14px}.round-reward-heading img{width:32px;height:62px;object-fit:contain}.round-reward-heading h2{margin:0;color:#f2d583;font:800 21px system-ui}.round-reward-breakdown{width:100%;border-collapse:collapse;font:14px system-ui;font-variant-numeric:tabular-nums}.round-reward-breakdown thead th{padding:0 0 7px;color:#a6b7ad;font:600 10px system-ui;text-align:right}.round-reward-breakdown thead th:first-child{text-align:left}.round-reward-breakdown tbody th{font-weight:500;text-align:left}.round-reward-breakdown tbody th,.round-reward-breakdown td{padding:5px 0;border-top:1px solid #a1b5a31c;color:#e5eadf}.round-reward-breakdown td{text-align:right}.round-reward-breakdown td:last-child{color:#efd385;font-weight:750}.round-reward-breakdown .is-zero{opacity:.45}.round-reward-totals{border-left:1px solid #b8a06344;padding-left:24px}.round-reward-totals>span{font:12px system-ui;color:#b9c4b7}.round-reward-earned{display:block;color:#f4d76b;font:850 34px system-ui;line-height:1.2;font-variant-numeric:tabular-nums}.round-reward-balance{font:13px system-ui!important;color:#d9dfd4!important;margin:7px 0!important}.round-reward-totals #roundDosenpfandStatus{font:12px system-ui;margin:8px 0 0;line-height:1.45;color:#d7c88e}.round-reward-card.is-confirmed #roundDosenpfandStatus{color:#91dfac}.round-reward-retry{margin-top:10px;padding:7px 10px;border:1px solid #b8a063;border-radius:7px;background:#293f36;color:#f4df9e;cursor:pointer;font:600 12px system-ui}.round-reward-retry[hidden]{display:none}@media(max-width:850px){.round-reward-card{grid-template-columns:1fr 1fr;gap:16px}.round-reward-heading{grid-column:1/-1}.round-reward-heading h2{font-size:18px}.round-reward-heading img{width:22px;height:42px}.round-reward-totals{padding-left:16px}}@media(max-width:500px){.round-reward-card{grid-template-columns:1fr;padding:14px}.round-reward-heading{grid-column:auto}.round-reward-totals{border-left:0;border-top:1px solid #b8a06344;padding:12px 0 0}}

.round-reward-breakdown tbody tr{visibility:hidden;opacity:0;transform:translateY(5px);transition:opacity .16s ease,transform .16s ease}.round-reward-breakdown tbody tr.reward-row-visible{visibility:visible;opacity:1;transform:none}.round-reward-breakdown tbody tr.reward-row-visible.is-zero{opacity:.45}.round-reward-skip{margin-top:9px;padding:5px 0;border:0;background:transparent;color:#c4cdbd;font:11px system-ui;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.round-reward-skip[hidden]{display:none}.round-reward-card:not([data-animation-done=true]){cursor:pointer}.round-reward-earned{font-variant-numeric:tabular-nums}
/* 458: persistent personal statistics, separated by team. */
.player-statistics{max-width:1050px;margin:0 auto;padding:10px 12px 24px;--statistics-accent:#65cfff;--statistics-tint:#65cfff12}
.player-statistics[data-team=fire]{--statistics-accent:#ff6b73;--statistics-tint:#ff6b7312}
.statistics-kicker{font-size:11px;letter-spacing:2px;color:var(--statistics-accent);margin:0 0 10px}
.statistics-tabs{display:flex;gap:12px;margin:26px 0 20px}
#gameMenu .statistics-tabs button{min-width:136px;padding:14px 30px;border:1px solid #566c75;border-radius:10px;background:#243840;color:#c9d7dc;font-size:18px;font-weight:800;cursor:pointer}
#gameMenu .statistics-tabs button[aria-selected=true]{background:var(--statistics-tint);border:2px solid var(--statistics-accent);color:var(--statistics-accent);box-shadow:0 0 15px var(--statistics-tint)}
#gameMenu .statistics-tabs button:focus-visible{outline:2px solid var(--statistics-accent);outline-offset:3px}
.statistics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.statistics-card{padding:20px 22px;min-height:104px;box-sizing:border-box;border:1px solid #455c65;border-radius:12px;background:linear-gradient(135deg,var(--statistics-tint),#16282f)}
.statistics-card span{display:block;color:#b9ccd3;font-size:14px;line-height:1.35}
.statistics-card strong{display:block;margin-top:9px;color:#e8f6ff;font-size:29px;font-weight:800;font-variant-numeric:tabular-nums}
.statistics-card:nth-child(6) strong{color:var(--statistics-accent)}
.statistics-note{color:#bfd0d7;font-size:13px;margin:20px 0 6px;line-height:1.5}
.statistics-since{color:#98b0bb;font-size:12px;margin:0;line-height:1.5}
.reward-limit-note{display:block;color:#9db7c1;font-size:10px;font-weight:400;margin-top:3px}
@media(max-width:700px){.statistics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.statistics-card{padding:15px;min-height:94px}.statistics-card strong{font-size:24px}}

#gameMenu .player-statistics .statistics-tabs button:is(:hover,:focus-visible){outline-color:var(--statistics-accent)}

/* 461: reserve final-report controls from its hidden cinematic preparation onward. */
#gameStage .operation-report .result-menu-links{min-height:95px;box-sizing:border-box}
.round-reward-actions{display:grid;min-height:42px;align-items:start}
.round-reward-actions>button{grid-area:1/1;justify-self:start}
.round-reward-actions>button[hidden]{display:block;visibility:hidden;pointer-events:none}
.round-reward-totals #roundDosenpfandStatus{height:2.9em;min-height:2.9em;overflow:auto;box-sizing:content-box}
.round-reward-balance{min-height:2.4em;line-height:1.2!important}
.round-reward-breakdown{table-layout:fixed}
.round-reward-breakdown th:first-child{width:48%}
/* 464: shared Zellenterminal hacken activity while imprisoned. */
#prisonHackHud{position:fixed;left:50%;bottom:165px;transform:translateX(-50%);width:360px;max-width:calc(100% - 32px);box-sizing:border-box;padding:15px 18px;border:1px solid #537d90;border-radius:13px;background:linear-gradient(145deg,#203943f5,#12242cf5);color:#dceff7;box-shadow:0 8px 22px #0008;text-align:center;z-index:44;pointer-events:none}
#prisonHackHud[hidden]{display:none}
#prisonHackHud h2{margin:0 0 11px;font:800 17px system-ui;color:#a7e6ff}
.prison-hack-signal{display:flex;align-items:center;justify-content:center;gap:14px;min-height:60px;font:600 12px/1.4 system-ui}
#prisonHackHud kbd{display:grid;place-items:center;width:54px;height:54px;flex:0 0 54px;border:2px solid #69838d;border-bottom-width:5px;border-radius:10px;background:#182c35;color:#839da8;font:900 31px system-ui}
#prisonHackHud.has-signal kbd{border-color:#65cfff;color:#e2f6ff;background:#226083;box-shadow:0 0 16px #65cfff50}
.prison-hack-progress{height:7px;margin:12px 0 8px;border-radius:6px;background:#0b1a21;overflow:hidden}
.prison-hack-progress i{display:block;height:100%;background:#65cfff;transition:width .12s linear}
.prison-hack-time{font:750 13px system-ui;font-variant-numeric:tabular-nums}
.prison-hack-note{margin:7px 0;color:#9cb9c6;font:10px/1.5 system-ui}
#prisonHackHud small{display:block;min-height:15px;color:#bbd8e5;font:10px/1.4 system-ui}
/* 466: opt-in timing challenge, also visible while spectating from prison. */
#prisonHackHud{pointer-events:auto;width:430px;bottom:155px}
#prisonHackHud:not(.is-open){width:390px;padding:13px 18px;pointer-events:none}
.prison-hack-invite b,.prison-hack-invite span{display:block}
.prison-hack-invite b{color:#b9edff;font:800 17px system-ui}
.prison-hack-invite span{margin-top:5px;color:#b4ced8;font:12px system-ui}
.prison-hack-game[hidden],.prison-hack-invite[hidden]{display:none}
.prison-hack-heading{display:flex;align-items:center;gap:10px;text-align:left}
.prison-hack-heading img{width:66px;height:75px;object-fit:contain}
#prisonHackHud .prison-hack-heading h2{flex:1;margin:0;font-size:17px}
.prison-hack-heading button{width:30px;height:30px;padding:0;background:#243e49;border:1px solid #658996;border-radius:7px;color:#e0f5ff;font-size:22px;cursor:pointer}
.prison-hack-instruction{color:#bed5df;font:12px/1.5 system-ui;margin:7px 0 12px}
#prisonHackHud .prison-hack-stop{display:block;width:100%;padding:15px 14px 8px;border:1px solid #567a8a;border-radius:10px;background:#0d202af0;color:#ccefff;cursor:pointer}
#prisonHackHud .prison-hack-stop:disabled{opacity:.65;cursor:default}
.prison-hack-track{display:block;position:relative;height:30px;margin:0 4px 10px;background:#08151e;border-radius:5px;overflow:hidden}
.prison-hack-target{position:absolute;top:0;height:100%;background:#2188bc;border:1px solid #85ddff;box-sizing:border-box}
.prison-hack-pulse{position:absolute;top:0;width:4px;height:100%;transform:translateX(-50%);background:#fff5bb;box-shadow:0 0 8px #fff0a0}
.prison-hack-call{font:800 12px system-ui;letter-spacing:.6px}

#prisonHackHud.is-complete{border-color:#64c99b}
#prisonHackHud.is-complete .prison-hack-invite b,#prisonHackHud.is-complete .prison-hack-call{color:#9aebbd}
#prisonHackHud.is-complete .prison-hack-progress i{background:#64c99b}
#prisonHackHud.is-complete .prison-hack-track{display:none}

/* 468: narrow target with the required left-hand key shown inside. */
#prisonHackHud .prison-hack-stop{box-sizing:border-box;cursor:default}
#prisonHackHud .prison-hack-stop.is-waiting{opacity:.65}
.prison-hack-target{display:grid;place-items:center;color:#fff;font:900 17px/1 system-ui;text-shadow:0 1px 3px #000;z-index:2}
.prison-hack-pulse{z-index:3}
#prisonHackHud:not(.has-signal) .prison-hack-target,#prisonHackHud:not(.has-signal) .prison-hack-pulse{visibility:hidden}

#prisonHackHud:not(.is-open){bottom:auto;transform:translate(-50%,-100%);width:320px;padding:10px 13px}
#prisonHackHud:not(.is-open)::after{content:'';position:absolute;left:50%;bottom:-8px;width:13px;height:13px;background:#172e38;border-right:1px solid #537d90;border-bottom:1px solid #537d90;transform:translateX(-50%) rotate(45deg)}
#prisonHackHud.is-complete:not(.is-open)::after{border-color:#64c99b}

/* 469: compositor-driven pulse; HUD text only changes when state changes. */
.prison-hack-pulse{left:0;will-change:transform}

/* Enlarge the opened prison-terminal challenge by 50%, including text and controls. */
#prisonHackHud.is-open{zoom:1.5;top:50%;bottom:auto;transform:translate(-50%,-50%);max-width:calc(66.666667% - 22px);max-height:calc(66.666667% - 22px);overflow:auto}

#prisonHackHud .prison-hack-heading h2{min-width:0;line-height:1.3}
#prisonHackHud #prisonHackClose{flex:0 0 auto;width:auto;height:auto;min-height:36px;margin-left:auto;padding:9px 12px;border:1px solid #78949e;border-radius:9px;background:linear-gradient(#35464f,#24343c);color:#e1edf2;font:800 12px/1.25 system-ui;white-space:nowrap;cursor:pointer}
#prisonHackHud #prisonHackClose:hover{filter:brightness(1.15)}
#prisonHackHud #prisonHackClose:focus-visible{outline:2px solid #ffd84d;outline-offset:3px}

#prisonHackHud.is-open.is-complete .prison-hack-instruction{padding:12px;border:1px solid #e5bd5f;border-radius:8px;background:#473a1c;color:#ffe39a;font-weight:800}
#prisonHackHud.is-open.is-complete .prison-hack-call{color:#ffe39a}
/* Paid cosmetics are previews until a separate, explicit purchase confirmation. */
.profile-shop{margin-top:18px;padding:14px;border:1px solid #617d87;border-radius:10px;background:#10242d;color:#dce9ed}
.profile-shop>p{font-size:13px;line-height:1.5;margin:0 0 10px}
.profile-shop-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:10px}
.profile-shop-row>span{flex:1;font-weight:700}.profile-shop-row>small{width:100%;color:#ffd878}
.profile-shop-row button{padding:10px 12px;border:1px solid #c2a65b;border-radius:7px;background:#3c3826;color:#ffe29a;font-weight:700;cursor:pointer}
.profile-shop-row button:disabled{opacity:.5;cursor:default}
#profilePurchaseDialog{box-sizing:border-box;width: min(520px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:26px;background:#172c36;color:#e6eef1;border:1px solid #a5bdc6;border-radius:14px;box-shadow:0 16px 80px #000b;font:15px/1.55 system-ui;z-index:10000}
#profilePurchaseDialog::backdrop{background:#02090dc9}
#profilePurchaseDialog h2{margin:0 0 15px}#purchaseItem{font-size:19px;font-weight:800;color:#ffe09a}
#profilePurchaseDialog .purchase-summary{display:grid;grid-template-columns:1fr;gap:10px;padding:0;background:none;margin:20px 0}
#profilePurchaseDialog .purchase-amount{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:13px 16px;border:1px solid #547d90;border-radius:10px;background:#112731}
#profilePurchaseDialog .purchase-amount dt{font-size:14px;color:#c2d6df}
#profilePurchaseDialog .purchase-amount dd{margin:0;text-align:right}
#profilePurchaseDialog .purchase-amount strong{display:block;font:850 24px/1.15 system-ui;font-variant-numeric:tabular-nums;color:#e5f2f8}
#profilePurchaseDialog .purchase-amount small{display:block;margin-top:4px;font:11px/1.3 system-ui;color:#9db7c3}
#profilePurchaseDialog .purchase-cost{border-color:#b69a50;background:#393324}
#profilePurchaseDialog .purchase-cost strong{color:#f4d586}
#profilePurchaseDialog .purchase-cost small{color:#cfbd8d}
#profilePurchaseDialog .purchase-result{position:relative;margin-top:13px;border:2px solid #79ccec;background:#173d4d}
#profilePurchaseDialog .purchase-result::before{content:'';position:absolute;left:0;right:0;top:-14px;height:1px;background:#668491}
#profilePurchaseDialog .purchase-result strong{font-size:29px;color:#b9efff}
#profilePurchaseDialog .purchase-result dt{font-weight:800;color:#d6f4ff}
#profilePurchaseDialog .purchase-result.is-insufficient{border-color:#e58b81;background:#482a2b}
#profilePurchaseDialog .is-insufficient strong,#profilePurchaseDialog .is-insufficient dt{color:#ffc0b6}
@media(max-width:400px){#profilePurchaseDialog .purchase-amount{gap:8px;padding:12px}#profilePurchaseDialog .purchase-amount dt{font-size:12px}}
.profile-purchase-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:22px}
.profile-purchase-actions button{padding:12px 16px;border:1px solid #7d969e;border-radius:8px;background:#293d46;color:#edf3f5;font-weight:800;cursor:pointer}
#purchaseConfirm{background:#e0bf6a;color:#17202a}#purchaseError{color:#ffb9a8}.profile-purchase-actions button:disabled{opacity:.5}
#profilePurchaseDialog button:focus-visible{outline:2px solid #ffe09a;outline-offset:3px}
/* Unified customization categories and selectable preview tiles; left preview stays unchanged. */
#playerProfileDialog .profile-options{display:flex;flex-direction:column;min-width:0;height:clamp(390px,calc(94vh - 230px),590px)}
#playerProfileDialog .profile-category-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-bottom:12px;border-bottom:1px solid #49606a}
#playerProfileDialog .profile-category-tabs button{min-width:0;padding:10px 8px;font-size:13px}
#playerProfileDialog .profile-category-tabs button[aria-pressed=true]{background:#244b5d;color:#dff5ff;box-shadow:inset 0 -3px #65cfff;border-color:#65cfff}
#playerProfileDialog .profile-option-pane{flex:1;min-height:120px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#627f8c #12232b;padding:0 7px 12px 2px}
#playerProfileDialog .profile-option-pane h2{margin:14px 0 10px;font-size:14px;color:#bfd6df}
#playerProfileDialog .profile-tile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#playerProfileDialog .profile-option-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:118px;padding:9px 5px 8px;border:1px solid #4e6873;background:linear-gradient(145deg,#263e49,#182c35);border-radius:10px;text-align:center;box-sizing:border-box}
#playerProfileDialog .profile-option-tile[aria-pressed=true]{border-color:#89ddff;background:linear-gradient(145deg,#315e70,#1b3c4b);box-shadow:inset 0 0 0 1px #89ddff}
#playerProfileDialog .profile-option-tile[aria-pressed=true]::after{content:'✓';position:absolute;right:5px;top:4px;display:grid;place-items:center;width:19px;height:19px;background:#9de5ff;color:#102934;border-radius:50%;font-size:12px;font-weight:900}
#playerProfileDialog .profile-tile-visual{display:block;flex:0 0 auto;width:64px;height:64px;object-fit:contain}
#playerProfileDialog .profile-tile-swatch{width:38px;height:38px;margin:13px;border:2px solid #cbdde170;border-radius:50%;background:var(--tile-color);box-shadow:inset 0 2px 5px #ffffff25,0 3px 6px #0004}
#playerProfileDialog .profile-tile-name{font:700 11px/1.25 system-ui;overflow-wrap:anywhere;min-height:28px;display:flex;align-items:center;justify-content:center}
#playerProfileDialog .profile-tile-state{font:600 10px/1.25 system-ui;color:#a9c2cc}
#playerProfileDialog .is-locked .profile-tile-state{color:#f3d387}
#playerProfileDialog .profile-option-tile:disabled{cursor:default}
#playerProfileDialog .profile-custom-actions{flex:0 0 auto;margin-top:auto;border-top:1px solid #49606a;background:#162932;padding:10px 0 0}
#playerProfileDialog .profile-custom-actions .profile-shop{margin:0;padding:0;border:0;background:none}
#playerProfileDialog .profile-custom-actions .profile-shop>p{font-size:11px;margin:0 0 7px}
#playerProfileDialog .profile-custom-actions .profile-shop-row{gap:6px;margin:7px 0}
#playerProfileDialog .profile-custom-actions .profile-shop-row>span{font-size:12px;flex-basis:100%}
#playerProfileDialog .profile-custom-actions .profile-shop-row button{width:100%;font-size:12px;padding:9px}
#playerProfileDialog .profile-custom-actions footer{margin:8px 0 0;padding:8px 0 0;gap:10px}
#playerProfileDialog .profile-custom-actions #profileStatus{font-size:11px;line-height:1.35;margin:0;flex:1}
#playerProfileDialog .profile-custom-actions #profileSave{flex:0 0 auto;padding:10px 17px}
@media(max-width:660px){#playerProfileDialog .profile-options{height:560px;max-height:80vh}#playerProfileDialog .profile-custom-actions footer{flex-wrap:nowrap}#playerProfileDialog .profile-custom-actions #profileStatus{flex-basis:auto}}
#profilePurchaseDialog.is-unlocked{border-color:#7cd5ee;box-shadow:0 0 32px #65cfff35,0 16px 80px #000b}
#profilePurchaseDialog .purchase-unlock{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:270px;padding:16px;text-align:center}
#profilePurchaseDialog .purchase-unlock-icon{display:grid;place-items:center;width:136px;height:136px;border:1px solid #75c6df;border-radius:20px;background:radial-gradient(ellipse,#355c6c,#162f3a);box-shadow:0 0 24px #65cfff22;font-size:55px;color:#b3efff}
#profilePurchaseDialog .purchase-unlock-icon img{display:block;width:118px;height:118px;object-fit:contain}
#profilePurchaseDialog .purchase-unlock-swatch{display:block;width:66px;height:66px;border:3px solid #e3f6fb8c;border-radius:50%;box-shadow:0 5px 16px #0005}
#profilePurchaseDialog .purchase-unlock-track{width:136px;height:5px;overflow:hidden;margin:15px 0 24px;background:#081820;border-radius:5px}
#profilePurchaseDialog .purchase-unlock-track span{display:block;width:100%;height:100%;background:linear-gradient(90deg,#43aaca,#b4f2ff);transform-origin:left;animation:purchase-unlock-fill 1.5s linear both}
#profilePurchaseDialog .purchase-unlock h2{margin:0;color:#d8f7ff;font:800 23px/1.4 system-ui}
@keyframes purchase-unlock-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){#profilePurchaseDialog .purchase-unlock-track span{animation:none;transform:scaleX(1)}}
#profilePurchaseDialog .purchase-confirm-item{display:flex;align-items:center;gap:18px;margin:16px 0}
#profilePurchaseDialog .purchase-confirm-item #purchaseItem{margin:0;min-width:0;overflow-wrap:anywhere}
#profilePurchaseDialog .purchase-confirm-item .purchase-unlock-icon{width:88px;height:88px;flex-shrink:0;border-radius:14px}
#profilePurchaseDialog .purchase-confirm-item .purchase-unlock-icon img{width:80px;height:80px}
#profilePurchaseDialog .purchase-confirm-item .purchase-unlock-swatch{width:46px;height:46px}

/* Gold distinguishes clothing subcategories and explicit purchase actions. */
#playerProfileDialog .profile-color-tabs{position:sticky;top:0;z-index:3;margin:0 0 18px;padding:12px;border:1px solid #b69a50;border-radius:10px;background:linear-gradient(135deg,#302d22,#1e282b);box-shadow:inset 0 1px #ffe09a18,0 6px 12px #071116b3}
#playerProfileDialog .profile-color-tabs>small{display:block;margin-bottom:9px;color:#ecd28c;font:800 10px/1.3 system-ui;letter-spacing:1.3px}
#playerProfileDialog .profile-color-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#playerProfileDialog .profile-color-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:9px 8px;font-size:12px;border-color:#8e7b4d;background:#272c2a;color:#dac99d;box-shadow:none}
#playerProfileDialog .profile-color-tabs button svg{width:24px;height:24px;flex:0 0 24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
#playerProfileDialog .profile-color-tabs button[aria-pressed=true]{background:linear-gradient(#65532e,#403922);color:#ffe8aa;border-color:#e0bf6a;box-shadow:inset 0 -3px #e0bf6a,0 0 10px #e0bf6a20}
#playerProfileDialog .profile-color-tabs button:is(:hover,:focus-visible){border-color:#ffe09a;box-shadow:0 0 12px #e0bf6a33;outline-color:#ffe09a}
#playerProfileDialog .profile-shop-row button,#profilePurchaseDialog #purchaseConfirm{border:1px solid #e0bf6a;background:linear-gradient(#ebcd7d,#ccaa54);color:#20251f;box-shadow:inset 0 1px #fff2bf80,inset 0 -2px #8a692d;font-weight:800}
#playerProfileDialog .profile-shop-row button:is(:hover,:focus-visible):not(:disabled),#profilePurchaseDialog #purchaseConfirm:is(:hover,:focus-visible):not(:disabled){border-color:#fff0be;background:linear-gradient(#f5dc96,#dfbc63);box-shadow:inset 0 1px #fff2bf80,0 0 14px #e0bf6a44;outline:2px solid #ffe09a;outline-offset:2px}
#playerProfileDialog .profile-shop-row button:disabled,#profilePurchaseDialog #purchaseConfirm:disabled{opacity:.45;cursor:default;box-shadow:none}

/* A removable preview item and its explicit purchase action share one row. */
#playerProfileDialog .profile-custom-actions .profile-shop{max-height:38vh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8e7b4d #162932;padding-right:4px}
#playerProfileDialog .profile-shop-actions{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;width:100%}
#playerProfileDialog .profile-custom-actions .profile-shop-row .profile-buy-button,#playerProfileDialog .profile-buy-all .profile-buy-button{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:54px;width:100%;padding:9px 14px;text-align:left}
#playerProfileDialog .profile-buy-price{font:900 27px/1 system-ui;font-variant-numeric:tabular-nums;letter-spacing:.2px}
#playerProfileDialog .profile-buy-unit{font:650 11px/1.2 system-ui}
#playerProfileDialog .profile-buy-action{margin-left:auto;font:850 13px/1.2 system-ui}
#playerProfileDialog .profile-custom-actions .profile-shop-row .profile-remove-purchase{width:44px;min-height:54px;padding:0;border:1px solid #9c8a5e;border-radius:8px;background:#29322f;color:#ffe3a0;box-shadow:none;font:400 29px/1 system-ui;cursor:pointer}
#playerProfileDialog .profile-custom-actions .profile-shop-row .profile-remove-purchase:is(:hover,:focus-visible):not(:disabled){background:#514030;border-color:#ffe09a;outline:2px solid #ffe09a;outline-offset:1px;box-shadow:none}
#playerProfileDialog .profile-buy-all{position:sticky;bottom:0;z-index:1;margin-top:10px;padding-top:10px;border-top:1px solid #b69a5080;background:#162932}
#playerProfileDialog .profile-buy-all .profile-buy-button{border:1px solid #ffe09a;background:linear-gradient(#ebcd7d,#ccaa54);color:#20251f;box-shadow:inset 0 1px #fff2bf80,inset 0 -2px #8a692d}
#playerProfileDialog .profile-buy-all .profile-buy-button:is(:hover,:focus-visible):not(:disabled){background:linear-gradient(#f5dc96,#dfbc63);outline:2px solid #ffe09a;outline-offset:2px}
#playerProfileDialog .profile-buy-all small{display:block;margin-top:6px;color:#ffd878;font:11px/1.4 system-ui;letter-spacing:0}
#playerProfileDialog .profile-option-tile.is-queued{border-color:#e0bf6a;box-shadow:inset 0 0 0 1px #e0bf6a;background:linear-gradient(145deg,#48412c,#27302a)}
#playerProfileDialog .profile-option-tile.is-queued::after{background:#e0bf6a;color:#20251f}
#profilePurchaseDialog #purchaseItemPreview,.purchase-success-icons{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
#profilePurchaseDialog .purchase-confirm-item:has(#purchaseItemPreview>.purchase-unlock-icon:nth-child(2)){flex-direction:column;align-items:flex-start}
#profilePurchaseDialog .purchase-success-icons:has(>.purchase-unlock-icon:nth-child(2)) .purchase-unlock-icon{width:88px;height:88px}
#profilePurchaseDialog .purchase-success-icons:has(>.purchase-unlock-icon:nth-child(2)) .purchase-unlock-icon img{width:80px;height:80px}
@media(max-width:420px){#playerProfileDialog .profile-buy-unit{font-size:9px}#playerProfileDialog .profile-buy-price{font-size:24px}#playerProfileDialog .profile-buy-action{font-size:11px}}

/* Two compact purchase cards per row; the total remains full width. */
#playerProfileDialog .profile-custom-actions .profile-shop{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;align-items:start}
#playerProfileDialog .profile-custom-actions .profile-shop>.profile-multiselect-hint,#playerProfileDialog .profile-custom-actions .profile-shop>.profile-buy-all{grid-column:1/-1;margin:0}
#playerProfileDialog .profile-custom-actions .profile-shop-row{display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:6px;margin:0}
#playerProfileDialog .profile-custom-actions .profile-shop-row>span{flex:none;min-height:30px;font-size:11px;line-height:15px;overflow-wrap:anywhere}
#playerProfileDialog .profile-shop-row .profile-shop-actions{grid-template-columns:minmax(0,1fr) 32px;gap:6px}
#playerProfileDialog .profile-custom-actions .profile-shop-row .profile-buy-button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;min-width:0;min-height:54px;padding:7px 8px}
#playerProfileDialog .profile-shop-row .profile-buy-price{grid-column:1;grid-row:1;font-size:25px}
#playerProfileDialog .profile-shop-row .profile-buy-unit{grid-column:1;grid-row:2;font-size:9px}
#playerProfileDialog .profile-shop-row .profile-buy-action{grid-column:2;grid-row:1/3;font-size:11px;margin-left:0}
#playerProfileDialog .profile-custom-actions .profile-shop-row .profile-remove-purchase{width:32px;min-height:54px;font-size:25px}

/* Keep the combined purchase beneath the character, outside the item list. */
#playerProfileDialog #profileBulkShop{margin:18px 8px 0;text-align:left}
#playerProfileDialog #profileBulkShop:empty{display:none}
#playerProfileDialog #profileBulkShop .profile-buy-all{position:static;margin:0;padding-top:14px;background:transparent}
#playerProfileDialog #profileBulkShop .profile-buy-button{box-sizing:border-box}

/* Fixed preview, catalog and purchase list: selections never reduce catalog space. */
#playerProfileDialog{width:min(1360px,98vw);height:min(940px,96dvh);max-height:96dvh;padding:20px;overflow:hidden}
#playerProfileDialog>form{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:14px;height:100%;min-height:0;margin:0}
#playerProfileDialog>form>header{min-width:0;gap:16px}
#playerProfileDialog h1{font-size:27px}
#playerProfileDialog>form>p{margin:0;font-size:12px}
#playerProfileDialog .profile-layout{position:relative;display:grid;grid-template-columns:minmax(210px,.9fr) minmax(350px,1.5fr) minmax(230px,.9fr);gap:16px;min-height:0;height:100%}
#playerProfileDialog .profile-preview{position:static;align-self:stretch;display:flex;flex-direction:column;min-width:0;min-height:0;padding:12px;overflow:hidden}
#playerProfileDialog .profile-faction-switch{flex:0 0 auto;margin-bottom:8px;gap:10px}
#playerProfileDialog .profile-faction-switch button{min-width:80px;padding:8px 16px}
#playerProfileDialog .profile-team-previews{flex:1;min-height:0;align-items:center}
#playerProfileDialog .profile-team-previews>div{height:100%;min-height:0;max-width:320px}
#playerProfileDialog .profile-team-previews canvas{width:100%;height:100%;max-height:none;object-fit:contain}
#playerProfileDialog .profile-turn{flex:0 0 auto;gap:8px}
#playerProfileDialog .profile-turn button{padding:8px 12px}
#playerProfileDialog .profile-zoom{flex:0 0 auto;margin:12px 4px 0}
#playerProfileDialog #profileBulkShop{flex:0 0 auto;margin:14px 0 0}
#playerProfileDialog #profileBulkShop .profile-buy-button{gap:6px;padding:10px;min-height:56px}
#playerProfileDialog #profileBulkShop .profile-buy-price{font-size:26px}
#playerProfileDialog #profileBulkShop .profile-buy-unit{font-size:10px}
#playerProfileDialog #profileBulkShop .profile-buy-action{font-size:12px}
#playerProfileDialog .profile-options{grid-column:2;grid-row:1;height:100%;max-height:none;min-height:0;overflow:hidden}
#playerProfileDialog .profile-category-tabs{flex:0 0 auto;gap:7px;padding-bottom:10px}
#playerProfileDialog .profile-category-tabs button{padding:9px 6px;font-size:12px}
#playerProfileDialog .profile-options>.profile-multiselect-hint{flex:0 0 auto;font-size:11px;line-height:1.4;margin:8px 0 10px}
#playerProfileDialog .profile-option-pane{min-height:0;padding-bottom:12px}
#playerProfileDialog .profile-cart{grid-column:3;grid-row:1;min-height:0;min-width:0;border:1px solid #8e7b4d;border-radius:12px;background:#17282e;overflow:hidden}
#playerProfileDialog #profileCart{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr)}
#playerProfileDialog #profileCart>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 12px;border-bottom:1px solid #8e7b4d80;color:#ffe3a0;font-size:13px;font-weight:800;cursor:pointer;list-style:none}
#playerProfileDialog #profileCart>summary::-webkit-details-marker{display:none}
#playerProfileDialog #profileCart>summary::after{content:'▾';font-size:12px}
#playerProfileDialog #profileCart:not([open])>summary::after{content:'▸'}
#playerProfileDialog #profileCartCount{margin-left:auto;font-size:11px;font-weight:600;color:#cdbd94}
#playerProfileDialog #profileCart:not([open])>#profileShop{display:none}
#playerProfileDialog .profile-cart #profileShop{display:flex;flex-direction:column;gap:14px;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8e7b4d #17282e;margin:0;padding:12px;border:0;background:none;border-radius:0}
#playerProfileDialog .profile-cart .profile-shop-row{display:flex;flex-direction:column;align-items:stretch;flex:0 0 auto;gap:6px;margin:0;min-width:0}
#playerProfileDialog .profile-cart .profile-shop-row>span{flex:none;min-height:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
#playerProfileDialog .profile-cart .profile-shop-actions{grid-template-columns:minmax(0,1fr) 32px;gap:6px}
#playerProfileDialog .profile-cart .profile-buy-button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;min-width:0;min-height:54px;padding:7px 8px;text-align:left}
#playerProfileDialog .profile-cart .profile-remove-purchase{width:32px;min-height:54px;padding:0;border:1px solid #9c8a5e;border-radius:8px;background:#29322f;color:#ffe3a0;box-shadow:none;font:400 25px/1 system-ui}
#playerProfileDialog .profile-cart .profile-remove-purchase:is(:hover,:focus-visible):not(:disabled){background:#514030;border-color:#ffe09a;outline:2px solid #ffe09a;outline-offset:1px;box-shadow:none}
#playerProfileDialog .profile-cart .profile-shop-row>small{font:11px/1.4 system-ui;letter-spacing:0;color:#ffd878}
#playerProfileDialog .profile-cart .profile-cart-empty{font-size:12px;line-height:1.5;margin:0;color:#a9c2cc}
#playerProfileDialog>form>.profile-custom-actions{margin:0;padding:0;background:transparent}
#playerProfileDialog>form>.profile-custom-actions footer{margin:0;padding:12px 0 0;flex-wrap:nowrap}
#playerProfileDialog>form>.profile-custom-actions #profileSave{margin-left:auto;min-width:140px}
@media(max-width:1100px){
 #playerProfileDialog{padding:16px}
 #playerProfileDialog .profile-layout{grid-template-columns:minmax(200px,.8fr) minmax(300px,1.2fr)}
 #playerProfileDialog .profile-options{padding-bottom:50px}
 #playerProfileDialog .profile-cart{grid-column:2;grid-row:1;align-self:end;z-index:5;max-height:65%;height:auto;box-shadow:0 -8px 20px #0008}
 #playerProfileDialog #profileCart{height:auto;max-height:100%}
 #playerProfileDialog .profile-cart #profileShop{max-height:calc(48dvh - 70px)}
 #playerProfileDialog #profileCart>summary{padding:12px}
}
@media(max-width:700px){
 #playerProfileDialog{padding:12px}
 #playerProfileDialog>form{gap:9px}
 #playerProfileDialog h1{font-size:20px}
 #playerProfileDialog>form>header{flex-wrap:wrap;gap:6px}
 #playerProfileDialog .profile-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(170px,.55fr) minmax(0,1fr);gap:10px}
 #playerProfileDialog .profile-preview{grid-column:1;grid-row:1;display:grid;grid-template-columns:minmax(100px,1fr) minmax(150px,1fr);grid-template-rows:auto 1fr auto auto;gap:6px;padding:8px}
 #playerProfileDialog .profile-team-previews{grid-column:1;grid-row:1/5;height:100%}
 #playerProfileDialog .profile-faction-switch,#playerProfileDialog .profile-turn,#playerProfileDialog .profile-zoom,#playerProfileDialog #profileBulkShop{grid-column:2;margin:0}
 #playerProfileDialog .profile-faction-switch button{min-width:0;padding:6px 12px}
 #playerProfileDialog .profile-turn{align-self:center;font-size:10px}
 #playerProfileDialog #profileBulkShop .profile-buy-all{padding-top:6px}
 #playerProfileDialog #profileBulkShop .profile-buy-button{flex-wrap:wrap;min-height:42px;padding:6px}
 #playerProfileDialog #profileBulkShop .profile-buy-price{font-size:21px}
 #playerProfileDialog .profile-options,#playerProfileDialog .profile-cart{grid-column:1;grid-row:2}
 #playerProfileDialog .profile-header-actions{margin-left:auto}
 #playerProfileDialog .profile-option-tile{min-height:105px}
}

#playerProfileDialog #profileCart::details-content{display:contents}

/* Keep the longer unlock action readable beside the total. */
#playerProfileDialog #profileBulkShop .profile-buy-button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;text-align:left}
#playerProfileDialog #profileBulkShop .profile-buy-price{grid-column:1;grid-row:1}
#playerProfileDialog #profileBulkShop .profile-buy-unit{grid-column:1;grid-row:2}
#playerProfileDialog #profileBulkShop .profile-buy-action{grid-column:2;grid-row:1/3;max-width:100px;margin:0;text-align:right}

/* Four compact options per row in the character catalog. */
#playerProfileDialog .profile-tile-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#playerProfileDialog .profile-option-tile{min-height:100px;padding:7px 4px 6px;gap:4px}
#playerProfileDialog .profile-tile-visual{width:54px;height:54px}
#playerProfileDialog .profile-tile-swatch{width:32px;height:32px;margin:11px}
#playerProfileDialog .profile-tile-name{min-height:25px;font-size:10px}
#playerProfileDialog .profile-tile-state{font-size:9px}

/* Five-digit prices remain legible in the narrow unlock list. */
#playerProfileDialog .profile-cart .profile-buy-price{grid-column:1/-1;grid-row:1}
#playerProfileDialog .profile-cart .profile-buy-unit{grid-column:1;grid-row:2}
#playerProfileDialog .profile-cart .profile-buy-action{grid-column:2;grid-row:2;text-align:right}

/* The compact invitation follows the own cell; only the opened puzzle is a dialog. */
#prisonHackHud{position:absolute}
#prisonHackHud:not(.is-open){width:max-content;max-width:calc(100% - 32px);max-height:none;min-height:0;padding:8px 12px;overflow:visible;white-space:nowrap}
#prisonHackHud:not(.is-open) .prison-hack-invite b{font-size:14px;line-height:1.3}

/* 918: a top-layer back button, matching the shared viewport control. */
#playerProfileDialog>#profileBack{position:fixed;left:14px;top:14px;z-index:1;display:grid;place-items:center;box-sizing:border-box;width:22px;height:22px;min-width:0;margin:0;padding:0;border:1px solid #697b83;border-radius:6px;background:linear-gradient(#39454c,#243139);color:#eaf0ed;box-shadow:inset 0 1px #f2fbff20,0 2px 5px #0005;font:900 15px/1 system-ui}
#playerProfileDialog>#profileBack:focus-visible{outline:2px solid #e4c573;outline-offset:3px}

/* 955: modern character workbench, fixed viewport with internal catalogs. */
body:has(#playerProfileDialog[open]){overflow:hidden!important}
#playerProfileDialog.character-modern,#playerProfileDialog.character-modern *{box-sizing:border-box}
#playerProfileDialog.character-modern{--character-accent:#61d7ff;--character-tint:#173e55;width:min(1800px,calc(100vw - 64px));height:min(1000px,calc(100dvh - 64px));max-height:none;max-width:none;margin:auto;padding:24px;overflow:hidden;border:1px solid #52768a;border-radius:24px;background:linear-gradient(130deg,#1a3447f7,#091b29fc);box-shadow:0 24px 100px #000b;color:#eff7fc;font:15px system-ui}
#playerProfileDialog.character-modern[data-faction=fire]{--character-accent:#ff9a9e;--character-tint:#492f40}
#playerProfileDialog.character-modern::backdrop{background:linear-gradient(#03101ac9,#030c17eb),url(assets/menu-hq-background-934.png) center/cover;backdrop-filter:none}
#playerProfileDialog.character-modern>form{grid-template-rows:auto auto minmax(0,1fr) auto;gap:16px}
#playerProfileDialog.character-modern>form>header{flex-wrap:nowrap;gap:18px;padding-bottom:14px;border-bottom:1px solid #56768c45}
#playerProfileDialog.character-modern h1{font-size:32px;line-height:1.2;margin:5px 0 0}
#playerProfileDialog.character-modern header small{color:#86cfee;font-size:11px;letter-spacing:1.7px}
#playerProfileDialog.character-modern>form>p{color:#aec7d8;font-size:14px;line-height:1.45;margin:0}
#playerProfileDialog.character-modern .profile-header-actions{gap:12px;flex:none}
#playerProfileDialog.character-modern .dosenpfand-balance{background:#102536;border-color:#89794c}
#playerProfileDialog.character-modern button{border-radius:10px;background:linear-gradient(#294759,#193142);border-color:#557b90;color:#edf7fc;box-shadow:inset 0 1px #ffffff12;font:750 14px system-ui}
#playerProfileDialog.character-modern button:focus-visible{outline:2px solid #f1d48c;outline-offset:2px}
#playerProfileDialog.character-modern button:hover:not(:disabled){border-color:#f2d388;filter:brightness(1.09)}
#playerProfileDialog.character-modern button[aria-pressed=true]{border-color:var(--character-accent);background:var(--character-tint);box-shadow:inset 0 -3px var(--character-accent),0 0 0 1px var(--character-accent)}
#playerProfileDialog.character-modern .profile-layout{grid-template-columns:minmax(240px,.9fr) minmax(400px,1.65fr) minmax(230px,.75fr);gap:20px}
#playerProfileDialog.character-modern .profile-preview{padding:16px;border:1px solid #47778f;border-radius:18px;background:radial-gradient(ellipse at 50% 40%,#315d7866,transparent 72%),linear-gradient(145deg,#17374e,#0b2030)}
#playerProfileDialog.character-modern .profile-faction-switch{padding:5px;gap:6px;border:1px solid #43677c;border-radius:13px;background:#081b29;flex-wrap:wrap}
#playerProfileDialog.character-modern .profile-faction-switch button{flex:1;min-width:0;padding:10px 12px;font-size:15px}
#playerProfileDialog.character-modern .profile-team-previews{justify-content:center}
#playerProfileDialog.character-modern .profile-turn{gap:10px;color:#bad0dd;font-size:12px}
#playerProfileDialog.character-modern .profile-turn button{width:40px;height:36px;padding:4px;font-size:20px}
#playerProfileDialog.character-modern .profile-zoom{margin:12px 2px 0}
#playerProfileDialog.character-modern .profile-zoom input{accent-color:var(--character-accent)}
#playerProfileDialog.character-modern .profile-options{display:flex;flex-direction:column;padding:16px;border:1px solid #476d83;border-radius:18px;background:linear-gradient(135deg,#173247,#0b2030);min-width:0;min-height:0;overflow:hidden}
#playerProfileDialog.character-modern .profile-category-tabs{gap:8px;padding-bottom:12px;border-color:#597f9340}
#playerProfileDialog.character-modern .profile-category-tabs button{padding:11px 8px;font-size:14px;line-height:1.2;overflow-wrap:anywhere}
#playerProfileDialog.character-modern .profile-multiselect-hint{font-size:12px;color:#a6c0d2;margin:9px 0}
#playerProfileDialog.character-modern .profile-option-pane{padding:0 6px 6px 1px;scrollbar-color:#5f8ba3 #0b1d2c}
#playerProfileDialog.character-modern .profile-option-pane h2{margin:8px 0 12px;color:#c5dbe9;font-size:16px}
#playerProfileDialog.character-modern .profile-tile-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
#playerProfileDialog.character-modern .profile-option-tile{min-height:128px;padding:10px 6px 9px;gap:6px;border-radius:13px;background:linear-gradient(#24475a,#142f41);border-color:#50758a;overflow:hidden}
#playerProfileDialog.character-modern .profile-tile-visual{width:66px;height:66px}
#playerProfileDialog.character-modern .profile-tile-swatch{width:40px;height:40px;margin:13px;border:2px solid #ffffff55;box-shadow:0 3px 8px #0006}
#playerProfileDialog.character-modern .profile-tile-name{min-height:30px;font-size:13px;line-height:1.25;color:#ecf7fc;overflow-wrap:anywhere}
#playerProfileDialog.character-modern .profile-tile-state{font-size:11px;line-height:1.3;color:#b3c9d6;overflow-wrap:anywhere}
#playerProfileDialog.character-modern .profile-option-tile.is-locked .profile-tile-state{color:#f0d38d}
#playerProfileDialog.character-modern .profile-cart{align-self:stretch;height:100%;max-height:none;box-shadow:none;border:1px solid #958052;border-radius:18px;background:linear-gradient(145deg,#26333b,#102230)}
#playerProfileDialog.character-modern #profileCart{height:100%;max-height:none}
#playerProfileDialog.character-modern #profileCart>summary{padding:17px 14px;color:#f3d68e;border-color:#9b875555;font-size:15px;flex-wrap:wrap}
#playerProfileDialog.character-modern #profileCartCount{font-size:11px}
#playerProfileDialog.character-modern .profile-cart #profileShop{padding:14px;max-height:none;gap:16px}
#playerProfileDialog.character-modern .profile-cart .profile-cart-empty{color:#adc5d5;font-size:14px;line-height:1.6}
#playerProfileDialog.character-modern .profile-cart .profile-shop-row>span{font-size:13px}
#playerProfileDialog.character-modern .profile-buy-button{border-color:#9d8754;background:linear-gradient(#50472e,#2a302d);color:#f4d88f}
#playerProfileDialog.character-modern #profileBulkShop{margin-top:10px;max-height:28%;overflow:auto;scrollbar-width:thin}
#playerProfileDialog.character-modern>form>.profile-custom-actions footer{padding-top:14px;gap:16px;border-color:#52788c55}
#playerProfileDialog.character-modern #profileStatus{font-size:13px;margin:0;min-width:0;color:#b9d1df}
#playerProfileDialog.character-modern #profileSave{min-width:180px;min-height:46px;padding:12px 24px;border:1px solid #ffe3a2;border-radius:12px;background:linear-gradient(#f3d990,#c3a04e);color:#162634;font-size:16px;box-shadow:inset 0 1px #fff3c9}
@media(max-width:1200px){#playerProfileDialog.character-modern{padding:18px;width:calc(100vw - 48px);height:calc(100dvh - 48px)}#playerProfileDialog.character-modern .profile-layout{grid-template-columns:minmax(210px,.75fr) minmax(0,1.5fr);gap:14px}#playerProfileDialog.character-modern .profile-options{padding-bottom:58px}#playerProfileDialog.character-modern .profile-cart{grid-column:2;grid-row:1;align-self:end;height:auto;max-height:60%;z-index:5;box-shadow:0 -8px 20px #0006}#playerProfileDialog.character-modern #profileCart{height:auto;max-height:100%}#playerProfileDialog.character-modern .profile-cart #profileShop{max-height:calc(42dvh - 60px)}#playerProfileDialog.character-modern #profileCart>summary{padding:12px 14px}#playerProfileDialog.character-modern h1{font-size:26px}}
@media(max-width:700px){#playerProfileDialog.character-modern{width:calc(100vw - 28px);height:calc(100dvh - 48px);padding:12px;border-radius:18px}#playerProfileDialog.character-modern>form{gap:9px}#playerProfileDialog.character-modern>form>header{gap:8px;padding-bottom:8px;flex-wrap:wrap}#playerProfileDialog.character-modern h1{font-size:22px}#playerProfileDialog.character-modern header small{font-size:9px}#playerProfileDialog.character-modern .profile-header-actions{margin-left:auto;gap:8px}#playerProfileDialog.character-modern .profile-header-actions .dosenpfand-balance{min-width:0;padding:5px 8px;column-gap:7px}#playerProfileDialog.character-modern .dosenpfand-balance img{width:16px;height:30px}#playerProfileDialog.character-modern .dosenpfand-balance strong{font-size:16px}#playerProfileDialog.character-modern .dosenpfand-balance span{font-size:10px}#playerProfileDialog.character-modern #profileClose{font-size:11px;padding:8px}#playerProfileDialog.character-modern>form>p{font-size:12px}#playerProfileDialog.character-modern .profile-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(130px,.5fr) minmax(0,1fr);gap:10px}#playerProfileDialog.character-modern .profile-preview{display:grid;grid-template-columns:minmax(80px,.8fr) minmax(0,1fr);grid-template-rows:auto 1fr auto auto;gap:6px;padding:8px}#playerProfileDialog.character-modern .profile-team-previews{grid-column:1;grid-row:1/5;height:100%}#playerProfileDialog.character-modern .profile-faction-switch,#playerProfileDialog.character-modern .profile-turn,#playerProfileDialog.character-modern .profile-zoom,#playerProfileDialog.character-modern #profileBulkShop{grid-column:2;margin:0}#playerProfileDialog.character-modern .profile-faction-switch{padding:3px;gap:4px;flex-wrap:nowrap}#playerProfileDialog.character-modern .profile-faction-switch button{font-size:10px;padding:6px 3px}#playerProfileDialog.character-modern .profile-turn{gap:4px;font-size:10px}#playerProfileDialog.character-modern .profile-turn button{width:28px;height:28px;font-size:16px;flex:none}#playerProfileDialog.character-modern .profile-options,#playerProfileDialog.character-modern .profile-cart{grid-column:1;grid-row:2}#playerProfileDialog.character-modern .profile-options{padding:10px 10px 50px}#playerProfileDialog.character-modern .profile-category-tabs{gap:6px;padding-bottom:6px}#playerProfileDialog.character-modern .profile-category-tabs button{font-size:12px;padding:7px 4px}#playerProfileDialog.character-modern .profile-multiselect-hint{font-size:10px;margin:6px 0}#playerProfileDialog.character-modern .profile-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#playerProfileDialog.character-modern .profile-option-tile{min-height:110px}#playerProfileDialog.character-modern .profile-tile-visual{width:54px;height:54px}#playerProfileDialog.character-modern .profile-tile-swatch{width:32px;height:32px;margin:11px}#playerProfileDialog.character-modern .profile-tile-name{font-size:12px}#playerProfileDialog.character-modern .profile-cart{max-height:70%}#playerProfileDialog.character-modern #profileCart>summary{padding:10px;font-size:13px}#playerProfileDialog.character-modern #profileStatus{font-size:11px}#playerProfileDialog.character-modern #profileSave{min-width:115px;min-height:40px;padding:9px 16px;font-size:14px}#playerProfileDialog.character-modern #profileBulkShop{max-height:50px}}
@media(max-height:650px){#playerProfileDialog.character-modern{height:calc(100dvh - 32px);padding:12px}#playerProfileDialog.character-modern>form{gap:7px}#playerProfileDialog.character-modern>form>header{padding-bottom:7px}#playerProfileDialog.character-modern h1{font-size:22px}#playerProfileDialog.character-modern>form>p{display:none}#playerProfileDialog.character-modern>form{grid-template-rows:auto minmax(0,1fr) auto}#playerProfileDialog.character-modern .profile-multiselect-hint{display:none}#playerProfileDialog.character-modern .profile-preview{min-height:0}#playerProfileDialog.character-modern .profile-zoom{margin-top:5px}#playerProfileDialog.character-modern #profileBulkShop{max-height:44px}#playerProfileDialog.character-modern>form>.profile-custom-actions footer{padding-top:7px}}

@media(min-width:701px) and (max-height:650px){#playerProfileDialog.character-modern .profile-category-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding-bottom:7px}#playerProfileDialog.character-modern .profile-category-tabs button{font-size:12px;padding:8px 4px}#playerProfileDialog.character-modern .profile-options{padding:10px 10px 48px}}

/* 957: use the full menu width for a compact statistics dashboard. */
#gameMenu.hq-menu .statistics-modern,#gameMenu.hq-menu .statistics-modern *{box-sizing:border-box}
#gameMenu.hq-menu .statistics-modern{width:100%;max-width:none;margin:0;padding:0 0 8px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px 24px;--statistics-accent:#65d8ff;--statistics-tint:#65d8ff16}
#gameMenu.hq-menu .statistics-modern[data-team=fire]{--statistics-accent:#ff929c;--statistics-tint:#ff929c16}
#gameMenu.hq-menu .statistics-modern>header{grid-column:1;grid-row:1;align-self:center;min-width:0}
#gameMenu.hq-menu .statistics-modern .statistics-kicker{font-size:11px;letter-spacing:1.7px;margin:0 0 6px}
#gameMenu.hq-menu .statistics-modern .menu-heading{font-size:34px;margin:0 0 5px;color:#eff7fb}
#gameMenu.hq-menu .statistics-modern .menu-sub{font-size:14px;color:#b1c9d8;margin:0}
#gameMenu.hq-menu .statistics-modern .statistics-tabs{grid-column:2;grid-row:1;display:flex;align-items:center;align-self:center;gap:8px;margin:0;padding:6px;border:1px solid #4c7086;border-radius:16px;background:#0c2131cc}
#gameMenu.hq-menu .statistics-modern .statistics-tabs button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:175px;min-height:58px;padding:9px 16px;border:1px solid transparent;border-radius:11px;background:transparent;color:#aec8d9;font:850 16px system-ui;box-shadow:none}
#gameMenu.hq-menu .statistics-modern .statistics-tabs button::before{content:'';display:block;width:100px;height:38px;background:url(assets/team-runner-banner-783.webp) center/contain no-repeat}
#gameMenu.hq-menu .statistics-modern #statistics-tab-fire::before{background-image:url(assets/team-catcher-banner-783.webp)}
#gameMenu.hq-menu .statistics-modern .statistics-tabs button[aria-selected=true]{border-color:var(--statistics-accent);background:var(--statistics-tint);color:#f0f9ff;box-shadow:inset 0 -3px var(--statistics-accent)}
#gameMenu.hq-menu .statistics-modern .statistics-tabs button:hover{border-color:#edcf84}
#gameMenu.hq-menu .statistics-modern #statistics-panel{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;min-width:0}
#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid{grid-column:1/-1;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
#gameMenu.hq-menu .statistics-modern .statistics-card{position:relative;min-width:0;min-height:108px;padding:17px 18px;border:1px solid #4c7087;border-radius:15px;background:linear-gradient(135deg,#1d3c51f2,#0d2232f5);box-shadow:inset 0 1px #ffffff12,0 5px 14px #0003;overflow-wrap:anywhere}
#gameMenu.hq-menu .statistics-modern .statistics-card span{font-size:14px;line-height:1.4;color:#bed2df}
#gameMenu.hq-menu .statistics-modern .statistics-card strong{font-size:29px;line-height:1.25;margin-top:9px;color:#edf7fc}
#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid>.statistics-card:nth-child(2){border-color:#4a8c83}
#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid>.statistics-card:nth-child(2) strong{color:#9ce1be}
#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid>.statistics-card:nth-child(6){border-color:#9f8951;background:linear-gradient(135deg,#3d3b2ddf,#142b39f5)}
#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid>.statistics-card:nth-child(6) strong{color:#f3d783}
#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics){margin:0;padding:17px;border:1px solid #52758c;border-radius:18px;background:linear-gradient(135deg,#17364af2,#0b1e2cf5);min-width:0}
#gameMenu.hq-menu .statistics-modern .personal-best-statistics{border-color:#9a8553}
#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics)>h2{color:#efd58b;font-size:19px;line-height:1.3;margin:0 0 12px}
#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics)>.statistics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics) .statistics-card{min-height:122px;padding:13px 14px;background:#0b2132bb}
#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics) .statistics-card strong{font-size:25px;color:#f0d994}
#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics) small{display:block;font-size:11px;line-height:1.4;margin-top:7px;color:#a9c2d1}
#gameMenu.hq-menu .statistics-modern .personal-best-statistics>p{color:#adc7d7;font-size:14px;line-height:1.6}
#gameMenu.hq-menu .statistics-modern>.statistics-note,#gameMenu.hq-menu .statistics-modern>#statistics-retry{grid-column:1/-1;margin:0}
@media(max-width:1200px){#gameMenu.hq-menu .statistics-modern .statistics-tabs button{min-width:130px;padding:8px 10px}#gameMenu.hq-menu .statistics-modern .statistics-tabs button::before{width:65px;height:32px}#gameMenu.hq-menu .statistics-modern .statistics-card{padding:14px;min-height:105px}#gameMenu.hq-menu .statistics-modern .statistics-card span{font-size:13px}}
@media(max-width:900px){#gameMenu.hq-menu .statistics-modern{grid-template-columns:1fr;gap:14px}#gameMenu.hq-menu .statistics-modern .statistics-tabs{grid-column:1;grid-row:2;justify-self:start}#gameMenu.hq-menu .statistics-modern #statistics-panel{grid-template-columns:1fr;gap:12px}#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){#gameMenu.hq-menu .statistics-modern .menu-heading{font-size:29px}#gameMenu.hq-menu .statistics-modern #statistics-panel>.statistics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#gameMenu.hq-menu .statistics-modern :is(.personal-best-statistics,.decoration-statistics)>.statistics-grid{grid-template-columns:1fr}#gameMenu.hq-menu .statistics-modern .statistics-tabs{width:100%}#gameMenu.hq-menu .statistics-modern .statistics-tabs button{min-width:0;flex:1;font-size:13px;padding:8px;gap:5px}#gameMenu.hq-menu .statistics-modern .statistics-tabs button::before{width:55px}}
