.profile-page {
    --canvas: #100e10;
    --surface: #1b1618;
    --raised: #282024;
    --line: #4b3129;
    --ink: #fff2eb;
    --muted: #c9b2a6;
    --accent: #ff9759;
    background: radial-gradient(ellipse at 76% 12%, #332019 0, transparent 40%),
        repeating-linear-gradient(125deg, transparent 0 340px, #f8844720 341px 342px, transparent 343px 388px),
        var(--canvas);
}
.profile-page .shell { width: min(1320px, calc(100% - 48px)); }
.profile-page main { padding-block: clamp(24px, 4vw, 46px) 48px; }
.profile-page main > h1 {
    text-align: center;
    font-size: clamp(31px, 4.4vw, 52px);
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff2e9, #ff8b4a 77%);
    background-clip: text;
    color: transparent;
}
.profile-page main > h1::after {
    display: block;
    width: min(60%, 210px);
    height: 2px;
    margin: 13px auto 26px;
    background: linear-gradient(90deg, transparent, #fe8d50, transparent);
    content: "";
}
.profile-columns {
    display: grid;
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.16fr) minmax(0, .96fr);
    grid-template-areas: "overview center side";
    align-items: start;
    gap: 18px;
}
.profile-center, .profile-overview, .profile-side { display: grid; min-width: 0; gap: 18px; }
.profile-center { grid-area: center; }
.profile-overview { grid-area: overview; }
.profile-side { grid-area: side; }
.profile-card {
    min-width: 0;
    padding: clamp(15px, 2vw, 23px);
    border: 1px solid var(--line);
    border-radius: 21px;
    background: radial-gradient(ellipse at 96% 0, #39231e 0, transparent 65%), #151315;
}
.profile-card[id] { scroll-margin-top: 14px; }
.profile-card h2 { font-size: clamp(17px, 1.5vw, 22px); }
.profile-card .lead, .profile-card .notice { font-size: 14px; }
.profile-identity-top, .profile-compact-actions { display: flex; align-items: center; gap: 7px; }
.profile-identity-top { justify-content: space-between; flex-wrap: wrap; }
.profile-identity-top h2 { overflow-wrap: anywhere; }
.profile-compact-actions :is(a, button) { padding: 7px 10px; border-radius: 20px; font-size: 12px; }
.profile-logout {
    color: #ffe9e2;
    border-color: #967067;
    background: linear-gradient(140deg, #9a3832, #682625);
}
.profile-avatar {
    display: grid;
    place-items: center;
    width: 139px;
    aspect-ratio: 1;
    margin: 26px auto;
    border: 3px solid #ff9355;
    border-radius: 50%;
    background: radial-gradient(ellipse at 40% 35%, #452c32, #201722 68%);
    box-shadow: 0 0 0 8px #f5804330, 0 12px 36px #0b060ab0;
}
.profile-avatar img, .profile-stats h2 img, .profile-metrics > div:nth-child(-n+2) img {
    object-fit: contain;
    filter: sepia(1) saturate(2.3) hue-rotate(329deg);
}
.profile-wide-action { width: 100%; font-size: 14px; background: #282024; }
.profile-identity .form-status:not(:empty) { margin-top: 9px; }
.profile-stats h2 { display: flex; align-items: center; gap: 9px; }
.profile-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 18px 0 15px;
}
.profile-metrics > div {
    display: grid;
    grid-template-areas: "icon" "count" "label";
    place-items: center;
    gap: 5px;
    min-width: 0;
    padding: 10px 3px;
    border: 1px solid #432e29;
    border-radius: 13px;
    background: #191518;
}
.profile-metrics img { grid-area: icon; object-fit: contain; }
.profile-metrics dd { grid-area: count; margin: 0; color: var(--ink); font-size: 23px; font-weight: 820; }
.profile-metrics dt { grid-area: label; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.profile-inventory-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid #4b3028;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}
.profile-inventory-link strong, .profile-reward p { color: var(--accent); }
.profile-inventory-link:hover { border-color: var(--accent); color: var(--ink); }
.profile-reward, .profile-balance { display: flex; gap: 14px; align-items: center; }
.profile-reward { margin-top: 13px; }
.profile-reward img, .profile-balance img { object-fit: contain; flex-shrink: 0; }
.profile-balance {
    padding: 12px;
    border: 1px solid #4b302b;
    border-radius: 13px;
    background: #1e181b;
}
.profile-balance h2 { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.profile-balance strong { font-size: clamp(18px, 2.3vw, 25px); font-weight: 820; overflow-wrap: anywhere; }
.profile-subscription {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 8px;
    row-gap: 7px;
}
.profile-subscription .profile-crown {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: clamp(52px, 7vw, 97px);
    height: auto;
}
.profile-subscription .profile-plan-name { font-size: 18px; }
.profile-subscription .profile-wide-action { grid-column: 1 / -1; margin-top: 9px; }
.profile-security .form { margin-top: 15px; padding: 0; border: 0; background: none; }
.profile-security h3 { font-size: 14px; }
.profile-security label { font-size: 13px; }
.profile-page :is(input[type="password"], input[type="number"], select) { background: #171217; }
.profile-page .card { background: #21191d; }

@media (max-width: 1020px) {
    .profile-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "center overview" "center side";
    }
}
@media (max-width: 700px) {
    .profile-page .shell { width: calc(100% - 24px); }
    .profile-columns {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "center" "overview" "side";
    }
    .profile-columns, .profile-center, .profile-overview, .profile-side { gap: 12px; }
}
