:root {
    --bg: #080b10;
    --bg-deep: #05070b;
    --surface: #10151d;
    --surface-2: #141a23;
    --surface-3: #19212c;
    --surface-hover: #1d2632;
    --text: #dce4ee;
    --text-strong: #f3f7fb;
    --muted: #8792a0;
    --muted-2: #657080;
    --line: #26313e;
    --line-soft: rgba(151, 164, 179, 0.13);
    --accent: #7f9ab8;
    --accent-strong: #a9bdd3;
    --danger: #c97979;
    --success: #83b894;
    --ic-bg: var(--bg);
    --ic-panel: var(--surface);
    --ic-panel-soft: var(--surface-2);
    --ic-border: var(--line);
    --ic-text: var(--text);
    --ic-muted: var(--muted);
    --ic-accent: var(--accent-strong);
    --ic-accent-soft: rgba(169, 189, 211, 0.16);
    --ic-surface-solid: rgba(7, 9, 13, 0.96);
    --ic-surface-soft: rgba(10, 13, 18, 0.92);
    --ic-online: #35c46a;
    --ic-like-red: #d95858;
    --ic-danger: var(--danger);
    --ic-focus: rgba(169, 189, 211, 0.42);
    --radius: 4px;
    --radius-lg: 8px;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --content: 1120px;
    --navbar-height: 58px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #030406;
    color-scheme: dark;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    background: #030406;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #030406;
}

.site-bg__texture,
.site-bg__shade,
.site-bg__overlay {
    position: absolute;
    pointer-events: none;
}

.site-bg__texture {
    inset: 0;
    background-image: url("../images/backgrounds/background.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 1;
}

.site-bg__shade {
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.78)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.62));
}

.site-bg__overlay {
    inset: 0;
    display: block;
    width: 100vw;
    height: 100vh;
    max-width: none;
    object-fit: cover;
    object-position: center;
    opacity: 0.2;
    user-select: none;
    filter: invert(1) brightness(0.48) contrast(1.2);
    mix-blend-mode: screen;
    transform: scale(1.16);
    transform-origin: center;
}

.site-bg__overlay--mobile {
    display: none;
}

.site-bg__overlay--desktop-ul,
.site-bg__overlay--mobile-ul {
    object-position: top left;
    transform-origin: top left;
}

.site-bg__overlay--desktop-ur,
.site-bg__overlay--mobile-ur {
    object-position: top right;
    transform-origin: top right;
}

.site-bg__overlay--desktop-dl,
.site-bg__overlay--mobile-dl {
    object-position: bottom left;
    transform-origin: bottom left;
}

.site-bg__overlay--desktop-dr,
.site-bg__overlay--mobile-dr {
    object-position: bottom right;
    transform-origin: bottom right;
}

.site-nav,
.site-main,
footer {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    :root {
        --surface: #141b25;
        --surface-2: #182231;
        --surface-3: #202b39;
        --surface-hover: #263342;
        --text: #edf4fb;
        --muted: #afbac7;
        --muted-2: #8f9baa;
        --line: #344252;
        --line-soft: rgba(196, 212, 228, 0.26);
        --ic-surface-solid: rgba(12, 17, 24, 0.98);
        --ic-surface-soft: rgba(15, 21, 30, 0.97);
    }

    .site-bg__shade {
        background:
            radial-gradient(circle at center, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.86)),
            linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.7));
    }

    .site-bg__overlay {
        opacity: 0.13;
        filter: invert(1) brightness(0.44) contrast(1.16);
        transform: scale(1.08);
    }

    .site-bg__overlay--desktop {
        display: none;
    }

    .site-bg__overlay--mobile {
        display: block;
    }

    input,
    textarea,
    select {
        background: rgba(10, 16, 24, 0.96);
        border-color: rgba(196, 212, 228, 0.34);
    }
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    color: var(--text-strong);
}

h1,
h2,
h3 {
    margin: 0 0 8px;
    color: var(--text-strong);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(1.7rem, 3vw, 3.2rem);
}

h2 {
    font-size: clamp(1.05rem, 1.4vw, 1.28rem);
}

h3 {
    font-size: 0.98rem;
}

p {
    margin: 0 0 8px;
}

small,
.muted,
.field-help {
    color: var(--muted);
}

svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.site-main {
    width: min(var(--content), calc(100% - 28px));
    margin: 16px auto 34px;
}

.panel-card {
    min-width: 0;
    padding: 14px;
    background: linear-gradient(180deg, rgba(20, 26, 35, 0.94), rgba(12, 17, 24, 0.94));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.empty-state {
    margin: 0;
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 8px 14px;
    background: rgba(7, 10, 15, 0.88);
    border-bottom: 1px solid rgba(62, 74, 88, 0.5);
    backdrop-filter: blur(16px);
}

.site-nav-inner {
    width: min(var(--content), 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(max-content, 1fr) minmax(210px, 320px) auto;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-strong);
    font-weight: 900;
}

.brand-logo {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--text-strong);
    background: #0b1118;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.74rem;
    letter-spacing: -0.04em;
}

.brand-text {
    white-space: nowrap;
}

.site-nav-links,
.site-nav-account {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.site-nav-links a,
.site-nav-account > a:not(.nav-icon-link),
.account-menu summary,
.account-menu-panel a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 8px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.site-nav-links a:hover,
.site-nav-account > a:not(.nav-icon-link):hover,
.account-menu summary:hover,
.account-menu-panel a:hover {
    color: var(--text-strong);
    background: var(--surface-2);
    border-color: var(--line);
}

.register-link {
    color: var(--text-strong) !important;
    background: var(--surface-3);
    border-color: var(--line) !important;
}

.nav-search {
    position: relative;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.nav-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.nav-search input {
    min-height: 30px;
    margin: 0;
    padding: 5px 10px;
    background: #0b1017;
    border-color: var(--line);
    border-radius: 999px;
    font-size: 0.82rem;
}

.site-nav-account {
    justify-content: flex-end;
}

.nav-icon-link {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--muted);
    background: #0b1017;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.nav-icon-link:hover {
    color: var(--text-strong);
    background: var(--surface-hover);
}

.nav-icon-link:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.nav-counter-link {
    overflow: visible;
}

.nav-popover-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
}

.nav-counter-badge,
.menu-count,
.mobile-nav-count,
.inline-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    color: #fff;
    background: #d95858;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1;
}

.nav-counter-badge {
    position: absolute;
    right: -6px;
    top: -6px;
    border: 2px solid rgba(7, 10, 15, 0.95);
}

.nav-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 90;
    display: grid;
    width: min(360px, calc(100vw - 24px));
    max-height: min(540px, calc(100vh - 86px));
    overflow: hidden;
    color: var(--text);
    background: rgba(12, 17, 24, 0.98);
    border: 1px solid rgba(196, 212, 228, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

.nav-popover[hidden] {
    display: none !important;
}

.nav-popover-head,
.nav-popover-all,
.nav-popover-action {
    padding: 10px 12px;
}

.nav-popover-head {
    border-bottom: 1px solid var(--line-soft);
}

.nav-popover-head strong {
    color: var(--text-strong);
}

.nav-popover-list {
    display: grid;
    max-height: 360px;
    overflow-y: auto;
}

.nav-popover-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 9px;
    min-width: 0;
    padding: 10px 12px;
    color: var(--text);
    border-bottom: 1px solid var(--line-soft);
}

