* {
    box-sizing: border-box;
}

:root {
    --profile-bg: #f7f5f1;
    --profile-surface: #ffffff;
    --profile-surface-soft: #fbfbfa;
    --profile-text: #181614;
    --profile-muted: #68625c;
    --profile-line: #dedbd6;
    --profile-accent: #6f2da8;
    --profile-accent-dark: #4d1f76;
    --profile-green: #2f7d6d;
    --profile-danger: #b42318;
    --profile-radius: 20px;
    --profile-shadow: 0 18px 48px rgba(24, 22, 20, .10);
}

body {
    margin: 0;
    background: var(--profile-bg);
    color: var(--profile-text);
    font-family: "Inter", Arial, sans-serif;
}

h1,
h2,
h3 {
    font-family: "DM Sans", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.profile-page {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 82px;
}

.profile-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--profile-muted);
    font-size: .92rem;
}

.profile-breadcrumb a {
    color: var(--profile-accent-dark);
    text-decoration: none;
    font-weight: 700;
}

.profile-alert {
    border-radius: var(--profile-radius);
    margin-bottom: 14px;
    padding: 13px 15px;
    font-weight: 700;
    border: 1px solid transparent;
}

.profile-alert--success {
    background: #edf8f4;
    border-color: #bfe5d8;
    color: #145c4c;
}

.profile-alert--error {
    background: #fff1f0;
    border-color: #ffc9c4;
    color: var(--profile-danger);
}

.profile-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(320px, calc(100% - 32px));
    border-radius: var(--profile-radius);
    padding: 12px 15px;
    background: #181614;
    color: #fff;
    box-shadow: 0 16px 34px rgba(24, 22, 20, .22);
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
}

.profile-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.profile-toast--error {
    background: var(--profile-danger);
}

.profile-hero {
    min-height: 330px;
    border-radius: 10px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .18), transparent 28%),
        linear-gradient(135deg, #25152f 0%, #4a255d 48%, #8a5d3b 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: var(--profile-shadow);
    overflow: hidden;
    position: relative;
}

.profile-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(19, 13, 24, .74), rgba(19, 13, 24, .32));
}

.profile-hero__content {
    position: relative;
    z-index: 1;
    min-height: 330px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 40px;
}

.profile-avatar {
    width: 138px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .9);
    background: #efe8f5;
    color: var(--profile-accent-dark);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
    font: 800 2rem "DM Sans", sans-serif;
    text-decoration: none;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-identity {
    min-width: 0;
}

.profile-identity h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 4.4rem);
    line-height: 1;
}

.profile-identity h1 a,
.profile-username a {
    color: inherit;
    text-decoration: none;
}

.profile-username {
    margin: 8px 0 12px;
    color: rgba(255, 255, 255, .82);
    font-weight: 700;
}

.profile-bio {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .9);
    line-height: 1.65;
}

.profile-tagline {
    color: #fff;
    font: 800 1rem "Inter", sans-serif;
    margin: 0 0 8px;
}

.profile-about-tagline {
    color: var(--profile-accent);
    display: block;
    margin-bottom: 10px;
}

.profile-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.profile-socials a {
    width: 38px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .18);
    transition: transform .18s ease, background .18s ease;
}

.profile-socials a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .24);
}

