/* 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:10px;text-align:center;opacity:0;transition:opacity .15s}
#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}
body[data-currency="eur"] #view-profile .currency-unit>img{content:url('/assets/ui/currency-eur.png')}
body[data-currency="usd"] #view-profile .currency-unit>img{content:url('/assets/ui/currency-usd.png')}
body[data-currency="brl"] #view-profile .currency-unit>img{content:url('/assets/ui/currency-brl.png')}
.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}
.profile-telegram #telegramStatus:empty{display:none}