.nav-popover-item:hover,
.nav-popover-item:focus-visible {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.1);
}

.nav-popover-item.is-unread {
    background: rgba(169, 189, 211, 0.08);
}

.nav-popover-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.nav-popover-copy strong,
.nav-popover-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-popover-copy strong {
    color: var(--text-strong);
    font-size: 0.86rem;
}

.nav-popover-copy small,
.nav-popover-time {
    color: var(--muted);
    font-size: 0.74rem;
}

.nav-popover-time {
    white-space: nowrap;
}

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

.nav-popover-empty {
    margin: 0;
    padding: 14px 12px;
    color: var(--muted);
}

.nav-popover-all {
    display: flex;
    justify-content: center;
    color: var(--text-strong);
    border-top: 1px solid var(--line-soft);
    font-weight: 900;
}

.nav-popover-all:hover {
    background: rgba(152, 164, 179, 0.1);
}

.nav-popover-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
}

.nav-popover-footer form {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.nav-popover-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    color: var(--text-strong);
    background: transparent;
    border: 0;
    border-radius: 0;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.nav-popover-footer form {
    border-left: 1px solid var(--line-soft);
}

.nav-popover-action:hover,
.nav-popover-action:focus-visible {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.1);
}

.nav-popover-action:disabled {
    cursor: default;
    opacity: 0.48;
}

.menu-count,
.mobile-nav-count {
    margin-left: auto;
}

.account-menu {
    position: relative;
}

