/* Immoral Consent visual system.
   Loaded after app CSS to unify older page-specific styles without changing behavior. */

:root {
    --ic-bg: #0d0d0f;
    --ic-bg-soft: #121214;
    --ic-bg-glass: rgba(9, 9, 11, 0.78);
    --ic-surface: #171717;
    --ic-surface-rgb: 23, 23, 23;
    --ic-surface-2: #202020;
    --ic-surface-3: #252525;
    --ic-surface-hover: #2b2b2d;
    --ic-border: rgba(255, 255, 255, 0.1);
    --ic-border-strong: rgba(255, 255, 255, 0.18);
    --ic-text: #f2f2f2;
    --ic-text-strong: #ffffff;
    --ic-text-muted: #b9b9b9;
    --ic-text-dim: #858585;
    --ic-accent: #d62b2b;
    --ic-accent-hover: #ef3a3a;
    --ic-accent-soft: rgba(214, 43, 43, 0.14);
    --ic-danger: #ff3838;
    --ic-success: #7dcc91;
    --ic-radius-sm: 10px;
    --ic-radius-md: 16px;
    --ic-radius-lg: 24px;
    --ic-radius-xl: 28px;
    --ic-shadow-soft: 0 18px 52px rgba(0, 0, 0, 0.38);
    --ic-shadow-card: 0 12px 34px rgba(0, 0, 0, 0.35);
    --ic-shadow-inset: inset 2px 5px 10px rgba(0, 0, 0, 0.65);
    --ic-focus: 0 0 0 3px rgba(239, 58, 58, 0.26);
    --ic-transition: 220ms ease;
    --ic-content: 1160px;
    --ic-content-wide: 1280px;
    --ic-content-form: 520px;

    --bg: var(--ic-bg);
    --surface: var(--ic-surface);
    --surface-2: var(--ic-surface-2);
    --surface-3: var(--ic-surface-3);
    --surface-hover: var(--ic-surface-hover);
    --text: var(--ic-text);
    --text-strong: var(--ic-text-strong);
    --muted: var(--ic-text-muted);
    --muted-2: var(--ic-text-dim);
    --line: var(--ic-border);
    --line-soft: var(--ic-border);
    --accent: var(--ic-accent);
    --accent-strong: #f0f0f0;
    --danger: var(--ic-danger);
    --success: var(--ic-success);
    --radius: var(--ic-radius-sm);
    --radius-lg: var(--ic-radius-lg);
    --shadow: var(--ic-shadow-soft);
    --content: var(--ic-content);
    --content-form: var(--ic-content-form);
    --ic-panel: var(--ic-surface);
    --ic-panel-soft: var(--ic-surface-2);
    --ic-muted: var(--ic-text-muted);
    --ic-surface-solid: rgba(var(--ic-surface-rgb), 0.94);
    --ic-surface-soft: rgba(32, 32, 32, 0.86);
}

html {
    background: #050506;
}

body {
    color: var(--ic-text);
    background: #050506;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
}

.site-bg__shade {
    background:
        radial-gradient(circle at 50% 18%, rgba(214, 43, 43, 0.1), rgba(0, 0, 0, 0.12) 32%, rgba(0, 0, 0, 0.72) 78%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.78));
}

.site-bg__overlay {
    opacity: 0.13;
    filter: invert(1) brightness(0.38) contrast(1.16);
    mix-blend-mode: screen;
}

a {
    color: #f0f0f0;
    transition: color var(--ic-transition), background var(--ic-transition), border-color var(--ic-transition), transform var(--ic-transition), box-shadow var(--ic-transition);
}

a:hover {
    color: #ffffff;
}

h1,
h2,
h3 {
    color: var(--ic-text-strong);
    letter-spacing: 0;
}

h1 {
    font-size: clamp(1.85rem, 3.4vw, 3.25rem);
}

.site-main {
    width: min(var(--ic-content-wide), calc(100% - 32px));
    margin: 24px auto 44px;
}

.ic-page,
.ic-section {
    display: grid;
    gap: 20px;
}

.ic-page-shell,
.page-shell,
.forum-shell,
.profile-shell,
.social-page,
.login-activity-page,
.wall-page {
    width: min(var(--ic-content), 100%);
    gap: 20px;
}

.ic-page-shell--wide {
    width: min(var(--ic-content-wide), 100%);
}

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

.ic-page-header,
.page-header,
.section-heading,
.section-title-row,
.forum-header,
.category-header,
.wall-header,
.conversation-header {
    color: var(--ic-text);
}

.page-header p,
.section-heading p,
.muted,
.field-help,
small,
.empty-state {
    color: var(--ic-text-muted);
}

.ic-surface,
.ic-card,
.content-card,
.soft-card,
.panel-card,
.content-surface,
.topic-thread-surface,
.topic-form,
.social-list-panel,
.conversation-panel,
.login-activity-panel,
.profile-shell.content-surface,
.home-section-link,
.category-card,
.media-card,
.wall-meter,
.sidebar-card,
.chat-sidebar-panel,
.chat-topbar,
.mobile-chat-toggle,
.mobile-chat-drawer,
.user-preview-card,
.nav-popover,
.account-menu-panel,
.mobile-nav-menu,
.wall-modal,
.profile-avatar-dialog-inner,
.choice-card,
.action-menu form {
    color: var(--ic-text);
    background:
        linear-gradient(180deg, rgba(32, 32, 32, 0.92), rgba(17, 17, 18, 0.94));
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius-lg);
    box-shadow: var(--ic-shadow-card), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(18px);
}

.ic-surface,
.content-card,
.soft-card,
.panel-card,
.content-surface,
.topic-thread-surface,
.topic-form,
.social-list-panel,
.conversation-panel,
.login-activity-panel {
    padding: 24px;
}

.ic-card {
    padding: 20px;
    border-radius: var(--ic-radius-md);
}

.ic-grid {
    display: grid;
    gap: 16px;
}

.ic-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.content-card:hover,
.soft-card:hover,
.home-section-link:hover,
.topic-card:hover,
.category-card:hover,
.conversation-row:hover,
.notification-row:hover,
.media-card:hover {
    border-color: var(--ic-border-strong);
}

.site-message {
    padding: 12px 14px;
    color: var(--ic-text);
    background: rgba(23, 23, 23, 0.94);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius-md);
    box-shadow: var(--ic-shadow-card);
}

.site-nav {
    padding: 12px 18px;
    background: rgba(8, 8, 10, 0.86);
    border-bottom: 1px solid var(--ic-border);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(20px);
}

.site-nav-inner {
    width: min(var(--ic-content-wide), 100%);
    gap: 14px;
}

.brand-mark {
    color: var(--ic-text-strong);
}

.brand-wordmark {
    font-weight: 950;
    letter-spacing: 0.01em;
}

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

.site-nav-links a,
.site-nav-account > a:not(.nav-icon-link),
.account-menu summary,
.account-menu-panel a,
.mobile-nav-menu a,
.mobile-account-options a,
.mobile-nav-link-list a,
.mobile-auth-grid a {
    color: var(--ic-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 850;
}

.site-nav-links a:hover,
.site-nav-account > a:not(.nav-icon-link):hover,
.account-menu summary:hover,
.account-menu-panel a:hover,
.mobile-nav-menu a:hover,
.mobile-account-options a:hover,
.mobile-nav-link-list a:hover,
.mobile-auth-grid a:hover {
    color: var(--ic-text-strong);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--ic-border);
}

.register-link,
.nav-cta,
.mobile-navbar-new-topic {
    color: #fff !important;
    background: linear-gradient(180deg, rgba(214, 43, 43, 0.9), rgba(138, 22, 22, 0.9)) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 10px 24px rgba(214, 43, 43, 0.16);
}

.register-link:hover,
.nav-cta:hover,
.mobile-navbar-new-topic:hover {
    background: linear-gradient(180deg, rgba(239, 58, 58, 0.96), rgba(166, 28, 28, 0.96)) !important;
    transform: translateY(-1px);
}

.nav-icon-link {
    width: 42px;
    height: 42px;
    color: var(--ic-text);
    background: rgba(37, 37, 37, 0.78);
    border: 1px solid var(--ic-border);
    border-radius: 999px;
    box-shadow: var(--ic-shadow-inset);
    overflow: visible;
}

.nav-icon-link:hover,
.nav-icon-link:focus-visible {
    color: #fff;
    background: rgba(48, 48, 50, 0.94);
    border-color: var(--ic-border-strong);
    transform: translateY(-1px);
}

.nav-icon-link[data-nav-popover-toggle] svg {
    display: none;
}

.nav-icon-link[data-nav-popover-toggle="messages"]::before {
    content: "";
    width: 18px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.nav-icon-link[data-nav-popover-toggle="messages"]::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.nav-icon-link[data-nav-popover-toggle="notifications"]::before {
    content: "";
    width: 15px;
    height: 17px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 4px 4px;
    transform-origin: 50% 0;
}

.nav-icon-link[data-nav-popover-toggle="notifications"]::after {
    content: "";
    position: absolute;
    top: 27px;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    box-shadow: 0 5px 0 -0.5px currentColor;
}

.nav-icon-link[data-nav-popover-toggle="notifications"]:hover::before {
    animation: ic-bell 650ms ease-out both;
}

@keyframes ic-bell {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg) scale(1.08); }
    60% { transform: rotate(10deg) scale(1.08); }
    80% { transform: rotate(-10deg); }
    0%, 100% { transform: rotate(0deg); }
}

.nav-counter-badge,
.menu-count,
.mobile-nav-count,
.inline-count {
    min-width: 19px;
    height: 19px;
    color: #fff;
    background: linear-gradient(180deg, var(--ic-accent-hover), var(--ic-accent));
    border: 2px solid rgba(8, 8, 10, 0.95);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(214, 43, 43, 0.32);
    font-size: 0.68rem;
    font-weight: 950;
}

.nav-counter-badge {
    right: -5px;
    top: -5px;
}

.nav-popover {
    width: min(390px, calc(100vw - 24px));
    overflow: hidden;
    animation: ic-popover-in 170ms ease-out;
}

@keyframes ic-popover-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nav-popover-head,
.nav-popover-all,
.nav-popover-action {
    padding: 13px 15px;
}

.nav-popover-footer {
    border-top-color: var(--ic-border);
}

.nav-popover-footer form {
    border-left-color: var(--ic-border);
}

.nav-popover-action {
    min-height: 46px;
    color: var(--ic-text-strong);
    background: rgba(255, 255, 255, 0.018);
}

.nav-popover-action:hover,
.nav-popover-action:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.065);
}

.nav-popover-action:disabled {
    color: var(--ic-text-muted);
    background: transparent;
    transform: none;
    box-shadow: none;
}

.nav-popover-item {
    padding: 13px 15px;
    border-bottom-color: var(--ic-border);
}

.nav-popover-item:hover,
.nav-popover-item:focus-visible,
.nav-popover-item.is-unread {
    background: rgba(255, 255, 255, 0.06);
}

.notification-preview .nav-popover-copy strong,
.notification-row .notification-copy strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.account-menu-panel {
    width: 240px;
    padding: 8px;
    border-radius: var(--ic-radius-md);
}

.account-menu[open] .account-menu-panel {
    animation: ic-popover-in 170ms ease-out;
    transform-origin: top right;
}

.mobile-nav-menu {
    border-radius: 0 0 var(--ic-radius-lg) var(--ic-radius-lg);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
textarea,
select,
.ic-input,
.editor-shell,
.editor-canvas,
.wall-upload-picker {
    color: var(--ic-text);
    background: rgba(18, 18, 19, 0.94);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius-md);
    box-shadow: var(--ic-shadow-inset);
}

.field-block,
.profile-form,
.topic-form-section,
.wall-upload-form,
.invite-form,
.private-message-form {
    display: grid;
    gap: 12px;
}

.choice-card-grid,
.type-choice-grid,
.topic-category-choice-grid {
    gap: 10px;
}

.choice-card {
    min-height: 48px;
    padding: 12px 14px;
    cursor: pointer;
}

.choice-card:hover,
.choice-card:focus-within {
    background:
        linear-gradient(180deg, rgba(47, 34, 34, 0.94), rgba(23, 18, 18, 0.94));
    border-color: rgba(239, 58, 58, 0.34);
    transform: translateY(-1px);
}

.choice-card input {
    accent-color: var(--ic-accent);
}

.modal-head {
    border-bottom-color: var(--ic-border);
}

.avatar-pick-button,
.wall-upload-picker {
    color: var(--ic-text);
    background: rgba(255, 255, 255, 0.045);
    border: 1px dashed var(--ic-border-strong);
    border-radius: var(--ic-radius-md);
}

.avatar-pick-button:hover,
.wall-upload-picker:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(239, 58, 58, 0.34);
}

.action-menu[open] summary {
    background: var(--ic-accent-soft);
    border-color: rgba(239, 58, 58, 0.34);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
textarea,
select,
.ic-input {
    min-height: 44px;
    padding: 11px 13px;
}

textarea {
    line-height: 1.55;
}

input::placeholder,
textarea::placeholder,
.editor-canvas[data-empty]::before {
    color: var(--ic-text-dim);
}

input:focus,
textarea:focus,
select:focus,
.editor-shell:focus-within {
    border-color: rgba(239, 58, 58, 0.42);
    outline: none;
    box-shadow: var(--ic-shadow-inset), var(--ic-focus);
}

label {
    color: var(--ic-text-muted);
}

.errorlist {
    color: #ff8b8b;
}

.ic-btn,
.btn,
button.btn,
a.btn,
input[type="submit"].btn,
.button-link,
.ghost-link,
.subtle-link,
.auth-card button,
.private-message-form button,
.invite-form button,
.wall-upload-actions button,
.small-action,
.comment-action-link,
.editor-toolbar .editor-submit,
.pagination-link {
    min-height: 38px;
    padding: 9px 14px;
    color: var(--ic-text-strong);
    background: linear-gradient(180deg, rgba(43, 43, 45, 0.98), rgba(28, 28, 30, 0.98));
    border: 1px solid var(--ic-border);
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    font-weight: 900;
    line-height: 1;
    transition: color var(--ic-transition), background var(--ic-transition), border-color var(--ic-transition), transform var(--ic-transition), box-shadow var(--ic-transition), opacity var(--ic-transition);
}

.ic-btn:hover,
.btn:hover,
button.btn:hover,
a.btn:hover,
input[type="submit"].btn:hover,
.button-link:hover,
.ghost-link:hover,
.subtle-link:hover,
.auth-card button:hover,
.private-message-form button:hover,
.invite-form button:hover,
.wall-upload-actions button:hover,
.small-action:hover,
.comment-action-link:hover,
.editor-toolbar .editor-submit:hover,
.pagination-link:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(55, 55, 58, 0.98), rgba(34, 34, 36, 0.98));
    border-color: var(--ic-border-strong);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.ic-btn:active,
