* {
    box-sizing: border-box;
}

:root {
    --community-bg: #f8f7fb;
    --community-surface: #ffffff;
    --community-surface-soft: #f3f0f8;
    --community-text: #171421;
    --community-muted: #756f82;
    --community-line: #e7e2ef;
    --community-accent: #7430c7;
    --community-accent-dark: #542193;
    --community-accent-soft: #f0e7ff;
    --community-danger: #b42318;
    --community-success: #1f7a62;
    --community-radius: 20px;
    --community-shadow: 0 20px 52px rgba(53, 29, 82, .10);
}

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

body.community-lock {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

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

.community-page {
    width: min(1440px, calc(100% - 28px));
    margin: 0 auto;
    padding: 30px 0 76px;
}

.community-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    margin-bottom: 26px;
}

.community-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: var(--community-accent-soft);
    color: var(--community-accent-dark);
    padding: 5px 12px;
    font-weight: 800;
    font-size: .78rem;
}

.community-top h1 {
    margin: 10px 0 4px;
    font: 800 clamp(2rem, 4vw, 3.8rem) "DM Sans", Arial, sans-serif;
    letter-spacing: 0;
}

.community-top p {
    margin: 0;
    color: var(--community-muted);
    line-height: 1.6;
}

.community-search {
    position: relative;
    min-height: 54px;
    border: 1px solid var(--community-line);
    border-radius: 999px;
    background: var(--community-surface);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    box-shadow: 0 12px 30px rgba(35, 25, 55, .05);
}

.community-search i,
.community-panel-search i {
    color: var(--community-muted);
}

.community-search input,
.community-panel-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--community-text);
}

.community-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(520px, 92vw);
    max-height: 520px;
    overflow: auto;
    z-index: 30;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    background: var(--community-surface);
    box-shadow: var(--community-shadow);
    padding: 10px;
}

.community-search-results h3 {
    margin: 12px 8px 8px;
    color: var(--community-muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.community-search-results a {
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: var(--community-radius);
    padding: 9px;
    text-decoration: none;
}

.community-search-results a:hover {
    background: var(--community-surface-soft);
}

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

.community-sidebar {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 18px;
}

.community-feed-column {
    min-width: 0;
    width: min(100%, 780px);
    margin-inline: auto;
    display: grid;
    gap: 16px;
}

.community-panel,
.community-composer,
.community-post,
.community-login-card,
.community-followed-books,
.community-empty,
.community-setup {
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    background: var(--community-surface);
    box-shadow: 0 12px 30px rgba(53, 29, 82, .055);
}

.community-panel {
    padding: 18px;
}

.community-panel h2,
.community-followed-books h2 {
    margin: 0 0 14px;
    font: 800 1rem "DM Sans", Arial, sans-serif;
    letter-spacing: 0;
}

.community-panel--online {
    background:
        radial-gradient(circle at 100% 0, rgba(116, 48, 199, .12), transparent 42%),
        var(--community-surface);
}

.community-online-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: -5px 0 14px;
    color: var(--community-accent-dark);
    font-size: .79rem;
    font-weight: 800;
}

.community-online-count i {
    color: #2d9d79;
    font-size: .52rem;
    filter: drop-shadow(0 0 5px rgba(45, 157, 121, .42));
}

.community-muted {
    margin: 0;
    color: var(--community-muted);
    font-size: .92rem;
    line-height: 1.55;
}

.community-quick-nav {
    border-bottom: 1px solid var(--community-line);
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
}

.community-quick-nav button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: var(--community-radius);
    background: transparent;
    color: var(--community-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    font-weight: 800;
    text-align: left;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.community-quick-nav button:hover,
.community-quick-nav button.is-active {
    background: var(--community-accent-soft);
    color: var(--community-accent-dark);
}

.community-quick-nav button:disabled {
    opacity: .55;
    cursor: default;
}

.community-mini-list,
.community-activity-list {
    display: grid;
    gap: 10px;
}

.community-mini-user,
.community-activity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
}

.community-mini-user > a {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.community-mini-user span,
.community-activity span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.community-mini-user strong,
.community-activity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .92rem;
}

.community-mini-user small,
.community-activity small {
    color: var(--community-muted);
    line-height: 1.35;
    font-size: .78rem;
}

.community-mini-user form {
    margin: 0;
}

.community-mini-user button,
.community-panel-link,
.community-discover-card button {
    min-height: 34px;
    border: 1px solid #d9c6fb;
    border-radius: var(--community-radius);
    background: #fff;
    color: var(--community-accent);
    padding: 7px 11px;
    font-weight: 800;
    text-decoration: none;
}

.community-mini-user button:hover,
.community-panel-link:hover,
.community-discover-card button:hover {
    background: var(--community-accent);
    border-color: var(--community-accent);
    color: #fff;
}

.community-panel-link {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
}

.community-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    aspect-ratio: 1;
    border-radius: 50%;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid #fff;
    background: linear-gradient(135deg, #eadcff, #f8f1ff);
    color: var(--community-accent-dark);
    font-weight: 900;
    font-size: .9rem;
    box-shadow: 0 5px 12px rgba(77, 40, 117, .12);
}

.community-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-avatar.has-image .community-avatar__fallback {
    display: none;
}

.community-avatar__fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.community-avatar--small {
    width: 34px;
    height: 34px;
}

.community-avatar--tiny {
    width: 36px;
    height: 36px;
    font-size: .78rem;
}

.community-book-thumb {
    height: 48px;
    aspect-ratio: 3 / 4;
    border-radius: 5px;
    border: 0;
    background: var(--community-accent-soft);
    color: var(--community-accent);
}

.community-composer {
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(116, 48, 199, .055), transparent 38%),
        var(--community-surface);
}

