:root {
    --ink: #1d2433;
    --muted: #657085;
    --line: #dfe5ee;
    --paper: #f7f8fb;
    --white: #ffffff;
    --accent: #0f8b8d;
    --accent-dark: #0a6769;
    --warm: #f2b84b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header,
.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    color: var(--white);
    background: var(--accent);
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 13px;
}

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

.nav a,
.button,
.comment-form button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    padding: 9px 12px;
    font-weight: 700;
}

.nav a:hover,
.button:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 28px;
    align-items: stretch;
    padding: 46px 0 28px;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.02;
}

.hero p {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
}

.eyebrow,
.tag {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-panel,
.content-block,
.article,
.comments {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.hero-panel {
    padding: 22px;
}

.section-grid {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.section-grid a {
    border-left: 4px solid var(--warm);
    background: var(--paper);
    padding: 12px;
    font-weight: 700;
}

.content-block,
.article,
.comments {
    margin: 26px 0;
    padding: 8px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.section-head-dotted {
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 10px;
    row-gap: 4px;
    align-items: end;
}

.section-head-dots {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: 1;
    min-width: 40px;
    border-bottom: 1px dotted var(--muted);
}

.section-head-count {
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
}

.section-head h1,
.section-head h2 {
    margin: 0 14px;
}

.section-head span,
time {
    color: var(--muted);
    font-size: 14px;
}

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

.home-news {
    margin-top: 30px;
    padding: 8px;
}

.news-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(88px, auto));
    gap: 8px;
    align-items: stretch;
}

.news-card {
    display: flex;
    min-height: 0;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    overflow: hidden;
}

.news-card-featured {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.news-card-featured .news-poster {
    height: 86px;
}

.news-poster {
    height: 60px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 8px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-meta time {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-card h3 {
    margin: 6px 0;
    line-height: 1.18;
    font-size: 16px;
}

.news-card-featured h3 {
    font-size: 20px;
}

.news-card p {
    color: var(--muted);
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
}

.read-more {
    align-self: flex-end;
    margin-top: 8px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.card {
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
}

.card h3,
.list-item h2 {
    margin: 8px 0;
    line-height: 1.2;
}

.content-poster {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
}

.content-poster img,
.article-poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-poster-card {
    height: 96px;
    margin-bottom: 12px;
}

.content-poster-list {
    flex: 0 0 120px;
    height: 76px;
}

.article-poster {
    max-height: 420px;
    margin: 18px 0;
    border-radius: 6px;
    object-fit: cover;
}

.card p,
.list-item p,
.summary {
    color: var(--muted);
}

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

.list-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.article {
    max-width: 860px;
}

.article h1 {
    margin: 10px 0;
    font-size: 42px;
    line-height: 1.1;
}

.article-category,
.category-filter a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--accent-dark);
    background: var(--paper);
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 700;
}

.article-category {
    margin-top: 8px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 8px;
}

.category-filter a.active,
.category-filter a:hover {
    color: #ffffff;
    border-color: var(--accent);
    background: var(--accent);
}

.article-body {
    margin-top: 28px;
    font-size: 18px;
}

.back-link {
    color: var(--accent-dark);
    font-weight: 700;
}

.comments {
    max-width: 860px;
}

.comments-head {
    margin-bottom: 20px;
}

.comment {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.comment p {
    margin: 6px 0 0;
}

.comments-empty {
    border-top: 1px dotted var(--line);
    color: var(--muted);
    padding: 14px 0;
    font-weight: 700;
}

.comments-login-notice {
    margin-top: 18px;
    border: 1px solid #b8dff0;
    border-radius: 4px;
    color: #2176a8;
    background: #d9f1fb;
    padding: 14px 16px;
}

.comment-pagination {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 18px 0;
    border-top: 1px dotted var(--warm);
    padding-top: 20px;
}

.comment-pagination a,
.comment-pagination span {
    min-width: 34px;
    border: 1px solid var(--line);
    border-left: 0;
    color: var(--accent-dark);
    background: var(--white);
    padding: 7px 11px;
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
}

.comment-pagination a:first-child,
.comment-pagination span:first-child {
    border-left: 1px solid var(--line);
    border-radius: 4px 0 0 4px;
}

.comment-pagination a:last-child,
.comment-pagination span:last-child {
    border-radius: 0 4px 4px 0;
}

.comment-pagination .active {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
}

.comment-pagination .disabled {
    color: var(--muted);
    background: var(--paper);
}

.comment-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.comment-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    color: var(--ink);
    font: inherit;
}

.comment-form button {
    width: fit-content;
    border-color: var(--accent);
    color: var(--white);
    background: var(--accent);
    cursor: pointer;
}

.empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 24px;
    color: var(--muted);
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin-top: 42px;
    margin-right: auto;
    margin-left: auto;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 8px;
    padding: 8px;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 5px;
}

.footer-column h3 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.2;
    text-transform: uppercase;
}

.footer-column a,
.footer-column span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.footer-column a:hover {
    color: var(--accent-dark);
}

.footer-brand {
    gap: 7px;
}

@media (max-width: 900px) {
    .site-header,
    .hero,
    .list-item {
        display: block;
    }

    .nav {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .hero-panel {
        margin-top: 22px;
    }

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

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

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

    .news-card-featured {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .cards {
        grid-template-columns: 1fr;
    }

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

    .news-card-featured {
        grid-column: auto;
    }

    .article h1 {
        font-size: 32px;
    }

    .content-block,
    .article,
    .comments {
        padding: 8px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* Auth, profile, topbar and saved user theme */
body.theme-dark {
    --ink: #f4f6fb;
    --muted: #9aa4b7;
    --line: #2b313d;
    --paper: #090b0f;
    --white: #13161c;
    --accent: #2f8cff;
    --accent-dark: #7bb8ff;
    --warm: #f2b84b;
}

body.theme-light {
    --ink: #182033;
    --muted: #687287;
    --line: #dbe2ec;
    --paper: #f4f7fb;
    --white: #ffffff;
    --accent: #2f8cff;
    --accent-dark: #1769c2;
    --warm: #f2b84b;
}

.topbar,
.section-nav,
.flash {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    display: grid;
    grid-template-columns: auto auto minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--white);
    padding: 7px 12px;
}

.brand-title {
    color: var(--ink);
    font-size: 21px;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(47, 140, 255, .35);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.search-form input,
.search-form button {
    min-height: 36px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-weight: 700;
}

.search-form input {
    padding: 0 12px;
}

.search-form button {
    border-left: 1px solid var(--line);
    cursor: pointer;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button,
.theme-switch button,
.login-button,
.user-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    background: var(--white);
    padding: 0 12px;
    font-weight: 700;
    cursor: pointer;
}

.icon-button,
.theme-switch button {
    position: relative;
    width: 38px;
    padding: 0;
}

.login-button:hover,
.icon-button:hover,
.theme-switch button:hover,
.user-button:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.user-menu {
    position: relative;
}

.user-button {
    gap: 8px;
}

.avatar {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--accent);
    font-size: 12px;
}

.dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    display: none;
    min-width: 210px;
    border: 1px solid var(--line);
    background: var(--white);
    padding: 8px 0;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.user-box.active .dropdown,
.user-menu:focus-within .dropdown {
    display: block;
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-weight: 700;
}

.dropdown a:hover {
    color: var(--accent-dark);
    background: var(--paper);
}

.dropdown .danger {
    color: #ff6262;
}

.dropdown hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 8px 0;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--white);
    padding: 10px 12px;
}

.section-nav a {
    color: var(--muted);
    font-weight: 700;
}

.section-nav a:hover {
    color: var(--accent-dark);
}

.top-section-nav {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    gap: 6px 14px;
    white-space: nowrap;
}

.flash {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    padding: 12px 14px;
    font-weight: 700;
}

.flash-error {
    border-color: #db4c4c;
    color: #ff7373;
}

.flash-success {
    border-color: #2eb872;
    color: #2eb872;
}

.loginbtn {
    position: relative;
}

.auth-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    display: none;
    width: min(340px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    padding: 14px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.loginbtn.active .auth-dropdown {
    display: block;
}

.auth-mini-form {
    display: none;
}

.auth-mini-form h3 {
    margin: 0 0 14px;
    border-bottom: 1px dotted var(--line);
    color: var(--ink);
    padding-bottom: 10px;
    font-size: 18px;
    line-height: 1.2;
}

.auth-mini-form p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.auth-mini-form label {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 700;
}

.auth-mini-form input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 0 12px;
    font: inherit;
}

.auth-mini-form input:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 140, 255, .16);
}

.input-icon {
    position: relative;
    display: block;
}

.input-icon .fa {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 1;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.input-icon:after {
    position: absolute;
    left: 34px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    border-left: 1px dotted var(--line);
    content: "";
    pointer-events: none;
}

.input-icon input {
    padding-left: 48px;
}

.input-icon:focus-within .fa {
    color: var(--accent-dark);
}

.auth-mini-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: var(--accent);
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
}

.toast-stack {
    position: fixed;
    top: 64px;
    right: 18px;
    z-index: 1000;
    display: grid;
    width: min(360px, calc(100vw - 28px));
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 30px;
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 6px;
    color: var(--ink);
    background: var(--white);
    padding: 12px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
    pointer-events: auto;
}

.toast .fa {
    color: var(--accent-dark);
}

.toast-success {
    border-left-color: #2eb872;
}

.toast-error {
    border-left-color: #db4c4c;
}

.toast-message {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.toast-close {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    background: var(--paper);
    cursor: pointer;
}

.toast-close:hover {
    color: var(--ink);
    border-color: var(--accent);
}

.toast-leave {
    opacity: 0;
    transform: translateX(18px);
    transition: opacity .18s ease, transform .18s ease;
}

.mail-badge {
    position: absolute;
    right: 2px;
    top: 2px;
    display: none;
    min-width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: #db4c4c;
    font-size: 10px;
    line-height: 1;
}

.mail-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 900;
    display: none;
    width: min(560px, calc(100vw - 24px));
    height: auto;
    background: transparent;
    padding: 0;
}

.mail-modal.active {
    display: block;
}

.mail-dialog {
    width: 100%;
    max-height: calc(100vh - 88px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .35);
}

.mail-head,
.mail-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 12px;
}

.mail-head {
    justify-content: space-between;
}

.mail-head h2 {
    margin: 0;
    font-size: 20px;
}

.mail-head button,
.mail-tabs button {
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    background: var(--paper);
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
}

.mail-tabs {
    flex-wrap: wrap;
}

.mail-tabs button.active {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
}

.mail-panel {
    display: none;
    padding: 14px;
}

.mail-panel.active {
    display: block;
}

.mail-compose {
    display: grid;
    gap: 12px;
}

.mail-compose label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.mail-compose input,
.mail-compose textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 10px 12px;
    font: inherit;
}

.mail-compose .input-icon input {
    padding-left: 48px;
}

.mail-compose textarea {
    min-height: 120px;
    resize: vertical;
}

.mail-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.mail-file-button {
    display: inline-flex;
    width: fit-content;
    min-height: 38px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
}

.mail-file-button input {
    display: none;
}

.mail-compose button {
    width: fit-content;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: var(--accent);
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.mail-selected-files {
    display: grid;
    flex: 1 1 220px;
    gap: 6px;
    min-width: 180px;
}

.mail-selected-file {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    border: 1px dotted var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 6px 8px;
    font-size: 13px;
}

.mail-selected-file small {
    color: var(--muted);
}

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

.mail-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

.mail-item.unread {
    border-color: var(--accent);
}

.mail-item strong {
    grid-column: 1 / -1;
}

.mail-item span,
.mail-item time,
.mail-meta {
    color: var(--muted);
    font-size: 13px;
}

.mail-detail {
    margin-top: 12px;
    border-top: 1px dotted var(--line);
    padding-top: 12px;
}

.mail-detail h3 {
    margin: 0 0 6px;
}

.mail-body {
    margin-top: 12px;
}

.mail-files {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding-left: 0;
    list-style: none;
}

.mail-files li {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.mail-files small {
    color: var(--muted);
}

.mail-files a {
    color: var(--accent-dark);
    font-weight: 700;
}

.mail-block {
    margin-top: 12px;
    border: 1px solid #db4c4c;
    border-radius: 6px;
    color: #ff7373;
    background: transparent;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
}

.mail-empty {
    border: 1px dashed var(--line);
    border-radius: 6px;
    color: var(--muted);
    padding: 14px;
}

.auth-shell {
    display: flex;
    justify-content: flex-end;
    min-height: 360px;
    padding-top: 28px;
}

.auth-box,
.profile-panel {
    width: min(100%, 360px);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    padding: 18px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .12);
}

.auth-box h1,
.profile-panel h1,
.profile-panel h2 {
    margin: 0 0 16px;
    border-bottom: 1px dotted var(--line);
    color: var(--ink);
    padding-bottom: 12px;
    text-align: center;
    font-size: 20px;
    line-height: 1.2;
}

.auth-box p {
    margin: 0 0 14px;
    color: var(--muted);
}

.auth-box label,
.profile-panel label {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--muted);
    font-weight: 700;
}

.auth-box input,
.profile-panel input,
.profile-panel select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 0 12px;
    font: inherit;
}

.auth-box input:focus,
.profile-panel input:focus,
.profile-panel select:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 140, 255, .16);
}

.auth-box button,
.profile-panel button {
    display: block;
    width: fit-content;
    min-width: 120px;
    min-height: 38px;
    margin-left: auto;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: var(--accent);
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-box button:hover,
.profile-panel button:hover {
    filter: brightness(1.08);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    border-top: 1px dotted var(--line);
    padding-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.auth-links a + a {
    border-left: 1px dotted var(--line);
    padding-left: 12px;
}

.auth-links a:hover {
    color: var(--accent-dark);
}

.dev-link {
    display: grid;
    gap: 8px;
    overflow-wrap: anywhere;
    border: 1px dashed var(--line);
    border-radius: 6px;
    padding: 12px;
    background: var(--paper);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    padding-top: 28px;
}

.profile-panel {
    width: auto;
}

@media (max-width: 900px) {
    .topbar {
        display: block;
    }

    .search-form,
    .top-actions {
        margin-top: 12px;
    }

    .top-actions {
        flex-wrap: wrap;
    }

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

}

@media (max-width: 560px) {
    .auth-shell {
        justify-content: stretch;
    }

    .auth-box {
        width: 100%;
    }
}

/* Compact site overrides */
.content-block,
.article,
.comments,
.hero-panel,
.card,
.news-card,
.content-poster,
.empty,
.auth-box,
.profile-panel,
.flash,
.auth-dropdown,
.dropdown,
.toast,
.toast-close,
.mail-dialog,
.mail-head button,
.mail-tabs button,
.mail-compose input,
.mail-compose textarea,
.mail-file-button,
.mail-compose button,
.mail-selected-file,
.mail-item,
.mail-block,
.mail-empty,
.comment-form input,
.comment-form textarea,
.comment-form button,
.comments-login-notice,
.comment-pagination a,
.comment-pagination span,
.dev-link {
    border-radius: 6px;
}

.content-block,
.article,
.comments,
.home-news,
.card,
.news-card-body,
.empty,
.footer-inner,
.mail-panel,
.mail-head,
.mail-tabs,
.auth-dropdown,
.toast,
.auth-box,
.profile-panel,
.comments-login-notice {
    padding: 8px;
}

.news-grid,
.cards,
.list,
.footer-inner,
.footer-column,
.profile-grid,
.comment-form,
.mail-compose,
.mail-actions,
.mail-selected-files,
.mail-list,
.mail-files,
.auth-links {
    gap: 2px;
}

.section-head,
.comments-head,
.news-card h3,
.card h3,
.list-item h2,
.article h1,
.article-body,
.comment-form,
.comments-login-notice,
.comment-pagination,
.mail-detail,
.mail-files,
.auth-links,
.profile-grid {
    margin-top: 2px;
    margin-bottom: 14px;
}

.section-head {
    gap: 2px;
}

.section-head-dotted {
    column-gap: 2px;
    row-gap: 2px;
}

.list-item,
.comment,
.comments-empty {
    padding-top: 2px;
    padding-bottom: 2px;
}

.comment-pagination {
    padding-top: 2px;
}

.comment-pagination a,
.comment-pagination span {
    min-width: 22px;
    padding: 2px 5px;
}

.footer-inner {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
}

.section-nav,
.page,
.site-footer,
.content-block,
.home-news,
.home-lib,
.article,
.comments {
    margin-top: 2px;
    margin-bottom: 2px;
}

.page {
    padding-top: 0;
    padding-bottom: 0;
}

.topbar {
    margin-bottom: 0;
}

.section-nav {
    padding-top: 2px;
    padding-bottom: 2px;
}

.site-footer {
    margin-top: 2px;
}

.poster-strip-block {
    padding: 8px;
}

.poster-strip-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    min-width: 0;
}

.poster-strip-head h1,
.poster-strip-head h2 {
    flex: 0 0 auto;
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
}

.poster-strip-head a {
    color: var(--ink);
}

.poster-strip-line {
    flex: 1 1 auto;
    border-bottom: 1px dotted var(--muted);
    min-width: 24px;
}

.poster-strip-count {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
}

.poster-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
}

.poster-tile {
    min-width: 0;
    text-align: center;
}

.poster-tile-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--paper);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.poster-tile-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-tile h2,
.poster-tile h3 {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.2;
}

.poster-tile h2 a,
.poster-tile h3 a {
    color: var(--accent-dark);
}

.poster-tile p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

@media (max-width: 900px) {
    .poster-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .poster-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.topbar .top-section-nav {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* my-dark-master 0.2.0 responsive layout */
.topbar {
    position: relative;
    z-index: 50;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    min-height: 64px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--white);
    padding: 9px 12px;
}

.topbar .brand {
    min-width: max-content;
}

.topbar .brand small,
.admin-topbar .brand small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.site-navigation {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.topbar .top-section-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
}

.topbar .top-section-nav a {
    white-space: nowrap;
}

.topbar .search-form {
    width: min(300px, 100%);
    min-width: 180px;
}

.mobile-menu-toggle {
    display: none;
}

.language-switch {
    position: relative;
}

.language-switch-current {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--white);
    padding: 0 10px;
    font-weight: 700;
    cursor: pointer;
}

.language-switch-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    display: none;
    width: 170px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
}

.language-switch.active .language-switch-menu {
    display: grid;
}

.language-switch-menu a {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    font-weight: 700;
}

.language-switch-menu a:last-child {
    border-bottom: 0;
}

.language-switch-menu a:hover,
.language-switch-menu a.active {
    color: var(--accent-dark);
    background: var(--paper);
}

.genre-tag,
.article-genre {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--paper);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.article-genre {
    margin-left: 6px;
}

.tile-meta {
    display: flex;
    min-height: 25px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.catalog-poster-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.site-footer .footer-inner {
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr));
}

.site-footer .footer-brand p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
}

@media (max-width: 1050px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }

    .site-navigation {
        gap: 8px;
    }

    .topbar .search-form {
        width: 210px;
    }

    .topbar .top-section-nav a {
        padding-right: 8px;
        padding-left: 8px;
    }
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        width: min(100% - 20px, 760px);
        padding: 9px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        gap: 7px;
        border: 1px solid var(--line);
        border-radius: 6px;
        color: var(--ink);
        background: var(--paper);
        padding: 0 11px;
        font-weight: 700;
    }

    .site-navigation {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        display: none;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--white);
        padding: 10px;
        box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
    }

    .site-navigation.active {
        display: grid;
    }

    .topbar .top-section-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .topbar .top-section-nav a {
        justify-content: center;
        text-align: center;
    }

    .topbar .search-form {
        width: 100%;
    }

    .page,
    .site-footer {
        width: min(100% - 20px, 760px);
    }

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

    .news-card-featured {
        grid-column: 1 / -1;
    }

    .catalog-poster-strip,
    .poster-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .topbar .brand-title {
        font-size: 17px;
    }

    .topbar .brand small,
    .mobile-menu-toggle span,
    .login-button span,
    .language-switch-current .fa {
        display: none;
    }

    .top-actions {
        gap: 4px;
    }

    .language-switch-current,
    .icon-button,
    .theme-switch button,
    .login-button {
        min-width: 38px;
        padding: 0 8px;
    }

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

    .news-card-featured {
        grid-column: auto;
    }

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

    .list-item {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .list-item time {
        grid-column: 2;
    }

    .article,
    .comments,
    .content-block {
        padding: 12px;
    }

    .article h1 {
        font-size: clamp(26px, 8vw, 38px);
    }

    .article-poster {
        max-height: 440px;
        object-fit: cover;
    }

    .site-footer .footer-inner {
        grid-template-columns: 1fr;
    }

    .poster-strip-head,
    .section-head-dotted {
        align-items: center;
    }

    .poster-strip-count,
    .section-head-count {
        font-size: 11px;
    }
}

@media (max-width: 390px) {
    .topbar .brand-title {
        font-size: 15px;
    }

    .topbar {
        width: calc(100% - 12px);
        gap: 5px;
    }

    .page,
    .site-footer {
        width: calc(100% - 12px);
    }
}

/* 0.2.1: иконки в формах входа и регистрации */
.auth-box .input-icon,
.auth-mini-form .input-icon {
    display: block;
    position: relative;
    width: 100%;
}

.auth-box .input-icon .fa,
.auth-mini-form .input-icon .fa {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 0;
    display: flex;
    width: 42px;
    height: 100%;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translateY(-50%);
}

.auth-box .input-icon:after,
.auth-mini-form .input-icon:after {
    left: 42px;
}

.auth-box .input-icon input,
.auth-mini-form .input-icon input {
    padding-left: 56px;
}

/* my-dark-master 0.2.4: главная, навигация, футер и компактные карточки */
.page {
    padding-top: 22px;
}

.home-section,
.catalog-block {
    margin-top: 0;
    margin-bottom: 22px;
}

.home-section + .home-section {
    margin-top: 22px;
}

.section-head.section-head-dotted {
    margin: 0 0 12px;
}

.section-head.section-head-dotted h1,
.section-head.section-head-dotted h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
}

.section-head.section-head-dotted h1 a,
.section-head.section-head-dotted h2 a {
    color: var(--ink);
}

.section-head.section-head-dotted .section-head-dots {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    border-bottom: 1px dotted var(--muted);
}

.section-head.section-head-dotted .section-head-count {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    color: var(--muted);
    font-size: 13px;
}

/* Шапка: разделы в рамках, поиск тянется до переключателя языка */
.topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
}

.site-navigation {
    justify-content: stretch;
    gap: 10px;
}

.topbar .top-section-nav {
    flex: 0 0 auto;
    gap: 6px;
}

.topbar .top-section-nav a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    padding: 0 12px;
    color: var(--ink);
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
    transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}

.topbar .top-section-nav a:hover,
.topbar .top-section-nav a:focus-visible {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--white);
    outline: 0;
    transform: translateY(-1px);
}

.topbar .search-form {
    flex: 1 1 auto;
    width: auto;
    min-width: 160px;
    max-width: none;
    border-radius: 6px;
    /* Выпадающие результаты поиска являются абсолютным дочерним блоком.
       overflow:hidden обрезал их высотой строки поиска. */
    overflow: visible;
}

.top-actions {
    flex: 0 0 auto;
}

/* Главные новости: одна большая карточка и до двух карточек справа */
.news-showcase {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-height: 390px;
}

.news-showcase-count-1 {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(330px, 430px);
}

.news-showcase-count-2 .news-showcase-side {
    grid-row: 1 / -1;
}

.news-showcase-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
}

.news-showcase-featured {
    grid-column: 1;
    grid-row: 1 / -1;
    position: relative;
}

.news-showcase-count-1 .news-showcase-featured {
    grid-column: 1;
}

.news-showcase-featured-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #202936, #0c1017);
}

.news-showcase-featured-link img,
.news-showcase-side-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.news-showcase-card:hover img {
    transform: scale(1.025);
}

.news-showcase-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .04) 20%, rgba(0, 0, 0, .82) 100%);
}

.news-showcase-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
    padding: clamp(18px, 3vw, 34px);
    color: #ffffff;
}

.news-showcase-category,
.news-showcase-genre {
    display: inline-flex;
    max-width: 100%;
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 700;
}

.news-showcase-genre:before {
    margin-right: 7px;
    content: "•";
}

.news-showcase-content strong {
    display: -webkit-box;
    flex: 0 0 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: clamp(24px, 3.2vw, 40px);
    line-height: 1.08;
    text-wrap: balance;
}

.news-showcase-content time {
    flex: 0 0 100%;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
}

.news-showcase-side {
    display: grid;
    grid-template-rows: minmax(105px, 46%) minmax(0, 1fr);
}

.news-showcase-side-image {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    font-weight: 700;
}

.news-showcase-side-body {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 14px 16px;
}

.news-showcase-side-meta {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 5px 8px;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.news-showcase-side h3 {
    display: -webkit-box;
    margin: 8px 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: clamp(16px, 1.55vw, 21px);
    line-height: 1.2;
}

.news-showcase-side time {
    margin-top: auto;
    font-size: 12px;
}

.news-showcase-card.no-poster.news-showcase-featured .news-showcase-shade {
    background: linear-gradient(135deg, rgba(47, 140, 255, .3), rgba(0, 0, 0, .82));
}

/* Посты и статьи: короткие одинаковые карточки, обрезка текста и изображений */
.home-poster-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.poster-tile {
    overflow: hidden;
}

.poster-tile-image,
.home-poster-strip .poster-tile-image,
.catalog-poster-strip .poster-tile-image {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
}

.poster-tile h2,
.poster-tile h3 {
    display: -webkit-box;
    min-height: calc(1.25em * 2);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.poster-tile h2 a,
.poster-tile h3 a {
    color: var(--ink);
}

.poster-tile h2 a:hover,
.poster-tile h3 a:hover {
    color: var(--accent-dark);
}

.tile-meta {
    max-height: 28px;
    overflow: hidden;
}

/* Разделы: ограничиваем высоту заголовков и описаний как в карточках главной */
.catalog-block .list {
    gap: 10px;
}

.catalog-block .list-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 112px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    padding: 10px;
}

.catalog-block .content-poster-list {
    width: 150px;
    height: 92px;
    margin: 0;
}

.catalog-block .list-item h2 {
    display: -webkit-box;
    margin: 5px 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 20px;
    line-height: 1.2;
}

.catalog-block .list-item p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
}

.catalog-block .list-item > time {
    white-space: nowrap;
}

.catalog-poster-strip {
    gap: 14px 10px;
}

/* Постраничная навигация */
.content-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 18px;
    border-top: 1px dotted var(--line);
    padding-top: 16px;
}

