.profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: stretch;
    margin-bottom: 1rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(ellipse 55% 60% at 22% 78%, rgba(var(--bs-primary-rgb, 13, 110, 253), .45) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 100% 0%, rgba(255, 255, 255, .07) 0%, transparent 60%),
        linear-gradient(155deg, #1d2130 0%, #0c0e15 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.profile-hero-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 440px;
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-hero-stage::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 7%;
    width: 62%;
    height: 9%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55) 0%, transparent 70%);
    border-radius: 50%;
}

.profile-hero-stage canvas {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--bs-border-radius, .375rem);
    cursor: grab;
}

.profile-hero-stage canvas:active {
    cursor: grabbing;
}

.profile-hero-stage.character-viewer-live {
    display: block;
    height: 440px;
}

.profile-hero-portrait {
    position: relative;
    width: 132px;
    height: 132px;
    object-fit: contain;
    border-radius: var(--bs-border-radius, .375rem);
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .5));
}

.profile-hero-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    min-width: 0;
    padding: 2rem 2.25rem 2rem 1rem;
}

.profile-hero-class {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.profile-hero-identity {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
    margin-top: -.5rem;
}

.profile-hero-avatar {
    flex-shrink: 0;
    object-fit: contain;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-hero .profile-hero-name {
    margin: 0;
    padding: 0;
    font-size: clamp(1.8rem, 3.4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
    overflow-wrap: anywhere;
    border: 0;
}

.profile-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.profile-hero-tags:empty {
    display: none;
}

.profile-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
}

.profile-hero-tag.is-online {
    color: #7ef0a8;
    background: rgba(46, 204, 113, .14);
    border-color: rgba(46, 204, 113, .4);
}

.profile-hero-tag.is-online::before {
    content: '';
    width: .45rem;
    height: .45rem;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, .25);
}

.profile-hero-tag.is-hero {
    color: #8fd3ff;
    background: rgba(52, 152, 219, .16);
    border-color: rgba(52, 152, 219, .45);
}

.profile-hero-tag.is-pk {
    color: #ff9c9c;
    background: rgba(231, 76, 60, .16);
    border-color: rgba(231, 76, 60, .45);
}

a.profile-hero-tag.is-guild:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.profile-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: .6rem;
}

.profile-hero-stat {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
    padding: .7rem .85rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-hero-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    overflow-wrap: break-word;
}

.profile-hero-stat-label {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.profile-hero-vitals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem 1.25rem;
}

.profile-hero-vital-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .3rem;
}

.profile-hero-vital-label {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .75);
}

.profile-hero-vital-text {
    font-size: .7rem;
    color: rgba(255, 255, 255, .55);
}

.profile-meter {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    appearance: none;
    background: rgba(255, 255, 255, .1);
    border: 0;
    border-radius: 999px;
}

.profile-meter::-webkit-progress-bar {
    background: transparent;
}