.btn:active,
button.btn:active,
a.btn:active,
.auth-card button:active,
.comment-action-link:active,
.pagination-link:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ic-btn--primary,
.btn-primary,
.auth-card button[type="submit"],
.private-message-form button,
.editor-toolbar .editor-submit,
.wall-upload-pill.btn-primary,
.pagination-link.is-current {
    color: #fff !important;
    background: linear-gradient(180deg, var(--ic-accent-hover), #9c1f1f) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 12px 28px rgba(214, 43, 43, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ic-btn--secondary,
.ic-btn--ghost,
.btn-secondary,
.btn-ghost,
.ghost-link,
.subtle-link {
    color: var(--ic-text);
}

.ic-btn--danger,
.danger-link,
.btn-danger {
    color: #ffb3b3 !important;
}

.ic-btn--icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
}

.ic-btn--small {
    min-height: 31px;
    padding: 7px 11px;
    font-size: 0.78rem;
}

button:disabled,
.ic-btn:disabled,
.btn:disabled,
.is-disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none !important;
}

:focus-visible {
    outline: none;
    box-shadow: var(--ic-focus);
}

.auth-shell {
    margin: clamp(28px, 8vh, 72px) auto;
}

.auth-card {
    position: relative;
    gap: 16px;
    padding: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(214, 43, 43, 0.1), transparent 36%),
        linear-gradient(180deg, rgba(28, 28, 29, 0.98), rgba(17, 17, 18, 0.98));
    border-radius: 25px;
}

.auth-card h1 {
    margin-bottom: 4px;
    font-size: clamp(2rem, 5vw, 2.7rem);
}

.auth-fields {
    gap: 12px;
}

.auth-field {
    position: relative;
}

.auth-field input {
    padding-left: 46px !important;
    margin: 0;
    border-radius: 16px;
}

.auth-field::before,
.auth-field::after {
    content: "";
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.auth-field::before {
    left: 17px;
    top: 50%;
    width: 15px;
    height: 15px;
    border: 2px solid var(--ic-text-dim);
    border-radius: 50%;
    transform: translateY(-50%);
}

.auth-field-password::before,
.auth-field-password_confirm::before,
.auth-field-new_password1::before,
.auth-field-new_password2::before {
    width: 16px;
    height: 12px;
    border-radius: 4px;
}

.auth-field-password::after,
.auth-field-password_confirm::after,
.auth-field-new_password1::after,
.auth-field-new_password2::after {
    left: 21px;
    top: calc(50% - 14px);
    width: 8px;
    height: 8px;
    border: 2px solid var(--ic-text-dim);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.auth-field-email::before {
    width: 17px;
    height: 12px;
    border-radius: 4px;
}

.auth-field-email::after {
    left: 19px;
    top: calc(50% - 2px);
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--ic-text-dim);
    border-bottom: 2px solid var(--ic-text-dim);
    transform: rotate(45deg);
}

.auth-actions {
    gap: 10px;
}

.auth-switch {
    color: var(--ic-text-muted);
}

.legal-agreement {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    max-width: none;
    margin: 1rem 0 0.4rem;
    padding: 0 0 0 0.35rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.35;
    cursor: pointer;
}

.legal-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
}

.legal-check input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.legal-check svg {
    display: block;
    overflow: visible;
}

.legal-check-path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 241 9999999;
    stroke-dashoffset: 0;
    transition:
        stroke-dasharray 0.5s ease,
        stroke-dashoffset 0.5s ease,
        stroke 0.25s ease;
}

.legal-check input[type="checkbox"]:checked ~ svg .legal-check-path {
    stroke: #ffffff;
    stroke-dasharray: 70.5096664428711 9999999;
    stroke-dashoffset: -262.2723388671875;
}

.legal-check input[type="checkbox"]:focus-visible ~ svg {
    border-radius: 5px;
    box-shadow: var(--ic-focus);
}

.legal-agreement-text a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.legal-agreement-text a:hover {
    text-decoration-thickness: 2px;
}

.legal-agreement-errors {
    margin-top: -0.2rem;
}

.legal-agreement-errors .errorlist {
    font-size: 0.78rem;
}

.home-real {
    display: grid;
    gap: 26px;
    width: min(var(--ic-content), 100%);
    margin: 0 auto;
}

.home-real-hero {
    min-height: min(58vh, 560px);
    padding: clamp(28px, 5vw, 56px);
    align-items: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(214, 43, 43, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(32, 32, 32, 0.88), rgba(13, 13, 15, 0.92));
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius-xl);
    box-shadow: var(--ic-shadow-soft);
    backdrop-filter: blur(18px);
}

.home-logo {
    filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.45));
}

.home-copy p {
    max-width: 620px;
    color: var(--ic-text-muted);
    font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.home-sections {
    gap: 14px;
}

.home-section-link {
    min-height: 144px;
    padding: 22px;
    transform: translateY(0);
}

.home-section-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42);
}

.home-section-link span,
.topic-card h3 a,
.category-card strong,
.conversation-copy strong,
.notification-copy strong {
    color: var(--ic-text-strong);
}

.forum-shell {
    width: min(var(--ic-content), 100%);
}

.forum-search {
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(420px, 100%);
    min-width: 0;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    background: #2d2d2d;
    border: 1px solid rgb(63, 63, 63);
    border-radius: 10px;
    box-shadow: none;
}

.forum-search input,
.forum-search-button {
    box-shadow: none !important;
}

.forum-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.forum-search-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    color: var(--ic-text-muted);
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.forum-search-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.forum-search-button:hover,
.forum-search-button:focus-visible {
    color: var(--ic-text-strong);
    background: transparent !important;
    box-shadow: none !important;
    transform: none;
}

.category-card {
    min-height: 124px;
    padding: 15px 16px;
    border-radius: 18px;
}

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

.forum-controls .category-card-description {
    min-height: 0;
}

.category-card:hover,
.category-card.is-active {
    background:
        linear-gradient(180deg, rgba(47, 34, 34, 0.94), rgba(23, 18, 18, 0.94));
    border-color: rgba(239, 58, 58, 0.34);
}

.type-tabs,
.category-strip {
    background: rgba(23, 23, 23, 0.88);
    border-color: var(--ic-border);
    border-radius: 999px;
}

.ic-badge,
.type-tabs a,
.category-strip a,
.badge {
    color: var(--ic-text-muted);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--ic-border);
    border-radius: 999px;
}

.ic-badge:hover,
.type-tabs a:hover,
.type-tabs a.is-active,
.category-strip a:hover,
.category-strip a.is-active,
.badge:hover {
    color: #fff;
    background: var(--ic-accent-soft);
    border-color: rgba(239, 58, 58, 0.36);
}

.badge-success {
    color: #bff0c9;
    background: rgba(125, 204, 145, 0.12);
    border-color: rgba(125, 204, 145, 0.26);
}

.badge-danger {
    color: #ffb8b8;
    background: rgba(255, 56, 56, 0.12);
    border-color: rgba(255, 56, 56, 0.28);
}

.topic-card {
    margin-inline: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid transparent;
    border-radius: 18px;
}

.topic-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--ic-border);
    transform: translateY(-2px);
}

.topic-card-image-preview,
.media-preview,
.wall-upload-preview {
    border-color: var(--ic-border);
    border-radius: 18px;
    overflow: hidden;
}

.topic-thread-surface {
    width: 100%;
}

.topic-header h1 {
    max-width: 980px;
}

.rich-copy,
.topic-copy,
.comment-copy,
.private-message-body,
.media-caption {
    color: var(--ic-text);
}

.composer-card,
.replies-panel,
.comment-body {
    background: transparent;
}

.comment {
    padding: 14px 0;
}

.comment-body {
    border-radius: 18px;
}

.comment.is-accepted > .comment-body {
    border-left-color: var(--ic-success);
}

.editor-toolbar {
    background: rgba(32, 32, 32, 0.92);
    border-bottom-color: var(--ic-border);
    border-radius: 16px 16px 0 0;
}

.editor-toolbar button,
.editor-toolbar-select,
.editor-format-menu button {
    color: var(--ic-text-muted);
    background: rgba(255, 255, 255, 0.035);
    border-color: transparent;
    border-radius: 12px;
}

.editor-toolbar button:hover,
.editor-toolbar button:focus-visible,
.editor-toolbar button.is-active,
.editor-toolbar-select:hover,
.editor-toolbar-select:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--ic-border);
}

.editor-format-menu {
    background: rgba(17, 17, 18, 0.98);
    border-color: var(--ic-border);
    border-radius: 14px;
}

.like-button {
    width: 82px;
    height: 36px;
    color: var(--ic-text);
    background: linear-gradient(180deg, rgba(43, 43, 45, 0.98), rgba(24, 24, 25, 0.98));
    border-color: var(--ic-border);
    border-radius: 999px;
    box-shadow: var(--ic-shadow-inset);
}

.like-button:hover,
.like-button:focus-visible {
    background: linear-gradient(180deg, rgba(56, 56, 58, 0.98), rgba(28, 28, 30, 0.98));
    border-color: var(--ic-border-strong);
    transform: translateY(-1px);
}

.like-button.is-active .like-icon,
.like-button[aria-pressed="true"] .like-icon,
.like-button[data-liked="true"] .like-icon {
    fill: var(--ic-accent-hover);
}

.profile-shell.content-surface {
    width: min(var(--ic-content), 100%);
    padding: 28px;
}

.profile-header {
    padding: 0 0 24px;
    border-bottom-color: var(--ic-border);
}

.profile-standing {
    color: #fff;
    background: var(--ic-accent-soft);
    border: 1px solid rgba(239, 58, 58, 0.28);
    border-radius: 999px;
}

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

.profile-standing {
    margin: 0;
    padding: 5px 10px;
}

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

.profile-meta,
.topic-meta,
.conversation-meta,
.notification-copy small,
.nav-popover-copy small,
.nav-popover-time,
.media-card-footer small {
    color: var(--ic-text-muted);
}

.compact-topic-list,
.activity-list,
.social-list,
.private-message-list {
    gap: 8px;
}

.conversation-row,
.notification-row {
    padding: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid transparent;
    border-radius: 18px;
}

.conversation-row.is-unread,
.notification-row.is-unread {
    background: rgba(214, 43, 43, 0.09);
    border-color: rgba(239, 58, 58, 0.22);
}

.private-message-bubble {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--ic-border);
    border-radius: 20px 20px 20px 8px;
}

.private-message.is-own .private-message-bubble {
    background: linear-gradient(180deg, rgba(214, 43, 43, 0.2), rgba(105, 24, 24, 0.22));
    border-color: rgba(239, 58, 58, 0.28);
    border-radius: 20px 20px 8px 20px;
}

.private-message-form {
    gap: 10px;
}

.login-activity-table {
    border-collapse: separate;
    border-spacing: 0;
}

.login-activity-table th {
    color: var(--ic-text-muted);
}

.login-activity-table th,
.login-activity-table td {
    border-bottom-color: var(--ic-border);
}

.login-activity-table code {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ic-border);
    border-radius: 999px;
    padding: 4px 8px;
}

.chat-shell {
    width: min(var(--ic-content-wide), 100%);
    margin-inline: auto;
}

.chat-topbar {
    padding: 18px 20px;
}

.chat-workspace {
    gap: 18px;
}

.chat-panel,
.chat-sidebar-panel {
    overflow: hidden;
}

.chat-tabs {
    gap: 8px;
}

.chat-tab,
.mobile-chat-target,
.mobile-chat-section-toggle,
.mobile-chat-close,
.dialog-close {
    color: var(--ic-text);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--ic-border);
    border-radius: 999px;
}

.chat-tab:hover,
.chat-tab.is-active,
.mobile-chat-target:hover,
.mobile-chat-target.is-active,
.mobile-chat-section-toggle:hover {
    color: #fff;
    background: var(--ic-accent-soft);
    border-color: rgba(239, 58, 58, 0.32);
}