.community-composer__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.community-composer__field {
    position: relative;
    min-width: 0;
}

.community-composer textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 1px solid var(--community-line);
    border-radius: 16px;
    padding: 14px;
    outline: none;
    color: var(--community-text);
    background: rgba(255, 255, 255, .88);
    line-height: 1.55;
}

.community-composer__field p {
    margin: 7px 0 0;
    color: var(--community-muted);
    font-size: .82rem;
    font-weight: 700;
}

.community-mention-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 25;
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    background: #fff;
    box-shadow: var(--community-shadow);
    padding: 8px;
}

.community-mention-box p {
    margin: 0;
    padding: 10px;
}

.community-mention-box button {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: var(--community-radius);
    background: transparent;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    padding: 8px;
    text-align: left;
}

.community-mention-box button:hover {
    background: var(--community-surface-soft);
}

.community-mention-box button > span {
    width: 36px;
    aspect-ratio: 3 / 4;
    grid-row: span 2;
    border-radius: 5px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--community-accent-soft);
    color: var(--community-accent);
}

.community-mention-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-mention-box strong,
.community-mention-box small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-mention-box small {
    color: var(--community-muted);
}

.community-composer textarea:focus,
.community-composer input:focus,
.community-comment-form input:focus,
.community-reply-form input:focus,
.community-panel-search:focus-within,
.community-search:focus-within {
    border-color: #c6a7fa;
    box-shadow: 0 0 0 4px rgba(116, 48, 199, .10);
}

.community-composer label {
    min-width: 0;
}

.community-composer label span {
    display: block;
    margin-bottom: 6px;
    color: var(--community-muted);
    font-size: .78rem;
    font-weight: 800;
}

.community-composer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
}

.community-file-button {
    min-height: 42px;
    border: 1px solid var(--community-line);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--community-muted);
    font-weight: 800;
    cursor: pointer;
}

.community-file-button input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.community-composer__actions button,
.community-login-card a {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--community-accent);
    color: #fff;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(116, 48, 199, .22);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.community-composer__actions button:hover,
.community-login-card a:hover {
    background: var(--community-accent-dark);
    box-shadow: 0 15px 28px rgba(84, 33, 147, .27);
    transform: translateY(-1px);
}