.account-menu summary {
    gap: 7px;
    cursor: pointer;
    list-style: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
    display: grid;
    width: 220px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.avatar-image,
.avatar-fallback {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    color: var(--text-strong);
    background: linear-gradient(135deg, #314255, #1c2734);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    object-fit: cover;
    font-weight: 900;
}

.avatar-xs {
    width: 24px;
    height: 24px;
    font-size: 0.66rem;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
}

.avatar-xl {
    width: 92px;
    height: 92px;
    font-size: 2rem;
}

.user-preview {
    position: relative;
    display: inline-flex;
    min-width: 0;
}

.user-preview-trigger {
    display: inline-grid;
    place-items: center;
    min-height: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.user-preview-trigger:hover {
    background: transparent;
}

.user-name-link,
.user-identity-link {
    color: var(--text-strong);
    font-weight: 900;
}

.user-identity,
.user-identity-link {
    align-items: center;
    gap: 8px;
}

.user-identity-link {
    display: inline-flex;
    min-width: 0;
}

.user-preview-card {
    position: fixed;
    left: -9999px;
    top: -9999px;
    z-index: 10010;
    display: none;
    gap: 12px;
    width: min(320px, calc(100vw - 24px));
    padding: 14px;
    color: var(--text);
    background: rgba(12, 17, 24, 0.98);
    border: 1px solid rgba(196, 212, 228, 0.18);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.user-preview-card.is-floating {
    display: grid;
}

.user-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    border-radius: 0;
    cursor: default;
    pointer-events: auto;
}

.user-preview-backdrop:hover,
.user-preview-backdrop:focus,
.user-preview-backdrop:active {
    background: rgba(0, 0, 0, 0.55);
}

.user-preview-backdrop[hidden] {
    display: none !important;
}

.user-preview-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-preview-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.user-preview-head strong {
    display: block;
    min-width: 0;
}

.user-preview-head strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: 1.02rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-preview-head em,
.user-preview-stats dt {
    color: var(--muted);
    font-size: 0.76rem;
}

.user-preview-head em {
    display: block;
    width: auto;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-preview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 9px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.user-preview-stats div {
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.user-preview-stats dt,
.user-preview-stats dd {
    margin: 0;
}

.user-preview-stats dd {
    color: var(--text-strong);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.user-preview-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.user-preview-actions form {
    min-width: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

.user-preview-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    color: var(--text);
    background: rgba(152, 164, 179, 0.08);
    border: 1px solid rgba(196, 212, 228, 0.16);
    border-radius: 10px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

.user-preview-action:hover,
.user-preview-action:focus-visible {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.13);
    border-color: rgba(196, 212, 228, 0.28);
}

.user-preview-action:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.user-preview-primary {
    color: #071018;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.user-preview-action.is-following,
.btn.is-following {
    color: var(--text-strong);
    background: rgba(131, 184, 148, 0.16);
    border-color: rgba(131, 184, 148, 0.35);
}

.user-preview-primary:hover,
.user-preview-primary:focus-visible {
    color: #071018;
    background: #d5e2ef;
    border-color: #d5e2ef;
}

.user-preview-actions .user-preview-primary {
    grid-column: 1 / -1;
}

.user-preview-actions.is-self {
    grid-template-columns: minmax(0, 1fr);
}

.user-preview-actions.is-self .user-preview-primary {
    grid-column: 1;
    justify-self: center;
    width: min(100%, 190px);
}

.user-preview-chat-invite {
    display: grid;
    gap: 8px;
}

.user-preview-invite-form {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.user-preview-invite-form[hidden] {
    display: none !important;
}

.user-preview-invite-form input {
    min-height: 36px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 16px;
}

.user-preview-invite-actions {
    display: flex;
    gap: 7px;
}

.user-preview-invite-status {
    min-height: 1em;
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.user-preview-invite-status.is-error {
    color: var(--danger);
}

label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    padding: 8px 9px;
    margin-bottom: 8px;
    color: var(--text);
    background: #0b1017;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(127, 154, 184, 0.24);
    border-color: var(--accent);
}

button,
input[type="submit"],
.button-link,
.ghost-link,
.subtle-link {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 850;
    text-decoration: none;
}

button,
input[type="submit"],
.button-link {
    color: #071018;
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
}

button:hover,
input[type="submit"]:hover,
.button-link:hover {
    color: #071018;
    background: #c4d2e1;
    border-color: #c4d2e1;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.ghost-link,
.subtle-link {
    color: var(--text);
    background: #0b1017;
    border: 1px solid var(--line);
}

.ghost-link:hover,
.subtle-link:hover {
    color: var(--text-strong);
    background: var(--surface-hover);
    border-color: var(--accent);
}

.danger-link {
    color: #e2a0a0;
}

.metric,
.icon-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.metric strong {
    color: var(--text);
    font-size: 0.86rem;
}

.icon-action {
    min-height: 28px;
    padding: 4px 7px;
    color: var(--muted);
    background: #0b1017;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
}

.icon-action:hover,
.icon-action.is-active {
    color: var(--text-strong);
    background: var(--surface-hover);
    border-color: var(--accent);
}

.errorlist {
    margin: 0 0 8px;
    padding-left: 18px;
    color: var(--danger);
}

.site-messages {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.site-message {
    margin: 0;
    padding: 9px 11px;
    background: rgba(25, 33, 44, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

footer {
    width: min(var(--content), calc(100% - 28px));
    margin: 0 auto 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 10px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.site-footer > strong {
    color: var(--text-strong);
    font-size: 0.9rem;
}

.site-footer-copy {
    color: var(--muted-2);
}

@media (max-width: 560px) {
    .site-footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-align: center;
    }
}

.auth-shell {
    width: min(420px, 100%);
    margin: 34px auto;
}

.auth-card {
    display: grid;
    gap: 8px;
}

.auth-card p {
    margin: 0;
}

.auth-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.auth-card .auth-switch {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
}

.auth-card ul {
    margin: 0 0 7px;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.78rem;
}

.home-page,
.profile-page,
.profile-edit-page {
    display: grid;
    gap: 14px;
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
    align-items: stretch;
    min-height: 280px;
    overflow: hidden;
    padding: 0;
}

.hero-media {
    position: relative;
    min-height: 240px;
    background:
        linear-gradient(90deg, rgba(8, 11, 16, 0.1), rgba(8, 11, 16, 0.74)),
        radial-gradient(circle at 40% 32%, rgba(127, 154, 184, 0.24), transparent 16rem),
        linear-gradient(135deg, #111821, #080b10 68%);
    border-right: 1px solid var(--line-soft);
}

.hero-wave {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 50%;
    height: 76px;
    transform: translateY(-50%);
    background:
        repeating-linear-gradient(90deg, transparent 0 9px, rgba(215, 226, 240, 0.56) 9px 11px, transparent 11px 18px);
    clip-path: polygon(0 48%, 5% 35%, 10% 58%, 15% 18%, 22% 76%, 28% 32%, 35% 64%, 42% 28%, 50% 58%, 58% 39%, 66% 70%, 75% 25%, 83% 63%, 91% 40%, 100% 52%, 100% 100%, 0 100%);
    opacity: 0.55;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, black, transparent);
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    justify-items: start;
    padding: 36px;
}

.hero-copy p {
    max-width: 620px;
    color: var(--muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

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

.home-sidebar,
.profile-side {
    display: grid;
    gap: 14px;
}

.notice-list {
    display: grid;
    gap: 8px;
}

.notice-list p {
    margin: 0;
    padding: 9px;
    color: var(--muted);
    background: #0b1017;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}

.feature-card-list,
.activity-list {
    display: grid;
    gap: 8px;
}

.feature-card,
.activity-list a,
.category-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
    color: var(--text);
    background: #0b1017;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.feature-card:hover,
.activity-list a:hover,
.category-card:hover,
.category-card.is-active {
    color: var(--text-strong);
    background: var(--surface-hover);
    border-color: var(--accent);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--accent-strong);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 900;
}

.feature-card small,
.activity-list small,
.category-card span,
.category-card small {
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.compact-topic-list,
.topic-list,
.reply-list {
    display: grid;
    gap: 8px;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

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

.profile-summary h1 {
    margin-bottom: 2px;
}

.profile-standing {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 7px;
    padding: 4px 9px;
    color: var(--accent-strong);
    background: rgba(127, 154, 184, 0.1);
    border: 1px solid rgba(127, 154, 184, 0.28);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.profile-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.profile-stat-row span {
    padding: 5px 8px;
    color: var(--muted);
    background: #0b1017;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    font-size: 0.78rem;
}

.profile-stat-row strong {
    color: var(--text-strong);
}

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

.avatar-editor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.avatar-preview-frame {
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
    background: #0b1017;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.avatar-preview-frame canvas {
    width: 92px;
    height: 92px;
    border-radius: 50%;
}

.crop-stage {
    display: grid;
    gap: 8px;
}

.crop-stage canvas {
    width: min(100%, 680px);
    height: auto;
    background: #05070b;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    touch-action: none;
}

.field-block input,
.field-block textarea,
.field-block select {
    margin-bottom: 0;
}

.narrow-layout {
    width: min(720px, 100%);
    margin-inline: auto;
}

@media (max-width: 980px) {
    .site-nav-inner {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .nav-search {
        grid-column: 2;
        grid-row: 2;
    }

    .site-nav-links {
        justify-content: center;
    }

    .site-nav-account {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .home-hero,
    .home-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .hero-media {
        display: none;
    }

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

@media (max-width: 720px) {
    .site-main,
    footer {
        width: min(100% - 18px, var(--content));
    }

    .site-nav-inner {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .brand-text {
        display: none;
    }

    .site-nav-links {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: start;
        overflow-x: auto;
    }

    .nav-search {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .site-nav-account {
        grid-column: 2;
        grid-row: 1;
    }

    .nav-icon-link {
        display: none;
    }

    .nav-popover-wrap {
        display: none;
    }

    .hero-copy {
        padding: 22px;
    }

    .profile-hero,
    .avatar-editor {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .account-menu summary span:not(.avatar-fallback) {
        display: none;
    }

    .panel-card {
        padding: 12px;
    }
}

/* Profile preview roots stay in page flow; the fixed body-level card owns layering. */
.user-preview {
    isolation: isolate;
}

.user-preview.is-open {
    z-index: auto;
}

.user-preview.is-open .user-preview-card {
    z-index: 10010;
}

.user-preview-trigger,
.user-preview-trigger:hover,
.user-preview-trigger:focus {
    width: auto;
    min-height: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

/* UI cleanup component layer */
:root {
    --bg: #070a0f;
    --bg-deep: #04060a;
    --surface: #111720;
    --surface-2: #151c27;
    --surface-3: #1a2330;
    --surface-hover: #202b3a;
    --text: #d9e1ea;
    --text-strong: #f5f7fa;
    --muted: #98a4b3;
    --muted-2: #737f8e;
    --line: rgba(152, 164, 179, 0.22);
    --line-soft: rgba(152, 164, 179, 0.11);
    --accent: #9db2c8;
    --accent-strong: #c4d4e4;
    --danger: #e18b8b;
    --success: #9bcead;
    --ic-bg: var(--bg);
    --ic-panel: var(--surface);
    --ic-panel-soft: var(--surface-2);
    --ic-border: var(--line);
    --ic-text: var(--text);
    --ic-muted: var(--muted);
    --ic-accent: var(--accent-strong);
    --ic-accent-soft: rgba(196, 212, 228, 0.16);
    --ic-online: #35c46a;
    --ic-like-red: #d95858;
    --ic-danger: var(--danger);
    --ic-focus: rgba(196, 212, 228, 0.44);
    --radius: 14px;
    --radius-lg: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --content: 1100px;
    --content-narrow: 900px;
    --content-form: 780px;
    --navbar-height: 58px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% -6rem, rgba(115, 137, 161, 0.18), transparent 32rem),
        linear-gradient(180deg, #0b1018 0, var(--bg) 28rem, var(--bg-deep) 100%);
    font-family: "Aptos", "Segoe UI", sans-serif;
    font-size: 15px;
}

::selection {
    color: var(--text-strong);
    background: rgba(157, 178, 200, 0.34);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--ic-focus);
    outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--ic-focus);
    border-color: var(--ic-accent);
}

h1 {
    font-size: clamp(1.9rem, 3vw, 2.65rem);
}

.site-main {
    flex: 1 0 auto;
    width: min(var(--content), calc(100% - 32px));
    margin: 28px auto 44px;
}

.page-shell {
    width: min(var(--content), 100%);
    margin-inline: auto;
    display: grid;
    gap: 24px;
}

.page-shell.narrow-layout,
.narrow-layout {
    width: min(var(--content-form), 100%);
}

.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.page-header h1,
.page-header p {
    margin: 0;
}

.page-header p {
    max-width: 660px;
    color: var(--muted);
}

.content-card,
.soft-card,
.panel-card,
.content-surface {
    min-width: 0;
    padding: 22px;
    color: var(--text);
    background: var(--ic-surface-solid);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.soft-card {
    background: var(--ic-surface-soft);
}

.content-surface {
    background:
        linear-gradient(180deg, rgba(18, 24, 33, 0.96), rgba(9, 13, 19, 0.96));
    backdrop-filter: blur(10px);
}

.compact-card {
    padding: 16px 18px;
}

.section-heading,
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.section-title-row h1,
.section-title-row h2,
.section-title-row h3 {
    margin: 0;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.meta-row > * {
    min-width: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 23px;
    padding: 3px 9px;
    color: var(--accent-strong);
    background: rgba(157, 178, 200, 0.1);
    border: 1px solid rgba(157, 178, 200, 0.2);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}

.badge-muted {
    color: var(--muted);
    background: rgba(152, 164, 179, 0.08);
    border-color: rgba(152, 164, 179, 0.16);
}

.badge-success {
    color: var(--success);
    background: rgba(112, 176, 133, 0.1);
    border-color: rgba(112, 176, 133, 0.22);
}

.badge-danger {
    color: var(--danger);
    background: rgba(216, 110, 110, 0.1);
    border-color: rgba(216, 110, 110, 0.22);
}

.btn,
button.btn,
a.btn,
input[type="submit"].btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 13px;
    color: #071018;
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover,
button.btn:hover,
a.btn:hover,
input[type="submit"].btn:hover {
    color: #071018;
    background: #d7e1eb;
    border-color: #d7e1eb;
    transform: translateY(-1px);
}

.btn-secondary,
button.btn-secondary,
a.btn-secondary {
    color: var(--text-strong);
    background: var(--surface-3);
    border-color: var(--line);
}

.btn-secondary:hover,
button.btn-secondary:hover,
a.btn-secondary:hover {
    color: var(--text-strong);
    background: var(--surface-hover);
    border-color: rgba(157, 178, 200, 0.38);
}

.btn-ghost,
button.btn-ghost,
a.btn-ghost,
.ghost-link,
.subtle-link {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
}

.btn-ghost:hover,
button.btn-ghost:hover,
a.btn-ghost:hover,
.ghost-link:hover,
.subtle-link:hover {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.08);
    border-color: rgba(157, 178, 200, 0.38);
}

.btn-danger,
button.btn-danger,
a.btn-danger {
    color: #1b0808;
    background: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover {
    color: #1b0808;
    background: #efaaaa;
    border-color: #efaaaa;
}

.btn-sm,
button.btn-sm,
a.btn-sm {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    color: var(--muted);
    background: rgba(152, 164, 179, 0.07);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.icon-button:hover {
    color: var(--text-strong);
    background: var(--surface-hover);
    border-color: var(--line);
}

.icon-button.danger {
    color: var(--danger);
}

.action-menu {
    position: relative;
}

.action-menu summary {
    list-style: none;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 80;
    display: grid;
    min-width: 170px;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.action-menu-panel a,
.action-menu-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 32px;
    padding: 7px 9px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: left;
}

.action-menu-panel a:hover,
.action-menu-button:hover {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.09);
}

.danger-link {
    color: var(--danger) !important;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
}

input,
textarea,
select {
    min-height: 40px;
    padding: 10px 12px;
    margin-bottom: 10px;
    color: var(--text);
    background: rgba(6, 10, 15, 0.82);
    border: 1px solid var(--line);
    border-radius: 12px;
}

textarea {
    min-height: 130px;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 7px 11px;
    color: var(--text-strong);
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
}

.field-block input,
.field-block textarea,
.field-block select {
    margin-bottom: 0;
}

.site-nav {
    padding: 10px 16px;
    background: rgba(5, 8, 13, 0.86);
    border-bottom: 1px solid var(--line-soft);
}

.site-nav-inner {
    width: min(var(--content), 100%);
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    background: var(--surface-2);
    border-color: var(--line-soft);
    border-radius: 12px;
}

.site-nav-links {
    justify-content: center;
    gap: 4px;
}

.site-nav-links a,
.site-nav-account > a:not(.nav-icon-link):not(.nav-cta),
.account-menu summary,
.account-menu-panel a {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
}

.site-nav-links a:hover,
.site-nav-account > a:not(.nav-icon-link):not(.nav-cta):hover,
.account-menu summary:hover,
.account-menu-panel a:hover {
    border-color: var(--line-soft);
}

.site-nav-account {
    gap: 8px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 13px;
    color: #071018;
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.nav-cta:hover {
    color: #071018;
    background: #d7e1eb;
    border-color: #d7e1eb;
}

.account-menu-panel {
    border-radius: var(--radius);
}

.auth-shell {
    width: min(460px, 100%);
}

.auth-card {
    gap: 12px;
}

.auth-card p {
    display: grid;
    gap: 6px;
}

.auth-fields {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.auth-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.auth-field input {
    margin-bottom: 0;
}

.auth-card .errorlist {
    margin: 0;
    padding-left: 18px;
    color: var(--danger);
    font-size: 0.78rem;
}

.errorlist {
    color: var(--danger);
}

footer {
    flex-shrink: 0;
    border-top-color: var(--line-soft);
}

@media (max-width: 980px) {
    .site-nav-inner {
        grid-template-columns: auto 1fr;
    }

    .site-nav-links {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: start;
        overflow-x: auto;
    }

    .site-nav-account {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 720px) {
    .site-main,
    footer {
        width: min(100% - 20px, var(--content));
    }

    .page-shell {
        gap: 18px;
    }

    .page-header {
        align-items: start;
        flex-direction: column;
    }

    .content-card,
    .soft-card,
    .panel-card,
    .content-surface {
        padding: 18px;
        border-radius: 16px;
    }

    .site-nav-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .site-nav-account {
        max-width: 100%;
    }

    .nav-cta {
        min-height: 32px;
        padding-inline: 10px;
        font-size: 0.78rem;
    }

    .account-menu summary {
        padding-inline: 6px;
    }
}

@media (max-width: 460px) {
    .brand-text {
        display: none;
    }

    .site-nav-links a {
        padding-inline: 9px;
    }

    .nav-cta {
        max-width: 108px;
    }
}

/* Focused corrective UI pass */
.site-nav,
.site-nav-inner,
.content-card,
.soft-card,
.panel-card,
.content-surface {
    overflow: visible;
}

.nav-cta {
    color: var(--text-strong);
    background: linear-gradient(180deg, #2b3d55, #182433);
    border-color: rgba(157, 178, 200, 0.46);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035) inset, 0 10px 24px rgba(0, 0, 0, 0.24);
}

.nav-cta:hover {
    color: var(--text-strong);
    background: linear-gradient(180deg, #344963, #1f2e41);
    border-color: rgba(196, 212, 228, 0.62);
}

.action-menu-panel {
    z-index: 500;
}

.home-landing {
    width: min(980px, 100%);
    margin: 34px auto 0;
    display: grid;
    gap: 34px;
}

.home-intro {
    display: grid;
    justify-items: start;
    gap: 16px;
    min-height: 260px;
    align-content: center;
}

.home-intro h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.6rem, 8vw, 5.6rem);
    letter-spacing: -0.07em;
}

.home-intro .eyebrow {
    margin: 0;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-entry {
    display: grid;
    gap: 5px;
    min-height: 118px;
    align-content: end;
    padding: 18px;
    color: var(--text);
    background: rgba(17, 23, 32, 0.58);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
}

.home-entry:hover {
    color: var(--text-strong);
    background: rgba(27, 37, 52, 0.74);
    border-color: rgba(157, 178, 200, 0.26);
}

.home-entry span {
    color: var(--text-strong);
    font-size: 1.25rem;
    font-weight: 900;
}

.home-entry small {
    color: var(--muted);
}

.home-latest {
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.profile-shell {
    width: min(1060px, 100%);
}

.profile-shell.content-surface {
    gap: 18px;
}

.profile-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 22px 0 24px;
    border-bottom: 1px solid var(--line-soft);
}

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

.profile-heading h1 {
    margin: 0;
}

.profile-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.profile-name-row .profile-standing {
    margin: 0;
}

.profile-meta {
    gap: 10px;
}

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

.profile-bio-inline {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--text);
    line-height: 1.6;
}

.profile-bio {
    display: grid;
    gap: 8px;
    max-width: 720px;
}

.profile-edit-page .avatar-preview-frame {
    width: 104px;
    height: 104px;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.profile-edit-page .avatar-preview-frame .avatar-image,
.profile-edit-page .avatar-preview-frame .avatar-fallback,
.profile-edit-page .avatar-preview-frame canvas {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-bio h2,
.profile-bio p {
    margin: 0;
}

.profile-bio p {
    color: var(--text);
    line-height: 1.65;
}

.profile-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 24px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.profile-actions form {
    margin: 0;
    padding: 0;
}

.profile-activity,
.profile-wall {
    min-width: 0;
}

.profile-replies {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.profile-replies h3 {
    margin: 0;
}

.profile-page .activity-list a {
    padding: 10px 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line-soft);
    border-radius: 0;
}

.profile-page .activity-list a:first-child {
    border-top: 0;
}

@media (max-width: 820px) {
    .home-entry-grid,
    .profile-content-grid {
        grid-template-columns: 1fr;
    }

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

    .profile-header .btn {
        grid-column: 2;
        justify-self: start;
    }

    .profile-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .home-intro {
        min-height: 220px;
    }

    .profile-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .profile-header .btn {
        grid-column: auto;
    }

    .profile-actions {
        grid-column: auto;
    }
}

.login-activity-page {
    display: grid;
    gap: 14px;
}

.login-activity-heading {
    align-items: center;
}

.login-activity-heading p {
    margin: 0;
}

.login-activity-panel {
    min-width: 0;
}

.login-activity-table-shell {
    width: 100%;
    overflow-x: auto;
}

.login-activity-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.login-activity-table th,
.login-activity-table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}

.login-activity-table th {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-activity-table td {
    color: var(--text);
}

.login-activity-table tbody tr:last-child td {
    border-bottom: 0;
}

.login-activity-table strong,
.login-activity-table small {
    display: block;
}

.login-activity-table small {
    margin-top: 3px;
}

.login-activity-table code {
    color: var(--text-strong);
    font: 0.9rem "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (max-width: 640px) {
    .login-activity-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-activity-heading .btn {
        align-self: flex-start;
        width: auto;
        max-width: 100%;
        white-space: normal;
    }
}

.social-page {
    display: grid;
    gap: 14px;
}

.social-page .section-heading p {
    margin: 0;
}

.social-list-panel {
    min-width: 0;
}

.social-list {
    display: grid;
    gap: 0;
}

.conversation-row,
.notification-row {
    display: grid;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 0;
    color: var(--text);
    border-bottom: 1px solid var(--line-soft);
}

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

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

.conversation-row:last-child,
.notification-row:last-child {
    border-bottom: 0;
}

.conversation-row:hover,
.notification-row:hover {
    color: var(--text-strong);
}

.conversation-row.is-unread .conversation-copy strong,
.notification-row.is-unread .notification-copy strong {
    color: var(--text-strong);
}

.conversation-copy,
.notification-copy,
.conversation-meta {
    display: grid;
    min-width: 0;
}

.conversation-copy strong,
.conversation-copy small,
.notification-copy strong,
.notification-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-copy small,
.notification-copy small,
.conversation-meta {
    color: var(--muted);
}

.conversation-meta {
    justify-items: end;
    gap: 5px;
    font-size: 0.76rem;
}

.notification-dot {
    width: 9px;
    height: 9px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.notification-row.is-unread .notification-dot {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.conversation-header {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}

.conversation-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.conversation-title h1 {
    margin: 0 0 6px;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.conversation-panel {
    display: grid;
    gap: 16px;
}

.private-message-list {
    display: grid;
    gap: 10px;
}

.private-message {
    display: flex;
}

.private-message.is-own {
    justify-content: flex-end;
}

.private-message-bubble {
    width: min(620px, 88%);
    padding: 10px 12px;
    background: rgba(152, 164, 179, 0.08);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
}

.private-message.is-own .private-message-bubble {
    background: rgba(169, 189, 211, 0.13);
    border-color: rgba(169, 189, 211, 0.24);
}

.private-message-bubble header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.private-message-bubble time {
    color: var(--muted);
    font-size: 0.74rem;
}

.private-message-body {
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.private-message-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.private-message-form textarea {
    min-height: 48px;
    max-height: 180px;
    margin: 0;
}

@media (max-width: 640px) {
    .conversation-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .conversation-meta {
        grid-column: 2;
        justify-items: start;
    }

    .private-message-bubble {
        width: 94%;
    }

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

/* Focused corrective pass: profile edit and band homepage */
.band-home {
    width: min(980px, 100%);
    margin: 26px auto 0;
    display: grid;
    gap: 24px;
}

.band-hero {
    position: relative;
    display: grid;
    align-items: center;
    min-height: clamp(380px, 58vh, 640px);
    overflow: hidden;
    padding: clamp(34px, 7vw, 82px);
    background:
        radial-gradient(circle at 72% 30%, rgba(196, 212, 228, 0.13), transparent 18rem),
        radial-gradient(circle at 18% 75%, rgba(115, 137, 161, 0.1), transparent 20rem),
        linear-gradient(135deg, rgba(19, 25, 33, 0.42), rgba(5, 7, 11, 0.1));
    border-radius: 28px;
}

.band-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.045) 44% 45%, transparent 45% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px);
    opacity: 0.28;
    pointer-events: none;
}

.band-hero-mark {
    position: absolute;
    right: clamp(12px, 4vw, 58px);
    bottom: clamp(-24px, -2vw, -8px);
    color: transparent;
    -webkit-text-stroke: 1px rgba(196, 212, 228, 0.18);
    font-size: clamp(8rem, 26vw, 18rem);
    font-weight: 950;
    letter-spacing: -0.12em;
    line-height: 0.8;
    opacity: 0.8;
    pointer-events: none;
}

.band-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    max-width: 760px;
}

.band-hero-copy h1 {
    margin: 0;
    font-size: clamp(3rem, 9vw, 7rem);
    letter-spacing: -0.09em;
    line-height: 0.9;
}

.band-hero-copy p {
    max-width: 560px;
    margin: 0;
    color: var(--text);
    font-size: clamp(1.05rem, 2vw, 1.42rem);
}

.band-note {
    max-width: 620px;
    color: var(--muted);
}

.band-note p {
    margin: 0;
    font-size: 0.96rem;
}

.profile-edit-page .section-heading {
    margin-bottom: 18px;
}

.profile-edit-page .section-heading h1 {
    margin: 0;
}

.profile-edit-page .profile-form {
    gap: 16px;
}

.profile-edit-page .avatar-editor {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-edit-trigger {
    position: relative;
    display: inline-grid;
    width: auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.avatar-edit-trigger:hover,
.avatar-edit-trigger:focus-visible {
    color: inherit;
    background: transparent;
    border: 0;
    transform: none;
}

.avatar-edit-trigger:focus-visible {
    outline: 2px solid rgba(196, 212, 228, 0.5);
    outline-offset: 4px;
}

.profile-edit-page .avatar-preview-frame {
    width: 124px;
    height: 124px;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.profile-edit-page .avatar-preview-frame .avatar-image,
.profile-edit-page .avatar-preview-frame .avatar-fallback,
.profile-edit-page .avatar-preview-frame canvas {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-edit-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-strong);
    background: rgba(0, 0, 0, 0.48);
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 900;
    opacity: 0;
    transition: opacity 140ms ease;
}

.avatar-edit-trigger:hover .avatar-edit-overlay,
.avatar-edit-trigger:focus-visible .avatar-edit-overlay {
    opacity: 1;
}

.profile-avatar-dialog {
    width: min(620px, calc(100% - 24px));
    padding: 0;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.profile-avatar-dialog::backdrop {
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(6px);
}

.profile-avatar-dialog-inner {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-head h2 {
    margin: 0;
}

.profile-modal-close {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 5px 8px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    line-height: 1;
}

.profile-modal-close:hover {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.08);
}

.avatar-file-input input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.avatar-pick-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    margin: 0;
    padding: 7px 12px;
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.09);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 850;
}

.avatar-pick-button:hover,
.avatar-pick-button:focus-visible {
    background: var(--surface-hover);
    border-color: rgba(196, 212, 228, 0.38);
}

.profile-avatar-dialog .crop-stage {
    display: grid;
}

.profile-avatar-dialog .crop-stage[hidden] {
    display: none;
}

.profile-avatar-dialog .crop-stage canvas {
    width: 100%;
    max-height: 58dvh;
    background: #05070b;
    border: 0;
    border-radius: var(--radius);
    touch-action: none;
}

.avatar-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.profile-bio-editor .editor-canvas {
    min-height: 140px;
}

.profile-edit-page input[disabled] {
    color: var(--muted);
    opacity: 0.8;
}

.profile-edit-page .field-help {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .band-hero {
        min-height: 340px;
        padding: 28px;
        border-radius: 22px;
    }

    .band-hero-mark {
        right: -8px;
        bottom: -10px;
        font-size: 8rem;
    }

    .profile-edit-page .avatar-preview-frame,
    .profile-edit-page .avatar-preview-frame .avatar-image,
    .profile-edit-page .avatar-preview-frame .avatar-fallback,
    .profile-edit-page .avatar-preview-frame canvas {
        width: 112px;
        height: 112px;
    }

    .avatar-dialog-actions {
        justify-content: stretch;
    }

    .avatar-dialog-actions .btn {
        width: 100%;
    }
}

/* Final profile polish */
.profile-edit-page .panel-card {
    padding-top: 26px;
}

.profile-edit-page .profile-form {
    gap: 18px;
}

.profile-edit-page .avatar-editor {
    justify-content: center;
    margin-bottom: 2px;
}

.profile-edit-page .avatar-preview-frame,
.profile-edit-page .avatar-preview-frame .avatar-image,
.profile-edit-page .avatar-preview-frame .avatar-fallback,
.profile-edit-page .avatar-preview-frame canvas {
    width: 144px;
    height: 144px;
}

.profile-page .profile-name-row {
    align-items: flex-end;
    gap: 12px;
    row-gap: 7px;
}

.profile-page .profile-name-row h1 {
    position: relative;
    width: fit-content;
    max-width: 100%;
    padding-bottom: 5px;
    overflow-wrap: anywhere;
}

.profile-page .profile-name-row h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(150px, 100%);
    height: 2px;
    background: linear-gradient(90deg, rgba(196, 212, 228, 0.72), rgba(196, 212, 228, 0));
    border-radius: 999px;
}

.profile-page .profile-standing {
    position: relative;
    margin: 0 0 5px;
    padding: 0 0 0 14px;
    color: var(--accent-strong);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    white-space: normal;
}

.profile-page .profile-standing::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 2px;
    width: 1px;
    background: rgba(196, 212, 228, 0.34);
}

@media (max-width: 640px) {
    .profile-edit-page .avatar-preview-frame,
    .profile-edit-page .avatar-preview-frame .avatar-image,
    .profile-edit-page .avatar-preview-frame .avatar-fallback,
    .profile-edit-page .avatar-preview-frame canvas {
        width: 128px;
        height: 128px;
    }

    .profile-page .profile-name-row {
        align-items: start;
        flex-direction: column;
        gap: 6px;
    }

    .profile-page .profile-standing {
        margin: 0;
        padding-left: 0;
    }

    .profile-page .profile-standing::before {
        display: none;
    }
}

/* Final responsive shell and navigation pass */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

body,
button,
input,
textarea,
select {
    letter-spacing: 0;
}

img,
video,
canvas {
    max-width: 100%;
}

.site-main,
footer,
.page-shell,
.site-nav,
.site-nav-inner {
    max-width: 100%;
}

.site-nav {
    padding: 10px 16px;
}

.site-nav-inner {
    display: grid;
    grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    min-width: 0;
    color: var(--text-strong);
}

.brand-mark:hover {
    color: #fff;
}

.brand-wordmark {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    color: var(--text-strong);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: clamp(1.05rem, 1.35vw, 1.28rem);
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 1;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

.site-nav-links {
    justify-content: center;
    overflow: visible;
}

.site-nav-account {
    justify-content: flex-end;
}

.nav-menu-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 40px;
    min-height: 40px;
    padding: 5px 2px;
    color: var(--text-strong);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-menu-toggle span {
    display: block;
    position: absolute;
    left: 4px;
    width: 36px;
    height: 3px;
    margin: 0;
    background: currentColor;
    border-radius: 999px;
    opacity: 1;
    transform: rotate(0deg);
    transform-origin: left center;
    transition:
        top 250ms ease-in-out,
        left 250ms ease-in-out,
        width 250ms ease-in-out,
        opacity 180ms ease-in-out,
        transform 250ms ease-in-out;
}

.nav-menu-toggle span:nth-child(1) {
    top: 7px;
}

.nav-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.nav-menu-toggle span:nth-child(3) {
    top: calc(100% - 7px);
    transform: translateY(-100%);
}

.nav-menu-toggle:hover,
.nav-menu-toggle:focus-visible {
    color: #fff;
    background: transparent;
}

.nav-menu-toggle:focus-visible {
    outline: 2px solid rgba(196, 212, 228, 0.32);
    outline-offset: 2px;
    border-radius: 6px;
}

.site-nav.is-menu-open .nav-menu-toggle span:nth-child(1) {
    top: 7px;
    left: 9px;
    width: 34px;
    transform: rotate(45deg);
}

.site-nav.is-menu-open .nav-menu-toggle span:nth-child(2) {
    width: 0;
    opacity: 0;
}

.site-nav.is-menu-open .nav-menu-toggle span:nth-child(3) {
    top: 31px;
    left: 9px;
    width: 34px;
    transform: rotate(-45deg);
}

.mobile-nav-menu[hidden] {
    display: none !important;
}

.mobile-nav-menu {
    width: min(var(--content), 100%);
    margin: 10px auto 0;
    padding: 10px;
    background: rgba(11, 16, 23, 0.98);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.mobile-nav-menu,
.mobile-nav-actions {
    min-width: 0;
}

.mobile-nav-menu:not([hidden]),
.mobile-nav-actions {
    display: grid;
    gap: 7px;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 40px;
    padding: 9px 11px;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 850;
}

.mobile-nav-menu a:hover {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.09);
    border-color: var(--line-soft);
}

.mobile-nav-actions {
    padding-top: 7px;
    border-top: 1px solid var(--line-soft);
}

@media (max-width: 760px) {
    .site-main,
    footer {
        width: min(100% - 18px, var(--content));
    }

    .site-nav {
        padding: 8px 10px;
    }

    .site-nav-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .brand-wordmark {
        font-size: clamp(1rem, 4.4vw, 1.18rem);
    }

    .site-nav-links,
    .site-nav-account {
        display: none;
    }

    .nav-menu-toggle {
        display: block;
    }

    .mobile-nav-menu {
        width: 100%;
    }

    input,
    textarea,
    select,
    .editor-canvas {
        font-size: 16px;
    }
}

/* Shared animated Consent button */
.like-button-form {
    display: inline-flex;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.like-button {
    position: relative;
    display: inline-grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
    gap: 0;
    width: 74px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    background: linear-gradient(180deg, rgba(21, 28, 39, 0.96), rgba(8, 12, 18, 0.98));
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.like-button:hover,
.like-button:focus-visible {
    color: var(--text-strong);
    background: linear-gradient(180deg, rgba(28, 37, 51, 0.98), rgba(10, 15, 22, 0.98));
    border-color: rgba(196, 212, 228, 0.24);
}

.like-button:focus-visible {
    outline: 2px solid rgba(196, 212, 228, 0.36);
    outline-offset: 3px;
}

.like-button-half {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
}

.like-button-heart {
    grid-column: 1;
}

.like-button-count {
    grid-column: 2;
}

.like-button-count {
    position: relative;
    overflow: hidden;
    color: var(--muted);
    border-left: 1px solid var(--line-soft);
    font-size: 0.82rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    transition: color 180ms ease;
}

.like-button .like-icon {
    display: block;
    width: 17px;
    height: 17px;
    margin: 0;
    fill: var(--muted-2);
    stroke: none;
    transition: fill 160ms ease, transform 160ms ease;
}

.like-button.is-active .like-icon {
    fill: var(--ic-like-red, #d95858);
}

.like-button[aria-pressed="true"] .like-icon,
.like-button[data-liked="true"] .like-icon {
    fill: var(--ic-like-red, #d95858);
}

.like-button.is-active .like-button-count {
    color: var(--text-strong);
}

.like-button.just-liked .like-icon {
    animation: like-button-enlarge 0.2s ease-out 1;
}

.like-button.just-liked .like-button-count {
    transform: none;
}

.like-button-count-current {
    display: inline-block;
    min-width: 1ch;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.like-button-count.is-rolling .like-button-count-current {
    visibility: hidden;
}

.like-button-count-roll {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    line-height: 1;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

.like-button-count.is-rolling-up .like-button-count-roll-old {
    animation: like-count-old-up 220ms ease-out forwards;
}

.like-button-count.is-rolling-up .like-button-count-roll-new {
    animation: like-count-new-up 220ms ease-out forwards;
}

.like-button-count.is-rolling-down .like-button-count-roll-old {
    animation: like-count-old-down 220ms ease-out forwards;
}

.like-button-count.is-rolling-down .like-button-count-roll-new {
    animation: like-count-new-down 220ms ease-out forwards;
}

@keyframes like-count-old-up {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0.35;
        transform: translateY(-100%);
    }
}

@keyframes like-count-new-up {
    from {
        opacity: 0.35;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes like-count-old-down {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0.35;
        transform: translateY(100%);
    }
}

@keyframes like-count-new-down {
    from {
        opacity: 0.35;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.like-button.is-disabled,
.like-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.like-button-link {
    cursor: pointer;
}

.like-inline-error {
    align-self: center;
    color: var(--danger);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

@keyframes like-button-enlarge {
    0% {
        transform: scale(0.82);
    }

    100% {
        transform: scale(1.08);
    }
}

@media (max-width: 560px) {
    .like-button {
        width: 70px;
        height: 31px;
        min-height: 31px;
        border-radius: 10px;
    }

    .like-button .like-icon {
        width: 16px;
        height: 16px;
    }

    .like-button-count {
        font-size: 0.8rem;
    }
}

/* Mobile navigation sheet polish */
.mobile-nav-panel,
.mobile-nav-section,
.mobile-account-options,
.mobile-nav-link-list,
.mobile-auth-grid {
    min-width: 0;
}

.mobile-nav-panel {
    display: grid;
    gap: 10px;
}

.mobile-nav-menu {
    position: relative;
    overflow: visible;
    padding: 10px 0 2px;
    background: rgba(6, 10, 15, 0.72);
    border: 0;
    border-top: 1px solid var(--line-soft);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.mobile-nav-menu::before {
    display: none;
}

.mobile-nav-panel {
    position: relative;
    z-index: 1;
}

.mobile-profile-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 8px 0;
    color: var(--text);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    text-align: left;
}

.mobile-profile-row:hover,
.mobile-profile-row:focus-visible {
    color: var(--text-strong);
    background: transparent;
    border-color: var(--line-soft);
}

.mobile-profile-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mobile-profile-copy strong,
.mobile-profile-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-profile-copy strong {
    color: var(--text-strong);
    font-size: 0.96rem;
}

.mobile-profile-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.mobile-profile-chevron {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    color: var(--muted);
    background: transparent;
    border: 0;
    transition: transform 220ms ease, color 180ms ease;
}

.mobile-profile-chevron::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translate(-50%, -65%) rotate(45deg);
}

.site-nav.is-mobile-account-open .mobile-profile-chevron {
    color: var(--text-strong);
    transform: rotate(180deg);
}

.mobile-account-options,
.mobile-nav-link-list,
.mobile-auth-grid {
    display: grid;
    gap: 6px;
}

.mobile-account-options {
    margin-top: 7px;
    padding: 4px 0 8px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
}

.mobile-account-options[hidden] {
    display: none !important;
}

.mobile-nav-section {
    display: grid;
    gap: 6px;
}

.mobile-new-topic {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
}

.mobile-nav-menu a,
.mobile-account-options a,
.mobile-nav-link-list a,
.mobile-auth-grid a {
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 850;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus-visible {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.11);
    border-color: rgba(196, 212, 228, 0.18);
}

.mobile-nav-menu .mobile-new-topic {
    justify-content: center;
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.1);
    border-color: rgba(196, 212, 228, 0.18);
    box-shadow: none;
}

.mobile-nav-menu .mobile-new-topic:hover,
.mobile-nav-menu .mobile-new-topic:focus-visible {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.14);
    border-color: rgba(196, 212, 228, 0.3);
}

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

.mobile-auth-grid .register-link {
    justify-content: center;
}

@media (min-width: 761px) {
    .mobile-nav-menu {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .mobile-auth-grid {
        grid-template-columns: 1fr;
    }
}

/* Keep the desktop New Topic action aligned with the quieter mobile treatment. */
.site-nav-account .nav-cta {
    min-height: 34px;
    padding: 7px 13px;
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.1);
    border-color: rgba(196, 212, 228, 0.18);
    border-radius: 12px;
    box-shadow: none;
}

.site-nav-account .nav-cta:hover,
.site-nav-account .nav-cta:focus-visible {
    color: var(--text-strong);
    background: rgba(152, 164, 179, 0.14);
    border-color: rgba(196, 212, 228, 0.3);
    box-shadow: none;
}

/* Focused mobile profile/menu/card polish */
.nav-menu-toggle[aria-expanded="true"] span:nth-child(1),
.nav-menu-toggle.is-active span:nth-child(1) {
    top: 7px;
    left: 9px;
    width: 34px;
    transform: rotate(45deg);
}

.nav-menu-toggle[aria-expanded="true"] span:nth-child(2),
.nav-menu-toggle.is-active span:nth-child(2) {
    width: 0;
    opacity: 0;
}

.nav-menu-toggle[aria-expanded="true"] span:nth-child(3),
.nav-menu-toggle.is-active span:nth-child(3) {
    top: 31px;
    left: 9px;
    width: 34px;
    transform: rotate(-45deg);
}

@keyframes mobile-menu-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobile-menu-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }
}

.user-preview-identity strong {
    position: relative;
    width: fit-content;
    max-width: 100%;
    padding-bottom: 5px;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.user-preview-identity strong::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(120px, 100%);
    height: 2px;
    background: linear-gradient(90deg, rgba(196, 212, 228, 0.72), rgba(196, 212, 228, 0));
    border-radius: 999px;
}

.user-preview-identity em {
    position: relative;
    margin: 1px 0 0;
    padding: 0;
    color: var(--accent-strong);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    white-space: normal;
}

.user-preview-identity em::before {
    display: none;
    content: none;
}

.mobile-navbar-new-topic {
    display: none;
}

@media (max-width: 760px) {
    .site-nav.is-menu-open {
        z-index: 8000;
        background: rgb(7, 11, 17);
        border-bottom-color: transparent;
    }

    .mobile-nav-menu,
    .mobile-nav-menu:not([hidden]),
    .mobile-nav-menu.is-closing {
        position: fixed;
        top: calc(var(--navbar-height, 58px) - 2px);
        left: 0;
        right: 0;
        z-index: 8000;
        width: 100%;
        max-height: calc(100dvh - var(--navbar-height, 58px) + 2px);
        margin: 0;
        padding: 8px 12px 10px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: rgb(7, 11, 17);
        border-top: 0;
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(12px);
    }

    .mobile-nav-menu:not([hidden]) {
        display: grid;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 220ms ease, transform 220ms ease;
    }

    .mobile-nav-menu.is-open {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-nav-menu.is-closing {
        display: grid !important;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-5px);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    .site-nav-inner {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .mobile-navbar-new-topic {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 7px 10px;
        color: var(--text-strong);
        background: rgba(152, 164, 179, 0.1);
        border: 1px solid rgba(196, 212, 228, 0.18);
        border-radius: 10px;
        font-size: 0.78rem;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .mobile-navbar-new-topic:hover,
    .mobile-navbar-new-topic:focus-visible {
        color: var(--text-strong);
        background: rgba(152, 164, 179, 0.14);
        border-color: rgba(196, 212, 228, 0.3);
    }

    .mobile-profile-row {
        min-height: 50px;
        padding: 7px 1rem;
        align-items: center;
    }

    .mobile-profile-copy {
        align-self: center;
    }

    .mobile-profile-chevron {
        justify-self: end;
    }

    .mobile-profile-copy strong {
        font-size: 0.94rem;
    }

    .mobile-profile-copy small {
        display: none;
    }

    .profile-page.profile-shell {
        margin-top: -14px;
    }

    .profile-page .profile-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 10px 0 14px;
    }

    .profile-page .profile-header > .avatar-xl {
        grid-column: 1;
        grid-row: 1;
        width: 88px;
        height: 88px;
        font-size: 1.8rem;
    }

    .profile-page .profile-heading {
        display: contents;
    }

    .profile-page .profile-name-row {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        align-items: start;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
        transform: translateY(3px);
    }

    .profile-page .profile-name-row h1 {
        font-size: clamp(1.35rem, 6vw, 1.75rem);
        line-height: 1.1;
    }

    .profile-page .profile-standing {
        margin: 0;
        padding-left: 0;
        font-size: 0.8rem;
    }

    .profile-page .profile-standing::before {
        display: none;
    }

    .profile-page .profile-meta,
    .profile-page .profile-bio-inline {
        grid-column: 1 / -1;
    }

    .profile-page .profile-meta {
        margin-top: 2px;
        gap: 7px;
    }

    .profile-page .profile-bio-inline {
        margin-top: 0;
    }

    .profile-page .profile-header .btn {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
        justify-self: end;
        min-height: 30px;
        padding: 6px 9px;
        font-size: 0.76rem;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .mobile-nav-menu,
    .mobile-nav-menu:not([hidden]),
    .mobile-nav-menu.is-closing {
        width: 100%;
    }

    .profile-page .profile-header {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
    }

    .profile-page .profile-name-row {
        grid-column: 2;
        transform: translateY(2px);
    }

    .profile-page .profile-header .btn {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        margin-top: -2px;
    }

    .profile-page .profile-header > .avatar-xl {
        width: 76px;
        height: 76px;
        font-size: 1.55rem;
    }
}

@media (max-width: 760px) {
    .content-surface {
        padding: 14px;
        background:
            linear-gradient(180deg, rgba(17, 24, 33, 0.98), rgba(8, 12, 18, 0.98));
        border-color: rgba(196, 212, 228, 0.28);
        border-radius: 14px;
    }

    .profile-page.profile-shell.content-surface {
        margin-top: 0;
    }

    .auth-card,
    .login-activity-panel,
    .social-list-panel {
        border-color: rgba(196, 212, 228, 0.28);
    }

    .auth-card input {
        min-height: 42px;
    }

    .mobile-nav-menu a,
    .mobile-account-options a,
    .mobile-nav-link-list a,
    .mobile-auth-grid a {
        color: var(--text);
    }
}