.profile-actions {
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

.profile-actions form {
    margin: 0;
}

.profile-btn {
    min-height: 42px;
    border: 1px solid var(--profile-line);
    border-radius: var(--profile-radius);
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: var(--profile-text);
    text-decoration: none;
    font: 800 .92rem "Inter", sans-serif;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.profile-btn:hover {
    transform: translateY(-1px);
    border-color: #c9c4bd;
}

.profile-btn:disabled {
    cursor: progress;
    opacity: .72;
    transform: none;
}

.profile-btn--primary {
    border-color: var(--profile-accent);
    background: var(--profile-accent);
    color: #fff;
}

.profile-btn--primary:hover {
    background: var(--profile-accent-dark);
    border-color: var(--profile-accent-dark);
}

.profile-btn--manage {
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.profile-btn--manage:hover {
    border-color: rgba(255, 255, 255, .68);
    background: rgba(255, 255, 255, .22);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 28px;
}

.profile-stats div,
.profile-panel,
.profile-tab-panel,
.profile-empty,
.profile-book-card,
.profile-feed-item {
    background: var(--profile-surface);
    border: 1px solid var(--profile-line);
    border-radius: var(--profile-radius);
}

.profile-stats div {
    padding: 18px 14px;
}

.profile-stats strong {
    display: block;
    font: 800 1.45rem "DM Sans", sans-serif;
}

.profile-stats span {
    display: block;
    margin-top: 4px;
    color: var(--profile-muted);
    font-size: .87rem;
}

.profile-panel,
.profile-tab-panel {
    padding: 24px;
    box-shadow: 0 8px 24px rgba(24, 22, 20, .05);
}

.profile-panel {
    margin-top: 18px;
}

.profile-panel__header {
    margin-bottom: 20px;
}

.profile-panel__header span {
    display: block;
    color: var(--profile-green);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    font-size: .76rem;
    margin-bottom: 6px;
}

.profile-panel__header h2 {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.profile-panel__header p {
    margin: 0;
    color: var(--profile-muted);
    line-height: 1.55;
}

.profile-form {
    display: grid;
    gap: 16px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-form label {
    display: grid;
    gap: 7px;
    color: var(--profile-text);
    font-weight: 800;
    font-size: .92rem;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    border: 1px solid #cbc7c1;
    border-radius: var(--profile-radius);
    background: var(--profile-surface-soft);
    color: var(--profile-text);
    font: 500 .96rem "Inter", sans-serif;
    padding: 12px 13px;
    outline: none;
}

.profile-form textarea {
    resize: vertical;
    min-height: 116px;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    border-color: var(--profile-accent);
    box-shadow: 0 0 0 3px rgba(111, 45, 168, .14);
    background: #fff;
}

.profile-form input[readonly] {
    color: var(--profile-muted);
    background: #eeeeec;
}

.profile-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px !important;
    color: var(--profile-muted) !important;
}

.profile-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--profile-accent);
}

.profile-security-note {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    background: #f0f8f5;
    border: 1px solid #c9e7dc;
    color: #155f50;
    border-radius: var(--profile-radius);
    padding: 13px 14px;
    line-height: 1.55;
    margin-bottom: 16px;
}

.profile-link-list,
.profile-contact-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.profile-link-list a,
.profile-contact-actions a {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--profile-line);
    border-radius: var(--profile-radius);
    text-decoration: none;
    font-weight: 900;
    background: var(--profile-surface-soft);
}

.profile-tabs {
    margin-top: 18px;
}

.profile-tab-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.profile-tab-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--profile-line);
    text-decoration: none;
    color: var(--profile-muted);
    font-weight: 900;
}

.profile-tab-nav a.is-active {
    background: var(--profile-text);
    border-color: var(--profile-text);
    color: #fff;
}

.profile-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.profile-book-card {
    overflow: hidden;
}

.profile-book-cover {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 4;
    background: #eeece8;
    text-decoration: none;
    color: var(--profile-accent-dark);
    font: 900 1.5rem "DM Sans", sans-serif;
}

.profile-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-book-card > div {
    padding: 13px;
}

.profile-book-card h3 {
    margin: 0 0 6px;
    line-height: 1.22;
    font-size: 1rem;
}

.profile-book-card h3 a {
    text-decoration: none;
}

.profile-book-card p {
    margin: 0 0 10px;
    color: var(--profile-muted);
    font-size: .9rem;
}

.profile-book-author-link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.profile-book-author-link:hover {
    color: var(--profile-accent);
}

.profile-chip {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 8px;
    background: #f1e8f8;
    color: var(--profile-accent-dark);
    font-size: .78rem;
    font-weight: 900;
}

.profile-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 28px;
    text-align: center;
}

.profile-empty i {
    font-size: 2rem;
    color: var(--profile-accent);
}

.profile-empty h3 {
    margin: 0;
}

.profile-empty p {
    max-width: 420px;
    margin: 0;
    color: var(--profile-muted);
    line-height: 1.55;
}