.message-list,
.active-user-list,
.room-directory,
.invitation-list {
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.message-row,
.room-card,
.active-user,
.invitation-card {
    border-radius: 16px;
}

.message-list {
    padding-right: 0;
    padding-left: 0;
    overflow-x: hidden;
}

.chat-message {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding-right: 12px;
    padding-left: 12px;
}

.chat-message::after {
    content: none;
}

.chat-composer {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    overflow: hidden;
    padding: 0 12px;
    background: #2d2d2d;
    border: 1px solid rgb(63, 63, 63);
    border-radius: 10px;
    box-shadow: none;
}

.chat-composer input[name="message"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.chat-send-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    color: var(--ic-text-muted);
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.chat-send-button:hover,
.chat-send-button:focus-visible {
    color: var(--ic-text-strong);
    background: transparent !important;
    box-shadow: none !important;
    transform: none;
}

.chat-send-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.active-user-row.is-current-user,
.mobile-online-user.is-current-user {
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.active-user-row.is-current-user .active-user-copy small,
.mobile-online-user.is-current-user .mobile-online-copy small {
    color: var(--ic-text-strong);
}

@media (max-width: 760px) {
    .chat-composer {
        height: 40px;
        min-height: 40px;
        padding: 0 12px;
    }

    .chat-composer input[name="message"] {
        height: 100%;
        min-height: 0;
        padding: 0 !important;
        font-size: 16px;
    }

    .chat-send-button {
        width: 28px;
        min-width: 28px;
        min-height: 0;
        font-size: 0.88rem;
    }
}

.wall-page {
    width: min(var(--ic-content-wide), 100%);
}

.wall-header {
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    background:
        linear-gradient(135deg, rgba(37, 37, 39, 0.94), rgba(17, 17, 18, 0.95));
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius-lg);
    box-shadow: var(--ic-shadow-card);
}

.wall-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.wall-header-title h1 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
    letter-spacing: 0;
}

.wall-header-actions {
    position: relative;
    z-index: 1;
    gap: 12px;
}

.wall-meter {
    min-width: 148px;
    padding: 10px 12px;
    background: rgba(8, 8, 10, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.media-grid {
    gap: 18px;
}

.media-card {
    overflow: hidden;
    transform: translateY(0);
}

.media-card:hover {
    transform: translateY(-3px);
}

.media-card-body {
    background: transparent;
}

.wall-meter-track {
    background: rgba(0, 0, 0, 0.32);
    box-shadow: var(--ic-shadow-inset);
}

.wall-meter-track span {
    background: linear-gradient(90deg, var(--ic-accent), var(--ic-accent-hover));
}

.wall-upload-picker {
    min-height: 160px;
    border-style: dashed;
}

.pagination-nav {
    gap: 10px;
    padding-top: 12px;
    border-top-color: var(--ic-border);
}

.pagination-link,
.pagination-ellipsis {
    color: var(--ic-text-muted);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.pagination-link {
    min-width: 0;
    min-height: 28px;
    padding: 2px 3px;
    font-size: 0.86rem;
    line-height: 1;
}

.pagination-pages {
    gap: 10px;
}

.pagination-arrow {
    width: 28px;
    min-width: 28px;
    padding-inline: 0;
}

.pagination-arrow svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pagination-link:hover,
.pagination-link:focus-visible {
    color: var(--ic-text-strong);
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.42);
    box-shadow: none;
    transform: none;
}

.pagination-link.is-current {
    color: var(--ic-text-strong);
    background: transparent !important;
    border-color: transparent;
    border-bottom-color: currentColor !important;
    box-shadow: none;
    font-weight: 950;
}

.pagination-ellipsis,
.pagination-link.is-disabled {
    opacity: 0.5;
}

.site-footer {
    width: min(var(--ic-content-wide), calc(100% - 32px));
    margin: 0 auto 24px;
    padding: 18px 0 0;
    color: var(--ic-text-muted);
    border-top: 1px solid var(--ic-border);
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    min-width: 0;
}

.site-footer-legal a {
    color: var(--ic-text-muted);
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
}

.site-footer-legal span {
    color: var(--ic-text-dim);
}

.site-footer-legal a:hover,
.site-footer-legal a:focus-visible {
    color: var(--ic-text-strong);
}

.site-footer-contact {
    color: var(--ic-text-muted);
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.site-footer-contact:hover,
.site-footer-contact:focus-visible {
    color: var(--ic-text-strong);
}

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

    .site-nav-links {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    :root {
        --ic-surface-solid: rgba(23, 23, 23, 0.98);
        --ic-surface-soft: rgba(32, 32, 32, 0.94);
    }

    body {
        font-size: 15px;
    }

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

    .site-main {
        margin-top: 14px;
    }

    .site-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-bottom: 12px;
        padding-top: 10px;
        text-align: center;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
        will-change: auto;
    }

    .site-footer > strong {
        font-size: 0.84rem;
        line-height: 1.2;
    }

    .site-footer-legal {
        gap: 2px 7px;
        line-height: 1.25;
    }

    .site-footer-legal a {
        min-height: 26px;
        display: inline-flex;
        align-items: center;
        font-size: 0.8rem;
    }

    .site-footer-copy {
        font-size: 0.74rem;
        line-height: 1.2;
    }

    .site-bg__shade {
        background:
            radial-gradient(circle at 50% 10%, rgba(214, 43, 43, 0.09), rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0.84) 78%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.82));
    }

    .site-bg__overlay {
        opacity: 0.1;
    }

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

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

    .nav-menu-toggle {
        color: #fff;
    }

    .mobile-nav-menu,
    .mobile-nav-menu:not([hidden]),
    .mobile-nav-menu.is-closing {
        background: rgba(10, 10, 12, 0.98);
        border-bottom: 1px solid var(--ic-border);
        box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
    }

    .mobile-profile-row {
        padding-inline: 12px;
        border-color: var(--ic-border);
        border-radius: 16px;
    }

    .mobile-nav-menu a,
    .mobile-account-options a,
    .mobile-nav-link-list a,
    .mobile-auth-grid a {
        border-radius: 16px;
    }

    .content-card,
    .soft-card,
    .panel-card,
    .content-surface,
    .topic-thread-surface,
    .topic-form,
    .social-list-panel,
    .conversation-panel,
    .login-activity-panel,
    .profile-shell.content-surface {
        padding: 16px;
        border-radius: 20px;
    }

    .auth-card {
        padding: 22px;
    }

    .auth-card h1 {
        font-size: 2rem;
    }

    .home-real-hero {
        min-height: auto;
        padding: 24px;
        border-radius: 24px;
    }

    .home-sections {
        grid-template-columns: 1fr;
    }

    .home-section-link {
        min-height: 118px;
    }

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

    .forum-controls .forum-category-grid .category-card {
        display: grid;
        grid-template-rows: auto auto;
        gap: 7px;
        min-height: 76px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .forum-controls .forum-category-grid .category-card-copy {
        display: grid;
        gap: 3px;
    }

    .forum-controls .forum-category-grid .category-card-description {
        display: none;
    }

    .forum-controls .forum-category-grid .category-card-meta {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 3px 6px;
        font-size: 0.72rem;
        line-height: 1.25;
        white-space: normal;
    }

    .topic-card {
        padding: 13px 0;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--ic-border);
        border-radius: 0;
    }

    .topic-card:hover {
        transform: none;
        background: transparent;
    }

    .topic-thread-surface {
        gap: 14px;
    }

    .profile-header {
        gap: 14px;
    }

    .profile-page .profile-header .btn {
        white-space: normal;
    }

    .conversation-row,
    .notification-row {
        padding: 12px;
    }

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

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

    .private-message-bubble {
        width: min(100%, 92%);
    }

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

    .login-activity-table thead {
        display: none;
    }

    .login-activity-table,
    .login-activity-table tbody,
    .login-activity-table tr,
    .login-activity-table td {
        display: block;
        width: 100%;
    }

    .login-activity-table tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--ic-border);
    }

    .login-activity-table td {
        display: grid;
        grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
        gap: 10px;
        padding: 7px 0;
        border: 0;
    }

    .login-activity-table td::before {
        color: var(--ic-text-muted);
        font-size: 0.74rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .login-activity-table td:nth-child(1)::before { content: "Location"; }
    .login-activity-table td:nth-child(2)::before { content: "IP"; }
    .login-activity-table td:nth-child(3)::before { content: "First"; }
    .login-activity-table td:nth-child(4)::before { content: "Last"; }
    .login-activity-table td:nth-child(5)::before { content: "Uses"; }

    .chat-workspace {
        gap: 12px;
    }

    .mobile-chat-toggle {
        min-height: 48px;
    }

    .wall-header {
        padding: 16px;
    }

    .wall-header-actions {
        align-items: stretch;
    }

    .media-grid {
        gap: 14px;
    }
}

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

    .auth-card {
        padding: 18px;
    }

    .auth-field input {
        padding-left: 42px !important;
    }

    .profile-page .profile-header > .avatar-xl {
        width: 72px;
        height: 72px;
    }

    .login-activity-table td {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 340px) {
    .forum-controls .forum-category-grid {
        grid-template-columns: 1fr;
    }
}

/* Focused post-redesign fixes */
.nav-icon-link[data-nav-popover-toggle]::before,
.nav-icon-link[data-nav-popover-toggle]::after {
    display: none;
    content: none;
}

.nav-icon-link[data-nav-popover-toggle] .nav-svg-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: currentColor;
    pointer-events: none;
    transform-origin: center;
    transition: transform var(--ic-transition);
}

.nav-icon-link[data-nav-popover-toggle] .nav-svg-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-icon-link[data-nav-popover-toggle]:hover .nav-svg-icon--message,
.nav-icon-link[data-nav-popover-toggle]:focus-visible .nav-svg-icon--message {
    transform: translateY(-1px);
}

.nav-icon-link[data-nav-popover-toggle]:hover .nav-svg-icon--bell,
.nav-icon-link[data-nav-popover-toggle]:focus-visible .nav-svg-icon--bell {
    animation: ic-nav-bell-ring 560ms ease-out both;
}

@keyframes ic-nav-bell-ring {
    0%,
    100% {
        transform: rotate(0deg);
    }

    24% {
        transform: rotate(12deg);
    }

    48% {
        transform: rotate(-10deg);
    }

    72% {
        transform: rotate(6deg);
    }
}

.topic-thread-surface .thread-list > .comment {
    padding-top: 18px;
    padding-bottom: 18px;
}

.topic-thread-surface .thread-list > .comment:first-child,
.topic-thread-surface .thread-list > .thread-connectors + .comment {
    padding-top: 0;
}

.topic-thread-surface .thread-list > .comment-children {
    margin-top: 0;
    margin-bottom: 12px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.topic-thread-surface .thread-list > .comment-children + .comment {
    padding-top: 18px;
}

.topic-thread-surface .comment-actions {
    margin-bottom: 4px;
}

.topic-thread-surface .comment-children .comment:last-child {
    padding-bottom: 10px;
}

.wall-upload-status.wall-upload-pill:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: max-content;
    min-height: 38px;
    padding: 9px 14px;
    color: var(--ic-text-muted);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--ic-border);
    border-radius: 999px;
    box-shadow: none;
    cursor: default;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

.wall-upload-status.wall-upload-pill:hover,
.wall-upload-status.wall-upload-pill:focus-visible,
.wall-upload-status.wall-upload-pill:active {
    color: var(--ic-text-muted);
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--ic-border);
    box-shadow: none;
    transform: none;
}

@media (max-width: 760px) {
    .forum-search {
        display: flex;
        height: 40px;
        min-height: 40px;
        padding: 0 12px;
    }

    .forum-search-button {
        display: inline-flex;
        width: 28px;
        min-width: 28px;
        height: 100%;
        min-height: 0;
    }

    .forum-search input {
        height: 100%;
        min-height: 0;
        padding: 0 !important;
    }

    .topic-thread-surface .thread-list > .comment {
        padding-top: 16px;
        padding-bottom: 20px;
    }

    .topic-thread-surface .thread-list > .comment-children {
        margin-bottom: 10px;
        padding-bottom: 4px;
    }

    .topic-thread-surface .thread-list > .comment-children + .comment {
        padding-top: 18px;
    }

    .topic-thread-surface .comment-actions {
        margin-bottom: 9px;
    }

    .wall-header-actions .wall-upload-status.wall-upload-pill:not([hidden]) {
        align-self: center;
        flex: 0 0 auto;
    }

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

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

    .profile-page .profile-name-row {
        grid-column: 2;
        grid-row: 1;
        align-self: auto;
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        margin: 0;
        justify-self: start;
        transform: none;
    }

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

    .profile-page .profile-actions {
        justify-content: flex-start;
    }

    .profile-page .profile-header .btn {
        grid-column: auto;
        grid-row: auto;
        align-self: auto;
        justify-self: auto;
        margin-top: 0;
    }
}

@media (max-width: 360px) {
    .profile-page .profile-header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-page .profile-header > .avatar-xl,
    .profile-page .profile-name-row,
    .profile-page .profile-meta,
    .profile-page .profile-bio-inline,
    .profile-page .profile-actions {
        grid-column: 1;
        grid-row: auto;
    }

    .profile-page .profile-name-row {
        align-items: center;
    }

    .profile-page .profile-meta,
    .profile-page .profile-actions {
        justify-content: center;
    }
}

/* Targeted UI cleanup: compact chat/search controls, mobile forum categories,
   Wall image previews, login activity, and mobile home shortcut stability. */
.chat-composer,
.forum-search {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    background: #2d2d2d;
    border: 1px solid rgb(63, 63, 63);
    border-radius: 10px;
    box-shadow: none;
    overflow: hidden;
    transition: border-color 160ms ease;
}

.chat-composer:focus-within,
.forum-search:focus-within {
    border-color: rgb(110, 110, 110);
    box-shadow: none;
}

.chat-composer input[name="message"],
.chat-composer textarea,
.forum-search input {
    flex: 1 1 auto;
    width: auto;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    color: #fff;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    resize: none;
    font: inherit;
}

.chat-composer input[name="message"]:focus,
.chat-composer textarea:focus,
.forum-search input:focus {
    box-shadow: none !important;
    outline: 0 !important;
}

.chat-composer input[name="message"]::placeholder,
.chat-composer textarea::placeholder,
.forum-search input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.chat-send-button,
.forum-search-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    margin: 0;
    color: #a8a8a8;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    cursor: pointer;
    transition: color 160ms ease;
}

.chat-send-button:hover,
.chat-send-button:focus-visible,
.forum-search-button:hover,
.forum-search-button:focus-visible,
.forum-search:focus-within .forum-search-button {
    color: #fff;
    background: transparent !important;
    box-shadow: none !important;
    transform: none;
}

.forum-search:has(input:not(:placeholder-shown)) .forum-search-button {
    color: #fff;
    background: transparent !important;
    box-shadow: none !important;
    transform: none;
}

.chat-send-icon,
.forum-search-icon {
    width: 18px;
    height: 18px;
}

.chat-send-icon {
    fill: transparent;
    stroke: currentColor;
}

.chat-send-icon path {
    fill: transparent;
    stroke: #9a9a9a;
    transition: fill 160ms ease, stroke 160ms ease;
}

.chat-composer input[name="message"]:focus ~ .chat-send-button .chat-send-icon path,
.chat-composer input[name="message"]:valid ~ .chat-send-button .chat-send-icon path,
.chat-composer:focus-within .chat-send-icon path,
.chat-send-button:hover .chat-send-icon path,
.chat-send-button:focus-visible .chat-send-icon path {
    fill: transparent;
    stroke: #fff;
}

.forum-search-icon {
    fill: none;
    stroke: currentColor;
    transition: stroke 160ms ease;
}

.forum-category-accordion {
    display: none;
    margin: 0;
}

.forum-category-grid-desktop {
    display: grid;
}

.forum-category-grid-mobile {
    display: none;
}

.media-preview img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 760px) {
    body.forum-page .site-main {
        margin-top: 4px;
    }

    .forum-shell {
        gap: 10px;
    }

    .forum-controls {
        gap: 10px;
    }

    .forum-search {
        width: 100%;
    }

    .forum-search-button {
        display: inline-flex;
    }

    .forum-category-grid-desktop {
        display: none !important;
    }

    .forum-category-accordion {
        display: grid;
        gap: 0;
        min-width: 0;
    }

    .forum-category-accordion > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 40px;
        padding: 8px 12px;
        color: var(--ic-text-strong);
        background: #2d2d2d;
        border: 1px solid rgb(63, 63, 63);
        border-radius: 10px;
        box-shadow: none;
        cursor: pointer;
        font-weight: 950;
        list-style: none;
    }

    .forum-category-accordion > summary:hover,
    .forum-category-accordion > summary:focus-visible {
        border-color: rgb(110, 110, 110);
        outline: none;
    }

    .forum-category-accordion > summary::-webkit-details-marker {
        display: none;
    }

    .forum-category-chevron {
        position: relative;
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        color: var(--ic-text-muted);
        transition: transform 160ms ease, color 160ms ease;
    }

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

    .forum-category-accordion[open] .forum-category-chevron {
        color: #fff;
        transform: rotate(180deg);
    }

    .forum-category-accordion:not([open]) > .forum-category-grid {
        display: none !important;
    }

    .forum-category-accordion[open] > .forum-category-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 6px;
    }

    .forum-category-accordion > .forum-category-grid .category-card {
        min-height: 44px;
        padding: 7px 9px;
        border-radius: 10px;
    }

    .forum-category-accordion > .forum-category-grid .category-card-description,
    .forum-category-accordion > .forum-category-grid .category-card-meta {
        display: none;
    }

    .login-activity-table-shell {
        overflow-x: visible;
    }

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

    .login-activity-table tbody {
        display: grid;
        gap: 8px;
    }

    .login-activity-table tr {
        display: grid;
        gap: 3px;
        width: 100%;
        padding: 10px;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid var(--ic-border);
        border-radius: 12px;
    }

    .login-activity-table td {
        display: grid;
        grid-template-columns: 82px minmax(0, 1fr);
        align-items: start;
        gap: 8px;
        width: 100%;
        min-width: 0;
        padding: 2px 0;
        border: 0;
        font-size: 0.86rem;
        line-height: 1.3;
    }

    .login-activity-table td::before {
        color: var(--ic-text-muted);
        font-size: 0.75rem;
        font-weight: 850;
        line-height: 1.3;
        text-transform: none;
    }

    .login-activity-table td:nth-child(1)::before { content: "Location"; }
    .login-activity-table td:nth-child(2)::before { content: "IP"; }
    .login-activity-table td:nth-child(3)::before { content: "First seen"; }
    .login-activity-table td:nth-child(4)::before { content: "Last seen"; }
    .login-activity-table td:nth-child(5)::before { content: "Uses"; }

    .login-activity-table td > * {
        min-width: 0;
    }

    .login-activity-table code {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .home-section-link,
    .home-section-link:hover {
        opacity: 1;
        transform: none;
    }

    .home-section-link {
        min-height: 0;
        transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
        will-change: auto;
        backdrop-filter: none;
    }
}