.profile-meter::-webkit-progress-value {
    background: var(--profile-meter, var(--bs-primary, #0d6efd));
    border-radius: 999px;
}

.profile-meter::-moz-progress-bar {
    background: var(--profile-meter, var(--bs-primary, #0d6efd));
    border-radius: 999px;
}

.profile-meter.is-life {
    --profile-meter: linear-gradient(90deg, #e74c3c, #ff7a66);
}

.profile-meter.is-mana {
    --profile-meter: linear-gradient(90deg, #2f80ed, #56ccf2);
}

.profile-block {
    margin-bottom: 1.25rem;
}

.profile-block-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .75rem;
}

.profile-block-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
    color: var(--bs-primary, #0d6efd);
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), .1);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-block .profile-block-title {
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: none;
    border: 0;
}

.profile-block-chip {
    margin-left: auto;
    padding: .25rem .7rem;
    white-space: nowrap;
    font-size: .72rem;
    font-weight: 700;
    color: var(--bs-primary, #0d6efd);
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), .1);
    border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), .25);
    border-radius: 999px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .75rem;
}

.profile-stat {
    --tone: var(--bs-primary-rgb, 13, 110, 253);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 1rem 1.1rem 1.05rem;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.profile-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.profile-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.4rem;
    color: rgb(var(--tone));
    background: rgba(var(--tone), .1);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-stat-abbr {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .5;
}

.profile-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
}

.profile-stat-label {
    margin-top: -.3rem;
    font-size: .76rem;
    opacity: .65;
}

.profile-meter.is-attribute {
    height: 5px;
    background: rgba(128, 128, 128, .16);
}

.profile-meter.is-attribute::-webkit-progress-value {
    background: rgb(var(--tone));
}

.profile-meter.is-attribute::-moz-progress-bar {
    background: rgb(var(--tone));
}

.profile-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.profile-columns.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.profile-showcase {
    position: relative;
    padding: 1.25rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(ellipse 70% 60% at 0% 0%, rgba(var(--bs-primary-rgb, 13, 110, 253), .28) 0%, transparent 65%),
        linear-gradient(155deg, #1d2130 0%, #0c0e15 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

.profile-showcase .profile-block-title {
    color: #fff;
}

.profile-showcase .profile-block-icon {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.profile-inventory {
    display: flex;
    justify-content: center;
    padding: .25rem;
    overflow-x: auto;
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-guild-card {
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.profile-guild-card-banner {
    position: relative;
    height: 84px;
    background:
        radial-gradient(ellipse 60% 120% at 100% 0%, rgba(var(--bs-primary-rgb, 13, 110, 253), .45) 0%, transparent 65%),
        linear-gradient(155deg, #1d2130 0%, #0c0e15 100%);
    border-radius: var(--bs-border-radius, .375rem) var(--bs-border-radius, .375rem) 0 0;
}

.profile-guild-card-label {
    position: absolute;
    top: .7rem;
    left: 1rem;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
}

.profile-guild-card-body {
    padding: 0 1.1rem 1.1rem;
}

.profile-guild-card-logo {
    position: relative;
    display: inline-block;
    margin-top: -34px;
    line-height: 0;
    overflow: hidden;
    background: #14161d;
    border: 3px solid var(--bs-body-bg, #fff);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.profile-guild-card-logo svg {
    display: block;
}

.profile-guild-card-name {
    display: block;
    margin-top: .5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-guild-card-name:hover {
    color: var(--bs-primary, #0d6efd);
}

.profile-guild-card-master {
    font-size: .8rem;
    opacity: .75;
}

.profile-guild-card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin-top: .9rem;
}

.profile-guild-card-stat {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .6rem .8rem;
    background: rgba(128, 128, 128, .07);
    border: 1px solid rgba(128, 128, 128, .16);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-guild-card-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.15;
}

.profile-guild-card-stat-label {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .6;
}

.profile-columns {
    margin-bottom: 1.25rem;
}

.profile-columns > .profile-block {
    margin-bottom: 0;
}

.profile-block:last-child {
    margin-bottom: 0;
}

.profile-trophies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .75rem;
}

.profile-trophy {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
    padding: .8rem .95rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.profile-trophy-medal {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    background:
        radial-gradient(circle at 30% 25%, rgba(var(--bs-primary-rgb, 13, 110, 253), .55) 0%, transparent 70%),
        linear-gradient(155deg, #1d2130 0%, #0c0e15 100%);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bs-body-bg, #fff), 0 0 0 4px rgba(var(--bs-primary-rgb, 13, 110, 253), .35);
}

.profile-trophy-image {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-trophy-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.75rem;
    color: #fff;
}

.profile-trophy-body {
    flex: 1;
    min-width: 0;
}

.profile-trophy-name {
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-trophy-date {
    margin-top: .15rem;
    font-size: .72rem;
    opacity: .6;
}

.profile-market .section-carousel-footer {
    margin-top: 1rem;
}

.profile-hero.is-guild {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
}

.profile-hero.is-guild .profile-hero-stage {
    min-height: 320px;
}

.profile-hero.is-guild .profile-hero-stage::before {
    bottom: 12%;
}

.profile-hero-emblem {
    position: relative;
    line-height: 0;
    overflow: hidden;
    background: #14161d;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 6px rgba(255, 255, 255, .04);
}

.profile-hero-emblem svg {
    display: block;
}

.profile-hero-master {
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
}

.profile-hero-master a {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.profile-hero-master a:hover {
    text-decoration: underline;
}

.profile-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: .75rem;
}

.profile-member-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
    padding: .8rem .95rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.profile-member-card-avatar {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bs-primary, #0d6efd);
    object-fit: cover;
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), .1);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-member-card.is-online .profile-member-card-avatar {
    box-shadow: 0 0 0 2px var(--bs-body-bg, #fff), 0 0 0 4px #2ecc71;
}

.profile-member-card-body {
    flex: 1;
    min-width: 0;
}

.profile-member-card-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    font-weight: 800;
}

.profile-member-card-name a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-member-card-name a:hover {
    color: var(--bs-primary, #0d6efd);
}

.profile-member-card-role {
    padding: .1rem .5rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bs-primary, #0d6efd);
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), .1);
    border-radius: 999px;
}

.profile-member-card-class {
    font-size: .78rem;
    opacity: .65;
}

.profile-member-card-chips {
    display: flex;
    gap: .4rem;
}

.profile-member-card-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    padding: .3rem .5rem;
    background: rgba(128, 128, 128, .07);
    border: 1px solid rgba(128, 128, 128, .16);
    border-radius: var(--bs-border-radius, .375rem);
}

.profile-member-card-chip-value {
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.15;
}

.profile-member-card-chip-label {
    font-size: .54rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .6;
}

@media (max-width: 991px) {
    .profile-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-hero-stage,
    .profile-hero-stage.character-viewer-live {
        min-height: 360px;
        height: 360px;
    }

    .profile-hero-info {
        padding: 0 1.25rem 1.5rem;
    }

    .profile-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-hero.is-guild {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-hero.is-guild .profile-hero-stage {
        min-height: 260px;
        height: 260px;
    }

    .profile-members {
        grid-template-columns: minmax(0, 1fr);
    }
}