.profile-feed {
    display: grid;
    gap: 12px;
}

.profile-feed-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
}

.profile-feed-cover {
    width: 74px;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    overflow: hidden;
    background: #eeece8;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--profile-accent-dark);
}

.profile-feed-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-feed-item h3 {
    margin: 3px 0 6px;
}

.profile-feed-item h3 a {
    text-decoration: none;
}

.profile-feed-item p {
    margin: 0 0 8px;
    color: var(--profile-muted);
    line-height: 1.55;
}

.profile-feed-item time {
    color: var(--profile-muted);
    font-size: .85rem;
}

.profile-feed-item--community {
    display: block;
}

.profile-feed-post-header,
.profile-feed-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-feed-post-content {
    margin: 14px 0 0 !important;
    color: #312d39 !important;
    font-size: 1rem;
    line-height: 1.7 !important;
    overflow-wrap: anywhere;
}

.profile-feed-post-image {
    display: block;
    width: 100%;
    max-height: 560px;
    margin: 16px 0;
    border-radius: 16px;
    background: var(--profile-surface-soft);
    object-fit: cover;
}

.profile-feed-post-meta {
    justify-content: flex-start;
    padding-top: 13px;
    border-top: 1px solid rgba(24, 22, 20, .09);
    color: var(--profile-muted);
    font-size: .88rem;
}

