.public-profile-page-main {
    align-items: flex-start;
}

.public-profile-shell {
    display: grid;
    width: min(100%, 1120px);
    min-width: 0;
    gap: 32px;
    margin-inline: auto;
}

.public-profile-upper {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 24px;
    min-width: 0;
}

.public-profile-card {
    padding: 32px;
}

.public-profile-panel,
.public-profile-bench,
.public-wall {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.public-profile-panel {
    align-self: start;
}

.public-profile-card .profile-picture-area {
    margin-top: 0;
}

.public-profile-card h1 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    margin: 16px 0 0;
    overflow-wrap: anywhere;
}

.public-profile-card .public-profile-closure-notice {
    width: min(100%, 360px);
    margin: 16px auto 0;
    padding: 16px;
    border-inline-start: 4px solid var(--accent);
    background: var(--bg-dark);
    color: var(--muted-dark);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

body.light-mode .public-profile-closure-notice {
    border-inline-start-color: var(--accent-light);
    background: var(--bg-light);
    color: var(--muted-light);
}

.public-profile-card h2,
.public-profile-bench h2,
.public-profile-empty-state h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.public-profile-details {
    display: grid;
    width: min(100%, 360px);
    margin: 24px auto 0;
    gap: 8px;
}

.public-profile-detail {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px;
    text-align: left;
}

.public-profile-detail dt {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.public-profile-detail dd {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.public-profile-message-actions {
    display: grid;
    width: min(100%, 360px);
    margin: 24px auto 0;
    gap: 8px;
}

.public-profile-bio {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    text-align: left;
}

.public-profile-bio-text,
.public-profile-bio-empty {
    margin: 0;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

body.light-mode .public-profile-bio-text,
body.light-mode .public-profile-bio-empty {
    color: var(--text-light);
}

.public-profile-bio-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-profile-bio-controls form {
    margin: 0;
}

.public-profile-bio-clear,
.public-profile-bio-confirm {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--error-dark);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.public-profile-bio-clear {
    background: transparent;
    color: var(--error-dark);
}

.public-profile-bio-confirm {
    background: var(--error-dark);
    color: var(--bg-dark);
}

body.light-mode .public-profile-bio-clear,
body.light-mode .public-profile-bio-confirm {
    border-color: var(--error-light);
}

body.light-mode .public-profile-bio-clear {
    color: var(--error-light);
}

body.light-mode .public-profile-bio-confirm {
    background: var(--error-light);
    color: var(--surface-light);
}

.public-profile-bench {
    --public-profile-bench-summary-height: 44px;
    --public-profile-bench-content-gap: 16px;
    align-self: start;
    min-height: 0;
    padding: 32px;
    overflow: hidden;
}

.public-profile-bench summary {
    min-height: var(--public-profile-bench-summary-height);
    cursor: pointer;
}

.public-profile-bench summary h2 {
    display: inline;
    overflow-wrap: anywhere;
}

.public-profile-bench-content {
    min-height: 0;
    margin-top: var(--public-profile-bench-content-gap);
    overflow-y: auto;
}

.public-profile-bench-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-profile-bench-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border-dark);
    border-radius: 12px;
}

body.light-mode .public-profile-bench-item {
    border-color: var(--border-light);
}

.public-profile-bench-item-missing {
    border-inline-start: 3px solid var(--error-dark);
}

body.light-mode .public-profile-bench-item-missing {
    border-inline-start-color: var(--error-light);
}

.public-profile-bench-wireframe-band {
    display: grid;
    width: 100%;
    place-items: center;
    justify-self: center;
}

.public-profile-bench-wireframe-band img {
    display: block;
    width: 100%;
    height: auto;
}

.public-profile-bench-copy {
    display: grid;
    align-content: start;
    width: 100%;
    gap: 8px;
    min-width: 0;
    text-align: left;
    overflow-wrap: anywhere;
}

.public-profile-bench-copy time,
.public-profile-missing-ribbon {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.public-profile-missing-ribbon {
    margin: 0;
    color: var(--error-dark);
    text-align: left;
}

body.light-mode .public-profile-missing-ribbon {
    color: var(--error-light);
}

.public-profile-empty-state {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border-dark);
    border-radius: 12px;
}

body.light-mode .public-profile-empty-state {
    border-color: var(--border-light);
}

.public-profile-empty-state p {
    margin: 0;
    color: var(--muted-dark);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

body.light-mode .public-profile-empty-state p {
    color: var(--muted-light);
}

.public-profile-shell :is(a, button, input, summary, textarea):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

body.light-mode .public-profile-shell :is(a, button, input, summary, textarea):focus-visible {
    outline-color: var(--accent-light);
}

.public-profile-shell [hidden] {
    display: none !important;
}

.public-profile-message-action-form {
    display: grid;
    margin: 0;
}

.public-profile-message-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.public-profile-message-block,
.public-profile-message-block:visited {
    border: 1px solid var(--error-dark);
    background-color: transparent;
    color: var(--error-dark);
}

body.light-mode .public-profile-message-block,
body.light-mode .public-profile-message-block:visited {
    border-color: var(--error-light);
    color: var(--error-light);
}

.public-profile-message-unblock {
    border: 1px solid var(--border-dark);
    background-color: transparent;
    color: var(--text-dark);
}

body.light-mode .public-profile-message-unblock {
    border-color: var(--border-light);
    color: var(--text-light);
}

.public-profile-not-found h1 {
    margin: 0;
}

.public-profile-not-found-guidance {
    margin: 16px 0 0;
    color: var(--muted-dark);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

body.light-mode .public-profile-not-found-guidance {
    color: var(--muted-light);
}