.content-pagination a,
.content-pagination span {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    padding: 0 10px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.content-pagination a:hover,
.content-pagination .active {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
}

.content-pagination .disabled,
.content-pagination .pagination-gap {
    color: var(--muted);
    background: var(--paper);
}

.content-pagination .pagination-gap {
    min-width: auto;
    border-color: transparent;
    padding: 0 4px;
}

/* Футер в четыре колонки */
.site-footer {
    margin-top: 26px;
    margin-bottom: 18px;
    border-radius: 8px;
}

.site-footer .footer-inner {
    grid-template-columns: 1fr 1fr 1fr minmax(260px, 1.25fr);
    gap: 24px;
    padding: 20px 22px;
}

.site-footer .footer-column {
    gap: 7px;
}

.site-footer .footer-column h3 {
    margin-bottom: 5px;
    font-size: 13px;
    letter-spacing: .03em;
}

.site-footer .footer-site-info {
    justify-items: end;
    align-content: end;
    text-align: right;
}

.site-footer .footer-site-info strong {
    font-size: 17px;
}

.site-footer .footer-site-info a,
.site-footer .footer-site-info span {
    overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
    .topbar .top-section-nav a {
        padding-right: 9px;
        padding-left: 9px;
        font-size: 14px;
    }

    .news-showcase {
        grid-template-columns: minmax(0, 1.65fr) minmax(235px, 1fr);
    }
}

@media (max-width: 900px) {
    .page {
        padding-top: 16px;
    }

    .site-navigation {
        gap: 10px;
    }

    .topbar .top-section-nav a {
        padding: 0 8px;
    }

    .news-showcase {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        min-height: 0;
    }

    .news-showcase-featured,
    .news-showcase-count-2 .news-showcase-side {
        grid-column: 1;
        grid-row: auto;
    }

    .news-showcase-featured-link {
        min-height: 340px;
    }

    .news-showcase-side {
        grid-template-columns: minmax(150px, 38%) minmax(0, 1fr);
        grid-template-rows: minmax(150px, auto);
    }

    .news-showcase-side-image {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .home-poster-strip,
    .catalog-poster-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .site-footer .footer-spacer {
        display: none;
    }
}

@media (max-width: 620px) {
    .page {
        padding-top: 12px;
    }

    .home-section,
    .catalog-block,
    .home-section + .home-section {
        margin-bottom: 14px;
    }

    .section-head.section-head-dotted h1,
    .section-head.section-head-dotted h2 {
        font-size: 20px;
    }

    .section-head.section-head-dotted .section-head-count {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .news-showcase-featured-link {
        min-height: 280px;
    }

    .news-showcase-content {
        padding: 18px;
    }

    .news-showcase-content strong {
        font-size: clamp(22px, 7vw, 30px);
    }

    .news-showcase-side {
        grid-template-columns: 120px minmax(0, 1fr);
        grid-template-rows: minmax(130px, auto);
    }

    .news-showcase-side-body {
        padding: 10px 12px;
    }

    .news-showcase-side h3 {
        -webkit-line-clamp: 2;
        font-size: 16px;
    }

    .home-poster-strip,
    .catalog-poster-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-block .list-item {
        grid-template-columns: 96px minmax(0, 1fr);
        min-height: 104px;
        padding: 8px;
    }

    .catalog-block .content-poster-list {
        width: 96px;
        height: 86px;
    }

    .catalog-block .list-item > time {
        grid-column: 2;
        justify-self: start;
    }

    .catalog-block .list-item h2 {
        font-size: 17px;
    }

    .content-pagination .pagination-arrow {
        flex: 1 1 42%;
    }

    .site-footer .footer-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .site-footer .footer-site-info {
        justify-items: start;
        align-content: start;
        border-top: 1px dotted var(--line);
        padding-top: 14px;
        text-align: left;
    }
}

@media (max-width: 420px) {
    .news-showcase-side {
        grid-template-columns: 1fr;
        grid-template-rows: 150px auto;
    }

    .news-showcase-side-image {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .home-poster-strip,
    .catalog-poster-strip {
        grid-template-columns: 1fr;
    }
}

.content-poster-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: linear-gradient(135deg, var(--paper), var(--white));
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}


/* my-dark-master 0.2.5: компактные отступы между блоками сайта */
.page {
    padding-top: 8px;
}

.home-section,
.catalog-block {
    margin-top: 0;
    margin-bottom: 8px;
}

.home-section + .home-section {
    margin-top: 8px;
}

.site-footer {
    margin-top: 8px;
}

@media (max-width: 620px) {
    .page {
        padding-top: 8px;
    }

    .home-section,
    .catalog-block,
    .home-section + .home-section {
        margin-top: 0;
        margin-bottom: 8px;
    }
}

/* my-dark-master 0.2.6: ограниченная ширина блока новостей на главной */
.home-news {
    width: 100%;
    max-width: 800px;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 840px) {
    .home-news {
        max-width: none;
    }
}

/* my-dark-master 0.2.7: новости на ширину шапки, 50/50 и компактная высота */
.home-news {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
}

@media (min-width: 901px) {
    .home-news .news-showcase {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 8px;
        height: 300px;
        min-height: 0;
    }

    .home-news .news-showcase-count-1 {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    .home-news .news-showcase-featured {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .home-news .news-showcase-featured-link {
        height: 100%;
        min-height: 0;
    }

    .home-news .news-showcase-content {
        gap: 4px 8px;
        padding: 18px 22px;
    }

    .home-news .news-showcase-content strong {
        -webkit-line-clamp: 2;
        font-size: clamp(23px, 2.35vw, 31px);
        line-height: 1.08;
    }

    .home-news .news-showcase-side {
        min-height: 0;
        grid-template-columns: minmax(0, 42%) minmax(0, 58%);
        grid-template-rows: minmax(0, 1fr);
    }

    .home-news .news-showcase-side-image {
        min-height: 0;
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .home-news .news-showcase-side-body {
        min-height: 0;
        padding: 9px 11px;
    }

    .home-news .news-showcase-side-meta {
        gap: 3px 6px;
        font-size: 10px;
        line-height: 1.2;
    }

    .home-news .news-showcase-side h3 {
        margin: 5px 0;
        -webkit-line-clamp: 2;
        font-size: clamp(15px, 1.2vw, 18px);
        line-height: 1.16;
    }

    .home-news .news-showcase-side time {
        font-size: 10px;
    }
}

/* my-dark-master 0.2.8: категории по разделам, карточки и навигация */
.content-card-footer {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.content-card-footer span,
.content-card-footer time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-card-footer span {
    color: var(--accent-dark);
    font-weight: 700;
}

.content-card-footer time {
    flex: 0 0 auto;
    text-align: right;
}

.news-showcase-card {
    display: flex;
    min-height: 0;
}

.news-showcase-featured {
    flex-direction: column;
}

.news-feature-image {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.news-feature-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.news-showcase-card:hover .news-feature-image img {
    transform: scale(1.025);
}

.news-feature-body {
    display: flex;
    min-height: 92px;
    flex: 0 0 92px;
    flex-direction: column;
    padding: 10px 14px;
}

.news-feature-body h3,
.news-showcase-side h3 {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-feature-body h3 {
    margin: 0 0 8px;
    font-size: clamp(18px, 2vw, 25px);
    line-height: 1.12;
}

.news-showcase-side-body {
    min-width: 0;
}

.news-showcase-side h3 {
    margin: 0 0 7px;
    font-size: clamp(14px, 1.25vw, 18px);
    line-height: 1.16;
}

.news-showcase-side .content-card-footer {
    margin-top: auto;
}

.poster-tile {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 0;
}

.poster-tile-body {
    display: flex;
    min-height: 92px;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 8px 9px 9px;
}

.poster-tile-body h2,
.poster-tile-body h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.poster-tile .content-card-footer {
    border-top: 1px dotted var(--line);
    padding-top: 7px;
}

.section-page-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.section-navigation {
    position: sticky;
    top: 8px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    padding: 10px;
}

.section-navigation h2,
.section-navigation h3 {
    margin: 0;
}

.section-navigation h2 {
    font-size: 18px;
    line-height: 1.2;
}

.section-navigation h3 {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.section-navigation-line {
    margin-top: 7px;
    border-bottom: 1px dotted var(--muted);
}

.section-navigation nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.section-navigation nav a {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    padding: 7px 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-navigation nav a:first-child {
    flex: 0 0 100%;
}

.section-navigation nav a:hover,
.section-navigation nav a.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}

.section-page-layout .catalog-block {
    min-width: 0;
}

.catalog-block .list-item {
    grid-template-columns: 150px minmax(0, 1fr);
}

.catalog-block .list-item-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.catalog-block .list-item .content-card-footer {
    margin-top: auto;
    border-top: 1px dotted var(--line);
    padding-top: 7px;
}

.article + .comments {
    margin-top: 18px;
}

body.language-loading .page,
body.language-loading .site-footer {
    opacity: .55;
    pointer-events: none;
}

.page,
.site-footer {
    transition: opacity .16s ease;
}

@media (min-width: 901px) {
    .home-news .news-showcase-featured {
        display: flex;
    }

    .home-news .news-feature-image {
        height: 208px;
        flex: 0 0 208px;
    }

    .home-news .news-showcase-side {
        display: grid;
        grid-template-columns: minmax(0, 42%) minmax(0, 58%);
    }
}

@media (max-width: 900px) {
    .section-page-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .news-showcase-side {
        display: grid;
        grid-template-columns: minmax(140px, 40%) minmax(0, 1fr);
        grid-template-rows: minmax(140px, auto);
    }

    .news-showcase-side-image {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .news-feature-image {
        min-height: 260px;
    }

    .news-feature-body {
        flex-basis: auto;
    }
}

@media (max-width: 760px) {
    .section-page-layout {
        grid-template-columns: 1fr;
    }

    .section-navigation {
        position: static;
    }

    .section-navigation nav {
        overflow-x: visible;
        padding-bottom: 0;
    }

    .section-navigation nav a {
        flex: 0 0 auto;
    }

    .section-navigation nav a:first-child {
        flex-basis: auto;
    }
}

@media (max-width: 620px) {
    .news-feature-image {
        min-height: 220px;
    }

    .news-feature-body h3 {
        font-size: 20px;
    }

    .catalog-block .list-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .content-card-footer {
        gap: 6px;
        font-size: 10px;
    }
}

@media (max-width: 420px) {
    .news-showcase-side {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: minmax(118px, auto);
    }

    .news-showcase-side-image {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }
}

/* 0.2.9: view modes, global search and profile */
.view-switch {
    display: inline-flex;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
}

.view-switch button {
    width: 34px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
}

.view-switch button:hover,
.view-switch button.active {
    color: var(--ink);
    border-color: var(--accent);
    background: rgba(47, 139, 255, .14);
}

.content-view-section.view-mode-list .poster-strip,
.content-view-section.view-mode-list .catalog-poster-strip,
.content-view-section.view-mode-list .home-poster-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.content-view-section.view-mode-list .poster-tile {
    display: grid;
    grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
    width: 100%;
    min-height: 145px;
}

.content-view-section.view-mode-list .poster-tile-image,
.content-view-section.view-mode-list .home-poster-strip .poster-tile-image,
.content-view-section.view-mode-list .catalog-poster-strip .poster-tile-image {
    width: 100%;
    height: 145px;
    border-radius: 5px 0 0 5px;
}

.content-view-section.view-mode-list .poster-tile-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 16px;
    text-align: left;
}

.content-view-section.view-mode-list .poster-tile-body h2,
.content-view-section.view-mode-list .poster-tile-body h3 {
    margin: 0;
    max-width: none;
    -webkit-line-clamp: 3;
}

.content-view-section.view-mode-grid .list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.content-view-section.view-mode-grid .list-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content-view-section.view-mode-grid .content-poster-list {
    width: 100%;
    height: 170px;
}

.content-view-section.view-mode-grid .list-item-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.content-view-section.view-mode-grid .list-item-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.content-view-section.view-mode-grid .list-item-body .content-card-footer {
    margin-top: auto;
}

.home-news.view-mode-list .news-showcase {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    gap: 8px;
}

.home-news.view-mode-list .news-showcase-card {
    display: grid;
    grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
    min-height: 160px;
    height: 160px;
}

.home-news.view-mode-list .news-feature-image,
.home-news.view-mode-list .news-showcase-side-image {
    grid-column: 1;
    grid-row: 1;
    height: 160px;
}

.home-news.view-mode-list .news-feature-body,
.home-news.view-mode-list .news-showcase-side-body {
    position: static;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
}

.home-news.view-mode-list .news-feature-body h3,
.home-news.view-mode-list .news-showcase-side-body h3 {
    font-size: 20px;
    -webkit-line-clamp: 3;
}

.search-form {
    position: relative;
}

.search-suggest {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 8px);
    left: 0;
    width: min(520px, 92vw);
    max-height: min(620px, 75vh);
    overflow-y: auto;
    display: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
}

.search-suggest.active {
    display: block;
}

.search-suggest-head,
.search-suggest-empty,
.search-suggest-loading {
    padding: 12px 14px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.search-suggest-loading {
    text-align: center;
}

.search-suggest-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.search-suggest-item:hover {
    background: rgba(47, 139, 255, .10);
}

.search-suggest-poster {
    width: 52px;
    height: 68px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--paper);
}

.search-suggest-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-suggest-copy {
    min-width: 0;
}

.search-suggest-copy strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.search-suggest-copy small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.search-suggest-copy small b {
    color: var(--accent);
}

.search-suggest-all {
    display: block;
    padding: 12px 14px;
    text-align: center;
    font-weight: 700;
}

.search-results-query {
    color: var(--muted);
}

.search-results-list {
    display: grid;
    gap: 10px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
}

.search-result-poster {
    min-height: 145px;
    display: grid;
    place-items: center;
    background: var(--paper);
}

.search-result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-body {
    min-width: 0;
    padding: 14px 16px 14px 0;
}

.search-result-section {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.search-result-body h2 {
    margin: 6px 0 8px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.profile-sidebar,
.profile-content {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
}

.profile-sidebar {
    padding: 10px;
}

.profile-user-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
}

.profile-user-card strong,
.profile-user-card small {
    display: block;
}

.profile-user-card small {
    margin-top: 4px;
    color: var(--accent);
}

.profile-avatar {
    width: 58px;
    height: 58px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 24px;
    font-weight: 800;
}

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

.profile-nav {
    display: grid;
    gap: 5px;
}

.profile-nav button,
.profile-nav a {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.profile-nav button:hover,
.profile-nav button.active,
.profile-nav a:hover,
.profile-nav a.active {
    color: var(--ink);
    border-color: var(--accent);
    background: rgba(47, 139, 255, .13);
}

.profile-content {
    min-height: 420px;
}

.profile-panel {
    display: none;
    padding: 20px;
    border: 0;
    background: transparent;
}

.profile-panel.active {
    display: block;
}

.profile-panel h1,
.profile-panel h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px dotted var(--line);
}

.profile-panel form {
    max-width: 680px;
}

.profile-panel input[readonly] {
    color: var(--muted);
    cursor: not-allowed;
    background: var(--paper);
}

.profile-overview {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.profile-avatar-large {
    width: 92px;
    height: 92px;
    font-size: 34px;
}

.profile-overview strong,
.profile-overview span,
.profile-overview small {
    display: block;
}

.profile-overview strong {
    font-size: 24px;
}

.profile-overview span {
    margin-top: 4px;
    color: var(--accent);
}

.profile-overview small {
    margin-top: 8px;
    color: var(--muted);
}

.profile-avatar-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.profile-avatar-preview {
    width: 120px;
    height: 120px;
    font-size: 42px;
}

.profile-file-button {
    display: inline-flex !important;
    width: auto !important;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    cursor: pointer;
}

.profile-file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

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

    .content-view-section.view-mode-grid .list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .section-head .view-switch {
        order: 3;
    }

    .content-view-section.view-mode-list .poster-tile,
    .home-news.view-mode-list .news-showcase-card,
    .search-result-card {
        grid-template-columns: 1fr;
        height: auto;
    }

    .content-view-section.view-mode-list .poster-tile-image,
    .home-news.view-mode-list .news-feature-image,
    .home-news.view-mode-list .news-showcase-side-image {
        height: 190px;
    }

    .content-view-section.view-mode-grid .list {
        grid-template-columns: 1fr;
    }

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

    .search-suggest {
        position: fixed;
        top: 64px;
        left: 8px;
        right: 8px;
        width: auto;
    }
}

[data-content-nav-root].is-loading {
    opacity: .6;
    pointer-events: none;
}

.home-news.view-mode-list .news-showcase-featured,
.home-news.view-mode-list .news-showcase-side {
    grid-column: auto;
    grid-row: auto;
    grid-template-rows: 1fr;
}

/* 0.2.10: AJAX-авторизация и защита регистрации */
.loginbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: #ffffff;
    background: var(--accent);
    padding: 0 12px;
    font-weight: 700;
    cursor: pointer;
}

.register-button:hover,
.register-button[aria-expanded="true"] {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
}

.login-button[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.auth-submit-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-submit-right {
    justify-content: flex-end;
}

.auth-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.registration-captcha-field {
    margin-top: 2px;
}

.registration-captcha-row {
    display: grid;
    grid-template-columns: minmax(104px, auto) minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
}

.registration-captcha-row > strong {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--accent);
    border-radius: 6px;
    color: var(--ink);
    background: rgba(47, 140, 255, .1);
    padding: 0 12px;
    white-space: nowrap;
}

.js-auth-form.is-submitting {
    opacity: .72;
    pointer-events: none;
}

.js-auth-form button[disabled] {
    cursor: wait;
    opacity: .75;
}

@media (max-width: 700px) {
    .register-button span,
    .login-button span {
        display: none;
    }

    .register-button,
    .login-button {
        width: 38px;
        padding: 0;
    }
}

@media (max-width: 420px) {
    .registration-captcha-row {
        grid-template-columns: 1fr;
    }
}

/* 0.3.0: readable titles, compact pagination, engagement and ban UI */
.news-feature-body,
.poster-tile-body {
    height: auto;
    max-height: none;
}

.news-feature-body {
    min-height: 88px;
    flex: 0 0 auto;
}

.news-feature-body h3,
.news-showcase-side h3,
.poster-tile-body h2,
.poster-tile-body h3,
.content-view-section.view-mode-list .poster-tile-body h2,
.content-view-section.view-mode-list .poster-tile-body h3 {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: initial;
    -webkit-line-clamp: initial;
    text-align: left;
    overflow-wrap: anywhere;
}

.news-feature-body h3 {
    font-size: clamp(17px, 1.65vw, 22px);
    line-height: 1.18;
}

.news-showcase-side h3 {
    font-size: clamp(14px, 1.1vw, 17px);
    line-height: 1.22;
}

.poster-tile-body {
    align-items: stretch;
    min-height: 86px;
    flex: 1 1 auto;
    text-align: left;
}

.poster-tile-body h2,
.poster-tile-body h3 {
    width: 100%;
    font-size: 17px;
    line-height: 1.24;
}

.catalog-pagination-bar {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    border-top: 1px dotted var(--line);
    padding-top: 16px;
}

.catalog-total {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.catalog-total strong {
    color: var(--ink);
}

.catalog-pagination-bar .content-pagination {
    min-width: 0;
    justify-content: flex-end;
    margin: 0 0 0 auto;
    border: 0;
    padding: 0;
}

.content-pagination a,
.content-pagination span {
    width: auto;
    flex: 0 0 auto;
}

.content-mini-stats {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted) !important;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
}

.content-engagement {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    border-top: 1px dotted var(--line);
    padding-top: 14px;
}

.engagement-button {
    display: inline-flex;
    min-width: 64px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--white);
    padding: 0 13px;
    cursor: pointer;
}

.engagement-button:hover,
.engagement-button.active {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: rgba(47, 140, 255, .1);
}

.engagement-button[disabled] {
    opacity: .6;
    cursor: wait;
}

.language-switch-direct {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    background: var(--white);
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
}

.language-switch-direct:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.language-loading main.page,
body.is-page-loading main.page {
    opacity: .58;
    pointer-events: none;
}

main.page {
    transition: opacity .16s ease;
}

.ban-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .76);
    padding: 18px;
}

.ban-modal-backdrop.active {
    display: flex;
}

.ban-modal {
    width: min(520px, 100%);
    border: 1px solid #d84848;
    border-radius: 10px;
    background: var(--white);
    padding: 26px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.ban-modal-icon {
    color: #e14d4d;
    font-size: 52px;
}

.ban-modal h2 {
    margin: 12px 0 18px;
}

.ban-modal p {
    text-align: left;
}

.ban-logout {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    border-radius: 6px;
    color: #fff;
    background: #d84848;
    padding: 0 18px;
    font-weight: 700;
}

.profile-readonly-note,
.field-readonly-note {
    border: 1px dashed var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: var(--paper);
    padding: 10px 12px;
}

@media (max-width: 700px) {
    .news-feature-body h3 {
        font-size: 18px;
    }

    .poster-tile-body h2,
    .poster-tile-body h3 {
        font-size: 16px;
    }

    .catalog-pagination-bar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .catalog-total {
        width: 100%;
    }

    .catalog-pagination-bar .content-pagination {
        width: 100%;
        justify-content: flex-end;
        gap: 4px;
        margin-left: 0;
    }

    .content-pagination a,
    .content-pagination span,
    .content-pagination .pagination-arrow {
        width: auto !important;
        min-width: 32px;
        min-height: 34px;
        flex: 0 0 auto !important;
        padding: 0 8px;
        font-size: 12px;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .content-pagination a,
    .content-pagination span,
    .content-pagination .pagination-arrow {
        min-width: 30px;
        min-height: 32px;
        padding: 0 7px;
        font-size: 11px;
    }

    .content-pagination .pagination-gap {
        min-width: auto;
        padding: 0 2px;
    }
}


.dropdown-action-form {
    margin: 0;
}

.dropdown-action-form button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 8px 12px;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.dropdown-action-form button:hover {
    color: var(--accent-dark);
    background: var(--paper);
}

.dropdown-action-form button.danger {
    color: #ff6262;
}

.ban-logout-form {
    margin: 0;
}

.ban-logout {
    border: 0;
    cursor: pointer;
}

/* 0.3.0: long titles must never be cut by the card layout. */
.catalog-block .list-item h2 {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: initial;
    -webkit-line-clamp: initial;
    overflow-wrap: anywhere;
}

@media (min-width: 901px) {
    .home-news .news-showcase {
        height: auto;
        min-height: 300px;
        grid-template-rows: repeat(2, minmax(150px, auto));
    }

    .home-news .news-showcase-side {
        min-height: 150px;
    }
}

/* 0.3.1: reference content page, comments, pagination and mobile footer */
.article-reference { padding: 8px; }
.article-reference .back-link { display:inline-flex; align-items:center; gap:5px; margin:0 0 8px; }
.article-hero { display:grid; grid-template-columns:minmax(0, 3fr) minmax(250px, 2fr); gap:10px; align-items:stretch; }
.article-hero-media { display:flex; min-height:320px; overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--paper); }
.article-reference .article-poster { display:block; width:100%; height:100%; max-height:560px; object-fit:cover; margin:0; border:0; border-radius:0; }
.article-poster-empty { display:grid; width:100%; min-height:320px; place-items:center; color:var(--muted); font-size:54px; }
.article-hero-info { display:flex; min-width:0; flex-direction:column; border:1px solid var(--line); border-radius:6px; background:var(--white); padding:14px; }
.article-reference .article-hero-info h1 { margin:0 0 14px; font-size:clamp(22px,3vw,38px); line-height:1.08; overflow-wrap:anywhere; }
.article-facts { display:grid; gap:8px; margin:0; }
.article-facts div { display:grid; grid-template-columns:minmax(88px,auto) minmax(0,1fr); gap:8px; align-items:center; }
.article-facts dt { color:var(--muted); font-weight:800; }
.article-facts dd { min-width:0; margin:0; overflow-wrap:anywhere; }
.article-rating { display:grid; gap:8px; margin-top:16px; padding-top:12px; }
.article-rating > div { display:flex; gap:8px; }
.article-text-block { margin-top:10px; border:1px solid var(--line); border-radius:6px; background:var(--white); padding:14px; }
.article-text-block .summary { margin:0 0 14px; border-bottom:1px dotted var(--line); padding-bottom:12px; font-weight:700; }
.article-text-block .article-body { margin:0; line-height:1.65; overflow-wrap:anywhere; }
.comment { position:relative; }
.comment-head { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.comment-head time { margin-left:auto; color:var(--muted); font-size:12px; }
.comment.is-removing { opacity:.5; pointer-events:none; }
.content-pagination .disabled { opacity:.45; cursor:not-allowed; }
.mail-tabs button { width:auto !important; min-width:0 !important; height:auto !important; font-size:13px !important; text-indent:0 !important; color:var(--ink); }
.mail-tabs button i { font-size:inherit; }
.toast-message { color:var(--ink); font-size:14px; line-height:1.35; }

@media (max-width:700px) {
    .article-reference { padding:6px; }
    .article-hero { grid-template-columns:1fr; }
    .article-hero-media { min-height:220px; max-height:420px; }
    .article-reference .article-poster { max-height:420px; }
    .article-hero-info { padding:12px; }
    .article-reference .article-hero-info h1 { font-size:24px; }
    .article-facts div { grid-template-columns:92px minmax(0,1fr); }
    .article-text-block { padding:12px; }
    .catalog-pagination-bar { display:grid; grid-template-columns:minmax(0,1fr); }
    .catalog-pagination-bar .content-pagination { display:flex; width:100%; max-width:100%; justify-content:flex-end; overflow-x:auto; scrollbar-width:thin; }
    .content-pagination a,.content-pagination span,.content-pagination .pagination-arrow { max-width:none; }
    .site-footer .footer-inner { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; align-items:start; gap:14px 20px; }
    .site-footer .footer-sections { grid-column:1; grid-row:1; text-align:left; }
    .site-footer .footer-social { grid-column:2; grid-row:1; text-align:right; align-items:flex-end; }
    .site-footer .footer-spacer { display:none; }
    .site-footer .footer-site-info { grid-column:1 / -1; grid-row:2; text-align:center; align-items:center; }
    .comment-head { flex-wrap:wrap; }
    .comment-head time { margin-left:0; }
}

@media (max-width:420px) {
    .article-facts div { grid-template-columns:1fr; gap:2px; }
    .article-rating > div { width:100%; }
    .article-rating .engagement-button { flex:1 1 0; }
    .catalog-total { text-align:left; }
    .catalog-pagination-bar .content-pagination { justify-content:flex-start; }
    .site-footer .footer-inner { grid-template-columns:1fr 1fr !important; }
}

/* 0.4.0: communities */
.community-inline-link { display:inline-flex; align-items:center; gap:5px; color:var(--accent-dark); font-weight:700; }
.community-inline-link:hover { text-decoration:underline; }
.communities-page,.community-page { width:min(1180px,100%); margin:0 auto; }
.community-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.community-card { display:grid; grid-template-columns:84px minmax(0,1fr); gap:14px; align-items:start; border:1px solid var(--line); border-radius:8px; background:var(--white); padding:16px; }
.community-card.is-default { border-color:var(--accent); }
.community-card-avatar,.community-avatar-large { display:grid; place-items:center; overflow:hidden; border-radius:50%; background:var(--accent); color:#fff; font-weight:800; }
.community-card-avatar { width:84px; height:84px; font-size:30px; }
.community-card-avatar img,.community-avatar-large img { width:100%; height:100%; object-fit:cover; }
.community-card-body h2 { margin:0 0 6px; font-size:22px; line-height:1.15; }
.community-card-body p { margin:10px 0; color:var(--muted); }
.community-default-badge { display:inline-flex; align-items:center; gap:5px; width:max-content; border-radius:20px; background:rgba(242,184,75,.17); color:#b47a08; padding:3px 8px; font-size:12px; font-weight:800; }
.community-card-stats,.community-meta { display:flex; flex-wrap:wrap; gap:12px; color:var(--muted); font-size:13px; }
.community-hero { position:relative; min-height:230px; overflow:hidden; border:1px solid var(--line); border-radius:9px; background-position:center; background-size:cover; }
.community-hero.no-cover { background:linear-gradient(135deg,var(--accent),var(--accent-dark)); }
.community-hero-overlay { position:absolute; inset:0; background:linear-gradient(90deg,rgba(0,0,0,.72),rgba(0,0,0,.25)); }
.community-hero-content { position:relative; z-index:1; display:flex; gap:18px; align-items:flex-end; min-height:230px; padding:24px; color:#fff; }
.community-avatar-large { width:110px; height:110px; flex:0 0 110px; border:4px solid rgba(255,255,255,.8); font-size:44px; }
.community-title-line { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.community-title-line h1 { margin:0; font-size:clamp(28px,5vw,48px); line-height:1.05; }
.community-hero-content p { max-width:760px; margin:10px 0; color:rgba(255,255,255,.9); }
.community-hero .community-meta { color:rgba(255,255,255,.85); }
.community-tabs { display:flex; gap:7px; overflow-x:auto; margin:12px 0; border:1px solid var(--line); border-radius:7px; background:var(--white); padding:7px; }
.community-tabs a { display:inline-flex; gap:7px; align-items:center; white-space:nowrap; border-radius:5px; padding:8px 11px; font-weight:700; }
.community-tabs a span { color:var(--muted); font-size:12px; }
.community-tabs a.active,.community-tabs a:hover { color:#fff; background:var(--accent); }
.community-tabs a.active span,.community-tabs a:hover span { color:rgba(255,255,255,.8); }
.community-feed { display:grid; gap:10px; }
.community-feed-item { display:grid; grid-template-columns:190px minmax(0,1fr); overflow:hidden; border:1px solid var(--line); border-radius:7px; background:var(--white); }
.community-feed-poster { display:grid; min-height:150px; place-items:center; overflow:hidden; background:var(--paper); color:var(--muted); }
.community-feed-poster img { width:100%; height:100%; object-fit:cover; }
.community-feed-poster span { font-size:36px; }
.community-feed-body { min-width:0; padding:14px; }
.community-feed-body h2 { margin:5px 0 8px; font-size:22px; line-height:1.18; overflow-wrap:anywhere; }
.community-feed-body p { margin:0 0 10px; color:var(--muted); }
.community-feed-kicker { display:flex; flex-wrap:wrap; gap:8px; align-items:center; color:var(--muted); font-size:12px; }
.community-feed-kicker .admin-section-badge { border-radius:4px; background:var(--accent); color:#fff; padding:2px 6px; font-weight:800; }
.community-pagination { margin-top:14px; }

@media (max-width:760px) {
    .community-grid { grid-template-columns:1fr; }
    .community-hero-content { align-items:flex-start; flex-direction:column; padding:18px; }
    .community-avatar-large { width:84px; height:84px; flex-basis:84px; font-size:34px; }
    .community-feed-item { grid-template-columns:120px minmax(0,1fr); }
}
@media (max-width:520px) {
    .community-card { grid-template-columns:58px minmax(0,1fr); padding:12px; }
    .community-card-avatar { width:58px; height:58px; font-size:22px; }
    .community-feed-item { grid-template-columns:1fr; }
    .community-feed-poster { max-height:220px; }
}

/* 0.4.1: news categories */
.news-category-bar-wrap {
    width: 100%;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}
.news-category-bar {
    display: flex;
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    gap: 4px;
    overflow-x: auto;
    padding: 7px 0;
    scrollbar-width: thin;
}
.news-category-bar a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 32px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 5px 9px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.news-category-bar a:hover,
.news-category-bar a:focus-visible {
    border-color: var(--line);
    background: var(--paper);
}
.news-category-bar a.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.category-inline-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-dark);
    font-weight: 700;
}
.category-inline-link:hover,
.category-inline-link:focus-visible {
    text-decoration: underline;
}
@media (max-width: 760px) {
    .news-category-bar {
        width: 100%;
        padding: 6px 10px;
    }
    .news-category-bar a {
        min-height: 30px;
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* 0.5.0: unified authentication, header identity and direct counters */
.brand {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
    white-space: nowrap;
}
.brand-domain {
    margin-left: 1px;
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 800;
}
.auth-dropdown {
    width: min(308px, calc(100vw - 20px));
}
.auth-mini-form,
.auth-box {
    width: 280px;
    max-width: 100%;
    box-sizing: border-box;
}
.auth-submit-row {
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.auth-submit-right {
    justify-content: flex-end;
}
.auth-check {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    align-items: center;
    gap: 8px !important;
    font-size: 12px;
}
.auth-check input {
    width: 16px !important;
    min-height: 16px !important;
    margin: 0;
}
.auth-captcha-field.is-hidden,
.is-hidden {
    display: none !important;
}
.password-input-wrap input {
    padding-right: 46px !important;
}
.auth-mini-form .password-toggle,
.auth-box .password-toggle,
.password-toggle {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: 3px;
    display: inline-grid;
    width: 36px;
    min-width: 36px;
    height: 32px;
    min-height: 32px;
    place-items: center;
    border: 0;
    border-left: 1px dotted var(--line);
    border-radius: 0 5px 5px 0;
    color: var(--muted);
    background: transparent;
    padding: 0;
    transform: translateY(-50%);
}
.auth-mini-form .password-toggle:hover,
.auth-box .password-toggle:hover,
.password-toggle:hover {
    color: var(--accent-dark);
    background: rgba(47, 140, 255, .08);
}
.auth-mini-form .password-toggle .fa,
.auth-box .password-toggle .fa,
.password-toggle .fa {
    position: static;
    display: inline-block;
    width: auto;
    height: auto;
    color: inherit;
    transform: none;
    pointer-events: none;
}
.mail-badge:not(.is-hidden) {
    display: inline-grid;
}
.icon-button {
    text-decoration: none;
}

@media (max-width: 390px) {
    .brand-domain { font-size: 11px; }
    .auth-dropdown { right: -2px; width: min(300px, calc(100vw - 12px)); padding: 10px; }
    .auth-mini-form, .auth-box { width: 100%; }
}

/* 0.5.0: expanded profile, mail and notifications */
.profile-nav button,.profile-nav a { position:relative; }
.profile-nav-count { display:inline-grid; min-width:18px; height:18px; margin-left:auto; place-items:center; border-radius:9px; color:#fff; background:#db4c4c; padding:0 5px; font-size:10px; }
.profile-panel-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.profile-panel-head h2 { margin:0; }
.profile-stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:18px; }
.profile-stats-grid div { display:grid; gap:5px; border:1px solid var(--line); border-radius:6px; background:var(--paper); padding:12px; }
.profile-stats-grid span { color:var(--muted); font-size:12px; }
.profile-stats-grid strong { overflow-wrap:anywhere; font-size:18px; }
.profile-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.profile-form-grid label,.profile-privacy-form label,.profile-security-card label,.profile-mail-compose label { display:grid; gap:6px; color:var(--muted); font-weight:700; }
.profile-form-grid input,.profile-form-grid select,.profile-form-grid textarea,.profile-privacy-form select,.profile-security-card input,.profile-mail-compose input,.profile-mail-compose textarea { width:100%; min-height:42px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--paper); padding:8px 11px; font:inherit; box-sizing:border-box; }
.profile-form-grid textarea,.profile-mail-compose textarea { resize:vertical; }
.profile-form-wide { grid-column:1/-1; }
.profile-form-actions { display:flex; justify-content:flex-end; margin-top:6px; }
.profile-check { display:flex !important; grid-template-columns:none !important; flex-direction:row; align-items:center; }
.profile-check input { width:18px !important; min-height:18px !important; }
.profile-requirements { border:1px solid #d89d36; border-radius:6px; background:rgba(216,157,54,.08); padding:14px; }
.profile-requirements ul { margin:10px 0 0; padding-left:22px; }
.profile-requirements .ok { color:#2eb872; }
.profile-requirements .fail { color:#db4c4c; }
.profile-privacy-form { display:grid; gap:10px; }
.profile-privacy-form label { grid-template-columns:minmax(160px,1fr) minmax(180px,260px); align-items:center; }
.profile-security-card { margin-bottom:16px; border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:16px; }
.profile-security-card h3 { margin:0 0 12px; }
.profile-security-card form { display:grid; max-width:520px; gap:12px; }
.profile-security-card .password-input-wrap { position:relative; display:block; }
.profile-security-card .password-input-wrap input { padding-right:46px; }
.status-success { color:#2eb872; font-weight:800; }
.break-anywhere { overflow-wrap:anywhere; word-break:break-all; }
.two-factor-setup code { display:block; width:fit-content; max-width:100%; border:1px solid var(--line); background:var(--white); padding:10px; overflow-wrap:anywhere; font-size:16px; }
.recovery-codes pre { white-space:pre-wrap; border:1px solid var(--line); background:var(--white); padding:12px; }
.session-list { display:grid; gap:8px; }
.session-list>div { display:grid; grid-template-columns:minmax(140px,1fr) auto auto auto; gap:10px; align-items:center; border:1px solid var(--line); border-radius:5px; background:var(--white); padding:10px; }
.session-list span,.session-list small { color:var(--muted); }
.profile-community-list { display:grid; gap:12px; }
.profile-community-list article { display:grid; grid-template-columns:64px minmax(0,1fr); gap:12px; border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:12px; }
.profile-community-avatar { display:grid; width:64px; height:64px; place-items:center; overflow:hidden; border-radius:50%; color:#fff; background:var(--accent); font-size:24px; font-weight:800; }
.profile-community-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-community-list h3 { margin:0 0 5px; }
.profile-community-list p { margin:0 0 7px; color:var(--muted); }
.profile-empty { border:1px dashed var(--line); border-radius:6px; color:var(--muted); padding:20px; text-align:center; }
.profile-mail-compose { display:grid; gap:12px; margin-bottom:16px; border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:14px; }
.profile-mail-folders { display:flex; gap:5px; overflow-x:auto; margin-bottom:12px; padding-bottom:4px; }
.profile-mail-folders button { flex:0 0 auto; border:1px solid var(--line); border-radius:5px; color:var(--ink); background:var(--paper); padding:8px 10px; cursor:pointer; }
.profile-mail-folders button.active { border-color:var(--accent); color:#fff; background:var(--accent); }
.profile-mail-layout { display:grid; grid-template-columns:minmax(250px,36%) minmax(0,1fr); min-height:420px; border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.profile-mail-list { border-right:1px solid var(--line); background:var(--paper); }
.profile-mail-list [data-mail-folder-panel] { display:none; }
.profile-mail-list [data-mail-folder-panel].active { display:block; }
.profile-mail-item { display:grid; width:100%; gap:3px; border:0; border-bottom:1px solid var(--line); color:var(--ink); background:transparent; padding:12px; text-align:left; cursor:pointer; }
.profile-mail-item.unread { border-left:4px solid var(--accent); background:rgba(47,140,255,.08); }
.profile-mail-item span,.profile-mail-item small { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.profile-mail-detail { min-width:0; padding:18px; overflow-wrap:anywhere; }
.profile-mail-detail h3 { margin-top:0; }
.mail-body { white-space:pre-wrap; line-height:1.55; }
.mail-detail-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.profile-notification-list { display:grid; gap:10px; }
.profile-notification-list article { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; border:1px solid var(--line); border-radius:6px; background:var(--paper); padding:13px; }
.profile-notification-list article.unread { border-left:4px solid var(--accent); background:rgba(47,140,255,.08); }
.profile-notification-list p { margin:5px 0; }
.profile-notification-list small { color:var(--muted); }

@media (max-width:760px) {
    .profile-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .profile-form-grid { grid-template-columns:1fr; }
    .profile-form-wide { grid-column:auto; }
    .profile-privacy-form label { grid-template-columns:1fr; }
    .profile-mail-layout { grid-template-columns:1fr; }
    .profile-mail-list { max-height:320px; overflow:auto; border-right:0; border-bottom:1px solid var(--line); }
    .session-list>div { grid-template-columns:1fr; }
}
@media (max-width:430px) {
    .profile-stats-grid { grid-template-columns:1fr; }
    .profile-community-list article { grid-template-columns:50px minmax(0,1fr); }
    .profile-community-avatar { width:50px; height:50px; }
}

/* 0.5.0: material author and threaded comments */
.article-top-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.article-top-links .back-link { margin: 0; }
.article-community-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--muted);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.article-community-link:hover { color: var(--text); }
.article-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 4px;
}

.comments-v2 { overflow: visible; }
.comments-v2 .comments-head { align-items: center; }
.comments-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: 10px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    background: var(--panel-2, var(--panel));
    cursor: pointer;
    white-space: nowrap;
}
.comments-add-button:hover { border-color: var(--accent); color: var(--accent); }
.comment-compose {
    max-height: 420px;
    margin: 14px 0 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2, var(--panel));
    opacity: 1;
    overflow: hidden;
    transform: translateY(0);
    transition: max-height .28s ease, opacity .22s ease, transform .28s ease, margin .28s ease, padding .28s ease, border-width .28s ease;
}
.comment-compose.is-collapsed {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}
.comment-compose.is-reply-compose { margin: 10px 0 4px; }
.comment-compose-label { margin-bottom: 8px; font-weight: 700; }
.comment-compose-recipient, .comment-reply-recipient { color: var(--accent); text-decoration: none; }
.comment-compose-recipient:hover, .comment-reply-recipient:hover { text-decoration: underline; }
.comment-compose textarea {
    display: block;
    width: 100%;
    min-height: 118px;
    resize: vertical;
    box-sizing: border-box;
}
.comment-compose-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}
.comment-compose-footer > span { margin-right: auto; color: var(--muted); font-size: 12px; }
.comment-compose-footer > span.is-limit { color: #e06060; }
.button-secondary {
    border: 1px solid var(--border) !important;
    background: transparent !important;
    color: var(--muted) !important;
}
.comments-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
}
.comments-toolbar button {
    padding: 7px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.comments-toolbar button:hover,
.comments-toolbar button.active { background: var(--panel-2, var(--panel)); color: var(--text); }
.comments-loading { padding: 16px 0; color: var(--muted); }
.comments-loading.is-hidden { display: none; }
.comments-list { display: grid; gap: 13px; }
.comment.comment-root,
.comment.comment-reply {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2, var(--panel));
}
.comment.comment-reply {
    margin-left: 34px;
    border-left: 3px solid var(--border);
    background: color-mix(in srgb, var(--panel-2, var(--panel)) 88%, transparent);
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-author { min-width: 0; display: flex; align-items: center; gap: 7px; }
.comment-author-link {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
}
.comment-author-link strong { overflow-wrap: anywhere; }
.comment-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--border);
    color: var(--muted);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-badge { padding: 3px 6px; border-radius: 5px; font-size: 11px; }
.comment-badge.warning { color: #e4a64b; background: rgba(228,166,75,.12); }
.comment-head time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.comment-body p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-reply-meta { margin: 0 0 8px 42px; color: var(--muted); font-size: 12px; }
.comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}
.comment-vote-button,
.comment-action-link,
.comment-replies-toggle,
.comment-replies-more,
.comments-load-more {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.comment-vote-button {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
}
.comment-vote-button:hover:not(:disabled), .comment-vote-button.active { color: var(--accent); background: rgba(68,123,255,.12); }
.comment-vote-button[data-login-required="1"] { opacity: .72; }
.comment-vote-button:disabled { cursor: default; opacity: .45; }
.comment-rating { min-width: 28px; text-align: center; font-weight: 700; }
.comment-action-link { padding: 5px 7px; }
.comment-action-link:hover { color: var(--text); }
.comment-action-link.danger:hover { color: #ef7777; }
.comment-reply-slot:empty { display: none; }
.comment-replies-toggle { margin: 10px 0 0 42px; padding: 6px 0; color: var(--accent); }
.comment-replies {
    max-height: 4000px;
    margin-top: 4px;
    opacity: 1;
    overflow: hidden;
    transition: max-height .28s ease, opacity .22s ease, margin .28s ease;
}
.comment-replies.is-collapsed { max-height: 0; margin-top: 0; opacity: 0; pointer-events: none; }
.comment-replies-list { display: grid; gap: 9px; }
.comment-replies-more { display: block; margin: 10px 0 0 42px; padding: 6px 0; color: var(--accent); }
.comment-replies-more.is-hidden { display: none; }
.comments-load-more {
    display: block;
    margin: 15px auto 0;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
}
.comments-load-more.is-hidden { display: none; }
.comments-load-more:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
    .article-top-links { align-items: flex-start; flex-direction: column; gap: 8px; }
    .comments-v2 .comments-head { flex-wrap: wrap; }
    .comments-v2 .comments-head .section-head-dots { display: none; }
    .comments-add-button { margin-left: auto; }
    .comment.comment-root, .comment.comment-reply { padding: 12px; }
    .comment.comment-reply { margin-left: 14px; }
    .comment-head { align-items: flex-start; flex-wrap: wrap; }
    .comment-head time { width: 100%; margin: 0 0 0 42px; }
    .comment-reply-meta, .comment-replies-toggle, .comment-replies-more { margin-left: 0; }
    .comment-compose-footer { flex-wrap: wrap; }
    .comment-compose-footer > span { width: 100%; }
}

/* 0.5.0: public author profile */
.public-profile { display: grid; gap: 18px; }
.public-profile-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel);
}
.public-profile-avatar {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--panel-2, var(--border));
    color: var(--muted);
    font-size: 42px;
}
.public-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.public-profile-main { min-width: 0; flex: 1; }
.public-profile-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.public-profile-title-row h1 { margin: 0; overflow-wrap: anywhere; }
.public-profile-group { margin: 7px 0 0; color: var(--muted); }
.public-profile-bio { margin-top: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.profile-status { padding: 5px 8px; border-radius: 6px; font-size: 12px; }
.profile-status.blocked { color: #ef7777; background: rgba(219,76,76,.12); }
.profile-status.archived { color: #d8a45c; background: rgba(216,164,92,.12); }
.public-profile-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.public-profile-metrics span {
    display: grid;
    min-width: 94px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-2, var(--panel));
}
.public-profile-metrics small { color: var(--muted); }
.public-profile-metrics strong { margin-top: 3px; font-size: 18px; }
.public-profile-edit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    text-decoration: none;
}
.public-profile-layout { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 18px; }
.public-profile-sidebar { display: grid; align-content: start; gap: 16px; }
.public-profile-info,
.public-profile-communities,
.public-profile-content {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
}
.public-profile-info h2,
.public-profile-communities h2 { margin: 0 0 13px; font-size: 18px; }
.public-profile-communities h2 span { color: var(--muted); font-size: 13px; }
.public-profile-info dl { display: grid; gap: 10px; margin: 0; }
.public-profile-info dl div { display: grid; gap: 3px; }
.public-profile-info dt { color: var(--muted); font-size: 12px; }
.public-profile-info dd { margin: 0; overflow-wrap: anywhere; }
.public-community-list { display: grid; gap: 8px; }
.public-community-list > a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border-radius: 7px;
    color: var(--text);
    text-decoration: none;
}
.public-community-list > a:hover { background: var(--panel-2, var(--panel)); }
.public-community-list img,
.public-community-list > a > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border);
    color: var(--muted);
}
.public-community-list div { min-width: 0; display: grid; }
.public-community-list strong { overflow-wrap: anywhere; }
.public-community-list small { color: var(--muted); }
.public-profile-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
}
.public-profile-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 7px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.public-profile-tabs a:hover,
.public-profile-tabs a.active { color: var(--text); background: var(--panel-2, var(--panel)); }
.public-profile-tabs span { font-size: 12px; color: var(--muted); }
.public-profile-materials,
.public-profile-comments { display: grid; gap: 12px; margin-top: 16px; }
.public-profile-materials > article {
    display: grid;
    grid-template-columns: 132px minmax(0,1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-2, var(--panel));
}
.public-profile-material-image {
    display: grid;
    place-items: center;
    min-height: 92px;
    overflow: hidden;
    border-radius: 7px;
    background: var(--border);
}
.public-profile-material-image img { width: 100%; height: 100%; object-fit: cover; }
.public-profile-materials h2 { margin: 7px 0; font-size: 18px; overflow-wrap: anywhere; }
.public-profile-materials h2 a { color: var(--text); text-decoration: none; }
.public-profile-materials p { margin: 0 0 9px; color: var(--muted); line-height: 1.5; }
.public-profile-comments article {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-2, var(--panel));
}
.public-profile-comments article > div { display: flex; align-items: center; gap: 9px; }
.public-profile-comments time { color: var(--muted); font-size: 12px; }
.public-profile-comments article > div strong { margin-left: auto; }
.public-profile-comments p { white-space: pre-wrap; overflow-wrap: anywhere; }
.public-profile-comments a { color: var(--accent); text-decoration: none; }
.profile-private-message { margin-top: 16px; padding: 15px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); }
.public-profile-pagination { margin-top: 18px; }

@media (max-width: 900px) {
    .public-profile-layout { grid-template-columns: 1fr; }
    .public-profile-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .public-profile-card { flex-direction: column; align-items: center; text-align: center; padding: 17px; }
    .public-profile-title-row { justify-content: center; }
    .public-profile-metrics { justify-content: center; }
    .public-profile-edit { position: static; }
    .public-profile-sidebar { grid-template-columns: 1fr; }
    .public-profile-content { padding: 13px; }
    .public-profile-materials > article { grid-template-columns: 1fr; }
    .public-profile-material-image { min-height: 180px; }
    .public-profile-pagination { align-items: flex-start; }
}

/* Community directory and community workspace 0.5 */
.communities-directory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}
.communities-directory-main,
.community-feed-column { min-width: 0; }
.community-feed-column { scroll-margin-top: 88px; }
.community-list-full { display: grid; gap: 12px; }
.community-card-wide { grid-template-columns: 76px minmax(0, 1fr); width: 100%; }
.community-card-wide .community-card-avatar { width: 76px; height: 76px; }
.community-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.community-card-heading h2 { margin: 0; }
.communities-news-sidebar { min-width: 0; }
.sidebar-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 14px;
}
.sidebar-card > h2 { margin: 0 0 12px; font-size: 20px; }
.community-news-list { display: grid; gap: 10px; }
.community-news-list article {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.community-news-list article:last-child { border-bottom: 0; padding-bottom: 0; }
.community-news-thumb {
    display: grid;
    place-items: center;
    width: 92px;
    height: 68px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--paper);
    color: var(--muted);
}
.community-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.community-news-list h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.community-news-source { display: block; color: var(--accent-dark); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.community-news-list time { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    min-width: 0;
}
.list-total { color: var(--muted); white-space: nowrap; }
.content-pagination.always-visible { display: flex; margin: 0; justify-content: flex-end; min-width: 0; }
.content-pagination .disabled { opacity: .45; cursor: default; pointer-events: none; }

.community-hero-content { position: relative; }
.community-hero-copy { min-width: 0; flex: 1 1 auto; }
.community-hero-copy a { color: inherit; }
.community-add-material-button {
    align-self: flex-start;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 6px;
    background: rgba(0,0,0,.28);
    color: #fff;
    padding: 10px 13px;
    font-weight: 800;
    white-space: nowrap;
}
.community-add-material-button:hover { background: rgba(0,0,0,.48); }
.community-restriction-banner {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 14px auto;
    border: 1px solid #d79d26;
    border-radius: 8px;
    background: rgba(215,157,38,.12);
    padding: 14px;
}
.community-restriction-banner.level-3,
.community-restriction-banner.level-4,
.community-restriction-banner.level-5 { border-color: #c94b4b; background: rgba(201,75,75,.12); }
.community-restriction-icon { display: grid; place-items: center; font-size: 26px; color: #b97a0a; }
.community-restriction-banner.level-3 .community-restriction-icon,
.community-restriction-banner.level-4 .community-restriction-icon,
.community-restriction-banner.level-5 .community-restriction-icon { color: #c94b4b; }
.community-restriction-banner h2 { margin: 0 0 5px; font-size: 19px; }
.community-restriction-banner p { margin: 4px 0; }

.community-compose-panel {
    overflow: hidden;
    max-height: 2200px;
    margin: 12px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 16px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .3s ease, opacity .25s ease, transform .25s ease, padding .25s ease, margin .25s ease, border-width .25s ease;
}
.community-compose-panel.is-collapsed {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-width: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}
.community-compose-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.community-compose-head h2 { margin: 0; }
.community-compose-head p { margin: 4px 0 0; color: var(--muted); }
.community-compose-head > button { border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.community-material-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.community-material-form label { display: grid; gap: 6px; min-width: 0; }
.community-material-form label > span { font-weight: 700; }
.community-material-form input,
.community-material-form textarea,
.community-material-form select { width: 100%; min-width: 0; }
.community-form-wide { grid-column: 1 / -1; }
.community-material-types { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.community-material-types button {
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    color: var(--text);
    padding: 8px 12px;
    font-weight: 800;
}
.community-material-types button.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.community-material-types button.disabled { opacity: .45; cursor: not-allowed; }
.community-media-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.community-media-fields label { border: 1px dashed var(--line); border-radius: 7px; background: var(--paper); padding: 12px; }
.community-media-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.community-media-preview figure { position: relative; width: 96px; margin: 0; }
.community-media-preview img { width: 96px; height: 72px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.community-media-preview figcaption { margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.community-form-actions > span { margin-right: auto; color: var(--muted); }

.community-content-layout {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 12px;
}
.community-filter-sidebar {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 10px;
}
.community-filter-list { display: grid; }
.community-filter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 5px;
    padding: 9px 10px;
    color: var(--text);
    font-weight: 700;
}
.community-filter-list a:hover,
.community-filter-list a.active { background: var(--accent); color: #fff; }
.community-filter-list b { font-size: 12px; color: var(--muted); }
.community-filter-list a.active b,
.community-filter-list a:hover b { color: rgba(255,255,255,.8); }
.community-category-filter { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.community-category-filter h3 { margin: 0 0 7px; font-size: 14px; }
.community-category-filter a { display: block; border-radius: 4px; padding: 6px 8px; color: var(--muted); overflow-wrap: anywhere; }
.community-category-filter a:hover,
.community-category-filter a.active { color: var(--accent-dark); background: var(--paper); font-weight: 800; }

@media (max-width: 900px) {
    .communities-directory-layout { grid-template-columns: 1fr; }
    .communities-news-sidebar { order: 2; }
    .community-content-layout { grid-template-columns: 1fr; }
    .community-filter-sidebar { overflow-x: auto; }
    .community-filter-list { display: flex; min-width: max-content; }
    .community-filter-list a { min-width: max-content; }
    .community-category-filter { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin-top: 8px; padding-top: 8px; }
    .community-category-filter h3 { min-width: max-content; margin: 0 4px 0 0; }
    .community-category-filter a { min-width: max-content; }
}
@media (max-width: 680px) {
    .community-hero-content { align-items: flex-start; }
    .community-add-material-button { margin-left: 0; }
    .community-material-form { grid-template-columns: 1fr; }
    .community-form-wide { grid-column: auto; }
    .community-material-types { grid-column: auto; }
    .community-media-fields { grid-template-columns: 1fr; }
    .list-footer { align-items: flex-start; flex-direction: column; }
    .content-pagination.always-visible { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 3px; }
    .community-news-list article { grid-template-columns: 78px minmax(0, 1fr); }
    .community-news-thumb { width: 78px; height: 62px; }
}
@media (max-width: 420px) {
    .community-card-wide { grid-template-columns: 52px minmax(0, 1fr); }
    .community-card-wide .community-card-avatar { width: 52px; height: 52px; }
    .community-card-heading { align-items: flex-start; flex-direction: column; }
    .community-restriction-banner { grid-template-columns: 1fr; }
    .community-restriction-icon { justify-content: start; }
}

/* Community invitations */
.community-hero-actions { align-self:flex-start; margin-left:auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.community-hero-actions .community-add-material-button { margin-left:0; }
.community-invite-button {
    border:1px solid rgba(255,255,255,.45);
    border-radius:6px;
    background:rgba(0,0,0,.28);
    color:#fff;
    padding:10px 13px;
    font-weight:800;
    white-space:nowrap;
}
.community-invite-button:hover { background:rgba(0,0,0,.48); }
.community-invite-panel {
    overflow:hidden;
    max-height:900px;
    margin:12px 0;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--white);
    padding:16px;
    opacity:1;
    transform:translateY(0);
    transition:max-height .3s ease,opacity .25s ease,transform .25s ease,padding .25s ease,margin .25s ease,border-width .25s ease;
}
.community-invite-panel.is-collapsed { max-height:0; margin-top:0; margin-bottom:0; border-width:0; padding-top:0; padding-bottom:0; opacity:0; transform:translateY(-8px); pointer-events:none; }
.community-invite-form { display:grid; grid-template-columns:minmax(0,2fr) minmax(180px,1fr); gap:12px; align-items:end; }
.community-invite-form label { display:grid; gap:6px; min-width:0; }
.community-invite-form label > span { font-weight:700; }
.community-invite-form input,.community-invite-form select { width:100%; min-width:0; }
.community-invite-limits { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px 16px; color:var(--muted); font-size:13px; }
.community-invite-form .profile-requirements,.community-invite-form .community-form-actions { grid-column:1/-1; }
.profile-invitations { margin:0 0 16px; }
.profile-invitations h3 { margin:0 0 9px; }
.profile-invitation-list { display:grid; gap:10px; }
.profile-invitation-list article { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; border:1px solid var(--accent); border-radius:7px; background:rgba(47,140,255,.08); padding:13px; transition:opacity .2s ease,transform .2s ease; }
.profile-invitation-list article.is-processed { opacity:.7; transform:scale(.99); }
.profile-invitation-list p { margin:5px 0; }
.profile-invitation-list small { color:var(--muted); }
.profile-invitation-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.profile-invitation-actions button,.profile-invitation-actions a { border:1px solid var(--accent); border-radius:5px; background:var(--accent); color:#fff; padding:7px 10px; font-weight:700; }
.profile-invitation-actions .secondary { background:transparent; color:var(--text); border-color:var(--line); }
@media (max-width:680px) {
    .community-hero-actions { margin-left:0; justify-content:flex-start; }
    .community-invite-form { grid-template-columns:1fr; }
    .community-invite-limits,.community-invite-form .profile-requirements,.community-invite-form .community-form-actions { grid-column:auto; }
    .profile-invitation-list article { flex-direction:column; }
    .profile-invitation-actions { justify-content:flex-start; width:100%; }
}

.mail-attachments { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.mail-attachments:empty { display:none; }
.mail-attachments a { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:5px; background:var(--paper); color:var(--text); padding:7px 10px; overflow-wrap:anywhere; }

.two-factor-qr {
    width: min(240px, 100%);
    aspect-ratio: 1;
    margin: 12px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
}
.two-factor-qr svg { display: block; width: 100%; height: 100%; }
.two-factor-uri-details { max-width: 100%; margin: 10px 0; color: var(--muted); }
.two-factor-uri-details summary { cursor: pointer; font-weight: 700; }

/* Community material media manager */
body.modal-open { overflow: hidden; }
.community-media-preview { display: grid; gap: 12px; }
.community-media-preview-group { min-width: 0; }
.community-media-preview-group h4 { margin: 0 0 7px; font-size: 13px; }
.community-media-preview-list { display: flex; flex-wrap: wrap; gap: 8px; }
.community-media-preview-item {
    display: grid;
    width: 116px;
    min-width: 0;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    padding: 5px;
    text-align: left;
    cursor: pointer;
}
.community-media-preview-item:hover { border-color: var(--accent); }
.community-media-preview-item img { width: 104px; height: 76px; border: 0; border-radius: 4px; object-fit: cover; }
.community-media-preview-item span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.community-media-manager {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.68);
    padding: 16px;
}
.community-media-manager.is-hidden { display: none; }
.community-media-manager-dialog {
    width: min(720px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.community-media-manager-head,
.community-media-manager-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; }
.community-media-manager-head { border-bottom: 1px solid var(--line); }
.community-media-manager-head h3 { margin: 0; }
.community-media-manager-head > button { border: 0; color: var(--muted); background: transparent; font-size: 20px; }
.community-media-manager-list { display: grid; gap: 8px; padding: 14px; }
.community-media-manager-item {
    display: grid;
    grid-template-columns: 92px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
    padding: 8px;
}
.community-media-manager-item > img { width: 92px; height: 68px; border-radius: 5px; object-fit: cover; }
.community-media-manager-info { display: grid; min-width: 0; gap: 7px; }
.community-media-manager-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-media-manager-info label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.community-media-manager-info input { width: auto; min-height: 0; }
.community-media-manager-item-actions { display: flex; gap: 5px; }
.community-media-manager-item-actions button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--white); }
.community-media-manager-item-actions button:disabled { opacity: .35; cursor: default; }
.community-media-manager-actions { justify-content: flex-end; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
    .community-media-manager { padding: 8px; }
    .community-media-manager-dialog { max-height: calc(100vh - 16px); }
    .community-media-manager-item { grid-template-columns: 70px minmax(0,1fr); }
    .community-media-manager-item > img { width: 70px; height: 56px; }
    .community-media-manager-item-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

html.theme-dark body {
    --ink: #f4f6fb;
    --muted: #9aa4b7;
    --line: #2b313d;
    --paper: #090b0f;
    --white: #13161c;
    --accent: #2f8cff;
    --accent-dark: #7bb8ff;
}
html.theme-light body {
    --ink: #182033;
    --muted: #687287;
    --line: #dbe2ec;
    --paper: #f4f7fb;
    --white: #ffffff;
    --accent: #2f8cff;
    --accent-dark: #1769c2;
}

/* 0.5.1: profile materials */
.profile-material-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.profile-material-filters a{display:inline-flex;align-items:center;min-height:34px;padding:7px 11px;border:1px solid var(--border-color);border-radius:8px;color:var(--text-muted);text-decoration:none}.profile-material-filters a.active{background:var(--accent-color);border-color:var(--accent-color);color:#fff}.profile-material-status-filters{margin-top:-4px}.profile-material-list{display:grid;gap:14px}.profile-material-card{border:1px solid var(--border-color);border-radius:12px;padding:15px;background:var(--panel-bg)}.profile-material-card>header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.profile-material-card>header>div{display:flex;align-items:center;gap:9px;min-width:0}.profile-material-card>header strong{overflow-wrap:anywhere}.profile-material-status{white-space:nowrap;border-radius:999px;padding:5px 9px;font-size:12px;background:var(--soft-bg)}.profile-material-reason{margin:10px 0;padding:10px;border-left:3px solid #d79a26;background:var(--soft-bg);overflow-wrap:anywhere}.profile-material-editor{margin-top:12px;border-top:1px solid var(--border-color);padding-top:10px}.profile-material-editor summary{cursor:pointer;font-weight:600}.profile-material-edit-form{display:grid;gap:12px;margin-top:12px}.profile-material-edit-form label{display:grid;gap:6px}.profile-material-edit-form textarea,.profile-material-edit-form select{width:100%}.profile-material-resubmit{display:flex;justify-content:flex-end;margin-top:10px}.profile-material-open{display:inline-flex;margin-top:10px}.status-draft{opacity:.85}.status-revision{background:#634b1f;color:#ffd890}.status-published{background:#174d36;color:#a7f0cd}.status-rejected,.status-blocked,.status-archived{background:#572a2a;color:#ffb5b5}@media(max-width:640px){.profile-material-filters{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.profile-material-filters a{white-space:nowrap}.profile-material-card>header{display:grid}.profile-material-status{justify-self:start}.profile-material-card>header>div{align-items:flex-start;flex-wrap:wrap}}

/* 0.5.2-p1: AJAX profile panels and inline validation */
.profile-nav a { text-decoration:none; }
.profile-nav a.is-disabled { pointer-events:none; opacity:.58; }
.profile-content.is-loading { position:relative; min-height:180px; opacity:.65; pointer-events:none; }
.profile-content.is-loading::after { content:""; position:absolute; top:28px; right:28px; width:24px; height:24px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:profile-spin .7s linear infinite; }
@keyframes profile-spin { to { transform:rotate(360deg); } }
.profile-field-error,.profile-form-error { display:block; margin-top:6px; color:#d64c4c; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.profile-form-error { width:100%; padding:9px 11px; border:1px solid rgba(214,76,76,.45); border-radius:6px; background:rgba(214,76,76,.08); }
.profile-panel label.has-error > input,.profile-panel label.has-error > select,.profile-panel label.has-error > textarea,.profile-panel label.has-error .password-input-wrap { border-color:#d64c4c; box-shadow:0 0 0 2px rgba(214,76,76,.12); }
.profile-required-actions,.profile-restriction-reason { margin-top:13px; padding:12px; border:1px solid var(--line); border-radius:7px; background:var(--paper); }
.profile-required-actions ul { margin:8px 0 0; padding-left:20px; }
.profile-required-actions li + li { margin-top:5px; }
.profile-restriction-reason { border-color:rgba(214,76,76,.45); }
@media (max-width:680px) { .profile-content.is-loading::after { top:18px; right:18px; } }

/* 0.5.3 — community material moderation, preview and author media revision */
.community-moderation-button{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:9px 13px;border:1px solid rgba(255,255,255,.28);border-radius:9px;background:rgba(0,0,0,.3);color:#fff;cursor:pointer}.community-moderation-button span{display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:999px;background:var(--accent);font-size:12px;font-weight:700}.community-moderation-panel{overflow:hidden;margin:18px 0;border:1px solid var(--line);border-radius:14px;background:var(--panel-bg);transition:max-height .28s ease,opacity .2s ease}.community-moderation-panel.is-collapsed{max-height:0;margin-top:0;margin-bottom:0;border-width:0;opacity:0}.community-moderation-panel:not(.is-collapsed){max-height:20000px;opacity:1}.community-moderation-host{padding:0 18px 18px}.community-moderation-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.community-moderation-summary h3{margin:0 0 4px}.community-moderation-summary p{margin:0;color:var(--muted)}.community-moderation-filters{display:flex;gap:8px;overflow-x:auto;margin-bottom:14px;padding-bottom:4px}.community-moderation-filters a{flex:0 0 auto;padding:8px 11px;border:1px solid var(--line);border-radius:8px;color:var(--muted);text-decoration:none;white-space:nowrap}.community-moderation-filters a.active{border-color:var(--accent);background:var(--accent);color:#fff}.community-moderation-list{display:grid;gap:14px}.community-moderation-card{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--soft-bg)}.community-moderation-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.community-moderation-card>header>div{min-width:0}.community-moderation-card h4{margin:8px 0 0;overflow-wrap:anywhere;font-size:19px}.community-moderation-meta{display:flex;flex-wrap:wrap;gap:8px 16px;margin:10px 0;color:var(--muted);font-size:13px}.community-moderation-meta a{color:inherit}.community-moderation-summary-text{margin:10px 0}.community-moderation-content,.community-moderation-history{margin-top:11px;border-top:1px solid var(--line);padding-top:10px}.community-moderation-content summary,.community-moderation-history summary{cursor:pointer;font-weight:700}.community-moderation-body{margin-top:10px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.community-moderation-media{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}.community-moderation-media a{display:grid;gap:4px;width:105px;color:var(--muted);text-decoration:none;font-size:11px}.community-moderation-media img{width:105px;height:78px;object-fit:cover;border:1px solid var(--line);border-radius:7px}.community-moderation-history ol,.profile-material-history ol{display:grid;gap:9px;margin:10px 0 0;padding:0;list-style:none}.community-moderation-history li,.profile-material-history li{padding:9px 10px;border-left:3px solid var(--accent);background:var(--panel-bg)}.community-moderation-history li>div,.profile-material-history li>div{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.community-moderation-history li span,.profile-material-history li span{color:var(--muted);font-size:12px}.community-moderation-history li p,.profile-material-history li p{margin:6px 0 0}.community-moderation-form{display:grid;gap:10px;margin-top:13px;padding-top:13px;border-top:1px solid var(--line)}.community-moderation-form label{display:grid;gap:6px}.community-moderation-form textarea{width:100%;min-height:78px}.community-moderation-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.community-moderation-actions button{min-height:36px}.community-moderation-actions .success{background:#217a50}.community-moderation-actions .warning{background:#996a18}.community-moderation-actions .danger{background:#8d3434}.community-rating-option{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:9px!important}.community-rating-option input{width:auto!important;margin:0}.material-preview-modal{position:fixed;z-index:10020;inset:0;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.72)}.material-preview-modal.is-hidden{display:none}.material-preview-dialog{width:min(860px,100%);max-height:92vh;overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel-bg);box-shadow:0 24px 70px rgba(0,0,0,.42)}.material-preview-article{padding:20px}.material-preview-article h2{margin:10px 0;font-size:clamp(23px,4vw,36px);overflow-wrap:anywhere}.material-preview-summary{font-size:17px;color:var(--muted)}.material-preview-body{margin-top:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.material-preview-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px;margin:17px 0}.material-preview-gallery figure{margin:0}.material-preview-gallery img{width:100%;height:130px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}.material-preview-gallery figcaption{margin-top:4px;color:var(--muted);font-size:12px}.profile-material-history{margin-top:12px}.profile-material-media-editor{display:grid;gap:10px}.profile-material-media-editor h4{margin:0}.profile-material-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}.profile-material-media-item{display:grid;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--soft-bg)}.profile-material-media-item>a{display:block}.profile-material-media-item img{width:100%;height:125px;object-fit:cover;border-radius:7px}.profile-material-media-item label{font-size:12px}.profile-material-media-item input[type=number]{width:90px}.profile-media-primary,.profile-media-remove{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:7px!important}.profile-media-primary input,.profile-media-remove input{width:auto!important}.profile-material-new-media{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:700px){.community-moderation-summary,.community-moderation-card>header{display:grid}.community-moderation-host{padding:0 11px 12px}.community-moderation-card{padding:12px}.community-moderation-actions{justify-content:stretch}.community-moderation-actions button{flex:1 1 145px}.material-preview-modal{padding:8px}.material-preview-dialog{max-height:96vh}.material-preview-article{padding:14px}.profile-material-new-media{grid-template-columns:1fr}.profile-material-media-grid{grid-template-columns:1fr}.community-hero-actions{flex-wrap:wrap}}
.material-preview-meta,.material-preview-footer{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;color:var(--muted);font-size:13px}.material-preview-meta{padding-bottom:12px;border-bottom:1px solid var(--line)}.material-preview-footer{justify-content:space-between;margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}.material-preview-footer span{overflow-wrap:anywhere}.community-moderation-form button:disabled{opacity:.62;cursor:wait}
@media(max-width:560px){.material-preview-meta,.material-preview-footer{display:grid;justify-content:stretch}.material-preview-gallery{grid-template-columns:1fr 1fr}.material-preview-gallery img{height:110px}}

/* Community permission pages: v0.5.4 */
.community-section-tabs{display:flex;gap:8px;align-items:center;overflow-x:auto;padding:12px 0;margin:0 0 18px;scrollbar-width:thin}
.community-section-tabs a{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;padding:9px 12px;border:1px solid var(--border-color,rgba(255,255,255,.12));border-radius:8px;color:inherit;text-decoration:none;white-space:nowrap}
.community-section-tabs a:hover,.community-section-tabs a.active{background:var(--card-bg,#202020);border-color:var(--accent,#5b8cff)}
.community-section-tabs a b{min-width:20px;padding:2px 6px;border-radius:999px;background:var(--accent,#5b8cff);color:#fff;text-align:center;font-size:12px}
.community-subpage{min-width:0;padding:20px;border:1px solid var(--border-color,rgba(255,255,255,.12));border-radius:10px;background:var(--card-bg,#1b1b1b)}
.community-subpage h2,.community-subpage h3{margin-top:0}
.community-subpage-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.community-subpage-head p{margin:5px 0 0;opacity:.72}
.community-subpage-head form button,.community-join-requests button{min-height:40px}
.community-members-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.community-member-card{display:flex;align-items:center;gap:12px;min-width:0;padding:14px;border:1px solid var(--border-color,rgba(255,255,255,.1));border-radius:9px}
.community-member-card>div{min-width:0}.community-member-card h3{margin:0 0 4px}.community-member-card p,.community-member-card small{display:block;margin:0;overflow-wrap:anywhere}
.community-member-avatar{display:grid;place-items:center;width:52px;height:52px;flex:0 0 52px;border-radius:50%;overflow:hidden;background:rgba(127,127,127,.18);text-decoration:none}
.community-member-avatar img{width:100%;height:100%;object-fit:cover}.community-member-avatar span{font-weight:700;font-size:20px}
.community-membership-status{display:inline-flex;padding:8px 11px;border-radius:999px;font-size:13px}.community-membership-status.pending{background:rgba(230,165,38,.16)}.community-membership-status.active{background:rgba(44,175,102,.16)}
.community-rules-body{line-height:1.7;overflow-wrap:anywhere}
.community-violation-history,.community-action-log,.community-join-requests{display:grid;gap:12px}
.community-violation-history article,.community-action-log article,.community-join-requests article{padding:14px;border:1px solid var(--border-color,rgba(255,255,255,.1));border-radius:9px;min-width:0}
.community-violation-history article>div,.community-action-log article>div,.community-join-requests article{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.community-action-log pre{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:10px;border-radius:7px;background:rgba(0,0,0,.14)}
.community-join-requests article>div{min-width:0}.community-join-requests article small{display:block;margin-top:4px;overflow-wrap:anywhere}
.community-join-requests form{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;min-width:min(100%,420px)}
.community-join-requests form input[name="reason"]{flex:1 1 190px;min-width:0}
.community-join-requests form [data-join-decision-error]{flex-basis:100%;color:#dc6464;text-align:right}
.community-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.community-stat-grid article{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:105px;padding:14px;border:1px solid var(--border-color,rgba(255,255,255,.1));border-radius:9px;text-align:center}
.community-stat-grid strong{font-size:28px;line-height:1}.community-stat-grid span{margin-top:7px;opacity:.7}
@media(max-width:900px){.community-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.community-members-grid{grid-template-columns:1fr}}
@media(max-width:600px){.community-subpage{padding:14px}.community-section-tabs{margin-left:-4px;margin-right:-4px;padding-left:4px;padding-right:4px}.community-subpage-head,.community-violation-history article>div,.community-action-log article>div,.community-join-requests article{flex-direction:column}.community-subpage-head form,.community-subpage-head form button{width:100%}.community-join-requests form{width:100%;justify-content:stretch}.community-join-requests form button{flex:1 1 120px}.community-stat-grid{grid-template-columns:1fr 1fr}.community-member-card{align-items:flex-start}}
.community-member-card{flex-wrap:wrap}.community-member-copy{flex:1 1 180px}.community-member-controls{display:grid;gap:8px;flex:1 1 100%;padding-top:10px;border-top:1px solid var(--border-color,rgba(255,255,255,.1))}.community-member-controls form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.community-member-controls select,.community-member-controls input{min-width:0;flex:1 1 180px}.community-member-controls button{min-height:38px}.community-member-controls button.danger{border-color:rgba(219,76,76,.5);color:#ef7777}.community-member-controls [data-community-member-error]{flex-basis:100%;color:#dc6464;font-size:13px}
@media(max-width:600px){.community-member-controls form>*{width:100%;flex-basis:100%}.community-member-controls button{width:100%}}

/* 0.5.8: separated authenticator and recovery-code login */
.two-factor-methods {
    display: grid;
    min-width: 0;
    margin: 0 0 12px;
    border: 0;
    padding: 0;
    gap: 8px;
}
.two-factor-methods legend {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.auth-mini-form .two-factor-method,
.auth-box .two-factor-method {
    display: grid;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
    padding: 10px;
    gap: 7px;
    cursor: pointer;
}
.auth-mini-form .two-factor-method.is-active,
.auth-box .two-factor-method.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(47, 140, 255, .12);
}
.two-factor-method-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}
.auth-mini-form .two-factor-method-title input,
.auth-box .two-factor-method-title input {
    width: 16px;
    min-height: 16px;
    margin: 0;
}
.two-factor-method small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}
.two-factor-method-field {
    display: none;
}
.two-factor-method.is-active .two-factor-method-field {
    display: block;
}
.profile-security-required-notice { margin-bottom:14px; border:1px solid rgba(214,143,0,.45); border-radius:8px; background:rgba(214,143,0,.09); padding:12px 14px; }
.profile-security-required-notice strong { color:var(--ink); }
.profile-security-required-notice p { margin:6px 0 0; color:var(--muted); line-height:1.45; }
.profile-security-required-notice { margin-bottom:14px; border:1px solid rgba(214,143,0,.45); border-radius:8px; background:rgba(214,143,0,.09); padding:12px 14px; }
.profile-security-required-notice strong { color:var(--ink); }
.profile-security-required-notice p { margin:6px 0 0; color:var(--muted); line-height:1.45; }

/* 0.5.9: optional 2FA label and canonical project branding. */
.profile-security-optional {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}


/* 0.5.11: trusted-device control belongs to the second 2FA step. */
.two-factor-trust-box {
    display: grid;
    margin: 2px 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
    padding: 10px;
    gap: 4px;
}
.two-factor-trust-box .auth-check { margin: 0; }
.two-factor-trust-box small { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* Public profile: separated community roles and deleted-account state. */
.public-community-group { display: grid; gap: 9px; }
.public-community-group + .public-community-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.public-profile-communities .public-community-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 14px; }
.public-profile-communities .public-community-group h3 span { color: var(--muted); font-size: 12px; font-weight: 500; }
.public-profile-card-deleted { min-height: 180px; }
.public-profile-deleted-message { display: grid; justify-items: center; gap: 8px; padding: 34px 20px; text-align: center; }
.public-profile-deleted-message > i { font-size: 38px; color: var(--muted); }
.public-profile-deleted-message h2 { margin: 0; }
.public-profile-deleted-message p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.6; }


/* 0.5.18: violation disclosure, conversation history and escalation controls */
.community-restriction-content{min-width:0}
.community-main-violation{font-size:15px}
.community-violations-disclosure{margin-top:12px;border-top:1px solid rgba(127,127,127,.24);padding-top:10px}
.community-violations-disclosure>summary{cursor:pointer;font-weight:800;list-style-position:inside}
.community-active-violations-list{display:grid;gap:10px;margin-top:12px}
.community-active-violation{min-width:0;padding:12px;border:1px solid rgba(127,127,127,.22);border-radius:8px;background:rgba(127,127,127,.06)}
.community-active-violation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.community-active-violation-head span{white-space:nowrap;font-size:12px;font-weight:800}
.community-violation-thread,.admin-violation-thread{display:grid;gap:8px;margin:12px 0}
.community-violation-message,.admin-violation-message{padding:10px 12px;border:1px solid rgba(127,127,127,.2);border-radius:8px;background:rgba(127,127,127,.06)}
.community-violation-message.role-owner,.admin-violation-message.role-owner{border-left:3px solid #3a85d8}
.community-violation-message.role-admin,.admin-violation-message.role-admin{border-left:3px solid #d49a2e}
.community-violation-message.type-escalation,.admin-violation-message.type-escalation{border-color:rgba(201,75,75,.55);background:rgba(201,75,75,.08)}
.community-violation-message>div,.admin-violation-message>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.community-violation-message time,.admin-violation-message time{font-size:11px;opacity:.7;white-space:nowrap}
.community-violation-message p,.admin-violation-message p{margin:6px 0 0;overflow-wrap:anywhere}
.community-violation-thread.compact{max-height:320px;overflow:auto;padding-right:4px}
.community-violation-response-form{display:grid;gap:8px;margin-top:12px}
.community-violation-response-form label{display:grid;gap:6px}
.community-violation-response-form textarea{width:100%;box-sizing:border-box;resize:vertical}
.community-violation-history-link{margin-top:12px!important}
.community-violation-card-head small{display:block;margin-top:4px;opacity:.7}
.admin-violation-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:10px}
.admin-violation-actions form{min-width:0}
.admin-violation-escalate-form{border-left:3px solid rgba(201,75,75,.65);padding-left:10px}
@media(max-width:700px){.community-active-violation-head,.community-violation-message>div,.admin-violation-message>div{flex-direction:column}.community-violation-message time,.admin-violation-message time{white-space:normal}.admin-violation-actions{grid-template-columns:1fr}.community-restriction-banner{margin-left:0;margin-right:0}}

/* v0.5.22 — public and profile media management */
.article-poster-open{position:relative;display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;cursor:zoom-in}
.article-poster-open>span{position:absolute;right:9px;bottom:9px;display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:rgba(0,0,0,.68);color:#fff;font-size:12px;opacity:0;transform:translateY(4px);transition:.18s ease}
.article-poster-open:hover>span,.article-poster-open:focus-visible>span{opacity:1;transform:none}
.article-media-gallery{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.article-media-gallery-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.article-media-gallery-head h2{margin:0;font-size:20px}
.article-media-gallery-head span{display:grid;min-width:28px;height:28px;place-items:center;border-radius:999px;background:var(--soft-bg);color:var(--muted);font-size:12px}
.article-media-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.article-media-thumb{position:relative;display:grid;gap:6px;padding:7px;border:1px solid var(--line);border-radius:10px;background:var(--soft-bg);color:var(--ink);text-align:left;cursor:zoom-in;overflow:hidden}
.article-media-thumb.is-primary{border-color:var(--accent)}
.article-media-thumb img{width:100%;height:118px;object-fit:cover;border-radius:7px;transition:transform .2s ease}
.article-media-thumb:hover img{transform:scale(1.035)}
.article-media-thumb span{font-size:12px;color:var(--muted)}
.site-media-viewer{position:fixed;z-index:30000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.92)}
.site-media-viewer.is-hidden{display:none}
.site-media-viewer-dialog{position:relative;display:grid;place-items:center;width:min(1600px,100%);height:min(96vh,100%)}
.site-media-viewer-dialog figure{display:grid;place-items:center;max-width:100%;max-height:100%;margin:0}
.site-media-viewer-dialog figure img{max-width:100%;max-height:calc(96vh - 58px);object-fit:contain;border-radius:8px;box-shadow:0 24px 80px rgba(0,0,0,.55)}
.site-media-viewer-dialog figcaption{display:flex;align-items:center;justify-content:center;gap:14px;max-width:min(900px,90vw);margin-top:9px;color:#fff;text-align:center}
.site-media-viewer-dialog figcaption small{color:rgba(255,255,255,.7)}
.site-media-viewer-close,.site-media-viewer-nav{position:absolute;z-index:2;display:grid;place-items:center;border:1px solid rgba(255,255,255,.3);background:rgba(0,0,0,.62);color:#fff}
.site-media-viewer-close{top:0;right:0;width:44px;height:44px;border-radius:50%;font-size:20px}
.site-media-viewer-nav{top:50%;width:48px;height:64px;margin-top:-32px;border-radius:10px;font-size:31px}
.site-media-viewer-nav.prev{left:0}.site-media-viewer-nav.next{right:0}
body.site-media-viewer-open{overflow:hidden}

.profile-material-media-manager-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid var(--line);border-radius:10px;background:var(--soft-bg)}
.profile-material-media-manager-summary h4{margin:0 0 4px}.profile-material-media-manager-summary p{margin:0;color:var(--muted);font-size:13px}
.profile-material-media-manager-summary button span{display:inline-grid;min-width:23px;height:23px;place-items:center;margin-left:5px;border-radius:999px;background:rgba(255,255,255,.15)}
.profile-media-manager{position:fixed;z-index:10030;inset:0;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.76)}
.profile-media-manager.is-hidden{display:none}
.profile-media-manager-dialog{width:min(980px,100%);max-height:94vh;overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel-bg);box-shadow:0 24px 70px rgba(0,0,0,.44)}
.profile-media-manager-dialog .community-media-manager-head p{margin:4px 0 0;color:var(--muted);font-size:13px}
.profile-media-manager-tabs{display:flex;gap:7px;padding:12px 14px;border-bottom:1px solid var(--line);overflow-x:auto}
.profile-media-manager-tabs button{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border:1px solid var(--line);border-radius:8px;background:var(--soft-bg);color:var(--muted);white-space:nowrap}
.profile-media-manager-tabs button.active{border-color:var(--accent);background:var(--accent);color:#fff}
.profile-media-manager-tabs span{display:grid;min-width:21px;height:21px;place-items:center;border-radius:999px;background:rgba(255,255,255,.16);font-size:11px}
.profile-media-manager-panel{display:none;padding:14px}.profile-media-manager-panel.active{display:block}
.profile-media-manager-list{display:grid;gap:9px}
.profile-media-manager-item{display:grid;grid-template-columns:92px minmax(0,1fr) auto;align-items:center;gap:11px;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--soft-bg)}
.profile-media-manager-item.is-dragging{opacity:.45}.profile-media-manager-item.is-new{border-style:dashed;border-color:var(--accent)}
.profile-media-manager-item.is-removal-pending{border-color:#b94747;opacity:.58}.profile-media-manager-item.is-replacement-pending{border-color:#d59a25}
.profile-media-preview-button{position:relative;width:92px;height:68px;padding:0;border:0;border-radius:7px;background:transparent;overflow:hidden;cursor:zoom-in}
.profile-media-preview-button img{width:100%;height:100%;object-fit:cover}
.profile-media-preview-button>span{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.38);color:#fff;opacity:0;transition:.18s ease}
.profile-media-preview-button:hover>span{opacity:1}
.profile-media-manager-info{display:grid;gap:5px;min-width:0}.profile-media-manager-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-media-manager-info small{color:var(--muted)}
.profile-media-manager-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.profile-media-manager-actions button,.profile-media-replace-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:35px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:var(--panel-bg);color:var(--ink);font-size:12px;cursor:pointer}
.profile-media-manager-actions .danger{color:#d75b5b}.profile-media-manager-actions button:hover,.profile-media-replace-button:hover{border-color:var(--accent)}
.profile-media-replace-button input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}
.profile-media-upload{display:flex!important;align-items:center;justify-content:center;gap:8px;min-height:48px;margin-top:11px;border:1px dashed var(--accent)!important;border-radius:9px;color:var(--accent);cursor:pointer}
.profile-media-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.community-media-manager-item[draggable=true]{cursor:grab}.community-media-manager-item.is-dragging{opacity:.45}.community-media-manager-item>img{cursor:zoom-in}
@media(max-width:700px){.article-media-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.article-media-thumb img{height:105px}.site-media-viewer{padding:8px}.site-media-viewer-nav{width:40px;height:52px;margin-top:-26px}.profile-material-media-manager-summary{align-items:stretch;flex-direction:column}.profile-media-manager{padding:7px}.profile-media-manager-dialog{max-height:calc(100vh - 14px)}.profile-media-manager-item{grid-template-columns:74px minmax(0,1fr)}.profile-media-preview-button{width:74px;height:58px}.profile-media-manager-actions{grid-column:1/-1}.profile-media-manager-actions span,.profile-media-replace-button span{display:none}}


/* v0.5.23 — inline profile errors, karma access and publication limits */
.profile-inline-error{padding:14px 16px;border:1px solid rgba(220,70,70,.45);border-radius:8px;background:rgba(220,70,70,.09);margin:12px 0}.profile-inline-error strong{display:block;margin-bottom:5px}.profile-inline-error button{margin-top:8px}.profile-community-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.profile-community-actions a{padding:6px 10px;border-radius:6px;background:var(--panel);text-decoration:none}.profile-karma-access{margin-top:18px;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--card)}.profile-access-list{display:grid;gap:7px;list-style:none;padding:0}.profile-access-list .ok{color:var(--text)}.profile-access-list .fail{color:var(--muted)}.publication-limit-summary{display:block;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:13px;line-height:1.5}


/* v0.5.23 final settings and limit summaries */
.community-publication-settings{margin-top:20px;padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--card)}
.community-publication-settings form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.community-publication-settings label{display:flex;flex-direction:column;gap:6px;min-width:280px;flex:1}
.community-publication-settings input{height:42px;padding:0 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg);color:var(--text)}
.community-inline-status{color:var(--success);font-size:13px}
.publication-limit-summary{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.publication-limit-summary .active,[data-publication-limit-row].active{font-weight:700;color:var(--accent)}

/* 0.5.24: profile mail, notifications, avatar editor and mobile hardening */
.notification-header { position:relative; }
.notification-header-dropdown { position:absolute; top:calc(100% + 10px); right:0; z-index:1200; width:min(360px,calc(100vw - 24px)); max-height:min(520px,70vh); overflow:auto; border:1px solid var(--line); border-radius:9px; background:var(--paper); box-shadow:0 14px 42px rgba(0,0,0,.24); }
.notification-header-dropdown[hidden] { display:none !important; }
.notification-header-title { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); background:var(--paper); padding:12px 14px; }
.notification-header-title a { color:var(--accent); font-size:13px; }
.notification-header-list { display:grid; }
.notification-header-list > a { display:grid; gap:4px; border-bottom:1px solid var(--line); color:var(--ink); padding:12px 14px; overflow-wrap:anywhere; }
.notification-header-list > a:hover { background:rgba(47,140,255,.08); }
.notification-header-list > a.unread { border-left:4px solid var(--accent); background:rgba(47,140,255,.09); }
.notification-header-list strong { font-size:14px; }
.notification-header-list span,.notification-header-list small { color:var(--muted); }
.notification-header-list span { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.4; }
.notification-header-empty { color:var(--muted); padding:20px 14px; text-align:center; }

.profile-mail-layout { display:grid; grid-template-columns:180px minmax(0,1fr); gap:0; min-height:430px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--paper); }
.profile-mail-folders { display:flex; flex-direction:column; gap:2px; margin:0; padding:10px; overflow:visible; border-right:1px solid var(--line); background:rgba(127,127,127,.04); }
.profile-mail-folders a { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:42px; border:1px solid transparent; border-radius:6px; color:var(--ink); padding:8px 10px; text-decoration:none; }
.profile-mail-folders a:hover { border-color:var(--line); background:var(--paper); }
.profile-mail-folders a.active { border-color:var(--accent); color:#fff; background:var(--accent); }
.profile-mail-folders a span { min-width:22px; border-radius:999px; background:rgba(127,127,127,.16); padding:2px 6px; text-align:center; font-size:12px; }
.profile-mail-folders a.active span { background:rgba(255,255,255,.22); }
.profile-mail-main { min-width:0; display:grid; grid-template-columns:minmax(230px,34%) minmax(0,1fr); }
.profile-mail-list { min-width:0; max-height:620px; overflow:auto; border-right:1px solid var(--line); background:var(--paper); }
.profile-mail-item { appearance:none; display:grid; width:100%; gap:4px; border:0; border-bottom:1px solid var(--line); color:var(--ink); background:transparent; padding:12px; text-align:left; cursor:pointer; }
.profile-mail-item:hover { background:rgba(47,140,255,.06); }
.profile-mail-item.unread { border-left:4px solid var(--accent); background:rgba(47,140,255,.09); }
.profile-mail-item strong,.profile-mail-item span,.profile-mail-item small { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-mail-item span,.profile-mail-item small { color:var(--muted); }
.profile-mail-detail { min-width:0; padding:18px; overflow-wrap:anywhere; }
.profile-mail-detail[aria-busy="true"] { opacity:.65; pointer-events:none; }
.mail-thread { display:grid; gap:10px; margin-top:16px; }
.mail-thread article { display:grid; gap:6px; border:1px solid var(--line); border-radius:7px; background:rgba(127,127,127,.035); padding:12px; }
.mail-thread article small { color:var(--muted); }
.mail-detail-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.mail-detail-actions button { min-height:38px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--paper); padding:7px 11px; cursor:pointer; }
.mail-detail-actions button:hover { border-color:var(--accent); color:var(--accent); }
.profile-mail-blocked { margin-top:16px; border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:10px 12px; }
.profile-mail-blocked summary { cursor:pointer; font-weight:700; }
.profile-mail-blocked-list { display:grid; gap:8px; margin-top:10px; }
.profile-mail-blocked-list article { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--line); padding-top:8px; }
.profile-mail-compose.is-hidden { display:none !important; }

.profile-notification-filters { display:flex; gap:6px; overflow-x:auto; margin-bottom:14px; padding-bottom:5px; scrollbar-width:thin; }
.profile-notification-filters a { flex:0 0 auto; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:var(--paper); padding:7px 11px; text-decoration:none; }
.profile-notification-filters a.active { border-color:var(--accent); color:#fff; background:var(--accent); }
.profile-notification-list { display:grid; gap:8px; }
.profile-notification-list article { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:12px; overflow-wrap:anywhere; }
.profile-notification-list article.unread { border-left:4px solid var(--accent); background:rgba(47,140,255,.08); }
.profile-notification-list p { margin:5px 0; white-space:pre-wrap; }
.profile-notification-list small { color:var(--muted); }
.profile-notification-actions { flex:0 0 auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.profile-notification-actions a,.profile-notification-actions button { min-height:36px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--paper); padding:6px 10px; cursor:pointer; }
.profile-invitations { margin-bottom:16px; border:1px solid var(--line); border-radius:8px; background:var(--paper); padding:14px; }
.profile-invitation-list { display:grid; gap:9px; }
.profile-invitation-list article { display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid var(--line); padding-top:10px; }
.profile-invitation-actions { display:flex; flex-wrap:wrap; gap:7px; }
.profile-notification-preferences { margin-top:16px; border:1px solid var(--line); border-radius:8px; background:var(--paper); padding:12px; }
.profile-notification-preferences summary { cursor:pointer; font-weight:700; }
.notification-preference-grid { display:grid; grid-template-columns:minmax(180px,1fr) 110px 110px; gap:8px 12px; align-items:center; margin-top:14px; }
.notification-preference-grid > * { min-width:0; overflow-wrap:anywhere; }
.notification-preference-grid label { display:flex; align-items:center; gap:6px; }

.avatar-crop-workspace { display:grid; gap:12px; margin-top:16px; }
.avatar-crop-workspace.is-hidden { display:none !important; }
.avatar-crop-stage { position:relative; width:min(360px,100%); aspect-ratio:1/1; margin:0 auto; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#111; touch-action:none; cursor:grab; }
.avatar-crop-stage:active { cursor:grabbing; }
.avatar-crop-stage img { position:absolute; left:50%; top:50%; display:block; max-width:none; max-height:none; user-select:none; -webkit-user-drag:none; transform-origin:center center; }
.avatar-crop-frame { position:absolute; inset:10%; z-index:2; border:2px solid #fff; border-radius:4px; box-shadow:0 0 0 9999px rgba(0,0,0,.48); pointer-events:none; }
.avatar-crop-workspace input[type="range"] { width:100%; }
.avatar-crop-hint { color:var(--muted); font-size:13px; text-align:center; }

.profile-feature-requirements { display:grid; gap:7px; margin:10px 0; padding:0; list-style:none; }
.profile-feature-requirements li { display:flex; align-items:flex-start; gap:7px; overflow-wrap:anywhere; }
.profile-feature-requirements .ok { color:#2e9b50; }
.profile-feature-requirements .failed { color:#d04545; }

/* Global wrapping and overflow safety */
.page,.site-footer,.topbar,.profile-layout,.profile-content,.admin-layout { min-width:0; }
img,video,canvas,svg { max-width:100%; }
input,select,textarea,button { max-width:100%; }
.content-card,.community-card,.profile-panel,.profile-card,.mail-body,.flash,.field-error { overflow-wrap:anywhere; word-break:break-word; }
.table-scroll,.admin-table-wrap { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }

@media (max-width:900px) {
    .profile-mail-layout { grid-template-columns:1fr; }
    .profile-mail-folders { flex-direction:row; overflow-x:auto; border-right:0; border-bottom:1px solid var(--line); }
    .profile-mail-folders a { flex:0 0 auto; }
    .profile-mail-main { grid-template-columns:minmax(220px,38%) minmax(0,1fr); }
}
@media (max-width:680px) {
    .notification-header-dropdown { position:fixed; top:64px; right:10px; left:10px; width:auto; max-height:calc(100vh - 84px); }
    .profile-mail-main { grid-template-columns:1fr; }
    .profile-mail-list { max-height:330px; border-right:0; border-bottom:1px solid var(--line); }
    .profile-mail-detail { min-height:220px; padding:14px; }
    .profile-notification-list article,.profile-invitation-list article { flex-direction:column; align-items:stretch; }
    .profile-notification-actions,.profile-invitation-actions { justify-content:flex-start; }
    .notification-preference-grid { grid-template-columns:minmax(0,1fr) 82px 82px; font-size:13px; }
}
@media (max-width:420px) {
    .profile-mail-folders { padding:7px; }
    .profile-mail-folders a { min-height:38px; padding:6px 8px; font-size:13px; }
    .profile-mail-detail { padding:12px; }
    .mail-detail-actions button,.profile-notification-actions a,.profile-notification-actions button { flex:1 1 auto; }
    .notification-preference-grid { grid-template-columns:minmax(0,1fr) 70px 70px; gap:7px; }
    .profile-panel-head { align-items:flex-start; }
}

/* 0.5.24 visual pass 2: Habr-like material page */
.material-view-page {
    display: grid;
    gap: 14px;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.material-view-page .article-top-links {
    margin: 0;
    padding: 0 2px;
}

.material-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 0;
}

.material-card-header {
    display: grid;
    gap: 11px;
    padding: 22px 24px 18px;
}

.material-card-header h1 {
    margin: 0;
    font-size: clamp(25px, 3vw, 40px);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.material-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    color: var(--muted);
    font-size: 13px;
}

.material-type-label {
    color: var(--accent);
    font-weight: 800;
}

.material-meta-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.material-meta-back:hover,
.material-meta-back:focus-visible {
    color: var(--ink);
}

.material-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.material-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-width: 0;
    color: var(--muted);
    font-size: 14px;
}

.material-category-row a,
.material-category-row strong {
    color: var(--accent);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.material-cover {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.material-card .article-poster-open {
    width: 100%;
}

.material-card .article-poster {
    display: block;
    width: 100%;
    height: auto;
    max-height: 760px;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    background: var(--paper);
}

.material-description {
    padding: 22px 24px 10px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.material-description .summary {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.55;
}

.material-description .article-body {
    margin: 0;
    white-space: normal;
}

.material-card .article-media-gallery {
    margin: 8px 24px 0;
}

.material-card-divider {
    margin: 20px 24px 0;
    border-top: 1px dashed var(--line);
}

.material-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 12px 18px 14px;
}

.material-action {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    padding: 0 9px;
    text-decoration: none;
    cursor: pointer;
}

.material-action:hover,
.material-action:focus-visible,
.material-action.active {
    background: var(--paper);
    color: var(--accent);
}

.material-action.is-disabled {
    cursor: default;
    opacity: .65;
}

.material-action i {
    font-size: 19px;
}

.material-author-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 18px 20px;
}

.material-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.material-author-summary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 18px;
}

.material-author-avatar {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--paper);
    color: var(--muted);
    font-size: 22px;
}

.material-author-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-author-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.material-author-rating {
    display: grid;
    gap: 2px;
    min-width: 58px;
}

.material-author-rating strong {
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
}

.material-author-rating small {
    color: var(--muted);
    font-size: 11px;
}

.material-author-vote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.material-author-vote i {
    font-size: 19px;
}

.material-author-vote.positive strong {
    color: #78a900;
}

.material-author-vote.negative strong {
    color: #c85b5b;
}

.material-subscribe-button {
    min-height: 38px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    background: transparent;
    color: var(--accent);
    padding: 8px 18px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.material-subscribe-button:hover,
.material-subscribe-button:focus-visible,
.material-subscribe-button.active {
    background: var(--accent);
    color: #fff;
}

.material-author-name {
    padding-left: 70px;
    font-size: 15px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.material-author-name a {
    color: var(--ink);
}

.material-author-name a:hover {
    color: var(--accent);
}

.material-view-page + .comments-v2,
.material-view-page ~ .comments-v2 {
    width: min(100%, 1180px);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 18px 20px;
}

@media (max-width: 700px) {
    .material-card-header {
        padding: 17px 15px 14px;
    }

    .material-card-header h1 {
        font-size: 25px;
    }

    .material-description {
        padding: 17px 15px 8px;
    }

    .material-description .summary {
        font-size: 16px;
    }

    .material-card .article-media-gallery {
        margin-right: 15px;
        margin-left: 15px;
    }

    .material-card-divider {
        margin-right: 15px;
        margin-left: 15px;
    }

    .material-action-bar {
        gap: 3px;
        padding: 10px 8px 12px;
    }

    .material-action {
        min-width: 42px;
        padding: 0 8px;
    }

    .material-author-card {
        padding: 15px;
    }

    .material-author-row {
        align-items: flex-start;
    }

    .material-author-summary {
        gap: 12px;
    }

    .material-author-metrics {
        gap: 9px;
    }

    .material-author-name {
        padding-left: 64px;
    }
}

@media (max-width: 480px) {
    .material-card-meta time {
        width: 100%;
    }

    .material-author-row {
        flex-wrap: wrap;
    }

    .material-subscribe-button {
        width: 100%;
        margin-left: 64px;
    }

    .material-view-page + .comments-v2,
    .material-view-page ~ .comments-v2 {
        padding: 14px;
    }
}

/* 0.5.24 hotfix 3: two-column material page and "Reading now" sidebar */
.material-view-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.material-view-layout.has-reading-now {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.material-main-column,
.material-side-column {
    min-width: 0;
}

.material-view-layout .material-view-page {
    width: 100%;
    margin: 0;
    gap: 6px;
}

.material-view-layout .material-card,
.material-view-layout .material-author-card,
.material-view-layout .material-comments-block {
    width: 100%;
    max-width: none;
}

.material-view-layout .article-top-links {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0 4px;
}

.material-view-layout .article-top-links .back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.material-card-divider {
    display: none !important;
}

.material-action-bar {
    padding-top: 10px;
}

.material-comment-add-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: auto;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: transparent;
    color: var(--accent);
    padding: 7px 14px;
    font-weight: 800;
    cursor: pointer;
}

.material-comment-add-button:hover,
.material-comment-add-button:focus-visible {
    background: var(--accent);
    color: #fff;
}

.comments-compose-proxy {
    display: none !important;
}

.material-view-layout .material-comments-block {
    margin: 6px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 18px 20px;
}

.material-view-layout .material-comments-block .comments-head {
    margin-bottom: 12px;
}

.material-view-layout .material-comments-block .comments-head h2 {
    margin: 0;
}

.material-side-column {
    position: sticky;
    top: 8px;
}

.reading-now-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 0 18px;
}

.reading-now-head {
    border-bottom: 1px solid var(--line);
    padding: 16px 0 13px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.reading-now-list {
    display: grid;
}

.reading-now-item {
    min-width: 0;
    border-bottom: 1px solid var(--line);
    padding: 17px 0;
}

.reading-now-item:last-child {
    border-bottom: 0;
}

.reading-now-title {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.reading-now-title:hover,
.reading-now-title:focus-visible {
    color: var(--accent);
}

.reading-now-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.reading-now-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reading-now-meta i {
    color: var(--accent);
    font-size: 16px;
}

.reading-now-score {
    font-weight: 800;
}

.reading-now-score.positive {
    color: #78a900;
}

.reading-now-score.negative {
    color: #c85b5b;
}

@media (max-width: 960px) {
    .material-view-layout.has-reading-now {
        grid-template-columns: minmax(0, 1fr) 270px;
    }
}

@media (max-width: 820px) {
    .material-view-layout.has-reading-now {
        grid-template-columns: minmax(0, 1fr);
    }

    .material-side-column {
        position: static;
    }

    .reading-now-card {
        margin-top: 2px;
    }
}

@media (max-width: 520px) {
    .material-view-layout .material-comments-block {
        margin: 6px 0;
        padding: 14px;
    }

    .material-comment-add-button {
        min-width: 112px;
    }
}


/* 0.5.24 hotfix 5: comments controls and full-width post/article catalogs */
.section-page-layout.no-section-navigation {
    grid-template-columns: minmax(0, 1fr);
}

.material-comments-count-link {
    text-decoration: none;
}

.material-view-layout .material-comments-block .comments-head {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.material-view-layout .material-comments-block .comments-head .material-comment-add-button {
    flex: 0 0 auto;
    margin-left: auto;
}

@media (max-width: 520px) {
    .material-view-layout .material-comments-block .comments-head {
        flex-wrap: nowrap;
    }

    .material-view-layout .material-comments-block .comments-head .material-comment-add-button {
        min-width: 0;
        padding-right: 12px;
        padding-left: 12px;
    }
}

/* 0.5.24 hotfix 6: polished comment composer */
.material-view-layout .material-comments-block .comment-compose {
    display: grid;
    gap: 12px;
    max-height: 560px;
    margin: 6px 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.material-view-layout .material-comments-block .comment-compose.is-collapsed {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-width: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.material-view-layout .material-comments-block .comment-compose-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.material-view-layout .material-comments-block .comment-compose-label::before {
    color: var(--accent);
    content: "\f075";
    font-family: FontAwesome;
    font-size: 15px;
    font-weight: normal;
}

.material-view-layout .material-comments-block .comment-compose textarea {
    display: block;
    width: 100%;
    min-height: 150px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: var(--white);
    color: var(--ink);
    padding: 13px 14px;
    font: inherit;
    font-size: 15px;
    line-height: 1.55;
    caret-color: var(--accent);
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.material-view-layout .material-comments-block .comment-compose textarea::placeholder {
    color: var(--muted);
    opacity: .78;
}

.material-view-layout .material-comments-block .comment-compose textarea:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.material-view-layout .material-comments-block .comment-compose textarea:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(47, 140, 255, .13), inset 0 1px 2px rgba(0, 0, 0, .06);
}

.material-view-layout .material-comments-block .comment-compose-footer {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.material-view-layout .material-comments-block .comment-compose-footer > span {
    display: inline-flex;
    width: auto;
    min-height: 30px;
    align-items: center;
    margin-right: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--muted);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.material-view-layout .material-comments-block .comment-compose-footer > span::before {
    margin-right: 6px;
    color: var(--accent);
    content: "\f040";
    font-family: FontAwesome;
    font-weight: normal;
}

.material-view-layout .material-comments-block .comment-compose-footer > span.is-limit {
    border-color: #d85d5d;
    color: #d85d5d;
}

.material-view-layout .material-comments-block .comment-compose-footer button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 7px;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.material-view-layout .material-comments-block .comment-compose-footer button:hover {
    transform: translateY(-1px);
}

.material-view-layout .material-comments-block .comment-compose-footer button:active {
    transform: translateY(0);
}

.material-view-layout .material-comments-block .comment-compose-footer [data-comment-compose-cancel] {
    border: 1px solid var(--line) !important;
    background: var(--white) !important;
    color: var(--muted) !important;
}

.material-view-layout .material-comments-block .comment-compose-footer [data-comment-compose-cancel]::before {
    content: "\f00d";
    font-family: FontAwesome;
    font-weight: normal;
}

.material-view-layout .material-comments-block .comment-compose-footer [data-comment-compose-cancel]:hover,
.material-view-layout .material-comments-block .comment-compose-footer [data-comment-compose-cancel]:focus-visible {
    border-color: var(--accent) !important;
    color: var(--ink) !important;
    outline: 0;
}

.material-view-layout .material-comments-block .comment-compose-footer button[type="submit"] {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 14px rgba(47, 140, 255, .18);
}

.material-view-layout .material-comments-block .comment-compose-footer button[type="submit"]::before {
    content: "\f1d8";
    font-family: FontAwesome;
    font-weight: normal;
}

.material-view-layout .material-comments-block .comment-compose-footer button[type="submit"]:hover,
.material-view-layout .material-comments-block .comment-compose-footer button[type="submit"]:focus-visible {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    outline: 0;
    box-shadow: 0 7px 18px rgba(47, 140, 255, .24);
}

.material-view-layout .material-comments-block .comments-toolbar {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 3px;
}

.material-view-layout .material-comments-block .comments-toolbar button {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 700;
}

.material-view-layout .material-comments-block .comments-toolbar button:hover {
    color: var(--ink);
    background: var(--white);
}

.material-view-layout .material-comments-block .comments-toolbar button.active {
    border-color: var(--line);
    background: var(--white);
    color: var(--accent-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

@media (max-width: 640px) {
    .material-view-layout .material-comments-block .comment-compose {
        gap: 10px;
        padding: 12px;
    }

    .material-view-layout .material-comments-block .comment-compose textarea {
        min-height: 130px;
        padding: 12px;
        font-size: 14px;
    }

    .material-view-layout .material-comments-block .comment-compose-footer {
        flex-wrap: wrap;
    }

    .material-view-layout .material-comments-block .comment-compose-footer > span {
        width: auto;
        flex: 1 0 100%;
        justify-self: flex-start;
        margin-right: 0;
    }

    .material-view-layout .material-comments-block .comment-compose-footer button {
        flex: 1 1 calc(50% - 4px);
    }

    .material-view-layout .material-comments-block .comments-toolbar {
        display: flex;
        width: 100%;
    }

    .material-view-layout .material-comments-block .comments-toolbar button {
        flex: 1 1 0;
        padding-right: 8px;
        padding-left: 8px;
    }
}


/* v0.5.24 hotfix 7 — direct profile link */
.user-profile-direct {
    text-decoration: none;
    white-space: nowrap;
}
.user-profile-direct .avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}
@media (max-width: 620px) {
    .user-profile-direct-name { display: none; }
    .user-profile-direct { width: 38px; padding: 0; }
}


.profile-logout-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.profile-logout-form button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid transparent; border-radius: 6px; color: #ff6262; background: transparent; font-weight: 700; cursor: pointer; }
.profile-logout-form button:hover { border-color: rgba(255,98,98,.55); background: rgba(255,98,98,.08); }

/* 0.5.24 Hotfix 8 — separate community material page */
.community-add-material-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
}
.community-material-page {
    min-width: 0;
}
.community-material-page-head {
    display: grid;
    gap: 10px;
    margin-bottom: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 16px;
}
.community-material-page-head h1 {
    margin: 0;
}
.community-material-page-head p {
    margin: 5px 0 0;
    color: var(--muted);
}
.community-material-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    max-width: 100%;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}
.community-material-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 6px;
    align-items: stretch;
    min-width: 0;
}
.community-material-page-main,
.community-material-page-aside {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}
.community-material-page-card {
    padding: 16px;
}
.community-material-page-aside {
    min-height: 620px;
}
.community-material-page .community-material-form textarea,
.community-material-page .community-material-form input,
.community-material-page .community-material-form select {
    border-radius: 6px;
}
@media (max-width: 900px) {
    .community-material-page-grid {
        grid-template-columns: 1fr;
    }
    .community-material-page-aside {
        min-height: 180px;
    }
}
@media (max-width: 680px) {
    .community-material-page-head,
    .community-material-page-card {
        padding: 12px;
    }
    .community-material-page .community-form-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .community-material-page .community-form-actions > span {
        margin-right: 0;
    }
    .community-material-page .community-form-actions button {
        width: 100%;
    }
}

/* Hotfix 0.5.24.10: community material editor */
.community-material-page .community-material-form.community-material-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 6px;
    align-items: start;
}
.community-material-page .community-material-page-main,
.community-material-page .community-material-page-aside {
    align-self: stretch;
}
.community-material-page .community-material-main-fields {
    display: grid;
    gap: 14px;
}
.community-material-page .community-material-main-fields > * {
    min-width: 0;
}
.community-material-page .community-material-field {
    display: grid;
    gap: 7px;
}
.community-material-page .community-material-field > span:first-child,
.community-material-page .community-material-field > label:first-child {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}
.community-material-page .community-material-input-wrap {
    position: relative;
    display: block;
}
.community-material-page .community-material-input-wrap > small {
    position: absolute;
    right: 11px;
    bottom: 9px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    pointer-events: none;
}
.community-material-page .community-material-form textarea,
.community-material-page .community-material-form input[type="text"],
.community-material-page .community-material-form input[type="email"],
.community-material-page .community-material-form input[type="number"],
.community-material-page .community-material-form select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    font: inherit;
    line-height: 1.5;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.community-material-page .community-material-form textarea {
    padding: 11px 13px;
    resize: vertical;
}
.community-material-page .community-material-form textarea.is-limit-invalid,
.community-material-page .community-material-form input.is-limit-invalid {
    border-color: #d84848;
    box-shadow: 0 0 0 2px rgba(216,72,72,.14);
}
.community-material-page [data-community-title-count].is-limit-invalid,
.community-material-page [data-community-summary-count].is-limit-invalid {
    color: #e55353;
}
.community-material-page .community-material-form textarea[name="title"] {
    min-height: 72px;
    padding-right: 82px;
}
.community-material-page .community-material-form textarea[name="summary"] {
    min-height: 105px;
}
.community-material-page .community-material-form textarea[name="body"] {
    min-height: 380px;
}
.community-material-page .community-material-form select {
    height: 44px;
    padding: 0 42px 0 13px;
    appearance: none;
    -webkit-appearance: none;
}
.community-material-page .community-material-select-wrap {
    position: relative;
    display: block;
}
.community-material-page .community-material-select-wrap > i {
    position: absolute;
    top: 50%;
    right: 14px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}
.community-material-page .community-material-form textarea:hover,
.community-material-page .community-material-form select:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}
.community-material-page .community-material-form textarea:focus,
.community-material-page .community-material-form select:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.community-material-page .community-material-types {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.community-material-page .community-material-types button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.community-material-page .community-material-types button:hover:not(:disabled),
.community-material-page .community-material-types button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.community-material-page .community-material-types button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.community-material-page .community-rating-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: max-content;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    cursor: pointer;
}
.community-material-page .community-rating-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.community-material-page .community-rating-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    color: transparent;
}
.community-material-page .community-rating-option > input:checked + .community-rating-check {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.community-material-page .community-rating-option > input:focus-visible + .community-rating-check {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.community-material-page .community-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}
.community-material-page .community-form-actions > span {
    margin-right: auto;
    color: var(--muted);
    font-size: 13px;
}
.community-material-page .community-form-actions button {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.community-material-page .community-form-actions button.secondary {
    border-color: var(--line);
    background: var(--panel);
    color: var(--text);
}
.community-material-page .community-form-actions button:hover:not(:disabled) {
    filter: brightness(1.06);
}
.community-material-page .community-form-actions button:disabled {
    opacity: .55;
    cursor: wait;
}
.community-material-page .community-material-media-side {
    min-height: 0;
    padding: 0;
}
.community-material-page .community-material-media-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
}
.community-material-page .community-material-media-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
}
.community-material-page .community-material-media-head h2 {
    margin: 0;
    font-size: 18px;
}
.community-material-page .community-material-media-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.community-material-page .community-material-media-head > i {
    color: var(--accent);
    font-size: 24px;
}
.community-material-page .community-media-upload-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.community-material-page .community-media-upload-card:hover,
.community-material-page .community-media-upload-card:focus-within {
    border-color: var(--accent);
    background: var(--panel);
    transform: translateY(-1px);
}
.community-material-page .community-media-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 14%, var(--white));
    color: var(--accent);
    font-size: 20px;
}
.community-material-page .community-media-upload-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.community-material-page .community-media-upload-copy strong {
    color: var(--text);
    font-size: 14px;
}
.community-material-page .community-media-upload-copy small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.community-material-page .community-media-upload-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.community-material-page .community-media-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}
.community-material-page .community-media-rules {
    display: block;
    margin: -3px 2px 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.community-material-page .community-media-preview {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}
.community-material-page .community-media-preview:empty {
    display: none;
}
.community-material-page .community-media-preview-group {
    display: grid;
    gap: 7px;
    padding-top: 3px;
}
.community-material-page .community-media-preview-group h4 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
}
.community-material-page .community-media-preview-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.community-material-page .community-media-preview-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.community-material-page .community-media-preview-item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 5px;
    object-fit: cover;
}
.community-material-page .community-media-preview-item span {
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .community-material-page .community-material-form.community-material-page-grid {
        grid-template-columns: 1fr;
    }
    .community-material-page .community-material-media-side {
        min-height: 0;
    }
}
@media (max-width: 680px) {
    .community-material-page .community-material-main-fields,
    .community-material-page .community-material-media-panel {
        padding: 12px;
    }
    .community-material-page .community-material-form textarea[name="body"] {
        min-height: 290px;
    }
    .community-material-page .community-form-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .community-material-page .community-form-actions > span {
        margin-right: 0;
    }
    .community-material-page .community-form-actions button {
        width: 100%;
    }
    .community-material-page .community-media-upload-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }
    .community-material-page .community-media-upload-icon {
        width: 40px;
        height: 40px;
    }
    .community-material-page .community-media-upload-action {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

/* 0.5.24 hotfix 12: simple community material image upload */
.community-material-page .community-material-form.community-material-page-grid {
    display: block;
}
.community-material-page .community-material-page-editor {
    width: 100%;
    max-width: none;
}
.community-material-page .community-material-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 12px;
    align-items: start;
}
.community-material-page .community-material-fields-column {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.community-material-page .community-material-inline-media {
    display: grid;
    gap: 12px;
    min-width: 0;
}
.community-material-page .community-inline-upload {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
}
.community-material-page .community-inline-upload-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.community-material-page .community-inline-upload-head > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.community-material-page .community-inline-upload-head strong {
    font-size: 15px;
}
.community-material-page .community-inline-upload-head small,
.community-material-page .community-inline-upload-rules {
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.community-material-page .community-inline-upload-head > i {
    color: var(--accent);
    font-size: 18px;
}
.community-material-page .community-native-file-input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 7px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    font: inherit;
}
.community-material-page .community-native-file-input::file-selector-button {
    margin-right: 8px;
    padding: 7px 10px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: var(--accent);
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.community-material-page .community-native-file-input:hover::file-selector-button {
    color: #fff;
    background: var(--accent);
}
.community-material-page .community-inline-preview {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 190px;
    overflow: hidden;
    border: 1px dashed var(--line);
    border-radius: 9px;
    background: var(--paper);
}
.community-material-page .community-inline-poster-preview {
    aspect-ratio: 3 / 4;
    min-height: 0;
}
.community-material-page .community-inline-images-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 6px;
    min-height: 150px;
    padding: 6px;
}
.community-material-page .community-inline-preview-empty {
    display: grid;
    place-items: center;
    gap: 7px;
    padding: 14px;
    color: var(--muted);
    text-align: center;
    line-height: 1.35;
}
.community-material-page .community-inline-preview-empty i {
    font-size: 20px;
    color: var(--accent);
}
.community-material-page .community-inline-preview figure {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 7px;
    background: #090c11;
}
.community-material-page .community-inline-poster-preview figure {
    position: absolute;
    inset: 0;
    border-radius: 0;
}
.community-material-page .community-inline-images-preview figure {
    aspect-ratio: 16 / 10;
    height: auto;
}
.community-material-page .community-inline-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.community-material-page .community-inline-preview figcaption {
    position: absolute;
    right: 4px;
    bottom: 4px;
    left: 4px;
    overflow: hidden;
    padding: 4px 6px;
    border-radius: 5px;
    color: #fff;
    background: rgba(0, 0, 0, .68);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.community-material-page .community-material-main-fields > .community-rating-option,
.community-material-page .community-material-main-fields > .community-form-actions {
    margin-top: 14px;
}
@media (max-width: 900px) {
    .community-material-page .community-material-editor-grid {
        grid-template-columns: 1fr;
    }
    .community-material-page .community-material-inline-media {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .community-material-page .community-inline-poster-preview {
        aspect-ratio: 16 / 10;
    }
}
@media (max-width: 560px) {
    .community-material-page .community-material-page-head,
    .community-material-page .community-material-page-card {
        padding: 12px;
    }
    .community-material-page .community-material-inline-media {
        grid-template-columns: 1fr;
    }
    .community-material-page .community-inline-upload {
        padding: 10px;
    }
    .community-material-page .community-native-file-input {
        font-size: 13px;
    }
    .community-material-page .community-inline-poster-preview {
        aspect-ratio: 16 / 10;
        min-height: 180px;
    }
    .community-material-page .community-inline-images-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 0.5.24 hotfix 13: restore outer second block and keep media beside fields */
.community-material-page .community-material-form.community-material-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 6px;
    align-items: stretch;
}
.community-material-page .community-material-page-editor {
    width: auto;
    max-width: none;
}
.community-material-page .community-material-ad-placeholder {
    display: block;
    min-height: 620px;
}
.community-material-page .community-material-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 218px;
    gap: 12px;
    align-items: start;
}
.community-material-page .community-material-fields-column {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.community-material-page .community-material-inline-media {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
    min-width: 0;
}
.community-material-page .community-inline-upload {
    padding: 10px;
}
.community-material-page .community-inline-poster-preview {
    aspect-ratio: 3 / 4;
    min-height: 0;
}
.community-material-page .community-inline-images-preview {
    min-height: 145px;
}
.community-material-page .community-native-file-input {
    padding: 6px;
    font-size: 12px;
}
.community-material-page .community-native-file-input::file-selector-button {
    padding: 6px 8px;
    font-size: 12px;
}
@media (max-width: 1100px) {
    .community-material-page .community-material-form.community-material-page-grid {
        grid-template-columns: minmax(0, 1fr) 260px;
    }
    .community-material-page .community-material-editor-grid {
        grid-template-columns: minmax(0, 1fr) 205px;
    }
}
@media (max-width: 900px) {
    .community-material-page .community-material-form.community-material-page-grid {
        grid-template-columns: 1fr;
    }
    .community-material-page .community-material-ad-placeholder:empty {
        display: none;
    }
    .community-material-page .community-material-editor-grid {
        grid-template-columns: minmax(0, 1fr) 220px;
    }
}
@media (max-width: 700px) {
    .community-material-page .community-material-editor-grid {
        grid-template-columns: 1fr;
    }
    .community-material-page .community-material-inline-media {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .community-material-page .community-inline-poster-preview {
        aspect-ratio: 16 / 10;
        min-height: 170px;
    }
    .community-material-page .community-inline-images-preview {
        min-height: 170px;
    }
}
@media (max-width: 480px) {
    .community-material-page .community-material-inline-media {
        grid-template-columns: 1fr;
    }
    .community-material-page .community-inline-poster-preview,
    .community-material-page .community-inline-images-preview {
        min-height: 180px;
    }
    .community-material-page .community-native-file-input {
        width: 100%;
        font-size: 13px;
    }
}

/* v0.5.24 hotfix 16 — title-first cards, unlimited rating and refreshed profile */
.catalog-card-kicker,
.public-profile-material-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
}

.catalog-card-kicker .category-inline-link,
.catalog-card-kicker .category-inline-label,
.public-profile-material-meta .category-inline-label {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.catalog-card-kicker .category-inline-link:hover {
    color: var(--accent);
}

.poster-tile-body .catalog-card-kicker {
    margin-top: 7px;
}

.list-item-body > h2 {
    margin-bottom: 8px;
}

.material-author-vote,
.public-profile-vote {
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

button.material-author-vote {
    min-height: 36px;
    padding: 6px 9px;
    border-radius: 7px;
}

button.material-author-vote:hover,
button.material-author-vote:focus-visible,
button.material-author-vote.active {
    border-color: var(--line);
    background: var(--paper);
    transform: translateY(-1px);
}

button.material-author-vote.positive.active {
    border-color: rgba(120,169,0,.55);
    background: rgba(120,169,0,.12);
}

button.material-author-vote.negative.active {
    border-color: rgba(200,91,91,.55);
    background: rgba(200,91,91,.12);
}

.public-profile-card {
    display: block;
    overflow: hidden;
    padding: 0;
    border-radius: 14px;
    background:
        radial-gradient(circle at 13% 10%, rgba(38,137,255,.20), transparent 35%),
        linear-gradient(135deg, var(--panel) 0%, var(--panel-2, var(--panel)) 100%);
}

.public-profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0,1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 220px;
    padding: 28px;
}

.public-profile-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), #65a9ff, transparent 82%);
}

.public-profile-avatar-wrap {
    position: relative;
    width: 150px;
    height: 150px;
}

.public-profile-avatar {
    width: 150px;
    height: 150px;
    border: 4px solid rgba(255,255,255,.11);
    border-radius: 24px;
    box-shadow: 0 15px 38px rgba(0,0,0,.28);
}

.public-profile-online-dot {
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 19px;
    height: 19px;
    border: 4px solid var(--panel);
    border-radius: 50%;
    background: #39c76f;
}

.public-profile-title-row h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
}

.profile-status.verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #8fc5ff;
    background: rgba(38,137,255,.12);
}

.public-profile-group {
    font-size: 14px;
}

.public-profile-bio {
    max-width: 780px;
    margin-top: 14px;
    color: var(--text);
}

.public-profile-bio-empty {
    color: var(--muted);
    font-style: italic;
}

.public-profile-metrics {
    display: grid;
    grid-template-columns: repeat(5,minmax(92px,1fr));
    max-width: 780px;
}

.public-profile-metrics span {
    min-width: 0;
    padding: 11px 12px;
    background: rgba(255,255,255,.025);
}

.public-profile-metrics strong {
    color: var(--text);
    font-size: 20px;
}

.public-profile-actions {
    display: grid;
    align-self: start;
    justify-items: stretch;
    gap: 10px;
    min-width: 150px;
}

.public-profile-edit,
.public-profile-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255,255,255,.025);
    text-decoration: none;
}

.public-profile-edit:hover,
.public-profile-message:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.public-profile-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 11px;
    border-color: var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.public-profile-vote.positive:hover,
.public-profile-vote.positive.active {
    color: #8fc63f;
    border-color: rgba(120,169,0,.6);
    background: rgba(120,169,0,.12);
}

.public-profile-vote.negative:hover,
.public-profile-vote.negative.active {
    color: #df7777;
    border-color: rgba(200,91,91,.6);
    background: rgba(200,91,91,.12);
}

.public-profile-layout {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 16px;
}

.public-profile-info,
.public-profile-communities,
.public-profile-content {
    border-radius: 12px;
}

.public-profile-tabs {
    gap: 8px;
}

.public-profile-tabs a {
    border: 1px solid transparent;
}

.public-profile-tabs a.active {
    border-color: rgba(38,137,255,.35);
    background: rgba(38,137,255,.10);
    color: var(--accent);
}

.public-profile-materials > article {
    border-radius: 10px;
}

.public-profile-materials h2 {
    margin-top: 0;
    margin-bottom: 7px;
}

@media (max-width: 980px) {
    .public-profile-hero {
        grid-template-columns: 126px minmax(0,1fr);
    }
    .public-profile-avatar-wrap,
    .public-profile-avatar {
        width: 126px;
        height: 126px;
    }
    .public-profile-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2,minmax(0,1fr));
        width: 100%;
    }
    .public-profile-metrics {
        grid-template-columns: repeat(3,minmax(92px,1fr));
    }
}

@media (max-width: 700px) {
    .public-profile-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 22px 16px;
        text-align: center;
    }
    .public-profile-avatar-wrap,
    .public-profile-avatar {
        width: 116px;
        height: 116px;
    }
    .public-profile-title-row {
        justify-content: center;
    }
    .public-profile-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr));
        width: 100%;
    }
    .public-profile-actions {
        grid-template-columns: 1fr;
        min-width: 0;
    }
    .public-profile-votes {
        width: 100%;
    }
    .public-profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .public-profile-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }
    .public-profile-metrics span {
        padding: 9px;
    }
    .catalog-card-kicker {
        align-items: flex-start;
    }
}

/* Hotfix 16 profile finishing touches. */
.public-profile-main { align-self: center; }
.public-profile-title-row { margin-bottom: 2px; }
.public-profile-actions:empty { display: none; }
.public-profile-vote:disabled,
.material-author-vote:disabled { opacity: .6; cursor: wait; transform: none; }
.search-result-body > h2 { margin-top: 0; margin-bottom: 8px; }
.search-result-section { display: none; }
@media (max-width: 700px) {
    .public-profile-main { width: 100%; }
    .public-profile-bio { margin-left: auto; margin-right: auto; }
}

/* 0.5.24 hotfix17: section catalogs use the community feed card layout */
.catalog-community-feed .community-feed-item {
    width: 100%;
}
.catalog-community-feed .community-feed-poster {
    min-height: 178px;
}
.catalog-community-feed .community-feed-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}
.catalog-community-feed .community-feed-body .content-card-footer {
    margin-top: auto;
}
@media (max-width: 760px) {
    .catalog-community-feed .community-feed-poster {
        min-height: 150px;
    }
}
@media (max-width: 520px) {
    .catalog-community-feed .community-feed-poster {
        min-height: 190px;
        max-height: 240px;
    }
}

/* v0.5.24 hotfix 18 — stable header, bordered profile and aligned mobile navigation */
.topbar {
    align-items: center;
}
.topbar > .brand,
.topbar > .mobile-menu-toggle,
.topbar > .site-navigation,
.topbar > .top-actions {
    align-self: center;
}
.topbar .brand {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.topbar .brand-title,
.topbar .brand-domain {
    line-height: 1;
}
.topbar .site-navigation,
.topbar .top-section-nav,
.topbar .top-actions {
    align-items: center;
}
.topbar .top-section-nav a,
.topbar .search-form,
.topbar .language-switch-direct,
.topbar .icon-button,
.topbar .theme-switch button,
.topbar .user-profile-direct,
.topbar .mobile-menu-toggle {
    min-height: 38px;
    height: 38px;
    box-sizing: border-box;
}
.topbar .search-form input,
.topbar .search-form button {
    min-height: 36px;
    height: 36px;
}
.topbar .theme-switch {
    display: flex;
    align-items: center;
    margin: 0;
}
.topbar .top-actions > * {
    margin-top: 0;
    margin-bottom: 0;
}

.public-profile-card,
.public-profile-info,
.public-profile-communities,
.public-profile-content {
    border: 1px solid var(--line) !important;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}
.public-profile-card {
    overflow: hidden;
}
.public-profile-hero {
    border-radius: inherit;
}
.public-profile-metrics span,
.public-profile-tabs a,
.public-profile-materials > article,
.public-profile-comments article,
.public-community-list > a,
.public-profile-edit,
.public-profile-message,
.public-profile-vote {
    border: 1px solid var(--line);
    background: var(--paper);
}
.public-profile-info h2,
.public-profile-communities h2,
.public-profile-tabs {
    border-bottom-color: var(--line);
}
.public-profile-sidebar {
    gap: 12px;
}
.public-profile-layout {
    gap: 12px;
}
.public-profile-materials > article,
.public-profile-comments article {
    box-shadow: 0 3px 12px rgba(0, 0, 0, .07);
}

@media (max-width: 760px) {
    .section-navigation {
        position: static;
        padding: 8px;
    }
    .section-navigation h2,
    .section-navigation h3,
    .section-navigation-line {
        display: none;
    }
    .section-navigation nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        margin-top: 0;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .section-navigation nav a,
    .section-navigation nav a:first-child {
        width: auto;
        min-width: max-content;
        flex: 0 0 auto;
    }
}

@media (max-width: 700px) {
    .catalog-pagination-bar {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .catalog-total {
        width: auto !important;
        align-self: center;
    }
    .catalog-pagination-bar .content-pagination {
        width: 100%;
        min-width: 0;
        justify-content: flex-end !important;
        margin: 0 !important;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: center;
    }
    .topbar .brand,
    .topbar .mobile-menu-toggle,
    .topbar .top-actions {
        align-self: center;
    }
    .topbar .top-actions {
        min-height: 38px;
    }
}

/* 0.5.24 hotfix 19: profile navigation, material shortcut and profile cleanup */
.profile-panel-title-left {
    margin: 0 0 18px;
    text-align: left;
}
.profile-panel-title-left h2 {
    width: fit-content;
    margin: 0 0 6px;
    padding: 0 0 9px;
    border-bottom: 2px solid var(--accent);
    text-align: left;
}
.profile-panel-title-left p,
.profile-panel-head-left p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.profile-panel-head-left {
    justify-content: flex-start;
    align-items: flex-start;
}
.profile-panel-head-left h2 {
    width: fit-content;
    margin: 0 0 6px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--accent);
}

.profile-general-panel .profile-general-form {
    width: 100%;
    max-width: none;
}
.profile-general-layout {
    display: grid;
    grid-template-columns: minmax(260px, .82fr) minmax(360px, 1.35fr);
    gap: 14px;
    align-items: start;
}
.profile-general-column {
    display: grid;
    gap: 13px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 16px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}
.profile-general-column label,
.profile-general-bio {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}
.profile-general-column input,
.profile-general-column select,
.profile-general-column textarea {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--white);
    padding: 9px 11px;
    font: inherit;
}
.profile-general-column textarea {
    min-height: 125px;
    resize: vertical;
}
.profile-extended-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}
.profile-general-actions {
    justify-content: flex-end;
    margin-top: 14px;
}
.profile-subcard-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
}
.profile-subcard-head > i {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgba(47,139,255,.35);
    border-radius: 9px;
    color: var(--accent);
    background: rgba(47,139,255,.10);
}
.profile-subcard-head h3,
.profile-subcard-head p {
    margin: 0;
}
.profile-subcard-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.profile-security-panel .profile-security-card {
    margin: 0;
    border-radius: 10px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}
.profile-security-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    margin: 0 0 14px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
}
.profile-security-tabs button {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 42px;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    padding: 0 14px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
}
.profile-security-tabs button:hover,
.profile-security-tabs button.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-security-tab-panel {
    display: none;
}
.profile-security-tab-panel.active {
    display: block;
}
.profile-security-tab-panel[hidden] {
    display: none !important;
}
.profile-security-tab-panel .profile-security-card > .profile-panel-head {
    align-items: flex-start;
}

.profile-community-filters,
.profile-material-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
}
.profile-community-filters a,
.profile-material-filters a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--white);
    padding: 6px 10px;
    text-decoration: none;
    font-weight: 700;
}
.profile-community-filters a:hover,
.profile-community-filters a.active,
.profile-material-filters a:hover,
.profile-material-filters a.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-community-list article {
    grid-template-columns: 72px minmax(0,1fr);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}
.profile-community-list article > div:last-child {
    min-width: 0;
}
.profile-community-list h3 a {
    color: var(--ink);
    text-decoration: none;
}
.profile-community-list small {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}
.profile-community-restriction {
    display: inline-flex;
    margin-top: 8px;
    border: 1px solid rgba(214,76,76,.38);
    border-radius: 999px;
    color: #e05a5a;
    background: rgba(214,76,76,.08);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
}
.profile-community-actions a,
.profile-primary-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: #fff !important;
    background: var(--accent) !important;
    padding: 6px 11px;
    text-decoration: none;
    font-weight: 800;
}
.profile-community-actions a + a {
    color: var(--ink) !important;
    background: var(--white) !important;
}
.profile-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    border-top: 1px dotted var(--line);
    padding-top: 12px;
}
.profile-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.profile-pagination a,
.profile-pagination span {
    display: inline-grid;
    min-width: 34px;
    min-height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    padding: 5px 8px;
    text-decoration: none;
}
.profile-pagination .active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-pagination .disabled {
    opacity: .55;
}

.profile-publish-community-list {
    display: grid;
    gap: 12px;
}
.profile-publish-community-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 15px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}
.profile-publish-community-head {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr);
    gap: 12px;
    align-items: start;
}
.profile-publish-community-head h3,
.profile-publish-community-head p {
    margin: 0;
}
.profile-publish-community-head p {
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.45;
}
.profile-publish-community-head small {
    display: block;
    margin-top: 6px;
    color: var(--accent);
    font-weight: 800;
}
.profile-publish-types {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
}
.profile-publish-types a,
.profile-publish-types span {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 10px;
    text-decoration: none;
    font-weight: 800;
}
.profile-publish-types a {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-publish-types .is-disabled {
    color: var(--muted);
    background: var(--white);
    cursor: not-allowed;
    opacity: .72;
}
.profile-publish-reason {
    border-top: 1px dotted var(--line);
    color: var(--muted);
    padding-top: 10px;
    font-size: 13px;
    line-height: 1.45;
}
.profile-community-membership-error {
    margin: 0;
}
.profile-community-membership-error .profile-primary-link {
    margin-top: 10px;
}

@media (max-width: 900px) {
    .profile-general-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .profile-security-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .profile-security-tabs button {
        flex: 0 0 auto;
    }
    .profile-publish-types {
        grid-template-columns: 1fr;
    }
    .profile-community-filters,
    .profile-material-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .profile-community-filters a,
    .profile-material-filters a {
        flex: 0 0 auto;
    }
}
@media (max-width: 560px) {
    .profile-extended-grid {
        grid-template-columns: 1fr;
    }
    .profile-security-tabs {
        justify-content: flex-start;
    }
    .profile-security-tabs button {
        justify-content: flex-start;
        padding-left: 12px;
        padding-right: 12px;
    }
    .profile-community-list article,
    .profile-publish-community-head {
        grid-template-columns: 50px minmax(0,1fr);
    }
    .profile-community-avatar {
        width: 50px;
        height: 50px;
    }
    .profile-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Hotfix 20 — profile materials 20/80 workspace */
.profile-material-workspace {
    display: grid;
    grid-template-columns: minmax(170px, 20%) minmax(0, 80%);
    gap: 14px;
    align-items: start;
}
.profile-material-status-sidebar {
    position: sticky;
    top: 12px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
}
.profile-material-status-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 13px 14px;
}
.profile-material-status-sidebar-head h3 {
    margin: 0;
    font-size: 16px;
}
.profile-material-status-sidebar-head span {
    display: inline-grid;
    min-width: 27px;
    min-height: 27px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
}
.profile-material-status-nav {
    display: grid;
    gap: 5px;
    padding: 8px;
}
.profile-material-status-nav a {
    display: flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--ink);
    padding: 8px 10px;
    text-decoration: none;
    font-weight: 700;
}
.profile-material-status-nav a:hover {
    border-color: var(--line);
    background: var(--white);
}
.profile-material-status-nav a.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-material-status-nav a i {
    flex: 0 0 auto;
    font-size: 10px;
    opacity: .72;
}
.profile-material-content {
    min-width: 0;
}
.profile-material-content-head {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 11px 14px;
}
.profile-material-content-head h3,
.profile-material-content-head p {
    margin: 0;
}
.profile-material-content-head h3 {
    font-size: 17px;
}
.profile-material-content-head p,
.profile-material-content-head > span {
    color: var(--muted);
    font-size: 13px;
}
.profile-material-card {
    overflow: hidden;
    border-color: var(--line);
    border-radius: 11px;
    background: var(--paper);
    padding: 0;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}
.profile-material-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    padding: 14px 15px 12px;
}
.profile-material-card-heading {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 9px;
}
.profile-material-card-heading h3 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 17px;
    line-height: 1.35;
}
.profile-material-card > .profile-material-summary {
    margin: 0;
    padding: 14px 15px 10px;
    color: var(--ink);
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.profile-material-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin: 0 15px 12px;
    color: var(--muted);
    font-size: 12px;
}
.profile-material-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.profile-material-meta i {
    color: var(--accent);
}
.profile-material-card > .profile-material-reason,
.profile-material-card > .profile-material-open,
.profile-material-card > .profile-material-history,
.profile-material-card > .profile-material-editor {
    margin-left: 15px;
    margin-right: 15px;
}
.profile-material-reason {
    border: 1px solid rgba(215,154,38,.38);
    border-left: 4px solid #d79a26;
    border-radius: 7px;
    background: rgba(215,154,38,.08);
    padding: 10px 12px;
}
.profile-material-open {
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: #fff;
    background: var(--accent);
    padding: 6px 11px;
    text-decoration: none;
    font-weight: 800;
}
.profile-material-history,
.profile-material-editor {
    border-top: 1px solid var(--line);
    padding: 11px 0;
}
.profile-material-history summary,
.profile-material-editor summary {
    cursor: pointer;
    font-weight: 800;
}
.profile-material-editor {
    margin-top: 10px;
}
.profile-material-card > .profile-material-editor:last-child,
.profile-material-card > .profile-material-history:last-child {
    margin-bottom: 12px;
}
.profile-material-status {
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.08);
    font-weight: 800;
}
.profile-material-content .profile-empty {
    min-height: 150px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--muted);
    text-align: center;
    padding: 20px;
}
@media (max-width: 880px) {
    .profile-material-workspace {
        grid-template-columns: 1fr;
    }
    .profile-material-status-sidebar {
        position: static;
    }
    .profile-material-status-sidebar-head {
        padding: 10px 12px;
    }
    .profile-material-status-nav {
        display: flex;
        overflow-x: auto;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .profile-material-status-nav a {
        flex: 0 0 auto;
        min-height: 36px;
        white-space: nowrap;
    }
    .profile-material-status-nav a i {
        display: none;
    }
}
@media (max-width: 560px) {
    .profile-material-content-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .profile-material-card-head,
    .profile-material-card-heading {
        display: grid;
    }
    .profile-material-status {
        justify-self: start;
    }
    .profile-material-card > .profile-material-summary {
        padding: 12px 12px 8px;
    }
    .profile-material-meta,
    .profile-material-card > .profile-material-reason,
    .profile-material-card > .profile-material-open,
    .profile-material-card > .profile-material-history,
    .profile-material-card > .profile-material-editor {
        margin-left: 12px;
        margin-right: 12px;
    }
}


/* Hotfix 21 — communities single-row filters and community creation layout */
.profile-communities-head {
    align-items: center;
}
.profile-create-community-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: #fff;
    background: var(--accent);
    padding: 7px 12px;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}
.profile-create-community-link:hover {
    color: #fff;
    filter: brightness(1.06);
}
.profile-community-filters-single-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.profile-community-filters-single-row a {
    flex: 0 0 auto;
    white-space: nowrap;
}

.profile-create-community-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 12px;
}
.profile-create-community-title h2 {
    margin: 0 0 0 auto;
    text-align: right;
}
.profile-create-community-title a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
    padding: 6px 10px;
    text-decoration: none;
    font-weight: 700;
}

