

/* Achievement unlocks are intentionally separate from generic toastr messages. */
.achievement-unlock-stack {
    position: fixed;
    z-index: 10050;
    top: 84px;
    right: 22px;
    width: min(410px, calc(100vw - 32px));
    pointer-events: none;
}

.achievement-unlock-card {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 20px;
    overflow: hidden;
    color: #f8f7ff;
    border: 1px solid rgba(250, 204, 21, .48);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(29, 23, 53, .98), rgba(17, 13, 31, .98));
    box-shadow: 0 20px 55px rgba(0, 0, 0, .5), 0 0 30px rgba(139, 92, 246, .22);
    opacity: 0;
    transform: translateX(35px) scale(.97);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: auto;
}

.achievement-unlock-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0, rgba(250, 204, 21, .16), transparent 42%);
    pointer-events: none;
}

.achievement-unlock-card.is-visible { opacity: 1; transform: none; }
.achievement-unlock-icon { flex: 0 0 58px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; color: #2a1f05; font-size: 25px; background: linear-gradient(145deg, #fde68a, #eab308); box-shadow: 0 0 25px rgba(234, 179, 8, .3); }
.achievement-unlock-copy { position: relative; min-width: 0; }
.achievement-unlock-label { color: #facc15; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.achievement-unlock-copy h3 { margin: 5px 24px 4px 0; color: #fff; font-size: 19px; line-height: 1.25; }
.achievement-unlock-copy p { margin: 0; color: rgba(239, 237, 248, .72); font-size: 13px; line-height: 1.45; }
.achievement-unlock-reward { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px; border-radius: 9px; background: rgba(139, 92, 246, .16); }
.achievement-unlock-reward span { color: #aaa2c7; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.achievement-unlock-reward strong { color: #d8b4fe; font-size: 12px; }
.achievement-unlock-close { position: absolute; z-index: 2; top: 9px; right: 10px; width: 28px; height: 28px; padding: 0; color: rgba(255,255,255,.55); border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }

@media (max-width: 600px) {
    .achievement-unlock-stack { top: auto; right: 16px; bottom: 20px; left: 16px; width: auto; }
    .achievement-unlock-card { padding: 17px; }}

@media (prefers-reduced-motion: reduce) {
    .achievement-unlock-card { transition: opacity .01s linear; transform: none; }}

/* ================================================================
   PROFILE PAGE  (merged from profile.css — always wins over legacy)
   ================================================================ */

.profile {
    width: 100%;
    padding: clamp(12px, 2vw, 20px);
}

/* Banner / Hero */
.profile .header {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 160px;
    background: var(--site-color-bg-light);
    float: none;
    width: 100%;
}
.profile .header,
.profile .header img.bg {
    border-radius: 16px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.profile .header img.bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.35;
}
.profile .header .gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(15,11,26,0) 30%, var(--site-color-bg-body) 100%);
}

/* User info (avatar + name) */
.profile .header .user {
    position: absolute;
    left: 24px;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    float: none;
    pointer-events: none;
}
.profile .header .user img.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--site-color-bg-body);
    display: block;
    object-fit: cover;
    flex-shrink: 0;
    float: none;
    margin: 0;
}
.profile .header .user .text {
    float: none;
    margin: 0;
    padding-bottom: 6px;
    pointer-events: all;
}
.profile .header .user .text p {
    margin: 0;
    width: auto;
    float: none;
}
.profile .header .user .text p.name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
.profile .header .user .text p.sub {
    font-size: 12px;
    color: #acacac;
    margin-top: 2px;
}

/* Level bar */
.profile .header .level {
    position: absolute;
    right: 24px;
    bottom: 16px;
    z-index: 3;
    width: 160px;
}
.profile .header .level .l { float: left; }
.profile .header .level .r { float: right; }
.profile .header .level p {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: #acacac;
    opacity: 1;
}
.profile .header .level .c {
    width: 100%;
    float: left;
    height: 5px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
}
.profile .header .level .c div {
    height: 5px;
    border-radius: 4px;
    float: left;
    background: var(--site-color-main);
}