@media (max-width: 420px) {
    .login-activity-table td {
        grid-template-columns: 82px minmax(0, 1fr);
    }
}

@media (max-width: 340px) {
    .forum-category-accordion[open] > .forum-category-grid {
        grid-template-columns: 1fr;
    }
}

/* Targeted desktop cleanup: navbar alignment, forum search width, connected editors, auth icons. */
@media (min-width: 761px) {
    .site-nav-links {
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .site-nav-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 38px;
        min-height: 38px;
        padding: 0 14px;
        border: 1px solid transparent;
        border-radius: 999px;
        font-size: 0.96rem;
        font-weight: 850;
        line-height: 1;
        text-align: center;
        transform: none;
    }

    .site-nav-links a:hover,
    .site-nav-links a:focus-visible {
        color: var(--ic-text-strong);
        background: rgba(255, 255, 255, 0.065);
        border-color: var(--ic-border);
        box-shadow: none;
        transform: none;
    }

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

    .nav-icon-link,
    .site-nav-account .nav-cta,
    .account-menu summary {
        height: 42px;
        min-height: 42px;
        transform: none;
    }

    .nav-icon-link {
        width: 42px;
        min-width: 42px;
    }

    .site-nav-account .nav-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        color: var(--ic-text-strong) !important;
        background: rgba(37, 37, 37, 0.78) !important;
        border: 1px solid var(--ic-border) !important;
        border-radius: 999px;
        box-shadow: none;
        font-size: 0.86rem;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .site-nav-account .nav-cta:hover,
    .site-nav-account .nav-cta:focus-visible,
    .nav-icon-link:hover,
    .nav-icon-link:focus-visible,
    .account-menu summary:hover,
    .account-menu summary:focus-visible {
        color: #fff;
        background: rgba(48, 48, 50, 0.94) !important;
        border-color: var(--ic-border-strong) !important;
        box-shadow: none;
        transform: none;
    }

    .account-menu summary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 0 12px 0 0;
        border: 1px solid transparent;
        border-radius: 999px;
        line-height: 1;
    }

    .account-menu summary .avatar-xs,
    .account-menu summary .avatar-image,
    .account-menu summary .avatar-fallback {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        font-size: 0.95rem;
    }

    .account-menu summary .avatar-image {
        object-fit: cover;
    }

    .account-menu summary > span:not(.avatar-fallback) {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        line-height: 1;
    }

    .forum-controls {
        width: 100%;
    }

    .forum-controls .forum-search {
        width: 100%;
    }
}

.editor-shell {
    border-radius: var(--ic-radius-md);
}

.editor-shell > .editor-toolbar {
    border-radius: var(--ic-radius-md) var(--ic-radius-md) 0 0;
}

.editor-shell > .editor-canvas {
    background: transparent;
    border: 0;
    border-top: 0;
    border-radius: 0 0 var(--ic-radius-md) var(--ic-radius-md);
    box-shadow: none;
}

.editor-shell > .editor-canvas:focus {
    box-shadow: none;
}

.auth-field-with-icon::before,
.auth-field-with-icon::after {
    display: none;
    content: none;
}

.auth-field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: var(--ic-text-dim);
    pointer-events: none;
    transform: translateY(-50%);
}

.auth-field-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-field-with-icon:focus-within .auth-field-icon {
    color: var(--ic-text-muted);
}

.auth-input-shell {
    position: relative;
    display: grid;
    min-width: 0;
}

.auth-input-shell input {
    width: 100%;
}

.auth-field-with-icon .auth-input-shell input {
    padding-left: 46px !important;
}

.auth-input-shell .auth-field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.auth-input-shell:focus-within .auth-field-icon {
    color: var(--ic-text-muted);
}

.field-errors {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.field-errors .errorlist {
    margin: 0;
    padding-left: 18px;
}

@media (min-width: 761px) {
    .site-nav-account,
    .site-nav-account .nav-popover-wrap,
    .site-nav-account .account-menu {
        display: inline-flex;
        align-items: center;
        height: 42px;
        margin: 0;
        line-height: 1;
    }

    .account-menu summary {
        box-sizing: border-box;
        vertical-align: middle;
    }
}

@media (max-width: 760px) {
    .site-nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .brand-mark {
        flex: 1 1 auto;
        min-width: 0;
    }

    .mobile-navbar-new-topic,
    .nav-menu-toggle {
        flex: 0 0 auto;
    }

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

.topic-form-layout .topic-form {
    background:
        linear-gradient(180deg, rgba(32, 32, 32, 0.92), rgba(17, 17, 18, 0.94));
    border-color: var(--ic-border);
}

.topic-form .choice-card,
.topic-form input[type="text"],
.topic-form .editor-shell {
    background: rgba(18, 18, 19, 0.94);
    border-color: var(--ic-border);
}

.topic-form .choice-card:hover,
.topic-form .choice-card:focus-within {
    background: rgba(255, 255, 255, 0.065);
    border-color: var(--ic-border-strong);
    transform: none;
}

.topic-form .choice-card:has(input:checked),
.topic-form .topic-category-choice-card:has(input:checked) {
    background: var(--ic-accent-soft);
    border-color: rgba(239, 58, 58, 0.34);
    box-shadow: none;
}

.topic-form .choice-card:has(input:checked) span,
.topic-form .topic-category-choice-card:has(input:checked) span {
    color: var(--ic-text-strong);
}

.topic-form .editor-toolbar button.is-active {
    border-color: rgba(239, 58, 58, 0.34);
    box-shadow: none;
}

.topic-form .editor-canvas:focus {
    box-shadow: none;
}

body.chat-page .chat-main-stack,
body.chat-page .chat-sidebar-panel {
    background:
        linear-gradient(180deg, rgba(32, 32, 32, 0.92), rgba(17, 17, 18, 0.94));
    border-color: var(--ic-border);
}

body.chat-page .chat-tabs,
body.chat-page .panel-title,
body.chat-page .room-panel-header {
    border-bottom-color: var(--ic-border);
}

body.chat-page .chat-tab:hover,
body.chat-page .chat-tab:focus-visible,
body.chat-page .chat-tab.is-active,
body.chat-page .active-user-row:hover,
body.chat-page .active-user-row:focus-visible,
body.chat-page .chat-room-row.is-active,
body.chat-page .mobile-chat-target:hover,
body.chat-page .mobile-chat-target:focus-visible,
body.chat-page .mobile-chat-target.is-active,
body.chat-page .mobile-chat-room-row.is-active,
body.chat-page .mobile-online-user:hover,
body.chat-page .mobile-online-user:focus-visible {
    background: rgba(255, 255, 255, 0.065);
    border-color: var(--ic-border);
}

body.chat-page .chat-sidebar-section + .chat-sidebar-section::before,
body.chat-page .mobile-chat-section + .mobile-chat-section,
body.chat-page .mobile-chat-section-toggle,
body.chat-page .mobile-chat-target,
body.chat-page .mobile-chat-room-row,
body.chat-page .mobile-online-user,
body.chat-page .mobile-chat-invite,
body.chat-page .chat-message {
    border-color: rgba(255, 255, 255, 0.09);
}

body.chat-page .chat-message {
    border-bottom-color: rgba(255, 255, 255, 0.09);
}

@media (min-width: 761px) {
    body.chat-page .chat-main-stack .message-list {
        margin-right: -10px;
        margin-left: -10px;
    }

    body.chat-page .chat-main-stack .chat-message {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 760px) {
    .forum-search input {
        font-size: 16px;
    }

    .forum-category-accordion > .forum-category-grid .category-card {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 7px 10px;
        text-align: center;
    }

    .forum-category-accordion > .forum-category-grid .category-card-copy {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 0;
    }

    .forum-category-accordion > .forum-category-grid .category-card strong {
        display: block;
        width: 100%;
        line-height: 1.15;
        text-align: center;
    }

    body.chat-page .mobile-chat-toggle {
        min-height: 42px;
        color: var(--ic-text-strong);
        background: #2d2d2d;
        border: 1px solid rgb(63, 63, 63);
        border-radius: 10px;
        box-shadow: none;
    }

    body.chat-page .mobile-chat-toggle:hover,
    body.chat-page .mobile-chat-toggle:focus-visible {
        background: #2d2d2d;
        border-color: rgb(110, 110, 110);
    }

    body.chat-page .mobile-chat-drawer {
        background: rgba(17, 17, 18, 0.98);
        border-color: var(--ic-border);
        border-radius: 12px;
    }
}

.mobile-bottom-nav,
.mobile-bottom-sheet,
.mobile-bottom-sheet-backdrop {
    display: none;
}

body.chat-page .mobile-bottom-nav,
body.chat-page .mobile-bottom-sheet,
body.chat-page .mobile-bottom-sheet-backdrop {
    display: none !important;
}

@media (max-width: 760px) {
    body.chat-page .chat-composer {
        height: 44px;
        min-height: 44px;
        margin: 8px 10px max(10px, calc(env(safe-area-inset-bottom, 0px) + 2px));
        padding: 0 12px;
    }

    body.chat-page .chat-composer input[name="message"],
    body.chat-page .chat-composer textarea {
        font-size: 16px;
        line-height: 1.3;
    }
}

@media (max-width: 760px) {
    body.has-mobile-bottom-nav:not(.chat-page) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 7800;
        display: block;
        padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(9, 9, 11, 0.94);
        border-top: 1px solid var(--ic-border);
        box-shadow: 0 -18px 34px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        transform: translateY(0);
        transition: transform 200ms ease;
    }

    .mobile-bottom-nav.is-hidden {
        transform: translateY(calc(100% + 12px));
    }

    .mobile-bottom-nav__inner {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        width: min(520px, 100%);
        margin: 0 auto;
    }

    .mobile-bottom-nav-item {
        position: relative;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 52px;
        gap: 3px;
        padding: 6px 2px 5px;
        color: var(--ic-text-dim);
        background: transparent;
        border: 0;
        border-radius: 10px;
        box-shadow: none;
        font: inherit;
        line-height: 1;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition:
            color 180ms ease,
            background-color 180ms ease,
            transform 180ms ease;
    }

    .mobile-bottom-nav-item:hover,
    .mobile-bottom-nav-item:focus-visible,
    .mobile-bottom-nav-item.is-active {
        color: var(--ic-text-strong);
        background: rgba(255, 255, 255, 0.07);
        outline: 0;
    }

    .mobile-bottom-nav-item:active {
        transform: translateY(1px);
    }

    .mobile-bottom-nav-icon {
        display: grid;
        place-items: center;
        width: 22px;
        height: 22px;
    }

    .mobile-bottom-nav-icon svg {
        display: block;
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.85;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        color: inherit;
        font-size: 0.68rem;
        font-weight: 850;
        line-height: 1.05;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav-badge {
        position: absolute;
        top: 5px;
        left: 50%;
        min-width: 17px;
        height: 17px;
        margin-left: 7px;
        padding: 0 4px;
        color: #fff;
        background: var(--ic-accent-hover);
        border: 1px solid rgba(0, 0, 0, 0.52);
        border-radius: 999px;
        font-size: 0.63rem;
        font-weight: 950;
        line-height: 15px;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    }

    .mobile-bottom-sheet-backdrop:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 7790;
        display: block;
        background: transparent;
    }

    .mobile-bottom-sheet:not([hidden]) {
        position: fixed;
        right: 10px;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        left: 10px;
        z-index: 7810;
        display: grid;
        gap: 8px;
        width: min(520px, calc(100% - 20px));
        margin: 0 auto;
        padding: 10px;
        background: rgba(15, 15, 17, 0.98);
        border: 1px solid var(--ic-border);
        border-radius: 14px 14px 10px 10px;
        box-shadow: 0 20px 46px rgba(0, 0, 0, 0.46);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        animation: mobile-bottom-sheet-in 180ms ease-out;
    }

    .mobile-bottom-sheet a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 48px;
        padding: 9px 11px;
        color: var(--ic-text);
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid var(--ic-border);
        border-radius: 10px;
        text-decoration: none;
    }

    .mobile-bottom-sheet a:hover,
    .mobile-bottom-sheet a:focus-visible {
        color: var(--ic-text-strong);
        background: rgba(255, 255, 255, 0.07);
        border-color: var(--ic-border-strong);
        outline: 0;
    }

    .mobile-bottom-sheet a span:first-child {
        display: grid;
        min-width: 0;
        gap: 2px;
    }

    .mobile-bottom-sheet strong {
        font-size: 0.88rem;
        line-height: 1.1;
    }

    .mobile-bottom-sheet small {
        color: var(--ic-text-dim);
        font-size: 0.73rem;
        line-height: 1.2;
    }

    .mobile-bottom-sheet-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        color: #fff;
        background: var(--ic-accent-hover);
        border-radius: 999px;
        font-size: 0.68rem;
        font-weight: 950;
        line-height: 1;
    }
}

@keyframes mobile-bottom-sheet-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.account-deletion-banner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    width: min(var(--ic-content-wide), calc(100% - 32px));
    margin: 12px auto 0;
    padding: 9px 12px;
    color: #ffe2e2;
    background: rgba(104, 18, 18, 0.9);
    border: 1px solid rgba(255, 93, 93, 0.42);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    font-size: 0.9rem;
    line-height: 1.35;
}

.account-deletion-banner a {
    color: #fff;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.account-deletion-banner-action {
    display: inline-grid;
    place-items: center;
    min-height: 32px;
    padding: 6px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1;
}

.account-deletion-banner .account-deletion-banner-action {
    text-decoration: none;
}

.account-deletion-banner-action:hover,
.account-deletion-banner-action:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
    transform: none;
}

.account-delete-page {
    display: grid;
    width: min(var(--ic-content-form), 100%);
    margin: 0 auto;
}

.account-delete-panel {
    display: grid;
    gap: 14px;
}

.account-delete-copy {
    display: grid;
    gap: 8px;
}

.account-delete-form,
.account-delete-actions {
    display: grid;
    gap: 12px;
}

.account-delete-actions {
    grid-template-columns: repeat(2, minmax(0, max-content));
    align-items: center;
}

.account-delete-warning {
    color: #ffc7c7;
    font-weight: 850;
}

.profile-menu {
    justify-self: end;
}

.profile-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    color: var(--ic-text-strong);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.profile-menu-trigger:hover,
.profile-menu-trigger:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}

.profile-menu-icon {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}

.profile-menu-icon circle {
    fill: currentColor;
    stroke: none;
}

.profile-menu-panel {
    min-width: 210px;
}

.topic-detail-layout .compact-composer .editor-shell {
    background: rgba(18, 18, 19, 0.94);
    border-color: var(--ic-border);
    border-radius: var(--ic-radius-md);
    box-shadow: var(--ic-shadow-inset);
}

