@import "achievement-picker-y1uhtHu.css";
.profile-page {
    container: profile / inline-size;
    font-size: var(--text-base);
}

.profile-header {
    overflow: hidden;
    border-radius: 0 0 var(--radius-small) var(--radius-small);
}

.profile-banner {
    display: block;
    width: 100%;
    height: clamp(190px, 18cqw, 240px);
    object-fit: cover;
    object-position: center;
}

.profile-identity {
    position: relative;
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr) auto;
    column-gap: 22px;
    row-gap: 7px;
    align-items: start;
    margin-top: -42px;
    padding: 18px 22px 16px;
    background: var(--surface);
}

.profile-portrait {
    position: relative;
    grid-row: 1 / 3;
    width: 152px;
    margin-top: -58px;
}

.profile-portrait>.avatar {
    display: block;
    width: 152px;
    height: 152px;
    border-width: 5px;
}

.profile-portrait-sprout {
    position: absolute;
    width: 48px;
    height: 48px;
    right: 0;
    bottom: 0;
    object-fit: contain;
}

.profile-name {
    grid-column: 2 / -1;
    min-width: 0;
}

.profile-name h1 {
    font-size: var(--text-title);
    margin: 0 0 2px;
}

.profile-bio {
    grid-column: 2;
    min-width: 0;
}

.profile-bio h2 {
    font-size: var(--text-section);
    margin: 0 0 5px;
}

.profile-bio p {
    margin: 0 0 6px;
    line-height: 1.4;
    color: var(--muted);
    white-space: pre-line;
}

.profile-counts {
    color: var(--muted);
    font-size: var(--text-small);
}

.profile-counts>span {
    margin: 0 7px;
}

.profile-actions {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.profile-actions .icon-button {
    border: 1px solid var(--line-strong);
}

.profile-header .tabs {
    padding: 0 16px;
    gap: 18px;
    border-bottom: 0;
    font-size: var(--text-base);
    scrollbar-width: thin;
}

.profile-header .tabs>a {
    padding: 12px 10px 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.67fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 14px;
    align-items: start;
}

.profile-main {
    min-width: 0;
    overflow: hidden;
}

.profile-main > .post-composer {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.profile-main>.book-grid {
    padding: 16px;
}

.profile-main .post {
    margin: 0 20px;
    padding: 16px 0;
}

@container profile (max-width: 1000px) {
    .profile-identity {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 8px 20px;
    }
    .profile-portrait, .profile-portrait>.avatar {
        width: 140px;
        height: 140px;
    }
    .profile-actions {
        grid-column: 2;
        grid-row: 3;
        justify-content: flex-start;
        margin-top: 5px;
    }
    .profile-header .tabs {
        gap: 8px;
    }
}

@container profile (max-width: 680px) {
    .profile-banner {
        height: 170px;
        object-position: 42% center;
    }
    .profile-identity {
        grid-template-columns: 88px minmax(0, 1fr);
        padding: 12px 14px 14px;
        margin-top: -24px;
        gap: 12px;
    }
    .profile-portrait {
        grid-row: 1;
        margin-top: -38px;
    }
    .profile-portrait, .profile-portrait>.avatar {
        width: 88px;
        height: 88px;
    }
    .profile-portrait-sprout {
        width: 24px;
        height: 24px;
    }
    .profile-name h1 {
        font-size: var(--text-title);
    }
    .profile-bio, .profile-actions {
        grid-column: 1 / -1;
    }
    .profile-bio h2 {
        font-size: var(--text-section);
    }
    .profile-actions {
        grid-row: auto;
        gap: 8px;
    }
    .profile-header .tabs {
        gap: 4px;
        padding: 0 6px;
    }
    .profile-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .profile-main .post {
        margin: 0 14px;
    }
}

@media(max-width: 760px) {
    .profile-page { padding: 0 10px 30px; }
}

.studio-journal { max-width: 520px; }
.studio-journal form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; clear: both; }
.studio-journal .icon-catalog { margin-block: 4px; }
.studio-journal .studio-dialog-actions { margin-top: 0; }

.profile-main > .module-heading { grid-template-columns: auto minmax(0, 1fr); }
.studio-journal form > label { margin-bottom: 0; }
