.theme-user-shell.theme-page-shell-single {
    width: 100%;
    overflow: hidden;
    padding: 0;
}

html:has(.theme-user-shell),
body:has(.theme-user-shell) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body:has(.theme-user-shell) .site-header {
    position: fixed;
    left: 50%;
    background: transparent;
    box-shadow: var(--shadow-soft);
    margin-top: 0;
    transform: translateX(-50%);
    transition:
        background-color 220ms ease,
        box-shadow 220ms ease;
}

body:has(.theme-user-main.is-showing-topics) .site-header {
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

body:has(.theme-user-shell) > .site-footer {
    display: none;
}

.theme-user-main {
    display: grid;
    width: 200vw;
    height: 100svh;
    grid-template-columns: 100vw 100vw;
    overflow: hidden;
    transform: translateX(0);
    transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-user-main.is-showing-topics {
    transform: translateX(-100vw);
}

.theme-user-card {
    position: relative;
    display: grid;
    min-height: 100svh;
    overflow: hidden;
    border-radius: 0;
    background: var(--color-surface-strong);
    box-shadow: var(--shadow-soft);
}

.theme-user-cover {
    position: absolute;
    inset: 0;
    background:
        url("../images/bj.png") center / cover no-repeat,
        var(--color-surface);
}

.theme-user-cover-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-user-card-inner {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: inherit;
    align-items: end;
    grid-template-rows: minmax(0, 1fr);
    padding: clamp(76px, 9vw, 118px) clamp(18px, 5vw, 56px) clamp(18px, 3vw, 34px);
}

.theme-user-avatar {
    display: inline-flex;
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid rgb(255 255 255 / 72%);
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    color: var(--color-ink);
    box-shadow: 0 10px 28px rgb(0 0 0 / 22%);
}

.theme-user-avatar-media {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    color: var(--color-ink);
    font-size: 28px;
    font-weight: 500;
    object-fit: cover;
}

.theme-user-name-row {
    display: grid;
    min-width: 0;
    align-content: center;
    gap: 7px;
}

.theme-user-name-title {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.theme-user-name-row h1 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-user-uid {
    display: block;
    max-width: 100%;
    overflow: hidden;
    background: transparent;
    color: rgb(255 255 255 / 86%);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-user-bio {
    display: -webkit-box;
    overflow: hidden;
    max-width: 720px;
    margin: 0;
    color: rgb(255 255 255 / 76%);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.profile-links {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-link {
    display: inline-flex;
    min-width: 0;
    max-width: 180px;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-pill);
    background: var(--color-canvas-soft);
    color: var(--color-body);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.profile-link:hover {
    background: color-mix(in srgb, var(--color-ink) 9%, var(--color-canvas-soft));
    color: var(--color-ink);
}

.profile-link-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    object-fit: contain;
    opacity: 0.72;
}

.profile-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-user-links {
    max-width: min(520px, 100%);
    margin: 0;
}

.theme-user-links .profile-link {
    width: 34px;
    height: 34px;
    min-height: 34px;
    justify-content: center;
    gap: 0;
    background: transparent;
    padding: 0;
}

.theme-user-links .profile-link:hover {
    background: transparent;
}

.theme-user-links .profile-link-text-only {
    width: auto;
    max-width: 128px;
    padding: 0 10px;
}

.theme-user-links .profile-link-icon {
    width: 20px;
    height: 20px;
    opacity: 0.82;
}

.theme-user-links .profile-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.theme-user-links .profile-link-text-only span {
    position: static;
    width: auto;
    height: auto;
    min-width: 0;
    overflow: hidden;
    clip: auto;
    text-overflow: ellipsis;
}

.theme-user-stats {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 12px;
}

.theme-user-stats span {
    display: inline-flex;
    min-height: 0;
    align-items: center;
    gap: 4px;
    color: rgb(255 255 255 / 68%);
    padding: 0;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

.theme-user-stat-form {
    display: inline-flex;
    margin: 0;
}

.theme-user-stat-action,
.theme-user-stat-report .report-popover-trigger {
    display: inline-flex;
    min-height: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgb(255 255 255 / 68%);
    padding: 0;
    font: inherit;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.theme-user-stat-action:hover,
.theme-user-stat-report .report-popover-trigger:hover,
.theme-user-stat-report[open] .report-popover-trigger {
    color: #fff;
}

.theme-user-stats strong {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.theme-user-stats small {
    color: rgb(255 255 255 / 68%);
    font-size: 11px;
}

.theme-user-card-footer {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.theme-user-footer-left {
    display: grid;
    min-width: 0;
    align-items: end;
    justify-items: start;
    gap: 10px;
}

.theme-user-identity {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.theme-user-footer-left .theme-user-links {
    max-width: min(520px, 100%);
}

.theme-user-card-side {
    display: grid;
    min-width: 0;
    align-items: end;
    justify-items: end;
    gap: 10px;
    margin-left: auto;
}

.theme-user-stat-report .report-popover-panel {
    position: absolute;
    top: auto;
    right: 0;
    bottom: calc(100% + 8px);
    left: auto;
    width: min(320px, calc(100vw - 24px));
    color: var(--color-body);
    text-align: left;
}

.theme-user-topic-section {
    box-sizing: border-box;
    width: 100vw;
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 168px max(20px, calc((100vw - var(--theme-page-wide-width)) / 2)) 72px;
}

.theme-user-topic-section .site-footer {
    width: 100%;
    margin: 0;
    padding: 32px 0 0;
}

.profile-cover-editor,
.profile-link-editor {
    display: grid;
    gap: 12px;
}

.form-card:has(.profile-cover-editor),
.form-card:has(.profile-link-editor) {
    overflow: visible;
}

.profile-cooldown-status {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
    border: 1px solid var(--color-hairline);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--color-surface) 88%, var(--color-canvas-soft));
    color: var(--color-body);
    padding: 14px 16px;
}

.profile-cooldown-status strong {
    color: var(--color-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.profile-cooldown-status span {
    font-size: 13px;
    line-height: 1.5;
}

.profile-cooldown-status.is-locked {
    border-color: color-mix(in srgb, var(--color-ink) 18%, var(--color-hairline));
}

.form-card .button-primary:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.profile-cover-editor-head,
.profile-link-editor-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.profile-cover-editor-head h2,
.profile-cover-editor-head p,
.profile-link-editor-head h2,
.profile-link-editor-head p {
    margin: 0;
}

.profile-cover-editor-head h2,
.profile-link-editor-head h2 {
    color: var(--color-ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.profile-cover-editor-head p,
.profile-link-editor-head p {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.5;
}

.profile-cover-grid {
    display: grid;
    grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.15fr) minmax(220px, 1.15fr);
    align-items: start;
    gap: 10px;
}

.profile-cover-grid label {
    margin-bottom: 0;
}

.profile-cover-grid input,
.profile-cover-grid select {
    min-height: 40px;
    padding: 10px 12px;
}

.profile-link-list {
    display: grid;
    gap: 10px;
}

.profile-link-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.7fr) minmax(220px, 1.4fr) 56px auto;
    align-items: start;
    gap: 10px;
}

.profile-link-row label {
    margin-bottom: 0;
}

.profile-link-row input {
    min-height: 40px;
    padding: 10px 12px;
}

.profile-link-review-status {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-link-icon-picker {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.profile-link-icon-picker-label {
    color: var(--color-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.profile-link-icon-select {
    position: relative;
}

.profile-link-icon-select:has(.profile-link-icon-trigger[aria-expanded="true"]) {
    z-index: 30;
}

.profile-link-icon-trigger {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-canvas-soft);
    color: var(--color-ink);
    cursor: pointer;
    padding: 0;
}

.profile-link-icon-trigger:hover,
.profile-link-icon-trigger[aria-expanded="true"] {
    background: color-mix(in srgb, var(--color-ink) 8%, var(--color-canvas-soft));
}

.profile-link-icon-trigger img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.78;
}

.profile-link-icon-empty {
    display: inline-flex;
    position: static;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    overflow: visible;
    clip: auto;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.profile-link-icon-empty[hidden] {
    display: none;
}

.profile-link-icon-current-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.profile-link-icon-options {
    display: grid;
    position: absolute;
    z-index: 20;
    bottom: calc(100% + 6px);
    right: 0;
    grid-template-columns: repeat(4, 36px);
    width: max-content;
    max-width: min(168px, calc(100vw - 32px));
    gap: 6px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: 8px;
    box-shadow: var(--shadow-soft);
}

.profile-link-icon-options[hidden] {
    display: none;
}

.profile-link-icon-option {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-body);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 0;
}

.profile-link-icon-option:hover {
    background: color-mix(in srgb, var(--color-ink) 8%, var(--color-canvas-soft));
    color: var(--color-ink);
}

.profile-link-icon-option.is-selected {
    background: color-mix(in srgb, var(--color-ink) 6%, var(--color-surface));
    color: var(--color-ink);
}

.profile-link-icon-option img {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    object-fit: contain;
    opacity: 0.72;
}

.profile-link-icon-option.is-selected img {
    opacity: 0.9;
}

.profile-link-icon-option span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.profile-link-icon-option .profile-link-icon-empty {
    width: 17px;
    height: 17px;
}

.profile-link-remove {
    min-height: 40px;
    align-self: end;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .theme-user-topic-section {
        padding: 124px 4px 48px;
    }

    .theme-user-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-user-footer-left {
        width: 100%;
    }

    .theme-user-card-side {
        width: 100%;
        align-items: start;
        justify-items: start;
        margin-left: 0;
    }

    .theme-user-links {
        max-width: 100%;
    }

    .theme-user-stats {
        justify-content: flex-start;
    }

    .profile-cover-grid,
    .profile-link-row {
        grid-template-columns: minmax(110px, 0.8fr) minmax(200px, 1.2fr);
    }

    .profile-link-remove {
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .theme-user-shell.theme-page-shell-single {
        width: 100%;
    }

    .theme-user-card {
        min-height: 100svh;
    }

    .theme-user-card-inner {
        gap: 18px;
        padding: 18px;
        padding-bottom: 8px;
    }

    .theme-user-avatar {
        width: 72px;
        height: 72px;
    }

    .theme-user-name-row h1 {
        width: 100%;
        font-size: 26px;
    }

    .theme-user-name-title {
        gap: 6px;
    }

    .profile-cover-editor-head,
    .profile-cover-grid,
    .profile-link-editor-head,
    .profile-link-row {
        grid-template-columns: 1fr;
    }

    .profile-cover-editor-head,
    .profile-link-editor-head {
        display: grid;
    }
}
