/* Match the upgrader canvas; display:contents must not leak the old accent line. */
body:has(#view-profile:not(.hidden)){background:#15161a}
#view-profile .profile-account-card::before{content:none;display:none}
#view-profile{padding-top:8px}
#view-profile .profile-staff-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin:0 0 14px}
#view-profile .profile-staff-links:not(:has(a:not([hidden]))){display:none}
#view-profile .profile-staff-links a[hidden]{display:none}
@media(max-width:540px){#view-profile .profile-staff-links{justify-content:flex-start}#view-profile .profile-staff-links a{flex:1;min-height:34px}}
#view-profile .profile-overview{background:#3b3c42;border-color:#4a4c54;grid-template-columns:minmax(290px,1.1fr) minmax(230px,1fr) minmax(250px,1fr);gap:12px}
#view-profile .profile-person-row{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto auto auto 1fr;gap:8px 12px;padding:18px;background:#27282e;align-content:start}
#view-profile .profile-avatar-wrap{grid-column:1;grid-row:1/3;align-self:center}
#view-profile .profile-avatar{width:64px;height:64px}
#view-profile .profile-avatar-edit{position:relative;display:block;width:64px;height:64px;padding:0;border:0;border-radius:14px;background:transparent;cursor:pointer;overflow:hidden;font:inherit}
#view-profile .profile-avatar-edit .profile-avatar{border-radius:inherit;box-sizing:border-box;margin:0}
#view-profile .profile-avatar-camera{position:absolute;inset:0;display:grid;place-items:center;border-radius:inherit;background:#0d0e11b8;color:#ffdb00;opacity:0;transform:translateY(12px);transition:opacity .2s ease,transform .2s ease;pointer-events:none}
#view-profile .profile-avatar-camera svg{width:26px;height:26px}
#view-profile .profile-avatar-edit:hover .profile-avatar-camera,#view-profile .profile-avatar-edit:focus-visible .profile-avatar-camera{opacity:1;transform:translateY(0)}
#view-profile .profile-avatar-edit:focus-visible{outline:2px solid #ffdb00;outline-offset:3px}
#view-profile .profile-avatar-edit:disabled{cursor:wait;opacity:.6}
#view-profile .profile-avatar-wrap>i{pointer-events:none}
#view-profile .profile-avatar-status{margin:0;padding:0 18px 12px;color:#d6c678;font-size:11px;line-height:1.5}
#view-profile .profile-avatar-status:empty{display:none}
@media(hover:none){#view-profile .profile-avatar-camera{inset:auto 0 0;height:26px;opacity:1;transform:none;border-radius:0}#view-profile .profile-avatar-camera svg{width:18px;height:18px}}
@media(prefers-reduced-motion:reduce){#view-profile .profile-avatar-camera{transition:none}}
#view-profile .profile-person-copy{display:contents}
#view-profile .profile-person-copy h1{grid-column:2;font-size:18px;align-self:end;margin:0;overflow-wrap:anywhere}
#view-profile .profile-meta{grid-column:2;margin:0;gap:7px}
#view-profile .profile-push-toggle{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:12px;margin-top:12px;border:1px solid #414249;background:#34353b;border-radius:10px;cursor:pointer}
.profile-push-toggle>img{width:40px;height:40px;padding:10px;box-sizing:border-box;border-radius:7px;background:#4b4c50;object-fit:contain;filter:grayscale(1);flex-shrink:0}
.profile-push-toggle>span{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}.profile-push-toggle b{font-size:12px}.profile-push-toggle small{font-size:11px;color:#999ba5}
.profile-push-toggle input{position:absolute;opacity:0;width:1px;height:1px}
.profile-push-toggle>i{width:36px;height:21px;background:#51535a;border-radius:14px;position:relative;flex:0 0 36px}
.profile-push-toggle>i::after{content:"";position:absolute;width:15px;height:15px;top:3px;left:3px;border-radius:50%;background:#c0c1c5;transition:transform .2s,background .2s}
.profile-push-toggle input:checked+i{background:#716623}.profile-push-toggle input:checked+i::after{background:#ffdb00;transform:translateX(15px)}.profile-push-toggle input:focus-visible+i{outline:2px solid #ffe275;outline-offset:4px}
.profile-telegram{grid-column:1/-1;margin-top:6px;padding:12px;border:1px solid #42434c;border-radius:10px;background:#2f3037;align-self:start}
.profile-telegram-head,.profile-telegram-linked{display:flex;align-items:center;gap:8px}.profile-telegram img{width:28px;height:28px;object-fit:contain}.profile-telegram b{font-size:12px;display:block}.profile-telegram small{display:block;font-size:10px;line-height:1.5;color:#9d9faa}.profile-telegram-linked>span{margin-left:auto;color:#ffdf52}
.telegram-link-button{display:block;width:100%;padding:9px 10px;margin-top:10px;border:1px solid #6b6239;border-radius:7px;background:#dfbd1a14;color:#ffdf59;font:700 11px Inter,sans-serif;text-align:center;text-decoration:none;cursor:pointer}
.telegram-link-button:disabled{opacity:.5}.telegram-code{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:14px}.telegram-code code{flex:1 1 150px;min-width:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere;color:#ffdf59;user-select:all}.telegram-code button{flex:0 0 auto;min-height:40px;border:1px solid #50515b;border-radius:8px;background:#ffffff06;color:#e1e2e7;padding:9px 12px;font:600 12px Inter,sans-serif;cursor:pointer}.telegram-code button:hover{border-color:#a18d35;background:#ffdb000a}.telegram-code button:focus-visible{outline:2px solid #ffdb00;outline-offset:3px}.profile-telegram p{font-size:10px;line-height:1.5;color:#f0cf6c;margin:6px 0 0}.profile-telegram p:empty{display:none}
#view-profile .profile-wallet-card{background:#292a30}
#view-profile .wallet-person-icon{width:27px;height:27px;object-fit:contain}
#view-profile .profile-balance{display:flex;align-items:center;gap:10px;font-size:32px}
#view-profile .profile-balance>.profile-currency-png{width:46px;height:46px;object-fit:contain}
.profile-currency-png{width:18px;height:18px;object-fit:contain;vertical-align:middle;flex-shrink:0}
#view-profile .profile-metrics{gap:8px;overflow:visible}
#view-profile .profile-metrics>.profile-metric{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:124px;padding:15px 6px 24px;background:#26272d;position:relative}
#view-profile .profile-metric>img{float:none;position:static;width:38px;height:38px;object-fit:contain}
#view-profile .profile-metric>img.profile-stat-symbol{filter:brightness(0) saturate(100%) invert(83%) sepia(89%) saturate(1929%) hue-rotate(359deg) brightness(102%) contrast(105%)}
#view-profile .profile-metric>strong{display:flex;align-items:center;justify-content:center;gap:4px;clear:none;padding:0;font-size:17px;white-space:nowrap}
#view-profile .profile-metric>small,#view-profile .profile-metric>i{display:none}
#view-profile .profile-metric>span{position:absolute;bottom:7px;left:0;right:0;margin:0;font-size:11px;text-align:center;opacity:1;color:#d5d5dc}
#view-profile .profile-metric:hover>span,#view-profile .profile-metric:focus-visible>span{opacity:1}
#view-profile .profile-library,#view-profile .profile-library-head,#view-profile .profile-content-panel{background:#303137;border-color:#484a53}
#view-profile .profile-tabs{background:#303137;border-color:#494a53}
#view-profile .profile-item{background:#25262d;border-color:#454752}
#view-profile .item-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
#view-profile .currency-unit>img{display:block!important;content:url('/assets/ui/currency-coins.png')}
#view-profile .currency-unit::after{content:none!important}
.profile-history{padding:16px;min-height:310px}.profile-history.hidden{display:none}
.profile-history-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px;margin-bottom:8px;border:1px solid #45464f;border-radius:10px;background:#27282f}
.profile-history-art{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px}.profile-history-art img{width:64px;height:54px;object-fit:contain}.profile-history-art:has(img:nth-child(2)) img{width:30px;height:30px}
.profile-history-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.profile-history-copy>b{font-size:12px}.profile-history-copy>span{font-size:11px;overflow-wrap:anywhere}.profile-history-copy>small{font-size:10px;color:#d7c36e}.profile-history-copy>time{font-size:10px;color:#9699a6}.profile-history-copy>.history-loss{color:#e49b9b}
.profile-history-money{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:14px;color:#ffe268}.history-withdraw-actions{display:flex;gap:6px;margin-top:5px}.history-withdraw-actions button{padding:5px 8px;border:1px solid #575962;border-radius:6px;background:#373840;color:#d8d9e0;font-size:10px;cursor:pointer}
#promoDialog{padding:26px 30px;border-color:#63571d;background:radial-gradient(ellipse at 100% 0,#ffda001c,transparent 60%),#1d1e23;color:#f6f6f8}
#promoDialog .promo-dialog-top>span{color:#ffdb00}
#promoDialog .promo-hero{padding:20px 0 8px}
#promoDialog .promo-hero>img{filter:saturate(1.7) drop-shadow(0 12px 24px #ffcf0026)}
#promoDialog .promo-hero h2{font-size:44px;line-height:1.08;margin:16px 0;color:#f6f6f8}
#promoDialog .promo-hero em{color:#ffdb00}
#promoDialog .promo-hero p{color:#afb0b9}
#promoDialog .promo-form>label{color:#d5d5da}
#promoDialog .promo-form input{background:#15161b;border-color:#5d5426;color:#fff}
#promoDialog .promo-form input:focus{outline:2px solid #ffdb00;outline-offset:2px}
#promoDialog .promo-form .btn{background:#ffdb00;color:#211d08;box-shadow:0 5px 18px #ffdb001c}
#promoDialog .promo-form .btn:hover{background:#ffe342}
#promoDialog .promo-message{margin-bottom:0;color:#ffe169}
#promoDialog .promo-message.is-error{color:#f3a79d}
#view-profile .profile-promo-link{color:#ffdb00}
@media(max-width:1100px){#view-profile .profile-overview{grid-template-columns:1fr 1fr}#view-profile .profile-person-row{grid-column:1;grid-row:1/3}#view-profile .profile-wallet-card{grid-column:2;grid-row:1}#view-profile .profile-best-card{grid-column:1/-1;grid-row:3;min-height:120px}#view-profile .profile-metrics{grid-column:2;grid-row:2}}
@media(max-width:650px){#view-profile .profile-overview{grid-template-columns:1fr}#view-profile .profile-person-row,#view-profile .profile-wallet-card,#view-profile .profile-metrics{grid-column:1;grid-row:auto}.profile-history{padding:8px}.profile-history-row{grid-template-columns:48px minmax(0,1fr);gap:9px;padding:10px}.profile-history-art img{width:44px;height:44px}.profile-history-money{grid-column:2;font-size:12px}#promoDialog{padding:18px}#promoDialog .promo-hero h2{font-size:34px}#promoDialog .promo-hero>img{opacity:.65;width:135px;height:135px}}
@media(prefers-reduced-motion:reduce){.profile-push-toggle>i::after,.profile-metric>span{transition:none}}
@media(max-width:650px){#view-profile .profile-person-row{grid-row:1}#view-profile .profile-wallet-card{grid-row:2}#view-profile .profile-best-card{grid-column:1;grid-row:3}#view-profile .profile-metrics{grid-row:4}}
/* Coin icon beside the bulk inventory sale action. */
.profile-sell{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.profile-sell>img{display:block;width:22px;height:22px;flex-shrink:0;object-fit:contain}
.profile-sell:disabled>img{opacity:.4;filter:grayscale(1)}

.telegram-unlink-row{display:flex;justify-content:flex-end;margin-top:12px;padding-top:10px;border-top:1px solid rgba(255,255,255,.06)}
.telegram-unlink-button{min-height:40px;padding:8px 12px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(0,0,0,.12);color:#b6b7bf;font:inherit;font-size:12px;cursor:pointer;transition:color .15s,border-color .15s,background .15s}
.telegram-unlink-button:hover{color:#fff;border-color:rgba(255,215,0,.4);background:rgba(255,215,0,.05)}
.telegram-unlink-button:focus-visible{outline:2px solid #ffda00;outline-offset:3px}
.telegram-unlink-button:disabled{opacity:.5;cursor:wait}

/* Persistent metric labels; the accent belongs to hover and keyboard focus. */
#view-profile .profile-metric{border:1px solid #45464f;box-shadow:none;isolation:isolate}
#view-profile .profile-metric::after{content:"";position:absolute;inset:auto 12% 0;height:2px;background:#ffdb00;box-shadow:0 -3px 20px 6px #ffdb0033;border-radius:100%;opacity:0;transform:scaleX(1);transition:opacity .2s ease;pointer-events:none}
#view-profile .profile-metric:is(:hover,:focus-visible)::after{opacity:1}
#view-profile .profile-metric:is(:hover,:focus-visible){border-color:#8f813b;box-shadow:none}
#view-profile .profile-promo-message{margin:9px 0 0;font-size:11px;line-height:1.6;color:#ffdf63;overflow-wrap:anywhere}
#view-profile .profile-promo-message:empty{display:none}#view-profile .profile-promo-message.is-error{color:#f0a49a}
.profile-telegram .telegram-binding-note{color:#b8bac4;font-size:10px;line-height:1.6;margin-top:10px}
/* Public profiles use the same panels, symbols and tab treatment as the cabinet. */
#view-user{padding-top:8px}#view-user .public-back{color:#c5c6d0;min-height:40px;margin-bottom:12px}
#view-user .public-summary{display:grid;grid-template-columns:minmax(200px,.8fr) minmax(0,1.5fr);gap:12px;padding:12px;border:1px solid #4a4c54;border-radius:18px;background:#3b3c42;box-shadow:none}
#view-user .pub-card{min-width:0;border:1px solid #45464f;border-radius:12px;background:#27282e;color:#f4f4f6;box-shadow:none}
#view-user .pub-user-card{display:flex;align-items:center;gap:16px;padding:20px;min-height:150px}#view-user .pub-user-card>div{min-width:0}#view-user .pub-user-card h2{font-size:20px;overflow-wrap:anywhere;margin:0 0 12px}#view-user .pub-user-card>div>span{display:inline-block;font-size:11px;border:1px solid #54565f;border-radius:6px;padding:5px 8px;color:#d7d8df}
#view-user .pub-avatar{width:72px;height:72px;flex:0 0 72px;border-radius:14px;border:0;box-shadow:none}
#view-user .public-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
#view-user .pub-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:150px;padding:16px 8px;position:relative;isolation:isolate;text-align:center;font-family:inherit;cursor:pointer;transition:border-color .2s ease}
#view-user .pub-stat>img{position:static;float:none;width:38px;height:38px;object-fit:contain;margin:0;transform:none;opacity:1;filter:brightness(0) saturate(100%) invert(83%) sepia(89%) saturate(1929%) hue-rotate(359deg) brightness(102%) contrast(105%)}
#view-user .pub-stat>b{font-size:11px;color:#d5d5dc;font-weight:600}#view-user .pub-stat>strong{display:flex;align-items:center;justify-content:center;gap:4px;padding:0;font-size:17px;color:#fff;white-space:normal;overflow-wrap:anywhere;margin:0}#view-user .pub-stat>span{font-size:10px;color:#a5a7b3;margin:0}
#view-user .pub-stat::after{content:"";position:absolute;bottom:0;left:12%;right:12%;height:2px;background:#ffdb00;box-shadow:0 -3px 20px 6px #ffdb0033;opacity:0;transition:opacity .2s ease;pointer-events:none}#view-user .pub-stat:is(:hover,:focus-visible)::after{opacity:1}#view-user .pub-stat:is(:hover,:focus-visible){border-color:#a08e3b;transform:none;box-shadow:none}#view-user .pub-stat:focus-visible{outline:2px solid #ffdb00;outline-offset:3px}
#view-user .pub-best{grid-column:1/-1;min-height:130px;background:#292a30;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}#view-user .pub-best>img,#view-user .pub-best>svg{position:static;width:110px;height:100px;object-fit:contain;order:2;flex-shrink:0;filter:none}#view-user .pub-best-copy{position:static;max-width:none}#view-user .pub-best-copy small{color:#b3b4bf;font-size:11px}#view-user .pub-best-copy b{font-size:17px;overflow-wrap:anywhere}#view-user .pub-best-copy strong{color:#ffdf63;font-size:18px}
#view-user .public-tabs{margin-top:22px;padding:8px;background:#303137;border:1px solid #484a53;border-radius:12px;gap:8px;display:flex}#view-user .public-tabs .utab{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid transparent;border-radius:8px;font:600 12px Inter,system-ui,sans-serif;background:none;color:#b7b8c3;min-height:46px}#view-user .public-tabs .utab img{width:23px;height:23px;object-fit:contain}#view-user .public-tabs .utab.active{background:#ffdb0012;border-color:#786b2c;color:#ffe065}
#view-user #userItems,#view-user #userGames{margin-top:12px;background:#303137;border:1px solid #484a53;border-radius:14px;min-height:160px}#view-user .hcard{border-width:1px;border-color:#454752!important;background:#25262d;border-radius:12px}
@media(max-width:1050px){#view-user .public-summary{grid-template-columns:1fr}#view-user .pub-user-card{min-height:110px}#view-user .pub-best{grid-column:1}}
@media(max-width:540px){#view-user .public-summary{padding:10px;gap:10px}#view-user .pub-user-card{padding:16px}#view-user .public-metrics{gap:6px}#view-user .pub-stat{min-height:143px;padding:12px 5px;gap:8px}#view-user .pub-stat>img{width:32px;height:32px}#view-user .pub-stat>strong{font-size:14px}#view-user .pub-stat>span{font-size:9px}#view-user .pub-best{padding:16px;gap:10px}#view-user .pub-best>img{width:80px;height:85px}#view-user .public-tabs{gap:4px;padding:6px}#view-user .public-tabs .utab{flex:1;font-size:10px;padding:8px 5px;gap:6px}#view-user .public-tabs .utab img{width:20px;height:20px}}
@media(prefers-reduced-motion:reduce){#view-profile .profile-metric::after,#view-user .pub-stat,#view-user .pub-stat::after{transition:none}}
.profile-telegram #telegramStatus:empty{display:none}