.community-login-card {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.community-login-card h2 {
    margin: 0 0 4px;
    font: 800 1.1rem "DM Sans", Arial, sans-serif;
}

.community-login-card p {
    margin: 0;
    color: var(--community-muted);
}

.community-followed-books {
    padding: 16px;
}

.community-followed-books > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.community-followed-books a {
    min-width: 0;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    background: #fff;
}

.community-followed-books__cover {
    width: 42px;
    height: 56px;
    aspect-ratio: 3 / 4;
    border-radius: 5px;
    background: var(--community-surface-soft);
    color: var(--community-accent);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.community-followed-books__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-followed-books__meta {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.community-followed-books strong,
.community-followed-books small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-followed-books small {
    color: var(--community-muted);
    font-size: .76rem;
}

.community-feed {
    display: grid;
    gap: 16px;
}

.community-feed-status {
    border-radius: var(--community-radius);
    padding: 12px 14px;
    background: var(--community-accent-soft);
    color: var(--community-accent-dark);
    font-weight: 800;
}

.community-feed-status.is-error {
    background: #fff1f0;
    color: var(--community-danger);
}

.community-post {
    padding: 20px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(252, 250, 255, .96));
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.community-post:hover {
    border-color: #dac4fa;
    box-shadow: 0 18px 38px rgba(57, 34, 84, .10);
    transform: translateY(-2px);
}

.community-post__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.community-post__avatar {
    text-decoration: none;
}

.community-post__identity {
    min-width: 0;
}

.community-post__name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.community-post__name-row a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
    text-decoration: none;
}

.community-post__identity p {
    margin: 4px 0 0;
    color: var(--community-muted);
    font-size: .8rem;
    line-height: 1.45;
}

.community-post__identity p a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.community-post__identity p a:hover {
    color: var(--community-text);
}

.community-badge {
    color: var(--community-accent);
}

.community-post__menu {
    display: flex;
    gap: 4px;
}

.community-post__menu button {
    width: 34px;
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    background: rgba(116, 48, 199, .055);
    color: var(--community-muted);
}

.community-post__menu button:hover {
    background: var(--community-surface-soft);
    color: var(--community-accent);
}

.community-post__menu button[data-community-delete-post]:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.community-post__content {
    margin-top: 16px;
    line-height: 1.72;
    font-size: 1rem;
}

.community-post__content p {
    margin: 0;
    overflow-wrap: anywhere;
}

.community-tag {
    color: var(--community-accent);
    font-weight: 900;
}

.community-mention {
    display: inline-flex;
    border-radius: 999px;
    background: var(--community-accent-soft);
    color: var(--community-accent-dark);
    padding: 1px 7px;
    font-weight: 900;
}

.community-edit-form {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.community-edit-form textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    background: #fff;
    color: var(--community-text);
    padding: 13px 14px;
    line-height: 1.6;
    font: inherit;
}

.community-edit-form textarea:focus {
    outline: 3px solid var(--community-accent-soft);
    border-color: #b997f5;
}

.community-edit-form p {
    margin: -2px 0 0;
    color: var(--community-muted);
    font-size: .82rem;
}

.community-edit-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.community-edit-form__actions button {
    min-height: 36px;
    border: 0;
    border-radius: var(--community-radius);
    padding: 0 14px;
    font-weight: 900;
}

.community-edit-form__actions button[type="submit"] {
    background: var(--community-accent);
    color: #fff;
}

.community-edit-form__actions button[type="button"] {
    background: var(--community-surface-soft);
    color: var(--community-muted);
}

.community-book-card {
    margin-top: 14px;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    background: var(--community-surface-soft);
}

.community-book-card:hover {
    border-color: #cfb5fb;
}

.community-book-card img,
.community-book-card__placeholder {
    width: 58px;
    height: 77px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 5px;
    background: #fff;
    display: block;
}

.community-book-card__placeholder {
    display: grid;
    place-items: center;
    color: var(--community-accent);
}

.community-book-card span {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.community-book-card strong,
.community-book-card small,
.community-book-card em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-book-card small,
.community-book-card em {
    color: var(--community-muted);
    font-size: .86rem;
    font-style: normal;
}

.community-book-mentions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.community-book-mention {
    max-width: 100%;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    background: var(--community-surface-soft);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
}

.community-book-mention > i {
    color: var(--community-accent);
}

.community-book-mention span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.community-book-mention strong,
.community-book-mention small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-book-mention small {
    color: var(--community-muted);
    font-size: .78rem;
}

.community-post__media {
    margin: 16px 0 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--community-surface-soft);
    display: grid;
    place-items: center;
}

.community-post__media img {
    width: 100%;
    height: auto;
    max-height: min(680px, 78vh);
    object-fit: contain;
    display: block;
}

.community-post__footer {
    border-top: 1px solid var(--community-line);
    margin-top: 16px;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.community-post__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.community-action {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--community-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-weight: 800;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.community-action:hover,
.community-action.is-active {
    background: var(--community-accent-soft);
    color: var(--community-accent);
}

.community-action:hover {
    transform: translateY(-1px);
}

.community-action.is-active i {
    filter: drop-shadow(0 3px 5px rgba(116, 48, 199, .22));
}

.community-action--save {
    min-width: 38px;
    padding: 0;
    justify-content: center;
}

.community-inline-follow {
    margin: 0;
}

.community-inline-follow button {
    min-height: 34px;
    border: 1px solid #d9c6fb;
    border-radius: var(--community-radius);
    background: #fff;
    color: var(--community-accent);
    padding: 0 12px;
    font-weight: 900;
}

.community-inline-follow button.is-following {
    background: var(--community-accent-soft);
}

.community-comments {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.community-comment {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
}

.community-comment__avatar {
    text-decoration: none;
}

.community-comment__body {
    min-width: 0;
}

.community-comment__bubble {
    border-radius: 14px;
    background: #f7f4fb;
    padding: 10px 12px;
}

.community-comment__name {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--community-text);
    font-weight: 900;
    text-decoration: none;
}

.community-comment__bubble p {
    margin: 0;
    color: #322c3d;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.community-comment__meta {
    display: flex;
    gap: 10px;
    margin: 5px 0 0 4px;
    color: var(--community-muted);
    font-size: .76rem;
}

.community-comment__meta button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--community-accent);
    font-weight: 900;
}

.community-comment__replies {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid var(--community-line);
}

.community-comment-form,
.community-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.community-reply-form {
    margin-top: 8px;
}

.community-comment-form input,
.community-reply-form input {
    min-height: 40px;
    border: 1px solid var(--community-line);
    border-radius: 999px;
    padding: 0 14px;
    outline: none;
}

.community-comment-form button,
.community-reply-form button {
    width: 40px;
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    background: var(--community-accent);
    color: #fff;
}

.community-login-note {
    color: var(--community-accent);
    font-weight: 900;
    text-decoration: none;
}

.community-panel-search {
    min-height: 42px;
    border: 1px solid var(--community-line);
    border-radius: var(--community-radius);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    margin-bottom: 12px;
    background: var(--community-surface-soft);
}

.community-trends {
    display: grid;
    gap: 10px;
}

.community-trends a,
.community-book-trends a {
    display: grid;
    gap: 2px;
    text-decoration: none;
}

.community-trends strong {
    color: var(--community-accent);
}

.community-trends small {
    color: var(--community-muted);
}

.community-book-trends {
    border-top: 1px solid var(--community-line);
    margin-top: 14px;
    padding-top: 14px;
    display: grid;
    gap: 8px;
}

.community-book-trends a {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    color: var(--community-muted);
}

.community-book-trends span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-discover-card {
    background:
        radial-gradient(circle at right top, rgba(116, 48, 199, .14), transparent 34%),
        #fff;
}

.community-discover-card p {
    color: var(--community-muted);
    line-height: 1.55;
}

.community-empty,
.community-setup {
    padding: 34px 24px;
    text-align: center;
}

.community-empty i,
.community-setup i {
    width: 58px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--community-accent-soft);
    color: var(--community-accent);
    font-size: 1.35rem;
}

.community-empty h2,
.community-setup h2 {
    margin: 14px 0 8px;
    font: 800 1.35rem "DM Sans", Arial, sans-serif;
}

.community-empty p,
.community-setup p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--community-muted);
    line-height: 1.65;
}