.profile-community-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr);
    gap: 16px;
    align-items: start;
}
.profile-community-create-fields,
.profile-community-create-media {
    display: grid;
    gap: 13px;
    min-width: 0;
}
.profile-community-create-fields {
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    padding: 16px;
}
.profile-community-create-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}
.profile-community-create-field > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.profile-community-create-field > span i {
    color: var(--accent);
}
.profile-community-control {
    position: relative;
    min-width: 0;
}
.profile-community-control > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 12px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}
.profile-community-control input,
.profile-community-control select,
.profile-community-control textarea {
    width: 100%;
    min-height: 43px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    padding: 9px 12px 9px 38px;
    font: inherit;
}
.profile-community-control textarea {
    min-height: 130px;
    resize: vertical;
}
.profile-community-control-textarea > i {
    top: 15px;
    transform: none;
}
.profile-community-control input:focus,
.profile-community-control select:focus,
.profile-community-control textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(47,139,255,.12);
}

.profile-community-media-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    padding: 14px;
}
.profile-community-media-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.profile-community-media-head > i {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgba(47,139,255,.35);
    border-radius: 9px;
    color: var(--accent);
    background: rgba(47,139,255,.10);
}
.profile-community-media-head strong,
.profile-community-media-head small {
    display: block;
}
.profile-community-media-head small {
    margin-top: 2px;
    color: var(--muted);
    line-height: 1.35;
}
.profile-community-media-preview {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 180px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: var(--white);
}
.profile-community-media-preview.is-avatar {
    width: min(100%, 230px);
    min-height: 230px;
    justify-self: center;
    border-radius: 50%;
}
.profile-community-media-preview.is-cover {
    aspect-ratio: 16 / 9;
    min-height: 0;
}
.profile-community-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-community-media-preview > span {
    display: grid;
    gap: 7px;
    place-items: center;
    padding: 18px;
    text-align: center;
}
.profile-community-media-preview > span i {
    color: var(--accent);
    font-size: 30px;
}
.profile-community-file-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}
.profile-community-file-field > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.profile-community-file-field input[type="file"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    padding: 7px;
    font: inherit;
}
.profile-community-media-rules,
.profile-community-file-name {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.profile-community-file-name {
    overflow: hidden;
    color: var(--accent);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-community-create-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 13px 15px;
}
.profile-community-create-footer .profile-check {
    margin: 0;
}
.profile-community-create-footer button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: #fff;
    background: var(--accent);
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .profile-community-create-form {
        grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr);
    }
}
@media (max-width: 820px) {
    .profile-community-create-form {
        grid-template-columns: 1fr;
    }
    .profile-community-create-media {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .profile-community-create-footer {
        grid-column: auto;
    }
}
@media (max-width: 620px) {
    .profile-communities-head,
    .profile-create-community-title,
    .profile-community-create-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .profile-create-community-title h2 {
        margin: 0;
        text-align: left;
    }
    .profile-create-community-link,
    .profile-community-create-footer button {
        width: 100%;
    }
    .profile-community-create-media {
        grid-template-columns: 1fr;
    }
    .profile-community-media-preview.is-avatar {
        width: min(78vw, 230px);
    }
}


/* Hotfix 22 — community create page refined layout */
.profile-create-community-panel{position:relative}
.profile-create-community-title{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.profile-create-community-title a{min-height:34px;padding:6px 12px;background:var(--panel);border-color:var(--line);font-size:13px}
.profile-create-community-top-submit{display:inline-flex;min-height:36px;align-items:center;justify-content:center;border:1px solid var(--accent);border-radius:7px;background:var(--accent);color:#fff;padding:7px 16px;font:inherit;font-weight:800;cursor:pointer;box-shadow:0 0 0 2px rgba(255,255,255,.04) inset}
.profile-create-community-top-submit:hover{filter:brightness(1.05)}
.profile-community-create-form{grid-template-columns:minmax(0,1.48fr) 260px;gap:14px}
.profile-community-create-fields{padding:0;border:0;background:transparent;gap:12px}
.profile-community-create-grid{display:grid;grid-template-columns:1fr;gap:12px}
.profile-community-create-field{padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.profile-community-create-field.profile-community-create-field-half{align-self:start}
.profile-community-create-field{grid-column:1 / -1}
.profile-community-create-field > span{font-size:13px;letter-spacing:.01em}
.profile-community-control input,.profile-community-control select,.profile-community-control textarea{background:#0b111c;border-color:#233043}
.profile-community-control input::placeholder,.profile-community-control textarea::placeholder{color:#7f8aa3}
.profile-community-create-media{gap:12px}
.profile-community-media-card{padding:12px;border-radius:10px}
.profile-community-media-head>i{width:30px;height:30px;flex-basis:30px;border-radius:7px}
.profile-community-media-head strong{font-size:14px}
.profile-community-media-head small{font-size:11px}
.profile-community-media-preview{min-height:150px;background:#0b111c}
.profile-community-media-preview.is-avatar{width:min(100%,200px);min-height:200px}
.profile-community-media-preview > span i{font-size:24px}
.profile-community-file-field>span{font-size:12px}
.profile-community-file-field input[type="file"]{padding:5px;font-size:12px}
.profile-community-create-footer{grid-column:1 / -1;padding:10px 12px}
.profile-community-create-footer button{margin-left:auto}
.profile-create-community-link{padding:7px 14px}
@media (max-width: 980px){
  .profile-community-create-form{grid-template-columns:minmax(0,1fr) 240px}
}
@media (max-width: 860px){
  .profile-community-create-form{grid-template-columns:1fr}
  .profile-community-create-grid{grid-template-columns:1fr}
  .profile-community-create-media{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 620px){
  .profile-create-community-title{flex-direction:row;align-items:center}
  .profile-create-community-title a,.profile-create-community-top-submit{width:auto}
  .profile-community-create-media{grid-template-columns:1fr}
}

/* Hotfix 23 — wider community form and single bottom create button */
.profile-create-community-title {
    justify-content: flex-start;
}
.profile-community-create-form {
    grid-template-columns: minmax(0, 1fr) 248px;
    column-gap: 8px;
    row-gap: 10px;
    width: 100%;
}
.profile-community-create-fields,
.profile-community-create-grid,
.profile-community-create-field,
.profile-community-control {
    width: 100%;
    min-width: 0;
}
.profile-community-create-fields {
    padding-right: 0;
}
.profile-community-create-grid {
    gap: 9px;
}
.profile-community-create-field {
    padding: 8px;
}
.profile-community-create-media {
    width: 248px;
    max-width: 248px;
    justify-self: end;
    gap: 8px;
}
.profile-community-media-card {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
}
.profile-community-media-preview.is-avatar {
    width: min(100%, 190px);
    min-height: 190px;
}
.profile-community-create-footer {
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}
.profile-community-create-footer button {
    margin-left: auto;
}
.profile-create-community-top-submit {
    display: none !important;
}
@media (max-width: 980px) {
    .profile-community-create-form {
        grid-template-columns: minmax(0, 1fr) 232px;
        column-gap: 8px;
    }
    .profile-community-create-media {
        width: 232px;
        max-width: 232px;
    }
}
@media (max-width: 860px) {
    .profile-community-create-form {
        grid-template-columns: 1fr;
    }
    .profile-community-create-media {
        width: 100%;
        max-width: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px) {
    .profile-community-create-media {
        grid-template-columns: 1fr;
    }
    .profile-community-create-footer {
        align-items: stretch;
    }
    .profile-community-create-footer button {
        width: 100%;
        margin-left: 0;
    }
}

/* Hotfix 24 — community create form uses the full profile content width */
.profile-panel form.profile-community-create-form {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 10px;
}
.profile-community-create-fields,
.profile-community-create-grid,
.profile-community-create-field,
.profile-community-control,
.profile-community-control input,
.profile-community-control select,
.profile-community-control textarea {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.profile-community-create-media {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    margin-left: 0;
}
.profile-community-create-footer {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.profile-community-create-footer button {
    margin-left: auto;
}
@media (max-width: 980px) {
    .profile-panel form.profile-community-create-form {
        grid-template-columns: minmax(0, 1fr) 250px;
        column-gap: 8px;
    }
}
@media (max-width: 860px) {
    .profile-panel form.profile-community-create-form {
        grid-template-columns: 1fr;
    }
    .profile-community-create-media {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px) {
    .profile-community-create-media {
        grid-template-columns: 1fr;
    }
}

/* Hotfix 28 — community navigation, directory split, security tabs and guest auth */
.communities-page > .communities-page-head {
    display: flex;
    width: 100%;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    margin-bottom: 12px;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 8px;
}
.communities-page > .communities-page-head .section-head-dots {
    display: none;
}
.communities-page > .communities-page-head .section-head-count {
    margin-left: auto;
}

.communities-directory-layout.communities-directory-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.community-directory-block {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    padding: 12px;
}
.community-directory-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 9px;
}
.community-directory-block-head h2 {
    min-width: 0;
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
}
.community-directory-block-head > span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.communities-news-block {
    grid-column: 1;
}
.communities-list-block {
    grid-column: 2;
}
.community-news-list-wide article {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 11px;
}
.community-news-list-wide .community-news-thumb {
    width: 112px;
    height: 78px;
}
.community-news-list-wide h3 {
    font-size: 15px;
}
.communities-list-block .community-card-wide {
    grid-template-columns: 64px minmax(0, 1fr);
}
.communities-list-block .community-card-wide .community-card-avatar {
    width: 64px;
    height: 64px;
}

/* Community count and pagination remain on one level, including mobile. */
.community-list-footer {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    border-top: 1px dotted var(--line);
    padding-top: 12px;
}
.community-list-footer .list-total {
    flex: 0 0 auto;
}
.community-list-footer .content-pagination.always-visible {
    flex: 1 1 auto;
    width: auto;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    border-top: 0;
    padding-top: 0;
    padding-bottom: 2px;
    white-space: nowrap;
    scrollbar-width: thin;
}
.community-list-footer .content-pagination a,
.community-list-footer .content-pagination span {
    flex: 0 0 auto;
}

/* Security tabs use the same compact left-aligned appearance as profile filters. */
.profile-security-tabs {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    box-sizing: border-box;
}
.profile-panel .profile-security-tabs button {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--white);
    padding: 6px 11px;
    line-height: 1.2;
}
.profile-panel .profile-security-tabs button:hover,
.profile-panel .profile-security-tabs button.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    filter: none;
}

@media (max-width: 900px) {
    .communities-directory-layout.communities-directory-split {
        grid-template-columns: 1fr;
    }
    .communities-news-block,
    .communities-list-block {
        grid-column: 1;
    }
    .communities-news-block { order: 1; }
    .communities-list-block { order: 2; }
}

@media (max-width: 680px) {
    .community-list-footer {
        flex-direction: row;
        align-items: center;
    }
    .community-list-footer .content-pagination.always-visible {
        width: auto;
        justify-content: flex-end;
    }
    .profile-security-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
    .profile-panel .profile-security-tabs button {
        flex: 0 0 auto;
    }
}

@media (max-width: 520px) {
    .community-directory-block {
        padding: 10px;
    }
    .community-news-list-wide article {
        grid-template-columns: 88px minmax(0, 1fr);
    }
    .community-news-list-wide .community-news-thumb {
        width: 88px;
        height: 66px;
    }
    .community-list-footer {
        gap: 7px;
    }
    .community-list-footer .list-total {
        font-size: 13px;
    }
    .community-list-footer .content-pagination a,
    .community-list-footer .content-pagination span {
        min-width: 34px;
        min-height: 34px;
        padding-right: 8px;
        padding-left: 8px;
    }
}

/* Hotfix 29 — profile media, tabbed settings, privacy, materials and notifications */
.profile-panel[data-profile-local-tabs] > .profile-panel-title-left {
    margin-bottom: 12px;
}
.profile-local-tabs {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
}
.profile-panel .profile-local-tabs button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: var(--paper);
    padding: 7px 13px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.profile-panel .profile-local-tabs button:hover,
.profile-panel .profile-local-tabs button.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    filter: none;
}
.profile-local-panels,
.profile-local-panel {
    min-width: 0;
}
.profile-local-panel[hidden] {
    display: none !important;
}
.profile-actions-right {
    display: flex;
    justify-content: flex-end !important;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}
.profile-panel .profile-actions-right button {
    width: auto;
    min-width: 150px;
}

/* Avatar and cover */
.profile-panel form.profile-cover-form,
.profile-media-control-column form,
.profile-general-panel form,
.profile-privacy-panel form,
.profile-notification-settings-card form {
    width: 100%;
    max-width: none;
}
.profile-media-editor {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}
.profile-media-preview-column,
.profile-media-control-column,
.profile-cover-editor,
.profile-tab-card,
.profile-notification-settings-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    padding: 16px;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
}
.profile-media-preview-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}
.profile-media-preview-column .profile-avatar-preview {
    width: 142px;
    height: 142px;
    border: 3px solid var(--accent);
    box-shadow: 0 10px 26px rgba(0,0,0,.24);
    font-size: 46px;
}
.profile-media-preview-column strong {
    margin-top: 4px;
    font-size: 17px;
}
.profile-media-preview-column small,
.profile-media-rules {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.profile-media-control-column {
    display: grid;
    align-content: center;
}
.profile-file-drop {
    position: relative;
    display: flex !important;
    min-height: 132px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 2px dashed var(--line);
    border-radius: 11px;
    color: var(--ink) !important;
    background: var(--white);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.profile-file-drop:hover {
    border-color: var(--accent);
    background: rgba(47,140,255,.07);
    transform: translateY(-1px);
}
.profile-file-drop > i {
    color: var(--accent);
    font-size: 30px;
}
.profile-file-drop > strong {
    font-size: 16px;
}
.profile-file-drop > span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.profile-file-drop input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.profile-media-rules {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 9px 10px;
}
.profile-media-rules i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--accent);
}
.profile-cover-editor {
    display: grid;
    gap: 14px;
}
.profile-cover-preview {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 230px;
    aspect-ratio: 16 / 5;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background:
        radial-gradient(circle at 18% 28%, rgba(47,140,255,.28), transparent 34%),
        linear-gradient(135deg, var(--white), var(--paper));
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.profile-cover-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,9,16,.08), rgba(5,9,16,.54));
    opacity: 0;
    transition: opacity .18s ease;
}
.profile-cover-preview.has-cover::before {
    opacity: 1;
}
.profile-cover-preview-overlay {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 4px;
    color: var(--muted);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.profile-cover-preview.has-cover .profile-cover-preview-overlay {
    color: #fff;
}
.profile-cover-preview-overlay i {
    font-size: 34px;
}
.profile-cover-preview-overlay strong {
    font-size: 17px;
}
.profile-cover-preview-overlay span {
    font-size: 12px;
}
.profile-cover-controls {
    display: grid;
    grid-template-columns: minmax(230px,.7fr) minmax(0,1.3fr);
    gap: 12px;
    align-items: stretch;
}
.profile-file-drop-wide {
    min-height: 116px;
}
.profile-cover-controls .profile-media-rules {
    margin-top: 0;
    align-items: center;
}

/* Basic and extended profile tabs */
.profile-general-tab-panels {
    min-height: 320px;
}
.profile-tab-card {
    display: grid;
    gap: 16px;
}
.profile-field-stack {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 13px;
}
.profile-field-stack label:last-child {
    grid-column: 1 / -1;
}
.profile-field-stack label,
.profile-tab-card .profile-extended-grid label,
.profile-tab-card .profile-general-bio {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}
.profile-field-stack input,
.profile-field-stack select,
.profile-tab-card input,
.profile-tab-card select,
.profile-tab-card textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    padding: 9px 11px;
    font: inherit;
}
.profile-tab-card textarea {
    min-height: 138px;
    resize: vertical;
}

/* Privacy: explanation left, controls right */
.profile-privacy-list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
}
.profile-privacy-form label.profile-privacy-row {
    display: grid;
    grid-template-columns: minmax(230px,1fr) minmax(230px,320px);
    gap: 20px;
    align-items: center;
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 15px;
}
.profile-privacy-form label.profile-privacy-row:last-child {
    border-bottom: 0;
}
.profile-privacy-form label.profile-privacy-row:hover {
    background: rgba(47,140,255,.045);
}
.profile-privacy-row-featured {
    border-left: 4px solid var(--accent);
    background: rgba(47,140,255,.075);
}
.profile-privacy-copy,
.profile-privacy-control {
    display: grid;
    min-width: 0;
    gap: 3px;
}
.profile-privacy-copy strong {
    color: var(--ink);
    font-size: 15px;
}
.profile-privacy-copy small,
.profile-privacy-control small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}
.profile-privacy-control select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    padding: 8px 11px;
    font: inherit;
    font-weight: 700;
}

/* Material status on the right, type below it */
.profile-material-card-heading {
    display: block;
    flex: 1 1 auto;
}
.profile-material-card-labels {
    display: grid;
    flex: 0 0 auto;
    justify-items: end;
    gap: 6px;
}
.profile-material-card-labels .profile-material-status,
.profile-material-card-labels .admin-section-badge {
    display: inline-flex;
    min-height: 31px;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor !important;
    border-radius: 999px !important;
    background: transparent !important;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.profile-material-card-labels .status-published { color: #3fbf7f; }
.profile-material-card-labels .status-draft { color: #9aa4b7; }
.profile-material-card-labels .status-pending { color: #4f9cff; }
.profile-material-card-labels .status-revision { color: #e3a11a; }
.profile-material-card-labels .status-rejected,
.profile-material-card-labels .status-blocked { color: #e05a5a; }
.profile-material-card-labels .status-archived { color: #8b93a5; }
.profile-material-card-labels .admin-section-news { color: #2f8cff !important; }
.profile-material-card-labels .admin-section-post { color: #9b6cff !important; }
.profile-material-card-labels .admin-section-lib { color: #e38c35 !important; }

/* Notifications: colored categories and two-column workspace */
.profile-notification-workspace {
    display: grid;
    grid-template-columns: 230px minmax(0,1fr);
    gap: 13px;
    align-items: start;
}
.profile-notification-sidebar,
.profile-notification-content,
.profile-notification-settings-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
}
.profile-notification-sidebar {
    overflow: hidden;
}
.profile-notification-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    padding: 12px 13px;
}
.profile-notification-sidebar-head span {
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    padding: 0 7px;
    font-size: 12px;
    font-weight: 900;
}
.profile-notification-filters {
    display: grid;
    gap: 0;
    overflow: visible;
    margin: 0;
    padding: 7px;
}
.profile-notification-filters a {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) 14px;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    padding: 8px 9px;
    font-weight: 800;
    white-space: normal;
}
.profile-notification-filters a > i:first-child {
    color: var(--notification-filter-color,var(--accent));
    text-align: center;
}
.profile-notification-filters a > i:last-child {
    font-size: 11px;
    opacity: .7;
}
.profile-notification-filters a:hover,
.profile-notification-filters a.active {
    border-color: var(--notification-filter-color,var(--accent));
    color: var(--ink);
    background: color-mix(in srgb, var(--notification-filter-color,var(--accent)) 12%, transparent);
}
.notification-filter-community { --notification-filter-color:#8b6cff; }
.notification-filter-content { --notification-filter-color:#2f8cff; }
.notification-filter-trust { --notification-filter-color:#d99a1b; }
.notification-filter-moderation { --notification-filter-color:#df5a62; }
.notification-filter-system { --notification-filter-color:#2fa774; }
.notification-filter-unread { --notification-filter-color:#31a8c7; }
.notification-filter-archive { --notification-filter-color:#8b93a5; }
.profile-notification-content {
    display: grid;
    gap: 11px;
    padding: 12px;
}
.profile-notification-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 0 1px 11px;
}
.profile-notification-content-head h3,
.profile-notification-content-head p {
    margin: 0;
}
.profile-notification-content-head p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}
.profile-notification-content-head button {
    flex: 0 0 auto;
    width: auto;
}
.profile-notification-list {
    display: grid;
    gap: 8px;
}
.profile-notification-list article {
    --notification-tone:#8b93a5;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-left: 5px solid var(--notification-tone);
    border-radius: 9px;
    background: var(--white);
    padding: 12px;
}
.profile-notification-list article.unread {
    border-left-color: var(--notification-tone);
    background: color-mix(in srgb, var(--notification-tone) 9%, var(--white));
}
.notification-tone-community { --notification-tone:#8b6cff; }
.notification-tone-content { --notification-tone:#2f8cff; }
.notification-tone-trust { --notification-tone:#d99a1b; }
.notification-tone-moderation { --notification-tone:#df5a62; }
.notification-tone-system { --notification-tone:#2fa774; }
.notification-tone-default { --notification-tone:#8b93a5; }
.profile-notification-message {
    display: grid;
    min-width: 0;
    gap: 4px;
}
.profile-notification-category {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 5px;
    color: var(--notification-tone);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.profile-notification-category i {
    font-size: 7px;
}
.profile-notification-message > strong {
    font-size: 16px;
}
.profile-notification-message p {
    margin: 0;
    overflow-wrap: anywhere;
}
.profile-notification-settings-card {
    padding: 16px;
}
.profile-notification-settings-card .profile-subcard-head {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}
.notification-preference-grid {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
}
.notification-preference-grid > * {
    border-bottom: 1px solid var(--line);
    padding: 10px 11px;
}
.notification-preference-grid > *:nth-last-child(-n+3) {
    border-bottom: 0;
}

/* Header dropdown uses the same category colors. */
.notification-header-list > a {
    --notification-tone:#8b93a5;
    border-left: 4px solid var(--notification-tone);
}
.notification-header-list > a.unread {
    border-left-color: var(--notification-tone);
    background: color-mix(in srgb, var(--notification-tone) 10%, var(--white));
}
.notification-header-list > a.notification-tone-community { --notification-tone:#8b6cff; }
.notification-header-list > a.notification-tone-content { --notification-tone:#2f8cff; }
.notification-header-list > a.notification-tone-trust { --notification-tone:#d99a1b; }
.notification-header-list > a.notification-tone-moderation { --notification-tone:#df5a62; }
.notification-header-list > a.notification-tone-system { --notification-tone:#2fa774; }
.notification-header-list > a.notification-tone-default { --notification-tone:#8b93a5; }

/* Cover on the private and public profile headers. */
.profile-overview,
.public-profile-hero {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.profile-overview.has-cover {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    color: #fff;
    border-color: rgba(255,255,255,.20);
    background-color: #101722;
}
.profile-overview.has-cover::before,
.public-profile-hero.has-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,rgba(4,8,14,.88),rgba(4,8,14,.56) 58%,rgba(4,8,14,.30));
    pointer-events: none;
}
.profile-overview.has-cover > *,
.public-profile-hero.has-cover > * {
    position: relative;
    z-index: 1;
}
.profile-overview.has-cover strong,
.profile-overview.has-cover small {
    color: #fff;
}
.profile-overview.has-cover span {
    color: #77b9ff;
}
.public-profile-hero.has-cover {
    color: #fff;
    background-color: #101722;
}
.public-profile-hero.has-cover .public-profile-group,
.public-profile-hero.has-cover .public-profile-bio,
.public-profile-hero.has-cover .public-profile-bio-empty {
    color: rgba(255,255,255,.84);
}
.public-profile-hero.has-cover .public-profile-metrics span,
.public-profile-hero.has-cover .public-profile-edit,
.public-profile-hero.has-cover .public-profile-message,
.public-profile-hero.has-cover .public-profile-vote {
    border-color: rgba(255,255,255,.24);
    color: #fff;
    background: rgba(4,8,14,.56);
    backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
    .profile-media-editor,
    .profile-notification-workspace {
        grid-template-columns: 1fr;
    }
    .profile-notification-filters {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 9px;
        scrollbar-width: thin;
    }
    .profile-notification-filters a {
        grid-template-columns: 22px auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .profile-notification-filters a > i:last-child {
        display: none;
    }
    .profile-cover-controls {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 700px) {
    .profile-local-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 9px;
        scrollbar-width: thin;
    }
    .profile-panel .profile-local-tabs button {
        flex: 0 0 auto;
    }
    .profile-field-stack,
    .profile-extended-grid {
        grid-template-columns: 1fr;
    }
    .profile-field-stack label:last-child {
        grid-column: auto;
    }
    .profile-privacy-form label.profile-privacy-row {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .profile-material-card-head,
    .profile-notification-content-head,
    .profile-notification-list article {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-material-card-labels {
        display: flex;
        flex-wrap: wrap;
        justify-items: initial;
        justify-content: flex-start;
    }
    .profile-notification-actions {
        justify-content: flex-start;
    }
    .profile-cover-preview {
        min-height: 150px;
    }
}
@media (max-width: 520px) {
    .profile-media-preview-column,
    .profile-media-control-column,
    .profile-cover-editor,
    .profile-tab-card,
    .profile-notification-settings-card,
    .profile-notification-content {
        padding: 11px;
    }
    .profile-media-preview-column .profile-avatar-preview {
        width: 120px;
        height: 120px;
    }
    .profile-actions-right {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-panel .profile-actions-right button {
        width: 100%;
    }
    .notification-preference-grid {
        grid-template-columns: minmax(0,1fr) 74px 74px;
        font-size: 12px;
    }
}


/* Hotfix 30 — mail reader, separate compose page and blocked-senders tab */
.profile-mail-panel-head{align-items:center;gap:16px}
.profile-mail-top-tabs{display:flex;align-items:center;gap:6px;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
.profile-mail-top-tabs a{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;min-height:42px;border:2px solid transparent;border-radius:8px;color:var(--muted);padding:7px 12px;text-decoration:none;font-weight:700}
.profile-mail-top-tabs a:hover{border-color:var(--line);color:var(--ink);background:rgba(127,127,127,.05)}
.profile-mail-top-tabs a.active{border-color:var(--accent);color:var(--ink);background:rgba(47,140,255,.10)}
.profile-mail-top-tabs a:first-child{font-size:21px;color:var(--ink);padding-left:0;border-left-color:transparent;border-top-color:transparent;border-right-color:transparent;border-radius:0}
.profile-mail-top-tabs a:first-child.active{border-bottom-color:var(--accent);background:transparent}
.profile-mail-top-tabs a span{min-width:23px;border-radius:999px;background:rgba(127,127,127,.15);padding:2px 7px;text-align:center;font-size:12px}
.profile-mail-head-actions{display:flex;align-items:center;justify-content:flex-end;margin-left:auto}
.profile-action-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;border:1px solid var(--accent);border-radius:7px;color:#fff;background:var(--accent);padding:8px 13px;text-decoration:none;font-weight:700}
.profile-action-button:hover{filter:brightness(1.06)}
.profile-action-button.secondary{border-color:var(--line);color:var(--ink);background:var(--paper)}
.profile-mail-compose-page,.profile-mail-blocked-page{border:1px solid var(--line);border-radius:9px;background:var(--paper);padding:18px}
.profile-mail-subpage-head{display:flex;align-items:center;gap:13px;margin-bottom:18px;border-bottom:1px dotted var(--line);padding-bottom:15px}
.profile-mail-subpage-head h3{margin:0 0 4px;font-size:20px}
.profile-mail-subpage-head p{margin:0;color:var(--muted)}
.profile-mail-subpage-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border:1px solid rgba(47,140,255,.55);border-radius:10px;color:var(--accent);background:rgba(47,140,255,.10);font-size:19px}
.profile-mail-subpage-icon.danger{border-color:rgba(217,70,70,.5);color:#d94b4b;background:rgba(217,70,70,.09)}
.profile-mail-compose{display:grid;gap:16px;margin:0;border:0;background:transparent;padding:0}
.profile-mail-compose-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.profile-mail-compose-full{grid-column:1/-1}
.profile-mail-compose label{display:grid;gap:7px;color:var(--muted);font-weight:700}
.profile-mail-compose input,.profile-mail-compose textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:var(--panel-bg);padding:10px 12px;font:inherit}
.profile-mail-compose input{min-height:45px}
.profile-mail-compose textarea{min-height:250px;resize:vertical;line-height:1.55}
.profile-mail-compose input:focus,.profile-mail-compose textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px rgba(47,140,255,.12)}
.profile-mail-attachment-field{border:1px dashed var(--line);border-radius:8px;padding:13px}
.profile-mail-compose-actions{justify-content:flex-end;margin-top:0;border-top:1px solid var(--line);padding-top:15px}
.profile-mail-blocked-list{display:grid;gap:10px;margin:0}
.profile-mail-blocked-card{display:flex;align-items:center;justify-content:space-between;gap:15px;border:2px solid var(--line);border-radius:9px;background:rgba(127,127,127,.035);padding:12px 14px}
.profile-mail-blocked-user{display:flex;align-items:center;gap:11px;min-width:0}
.profile-mail-blocked-user>div{display:grid;gap:3px;min-width:0}
.profile-mail-blocked-user strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-mail-blocked-user small{color:var(--muted)}
.profile-mail-blocked-avatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;overflow:hidden;border:1px solid var(--line);border-radius:50%;color:var(--muted);background:var(--panel-bg)}
.profile-mail-blocked-avatar img{width:100%;height:100%;object-fit:cover}
.profile-mail-blocked-card button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:var(--paper);padding:7px 11px;cursor:pointer}
.profile-mail-blocked-card button:hover{border-color:var(--accent);color:var(--accent)}
.profile-mail-blocked-empty{display:grid;justify-items:center;gap:7px;border:2px dashed var(--line);border-radius:9px;padding:35px 18px;text-align:center}
.profile-mail-blocked-empty i{color:#35a564;font-size:30px}
.profile-mail-blocked-empty span{color:var(--muted)}
@media(max-width:680px){.profile-mail-panel-head{align-items:stretch;flex-direction:column}.profile-mail-head-actions{width:100%;margin-left:0}.profile-mail-head-actions .profile-action-button{width:100%}.profile-mail-top-tabs a:first-child{font-size:18px}.profile-mail-compose-page,.profile-mail-blocked-page{padding:13px}.profile-mail-compose-grid{grid-template-columns:1fr}.profile-mail-blocked-card{align-items:stretch;flex-direction:column}.profile-mail-blocked-card button{width:100%}.profile-mail-compose-actions{flex-direction:column-reverse}.profile-mail-compose-actions button{width:100%}}

/* Hotfix 31 — two-factor subtabs, trusted-mail access and refreshed mailbox */
.profile-two-factor-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 16px;
    border: 1px solid rgba(47,167,116,.45);
    border-radius: 10px;
    background: rgba(47,167,116,.09);
    padding: 12px 14px;
}
.profile-two-factor-status > span {
    display: inline-grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #2fa774;
    background: rgba(47,167,116,.16);
    font-size: 18px;
}
.profile-two-factor-status strong,
.profile-two-factor-status p { margin: 0; }
.profile-two-factor-status p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.profile-two-factor-workspace {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-bg);
}
.profile-two-factor-tabs {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0;
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding: 0;
    overflow: visible;
}
.profile-panel .profile-two-factor-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    color: var(--muted);
    background: rgba(127,127,127,.035);
    padding: 10px 14px;
    font-weight: 800;
}
.profile-panel .profile-two-factor-tabs button:last-child { border-right: 0; }
.profile-panel .profile-two-factor-tabs button.active {
    color: var(--ink);
    background: rgba(47,140,255,.10);
    box-shadow: inset 0 -3px 0 var(--accent);
}
.profile-panel .profile-two-factor-tabs button[data-profile-local-tab="disable"].active {
    color: #df5a62;
    background: rgba(223,90,98,.09);
    box-shadow: inset 0 -3px 0 #df5a62;
}
.profile-two-factor-panel { display: none; padding: 18px; }
.profile-two-factor-panel.active { display: block; }
.profile-two-factor-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 14px;
}
.profile-two-factor-panel-head > span {
    display: inline-grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(47,140,255,.45);
    border-radius: 9px;
    color: var(--accent);
    background: rgba(47,140,255,.09);
}
.profile-two-factor-panel-head.danger > span {
    border-color: rgba(223,90,98,.45);
    color: #df5a62;
    background: rgba(223,90,98,.09);
}
.profile-two-factor-panel-head h4,
.profile-two-factor-panel-head p { margin: 0; }
.profile-two-factor-panel-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.profile-two-factor-form {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}
.profile-two-factor-form .profile-form-actions { grid-column: 1/-1; }
.profile-two-factor-danger-panel { background: rgba(223,90,98,.025); }

.profile-mail-panel { min-width: 0; }
.profile-mail-panel-head {
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 13px;
}
.profile-mail-top-tabs { gap: 10px; }
.profile-mail-top-tabs a {
    min-height: 42px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 7px 5px 9px;
    background: transparent;
}
.profile-mail-top-tabs a:first-child { padding-left: 0; }
.profile-mail-top-tabs a:hover { border-bottom-color: var(--line); background: transparent; }
.profile-mail-top-tabs a.active { border-bottom-color: var(--accent); background: transparent; }
.profile-mail-top-tabs a b,
.profile-mail-top-tabs a [data-profile-mail-unread-badge] {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #df5a62;
    padding: 0 7px;
    font-size: 11px;
}
.profile-mail-top-tabs a:nth-child(2) b { background: #737b8d; }
.profile-action-button.is-locked {
    border-color: #d99a1b;
    color: #fff;
    background: #b57b0b;
}
.profile-mail-access-banner {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(217,154,27,.48);
    border-radius: 9px;
    color: var(--ink);
    background: rgba(217,154,27,.08);
    padding: 11px 13px;
    text-decoration: none;
}
.profile-mail-access-banner > i:first-child {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 9px;
    color: #d99a1b;
    background: rgba(217,154,27,.14);
}
.profile-mail-access-banner span { display: grid; gap: 2px; }
.profile-mail-access-banner small { color: var(--muted); }
.profile-mail-access-lock {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid rgba(217,154,27,.48);
    border-radius: 10px;
    background: rgba(217,154,27,.065);
    padding: 18px;
}
.profile-mail-access-icon {
    display: inline-grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 12px;
    color: #d99a1b;
    background: rgba(217,154,27,.15);
    font-size: 22px;
}
.profile-mail-access-copy { min-width: 0; flex: 1; }
.profile-mail-access-copy h4,
.profile-mail-access-copy p { margin: 0; }
.profile-mail-access-copy p { margin-top: 5px; color: var(--muted); }
.profile-mail-requirements {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    margin-top: 15px;
}
.profile-mail-requirements > div {
    display: grid;
    grid-template-columns: 22px minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 8px 10px;
}
.profile-mail-requirements > div.is-ok { border-color: rgba(47,167,116,.36); }
.profile-mail-requirements > div.is-ok i { color: #2fa774; }
.profile-mail-requirements > div.is-waiting { border-color: rgba(217,154,27,.38); }
.profile-mail-requirements > div.is-waiting i { color: #d99a1b; }
.profile-mail-requirements span { min-width: 0; color: var(--muted); font-size: 12px; }
.profile-mail-requirements strong { font-size: 12px; white-space: nowrap; }
.profile-mail-requirements.compact { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 10px; }
.profile-mail-staff-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid rgba(47,167,116,.35);
    border-radius: 8px;
    color: #2fa774;
    background: rgba(47,167,116,.07);
    padding: 9px 11px;
    font-size: 13px;
    font-weight: 700;
}
.profile-mail-compose-page,
.profile-mail-blocked-page {
    border-radius: 10px;
    background: color-mix(in srgb,var(--paper) 96%,var(--accent) 4%);
}
.profile-mail-compose {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 16px;
}
.profile-mail-compose label > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.profile-mail-compose label > span:first-child i { color: var(--accent); }
.profile-mail-compose input,
.profile-mail-compose textarea {
    border-radius: 8px;
    background: var(--white);
}
.profile-mail-attachment-field {
    border: 1px dashed rgba(47,140,255,.45);
    background: rgba(47,140,255,.045);
}
.profile-mail-attachment-locked {
    border: 1px dashed rgba(217,154,27,.52);
    border-radius: 9px;
    background: rgba(217,154,27,.055);
    padding: 13px;
}
.profile-mail-attachment-locked > div:first-child { display: grid; grid-template-columns: 24px auto; gap: 3px 8px; }
.profile-mail-attachment-locked > div:first-child i { grid-row: 1/3; color: #d99a1b; font-size: 18px; }
.profile-mail-attachment-locked > div:first-child span { color: var(--muted); font-size: 12px; }

.profile-mail-layout {
    display: grid;
    grid-template-columns: 176px minmax(0,1fr);
    min-height: 500px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.profile-mail-folders {
    display: grid;
    align-content: start;
    gap: 5px;
    margin: 0;
    border-right: 1px solid var(--line);
    background: rgba(127,127,127,.025);
    padding: 11px;
    overflow: visible;
}
.profile-mail-folders-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--muted);
    padding: 4px 7px 8px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.profile-mail-folders a {
    --mail-folder-tone:#737b8d;
    display: grid;
    grid-template-columns: 22px minmax(0,1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: 8px;
    color: var(--ink);
    padding: 8px 8px;
    white-space: nowrap;
}
.profile-mail-folders a > i { color: var(--mail-folder-tone); text-align: center; }
.profile-mail-folders a b {
    display: inline-grid;
    min-width: 23px;
    height: 23px;
    place-items: center;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(127,127,127,.12);
    padding: 0 6px;
    font-size: 11px;
}
.profile-mail-folders a:hover {
    border-color: color-mix(in srgb,var(--mail-folder-tone) 34%,var(--line));
    border-left-color: var(--mail-folder-tone);
    background: color-mix(in srgb,var(--mail-folder-tone) 7%,var(--paper));
}
.profile-mail-folders a.active {
    border-color: color-mix(in srgb,var(--mail-folder-tone) 48%,var(--line));
    border-left-color: var(--mail-folder-tone);
    color: var(--ink);
    background: color-mix(in srgb,var(--mail-folder-tone) 12%,var(--paper));
}
.profile-mail-folders a.active b { color: #fff; background: var(--mail-folder-tone); }
.profile-mail-folders a.mail-tone-blue { --mail-folder-tone:#2f8cff; }
.profile-mail-folders a.mail-tone-amber { --mail-folder-tone:#d99a1b; }
.profile-mail-folders a.mail-tone-green { --mail-folder-tone:#2fa774; }
.profile-mail-folders a.mail-tone-red { --mail-folder-tone:#df5a62; }
.profile-mail-folders a.mail-tone-violet { --mail-folder-tone:#8b6cff; }
.profile-mail-folders a.mail-tone-gray { --mail-folder-tone:#737b8d; }
.profile-mail-main {
    display: grid;
    grid-template-columns: minmax(250px,34%) minmax(320px,1fr);
    min-width: 0;
}
.profile-mail-list {
    min-width: 0;
    max-height: 650px;
    overflow: auto;
    border-right: 1px solid var(--line);
    background: var(--paper);
}
.profile-mail-column-head {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-bg);
    padding: 9px 12px;
}
.profile-mail-column-head span {
    min-width: 24px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(127,127,127,.12);
    padding: 2px 7px;
    text-align: center;
    font-size: 11px;
}
.profile-mail-item {
    --mail-item-tone:#2f8cff;
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) 8px;
    align-items: center;
    gap: 9px;
    min-height: 78px;
    border-left: 4px solid transparent;
    background: transparent;
    padding: 10px 11px 10px 8px;
}
.profile-mail-item:hover { background: color-mix(in srgb,var(--mail-item-tone) 6%,var(--paper)); }
.profile-mail-item.unread {
    border-left-color: var(--mail-item-tone);
    background: color-mix(in srgb,var(--mail-item-tone) 8%,var(--paper));
}
.profile-mail-item.active {
    border-left-color: var(--mail-item-tone);
    background: color-mix(in srgb,var(--mail-item-tone) 14%,var(--paper));
    box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--mail-item-tone) 28%,transparent);
}
.profile-mail-item.mail-message-system { --mail-item-tone:#2fa774; }
.profile-mail-item.mail-message-sent { --mail-item-tone:#8b6cff; }
.profile-mail-item.mail-message-personal { --mail-item-tone:#2f8cff; }
.profile-mail-item-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--mail-item-tone);
    background: color-mix(in srgb,var(--mail-item-tone) 12%,transparent);
}
.profile-mail-item-copy { display: grid; min-width: 0; gap: 3px; }
.profile-mail-item-copy strong,
.profile-mail-item-copy > span,
.profile-mail-item-copy small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-mail-item-copy > span,
.profile-mail-item-copy small { color: var(--muted); }
.profile-mail-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mail-item-tone);
}
.profile-mail-list-empty,
.profile-mail-detail-empty {
    display: grid;
    min-height: 300px;
    align-content: center;
    justify-items: center;
    gap: 8px;
    color: var(--muted);
    padding: 24px;
    text-align: center;
}
.profile-mail-list-empty { min-height: 220px; }
.profile-mail-list-empty i,
.profile-mail-detail-empty i { color: var(--accent); font-size: 34px; opacity: .65; }
.profile-mail-detail {
    min-width: 0;
    min-height: 500px;
    background: color-mix(in srgb,var(--paper) 97%,var(--accent) 3%);
    padding: 18px;
}
.profile-mail-detail > header {
    margin: -18px -18px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    padding: 15px 18px;
}
.profile-mail-detail > header h3 { margin: 0 0 5px; font-size: 21px; }
.profile-mail-detail > header p { margin: 0; color: var(--muted); }
.mail-thread { display: grid; gap: 10px; }
.mail-thread article {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    padding: 13px;
}
.mail-thread article small { color: var(--muted); }
.mail-thread .mail-body { grid-column: 1/-1; margin-top: 7px; border-top: 1px dotted var(--line); padding-top: 10px; white-space: pre-wrap; }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.mail-attachments a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
    padding: 7px 9px;
    text-decoration: none;
}
.mail-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}
.mail-detail-actions button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--paper);
    padding: 7px 11px;
    cursor: pointer;
    font-weight: 700;
}
.mail-detail-actions button:hover { border-color: var(--accent); color: var(--accent); }
.profile-mail-footer { margin-top: 10px; }
.profile-nav-count.is-hidden,
.profile-mail-top-tabs [data-profile-mail-unread-badge].is-hidden { display: none !important; }

@media (max-width: 1080px) {
    .profile-mail-layout { grid-template-columns: 156px minmax(0,1fr); }
    .profile-mail-main { grid-template-columns: minmax(225px,36%) minmax(280px,1fr); }
    .profile-mail-folder-title { font-size: 13px; }
}
@media (max-width: 860px) {
    .profile-mail-layout { grid-template-columns: 1fr; }
    .profile-mail-folders {
        display: flex;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 8px;
        scrollbar-width: thin;
    }
    .profile-mail-folders-title { display: none; }
    .profile-mail-folders a { flex: 0 0 auto; min-width: 130px; }
    .profile-mail-main { grid-template-columns: minmax(230px,38%) minmax(280px,1fr); }
}
@media (max-width: 680px) {
    .profile-two-factor-tabs { grid-template-columns: 1fr; }
    .profile-panel .profile-two-factor-tabs button { border-right: 0; border-bottom: 1px solid var(--line); }
    .profile-panel .profile-two-factor-tabs button:last-child { border-bottom: 0; }
    .profile-two-factor-form,
    .profile-mail-requirements,
    .profile-mail-requirements.compact { grid-template-columns: 1fr; }
    .profile-two-factor-form .profile-form-actions { grid-column: auto; }
    .profile-mail-access-lock { flex-direction: column; }
    .profile-mail-main { grid-template-columns: 1fr; }
    .profile-mail-list { max-height: 340px; border-right: 0; border-bottom: 1px solid var(--line); }
    .profile-mail-detail { min-height: 300px; }
    .profile-mail-top-tabs { width: 100%; }
    .profile-mail-top-tabs a { flex: 0 0 auto; }
    .profile-mail-access-banner { grid-template-columns: 38px minmax(0,1fr); }
    .profile-mail-access-banner > i:last-child { display: none; }
}
@media (max-width: 480px) {
    .profile-two-factor-panel,
    .profile-mail-access-lock { padding: 13px; }
    .profile-mail-compose { padding: 12px; }
    .profile-mail-folders a { min-width: 116px; }
    .profile-mail-item { grid-template-columns: 32px minmax(0,1fr) 8px; }
    .profile-mail-item-icon { width: 31px; height: 31px; }
    .mail-thread article { grid-template-columns: 1fr; }
    .mail-thread article small,
    .mail-thread .mail-body { grid-column: 1; }
    .mail-detail-actions { justify-content: stretch; }
    .mail-detail-actions button { flex: 1 1 calc(50% - 8px); }
}
.profile-mail-top-tabs a .profile-mail-tab-title {
    min-width: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    padding: 0;
    text-align: left;
    font-size: inherit;
}
.profile-mail-folders a .profile-mail-folder-title,
.profile-mail-folders a.active .profile-mail-folder-title {
    min-width: 0;
    overflow: hidden;
    border-radius: 0;
    color: inherit;
    background: transparent;
    padding: 0;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit;
}

/* Hotfix 32 — полноразмерный список писем без эффекта наведения */
.profile-panel .profile-mail-list .profile-mail-item {
    --mail-item-state-bg: transparent;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 78px;
    margin: 0;
    box-sizing: border-box;
    border: 0;
    border-left: 4px solid transparent;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: var(--mail-item-state-bg);
    padding: 10px 11px 10px 8px;
    text-align: left;
    filter: none;
    transform: none;
    box-shadow: none;
}
.profile-panel .profile-mail-list .profile-mail-item.unread {
    --mail-item-state-bg: color-mix(in srgb,var(--mail-item-tone) 8%,var(--paper));
    border-left-color: var(--mail-item-tone);
}
.profile-panel .profile-mail-list .profile-mail-item.active {
    --mail-item-state-bg: color-mix(in srgb,var(--mail-item-tone) 14%,var(--paper));
    border-left-color: var(--mail-item-tone);
    box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--mail-item-tone) 28%,transparent);
}
.profile-panel .profile-mail-list .profile-mail-item:hover,
.profile-panel .profile-mail-list .profile-mail-item.unread:hover,
.profile-panel .profile-mail-list .profile-mail-item.active:hover {
    color: var(--ink);
    background: var(--mail-item-state-bg);
    filter: none;
    transform: none;
}

/* Hotfix 33 — возрастные ограничения оформления профиля */
.profile-media-age-lock {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid color-mix(in srgb,#d49b32 46%,var(--line));
    border-radius: 10px;
    background: color-mix(in srgb,#d49b32 8%,var(--paper));
    padding: 15px;
}
.profile-media-age-lock > i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    color: #d49b32;
    background: color-mix(in srgb,#d49b32 15%,transparent);
    font-size: 20px;
}
.profile-media-age-lock > div { min-width: 0; }
.profile-media-age-lock strong { display: block; margin-bottom: 4px; }
.profile-media-age-lock p { margin: 0; color: var(--muted); }
@media (max-width: 680px) {
    .profile-media-age-lock { grid-template-columns: 42px minmax(0,1fr); }
    .profile-media-age-lock button { grid-column: 1/-1; width: 100%; }
}

/* Hotfix 35 — сообщества слева, компактные новости справа */
.communities-directory-layout.communities-directory-split {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
    gap: 14px;
    align-items: start;
}
.communities-directory-layout.communities-directory-split .communities-list-block {
    grid-column: 1;
}
.communities-directory-layout.communities-directory-split .communities-news-block {
    grid-column: 2;
}
.community-news-compact-block {
    padding: 14px 16px;
}
.community-news-compact-head {
    margin-bottom: 0;
    padding-bottom: 11px;
}
.community-news-compact-head h2 {
    color: var(--muted);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.community-news-compact-head > span {
    display: inline-grid;
    min-width: 24px;
    min-height: 24px;
    place-items: center;
    border-radius: 999px;
    background: var(--paper);
    padding: 2px 7px;
    line-height: 1;
}
.community-news-compact-list {
    display: grid;
    min-width: 0;
}
.community-news-compact-item {
    min-width: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 0;
}
.community-news-compact-item:last-child {
    border-bottom: 0;
    padding-bottom: 2px;
}
.community-news-compact-item h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.28;
    overflow-wrap: anywhere;
}
.community-news-compact-item h3 a {
    color: var(--ink);
    text-decoration: none;
}
.community-news-compact-item h3 a:hover {
    color: var(--ink);
    text-decoration: none;
}
.community-news-compact-stats {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 6px 13px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
}
.community-news-compact-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.community-news-compact-stats i {
    color: var(--accent);
    font-size: 14px;
}
.community-news-rating {
    font-size: 14px;
    font-weight: 900;
}
.community-news-rating.is-positive { color: #79d126; }
.community-news-rating.is-negative { color: #ef5c64; }
.community-news-rating.is-neutral { color: var(--muted); }

@media (max-width: 900px) {
    .communities-directory-layout.communities-directory-split {
        grid-template-columns: 1fr;
    }
    .communities-directory-layout.communities-directory-split .communities-list-block,
    .communities-directory-layout.communities-directory-split .communities-news-block {
        grid-column: 1;
    }
    .communities-directory-layout.communities-directory-split .communities-list-block { order: 1; }
    .communities-directory-layout.communities-directory-split .communities-news-block { order: 2; }
}

@media (max-width: 520px) {
    .community-news-compact-block { padding: 12px; }
    .community-news-compact-item h3 { font-size: 15px; }
}

/* 0.5.24 Hotfix 36 — community joining and member publication flow */
.community-hero-join-form {
    margin: 0;
}
.community-join-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 7px;
    background: rgba(20,118,72,.88);
    color: #fff;
    padding: 9px 14px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
}
.community-join-button:hover,
.community-join-button:focus-visible {
    background: rgba(24,145,87,.96);
    border-color: #fff;
}
.community-join-button:disabled {
    opacity: .7;
    cursor: wait;
}
.community-hero-actions .community-membership-status {
    min-height: 42px;
    align-items: center;
    gap: 7px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.32);
    color: #fff;
    background: rgba(0,0,0,.3);
    padding: 9px 13px;
    font-weight: 800;
}
.community-membership-status.closed {
    border-color: rgba(255,188,77,.5);
    color: #ffd184;
    background: rgba(92,59,8,.42);
}
.community-publication-settings form {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    align-items: end;
}
.community-publication-settings form > label {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.community-publication-settings form > label > span {
    font-weight: 800;
}
.community-publication-settings form select,
.community-publication-settings form input {
    width: 100%;
    min-width: 0;
}
.community-publication-settings form .field-error,
.community-publication-settings form button,
.community-publication-settings form .community-inline-status {
    grid-column: 1 / -1;
}
.community-publication-settings form button {
    justify-self: end;
}
.profile-community-publish-note {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink);
}
.profile-community-publish-note > i {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid rgba(47,140,255,.45);
    border-radius: 8px;
    color: var(--accent);
    background: rgba(47,140,255,.1);
}
.profile-community-publish-note span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.profile-community-publish-note strong {
    font-size: 13px;
}
.profile-community-publish-note small {
    color: var(--muted);
    line-height: 1.4;
}
@media (max-width: 700px) {
    .community-hero-join-form,
    .community-hero-join-form .community-join-button,
    .community-hero-actions .community-add-material-button {
        width: 100%;
    }
    .community-publication-settings form {
        grid-template-columns: 1fr;
    }
    .community-publication-settings form .field-error,
    .community-publication-settings form button,
    .community-publication-settings form .community-inline-status {
        grid-column: auto;
    }
    .community-publication-settings form button {
        width: 100%;
        justify-self: stretch;
    }
}

/* v0.5.24 Hotfix 38 — community workspace, moderation, media and statistics */
.community-feed-column {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    padding: 14px;
}
.community-feed-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 2px 2px 12px;
    border-bottom: 1px solid var(--line);
}
.community-feed-panel-head h2 { margin: 0; font-size: 20px; }
.community-feed-panel-head p { margin: 4px 0 0; color: var(--muted); }
.community-feed-panel-head > span { color: var(--muted); white-space: nowrap; }
.community-feed-tabs,
.community-moderation-section-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: thin;
}
.community-feed-tabs a,
.community-moderation-section-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 38px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    padding: 7px 11px;
    font-weight: 800;
    text-decoration: none;
}
.community-feed-tabs a b,
.community-moderation-section-tabs a b {
    min-width: 22px;
    border-radius: 999px;
    background: rgba(127,127,127,.17);
    padding: 2px 6px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.community-feed-tabs a.active,
.community-feed-tabs a:hover,
.community-moderation-section-tabs a.active,
.community-moderation-section-tabs a:hover {
    border-color: var(--accent);
    background: rgba(47,140,255,.12);
    color: var(--accent-dark);
}
.community-feed-tabs a.active b,
.community-moderation-section-tabs a.active b { background: var(--accent); color: #fff; }
.community-feed-column .community-list-footer { margin: 14px -2px 0; }

.community-media-upload-form { margin: 0; }
.community-media-upload-form button,
.community-leave-form button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 7px;
    background: rgba(0,0,0,.28);
    color: #fff;
    padding: 9px 13px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.community-media-upload-form button:hover { background: rgba(0,0,0,.48); }
.community-leave-form {
    display: flex;
    flex: 1 0 100%;
    justify-content: flex-end;
    margin: 0;
    padding-top: 2px;
}
.community-leave-form button {
    border-color: rgba(255,112,112,.65);
    background: rgba(119,25,25,.54);
    color: #ffd4d4;
}
.community-leave-form button:hover { background: rgba(154,34,34,.72); color: #fff; }
.community-media-upload-form button:disabled,
.community-leave-form button:disabled { opacity: .65; cursor: wait; }

.community-control-grid { display: grid; gap: 16px; }
.community-control-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft-bg);
    padding: 16px;
}
.community-control-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.community-control-card-head > div { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.community-control-card-head h3 { margin: 0; }
.community-control-card-head p { margin: 4px 0 0; color: var(--muted); }
.community-control-card-head > b {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
}
.community-control-icon,
.community-action-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid rgba(47,140,255,.42);
    border-radius: 9px;
    background: rgba(47,140,255,.1);
    color: var(--accent);
}
.community-control-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 92px;
}
.community-control-empty i { color: #39b879; font-size: 22px; }
.community-control-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 4px;
}
.community-control-actions > span { margin-right: auto; color: var(--muted); }
.community-join-candidate { min-width: 0; }

.community-period-stats {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
    margin-top: 16px;
}
.community-period-stats > section {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft-bg);
    padding: 16px;
}
.community-period-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.community-period-head > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: rgba(47,140,255,.13);
    color: var(--accent);
    font-size: 19px;
}
.community-period-head h3 { margin: 0; }
.community-period-head p { margin: 3px 0 0; color: var(--muted); }
.community-period-types { display: grid; gap: 8px; }
.community-period-types article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 2px solid var(--line);
    border-radius: 8px;
    padding: 9px 11px;
}
.community-period-types article.type-news { border-color: rgba(47,140,255,.55); }
.community-period-types article.type-post { border-color: rgba(160,103,255,.55); }
.community-period-types article.type-lib { border-color: rgba(40,184,126,.55); }
.community-period-types article strong { font-size: 19px; }

.community-action-log article { display: grid !important; gap: 11px; }
.community-action-main { display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 11px !important; }
.community-action-main > div { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.community-action-main > div span { color: var(--muted); }
.community-action-main time { color: var(--muted); white-space: nowrap; }
.community-action-log ul { margin: 0 0 0 51px; padding: 0; list-style: none; color: var(--muted); }
.community-action-log li { padding: 3px 0; overflow-wrap: anywhere; }

.community-moderation-workspace {
    display: grid;
    grid-template-columns: minmax(190px,230px) minmax(0,1fr);
    gap: 16px;
    align-items: start;
}
.community-moderation-sidebar {
    position: sticky;
    top: 12px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--soft-bg);
    padding: 11px;
}
.community-moderation-sidebar-head { display: flex; align-items: center; gap: 9px; padding: 5px 5px 12px; }
.community-moderation-sidebar-head > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    background: rgba(47,140,255,.13);
    color: var(--accent);
}
.community-moderation-sidebar-head h3 { margin: 0; font-size: 16px; }
.community-moderation-sidebar-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.community-moderation-status-list { display: grid; gap: 5px; }
.community-moderation-status-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    padding: 9px 10px;
    text-decoration: none;
    font-weight: 700;
}
.community-moderation-status-list a b {
    min-width: 24px;
    border-radius: 999px;
    background: rgba(127,127,127,.16);
    padding: 2px 6px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.community-moderation-status-list a:hover,
.community-moderation-status-list a.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.community-moderation-status-list a.active b,
.community-moderation-status-list a:hover b { background: rgba(255,255,255,.2); color: #fff; }
.community-moderation-content-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--white);
    padding: 16px;
}
.community-moderation-empty { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 130px; }
.community-moderation-empty i { color: var(--muted); font-size: 24px; }

@media (max-width: 900px) {
    .community-moderation-workspace { grid-template-columns: 1fr; }
    .community-moderation-sidebar { position: static; }
    .community-moderation-status-list { display: flex; overflow-x: auto; padding-bottom: 3px; }
    .community-moderation-status-list a { flex: 0 0 auto; }
    .community-period-stats { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .community-feed-column { padding: 11px; }
    .community-feed-panel-head { display: grid; }
    .community-feed-panel-head > span { white-space: normal; }
    .community-media-upload-form,
    .community-media-upload-form button,
    .community-leave-form,
    .community-leave-form button { width: 100%; }
    .community-leave-form { justify-content: stretch; }
    .community-control-card { padding: 13px; }
    .community-control-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
    .community-control-actions > span { margin-right: 0; }
    .community-control-actions button { width: 100%; }
    .community-action-main { align-items: flex-start !important; flex-wrap: wrap; }
    .community-action-main time { width: 100%; margin-left: 51px; white-space: normal; }
    .community-action-log ul { margin-left: 0; }
    .community-moderation-content-panel { padding: 12px; }
}

/* v0.5.24 Hotfix 39 — localized community roles and unified theme controls */
.profile-community-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
}
.profile-community-meta-badge,
.profile-community-meta-stat {
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    padding: 4px 9px;
}
.profile-community-meta-badge.role-owner,
.profile-community-meta-badge.role-admin { border-color: rgba(242,184,75,.58); background: rgba(242,184,75,.10); }
.profile-community-meta-badge.role-moderator { border-color: rgba(160,103,255,.52); background: rgba(160,103,255,.10); }
.profile-community-meta-badge.role-author { border-color: rgba(47,140,255,.50); background: rgba(47,140,255,.10); }
.profile-community-meta-badge.role-subscriber { border-color: rgba(127,127,127,.36); }
.profile-community-meta-badge.status-approved { border-color: rgba(40,184,126,.52); background: rgba(40,184,126,.10); }
.profile-community-meta-badge.status-pending,
.profile-community-meta-badge.status-revision { border-color: rgba(242,184,75,.52); background: rgba(242,184,75,.10); }
.profile-community-meta-badge.status-rejected,
.profile-community-meta-badge.status-blocked { border-color: rgba(219,76,76,.52); background: rgba(219,76,76,.10); }
.profile-community-meta-badge.status-archived { opacity: .78; }

/* Community pages now use exactly the same theme surfaces as the header and footer. */
.community-subpage,
.community-feed-column,
.community-moderation-content-panel,
.community-control-card,
.community-period-stats > section,
.community-member-card,
.community-violation-history article,
.community-action-log article,
.community-join-requests article,
.community-stat-grid article,
.community-moderation-card,
.community-moderation-panel,
.community-invite-panel {
    border-color: var(--line) !important;
    color: var(--ink);
    background: var(--white) !important;
}
.community-control-card,
.community-period-stats > section,
.community-moderation-sidebar,
.community-moderation-card {
    background: var(--paper) !important;
}
.community-section-tabs {
    gap: 7px;
    margin: 12px 0 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    padding: 8px;
}
.community-section-tabs a {
    min-height: 38px;
    border-color: var(--line);
    color: var(--ink);
    background: var(--paper);
    padding: 8px 12px;
    font-weight: 800;
}
.community-section-tabs a:hover,
.community-section-tabs a.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.community-section-tabs a:hover b,
.community-section-tabs a.active b { background: rgba(255,255,255,.22); color: #fff; }

/* A community without a custom cover follows the selected site theme instead of forcing a blue banner. */
.community-hero.no-cover {
    border-color: var(--line);
    background: var(--white);
}
.community-hero.no-cover .community-hero-overlay {
    background: linear-gradient(135deg, rgba(127,127,127,.05), rgba(127,127,127,.015));
}
.community-hero.no-cover .community-hero-content,
.community-hero.no-cover .community-title-line h1 { color: var(--ink); }
.community-hero.no-cover .community-hero-content p,
.community-hero.no-cover .community-meta,
.community-hero.no-cover .community-meta a { color: var(--muted); }
.community-hero.no-cover .community-avatar-large { border-color: var(--line); }
.community-hero.no-cover .community-media-upload-form button,
.community-hero.no-cover .community-hero-actions .community-add-material-button,
.community-hero.no-cover .community-moderation-button,
.community-hero.no-cover .community-invite-button,
.community-hero.no-cover .community-join-button {
    border-color: var(--line);
    color: var(--ink);
    background: var(--paper);
}
.community-hero.no-cover .community-hero-actions .community-add-material-button,
.community-hero.no-cover .community-join-button {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.community-hero.no-cover .community-leave-form button {
    border-color: rgba(219,76,76,.5);
    color: #d94f4f;
    background: rgba(219,76,76,.08);
}

.community-member-copy p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.community-member-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 800;
}
.community-member-role-badge.role-owner,
.community-member-role-badge.role-admin { border-color: rgba(242,184,75,.58); background: rgba(242,184,75,.10); }
.community-member-role-badge.role-moderator { border-color: rgba(160,103,255,.52); background: rgba(160,103,255,.10); }
.community-member-role-badge.role-author { border-color: rgba(47,140,255,.52); background: rgba(47,140,255,.10); }

/* Unified form controls for members, management, moderation and invitations. */
.community-member-controls form,
.community-publication-settings form,
.community-join-requests form,
.community-invite-form,
.community-violation-response-form,
.community-moderation-form {
    color: var(--ink);
}
.community-member-field,
.community-publication-settings form > label,
.community-invite-form label,
.community-violation-response-form label,
.community-moderation-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--ink);
    font-weight: 800;
}
.community-member-field > span,
.community-publication-settings form > label > span,
.community-invite-form label > span,
.community-violation-response-form label > span,
.community-moderation-form label > span {
    color: var(--muted);
    font-size: 13px;
}
.community-member-controls select,
.community-member-controls input,
.community-publication-settings select,
.community-publication-settings input,
.community-join-requests input,
.community-invite-form input,
.community-invite-form select,
.community-violation-response-form textarea,
.community-moderation-form textarea,
.community-moderation-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    outline: 0;
    color: var(--ink) !important;
    background: var(--white) !important;
    padding: 9px 12px !important;
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.community-violation-response-form textarea,
.community-moderation-form textarea { min-height: 96px; resize: vertical; }
.community-member-controls select:focus,
.community-member-controls input:focus,
.community-publication-settings select:focus,
.community-publication-settings input:focus,
.community-join-requests input:focus,
.community-invite-form input:focus,
.community-invite-form select:focus,
.community-violation-response-form textarea:focus,
.community-moderation-form textarea:focus,
.community-moderation-form select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(47,140,255,.14);
}
.community-member-controls button,
.community-publication-settings button,
.community-join-requests button,
.community-invite-form button,
.community-violation-response-form button,
.community-moderation-form button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    padding: 8px 13px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.community-member-controls button:hover,
.community-publication-settings button:hover,
.community-join-requests button:hover,
.community-invite-form button:hover,
.community-violation-response-form button:hover,
.community-moderation-form button:hover { filter: brightness(1.06); }
.community-member-controls button.danger,
.community-join-requests button.secondary,
.community-moderation-form button.danger {
    border-color: rgba(219,76,76,.55);
    color: #dc5757;
    background: rgba(219,76,76,.08);
}
.community-member-controls form {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: end;
    gap: 9px;
}
.community-member-controls [data-community-member-error] { grid-column: 1 / -1; }
.community-publication-settings form {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: start;
    gap: 14px;
}
.community-publication-settings form > label { min-width: 0; }
.community-publication-settings form small { color: var(--muted); line-height: 1.45; }
.community-control-actions { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; }

@media (max-width: 720px) {
    .profile-community-meta-row { align-items: stretch; }
    .profile-community-meta-badge,
    .profile-community-meta-stat { border-radius: 8px; }
    .community-section-tabs { margin-left: 0; margin-right: 0; }
    .community-member-controls form,
    .community-publication-settings form { grid-template-columns: 1fr; }
    .community-member-controls button { width: 100%; }
    .community-member-controls [data-community-member-error],
    .community-control-actions { grid-column: auto; }
}

/* 0.5.24 hotfix 41 — comment header controls */
.material-view-layout .material-comments-block .comments-head {
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.material-view-layout .material-comments-block .comments-head-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.material-view-layout .material-comments-block .comments-head-actions .comments-toolbar {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 3px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 3px;
}

.material-view-layout .material-comments-block .comments-head-actions .comments-toolbar button {
    min-height: 36px;
    white-space: nowrap;
}

.material-view-layout .material-comments-block .comments-head-actions .material-comment-add-button {
    min-height: 42px;
    margin-left: 0;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .material-view-layout .material-comments-block .comments-head {
        align-items: stretch;
    }

    .material-view-layout .material-comments-block .comments-head h2 {
        width: 100%;
    }

    .material-view-layout .material-comments-block .comments-head-actions {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .material-view-layout .material-comments-block .comments-head-actions .comments-toolbar {
        flex: 0 0 auto;
        width: auto;
    }

    .material-view-layout .material-comments-block .comments-head-actions .comments-toolbar button {
        flex: 0 0 auto;
    }

    .material-view-layout .material-comments-block .comments-head-actions .material-comment-add-button {
        flex: 0 0 auto;
    }
}



/* Hotfix 44: email verification */
.profile-email-verification{display:flex;align-items:center;gap:14px;margin:0 0 18px;padding:14px 16px;border:1px solid var(--border-color,#d7dce3);border-radius:12px;background:var(--card-bg,#fff)}
.profile-email-verification.is-verified{border-color:rgba(46,160,67,.45)}
.profile-email-verification.is-pending{border-color:rgba(210,153,34,.5)}
.profile-email-verification-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:var(--accent-soft,rgba(31,111,235,.12));color:var(--accent-color,#1f6feb);flex:0 0 auto}
.profile-email-verification-copy{min-width:0;flex:1}.profile-email-verification-copy strong{display:block;margin-bottom:3px}.profile-email-verification-copy p{margin:0;color:var(--muted-text,#697386)}
.profile-email-verification-form{margin-left:auto}.profile-email-verification-form button{white-space:nowrap}
@media(max-width:640px){.profile-email-verification{align-items:flex-start;flex-wrap:wrap}.profile-email-verification-form{width:100%;margin-left:56px}.profile-email-verification-form button{width:100%}}

/* Hotfix 46 — compact email verification notice in profile */
.profile-general-panel .profile-email-verification {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    background: var(--paper);
}
.profile-general-panel .profile-email-verification-copy {
    width: auto;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
}
.profile-general-panel form.profile-email-verification-form {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0 0 0 auto;
    align-self: center;
}
.profile-general-panel .profile-email-verification-form button {
    width: auto;
    max-width: 100%;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .profile-general-panel .profile-email-verification {
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
    }
    .profile-general-panel form.profile-email-verification-form {
        grid-column: 1 / -1;
        width: 100%;
        margin: 0;
    }
    .profile-general-panel .profile-email-verification-form button {
        width: 100%;
    }
}

/* Hotfix 48 — server bookmarks in profile */
.comment-bookmark-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.comment-bookmark-action.active {
    color: var(--accent);
}
.profile-bookmarks-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dotted var(--line);
    padding: 0 0 10px;
}
.profile-bookmarks-title h2 {
    margin: 0;
}
.profile-bookmarks-title span {
    display: inline-grid;
    min-width: 30px;
    min-height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--paper);
    padding: 3px 9px;
    font-weight: 800;
}
.profile-bookmark-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 8px;
}
.profile-bookmark-tabs a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: var(--white);
    padding: 7px 12px;
    text-decoration: none;
    font-weight: 800;
}
.profile-bookmark-tabs a:hover,
.profile-bookmark-tabs a.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-bookmark-list {
    display: grid;
    gap: 12px;
}
.profile-bookmark-card {
    display: grid;
    grid-template-columns: 118px minmax(0,1fr);
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    padding: 12px;
}
.profile-bookmark-poster,
.profile-bookmark-avatar {
    display: grid;
    place-items: center;
    width: 118px;
    height: 92px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--accent);
    background: var(--white);
    text-decoration: none;
}
.profile-bookmark-poster img,
.profile-bookmark-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-bookmark-avatar {
    width: 72px;
    height: 72px;
    align-self: start;
    border-radius: 50%;
    font-size: 24px;
}
.profile-bookmark-poster.is-empty {
    font-size: 28px;
}
.profile-bookmark-body {
    min-width: 0;
}
.profile-bookmark-body > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.profile-bookmark-body h3 {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    font-size: 17px;
    line-height: 1.35;
}
.profile-bookmark-body h3 a {
    color: var(--ink);
    text-decoration: none;
}
.profile-bookmark-body h3 a:hover {
    color: var(--accent);
}
.profile-bookmark-kind {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--white);
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
}
.profile-bookmark-remove {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--accent);
    background: var(--white);
    cursor: pointer;
}
.profile-bookmark-remove:hover,
.profile-bookmark-remove:focus-visible {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}
.profile-bookmark-remove:disabled {
    opacity: .55;
    cursor: wait;
}
.profile-bookmark-author,
.profile-bookmark-summary {
    margin: 9px 0 0;
}
.profile-bookmark-author {
    color: var(--muted);
    font-size: 13px;
}
.profile-bookmark-summary {
    color: var(--ink);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.profile-bookmark-body > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    border-top: 1px dotted var(--line);
    padding-top: 9px;
    color: var(--muted);
    font-size: 12px;
}
.profile-bookmark-body > footer a {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--accent);
    text-decoration: none;
}
.profile-bookmark-empty {
    display: grid;
    min-height: 170px;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: var(--paper);
    text-align: center;
    padding: 20px;
}
.profile-bookmark-empty i {
    font-size: 30px;
}
.profile-bookmark-footer > span {
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 700px) {
    .profile-bookmark-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .profile-bookmark-tabs a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .profile-bookmark-card {
        grid-template-columns: 86px minmax(0,1fr);
        gap: 11px;
        padding: 10px;
    }
    .profile-bookmark-poster {
        width: 86px;
        height: 76px;
    }
    .profile-bookmark-avatar {
        width: 58px;
        height: 58px;
    }
}
@media (max-width: 480px) {
    .profile-bookmark-card {
        grid-template-columns: 1fr;
    }
    .profile-bookmark-poster {
        width: 100%;
        height: 150px;
    }
    .profile-bookmark-avatar {
        width: 58px;
        height: 58px;
    }
    .profile-bookmark-body > footer,
    .profile-bookmark-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Hotfix 49 — counters in profile navigation and clean bookmarks heading */
.profile-bookmarks-title {
    border-bottom: 0;
    padding-bottom: 0;
}
.profile-nav-count.profile-nav-total {
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--paper);
}
.profile-nav a.active .profile-nav-count.profile-nav-total {
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

/* Hotfix 51: automatic numeric community address */
.profile-community-auto-address{min-height:43px;box-sizing:border-box;display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;background:var(--white);padding:9px 12px 9px 38px}
.profile-community-auto-address>span{color:var(--ink);font-weight:700;overflow-wrap:anywhere}

/* Hotfix 52: clean profile/material routes and material view statistics. */
.community-add-material-context {
    display: flex;
    margin: 0 0 0 auto;
}
.community-add-material-context .community-add-material-button {
    margin-left: 0;
    font: inherit;
    cursor: pointer;
}
.profile-publish-context-form {
    display: block;
    margin: 0;
    min-width: 0;
}
.profile-publish-types .profile-publish-context-form button {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    padding: 8px 10px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.profile-publish-types .profile-publish-context-form button:hover,
.profile-publish-types .profile-publish-context-form button:focus-visible {
    filter: brightness(1.06);
}
.material-meta-views {
    color: inherit;
    text-decoration: none;
}
.material-meta-views:hover,
.material-meta-views:focus-visible {
    color: var(--accent);
}
.material-views-link {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
}
.content-card-footer .material-views-link {
    overflow: hidden;
    color: var(--accent-dark);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.material-views-link:hover,
.material-views-link:focus-visible {
    color: var(--accent);
}
.material-views-page {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    padding: 18px;
}
.material-views-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 14px;
}
.material-views-head a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}
.material-views-head h1 {
    margin: 8px 0 3px;
}
.material-views-head p {
    margin: 0;
    color: var(--muted);
}
.material-views-head > strong {
    min-width: 62px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--accent);
    text-align: center;
    font-size: 20px;
}
.material-views-grid {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px;
    margin-top: 16px;
}
.material-views-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 13px;
}
.material-views-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.material-views-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 22px;
}
.material-views-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    color: var(--muted);
}
.material-views-note time {
    margin-left: auto;
}
@media (max-width: 820px) {
    .material-views-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .material-views-note time { width: 100%; margin-left: 0; }
}
@media (max-width: 520px) {
    .community-add-material-context { width: 100%; margin-left: 0; }
    .community-add-material-context .community-add-material-button { width: 100%; justify-content: center; }
    .material-views-head { flex-direction: column; }
    .material-views-grid { grid-template-columns: 1fr; }
}

/* Hotfix 55 — profile page limits and dedicated community/material editors */
.profile-material-card-actions,
.profile-community-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.profile-material-edit-link,
.profile-action-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface-2);
}
.profile-material-edit-link:hover,
.profile-action-edit:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.profile-dedicated-editor {
    display: block;
}
.profile-dedicated-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.profile-dedicated-editor-head h2,
.profile-dedicated-editor-head p {
    margin: 0;
}
.profile-dedicated-editor-head p {
    margin-top: 5px;
    color: var(--muted);
}
.profile-dedicated-editor-head > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}
.profile-editor-error,
.profile-editor-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}
.profile-editor-error { border-color: #c14b4b; }
.profile-editor-error p,
.profile-editor-notice p { margin: 0; }
.profile-editor-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--muted);
}
.profile-dedicated-form {
    display: grid;
    gap: 15px;
}
.profile-dedicated-form > label,
.profile-editor-grid > label {
    display: grid;
    gap: 7px;
}
.profile-dedicated-form input[type="text"],
.profile-dedicated-form select,
.profile-dedicated-form textarea {
    width: 100%;
    box-sizing: border-box;
}
.profile-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.profile-inline-media-sections {
    display: grid;
    gap: 16px;
}
.profile-inline-media-sections > section {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}
.profile-inline-media-sections h3 { margin: 0 0 12px; }
.profile-inline-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.profile-inline-media-grid article {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
}
.profile-inline-media-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 7px;
}
.profile-inline-media-grid label,
.profile-inline-upload {
    display: grid;
    gap: 6px;
    font-size: 13px;
}
.profile-inline-remove { color: #d65a5a; }
.profile-inline-upload {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 9px;
}
.profile-dedicated-resubmit {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
@media (max-width: 760px) {
    .profile-dedicated-editor-head { flex-direction: column; }
    .profile-editor-grid { grid-template-columns: 1fr; }
    .profile-inline-media-grid { grid-template-columns: 1fr; }
    .profile-dedicated-editor-head > a { width: 100%; justify-content: center; box-sizing: border-box; }
}

/* v0.5.24 Hotfix 56 — polished profile community/material editors */
.profile-community-edit-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 270px;
    gap:16px;
    align-items:start;
}
.profile-community-edit-form,
.profile-material-editor-fields{
    min-width:0;
}
.profile-community-edit-form{
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.profile-editor-field{
    display:grid;
    gap:7px;
    min-width:0;
}
.profile-editor-field>span{
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--text);
    font-size:13px;
    font-weight:700;
}
.profile-editor-field>span i{color:var(--accent)}
.profile-editor-field input[type="text"],
.profile-editor-field select,
.profile-editor-field textarea{
    width:100%;
    min-width:0;
    box-sizing:border-box;
    border:1px solid var(--border);
    border-radius:9px;
    background:var(--surface);
    color:var(--text);
    padding:10px 11px;
    font:inherit;
    line-height:1.45;
    resize:vertical;
}
.profile-editor-field input[type="text"]:focus,
.profile-editor-field select:focus,
.profile-editor-field textarea:focus{
    border-color:var(--accent);
    outline:2px solid color-mix(in srgb,var(--accent) 22%,transparent);
    outline-offset:0;
}
.profile-community-edit-media{
    display:grid;
    gap:12px;
    min-width:0;
}
.profile-community-edit-media-card{
    width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:11px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.profile-community-edit-media-card .profile-community-media-preview{
    background:var(--surface);
}
.profile-community-edit-media-card .profile-community-media-preview.is-avatar{
    width:min(100%,190px);
    min-height:190px;
}
.profile-community-edit-media-form{
    display:block;
    margin-top:10px;
}
.profile-community-edit-media-form button{
    position:static;
    display:inline-flex;
    width:100%;
    min-height:38px;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid var(--accent);
    border-radius:8px;
    background:var(--accent);
    color:#fff;
    padding:8px 12px;
    cursor:pointer;
    font:inherit;
    font-weight:700;
}
.profile-community-edit-media-card .profile-community-media-rules{
    display:block;
    margin-top:8px;
    text-align:center;
}

.profile-material-editor-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 270px;
    gap:16px;
    align-items:start;
}
.profile-material-editor-fields{
    display:grid;
    gap:14px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.profile-material-editor-fields textarea[name="body"]{
    min-height:360px;
}
.profile-material-rating-option{
    margin:0;
    padding-top:2px;
}
.profile-material-editor-media{
    display:grid;
    gap:12px;
    min-width:0;
}
.profile-edit-media-section{
    display:grid;
    gap:9px;
    padding:11px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.profile-edit-media-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}
.profile-edit-media-heading>div{
    display:grid;
    gap:2px;
}
.profile-edit-media-heading strong{
    color:var(--text);
    font-size:14px;
}
.profile-edit-media-heading small,
.profile-edit-media-heading>span,
.profile-edit-media-rule{
    color:var(--muted);
    font-size:11px;
    line-height:1.4;
}
.profile-edit-media-heading>i{
    color:var(--accent);
    font-size:16px;
}
.profile-edit-media-card{
    position:relative;
    display:grid;
    min-height:185px;
    overflow:hidden;
    border:1px dashed var(--border);
    border-radius:10px;
    background:var(--surface);
    isolation:isolate;
}
.profile-edit-poster-card{
    aspect-ratio:4/5;
    min-height:0;
}
.profile-edit-media-card img{
    width:100%;
    height:100%;
    min-height:185px;
    object-fit:cover;
}
.profile-edit-poster-card img{
    min-height:0;
}
.profile-edit-media-placeholder{
    display:grid;
    place-items:center;
    align-content:center;
    gap:8px;
    min-height:185px;
    padding:18px;
    color:var(--muted);
    text-align:center;
}
.profile-edit-poster-card .profile-edit-media-placeholder{
    min-height:100%;
}
.profile-edit-media-placeholder i{
    color:var(--accent);
    font-size:28px;
}
.profile-edit-media-card button{
    position:absolute;
    z-index:3;
    display:inline-grid;
    width:34px;
    height:34px;
    place-items:center;
    border:1px solid rgba(255,255,255,.22);
    border-radius:8px;
    background:rgba(8,13,22,.82);
    color:#fff;
    cursor:pointer;
    backdrop-filter:blur(4px);
}
.profile-edit-media-card button:hover{
    background:var(--accent);
    border-color:var(--accent);
}
.profile-edit-media-card button:disabled{
    display:none;
}
.profile-edit-media-delete{
    top:8px;
    right:8px;
}
.profile-edit-media-upload{
    right:8px;
    bottom:8px;
}
.profile-edit-media-center{
    left:50%;
    top:50%;
    width:46px!important;
    height:46px!important;
    transform:translate(-50%,-50%);
    border-radius:50%!important;
    font-size:18px;
    opacity:0;
}
.profile-edit-media-card.is-empty .profile-edit-media-center,
.profile-edit-media-card:hover .profile-edit-media-center,
.profile-edit-media-card:focus-within .profile-edit-media-center{
    opacity:1;
}
.profile-edit-media-card.is-removal-pending::after{
    content:attr(data-remove-label);
    position:absolute;
    z-index:2;
    inset:0;
    display:grid;
    place-items:center;
    padding:16px;
    background:rgba(54,10,10,.78);
    color:#fff;
    text-align:center;
    font-weight:700;
}
.profile-edit-media-card.is-removal-pending .profile-edit-media-delete{
    z-index:4;
    background:#24724e;
}
.profile-edit-media-card.is-removal-pending .profile-edit-media-center,
.profile-edit-media-card.is-removal-pending .profile-edit-media-upload{
    display:none;
}
.profile-edit-media-card.is-replacement-pending::before{
    content:'Новое изображение выбрано';
    position:absolute;
    z-index:2;
    left:8px;
    bottom:8px;
    max-width:calc(100% - 52px);
    border-radius:6px;
    background:rgba(8,13,22,.82);
    color:#fff;
    padding:5px 7px;
    font-size:10px;
}
.profile-edit-images-list{
    display:grid;
    gap:9px;
}
.profile-edit-images-list .profile-edit-media-card{
    aspect-ratio:4/3;
    min-height:0;
}
.profile-edit-images-list .profile-edit-media-card img,
.profile-edit-images-list .profile-edit-media-placeholder{
    min-height:0;
}
.profile-edit-media-add-card[hidden]{display:none!important}
.profile-edit-media-new-card .profile-edit-media-delete{
    display:grid;
}
.profile-material-edit-actions{
    grid-column:1/-1;
    margin-top:0;
    padding-top:2px;
}
.profile-material-edit-actions button{
    margin-left:auto;
}

@media(max-width:900px){
    .profile-community-edit-layout,
    .profile-material-editor-layout{
        grid-template-columns:minmax(0,1fr) 235px;
        gap:12px;
    }
}
@media(max-width:760px){
    .profile-community-edit-layout,
    .profile-material-editor-layout{
        grid-template-columns:1fr;
    }
    .profile-community-edit-media{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .profile-material-editor-media{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .profile-material-edit-actions{
        grid-column:auto;
    }
}
@media(max-width:560px){
    .profile-community-edit-media,
    .profile-material-editor-media{
        grid-template-columns:1fr;
    }
    .profile-community-edit-form,
    .profile-material-editor-fields{
        padding:10px;
    }
}

/* v0.5.24 Hotfix 57 — stronger editor framing, full-width fields and community media previews */
.profile-dedicated-editor{
    --border:var(--line);
    --surface:var(--white);
    --surface-2:color-mix(in srgb,var(--white) 88%,var(--paper));
    --text:var(--ink);
}
.profile-community-edit-form,
.profile-community-edit-media-card,
.profile-material-editor-fields,
.profile-edit-media-section{
    border-color:color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    background:color-mix(in srgb,var(--white) 94%,var(--paper));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.profile-community-edit-form,
.profile-material-editor-fields{
    padding:16px;
}
.profile-community-edit-form .profile-editor-field,
.profile-material-editor-fields .profile-editor-field{
    gap:8px;
}
.profile-community-edit-form .profile-editor-field input[type="text"],
.profile-community-edit-form .profile-editor-field select,
.profile-community-edit-form .profile-editor-field textarea,
.profile-material-editor-fields .profile-editor-field input[type="text"],
.profile-material-editor-fields .profile-editor-field select,
.profile-material-editor-fields .profile-editor-field textarea{
    display:block;
    width:100%;
    max-width:none;
    min-height:42px;
    border:1px solid color-mix(in srgb,var(--line) 68%,var(--accent) 32%);
    border-radius:10px;
    background:var(--white);
    color:var(--ink);
    padding:10px 12px;
    box-shadow:0 1px 0 rgba(0,0,0,.05),inset 0 0 0 1px color-mix(in srgb,var(--white) 72%,transparent);
}
.profile-community-edit-form .profile-editor-field textarea,
.profile-material-editor-fields .profile-editor-field textarea{
    min-height:110px;
}
.profile-community-edit-form .profile-editor-field input[type="text"]:hover,
.profile-community-edit-form .profile-editor-field select:hover,
.profile-community-edit-form .profile-editor-field textarea:hover,
.profile-material-editor-fields .profile-editor-field input[type="text"]:hover,
.profile-material-editor-fields .profile-editor-field select:hover,
.profile-material-editor-fields .profile-editor-field textarea:hover{
    border-color:color-mix(in srgb,var(--line) 48%,var(--accent) 52%);
}
.profile-community-edit-form .profile-editor-field input[type="text"]:focus,
.profile-community-edit-form .profile-editor-field select:focus,
.profile-community-edit-form .profile-editor-field textarea:focus,
.profile-material-editor-fields .profile-editor-field input[type="text"]:focus,
.profile-material-editor-fields .profile-editor-field select:focus,
.profile-material-editor-fields .profile-editor-field textarea:focus{
    border-color:var(--accent);
    outline:0;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);
}
.profile-community-edit-layout{
    grid-template-columns:minmax(0,1fr) 286px;
    gap:18px;
}
.profile-community-edit-media{
    gap:14px;
}
.profile-community-edit-media-card{
    padding:13px;
    overflow:hidden;
}
.profile-community-edit-media-card .profile-community-media-head{
    margin-bottom:10px;
}
.profile-community-edit-media-card .profile-community-media-preview{
    width:100%;
    min-height:165px;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--line) 68%,var(--accent) 32%);
    border-radius:10px;
    background:var(--paper);
}
.profile-community-edit-media-card .profile-community-media-preview.is-avatar{
    width:190px;
    min-height:190px;
    aspect-ratio:1;
    margin:0 auto;
    border-radius:50%;
}
.profile-community-edit-media-card .profile-community-media-preview.is-cover{
    aspect-ratio:16/6;
}
.profile-community-edit-media-card .profile-community-media-preview img{
    display:block;
    width:100%;
    height:100%;
    min-height:inherit;
    object-fit:cover;
}
.profile-community-edit-media-card .profile-community-media-preview.is-avatar img{
    aspect-ratio:1;
}
.profile-community-edit-media-card .profile-community-media-preview.is-cover img{
    aspect-ratio:16/6;
}
.profile-community-edit-media-form button{
    box-shadow:0 6px 16px color-mix(in srgb,var(--accent) 18%,transparent);
}
.profile-material-editor-layout{
    grid-template-columns:minmax(0,1fr) 252px;
    gap:14px;
}
.profile-material-editor-fields{
    width:100%;
    align-self:start;
}
.profile-material-editor-fields textarea[name="title"]{
    min-height:66px;
}
.profile-material-editor-fields textarea[name="summary"]{
    min-height:145px;
}
.profile-material-editor-fields textarea[name="body"]{
    min-height:420px;
}
.profile-material-editor-media{
    width:252px;
    justify-self:end;
}
.profile-edit-media-section{
    padding:12px;
}
.profile-edit-media-card{
    border:1px solid color-mix(in srgb,var(--line) 62%,var(--accent) 38%);
    background:var(--paper);
    box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.profile-edit-media-card.is-empty{
    border-style:dashed;
}
.profile-edit-media-card img{
    display:block;
}
.profile-edit-images-list{
    gap:12px;
}
.profile-edit-images-list .profile-edit-media-card{
    border-radius:10px;
}
.profile-edit-media-delete,
.profile-edit-media-upload,
.profile-edit-media-center{
    box-shadow:0 4px 12px rgba(0,0,0,.22);
}
@media(max-width:920px){
    .profile-community-edit-layout{
        grid-template-columns:minmax(0,1fr) 248px;
        gap:14px;
    }
    .profile-material-editor-layout{
        grid-template-columns:minmax(0,1fr) 228px;
        gap:12px;
    }
    .profile-material-editor-media{width:228px}
}
@media(max-width:760px){
    .profile-community-edit-layout,
    .profile-material-editor-layout{
        grid-template-columns:1fr;
    }
    .profile-material-editor-media{
        width:100%;
        justify-self:stretch;
    }
}

/* v0.5.24 Hotfix 58 — full-width material editor matching the community editor */
.profile-panel form.profile-material-edit-form{
    width:100%;
    max-width:none;
}
.profile-material-edit-page .profile-material-editor-layout{
    grid-template-columns:minmax(0,1fr) 300px;
    gap:18px;
    align-items:start;
}
.profile-material-edit-page .profile-material-editor-fields{
    width:auto;
    min-width:0;
    align-self:start;
}
.profile-material-edit-page .profile-material-editor-media{
    width:300px;
    min-width:0;
    justify-self:end;
    align-self:start;
}
.profile-material-rating-card{
    grid-column:1/-1;
    width:100%;
    min-height:48px;
    box-sizing:border-box;
    margin:0;
    padding:13px 14px;
    border:1px solid color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    border-radius:12px;
    background:color-mix(in srgb,var(--white) 94%,var(--paper));
    color:var(--ink);
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.profile-material-rating-card span{
    font-weight:700;
}
.profile-material-rating-card input{
    flex:0 0 auto;
}
.profile-material-edit-actions{
    display:flex;
    width:100%;
    justify-content:flex-end;
    align-items:center;
}
.profile-material-edit-actions button{
    margin-left:auto;
}
@media(max-width:980px){
    .profile-material-edit-page .profile-material-editor-layout{
        grid-template-columns:minmax(0,1fr) 270px;
        gap:14px;
    }
    .profile-material-edit-page .profile-material-editor-media{
        width:270px;
    }
}
@media(max-width:760px){
    .profile-material-edit-page .profile-material-editor-layout{
        grid-template-columns:1fr;
    }
    .profile-material-edit-page .profile-material-editor-media{
        width:100%;
        justify-self:stretch;
    }
    .profile-material-edit-page .profile-material-rating-card{
        grid-column:1/-1;
    }
}
@media(max-width:560px){
    .profile-material-edit-page .profile-material-editor-fields,
    .profile-material-edit-page .profile-edit-media-section,
    .profile-material-edit-page .profile-material-rating-card{
        border-radius:10px;
    }
    .profile-material-edit-actions button{
        width:100%;
        justify-content:center;
    }
}

/* v0.5.24 Hotfix 59 — compact media controls without hover plus */
.profile-material-edit-page .profile-edit-media-center{
    display:none!important;
}
.profile-material-edit-page .profile-edit-media-placeholder{
    min-height:100%;
    padding:0;
    gap:0;
    background:color-mix(in srgb,var(--paper) 72%,transparent);
}
.profile-material-edit-page .profile-edit-media-placeholder i,
.profile-material-edit-page .profile-edit-media-placeholder span{
    display:none!important;
}
.profile-material-edit-page .profile-edit-media-delete,
.profile-material-edit-page .profile-edit-media-upload{
    width:30px;
    height:30px;
    border-radius:7px;
    font-size:12px;
    box-shadow:0 3px 9px rgba(0,0,0,.2);
}
.profile-material-edit-page .profile-edit-media-delete{
    top:6px;
    right:6px;
}
.profile-material-edit-page .profile-edit-media-upload{
    right:6px;
    bottom:6px;
}
.profile-material-edit-page .profile-edit-media-card.is-removal-pending .profile-edit-media-upload{
    display:none;
}
@media(max-width:560px){
    .profile-material-edit-page .profile-edit-media-delete,
    .profile-material-edit-page .profile-edit-media-upload{
        width:32px;
        height:32px;
    }
}

/* v0.5.24 Hotfix 60 — community material creator matches the profile material editor */
.profile-material-edit-page .profile-dedicated-editor-head{
    border-bottom:0;
    padding-bottom:0;
}
.community-material-page .community-material-create-form.community-material-page-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:0;
    width:100%;
}
.community-material-page .community-material-create-form .community-material-ad-placeholder{
    display:none!important;
}
.community-material-page .community-material-create-card{
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.community-material-page .community-material-create-card .publication-limit-summary{
    margin-bottom:12px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--surface);
    padding:11px 12px;
}
.community-material-page .community-material-create-card .community-material-types{
    margin-bottom:14px;
}
.community-material-page .community-material-create-card .community-material-editor-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 300px;
    gap:18px;
    align-items:start;
}
.community-material-page .community-material-create-card .community-material-fields-column{
    display:grid;
    gap:14px;
    min-width:0;
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.community-material-page .community-material-create-card .community-material-field{
    display:grid;
    gap:7px;
    min-width:0;
}
.community-material-page .community-material-create-card .community-material-field>span:first-child{
    color:var(--text);
    font-size:13px;
    font-weight:700;
}
.community-material-page .community-material-create-card .community-material-input-wrap,
.community-material-page .community-material-create-card .community-material-select-wrap{
    display:block;
    min-width:0;
}
.community-material-page .community-material-create-card textarea,
.community-material-page .community-material-create-card select{
    width:100%;
    min-width:0;
    box-sizing:border-box;
    border:1px solid var(--border);
    border-radius:9px;
    background:var(--surface);
    color:var(--text);
    padding:10px 11px;
    font:inherit;
    line-height:1.45;
}
.community-material-page .community-material-create-card textarea:hover,
.community-material-page .community-material-create-card select:hover{
    border-color:color-mix(in srgb,var(--accent) 55%,var(--border));
}
.community-material-page .community-material-create-card textarea:focus,
.community-material-page .community-material-create-card select:focus{
    border-color:var(--accent);
    outline:2px solid color-mix(in srgb,var(--accent) 22%,transparent);
    outline-offset:0;
    box-shadow:none;
}
.community-material-page .community-material-create-card textarea[name="title"]{
    min-height:66px;
}
.community-material-page .community-material-create-card textarea[name="summary"]{
    min-height:145px;
}
.community-material-page .community-material-create-card textarea[name="body"]{
    min-height:420px;
}
.community-material-page .community-material-create-media{
    display:grid;
    gap:12px;
    width:300px;
    min-width:0;
    justify-self:end;
    align-self:start;
}
.community-material-page .community-material-create-media .community-inline-upload{
    display:grid;
    gap:9px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}
.community-material-page .community-material-create-media .community-inline-upload-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}
.community-material-page .community-material-create-media .community-inline-upload-head>div{
    display:grid;
    gap:2px;
}
.community-material-page .community-material-create-media .community-inline-upload-head strong{
    color:var(--text);
    font-size:14px;
}
.community-material-page .community-material-create-media .community-inline-upload-head small,
.community-material-page .community-material-create-media .community-inline-upload-head>span,
.community-material-page .community-material-create-media .community-inline-upload-rules{
    color:var(--muted);
    font-size:11px;
    line-height:1.4;
}
.community-material-page .community-material-create-media .community-inline-upload-head>i{
    color:var(--accent);
    font-size:16px;
}
.community-material-page .community-material-create-media .community-inline-preview{
    position:relative;
    display:grid;
    width:100%;
    min-height:185px;
    overflow:hidden;
    border:1px dashed var(--border);
    border-radius:10px;
    background:var(--surface);
    padding:0;
    isolation:isolate;
}
.community-material-page .community-material-create-media .community-inline-poster-preview{
    aspect-ratio:4/5;
    min-height:0;
}
.community-material-page .community-material-create-media .community-inline-preview img{
    display:block;
    width:100%;
    height:100%;
    min-height:185px;
    object-fit:cover;
}
.community-material-page .community-material-create-media .community-inline-poster-preview img{
    min-height:0;
}
.community-material-page .community-material-create-media .community-inline-preview-empty{
    min-height:185px;
    padding:0;
    background:color-mix(in srgb,var(--paper) 72%,transparent);
}
.community-material-page .community-material-create-media .community-inline-poster-preview .community-inline-preview-empty{
    min-height:100%;
}
.community-material-page .community-material-create-media .community-inline-images-preview{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    min-height:0;
    border:0;
    background:transparent;
}
.community-material-page .community-material-create-media .community-create-image-card{
    position:relative;
    display:grid;
    width:100%;
    min-height:0;
    aspect-ratio:4/3;
    overflow:hidden;
    border:1px dashed var(--border);
    border-radius:10px;
    background:var(--surface);
}
.community-material-page .community-material-create-media .community-create-image-card.has-media{
    border-style:solid;
    border-color:color-mix(in srgb,var(--line) 62%,var(--accent) 38%);
}
.community-material-page .community-material-create-media .community-create-image-card img{
    width:100%;
    height:100%;
    min-height:0;
    object-fit:cover;
}
.community-material-page .community-material-create-media .community-create-image-card .community-inline-preview-empty{
    min-height:0;
}
.community-material-page .community-material-create-media .profile-edit-media-delete,
.community-material-page .community-material-create-media .profile-edit-media-upload{
    width:30px;
    height:30px;
    border-radius:7px;
    font-size:12px;
    box-shadow:0 3px 9px rgba(0,0,0,.2);
}
.community-material-page .community-material-create-media .profile-edit-media-delete{
    top:6px;
    right:6px;
}
.community-material-page .community-material-create-media .profile-edit-media-upload{
    right:6px;
    bottom:6px;
}
.community-material-page .community-create-rating-card{
    width:100%;
    max-width:none;
    min-height:48px;
    box-sizing:border-box;
    margin:0;
    padding:13px 14px;
    border:1px solid color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    border-radius:12px;
    background:color-mix(in srgb,var(--white) 94%,var(--paper));
}
.community-material-page .community-material-create-card .community-form-actions{
    margin-top:14px;
    padding-top:0;
}
@media(max-width:980px){
    .community-material-page .community-material-create-card .community-material-editor-grid{
        grid-template-columns:minmax(0,1fr) 270px;
        gap:14px;
    }
    .community-material-page .community-material-create-media{
        width:270px;
    }
}
@media(max-width:760px){
    .community-material-page .community-material-create-card .community-material-editor-grid{
        grid-template-columns:1fr;
    }
    .community-material-page .community-material-create-media{
        width:100%;
        justify-self:stretch;
    }
}
@media(max-width:560px){
    .community-material-page .community-material-create-card,
    .community-material-page .community-material-create-card .community-material-fields-column,
    .community-material-page .community-material-create-media .community-inline-upload,
    .community-material-page .community-create-rating-card{
        border-radius:10px;
    }
    .community-material-page .community-material-create-card{
        padding:10px;
    }
    .community-material-page .community-material-create-card .community-material-fields-column{
        padding:11px;
    }
    .community-material-page .community-material-create-card .community-form-actions button{
        width:100%;
    }
}
.profile-material-edit-page .profile-dedicated-editor-head h2{
    margin:0;
    border-bottom:0;
    padding-bottom:0;
}
.community-material-page .community-material-create-media .community-native-file-input{
    display:none!important;
}

/* v0.5.24 Hotfix 61 — polished community material creator with 80/20 advertising column */
.community-material-page{
    --border:var(--line);
    --surface:var(--white);
    --surface-2:color-mix(in srgb,var(--white) 94%,var(--paper));
    --text:var(--ink);
}
.community-material-page .community-material-create-form.community-material-page-grid{
    display:grid;
    grid-template-columns:minmax(0,4fr) minmax(190px,1fr);
    gap:14px;
    align-items:stretch;
    width:100%;
}
.community-material-page .community-material-create-form .community-material-page-editor{
    min-width:0;
    border:0;
    background:transparent;
}
.community-material-page .community-material-create-card{
    height:100%;
    box-sizing:border-box;
    padding:14px;
    border:1px solid color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    border-radius:12px;
    background:color-mix(in srgb,var(--white) 96%,var(--paper));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.community-material-page .community-material-create-card .publication-limit-summary{
    border-color:color-mix(in srgb,var(--line) 76%,var(--accent) 24%);
    background:var(--white);
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.community-material-page .community-material-create-card .community-material-editor-grid{
    grid-template-columns:minmax(0,1fr) 300px;
    gap:18px;
}
.community-material-page .community-material-create-card .community-material-fields-column{
    padding:16px;
    border:1px solid color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    border-radius:12px;
    background:color-mix(in srgb,var(--white) 94%,var(--paper));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.community-material-page .community-material-create-card .community-material-field{
    gap:8px;
}
.community-material-page .community-material-create-card .community-material-field>span:first-child{
    color:var(--ink);
    font-size:13px;
    font-weight:800;
}
.community-material-page .community-material-create-card textarea,
.community-material-page .community-material-create-card select{
    display:block;
    width:100%;
    max-width:none;
    min-width:0;
    box-sizing:border-box;
    border:1px solid color-mix(in srgb,var(--line) 68%,var(--accent) 32%);
    border-radius:10px;
    background:var(--white);
    color:var(--ink);
    padding:10px 12px;
    font:inherit;
    line-height:1.45;
    box-shadow:0 1px 0 rgba(0,0,0,.05),inset 0 0 0 1px color-mix(in srgb,var(--white) 72%,transparent);
}
.community-material-page .community-material-create-card select{
    min-height:42px;
    padding-right:42px;
}
.community-material-page .community-material-create-card textarea:hover,
.community-material-page .community-material-create-card select:hover{
    border-color:color-mix(in srgb,var(--line) 48%,var(--accent) 52%);
}
.community-material-page .community-material-create-card textarea:focus,
.community-material-page .community-material-create-card select:focus{
    border-color:var(--accent);
    outline:0;
    background:var(--white);
    box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);
}
.community-material-page .community-material-create-card textarea[name="title"]{
    min-height:66px;
}
.community-material-page .community-material-create-card textarea[name="summary"]{
    min-height:145px;
}
.community-material-page .community-material-create-card textarea[name="body"]{
    min-height:420px;
}
.community-material-page .community-material-create-media{
    width:300px;
    gap:12px;
}
.community-material-page .community-material-create-media .community-inline-upload,
.community-material-page .community-create-rating-card{
    border-color:color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    background:color-mix(in srgb,var(--white) 94%,var(--paper));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.community-material-page .community-material-create-media .community-inline-preview,
.community-material-page .community-material-create-media .community-create-image-card{
    border-color:color-mix(in srgb,var(--line) 62%,var(--accent) 38%);
    background:var(--paper);
    box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.community-material-page .community-material-create-media .community-inline-preview.is-empty,
.community-material-page .community-material-create-media .community-create-image-card:not(.has-media){
    border-style:dashed;
}
.community-material-page .community-material-create-card .community-form-actions{
    margin-top:14px;
    padding-top:0;
    border-top:0;
}
.community-material-page .community-material-create-form .community-material-ad-placeholder{
    display:block!important;
    min-width:0;
    min-height:620px;
    padding:12px;
    border:1px solid color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    border-radius:12px;
    background:color-mix(in srgb,var(--white) 96%,var(--paper));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--ink) 4%,transparent);
}
.community-material-page .community-material-ad-card{
    position:sticky;
    top:12px;
    display:grid;
    gap:10px;
    min-height:260px;
}
.community-material-page .community-material-ad-label{
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.community-material-page .community-material-ad-label i{
    color:var(--accent);
}
.community-material-page .community-material-ad-empty{
    display:grid;
    place-items:center;
    align-content:center;
    gap:9px;
    min-height:220px;
    padding:14px;
    border:1px dashed color-mix(in srgb,var(--line) 72%,var(--accent) 28%);
    border-radius:10px;
    background:var(--paper);
    color:var(--muted);
    text-align:center;
}
.community-material-page .community-material-ad-empty i{
    color:var(--accent);
    font-size:24px;
}
.community-material-page .community-material-ad-empty span{
    font-size:12px;
    line-height:1.45;
}
.community-material-page .community-material-create-form .material-preview-modal{
    grid-column:1/-1;
}
@media(max-width:1120px){
    .community-material-page .community-material-create-form.community-material-page-grid{
        grid-template-columns:minmax(0,4fr) minmax(170px,1fr);
        gap:12px;
    }
    .community-material-page .community-material-create-card .community-material-editor-grid{
        grid-template-columns:minmax(0,1fr) 270px;
        gap:14px;
    }
    .community-material-page .community-material-create-media{
        width:270px;
    }
}
@media(max-width:900px){
    .community-material-page .community-material-create-form.community-material-page-grid{
        grid-template-columns:1fr;
    }
    .community-material-page .community-material-create-form .community-material-ad-placeholder{
        min-height:150px;
    }
    .community-material-page .community-material-ad-card{
        position:static;
        min-height:0;
    }
    .community-material-page .community-material-ad-empty{
        min-height:110px;
    }
}
@media(max-width:760px){
    .community-material-page .community-material-create-card .community-material-editor-grid{
        grid-template-columns:1fr;
    }
    .community-material-page .community-material-create-media{
        width:100%;
        justify-self:stretch;
    }
}
@media(max-width:560px){
    .community-material-page .community-material-create-card,
    .community-material-page .community-material-create-card .community-material-fields-column,
    .community-material-page .community-material-create-media .community-inline-upload,
    .community-material-page .community-create-rating-card,
    .community-material-page .community-material-create-form .community-material-ad-placeholder{
        border-radius:10px;
    }
    .community-material-page .community-material-create-card{
        padding:10px;
    }
    .community-material-page .community-material-create-card .community-material-fields-column{
        padding:11px;
    }
    .community-material-page .community-material-create-form .community-material-ad-placeholder{
        padding:10px;
    }
}

/* v0.5.24 Hotfix 69 — search page 80/20 public layout */
.search-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(180px, 1fr);
    gap: 8px;
    align-items: start;
    width: 100%;
}

.search-page-layout > .content-block {
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.search-results-side-block {
    min-height: 260px;
}

@media (max-width: 900px) {
    .search-page-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-results-side-block {
        min-height: 180px;
    }
}