.profile-feed-post-meta span,
.profile-feed-post-meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-feed-post-meta a {
    min-height: 34px;
    border-radius: 999px;
    padding: 0 10px;
    color: var(--profile-accent-dark);
    font-weight: 800;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.profile-feed-post-meta a:hover {
    background: rgba(111, 45, 168, .1);
    color: var(--profile-accent);
    transform: translateY(-1px);
}

.profile-feed-post-community-link {
    margin-left: auto;
}

.profile-feed-post-header {
    justify-content: initial;
}

.profile-feed-post-avatar {
    width: 46px;
    aspect-ratio: 1;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #efe5f8;
    color: var(--profile-accent-dark);
    box-shadow: 0 5px 12px rgba(58, 35, 75, .15);
    font-weight: 900;
    text-decoration: none;
}

.profile-feed-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-feed-post-identity {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.profile-feed-post-identity > a {
    overflow: hidden;
    color: var(--profile-text);
    font-weight: 900;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-feed-post-identity > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: var(--profile-muted);
    font-size: .8rem;
}

.profile-feed-post-identity > div span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-feed-post-open {
    width: 34px;
    aspect-ratio: 1;
    margin-left: auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(111, 45, 168, .07);
    color: var(--profile-accent);
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.profile-feed-post-open:hover {
    background: rgba(111, 45, 168, .15);
    transform: translateY(-1px);
}

.profile-rating {
    color: #a26200;
    letter-spacing: .05em;
}

.profile-page--public {
    max-width: 1140px;
}

.profile-hero--literary {
    min-height: 300px;
    margin-bottom: 0;
    border-radius: 10px;
}

.profile-hero--literary .profile-hero__content {
    min-height: 300px;
    align-items: center;
    padding: 42px 44px;
}

.profile-hero--literary .profile-avatar {
    width: 148px;
    align-self: center;
    transform: none;
}

.profile-hero--literary .profile-identity h1 {
    font-size: clamp(2.4rem, 4vw, 3.75rem);
    letter-spacing: 0;
}

.profile-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: rgba(255, 255, 255, .88);
    font-weight: 700;
}

.profile-meta-row span,
.profile-meta-row a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.profile-actions--public {
    align-self: center;
}

.profile-actions--public .profile-btn {
    min-width: 158px;
}

.profile-stats--public {
    width: min(720px, 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 26px auto 38px;
    padding: 0;
    border-bottom: 0;
}

.profile-stats--public div {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 16px 14px;
    background: linear-gradient(145deg, #fff, #fcfaff);
    border: 1px solid rgba(111, 45, 168, .13);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(60, 37, 75, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.profile-stats--public div:hover {
    border-color: rgba(111, 45, 168, .3);
    box-shadow: 0 12px 24px rgba(60, 37, 75, .08);
    transform: translateY(-2px);
}

.profile-stat-icon {
    margin-bottom: 2px;
    color: var(--profile-accent);
    font-size: 1.1rem;
}

.profile-stats--public strong {
    font-size: 1.55rem;
    line-height: 1.05;
}

.profile-stats--public span {
    text-align: center;
    font-size: .92rem;
    text-transform: none;
    letter-spacing: 0;
}

.profile-tabs--public {
    margin-top: 0;
}

.profile-tabs--public .profile-tab-nav {
    border-bottom: 1px solid rgba(24, 22, 20, .12);
    gap: 38px;
    padding-bottom: 0;
    scrollbar-width: thin;
}

.profile-tabs--public .profile-tab-nav a {
    gap: 8px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    padding: 15px 0 14px;
    color: var(--profile-muted);
    transition: color .18s ease, border-color .18s ease;
}

.profile-tabs--public .profile-tab-nav a:hover {
    color: var(--profile-text);
}

.profile-tabs--public .profile-tab-nav a.is-active {
    background: rgba(111, 45, 168, .07);
    border-color: var(--profile-accent);
    color: var(--profile-text);
    border-radius: 10px 10px 0 0;
}

.profile-tabs--public .profile-tab-panel {
    padding: 26px 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.profile-tabs--public .profile-empty {
    min-height: 260px;
    background: var(--profile-surface);
    border: 1px solid rgba(24, 22, 20, .10);
    box-shadow: 0 8px 24px rgba(24, 22, 20, .05);
}

.profile-tabs--public .profile-empty i {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(111, 45, 168, .10);
}

.profile-tabs--public .profile-feed {
    max-width: 820px;
    margin: 0 auto;
    gap: 14px;
}

.profile-tabs--public .profile-feed-item {
    background: var(--profile-surface);
    border: 1px solid rgba(24, 22, 20, .10);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(47, 27, 62, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.profile-tabs--public .profile-feed-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(47, 27, 62, .10);
}

.profile-tabs--public .profile-books-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px 18px;
}

.profile-tabs--public .profile-book-card {
    background: transparent;
    border: 0;
    border-radius: 0;
}

.profile-tabs--public .profile-book-cover {
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(24, 22, 20, .11);
    transition: transform .18s ease, box-shadow .18s ease;
}

.profile-tabs--public .profile-book-cover:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(24, 22, 20, .16);
}

.profile-tabs--public .profile-book-card > div {
    padding: 12px 0 0;
}

.profile-tabs--public .profile-chip {
    background: transparent;
    padding: 0;
    color: var(--profile-green);
}

.profile-feed-action {
    display: inline-flex;
    color: var(--profile-accent);
    font-weight: 900;
    font-size: .86rem;
    margin: 13px 0 0;
}

.profile-about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
}

.profile-about--public {
    max-width: 980px;
    margin: 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 34px;
}

.profile-about-section {
    border-bottom: 1px solid rgba(24, 22, 20, .10);
    padding: 24px 0;
}

.profile-about-section--intro,
.profile-about-section--wide {
    grid-column: 1 / -1;
}

.profile-about-section > span {
    display: block;
    margin-bottom: 7px;
    color: var(--profile-green);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-about h2 {
    margin-top: 0;
}

.profile-about h3 {
    margin: 0 0 14px;
}

.profile-about p {
    color: var(--profile-muted);
    line-height: 1.7;
}

.profile-about dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.profile-about dl div {
    border-bottom: 1px solid var(--profile-line);
    padding-bottom: 10px;
}

.profile-about--public dl div {
    border-bottom-color: rgba(24, 22, 20, .08);
}

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

.profile-about dt {
    color: var(--profile-muted);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.profile-about dd {
    margin: 4px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.profile-future-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-future-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 9px 12px;
    background: #f1e8f8;
    color: var(--profile-accent-dark);
    font-size: .88rem;
    font-weight: 900;
}

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

.profile-mini-list article {
    border: 1px solid var(--profile-line);
    border-radius: var(--profile-radius);
    padding: 12px;
    background: var(--profile-surface-soft);
}

.profile-mini-list strong,
.profile-mini-list span,
.profile-mini-list a {
    display: block;
}

.profile-mini-list span {
    color: var(--profile-muted);
    margin-top: 4px;
}

.profile-mini-list a {
    color: var(--profile-accent-dark);
    font-weight: 900;
    margin-top: 8px;
}

.profile-muted {
    color: var(--profile-muted);
}

.account-page {
    max-width: 1200px;
}

.account-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.account-sidebar {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 14px;
}

.account-card,
.account-nav {
    background: var(--profile-surface);
    border: 1px solid var(--profile-line);
    border-radius: var(--profile-radius);
    box-shadow: 0 8px 24px rgba(24, 22, 20, .05);
}

.account-card {
    padding: 18px;
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.account-card strong {
    font: 900 1.08rem "DM Sans", sans-serif;
}

.account-card span {
    color: var(--profile-muted);
    font-weight: 800;
}

.account-card a {
    margin-top: 4px;
    color: var(--profile-accent-dark);
    font-weight: 900;
    text-decoration: none;
}

.account-avatar {
    width: 86px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #f1e8f8;
    color: var(--profile-accent-dark);
    font: 900 1.3rem "DM Sans", sans-serif;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-nav {
    padding: 8px;
    display: grid;
    gap: 3px;
}

.account-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--profile-muted);
    text-decoration: none;
    font-weight: 900;
}

.account-nav a:hover,
.account-nav a.is-active {
    background: #f1e8f8;
    color: var(--profile-accent-dark);
}

.account-nav .account-nav__danger {
    color: var(--profile-danger);
}

.account-content > .profile-panel {
    margin-top: 0;
}

.account-media-actions {
    display: grid;
    gap: 8px;
    margin-top: -4px;
}

footer,
.footer,
#footer {
    background: #1a1423 !important;
    color: #fff !important;
}

@media (max-width: 920px) {
    .profile-hero__content {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .profile-actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }

    .profile-hero--literary .profile-avatar {
        transform: none;
    }

    .profile-stats--public {
        margin: 22px auto 30px;
    }

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

    .profile-about,
    .account-shell {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .account-nav {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 680px) {
    .profile-page {
        width: min(100% - 20px, 1180px);
        padding-top: 16px;
    }

    .profile-hero {
        min-height: 0;
    }

    .profile-hero__content {
        min-height: 0;
        padding: 24px;
        gap: 18px;
    }

    .profile-avatar {
        width: 104px;
    }

    .profile-identity h1 {
        font-size: 2rem;
    }

    .profile-actions,
    .profile-actions .profile-btn,
    .profile-actions form {
        width: 100%;
    }

    .profile-stats--public {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin: 18px auto 28px;
        border-bottom: 0;
    }

    .profile-stats--public div {
        min-width: 0;
        padding: 13px 8px;
    }

    .profile-stats--public div:first-child {
        padding-left: 8px;
    }

    .profile-stats--public strong {
        font-size: 1.32rem;
    }

    .profile-stats--public span {
        font-size: .82rem;
    }

    .profile-stat-icon {
        font-size: 1rem;
    }

    .profile-tabs--public .profile-tab-nav {
        gap: 26px;
        scroll-behavior: smooth;
    }

    .profile-tabs--public .profile-tab-nav a {
        padding-top: 14px;
        padding-bottom: 12px;
    }

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

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

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-panel,
    .profile-tab-panel {
        padding: 18px;
    }

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

    .profile-feed-cover {
        width: 58px;
    }

    .profile-tabs--public .profile-feed-item {
        padding: 16px;
        border-radius: 16px;
    }

    .profile-feed-post-image {
        margin: 14px 0;
        border-radius: 13px;
    }

    .profile-feed-post-meta {
        gap: 4px;
    }

    .profile-feed-post-meta a {
        min-height: 32px;
        padding: 0 8px;
    }

    .profile-about--public {
        grid-template-columns: 1fr;
    }

    .profile-about-metrics {
        grid-template-columns: 1fr;
    }

    .profile-toast {
        right: 12px;
        bottom: 14px;
    }
}