.topic-detail-layout .compact-composer .editor-toolbar {
    background: rgba(18, 18, 19, 0.94);
    border-bottom-color: var(--ic-border);
}

.topic-detail-layout .compact-composer .editor-canvas {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.topic-detail-layout .compact-composer .editor-shell:focus-within {
    border-color: rgba(239, 58, 58, 0.42);
    box-shadow: var(--ic-shadow-inset), var(--ic-focus);
}

.reply-delete-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.reply-delete-button {
    min-width: 30px;
    padding: 4px 8px;
    color: #ffb3b3 !important;
}

.reply-delete-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-footer {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    padding-top: 12px;
    line-height: 1.25;
    text-align: center;
}

.site-footer-row,
.site-footer-legal {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px 7px;
    min-width: 0;
}

.site-footer-primary > strong {
    color: var(--ic-text-strong);
    font-size: 0.84rem;
    line-height: 1.2;
}

.site-footer-legal a,
.site-footer-contact,
.site-footer-copy {
    min-height: 0;
    color: var(--ic-text-muted);
    font-size: 0.8rem;
    line-height: 1.25;
}

.site-footer-copy {
    color: var(--ic-text-dim);
}

.site-footer-row > span,
.site-footer-legal span {
    color: var(--ic-text-dim);
}

@media (max-width: 760px) {
    .account-deletion-banner {
        width: min(100% - 18px, var(--ic-content));
        margin-top: 8px;
        justify-content: flex-start;
        padding: 9px 10px;
        font-size: 0.84rem;
    }

    .account-deletion-banner-action {
        min-height: 30px;
        padding: 6px 10px;
    }

    .account-delete-actions {
        grid-template-columns: 1fr;
    }

    .profile-page .profile-menu {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
        justify-self: end;
    }

    .profile-page .profile-menu-trigger {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
    }

    .site-footer {
        gap: 3px 0;
        margin-bottom: 10px;
        padding-top: 8px;
    }

    .site-footer-row {
        width: 100%;
    }

    .site-footer-legal a,
    .site-footer-contact,
    .site-footer-copy {
        font-size: 0.78rem;
    }

    body.chat-page .site-footer {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .profile-page .profile-menu {
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
    }
}

/* Forum topic detail mobile reference implementation. */
.topic-mobile-chips,
.add-reply-icon,
.mobile-scroll-top,
.reply-action-icon {
    display: none;
}

.topic-detail-layout .reply-options-menu {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    z-index: 30;
    overflow: visible;
}

.topic-detail-layout .reply-options-menu[open] {
    z-index: 1600;
}

.topic-detail-layout .reply-options-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    color: var(--ic-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
}

.topic-detail-layout .reply-options-trigger::-webkit-details-marker {
    display: none;
}

.topic-detail-layout .reply-options-trigger:hover,
.topic-detail-layout .reply-options-trigger:focus-visible,
.topic-detail-layout .reply-options-menu[open] .reply-options-trigger {
    color: var(--ic-text-strong);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--ic-border);
    outline: 0;
}

.topic-detail-layout .reply-options-icon {
    display: block;
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: none;
}

.topic-detail-layout .reply-options-panel {
    z-index: 1700;
    min-width: 116px;
    padding: 5px;
    background: rgba(15, 15, 17, 0.98);
    border-color: var(--ic-border);
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}

.topic-detail-layout .reply-options-panel .inline-action,
.topic-detail-layout .reply-options-panel .reply-delete-form {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.topic-detail-layout .reply-options-panel .action-menu-button {
    justify-content: flex-start;
    min-height: 34px;
    padding: 8px 10px;
    color: var(--ic-text);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.1;
    text-align: left;
}

.topic-detail-layout .reply-options-panel .action-menu-button:hover,
.topic-detail-layout .reply-options-panel .action-menu-button:focus-visible {
    color: var(--ic-text-strong);
    background: rgba(255, 255, 255, 0.075);
}

.topic-detail-layout .reply-options-panel .reply-delete-action {
    color: #ffb3b3 !important;
}

.reply-inline-edit-form {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin-top: 4px;
}

.reply-inline-edit-form[hidden] {
    display: none !important;
}

.reply-inline-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.reply-inline-edit-actions .btn {
    min-height: 30px;
    padding: 6px 11px;
    font-size: 0.78rem;
}

.reply-form-errors {
    color: #ffb3b3;
    font-size: 0.82rem;
    line-height: 1.35;
}

.reply-form-errors[hidden] {
    display: none !important;
}

.reply-form-errors .errorlist {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 760px) {
    body.forum-topic-detail-page {
        --topic-mobile-accent: var(--ic-accent-hover, #ef3a3a);
        --topic-mobile-surface: rgba(18, 18, 20, 0.9);
        --topic-mobile-surface-soft: rgba(255, 255, 255, 0.035);
        --topic-mobile-border: rgba(255, 255, 255, 0.11);
        --topic-mobile-border-strong: rgba(255, 255, 255, 0.18);
        --topic-mobile-text: rgba(255, 255, 255, 0.94);
        --topic-mobile-muted: rgba(255, 255, 255, 0.58);
        --topic-mobile-faint: rgba(255, 255, 255, 0.38);
        --topic-mobile-nav-height: 66px;
    }

    body.forum-topic-detail-page .site-main {
        width: min(100% - 28px, 640px);
        margin-top: 6px;
        margin-bottom: 24px;
    }

    body.forum-topic-detail-page .topic-detail-layout,
    body.forum-topic-detail-page .topic-thread-surface {
        width: 100%;
        min-width: 0;
    }

    body.forum-topic-detail-page .topic-thread-surface {
        display: grid;
        gap: 13px;
        padding: 14px;
        padding-bottom: 18px;
        background: rgba(18, 18, 20, 0.74);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
    }

    body.forum-topic-detail-page .topic-mobile-chips {
        display: flex;
        gap: 8px;
        min-width: 0;
        overflow-x: auto;
        padding: 1px 1px 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.forum-topic-detail-page .topic-mobile-chips::-webkit-scrollbar {
        display: none;
    }

    body.forum-topic-detail-page .topic-mobile-chip {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 6px;
        min-height: 32px;
        max-width: min(64vw, 190px);
        padding: 0 12px;
        overflow: hidden;
        color: var(--topic-mobile-muted);
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid var(--topic-mobile-border);
        border-radius: 999px;
        font-size: 0.84rem;
        font-weight: 800;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-mobile-chip svg {
        width: 14px;
        height: 14px;
        stroke-width: 1.8;
    }

    body.forum-topic-detail-page .topic-mobile-chip--category {
        color: var(--topic-mobile-accent);
        border-color: rgba(239, 58, 58, 0.72);
    }

    body.forum-topic-detail-page .topic-mobile-chip-dot {
        width: 7px;
        min-width: 7px;
        height: 7px;
        background: currentColor;
        border-radius: 50%;
    }

    body.forum-topic-detail-page .topic-desktop-badges {
        display: none;
    }

    body.forum-topic-detail-page .topic-detail-card {
        position: relative;
        display: grid;
        gap: 13px;
        min-width: 0;
        padding: 0 0 12px;
        overflow: visible;
        color: var(--topic-mobile-text);
        background: transparent;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 0;
        box-shadow: none;
    }

    body.forum-topic-detail-page .topic-detail-card::before {
        display: none;
        content: none;
    }

    body.forum-topic-detail-page .topic-header,
    body.forum-topic-detail-page .topic-header-main {
        display: grid;
        gap: 12px;
        min-width: 0;
    }

    body.forum-topic-detail-page .topic-detail-title {
        margin: 0;
        color: #fff;
        font-size: clamp(1.75rem, 6vw, 2rem);
        font-weight: 850;
        letter-spacing: 0;
        line-height: 1.14;
        overflow-wrap: anywhere;
    }

    body.forum-topic-detail-page .topic-author-line {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 9px;
        min-width: 0;
    }

    body.forum-topic-detail-page .author-row {
        flex: 1 1 auto;
        min-width: 0;
        gap: 10px;
    }

    body.forum-topic-detail-page .author-row .avatar-md,
    body.forum-topic-detail-page .author-row .avatar-image,
    body.forum-topic-detail-page .author-row .avatar-fallback,
    body.forum-topic-detail-page .author-row .user-preview-trigger {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    body.forum-topic-detail-page .author-row-copy {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 6px;
        min-width: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.9rem;
        line-height: 1.2;
    }

    body.forum-topic-detail-page .author-display-name {
        min-width: 0;
        max-width: 46vw;
        overflow: hidden;
        color: #fff;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-meta-dot {
        color: var(--topic-mobile-faint);
    }

    body.forum-topic-detail-page .author-row-copy .meta-row {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 5px;
        color: var(--topic-mobile-muted);
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-actions-menu {
        flex: 0 0 auto;
        z-index: 80;
    }

    body.forum-topic-detail-page .topic-actions-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 6px;
        color: var(--topic-mobile-muted);
        background: transparent;
        border: 0;
        border-radius: 8px;
        box-shadow: none;
    }

    body.forum-topic-detail-page .topic-actions-trigger svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
        stroke: none;
    }

    body.forum-topic-detail-page .topic-actions-menu .action-menu-panel {
        right: 0;
        top: calc(100% + 8px);
        z-index: 1800;
        min-width: 160px;
        background: rgba(15, 15, 17, 0.98);
        border-color: var(--topic-mobile-border-strong);
        border-radius: 12px;
    }

    body.forum-topic-detail-page .topic-copy {
        color: rgba(255, 255, 255, 0.86);
        font-size: 1rem;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    body.forum-topic-detail-page .topic-copy img,
    body.forum-topic-detail-page .topic-copy .forum-topic-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 10px 0 0;
        object-fit: cover;
        border: 1px solid var(--topic-mobile-border-strong);
        border-radius: 11px;
    }

    body.forum-topic-detail-page .topic-reaction-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding-top: 10px;
        border-top: 1px solid var(--topic-mobile-border);
    }

    body.forum-topic-detail-page .topic-reaction-row .like-button {
        width: auto;
        min-width: 58px;
        height: 30px;
        min-height: 30px;
        padding: 0 5px;
        color: var(--topic-mobile-muted);
        background: transparent !important;
        border-color: transparent;
        border-radius: 999px;
        box-shadow: none;
    }

    body.forum-topic-detail-page .topic-reaction-row .like-button-count {
        border-left: 0;
        color: inherit;
        font-size: 0.88rem;
    }

    body.forum-topic-detail-page .topic-reaction-row .like-button .like-icon {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
    }

    body.forum-topic-detail-page .add-reply-card {
        display: block;
        min-width: 0;
        min-height: 0;
        padding: 0 0 12px;
        overflow: visible;
        background: transparent;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 0;
        box-shadow: none;
    }

    body.forum-topic-detail-page .add-reply-icon {
        display: none !important;
    }

    body.forum-topic-detail-page .add-reply-icon svg {
        width: 21px;
        height: 21px;
        stroke-width: 1.8;
    }

    body.forum-topic-detail-page .add-reply-card .compact-composer,
    body.forum-topic-detail-page .add-reply-card .field-block {
        min-width: 0;
        margin: 0;
    }

    body.forum-topic-detail-page .add-reply-card .editor-shell {
        min-height: 44px;
        overflow: visible;
        background: rgba(255, 255, 255, 0.045);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;
        box-shadow: none;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar {
        display: none;
        align-items: center;
        gap: 4px;
        padding: 5px;
        border-radius: 14px 14px 0 0;
    }

    body.forum-topic-detail-page .add-reply-card:focus-within .editor-toolbar {
        display: flex;
    }

    body.forum-topic-detail-page .add-reply-card .editor-canvas {
        min-height: 44px;
        padding: 10px 14px;
        color: var(--topic-mobile-text);
        font-size: 0.98rem;
        line-height: 1.45;
        border-radius: 14px;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar button {
        width: 28px;
        min-width: 28px;
        height: 28px;
        min-height: 28px;
        padding: 0;
        font-size: 0.78rem;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar .editor-submit {
        width: auto;
        min-width: 58px;
        height: 30px;
        min-height: 30px;
        margin-left: auto;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    body.forum-topic-detail-page .add-reply-card:focus-within .editor-canvas {
        border-radius: 0 0 14px 14px;
    }

    body.forum-topic-detail-page .composer-note {
        align-self: center;
        margin: 0;
        padding: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.92rem;
    }

    body.forum-topic-detail-page .replies-panel {
        display: grid;
        gap: 10px;
        min-width: 0;
        padding: 0;
        overflow: visible;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.forum-topic-detail-page .replies-panel .section-title-row {
        display: flex;
        align-items: center;
        gap: 11px;
        min-width: 0;
        margin: 0;
    }

    body.forum-topic-detail-page .replies-panel .section-title-row h2 {
        flex: 0 0 auto;
        margin: 0;
        color: #fff;
        font-size: 0.95rem;
        font-weight: 850;
        letter-spacing: 0;
        line-height: 1;
    }

    body.forum-topic-detail-page .reply-section-rule {
        flex: 1 1 auto;
        height: 1px;
        min-width: 36px;
        background: var(--topic-mobile-border);
    }

    body.forum-topic-detail-page .thread-list {
        --reply-step: 24px;
        --reply-rail: rgba(255, 255, 255, 0.18);
        display: block;
        min-width: 0;
        overflow: visible;
    }

    body.forum-topic-detail-page .thread-list,
    body.forum-topic-detail-page .thread-list .comment,
    body.forum-topic-detail-page .thread-list .comment-children,
    body.forum-topic-detail-page .thread-list .comment-body,
    body.forum-topic-detail-page .thread-list .comment-copy,
    body.forum-topic-detail-page .thread-list .comment-actions,
    body.forum-topic-detail-page .thread-list .comment-action-row {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
    }

    body.forum-topic-detail-page .thread-connectors {
        display: none !important;
    }

    body.forum-topic-detail-page .thread-list .comment-children {
        position: relative;
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-0::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-1::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-2::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-3::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-deep::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 1px;
        background: var(--reply-rail);
        pointer-events: none;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-0::before {
        left: 12px;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-1::before {
        left: 36px;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-2::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-3::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-deep::before {
        left: 60px;
    }

    body.forum-topic-detail-page .thread-list .comment {
        --reply-pad: 0px;
        --reply-rail-x: 0px;
        position: relative;
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: start;
        gap: 9px;
        width: 100%;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 12px 0;
        padding-left: var(--reply-pad);
        overflow: visible;
        color: var(--topic-mobile-text);
        background: transparent !important;
        border: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.095);
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .thread-list > .comment:first-child {
        padding-top: 0;
        border-top: 0;
    }

    body.forum-topic-detail-page .thread-list > .comment-children + .comment {
        margin-top: 2px !important;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-1 {
        --reply-pad: 24px;
        --reply-rail-x: 12px;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-2 {
        --reply-pad: 48px;
        --reply-rail-x: 36px;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-3,
    body.forum-topic-detail-page .thread-list .reply-depth-capped {
        --reply-pad: 72px;
        --reply-rail-x: 60px;
    }

    body.forum-topic-detail-page .thread-list .comment[data-parent-id] {
        border-top: 0;
    }

    body.forum-topic-detail-page .thread-list .comment[data-parent-id]::after {
        content: "";
        position: absolute;
        left: var(--reply-rail-x);
        top: 30px;
        width: 11px;
        height: 1px;
        background: var(--reply-rail);
        pointer-events: none;
    }

    body.forum-topic-detail-page .comment-avatar {
        position: relative;
        z-index: 2;
        padding-top: 0;
    }

    body.forum-topic-detail-page .comment-avatar .avatar-sm,
    body.forum-topic-detail-page .comment-avatar .avatar-image,
    body.forum-topic-detail-page .comment-avatar .avatar-fallback,
    body.forum-topic-detail-page .comment-avatar .user-preview-trigger {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        font-size: 0.78rem;
    }

    body.forum-topic-detail-page .comment-body {
        display: grid;
        gap: 6px;
        min-width: 0;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    body.forum-topic-detail-page .comment-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 7px;
        min-width: 0;
        margin: 0;
    }

    body.forum-topic-detail-page .comment-meta-block {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    body.forum-topic-detail-page .comment-author-row {
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.88rem;
        line-height: 1.2;
    }

    body.forum-topic-detail-page .comment-author-row .author-display-name,
    body.forum-topic-detail-page .comment-author-row .user-name-link {
        min-width: 0;
        max-width: min(46vw, 190px);
        overflow: hidden;
        color: #fff;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .comment-dot {
        color: var(--topic-mobile-faint);
    }

    body.forum-topic-detail-page .comment-author-row time,
    body.forum-topic-detail-page .comment-author-row > span:not(.author-display-name):not(.comment-op-label):not(.comment-dot) {
        color: var(--topic-mobile-muted);
        white-space: nowrap;
    }

    body.forum-topic-detail-page .comment-op-label {
        color: var(--topic-mobile-accent);
        font-size: 0.72rem;
        font-weight: 950;
        line-height: 1;
    }

    body.forum-topic-detail-page .comment-standing {
        display: none !important;
    }

    body.forum-topic-detail-page .reply-context {
        margin: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.76rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    body.forum-topic-detail-page .comment-header .badge {
        flex: 0 1 auto;
        min-height: 18px;
        padding: 3px 6px;
        color: #bff0c9;
        background: rgba(125, 204, 145, 0.12);
        border-color: rgba(125, 204, 145, 0.26);
        font-size: 0.64rem;
        line-height: 1;
    }

    body.forum-topic-detail-page .comment-copy {
        max-width: 100%;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.94rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    body.forum-topic-detail-page .comment-copy img,
    body.forum-topic-detail-page .rich-copy img {
        max-width: 100%;
        height: auto;
        border-radius: 12px;
    }

    body.forum-topic-detail-page .comment.is-accepted > .comment-body {
        padding-left: 10px !important;
        border-left: 2px solid rgba(125, 204, 145, 0.62) !important;
    }

    body.forum-topic-detail-page .is-deleted-reply .comment-copy {
        color: var(--topic-mobile-muted);
        font-style: italic;
    }

    body.forum-topic-detail-page .comment-actions {
        display: grid;
        gap: 6px;
        width: 100%;
        margin: 2px 0 0;
        overflow: visible;
    }

    body.forum-topic-detail-page .comment-action-row {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        width: 100%;
        overflow: visible;
    }

    body.forum-topic-detail-page .comment-action-row .inline-action,
    body.forum-topic-detail-page .comment-action-row .like-button-form {
        display: inline-flex;
        flex: 0 0 auto;
        min-width: 0;
    }

    body.forum-topic-detail-page .comment-action-link,
    body.forum-topic-detail-page .reply-options-trigger,
    body.forum-topic-detail-page .comment-actions .like-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 30px;
        min-height: 30px;
        padding: 0 9px;
        color: rgba(255, 255, 255, 0.82);
        background: rgba(255, 255, 255, 0.025) !important;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 999px;
        box-shadow: none;
        line-height: 1;
        transform: none;
    }

    body.forum-topic-detail-page .comment-action-link,
    body.forum-topic-detail-page .reply-options-trigger {
        width: 34px;
        min-width: 34px;
        padding: 0;
    }

    body.forum-topic-detail-page .comment-action-link:hover,
    body.forum-topic-detail-page .comment-action-link:focus-visible,
    body.forum-topic-detail-page .reply-options-trigger:hover,
    body.forum-topic-detail-page .reply-options-trigger:focus-visible,
    body.forum-topic-detail-page .reply-options-menu[open] .reply-options-trigger,
    body.forum-topic-detail-page .comment-actions .like-button:hover,
    body.forum-topic-detail-page .comment-actions .like-button:focus-visible {
        color: #fff;
        background: rgba(255, 255, 255, 0.06) !important;
        border-color: rgba(255, 255, 255, 0.28);
        outline: 0;
        transform: none;
    }

    body.forum-topic-detail-page .reply-action-icon {
        display: block;
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    body.forum-topic-detail-page .reply-action-label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    body.forum-topic-detail-page .comment-actions .like-button {
        display: inline-grid;
        grid-template-columns: auto auto;
        gap: 6px;
        width: auto;
        min-width: 54px;
        padding: 0 10px;
        overflow: visible;
    }

    body.forum-topic-detail-page .comment-actions .like-button-half {
        width: auto;
        min-width: 0;
    }

    body.forum-topic-detail-page .comment-actions .like-button-count {
        border-left: 0;
        color: inherit;
        font-size: 0.78rem;
    }

    body.forum-topic-detail-page .comment-actions .like-button .like-icon {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.75;
    }

    body.forum-topic-detail-page .comment-actions .like-button.is-active .like-icon,
    body.forum-topic-detail-page .comment-actions .like-button[aria-pressed="true"] .like-icon,
    body.forum-topic-detail-page .comment-actions .like-button[data-liked="true"] .like-icon {
        fill: var(--topic-mobile-accent);
        stroke: var(--topic-mobile-accent);
    }

    body.forum-topic-detail-page .reply-options-panel {
        position: absolute;
        top: calc(100% + 6px);
        right: auto;
        bottom: auto;
        left: 0;
        max-width: min(156px, calc(100vw - 28px));
    }

    body.forum-topic-detail-page .thread-list .comment:has(.reply-options-menu[open]) {
        z-index: 1500;
    }

    body.forum-topic-detail-page .nested-reply-composer,
    body.forum-topic-detail-page .nested-composer {
        width: 100%;
        max-width: 100%;
        margin-top: 2px;
    }

    body.forum-topic-detail-page .nested-reply-composer[hidden] {
        display: none !important;
    }

    body.forum-topic-detail-page .nested-reply-composer .editor-shell {
        overflow: visible;
        border-radius: 12px;
    }

    body.forum-topic-detail-page .mobile-scroll-top {
        position: fixed;
        right: 12px;
        bottom: calc(var(--topic-mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
        z-index: 7795;
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        color: var(--topic-mobile-accent);
        background: rgba(31, 31, 34, 0.94);
        border: 1px solid var(--topic-mobile-border-strong);
        border-radius: 50%;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    body.forum-topic-detail-page .mobile-scroll-top.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    body.forum-topic-detail-page .mobile-scroll-top svg {
        width: 22px;
        height: 22px;
        stroke-width: 1.9;
    }
}

@media (max-width: 380px) {
    body.forum-topic-detail-page .site-main {
        width: min(100% - 24px, 640px);
    }

    body.forum-topic-detail-page .topic-detail-card {
        padding: 16px 14px 15px;
    }

    body.forum-topic-detail-page .topic-detail-title {
        font-size: clamp(1.68rem, 7.4vw, 1.95rem);
    }

    body.forum-topic-detail-page .author-row-copy {
        gap: 6px;
        font-size: 0.92rem;
    }

    body.forum-topic-detail-page .thread-list {
        --reply-step: 22px;
    }

    body.forum-topic-detail-page .thread-list .comment {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-1 {
        --reply-pad: 22px;
        --reply-rail-x: 11px;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-2 {
        --reply-pad: 44px;
        --reply-rail-x: 33px;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-3,
    body.forum-topic-detail-page .thread-list .reply-depth-capped {
        --reply-pad: 66px;
        --reply-rail-x: 55px;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-0::before {
        left: 11px;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-1::before {
        left: 33px;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-2::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-3::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-deep::before {
        left: 55px;
    }

    body.forum-topic-detail-page .comment-avatar .avatar-sm,
    body.forum-topic-detail-page .comment-avatar .avatar-image,
    body.forum-topic-detail-page .comment-avatar .avatar-fallback,
    body.forum-topic-detail-page .comment-avatar .user-preview-trigger {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
    }

    body.forum-topic-detail-page .comment-action-row {
        gap: 4px;
    }

    body.forum-topic-detail-page .comment-action-link,
    body.forum-topic-detail-page .reply-options-trigger {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }

    body.forum-topic-detail-page .reply-action-icon,
    body.forum-topic-detail-page .comment-actions .like-button .like-icon {
        width: 15px;
        height: 15px;
    }

    body.forum-topic-detail-page .comment-actions .like-button {
        min-width: 50px;
        height: 30px;
        min-height: 30px;
        padding-inline: 8px;
    }
}

/* Shared compact mobile navigation and topic detail correction pass. */
@media (max-width: 760px) {
    body.has-mobile-bottom-nav:not(.chat-page) {
        padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    }

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

    .site-nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
    }

    .brand-mark {
        flex: 1 1 auto;
        min-width: 0;
    }

    .brand-wordmark {
        max-width: 100%;
        font-size: clamp(1.25rem, 5.3vw, 1.43rem);
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-navbar-new-topic {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 0.9rem;
        line-height: 1;
    }

    .nav-menu-toggle {
        flex: 0 0 auto;
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 4px 0;
    }

    .nav-menu-toggle span {
        left: 4px;
        width: 26px;
        height: 2px;
    }

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

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

    .nav-menu-toggle[aria-expanded="true"] span:nth-child(1),
    .nav-menu-toggle.is-active span:nth-child(1),
    .site-nav.is-menu-open .nav-menu-toggle span:nth-child(1) {
        top: 8px;
        left: 8px;
        width: 24px;
    }

    .nav-menu-toggle[aria-expanded="true"] span:nth-child(3),
    .nav-menu-toggle.is-active span:nth-child(3),
    .site-nav.is-menu-open .nav-menu-toggle span:nth-child(3) {
        top: 26px;
        left: 8px;
        width: 24px;
    }

    .mobile-bottom-nav {
        padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
        background: rgba(10, 10, 12, 0.96);
    }

    .mobile-bottom-nav-item {
        min-height: 46px;
        gap: 2px;
        padding: 4px 2px;
        color: rgba(255, 255, 255, 0.54);
        background: transparent;
    }

    .mobile-bottom-nav-item:hover,
    .mobile-bottom-nav-item:focus-visible {
        color: var(--ic-text-strong);
        background: rgba(255, 255, 255, 0.055);
    }

    .mobile-bottom-nav-item.is-active {
        color: var(--ic-accent-hover);
        background: transparent;
    }

    .mobile-bottom-nav-icon,
    .mobile-bottom-nav-icon svg {
        width: 24px;
        height: 24px;
    }

    .mobile-bottom-nav-label {
        font-size: 0.75rem;
        font-weight: 800;
    }

    body.forum-topic-detail-page {
        --topic-mobile-accent: var(--ic-accent-hover, #ef3a3a);
        --topic-mobile-surface: rgba(23, 23, 25, 0.82);
        --topic-mobile-surface-field: rgba(255, 255, 255, 0.045);
        --topic-mobile-border: rgba(255, 255, 255, 0.1);
        --topic-mobile-border-faint: rgba(255, 255, 255, 0.06);
        --topic-mobile-text: rgba(255, 255, 255, 0.92);
        --topic-mobile-muted: rgba(255, 255, 255, 0.58);
        --topic-mobile-faint: rgba(255, 255, 255, 0.36);
        --topic-mobile-nav-height: 58px;
    }

    body.forum-topic-detail-page .site-main {
        width: min(100% - 24px, 640px);
        margin-top: 8px;
        margin-bottom: 18px;
    }

    body.forum-topic-detail-page .topic-detail-layout,
    body.forum-topic-detail-page .topic-thread-surface,
    body.forum-topic-detail-page .topic-detail-card,
    body.forum-topic-detail-page .add-reply-card,
    body.forum-topic-detail-page .replies-panel,
    body.forum-topic-detail-page .thread-list,
    body.forum-topic-detail-page .comment,
    body.forum-topic-detail-page .comment-body,
    body.forum-topic-detail-page .comment-copy,
    body.forum-topic-detail-page .comment-action-row {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
    }

    body.forum-topic-detail-page .topic-thread-surface {
        display: grid;
        gap: 12px;
        width: 100%;
        padding: 14px;
        padding-bottom: 16px;
        overflow: visible;
        background: var(--topic-mobile-surface);
        border: 1px solid rgba(255, 255, 255, 0.075);
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    body.forum-topic-detail-page .topic-detail-card,
    body.forum-topic-detail-page .add-reply-card,
    body.forum-topic-detail-page .replies-panel {
        overflow: visible;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .topic-detail-card {
        display: grid;
        gap: 12px;
        padding: 0 0 12px !important;
        border-bottom: 1px solid var(--topic-mobile-border-faint) !important;
    }

    body.forum-topic-detail-page .topic-detail-card::before {
        display: none !important;
        content: none !important;
    }

    body.forum-topic-detail-page .topic-mobile-chips {
        display: flex;
        gap: 8px;
        min-width: 0;
        margin: 0 -2px;
        padding: 0 2px 2px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.forum-topic-detail-page .topic-mobile-chips::-webkit-scrollbar {
        display: none;
    }

    body.forum-topic-detail-page .topic-mobile-chip {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 6px;
        min-height: 30px;
        max-width: min(70vw, 210px);
        padding: 0 11px;
        overflow: hidden;
        color: var(--topic-mobile-muted);
        background: rgba(255, 255, 255, 0.028);
        border: 1px solid var(--topic-mobile-border);
        border-radius: 999px;
        font-size: 0.82rem;
        font-weight: 800;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-mobile-chip svg {
        width: 13px;
        height: 13px;
    }

    body.forum-topic-detail-page .topic-mobile-chip--category {
        color: var(--topic-mobile-accent);
        border-color: rgba(239, 58, 58, 0.46);
    }

    body.forum-topic-detail-page .topic-mobile-chip-dot {
        width: 6px;
        min-width: 6px;
        height: 6px;
    }

    body.forum-topic-detail-page .topic-header,
    body.forum-topic-detail-page .topic-header-main {
        display: grid;
        gap: 10px;
        min-width: 0;
    }

    body.forum-topic-detail-page .topic-detail-title {
        margin: 0;
        color: #fff;
        font-size: clamp(1.75rem, 6vw, 2rem);
        font-weight: 800;
        letter-spacing: 0;
        line-height: 1.14;
        overflow-wrap: anywhere;
    }

    body.forum-topic-detail-page .topic-author-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
    }

    body.forum-topic-detail-page .author-row {
        flex: 1 1 auto;
        min-width: 0;
        gap: 9px;
    }

    body.forum-topic-detail-page .author-row .avatar-md,
    body.forum-topic-detail-page .author-row .avatar-image,
    body.forum-topic-detail-page .author-row .avatar-fallback,
    body.forum-topic-detail-page .author-row .user-preview-trigger {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    body.forum-topic-detail-page .author-row-copy {
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.88rem;
        line-height: 1.2;
    }

    body.forum-topic-detail-page .author-display-name {
        min-width: 0;
        max-width: min(46vw, 190px);
        overflow: hidden;
        color: #fff;
        font-size: 1rem;
        font-weight: 850;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .author-row-copy .meta-row {
        flex: 0 0 auto;
        color: var(--topic-mobile-muted);
        font-size: 0.84rem;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-actions-menu {
        flex: 0 0 auto;
        z-index: 80;
    }

    body.forum-topic-detail-page .topic-actions-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 6px;
        color: var(--topic-mobile-muted);
        background: transparent !important;
        border: 0 !important;
        border-radius: 0;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .topic-actions-trigger svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
        stroke: none;
    }

    body.forum-topic-detail-page .topic-actions-menu .action-menu-panel {
        z-index: 1800;
        min-width: 150px;
        overflow: visible;
        background: rgba(15, 15, 17, 0.98);
        border-color: rgba(255, 255, 255, 0.16);
        border-radius: 10px;
    }

    body.forum-topic-detail-page .topic-copy {
        color: rgba(255, 255, 255, 0.88);
        font-size: 1rem;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    body.forum-topic-detail-page .topic-copy img,
    body.forum-topic-detail-page .topic-copy .forum-topic-image {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 10px 0 0;
        border: 1px solid rgba(255, 255, 255, 0.13);
        border-radius: 11px;
        box-shadow: none;
    }

    body.forum-topic-detail-page .topic-reaction-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding-top: 4px;
        border-top: 0;
    }

    body.forum-topic-detail-page .topic-reaction-row .like-button {
        width: auto;
        min-width: 48px;
        height: 28px;
        min-height: 28px;
        padding: 0 4px;
        color: var(--topic-mobile-muted);
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .topic-reaction-row .like-button .like-icon {
        width: 21px;
        height: 21px;
    }

    body.forum-topic-detail-page .topic-reaction-row .like-button-count {
        border-left: 0;
        font-size: 0.9rem;
    }

    body.forum-topic-detail-page .add-reply-card {
        padding: 0 0 12px !important;
        border-bottom: 1px solid var(--topic-mobile-border-faint) !important;
    }

    body.forum-topic-detail-page .add-reply-icon {
        display: none !important;
    }

    body.forum-topic-detail-page .add-reply-card .compact-composer,
    body.forum-topic-detail-page .add-reply-card .field-block {
        min-width: 0;
        margin: 0;
    }

    body.forum-topic-detail-page .add-reply-card .editor-shell,
    body.forum-topic-detail-page .nested-reply-composer .editor-shell {
        min-height: 46px;
        overflow: visible;
        background: var(--topic-mobile-surface-field);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;
        box-shadow: none;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar,
    body.forum-topic-detail-page .nested-reply-composer .editor-toolbar {
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        padding: 5px;
        background: rgba(18, 18, 19, 0.94);
        border-radius: 14px 14px 0 0;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar {
        display: none;
    }

    body.forum-topic-detail-page .add-reply-card:focus-within .editor-toolbar {
        display: flex;
    }

    body.forum-topic-detail-page .add-reply-card .editor-canvas,
    body.forum-topic-detail-page .nested-reply-composer .editor-canvas {
        min-height: 46px;
        padding: 11px 14px;
        color: var(--topic-mobile-text);
        background: transparent;
        border: 0;
        border-radius: 14px;
        box-shadow: none;
        font-size: 1rem;
        line-height: 1.45;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar button,
    body.forum-topic-detail-page .nested-reply-composer .editor-toolbar button {
        width: 28px;
        min-width: 28px;
        height: 28px;
        min-height: 28px;
        padding: 0;
        font-size: 0.78rem;
    }

    body.forum-topic-detail-page .add-reply-card .editor-toolbar .editor-submit,
    body.forum-topic-detail-page .nested-reply-composer .editor-toolbar .editor-submit {
        width: auto;
        min-width: 56px;
        height: 32px;
        min-height: 32px;
        margin-left: auto;
        padding: 0 11px;
        font-size: 0.78rem;
    }

    body.forum-topic-detail-page .add-reply-card:focus-within .editor-canvas,
    body.forum-topic-detail-page .nested-reply-composer .editor-canvas {
        border-radius: 0 0 14px 14px;
    }

    body.forum-topic-detail-page .replies-panel {
        display: grid;
        gap: 10px;
        padding: 0 !important;
    }

    body.forum-topic-detail-page .replies-panel .section-title-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

    body.forum-topic-detail-page .replies-panel .section-title-row h2 {
        flex: 0 0 auto;
        margin: 0;
        color: #fff;
        font-size: 0.95rem;
        font-weight: 850;
        letter-spacing: 0;
        line-height: 1;
    }

    body.forum-topic-detail-page .reply-section-rule {
        flex: 1 1 auto;
        height: 1px;
        min-width: 34px;
        background: var(--topic-mobile-border-faint);
    }

    body.forum-topic-detail-page .thread-list {
        --reply-step: 20px;
        --reply-rail-gap: 18px;
        --reply-rail: rgba(255, 255, 255, 0.14);
        display: block;
        overflow: visible;
    }

    body.forum-topic-detail-page .thread-connectors {
        display: none !important;
    }

    body.forum-topic-detail-page .thread-list .comment-children {
        position: relative;
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-0::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-1::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-2::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-3::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-deep::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 2px;
        width: 1px;
        background: var(--reply-rail);
        pointer-events: none;
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-0::before {
        left: var(--reply-rail-gap);
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-1::before {
        left: calc(var(--reply-rail-gap) * 2);
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-2::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-3::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-deep::before {
        left: calc(var(--reply-rail-gap) * 3);
    }

    body.forum-topic-detail-page .thread-list .comment {
        --reply-avatar-size: 32px;
        --reply-avatar-gap: 8px;
        --reply-pad: 0px;
        --reply-rail-x: 0px;
        position: relative;
        display: grid;
        grid-template-columns: var(--reply-avatar-size) minmax(0, 1fr);
        align-items: start;
        gap: var(--reply-avatar-gap);
        width: 100%;
        margin: 0 !important;
        padding: 9px 0;
        padding-left: var(--reply-pad);
        overflow: visible;
        color: var(--topic-mobile-text);
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.forum-topic-detail-page .thread-list > .comment:first-child {
        padding-top: 0;
    }

    body.forum-topic-detail-page .thread-list > .comment + .comment,
    body.forum-topic-detail-page .thread-list > .comment-children + .comment {
        margin-top: 14px !important;
        padding-top: 14px;
        border-top: 1px solid var(--topic-mobile-border-faint) !important;
    }

    body.forum-topic-detail-page .thread-list .reply-depth-1 {
        --reply-pad: 26px;
        --reply-rail-x: var(--reply-rail-gap);
    }

    body.forum-topic-detail-page .thread-list .reply-depth-2 {
        --reply-pad: 46px;
        --reply-rail-x: calc(var(--reply-rail-gap) * 2);
    }

    body.forum-topic-detail-page .thread-list .reply-depth-3,
    body.forum-topic-detail-page .thread-list .reply-depth-capped {
        --reply-pad: 66px;
        --reply-rail-x: calc(var(--reply-rail-gap) * 3);
    }

    body.forum-topic-detail-page .thread-list .comment[data-parent-id] {
        padding-top: 8px;
        padding-bottom: 7px;
        border-top: 0 !important;
    }

    body.forum-topic-detail-page .thread-list .comment[data-parent-id]::after {
        content: "";
        position: absolute;
        left: var(--reply-rail-x);
        top: 24px;
        width: 9px;
        height: 1px;
        background: var(--reply-rail);
        pointer-events: none;
    }

    body.forum-topic-detail-page .comment-avatar .avatar-sm,
    body.forum-topic-detail-page .comment-avatar .avatar-image,
    body.forum-topic-detail-page .comment-avatar .avatar-fallback,
    body.forum-topic-detail-page .comment-avatar .user-preview-trigger {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        font-size: 0.72rem;
    }

    body.forum-topic-detail-page .comment-body {
        display: contents;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    body.forum-topic-detail-page .comment.is-accepted > .comment-body {
        padding-left: 0 !important;
        border-left: 0 !important;
    }

    body.forum-topic-detail-page .comment-header {
        grid-column: 2;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 7px;
        margin: 0;
    }

    body.forum-topic-detail-page .comment-meta-block {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    body.forum-topic-detail-page .comment-author-row {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.84rem;
        line-height: 1.2;
    }

    body.forum-topic-detail-page .comment-author-row .author-display-name,
    body.forum-topic-detail-page .comment-author-row .user-name-link {
        min-width: 0;
        max-width: min(44vw, 185px);
        overflow: hidden;
        color: #fff;
        font-size: 0.94rem;
        font-weight: 850;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .comment-author-row time::before,
    body.forum-topic-detail-page .comment-author-row > span:not(.author-display-name):not(.comment-op-label):not(.comment-dot)::before {
        display: none !important;
        content: none !important;
    }

    body.forum-topic-detail-page .reply-context {
        display: block;
        margin: 0;
        color: var(--topic-mobile-muted);
        font-size: 0.78rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    body.forum-topic-detail-page .comment-copy {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.95rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    body.forum-topic-detail-page .comment-actions {
        grid-column: 1 / -1;
        display: grid;
        gap: 5px;
        width: 100%;
        margin: 1px 0 0;
        overflow: visible;
    }

    body.forum-topic-detail-page .reply-inline-edit-form {
        grid-column: 1 / -1;
    }

    body.forum-topic-detail-page .comment-action-row {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        width: 100%;
        overflow: visible;
    }

    body.forum-topic-detail-page .comment-action-link,
    body.forum-topic-detail-page .reply-options-trigger,
    body.forum-topic-detail-page .comment-actions .like-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 28px;
        min-height: 28px;
        color: rgba(255, 255, 255, 0.72);
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 999px;
        box-shadow: none !important;
        line-height: 1;
        transform: none !important;
    }

    body.forum-topic-detail-page .comment-action-link,
    body.forum-topic-detail-page .reply-options-trigger {
        width: 30px;
        min-width: 30px;
        padding: 0;
    }

    body.forum-topic-detail-page .reply-action-trigger {
        width: auto;
        min-width: 40px;
        padding: 0 10px;
        border-color: rgba(255, 255, 255, 0.12);
        border-radius: 999px;
    }

    body.forum-topic-detail-page .reply-options-trigger {
        border-color: transparent;
    }

    body.forum-topic-detail-page .reply-action-icon,
    body.forum-topic-detail-page .reply-options-icon {
        width: 15px;
        height: 15px;
    }

    body.forum-topic-detail-page .reply-action-trigger .reply-action-icon {
        width: 16px;
        height: 16px;
        margin: 0 auto;
    }

    body.forum-topic-detail-page .reply-action-trigger::before,
    body.forum-topic-detail-page .reply-answer-button::before {
        display: none !important;
        content: none !important;
    }

    body.forum-topic-detail-page .comment-actions .like-button {
        display: inline-grid;
        grid-template-columns: auto auto;
        gap: 5px;
        width: auto;
        min-width: 48px;
        padding: 0 8px;
    }

    body.forum-topic-detail-page .comment-actions .like-button .like-icon {
        width: 15px;
        height: 15px;
    }

    body.forum-topic-detail-page .comment-actions .like-button-count {
        border-left: 0;
        font-size: 0.74rem;
    }

    body.forum-topic-detail-page .reply-options-panel {
        z-index: 1700;
        max-width: min(150px, calc(100vw - 24px));
    }
}

@media (max-width: 380px) {
    .site-nav {
        padding-inline: 12px;
    }

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

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

    .mobile-navbar-new-topic {
        min-height: 36px;
        padding-inline: 12px;
        font-size: 0.84rem;
    }

    .nav-menu-toggle {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
    }

    .mobile-bottom-nav-icon,
    .mobile-bottom-nav-icon svg {
        width: 23px;
        height: 23px;
    }

    body.forum-topic-detail-page .site-main {
        width: min(100% - 20px, 640px);
    }

    body.forum-topic-detail-page .topic-thread-surface {
        padding: 12px;
    }

    body.forum-topic-detail-page .topic-detail-card {
        padding: 0 0 11px !important;
    }

    body.forum-topic-detail-page .topic-detail-title {
        font-size: clamp(1.68rem, 7vw, 1.9rem);
    }

    body.forum-topic-detail-page .thread-list {
        --reply-step: 18px;
        --reply-rail-gap: 16px;
    }

    body.forum-topic-detail-page .thread-list .comment {
        --reply-avatar-size: 30px;
        --reply-avatar-gap: 7px;
        grid-template-columns: var(--reply-avatar-size) minmax(0, 1fr);
        gap: var(--reply-avatar-gap);
    }

    body.forum-topic-detail-page .thread-list .reply-depth-1 {
        --reply-pad: 23px;
        --reply-rail-x: var(--reply-rail-gap);
    }

    body.forum-topic-detail-page .thread-list .reply-depth-2 {
        --reply-pad: 41px;
        --reply-rail-x: calc(var(--reply-rail-gap) * 2);
    }

    body.forum-topic-detail-page .thread-list .reply-depth-3,
    body.forum-topic-detail-page .thread-list .reply-depth-capped {
        --reply-pad: 59px;
        --reply-rail-x: calc(var(--reply-rail-gap) * 3);
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-0::before {
        left: var(--reply-rail-gap);
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-1::before {
        left: calc(var(--reply-rail-gap) * 2);
    }

    body.forum-topic-detail-page .thread-list .comment-children-depth-2::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-3::before,
    body.forum-topic-detail-page .thread-list .comment-children-depth-deep::before {
        left: calc(var(--reply-rail-gap) * 3);
    }

    body.forum-topic-detail-page .comment-avatar .avatar-sm,
    body.forum-topic-detail-page .comment-avatar .avatar-image,
    body.forum-topic-detail-page .comment-avatar .avatar-fallback,
    body.forum-topic-detail-page .comment-avatar .user-preview-trigger {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }

    body.forum-topic-detail-page .comment-action-row {
        gap: 4px;
    }
}

/* Mobile deployed hotfix: chat, Wall, and shared bottom nav. */
.wall-page .media-card-footer .like-button,
.profile-wall .media-card-footer .like-button {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    min-width: 48px;
    height: 28px;
    min-height: 28px;
    padding: 0 8px;
    overflow: visible;
    color: rgba(255, 255, 255, 0.72);
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    box-shadow: none !important;
    line-height: 1;
    transform: none !important;
}

.wall-page .media-card-footer .like-button:hover,
.wall-page .media-card-footer .like-button:focus-visible,
.profile-wall .media-card-footer .like-button:hover,
.profile-wall .media-card-footer .like-button:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.28);
    transform: none !important;
}

.wall-page .media-card-footer .like-button-half,
.profile-wall .media-card-footer .like-button-half {
    width: auto;
    min-width: 0;
}

.wall-page .media-card-footer .like-button-count,
.profile-wall .media-card-footer .like-button-count {
    color: inherit;
    border-left: 0;
    font-size: 0.74rem;
}

.wall-page .media-card-footer .like-button .like-icon,
.profile-wall .media-card-footer .like-button .like-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
}

.wall-page .media-card-footer .like-button.is-active .like-icon,
.wall-page .media-card-footer .like-button[aria-pressed="true"] .like-icon,
.wall-page .media-card-footer .like-button[data-liked="true"] .like-icon,
.profile-wall .media-card-footer .like-button.is-active .like-icon,
.profile-wall .media-card-footer .like-button[aria-pressed="true"] .like-icon,
.profile-wall .media-card-footer .like-button[data-liked="true"] .like-icon {
    fill: var(--ic-accent-hover);
    stroke: var(--ic-accent-hover);
}

@media (max-width: 760px) {
    body.chat-page .chat-message {
        display: block !important;
        min-width: 0;
        max-width: 100%;
        padding: 6px 10px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        line-height: 1.38;
    }

    body.chat-page .chat-message .message-time,
    body.chat-page .chat-message .message-copy,
    body.chat-page .chat-message .message-sender,
    body.chat-page .chat-message .message-separator,
    body.chat-page .chat-message .message-text {
        display: inline !important;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        vertical-align: baseline;
    }

    body.chat-page .chat-message .message-time {
        margin-right: 4px;
        font-size: 0.72rem;
    }

    body.chat-page .chat-message .message-sender {
        font-size: 0.84rem;
    }

    body.chat-page .chat-message .message-separator {
        margin-right: 3px;
    }

    body.chat-page .mobile-chat-switcher {
        gap: 6px;
        padding: 6px 10px;
        background: rgba(7, 9, 13, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    body.chat-page .mobile-chat-toggle {
        min-height: 40px;
        padding: 7px 10px;
        background: rgba(255, 255, 255, 0.045);
        border-color: rgba(255, 255, 255, 0.13);
        border-radius: 10px;
    }

    body.chat-page .mobile-chat-current {
        font-size: 0.92rem;
        font-weight: 850;
        line-height: 1.15;
    }

    body.chat-page .mobile-chat-meta {
        gap: 7px;
    }

    body.chat-page .mobile-chat-badge {
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        color: #fff;
        background: var(--ic-accent-hover);
        border-color: rgba(255, 255, 255, 0.16);
        font-size: 0.72rem;
    }

    body.chat-page .mobile-chat-drawer {
        left: 8px;
        right: 8px;
        top: calc(100% + 4px);
        gap: 8px;
        max-height: min(66dvh, calc(100dvh - 78px));
        padding: 10px;
        background: rgba(14, 14, 16, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
    }

    body.chat-page .mobile-chat-drawer-head {
        gap: 8px;
    }

    body.chat-page .mobile-chat-drawer-head h2,
    body.chat-page .mobile-chat-section h2 {
        font-size: 0.7rem;
        letter-spacing: 0.07em;
    }

    body.chat-page .mobile-chat-close {
        min-height: 28px;
        padding: 4px 9px;
        border-radius: 999px;
        font-size: 0.74rem;
    }

    body.chat-page .mobile-chat-section {
        gap: 5px;
    }

    body.chat-page .mobile-chat-section + .mobile-chat-section {
        padding-top: 7px;
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    body.chat-page .mobile-chat-list {
        gap: 3px;
    }

    body.chat-page .mobile-chat-target,
    body.chat-page .mobile-chat-room-row,
    body.chat-page .mobile-chat-invite {
        border-radius: 10px;
    }

    body.chat-page .mobile-chat-target {
        min-height: 38px;
        padding: 7px 8px;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.chat-page .mobile-chat-target strong,
    body.chat-page .mobile-chat-room-copy strong,
    body.chat-page .mobile-chat-invite strong {
        font-size: 0.86rem;
        line-height: 1.15;
    }

    body.chat-page .mobile-chat-target small,
    body.chat-page .mobile-chat-room-copy small,
    body.chat-page .mobile-chat-invite small {
        font-size: 0.7rem;
    }

    body.chat-page .mobile-chat-section-toggle {
        min-height: 34px;
        padding: 7px 9px;
        background: rgba(255, 255, 255, 0.035);
        border-color: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        font-size: 0.82rem;
        box-shadow: none;
    }

    body.chat-page .mobile-chat-section-toggle::before {
        content: none;
    }

    body.chat-page .mobile-chat-section-toggle [data-mobile-online-count] {
        color: #ff7777;
    }

    body.chat-page .mobile-online-list .mobile-online-user {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 7px;
        min-height: 36px;
        padding: 5px 7px;
        background: transparent;
        border-color: transparent;
        border-bottom-color: rgba(255, 255, 255, 0.075);
        border-radius: 9px;
    }

    body.chat-page .mobile-online-list .mobile-online-user::after {
        width: 7px;
        height: 7px;
        box-shadow: 0 0 0 2px rgba(53, 196, 106, 0.1);
    }

    body.chat-page .mobile-online-list .mobile-online-user.is-current-user {
        background: rgba(239, 58, 58, 0.055);
        border-color: rgba(239, 58, 58, 0.16);
        box-shadow: inset 2px 0 0 rgba(239, 58, 58, 0.42);
    }

    body.chat-page .mobile-online-list .mobile-online-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.68rem;
    }

    body.chat-page .mobile-online-list .mobile-online-copy strong {
        font-size: 0.84rem;
    }

    body.chat-page .mobile-online-list .mobile-online-copy small {
        font-size: 0.68rem;
    }

    body.chat-page .mobile-online-list .mobile-online-user.is-current-user .mobile-online-copy small {
        padding: 1px 5px;
        color: #ffb3b3;
        background: rgba(239, 58, 58, 0.08);
        border-color: rgba(239, 58, 58, 0.16);
        font-size: 0.64rem;
    }

    body.chat-page .mobile-chat-drawer .empty-copy {
        margin: 0;
        padding: 7px 8px;
        color: var(--ic-text-muted);
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 9px;
        font-size: 0.78rem;
        line-height: 1.25;
    }

    body.chat-page .mobile-chat-room-row {
        min-height: 38px;
        padding: 6px 2px;
    }

    body.chat-page .mobile-chat-drawer .small-action,
    body.chat-page .mobile-chat-login {
        min-height: 28px;
        padding: 5px 8px;
        font-size: 0.72rem;
    }

    body.has-mobile-bottom-nav:not(.chat-page) {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        background-color: var(--ic-bg);
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        box-sizing: border-box;
        padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
        background: #0a0a0c;
        border-top-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.38);
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        contain: layout paint;
        will-change: transform;
    }

    .mobile-bottom-nav::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 0;
        height: max(10px, env(safe-area-inset-bottom, 0px));
        background: #0a0a0c;
        pointer-events: none;
    }

    .mobile-bottom-nav.is-hidden {
        transform: translate3d(0, calc(100% + max(10px, env(safe-area-inset-bottom, 0px))), 0);
    }

    .mobile-bottom-nav__inner {
        position: relative;
        z-index: 1;
    }

    .mobile-bottom-sheet:not([hidden]) {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .wall-page {
        gap: 14px;
    }

    .wall-page .wall-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 10px 12px;
        overflow: visible;
        border-radius: 14px;
    }

    .wall-page .wall-header-title {
        display: none;
    }

    .wall-page .wall-header-actions {
        display: grid;
        grid-template-columns: auto minmax(112px, 1fr);
        align-items: center;
        justify-content: stretch;
        gap: 9px;
        width: 100%;
        margin-left: 0;
    }

    .wall-page .wall-upload-pill.btn-primary,
    .wall-page .wall-login-cta {
        min-height: 38px;
        padding: 0 14px;
        border-radius: 999px;
        font-size: 0.88rem;
        line-height: 1;
        box-shadow: 0 8px 18px rgba(214, 43, 43, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        white-space: nowrap;
    }

    .wall-page .wall-meter {
        min-width: 0;
        padding: 7px 9px;
        gap: 3px;
        border-radius: 12px;
    }

    .wall-page .wall-meter strong {
        font-size: 0.84rem;
    }

    .wall-page .wall-meter small {
        font-size: 0.68rem;
    }

    .wall-page .media-grid {
        grid-template-columns: minmax(0, min(100%, 420px));
        justify-content: center;
        gap: 14px;
        padding-bottom: 10px;
    }

    .wall-page .media-card {
        width: 100%;
        max-width: 420px;
        justify-self: center;
        border-radius: 13px;
    }

    .wall-page .media-card:hover {
        transform: none;
    }

    .wall-page .media-preview {
        border-radius: 12px 12px 0 0;
    }

    .wall-page .media-preview img,
    .wall-page .media-preview video {
        width: 100%;
        max-height: 68dvh;
        object-fit: contain;
        background: #030509;
    }

    .wall-page .media-card-body {
        gap: 9px;
        padding: 11px;
    }

    .wall-page .media-card-header {
        align-items: center;
    }

    .wall-page .media-card-footer {
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .wall-page .wall-header-actions {
        grid-template-columns: 1fr;
    }

    .wall-page .wall-upload-pill.btn-primary,
    .wall-page .wall-login-cta {
        justify-content: center;
        width: 100%;
    }
}

/* Targeted desktop/mobile cleanup pass for Wall and forum topic cards. */
.forum-shell .topic-card,
.forum-shell .topic-card.has-image-preview {
    display: block;
    grid-template-columns: none;
    align-items: stretch;
    min-width: 0;
}

.forum-shell .topic-card-main {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.forum-shell .topic-card-meta-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.forum-shell .topic-card-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-self: center;
    padding-top: 0;
}

.forum-shell .topic-card-avatar .user-preview-trigger,
.forum-shell .topic-card-avatar .avatar-sm,
.forum-shell .topic-card-avatar .avatar-image,
.forum-shell .topic-card-avatar .avatar-fallback {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
}

.forum-shell .topic-meta {
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
}

.forum-shell .topic-meta > * + *::before {
    content: "\00b7";
    margin-right: 5px;
    color: var(--ic-text-dim);
}

.forum-shell .topic-author-name {
    max-width: min(34vw, 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-shell .topic-card h3 {
    margin: 0;
    line-height: 1.22;
}

.forum-shell .topic-excerpt {
    display: -webkit-box;
    max-width: none;
    margin: 0;
    overflow: hidden;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.forum-shell .topic-card-image-preview {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 7;
    max-height: 260px;
    margin: 0;
    background: rgba(6, 10, 15, 0.72);
}

.forum-shell .topic-card-image-preview img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.forum-shell .topic-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 2px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--line-soft);
    min-width: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.forum-shell .topic-card-footer .topic-card-badges {
    justify-content: flex-end;
}

.forum-shell .topic-card-footer .topic-card-stats {
    justify-content: flex-start;
    min-width: 0;
    padding-top: 0;
}

@media (min-width: 761px) {
    body.forum-topic-detail-page .topic-header-main {
        width: 100%;
        min-width: 0;
    }

    body.forum-topic-detail-page .topic-author-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
    }

    body.forum-topic-detail-page .author-row {
        flex: 1 1 auto;
        min-width: 0;
    }

    body.forum-topic-detail-page .author-row-copy {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 7px;
        min-width: 0;
    }

    body.forum-topic-detail-page .author-display-name {
        display: block;
        min-width: 0;
        max-width: min(42vw, 520px);
        overflow: hidden;
        color: #fff;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-meta-dot {
        flex: 0 0 auto;
        color: var(--ic-text-muted);
        line-height: 1;
    }

    body.forum-topic-detail-page .author-row-copy .meta-row {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 6px;
        color: var(--ic-text-muted);
        white-space: nowrap;
    }

    body.forum-topic-detail-page .topic-actions-menu {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .wall-page .media-card-footer .like-button {
        display: inline-grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        justify-content: stretch;
        gap: 0;
        width: 82px;
        min-width: 82px;
        height: 36px;
        min-height: 36px;
        padding: 0;
        overflow: hidden;
        color: var(--ic-text);
        background: linear-gradient(180deg, rgba(43, 43, 45, 0.98), rgba(24, 24, 25, 0.98)) !important;
        border-color: var(--ic-border);
        border-radius: 999px;
        box-shadow: var(--ic-shadow-inset) !important;
        line-height: 1;
    }

    .wall-page .media-card-footer .like-button:hover,
    .wall-page .media-card-footer .like-button:focus-visible {
        background: linear-gradient(180deg, rgba(56, 56, 58, 0.98), rgba(28, 28, 30, 0.98)) !important;
        border-color: var(--ic-border-strong);
        transform: translateY(-1px) !important;
    }

    .wall-page .media-card-footer .like-button-half {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        height: 100%;
    }

    .wall-page .media-card-footer .like-button-count {
        color: var(--muted);
        border-left: 1px solid var(--line-soft);
        font-size: 0.82rem;
    }

    .wall-page .media-card-footer .like-button .like-icon {
        width: 17px;
        height: 17px;
        fill: var(--muted-2);
        stroke: none;
        stroke-width: 0;
    }

    .wall-page .media-card-footer .like-button.is-active .like-icon,
    .wall-page .media-card-footer .like-button[aria-pressed="true"] .like-icon,
    .wall-page .media-card-footer .like-button[data-liked="true"] .like-icon {
        fill: var(--ic-accent-hover);
        stroke: none;
    }
}

@media (max-width: 760px) {
    .forum-shell .topic-card,
    .forum-shell .topic-card.has-image-preview {
        display: block;
        grid-template-columns: none;
    }

    .forum-shell .topic-card-main {
        gap: 6px;
    }

    .forum-shell .topic-card-meta-row {
        gap: 7px;
    }

    .forum-shell .topic-card-avatar .user-preview-trigger,
    .forum-shell .topic-card-avatar .avatar-sm,
    .forum-shell .topic-card-avatar .avatar-image,
    .forum-shell .topic-card-avatar .avatar-fallback {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }

    .forum-shell .topic-author-name {
        max-width: min(42vw, 190px);
    }

    .forum-shell .topic-card-image-preview {
        aspect-ratio: 16 / 9;
        max-height: 190px;
    }

    .forum-shell .topic-card-footer {
        justify-content: flex-start;
        gap: 8px 10px;
        margin-top: 2px;
        padding-top: 10px;
    }

    .forum-shell .topic-card-footer .topic-card-badges {
        justify-content: flex-start;
    }

    .forum-shell .topic-card-footer .topic-card-stats {
        justify-content: flex-start;
    }

    .wall-page .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        gap: 10px;
        padding-bottom: 10px;
    }

    .wall-page .media-card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
        border-radius: 12px;
    }

    .wall-page .media-preview {
        aspect-ratio: 1 / 1;
        border-radius: 11px 11px 0 0;
    }

    .wall-page .media-viewer-trigger {
        height: 100%;
    }

    .wall-page .media-preview img,
    .wall-page .media-preview video {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        background: #030509;
    }

    .wall-page .media-card-body {
        gap: 8px;
        padding: 9px;
    }
}

@media (max-width: 340px) {
    .wall-page .media-grid {
        grid-template-columns: 1fr;
    }
}