/* Tabs bar */
.profile .menu {
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 40px 0 0;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    float: none;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.profile .menu::-webkit-scrollbar { display: none; }
.profile .menu button {
    background: transparent;
    border: none;
    border-radius: 6px 6px 0 0;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #acacac;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    outline: none;
    white-space: nowrap;
    line-height: normal;
    margin-bottom: -1px;
}
.profile .menu button[data-active="true"] {
    color: #fff;
    border-bottom: 2px solid var(--site-color-main);
}
.profile .menu button:not([data-active="true"]):hover { color: #fff; }

/* Tab content */
.profile .tab {
    display: none;
    float: none;
    width: 100%;
    margin: 0;
}
.profile .tab[data-active="true"] { display: block; }

.profile-sessions{padding:22px}.profile-sessions-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.profile-sessions-head h3{margin:3px 0 6px;color:#fff;font-size:20px}.profile-sessions-head p{margin:0;color:#91899a;line-height:1.55}.profile-sessions-head .eyebrow{color:#ad79e6;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.profile-sessions-count{display:flex;align-items:center;gap:7px;min-width:54px;padding:8px 12px;border:1px solid rgba(165,91,234,.25);border-radius:999px;background:rgba(165,91,234,.1);color:#d5b4f5;font-weight:800}.profile-session-list{display:grid;gap:10px}.profile-session-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:14px;padding:15px;border:1px solid rgba(255,255,255,.07);border-radius:14px;background:rgba(8,6,13,.45)}.profile-session-card.is-current{border-color:rgba(91,201,146,.3);background:rgba(45,130,88,.07)}.profile-session-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:13px;background:rgba(155,94,216,.12);color:#bd8bec;font-size:19px}.profile-session-title{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.profile-session-title strong{color:#fff}.profile-session-title span{padding:3px 7px;border-radius:999px;background:rgba(72,190,128,.13);color:#6ed59e;font-size:9px;font-weight:800;text-transform:uppercase}.profile-session-meta{display:flex;flex-wrap:wrap;gap:7px 15px;margin-top:7px;color:#8f8797;font-size:11px}.profile-session-meta i{margin-right:4px;color:#a36cda}.profile-session-revoke{padding:9px 12px;border:1px solid rgba(230,92,112,.25);border-radius:10px;background:rgba(187,54,74,.1);color:#ef8797;font-weight:800;cursor:pointer}.profile-session-revoke:hover{background:rgba(187,54,74,.2)}.profile-session-revoke:disabled{opacity:.5;cursor:wait}.profile-sessions-note,.profile-sessions-empty{margin:14px 0 0;color:#837b8b;font-size:11px}.profile-sessions-note i{margin-right:5px;color:#a36cda}

@media(max-width:768px), (pointer:coarse) and (max-width:1199px) and (max-height:600px) and (orientation:landscape){.profile-sessions{padding:14px}.profile-sessions-head{gap:10px}.profile-session-card{grid-template-columns:42px minmax(0,1fr);padding:12px}.profile-session-icon{width:42px;height:42px}.profile-session-revoke{grid-column:1/-1;width:100%}.profile-session-meta{display:grid;gap:5px}}

.profile .status-avatar-frame { width:78px; height:78px; display:grid; place-items:center; padding:3px; border-radius:50%; background:var(--status-color,#94a3b8); box-shadow:0 0 18px color-mix(in srgb,var(--status-color) 45%,transparent); }
.profile .status-avatar-frame .avatar { position:static!important; width:72px!important; height:72px!important; border:2px solid #14161b; }
.profile .public-status { display:inline-flex; align-items:center; gap:5px; margin-top:4px; color:var(--status-color,#94a3b8); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.profile .status-newcomer { --status-color:#94a3b8; }.profile .status-explorer { --status-color:#22c55e; }.profile .status-regular { --status-color:#38bdf8; }.profile .status-veteran { --status-color:#a78bfa; }.profile .status-luminary { --status-color:#f59e0b; }.profile .status-legend { --status-color:#f472b6; }
.profile .status-legend .status-avatar-frame { background:conic-gradient(#f472b6,#a78bfa,#38bdf8,#22c55e,#f59e0b,#f472b6); animation:status-spin 5s linear infinite; }
.profile .status-overview { display:flex; align-items:center; gap:16px; margin-bottom:14px; border:1px solid color-mix(in srgb,var(--status-color) 28%,transparent); background:linear-gradient(110deg,color-mix(in srgb,var(--status-color) 12%,#17191f),#17191f 55%); }
.profile .status-emblem { width:50px; height:50px; flex:0 0 50px; display:grid; place-items:center; border-radius:14px; color:#111318; background:var(--status-color); font-size:22px; }
.profile .status-body { min-width:180px; flex:1; }.profile .status-body > span,.profile .status-body small { color:#777; font-size:10px; text-transform:uppercase; letter-spacing:.07em; }.profile .status-body > span { display:block; margin-bottom:6px; }.profile .status-body h3 { margin:0 0 12px; color:var(--status-color); font-size:18px; line-height:1.25; }
.profile .status-progress { height:5px; margin-bottom:8px; overflow:hidden; border-radius:5px; background:#292b32; }.profile .status-progress i { display:block; height:100%; background:var(--status-color); }.profile .status-body small { display:block; line-height:1.4; }
.profile .status-merits { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:7px; max-width:44%; }.profile .status-merits span { display:inline-flex; align-items:center; gap:6px; padding:7px 9px; border-radius:7px; color:#bbb; background:rgba(255,255,255,.045); font-size:10px; }.profile .status-merits i { color:var(--status-color); }
@media (max-width:760px) { .profile .status-overview { align-items:flex-start; flex-wrap:wrap; }.profile .status-merits { max-width:none; justify-content:flex-start; width:100%; }}
.journey-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(120deg,rgba(124,58,237,.18),#17191f 60%)}.journey-hero>div:first-child{max-width:560px}
.journey-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.journey-goal{display:flex;gap:11px;padding:13px 0;border-bottom:1px solid rgba(255,255,255,.05)}.journey-goal:last-child{border:0}.journey-goal>i{width:28px;height:28px;display:grid;place-items:center;flex:0 0 28px;border-radius:8px;background:#272932;color:#888}.journey-goal.complete>i{background:#22c55e;color:#101410}.journey-goal>div{min-width:0;flex:1}.journey-goal strong,.journey-goal span,.journey-goal small{display:block}.journey-goal strong{color:#ddd;font-size:12px}.journey-goal span{margin:3px 0 8px;color:#777;font-size:10px}.journey-goal small{margin-top:5px;color:#666;font-size:9px}.journey-progress{height:4px;border-radius:4px;background:#292b32;overflow:hidden}.journey-progress b{display:block;height:100%;background:#7c3aed}.journey-goal.complete .journey-progress b{background:#22c55e}
.profile .reward-center{margin-top:12px;padding:14px 16px!important;overflow:hidden;border-color:rgba(255,255,255,.065)!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(30,22,40,.88),rgba(16,12,23,.94))!important}
.reward-center-head{display:flex;align-items:center;gap:10px;padding-bottom:11px;border-bottom:1px solid rgba(255,255,255,.06)}
.reward-center-icon{width:32px;height:32px;display:grid;flex:0 0 32px;place-items:center;border:1px solid rgba(171,115,244,.2);border-radius:9px;background:rgba(135,69,216,.12);color:#bd8bf2;font-size:13px}
.reward-center-head h3{margin:0 0 2px;color:#eee8f2;font-size:13px}.reward-center-head p{margin:0;color:#756d7c;font-size:9px}
.reward-center-count{margin-left:auto;padding:4px 7px;border-radius:6px;background:rgba(255,255,255,.035);color:#81798a;font-size:8px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.reward-center-list{display:grid;gap:5px;padding-top:8px}
.reward-center-row{min-height:42px;display:grid;grid-template-columns:minmax(0,1fr) auto 68px;align-items:center;gap:12px;padding:6px 9px;border:1px solid rgba(255,255,255,.045);border-radius:9px;background:rgba(7,5,11,.24);transition:border-color .16s,background .16s}
.reward-center-row:hover{border-color:rgba(166,106,239,.15);background:rgba(124,66,190,.055)}
.reward-center-copy{min-width:0}.reward-center-copy strong,.reward-center-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reward-center-copy strong{margin-bottom:3px;color:#dcd5e2;font-size:10px}.reward-center-copy span{color:#716a79;font-size:8px}.reward-center-copy span i{margin-right:3px;color:#7f5ca5}
.reward-center-amount{min-width:52px;color:#e8c96d;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.reward-center-amount i{margin-right:3px;font-size:8px}
.reward-center-empty{min-height:54px;display:flex;align-items:center;justify-content:center;gap:7px;color:#756d7c;font-size:9px}.reward-center-empty i{color:#8c62b5}
@media(max-width:600px){.profile .reward-center{padding:12px!important}.reward-center-head p{display:none}.reward-center-row{grid-template-columns:minmax(0,1fr) auto;gap:7px}.reward-center-copy{grid-row:1/3}.reward-center-amount{align-self:end;font-size:9px}.reward-center-count{font-size:7px}}
.onboarding-route{margin-top:12px}.onboarding-head>div>span{color:#a78bfa;font-size:9px;font-weight:800;text-transform:uppercase}.onboarding-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:12px}.onboarding-steps>div{display:grid;place-items:center;gap:5px;padding:10px 6px;border-radius:8px;background:#202229;color:#666;text-align:center}.onboarding-steps>div.done{background:rgba(34,197,94,.1);color:#22c55e}.onboarding-steps span{font-size:9px}.onboarding-steps small{font-size:8px}

/* Achievement Shop: intentionally styled as a trophy vault, separate from
   the compact utility cards used by Reputation Shop. */
.achievement-shop{position:relative;margin-top:18px;padding:22px;overflow:hidden;border:1px solid rgba(245,158,11,.24)!important;background:radial-gradient(circle at 88% 0,rgba(245,158,11,.12),transparent 30%),linear-gradient(145deg,rgba(38,24,52,.96),rgba(15,11,26,.98))!important}.achievement-shop:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.025) 50%,transparent 65%)}.achievement-shop-head{position:relative;display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.achievement-shop-head h3{margin:5px 0 6px;color:#fff;font-size:22px}.achievement-shop-head p{max-width:650px;margin:0;color:#a9a1b5;font-size:12px;line-height:1.55}.achievement-vault-label{color:#fbbf24;font-size:10px;font-weight:800;letter-spacing:.13em;text-transform:uppercase}.achievement-vault-label i{margin-right:5px}.achievement-wallet{flex:0 0 auto;min-width:160px;padding:12px 14px;text-align:right;border:1px solid rgba(245,158,11,.22);border-radius:11px;background:rgba(0,0,0,.2)}.achievement-wallet small,.achievement-wallet strong,.achievement-wallet em{display:block}.achievement-wallet small{color:#9b93a6;font-size:9px;text-transform:uppercase}.achievement-wallet strong{margin:3px 0;color:#fde68a;font-size:21px}.achievement-wallet em{color:#81798c;font-size:9px;font-style:normal}.achievement-shop-note{position:relative;display:flex;gap:8px;margin:15px 0;padding:9px 11px;color:#c4b5d4;border-radius:7px;background:rgba(139,92,246,.08);font-size:10px}.achievement-shop-note i{color:#a78bfa}.achievement-vault-grid{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.achievement-vault-item{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:11px;min-width:0;padding:13px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(10,8,17,.52)}.achievement-vault-item button{min-width:76px;padding:8px 10px;color:#211308;border:0;border-radius:7px;background:linear-gradient(135deg,#fbbf24,#f59e0b);font-size:10px;font-weight:800;cursor:pointer}.achievement-vault-item.owned{border-color:rgba(74,222,128,.18);background:rgba(34,197,94,.035)}
.achievement-shop-note a{color:#d6b5ff;text-decoration:underline;text-underline-offset:2px}.achievement-collection{position:relative;margin-top:13px;padding:20px!important;overflow:hidden;border-color:rgba(139,92,246,.2)!important;background:radial-gradient(circle at 90% 0,rgba(124,58,237,.13),transparent 32%),linear-gradient(145deg,rgba(28,20,40,.94),rgba(14,11,22,.97))!important}.achievement-collection-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}.achievement-collection-head>div>span{color:#b887f0;font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.achievement-collection-head h3{margin:4px 0;color:#f1ebf6;font-size:18px}.achievement-collection-head p{margin:0;color:#8c8494;font-size:10px}.achievement-collection-head>a{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid rgba(167,139,250,.19);border-radius:8px;background:rgba(124,58,237,.08);color:#c7a5ee;font-size:9px;font-weight:750;white-space:nowrap}.achievement-collection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.achievement-collection-item{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px;border:1px solid rgba(255,255,255,.065);border-radius:10px;background:rgba(7,5,12,.32)}.achievement-collection-item>i{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:rgba(139,92,246,.12);color:#b88aeb}.achievement-collection-item>div{min-width:0}.achievement-collection-item small,.achievement-collection-item strong,.achievement-collection-item span{display:block}.achievement-collection-item small{color:#8d65b5;font-size:7px;font-weight:850;text-transform:uppercase}.achievement-collection-item strong{margin:3px 0;color:#ded6e5;font-size:11px}.achievement-collection-item span{overflow:hidden;color:#77707e;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.achievement-collection-item button{min-width:76px;padding:7px 9px;border:0;border-radius:7px;background:#7c3aed;color:#fff;font-size:8px;font-weight:800;cursor:pointer}.achievement-collection-item.is-equipped{border-color:rgba(74,222,128,.22);background:rgba(34,197,94,.04)}.achievement-collection-item.is-equipped>i{background:rgba(34,197,94,.1);color:#65dda0}.achievement-collection-item button.is-remove{border:1px solid rgba(74,222,128,.17);background:rgba(34,197,94,.08);color:#72dfa5}.achievement-collection-empty{display:flex;align-items:center;justify-content:center;gap:10px;min-height:70px;border:1px dashed rgba(255,255,255,.08);border-radius:10px;color:#766d7e}.achievement-collection-empty>i{color:#8e65b7}.achievement-collection-empty strong,.achievement-collection-empty small{display:block}.achievement-collection-empty strong{color:#aaa1b2;font-size:10px}.achievement-collection-empty small{margin-top:3px;font-size:8px}.profile .header.has-achievement-banner{background-image:radial-gradient(circle at 78% 20%,rgba(245,158,11,.25),transparent 28%),linear-gradient(120deg,rgba(77,35,130,.62),rgba(15,12,23,.4))}.profile .header.has-achievement-aura .status-avatar-frame{box-shadow:0 0 0 5px rgba(167,139,250,.09),0 0 30px rgba(168,85,247,.55);animation:achievement-aura-pulse 2.4s ease-in-out infinite}.profile .status-name.has-achievement-nameplate{display:inline-flex!important;align-items:center;gap:6px;padding:4px 9px;border:1px solid rgba(244,201,93,.2);border-radius:7px;background:linear-gradient(90deg,rgba(245,158,11,.1),rgba(139,92,246,.1));color:#f4df9c!important}.achievement-equipped-badge{color:#f2c95d;font-size:11px;text-shadow:0 0 9px rgba(245,158,11,.5)}@media(max-width:700px){.achievement-collection{padding:14px!important}.achievement-collection-head{align-items:flex-start;flex-direction:column}.achievement-collection-grid{grid-template-columns:1fr}.achievement-collection-item{grid-template-columns:36px minmax(0,1fr) auto}.achievement-collection-item>i{width:36px;height:36px}}
@media(max-width:760px){.journey-columns{grid-template-columns:1fr}.achievement-wallet{width:100%;text-align:left;box-sizing:border-box}.achievement-vault-grid{grid-template-columns:1fr}.achievement-vault-item{grid-template-columns:42px 1fr}}

.profile .achievements-head { display:flex; align-items:center; gap:18px; margin-bottom:14px; }
.profile .achievements-head > div:first-child { flex:1; }
.profile .achievement-score { min-width:86px; padding-left:18px; border-left:1px solid rgba(255,255,255,.08); text-align:center; }
.profile .achievement-score strong { display:block; color:#fff; font-size:20px; }
.profile .achievement-score span { color:#888; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.profile .achievement-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.profile .achievement-card { display:flex; gap:14px; padding:18px; border:1px solid rgba(255,255,255,.06); border-radius:10px; background:#17191f; opacity:.7; }
.profile .achievement-card.is-unlocked { border-color:rgba(124,58,237,.45); background:linear-gradient(135deg,rgba(124,58,237,.13),#17191f 55%); opacity:1; }
.profile .achievement-icon { width:46px; height:46px; flex:0 0 46px; display:grid; place-items:center; border-radius:50%; background:#24262d; color:#777; font-size:18px; }
.profile .is-unlocked .achievement-icon { background:#7c3aed; color:#fff; box-shadow:0 0 20px rgba(124,58,237,.3); }
.profile .achievement-copy { min-width:0; flex:1; }
.profile .achievement-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.profile .achievement-title h3 { margin:0; color:#eee; font-size:14px; }
.profile .achievement-title span { color:#a78bfa; font-size:11px; font-weight:700; }
.profile .achievement-copy p { margin:5px 0 12px; color:#888; font-size:12px; }
.profile .achievement-category { display:inline-block; margin-top:5px; padding:3px 6px; border-radius:4px; color:#9b8abf; background:rgba(124,58,237,.1); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.profile .achievement-progress { height:5px; overflow:hidden; border-radius:5px; background:#292b32; }
.profile .achievement-progress i { display:block; height:100%; border-radius:inherit; background:#7c3aed; }
.profile .achievement-copy small { display:block; margin-top:7px; color:#696b73; font-size:10px; }
@media (max-width:760px) { .profile .achievement-grid { grid-template-columns:1fr; } .profile .achievements-head { flex-wrap:wrap; }}

/* Generic card box */
.profile .bx {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 16px;
    margin: 0 0 16px;
    float: none;
    width: auto;
}
.profile .bx h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    float: none;
    width: auto;
    text-align: left;
}
.profile .bx h3 span { float: none; }
.profile .bx h3 .status {
    font-size: 11px;
    font-weight: 600;
    color: #ff5f56;
    margin-left: 0;
    line-height: normal;
    float: none;
}
.profile .bx p.desc {
    font-size: 13px;
    color: #acacac;
    line-height: 1.65;
    margin: 0 0 8px;
    float: none;
    width: auto;
    text-align: left;
}

/* Summary tab two-column grid */
.profile .profile-praise {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.profile .profile-praise article {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
    padding: 15px;
}
.profile .profile-praise article > i {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #c4b5fd;
    border-radius: 11px;
    background: rgba(141,59,222,.16);
}
.profile .profile-praise .praise-best > i { color: #fde68a; background: rgba(245,158,11,.14); }
.profile .profile-praise article div { min-width: 0; }
.profile .profile-praise span,
.profile .profile-praise strong,
.profile .profile-praise small { display: block; }
.profile .profile-praise span { color: #9691a3; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.profile .profile-praise strong { margin: 4px 0; overflow-wrap: anywhere; color: #fff; font-size: 15px; }
.profile .profile-praise small { color: #aaa4b6; font-size: 10px; line-height: 1.4; }

.profile .avatar-collection{margin:16px 0;padding:18px}.profile .avatar-collection-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.profile .avatar-collection-head>div>span{color:#9f7aea;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.1em}.profile .avatar-collection-head h3{margin:4px 0;color:#fff;font-size:18px}.profile .avatar-collection-head p{margin:0;color:#9691a3;font-size:11px}.profile .avatar-legend{display:flex;gap:8px;flex-wrap:wrap}.profile .avatar-legend b{padding:6px 8px;color:#aaa4b6;border-radius:14px;background:rgba(255,255,255,.04);font-size:9px}.profile .avatar-legend i{display:inline-block;width:7px;height:7px;margin-right:4px;border-radius:50%;background:#8b5cf6}.profile .avatar-legend .vip i{background:#fbbf24}.profile .avatar-picker-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:9px;margin-top:15px}.profile .avatar-choice{min-width:0;padding:7px;border:1px solid rgba(255,255,255,.07);border-radius:10px;background:rgba(0,0,0,.14);text-align:center}.profile .avatar-choice.is-vip{border-color:rgba(245,158,11,.2);background:linear-gradient(145deg,rgba(245,158,11,.06),rgba(139,92,246,.05))}.profile .avatar-choice.is-selected{border-color:#8b5cf6;box-shadow:0 0 0 2px rgba(139,92,246,.15)}.profile .avatar-choice.is-vip.is-selected{border-color:#fbbf24;box-shadow:0 0 0 2px rgba(245,158,11,.14)}.profile .avatar-choice-image{position:relative;aspect-ratio:1;border-radius:8px;overflow:hidden;background:#17121f}.profile .avatar-choice-image img{width:100%;height:100%;display:block;object-fit:cover}.profile .avatar-choice-image>b{position:absolute;top:4px;right:4px;padding:2px 4px;color:#241707;border-radius:4px;background:#fbbf24;font-size:7px}.profile .avatar-choice-image>span{position:absolute;inset:0;display:grid;place-items:center;color:#fff;background:rgba(8,6,13,.62);font-size:17px}.profile .avatar-choice>small{display:block;min-height:25px;margin:6px 0;color:#81798c;font-size:7px;line-height:1.3}.profile .avatar-choice button{width:100%;padding:5px 2px;color:#fff;border:0;border-radius:5px;background:#7c3aed;font-size:8px;cursor:pointer}.profile .avatar-choice button:disabled{color:#a7f3d0;background:rgba(34,197,94,.13);cursor:default}.profile .avatar-choice.is-locked>small{color:#a78bfa}

.profile .summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

/* Left column: stats + self-exclusion */
.profile .fx-h {
    width: 100%;
    float: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.profile .bx.stats,
.profile .bx.se {
    width: 100%;
    float: none;
}
.profile .bx.stats {
    text-align: left;
    display: flex;
    flex-direction: column;
}

/* Stats equation row */
.profile .eq-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.profile .stats .eq {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    width: auto;
    float: none;
}
.profile .stats .eq p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    float: none;
    width: auto;
}
.profile .stats .eq p i { font-size: 12px; }
.profile .stats .eq span {
    display: block;
    font-size: 11px;
    color: #acacac;
    margin-top: 3px;
    float: none;
    width: auto;
}
.profile .stats i.fa.s {
    color: #acacac;
    font-size: 12px;
    flex-shrink: 0;
    float: none;
    margin: 0;
}

/* Self-exclusion buttons */
.profile .se .btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
    float: none;
    width: auto;
}
.profile .se .btns button {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px;
    color: #acacac;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    float: none;
}
.profile .se .btns button:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Right column: settings */
.profile .st.bx {
    width: 100%;
    margin-left: 0;
    float: none;
}
.profile .st.bx .stt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin: 0;
    float: none;
    width: auto;
}
.profile .st.bx .stt:last-child { border-bottom: none; padding-bottom: 0; }
.profile .st.bx .stt .l,
.profile .st.bx .stt .l2 {
    flex: 1;
    width: auto;
    float: none;
}
.profile .st.bx .stt h3 {
    font-size: 13px;
    margin: 0 0 2px;
    display: block;
    float: none;
    width: auto;
}
.profile .st.bx .stt p.desc {
    margin: 0;
    font-size: 12px;
    border: none !important;
    padding: 0 !important;
}
.profile .profile-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 6px;
}
.profile .profile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #acacac;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.profile .profile-action:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.16);
    color: #fff;
}
.profile .profile-action.danger:hover {
    background: rgba(255, 95, 86, 0.12);
    border-color: rgba(255, 95, 86, 0.28);
    color: #ff7a73;
}
.profile .profile-action i {
    flex-shrink: 0;
    font-size: 13px;
}
.profile .profile-language-setting { align-items:center; }
.profile .profile-security-setting { position:relative;align-items:center!important;padding:14px 0!important; }
.profile .profile-security-icon { width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border:1px solid rgba(181,116,244,.22);border-radius:11px;background:rgba(132,67,187,.11);color:#bd82ed; }
.profile .profile-security-setting.is-enabled .profile-security-icon { border-color:rgba(61,211,139,.28);background:rgba(40,177,111,.1);color:#55d99a; }
.profile .profile-security-setting h3 { display:flex!important;align-items:center;gap:7px;flex-wrap:wrap; }
.profile .profile-security-status { padding:3px 6px;border-radius:6px;background:rgba(40,177,111,.1);color:#55d99a;font-size:8px;font-weight:800;letter-spacing:.04em;text-transform:uppercase; }
.profile .profile-security-enable { min-height:38px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;border:1px solid rgba(181,116,244,.32);border-radius:9px;background:linear-gradient(135deg,rgba(145,74,211,.28),rgba(91,42,151,.24));color:#e8d5f7;font-size:10px;font-weight:800;cursor:pointer;transition:.18s; }
.profile .profile-security-enable:hover { border-color:rgba(193,137,250,.58);background:linear-gradient(135deg,rgba(156,81,224,.42),rgba(102,47,167,.38));color:#fff; }
.profile .profile-security-enable:disabled { opacity:.55;cursor:wait; }
.profile .profile-language-control {
    width:154px;
    height:40px;
    position:relative;
    display:flex;
    align-items:center;
    flex:0 0 auto;
    border:1px solid rgba(181,116,244,.25);
    border-radius:10px;
    background:linear-gradient(145deg,rgba(132,67,187,.13),rgba(17,18,26,.82));
    color:#c993f1;
    transition:border-color .18s,box-shadow .18s;
}
.profile .profile-language-control:focus-within {
    border-color:rgba(181,116,244,.62);
    box-shadow:0 0 0 3px rgba(149,85,206,.11);
}
.profile .profile-language-control>i:first-child { margin-left:12px;font-size:13px;pointer-events:none; }
.profile .profile-language-control>i:last-child { position:absolute;right:11px;color:#817989;font-size:9px;pointer-events:none; }
.profile .profile-language-control select {
    width:100%;height:100%;padding:0 30px 0 9px;border:0;outline:0;
    appearance:none;-webkit-appearance:none;background:transparent;color:#eee7f3;
    font:700 12px/1 var(--site-font-body);cursor:pointer;
}
.profile .profile-language-control select option { background:#1b1722;color:#fff; }
@media (max-width:520px) {
    .profile .profile-security-setting { display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:10px!important; }
    .profile .profile-security-setting .profile-security-enable { grid-column:1/-1;width:100%;height:44px; }
    .profile .profile-language-setting { align-items:flex-start!important;flex-direction:column;gap:10px!important; }
    .profile .profile-language-control { width:100%;height:44px; }}

/* Toggle switch */
.profile input[type="checkbox"] { display: none; }
.profile .st.bx .stt .check {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    float: none;
    margin: 0;
}
.profile .st.bx .stt .check div {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #5a6375;
    border-radius: 50%;
    transition: transform 0.25s, background 0.2s;
    float: none;
}
.profile .st.bx .stt .check:hover div { opacity: 0.85; }
.profile .st.bx .stt .check[data-check="true"] {
    background: rgba(141,59,222,0.28);
}
.profile .st.bx .stt .check[data-check="true"] div {
    background: var(--site-color-main);
    transform: translateX(20px);
}
.profile .st.bx .stt button {
    float: none;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 7px 14px;
    color: #acacac;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin: 0;
}
.profile .st.bx .stt button:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
}
.profile .st.bx .stt button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Input inside stt */
.profile .st.bx .stt .input {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    margin: 6px 0 0;
    float: none;
    width: 100%;
}
.profile .st.bx .stt .input input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    height: 38px;
    padding: 0 12px;
    color: #fff;
    font-size: 13px;
    float: none;
    width: auto;
}
.profile .st.bx .stt .input button {
    background: var(--site-color-main);
    border: none;
    border-radius: 0 6px 6px 0;
    height: 38px;
    padding: 0 18px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    float: none;
    transition: background 0.15s;
}
.profile .st.bx .stt .input button:hover { background: #7c3aed; }

/* Affiliates tab */
.profile .tab.affiliates .affiliates-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.profile .affiliate-invite { padding: 20px; }
.profile .affiliate-invite-head { display: flex; align-items: center; gap: 12px; }
.profile .affiliate-invite-head h3 { margin: 2px 0 0; color: #fff; font-size: 18px; }
.profile .affiliate-invite-head .eyebrow { margin: 0; color: #9b8cff; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.profile .affiliate-invite-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#7c3aed,#a855f7); }
.profile .affiliate-invite-copy { margin: 12px 0 16px; color: #aaa; line-height: 1.5; }
.profile .affiliate-invite-fields { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(360px,1.2fr); gap: 14px; }
.profile .affiliate-invite-fields label > span { display: block; margin-bottom: 7px; color: #ccc; font-size: 12px; font-weight: 600; }
.profile .affiliate-inline { display: flex; gap: 8px; }
.profile .affiliate-inline input { min-width: 0; flex: 1; height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(0,0,0,.2); color: #fff; }
.profile .affiliate-inline .site-button { width: auto; min-width: 82px; margin: 0; padding: 0 14px; }
.profile .affiliate-inline .affiliate-copy { background: rgba(255,255,255,.08); }
.profile .affiliate-invite-note { margin: 13px 0 0; color: #8f93a2; font-size: 12px; }
.profile .affiliate-invite-note i { margin-right: 5px; color: #7dd3a7; }
.profile .tab .list { width: 100%; float: none; margin: 0; }
.profile .tab.affiliates .list .table-container {
    overflow: visible;
}
.profile .tab.affiliates .list .table-row {
    min-width: 0;
    grid-template-columns: 90px minmax(150px, 1.4fr) minmax(110px, 1fr) minmax(110px, 1fr);
}

/* Full-width profile statistics: both tables remain readable without a
   nested horizontal scrollbar. */
.profile .tab.stats-tab .flex.responsive.gap-1 {
    grid-template-columns: minmax(0, 1fr) !important;
}
.profile .tab.stats-tab .width-6 {
    width: 100% !important;
    max-width: none;
}
.profile .tab.stats-tab .table-container {
    overflow: visible;
}
.profile .tab.stats-tab .table-row {
    min-width: 0;
    grid-template-columns: minmax(140px, 1.4fr) repeat(3, minmax(100px, 1fr));
}
.profile .tab.stats-tab .width-6:last-child .table-row {
    grid-template-columns: minmax(160px, 1.5fr) repeat(2, minmax(120px, 1fr));
}
.profile .tab .aff  { width: auto; float: none; }
.profile .tab .aff2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    float: none;
    margin-bottom: 14px;
}
.profile .tab .aff .stats.bx {
    padding: 12px;
    text-align: center;
    display: block;
    margin: 0;
}
.profile .tab .aff .stats.bx p {
    text-align: center;
    float: none;
    width: auto;
    margin: 0;
}
.profile .tab .aff .stats.bx p.desc {
    font-size: 11px;
    color: #acacac;
    margin-bottom: 4px;
}
.profile .tab .aff .stats.bx p.coin {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.profile .tab .aff .stats.bx p.coin i { font-size: 13px; }

.profile .tab .table-column { text-align: left; }
.profile .tab .table-header { color: #acacac; }
.profile .tab .list .table-header .table-column { color: #acacac; }
.profile .tab .list .table-body .table-column { color: #acacac; }
.profile .tab .list .table-body .active .table-column { color: #fff; font-weight: 600; }

.profile .collect { width: 100%; margin-bottom: 14px; }

/* Profile responsive */
@media (max-width: 1100px) {
    .profile .tab.affiliates .affiliates-layout { grid-template-columns: 1fr; }
    .profile .tab .aff2 { grid-template-columns: repeat(2, 1fr); }}
@media (max-width: 768px), (pointer: coarse) and (max-width: 1199px) and (max-height: 600px) and (orientation: landscape) {
    .profile .header { height: 120px; }
    .profile .header .user img.avatar { width: 56px; height: 56px; }
    .profile .header .user { bottom: 0; left: 14px; }
    .profile .menu { padding-top: 36px; }
    .profile .summary-grid { grid-template-columns: 1fr; }
    .profile .tab .aff2 { grid-template-columns: 1fr 1fr; }
    .profile .header .level { right: 12px; width: 120px; }
    .profile .affiliate-invite-fields { grid-template-columns: 1fr; }
    .profile .affiliate-inline { flex-wrap: wrap; }
    .profile .affiliate-inline input { flex-basis: 100%; }}

/* Profile page final layout fixes */
.profile,
.profile * {
    box-sizing: border-box;
}

.profile {
    max-width: 1280px;
    margin: 0 auto;
    color: #fff;
}

.profile .header {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.profile .header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 18% 20%, rgba(141,59,222,0.26), transparent 34%),
        radial-gradient(circle at 82% 16%, rgba(186,134,237,0.16), transparent 30%),
        linear-gradient(135deg, rgba(19,13,34,0.76), rgba(15,11,26,0.96));
}

.profile .header .gradient {
    z-index: 2;
    background:
        radial-gradient(circle at 18% 12%, rgba(141,59,222,0.24), transparent 34%),
        radial-gradient(circle at 82% 0%, rgba(186,134,237,0.16), transparent 32%),
        linear-gradient(180deg, rgba(15,11,26,0.12) 0%, rgba(15,11,26,0.92) 100%);
}

.profile .header .user,
.profile .header .level {
    z-index: 4;
}

.profile .summary-grid,
.profile .affiliates-layout,
.profile .flex.responsive {
    min-width: 0;
}

.profile .fx-h,
.profile .st.bx,
.profile .tab .aff,
.profile .tab .list,
.profile .width-6 {
    min-width: 0;
}

.profile .bx {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    border-radius: 8px;
}

.profile .stats .eq {
    min-width: 0;
    border-radius: 8px;
}

.profile .stats .eq p {
    overflow-wrap: anywhere;
}

.profile .table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}

.profile .transaction-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}
.profile .transaction-pagination > a,
.profile .transaction-pagination > span:not(.transaction-pagination-gap) {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid rgba(167,139,250,.18);
    border-radius: 9px;
    background: rgba(124,58,237,.08);
    color: #c7a5ee;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}
.profile .transaction-pagination > a:hover {
    border-color: rgba(167,139,250,.4);
    background: rgba(124,58,237,.18);
    color: #fff;
}
.profile .transaction-pagination > .is-current {
    border-color: #8b5cf6;
    background: #7c3aed;
    color: #fff;
}
.profile .transaction-pagination > .is-disabled {
    opacity: .35;
}
.profile .transaction-pagination-gap {
    color: #77707e;
}

.profile .table-container .table-row {
    min-width: 640px;
}

.profile .table-container .table-column {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile .tab > .table-container {
    margin-bottom: 16px;
}

.profile .text-success,
.profile .table-row.text-success .table-column {
    color: #09b95b !important;
}

.profile .text-danger,
.profile .table-row.text-danger .table-column {
    color: #ff5f56 !important;
}

.profile .text-color.mb-1 {
    margin: 0 0 10px;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700;
    text-transform: none;
}

.profile .flex.responsive.gap-1 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile .width-6.responsive {
    width: auto !important;
}

@media (max-width: 900px) {
    .profile .profile-praise { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile .avatar-picker-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
    .profile .summary-grid,
    .profile .flex.responsive.gap-1 {
        grid-template-columns: 1fr;
    }

    .profile .eq-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile .stats i.fa.s {
        display: none;
    }}

@media (max-width: 640px) {
    .profile .profile-praise { grid-template-columns: 1fr; }
    .profile .avatar-collection-head { flex-direction:column; }
    .profile .avatar-picker-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .profile {
        padding: 12px;
    }

    .profile .header {
        height: 148px;
    }

    .profile .header .user {
        left: 14px;
        right: 14px;
        bottom: 0;
        align-items: center;
    }

    .profile .header .user img.avatar {
        width: 52px;
        height: 52px;
    }

    .profile .header .level {
        left: 14px;
        right: 14px;
        bottom: auto;
        top: 16px;
        width: auto;
    }

    .profile .menu {
        padding-top: 12px;
        margin-bottom: 14px;
    }

    .profile .menu button {
        padding: 9px 12px;
        font-size: 12px;
    }

    .profile .st.bx .stt {
        align-items: flex-start;
    }

    .profile .profile-actions {
        grid-template-columns: 1fr;
    }

    .profile .st.bx .stt button {
        max-width: 150px;
        white-space: normal;
    }

    .profile .tab .aff2 {
        grid-template-columns: 1fr;
    }

    .profile .table-container .table-row {
        min-width: 560px;
        padding: 10px 12px;
    }}
.big-win-card.profile-newcomer { --winner-color:#94a3b8; }.big-win-card.profile-explorer { --winner-color:#22c55e; }.big-win-card.profile-regular { --winner-color:#38bdf8; }.big-win-card.profile-veteran { --winner-color:#a78bfa; }.big-win-card.profile-luminary { --winner-color:#f59e0b; }.big-win-card.profile-legend { --winner-color:#f472b6; }

/* Mobile profile app ------------------------------------------------------ */
@media (max-width:768px), (pointer:coarse) and (max-width:1199px) and (max-height:600px) and (orientation:landscape) {
    .profile { width:100%;padding:0 0 8px; }

    .profile .header {
        height:208px!important;
        border:1px solid rgba(255,255,255,.08);
        border-radius:22px!important;
        background:#211927;
        box-shadow:0 18px 42px rgba(5,2,9,.25),inset 0 1px rgba(255,255,255,.04);
    }
    .profile .header img.bg { border-radius:22px!important;opacity:.22;filter:saturate(.7) contrast(.9); }
    .profile .header::before { background:radial-gradient(circle at 50% 15%,rgba(167,91,225,.3),transparent 36%),linear-gradient(180deg,rgba(24,17,31,.2),#17121d 92%); }
    .profile .header .gradient { border-radius:22px;background:linear-gradient(180deg,transparent 15%,rgba(20,14,25,.25) 45%,#17121d 100%); }
    .profile .header .user {
        top:25px;right:14px;bottom:auto;left:14px;
        flex-direction:column;align-items:center;gap:7px;text-align:center;
    }
    .profile .status-avatar-frame { width:72px;height:72px;padding:3px;box-shadow:0 8px 28px color-mix(in srgb,var(--status-color) 34%,transparent); }
    .profile .status-avatar-frame .avatar,.profile .header .user img.avatar { width:66px!important;height:66px!important; }
    .profile .header .user .text { padding:0; }
    .profile .header .user .text p.name { font-size:17px;line-height:1.15; }
    .profile .header .user .text p.sub { margin-top:2px;font-size:10px; }
    .profile .public-status { margin-top:4px;padding:4px 8px;border-radius:9px;background:color-mix(in srgb,var(--status-color) 12%,transparent);font-size:8px; }
    .profile .header .level { top:auto;right:18px;bottom:14px;left:18px;width:auto; }
    .profile .header .level p { margin-bottom:6px;font-size:9px; }
    .profile .header .level .c,.profile .header .level .c div { height:6px;border-radius:6px; }
    .profile .header .level .c { overflow:hidden;background:rgba(255,255,255,.09); }
    .profile .header .level .c div { background:linear-gradient(90deg,#8d3bde,#c06ef2);box-shadow:0 0 12px rgba(192,110,242,.35); }

    .profile .menu {
        position:sticky;z-index:80;top:calc(var(--mobile-header-h) + var(--mobile-safe-top));
        margin:8px -8px 12px;padding:8px max(8px,var(--mobile-safe-right));gap:7px;
        border:0;background:rgba(23,18,29,.92);box-shadow:0 8px 20px rgba(5,2,8,.14);
        -webkit-backdrop-filter:blur(18px) saturate(1.2);backdrop-filter:blur(18px) saturate(1.2);
        scroll-snap-type:x proximity;overscroll-behavior-inline:contain;
    }
    .profile .menu button {
        min-height:40px;margin:0;padding:0 14px;flex:0 0 auto;
        border:1px solid rgba(255,255,255,.065);border-radius:13px;
        background:rgba(255,255,255,.025);color:#938a98;font-size:11px;scroll-snap-align:center;
    }
    .profile .menu button[data-active="true"] { border-color:rgba(176,104,230,.34);background:linear-gradient(145deg,rgba(157,77,218,.25),rgba(109,49,158,.15));color:#fff;box-shadow:inset 0 1px rgba(255,255,255,.05); }

    .profile .tab[data-active="true"] { animation:profile-mobile-tab-in .28s ease both; }
    .profile .bx { margin-bottom:10px;padding:14px;border-radius:16px;background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.022));border-color:rgba(255,255,255,.07); }
    .profile .bx h3 { font-size:14px; }
    .profile .bx p.desc { font-size:11px;line-height:1.5; }

    .profile .status-overview { display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:11px;padding:14px; }
    .profile .status-emblem { width:44px;height:44px;font-size:18px;border-radius:13px; }
    .profile .status-body { min-width:0; }
    .profile .status-body h3 { margin-bottom:8px;font-size:16px; }
    .profile .status-body > span,.profile .status-body small { font-size:8px; }
    .profile .status-merits { grid-column:1/-1;width:100%;max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px; }
    .profile .status-merits span { min-width:0;padding:7px 8px;font-size:8px; }

    .profile .profile-praise {
        display:grid;grid-auto-flow:column;grid-auto-columns:min(82vw,280px);grid-template-columns:none;
        gap:9px;margin:10px -8px;padding:0 8px 4px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;
    }
    .profile .profile-praise::-webkit-scrollbar,.profile .avatar-picker-grid::-webkit-scrollbar { display:none; }
    .profile .profile-praise article { min-height:88px;margin:0;padding:13px;border-radius:16px;scroll-snap-align:start; }

    .profile .avatar-collection { margin:10px 0;padding:14px 0 14px 14px;overflow:hidden; }
    .profile .avatar-collection-head { padding-right:14px;gap:10px; }
    .profile .avatar-collection-head h3 { font-size:16px; }
    .profile .avatar-collection-head p { font-size:10px;line-height:1.45; }
    .profile .avatar-legend { gap:5px; }
    .profile .avatar-picker-grid {
        display:grid;grid-auto-flow:column;grid-auto-columns:116px;grid-template-columns:none;
        gap:8px;margin-top:12px;padding:0 14px 4px 0;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;
    }
    .profile .avatar-choice { scroll-snap-align:start;border-radius:13px; }
    .profile .avatar-choice > small { min-height:28px;font-size:8px; }
    .profile .avatar-choice button { min-height:34px;border-radius:8px;font-size:9px; }

    .profile .summary-grid { gap:0; }
    .profile .eq-row { grid-template-columns:repeat(2,minmax(0,1fr));gap:6px; }
    .profile .stats .eq { min-width:0;padding:10px 4px;border:1px solid rgba(255,255,255,.045);border-radius:12px; }
    .profile .stats .eq p { font-size:12px; }
    .profile .stats .eq span { font-size:8px;line-height:1.25; }
    .profile .profile-actions { grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
    .profile .profile-action { min-height:54px;padding:7px 4px;flex-direction:column;gap:5px;border-radius:12px;font-size:9px;text-align:center; }
    .profile .profile-action i { font-size:14px; }
    .profile .st.bx .stt { min-height:58px;align-items:center;padding:10px 0; }
    .profile .st.bx .stt h3 { font-size:12px; }
    .profile .st.bx .stt p.desc { font-size:9px!important;line-height:1.4; }
    .profile .st.bx .stt .check { width:48px;height:28px; }
    .profile .st.bx .stt .check div { width:22px;height:22px; }
    .profile .st.bx .stt .check[data-check="true"] div { transform:translateX(20px); }

    .profile .achievements-head { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
    .profile .achievements-head > div:first-child { grid-column:1/-1; }
    .profile .achievement-score { min-width:0;padding:10px;border:1px solid rgba(255,255,255,.055);border-radius:12px;background:rgba(255,255,255,.025); }
    .profile .achievement-score strong { font-size:18px; }
    .profile .achievement-card { padding:13px;gap:10px;border-radius:15px; }
    .profile .achievement-icon { width:40px;height:40px;flex-basis:40px; }
    .profile .achievement-title h3 { font-size:12px; }
    .profile .achievement-copy p { font-size:10px;line-height:1.4; }
    .achievement-shop { padding:14px!important; }
    .achievement-shop-head { flex-direction:column;gap:12px; }
    .achievement-shop-head h3 { font-size:18px; }
    .achievement-wallet { width:100%;min-width:0;text-align:left; }
    .achievement-vault-grid { grid-template-columns:1fr; }
    .achievement-vault-item { grid-template-columns:40px minmax(0,1fr) auto;padding:10px;gap:8px; }

    .journey-hero { align-items:flex-start;flex-direction:column; }
    .journey-hero h2 { font-size:19px; }
    .onboarding-steps > div { min-height:44px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;justify-items:start;text-align:left; }

    .profile .affiliate-invite { padding:14px; }
    .profile .affiliate-invite-fields { gap:10px; }
    .profile .affiliate-inline { display:grid;grid-template-columns:1fr auto; }
    .profile .affiliate-inline input { min-width:0;flex-basis:auto; }
    .profile .affiliate-inline .site-button { min-width:76px;min-height:44px; }
    .profile .tab .aff2 { grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }

    /* Convert wide account tables to readable cards using labels populated by
       enhanceProfileMobileTables(). */
    .profile .table-container { overflow:visible;border:0;background:transparent; }
    .profile .table-container .table-header { display:none; }
    .profile .table-container .table-body,.profile .table-container .table-footer { display:grid;gap:8px; }
    .profile .table-container .table-row,
    .profile .tab.affiliates .list .table-row,
    .profile .tab.stats-tab .table-row,
    .profile .tab.stats-tab .width-6:last-child .table-row {
        min-width:0!important;padding:10px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:0;border:1px solid rgba(255,255,255,.065);border-radius:14px;background:rgba(255,255,255,.028);
    }
    .profile .table-container .table-column { min-width:0;padding:7px 8px!important;display:flex;flex-direction:column;gap:3px;font-size:10px!important;line-height:1.35;overflow-wrap:anywhere; }
    .profile .table-container .table-column::before { content:attr(data-profile-label);color:#716976;font-size:7px;font-weight:850;letter-spacing:.08em;text-transform:uppercase; }
    .profile .table-container .table-row > .table-column:only-child { grid-column:1/-1; }
    .profile .table-footer .table-row { border-color:rgba(170,100,225,.22);background:rgba(139,72,191,.08); }}

@media (prefers-reduced-motion:reduce) {
    .profile .tab[data-active="true"] { animation:none!important; }
    .profile .menu button { scroll-behavior:auto; }}