.community-setup small {
    display: block;
    margin-top: 12px;
    color: var(--community-danger);
}

.community-load-more {
    min-height: 38px;
    display: none;
    place-items: center;
    grid-template-columns: repeat(3, 8px);
    justify-content: center;
    gap: 6px;
}

.community-load-more.is-loading {
    display: grid;
}

.community-load-more span {
    width: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--community-accent);
    animation: communityPulse .9s ease-in-out infinite;
}

.community-load-more span:nth-child(2) {
    animation-delay: .12s;
}

.community-load-more span:nth-child(3) {
    animation-delay: .24s;
}

.community-skeleton {
    min-height: 180px;
    border-radius: var(--community-radius);
    background: linear-gradient(90deg, #fff, #f0edf6, #fff);
    background-size: 200% 100%;
    animation: communityShimmer 1.2s ease-in-out infinite;
}

@keyframes communityPulse {
    0%,
    100% {
        transform: translateY(0);
        opacity: .45;
    }
    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes communityShimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

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

    .community-sidebar--right {
        grid-column: 1 / -1;
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    body {
        background: #fff;
    }

    .community-page {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 14px 0 52px;
        overflow-x: clip;
    }

    .community-top {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 0 0 12px;
        padding: 0 10px;
    }

    .community-eyebrow {
        display: none;
    }

    .community-top h1 {
        margin: 0;
        font-size: 1.65rem;
        line-height: 1.1;
    }

    .community-top p {
        font-size: .92rem;
        line-height: 1.45;
    }

    .community-search {
        min-height: 44px;
        border-radius: 12px;
        padding: 0 12px;
        box-shadow: none;
    }

    .community-search-results {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }

    .community-layout {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 10px;
        overflow-x: clip;
    }

    .community-sidebar {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .community-sidebar--left {
        padding: 0 10px;
    }

    .community-sidebar--left .community-panel:not(.community-panel--online),
    .community-sidebar--right,
    .community-followed-books {
        display: none;
    }

    .community-sidebar--left .community-panel--online {
        display: block;
        padding: 14px;
    }

    .community-panel--online h2 {
        margin-bottom: 8px;
    }

    .community-panel--online .community-online-count {
        margin-bottom: 10px;
    }

    .community-panel--online .community-mini-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .community-panel--online .community-mini-list::-webkit-scrollbar {
        display: none;
    }

    .community-panel--online .community-mini-user {
        min-width: max-content;
    }

    .community-panel--online .community-mini-user span {
        display: none;
    }

    .community-quick-nav {
        display: flex;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0 0 4px;
        scrollbar-width: none;
    }

    .community-quick-nav::-webkit-scrollbar {
        display: none;
    }

    .community-quick-nav button {
        display: none;
    }

    .community-quick-nav button[data-community-mode="for-you"],
    .community-quick-nav button[data-community-mode="following"],
    .community-quick-nav button[data-community-mode="discover"] {
        width: auto;
        min-height: 38px;
        flex: 0 0 auto;
        display: inline-flex;
        border: 1px solid var(--community-line);
        border-radius: 999px;
        background: #fff;
        color: var(--community-muted);
        padding: 0 14px;
        font-size: .88rem;
        white-space: nowrap;
        box-shadow: none;
    }

    .community-quick-nav button i {
        display: none;
    }

    .community-quick-nav button.is-active {
        border-color: var(--community-accent);
        background: var(--community-accent);
        color: #fff;
    }

    .community-feed-column {
        width: 100%;
        max-width: 100%;
        gap: 12px;
        overflow-x: clip;
    }

    .community-composer,
    .community-login-card,
    .community-feed-status,
    .community-empty {
        margin-inline: 10px;
    }

    .community-feed {
        gap: 12px;
    }

    .community-post {
        width: calc(100% - 20px);
        max-width: none;
        margin-inline: 10px;
        border-radius: 18px;
        box-shadow: 0 10px 24px rgba(53, 29, 82, .07);
    }

    .community-composer,
    .community-login-card,
    .community-empty {
        border-radius: 14px;
        box-shadow: none;
    }

    .community-composer {
        padding: 14px;
    }

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

    .community-composer__top > .community-avatar {
        display: grid;
        width: 38px;
    }

    .community-composer textarea {
        min-height: 72px;
        resize: none;
        padding: 12px;
        border-radius: 12px;
    }

    .community-composer__field p {
        display: none;
    }

    .community-composer__actions {
        justify-content: space-between;
        gap: 8px;
        margin-top: 8px;
    }

    .community-file-button,
    .community-composer__actions button {
        min-height: 38px;
        border-radius: 999px;
        box-shadow: none;
    }

    .community-post__footer,
    .community-login-card {
        align-items: stretch;
        flex-direction: column;
    }

    .community-post__actions {
        width: 100%;
        justify-content: space-between;
    }

    .community-inline-follow {
        display: none;
    }
}
@media (max-width: 560px) {
    .community-page {
        padding-top: 12px;
    }

    .community-top {
        padding-inline: 8px;
    }

    .community-sidebar--left {
        padding-inline: 8px;
    }

    .community-composer,
    .community-login-card,
    .community-feed-status,
    .community-empty {
        margin-inline: 8px;
    }

    .community-search {
        border-radius: 12px;
    }

    .community-post,
    .community-panel {
        padding: 12px;
    }

    .community-post {
        width: calc(100% - 16px);
        margin-inline: 8px;
        border-radius: 16px;
    }

    .community-post__header {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 9px;
    }

    .community-post__menu {
        grid-column: 2;
        justify-content: flex-end;
    }

    .community-post__content {
        margin-top: 10px;
        line-height: 1.6;
    }

    .community-book-card {
        margin-top: 10px;
        padding: 10px;
    }

    .community-post__media {
        margin-top: 10px;
        border-radius: 13px;
    }

    .community-post__footer {
        margin-top: 10px;
        padding-top: 10px;
    }

    .community-action {
        min-height: 34px;
        padding: 0 8px;
        font-size: .88rem;
    }

    .community-comment-form,
    .community-reply-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .community-comment-form input,
    .community-reply-form input {
        min-width: 0;
    }
}
