/* Connect and member profiles share card visuals; page and composer layouts stay scoped. */
#page-social, .connect-card-surface {
    --soc-bg: #F6FBFF;
    --soc-surface: #FFFFFF;
    --soc-alt: #F1F5F9;
    --soc-ink: #222222;
    --soc-ink-2: #475569;
    --soc-muted: #64748B;
    --soc-border: #E0E0E0;
    --soc-accent: #0174B1;
    --soc-on-accent: #FFFFFF;
    --soc-art: #EEF4F9;
    --soc-skeleton: #E5EAF0;
    --soc-book-badge-bg: #E6F6EC;
    --soc-book-badge-fg: #14532D;
    --soc-book-badge-border: #B7E2C6;
    --soc-audio-badge-bg: #E0F2FE;
    --soc-audio-badge-fg: #075985;
    --soc-audio-badge-border: #BAE6FD;
    --soc-watch-badge-bg: #F1EBFD;
    --soc-watch-badge-fg: #4C1D95;
    --soc-watch-badge-border: #D9CBF8;
}
#page-social {
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(120px + var(--topnav-inset-top, 0px)) 24px 64px;
    background: var(--soc-bg);
    color: var(--soc-ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.dark-mode :is(#page-social, .connect-card-surface), html.dark-mode :is(#page-social, .connect-card-surface) {
    --soc-bg: #0F1620;
    --soc-surface: #1B2330;
    --soc-alt: #2E3A4A;
    --soc-ink: #F1F5F9;
    --soc-ink-2: #CBD3DC;
    --soc-muted: #94A3B2;
    --soc-border: #2E3A4A;
    --soc-accent: #00B4FF;
    --soc-on-accent: #0F1620;
    --soc-art: #141C27;
    --soc-skeleton: #2E3A4A;
    --soc-book-badge-bg: rgb(74 222 128 / 14%);
    --soc-book-badge-fg: #A7F3C0;
    --soc-book-badge-border: rgb(74 222 128 / 32%);
    --soc-audio-badge-bg: rgb(56 189 248 / 14%);
    --soc-audio-badge-fg: #BAE6FD;
    --soc-audio-badge-border: rgb(56 189 248 / 32%);
    --soc-watch-badge-bg: rgb(167 139 250 / 16%);
    --soc-watch-badge-fg: #D4C6FD;
    --soc-watch-badge-border: rgb(167 139 250 / 36%);
}
#page-social *, #page-social *::before, #page-social *::after { box-sizing: border-box; }
#page-social :is(a, button, textarea, input, [tabindex]):focus-visible { outline: 3px solid var(--soc-accent); outline-offset: 3px; }
#page-social button, #page-social input, #page-social textarea { font: inherit; }
#page-social a { text-underline-offset: 3px; }
#page-social .social-content { width: 100%; max-width: 820px; margin: 0 auto; }
#page-social .social-header-section, #page-social .social-header-container { padding: 0; margin: 0; }
#page-social .social-header-content { text-align: left; }
#page-social .social-title { margin: 0; color: var(--soc-ink); font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
#page-social .social-subtitle { margin: 4px 0 0; color: var(--soc-ink-2); font-size: 16px; line-height: 1.5; }
#page-social .social-controls-section { margin-top: 16px; }
#page-social .social-feed-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--soc-border); border-radius: 10px; background: var(--soc-surface); }
#page-social .social-feed-tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--soc-ink-2); font-size: 15px; font-weight: 500; line-height: 1.2; cursor: pointer; }
#page-social .social-feed-tab.active { background: var(--soc-accent); color: var(--soc-on-accent); font-weight: 600; }
#page-social .social-feed-tab:not(.active):hover { background: var(--soc-alt); color: var(--soc-ink); }
#page-social .social-feed-section { margin-top: 16px; }
#page-social .social-compose-wrapper { margin-bottom: 16px; }
#page-social .social-compose-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--soc-border); border-radius: 14px; background: var(--soc-surface); box-shadow: 0 1px 2px rgb(2 6 23 / 5%); }
#page-social .social-compose-avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; overflow: hidden; border: 1px solid var(--soc-border); border-radius: 50%; background: var(--soc-alt); color: var(--soc-muted); font-size: 14px; font-weight: 600; }
#page-social .social-compose-avatar img { width: 100%; height: 100%; object-fit: cover; }
#page-social .social-compose-input-wrapper { flex: 1; min-width: 0; min-height: 44px; padding: 10px 16px; border: 1px solid var(--soc-border); border-radius: 999px; background: var(--soc-bg); color: var(--soc-muted); text-align: left; font-size: 15px; line-height: 1.5; cursor: text; }
#page-social .social-compose-input-wrapper:hover { border-color: var(--soc-accent); }
#page-social .social-compose-expanded { flex: 1; min-width: 0; }
#page-social .social-compose-textarea { display: block; width: 100%; min-height: 112px; resize: vertical; padding: 12px 14px; border: 1px solid var(--soc-accent); border-radius: 10px; background: var(--soc-bg); color: var(--soc-ink); font-size: 15px; line-height: 1.5; }
#page-social .social-compose-textarea::placeholder { color: var(--soc-muted); }
#page-social .social-compose-spoilers { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--soc-ink); cursor: pointer; }
#page-social .social-compose-spoilers input { width: 16px; height: 16px; accent-color: var(--soc-accent); }
#page-social .social-compose-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
#page-social .social-compose-counter { margin-right: auto; color: var(--soc-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
#page-social .social-compose-cancel, #page-social .social-compose-btn, :is(#page-social, .connect-card-surface) .social-feed-empty-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--soc-border); border-radius: 10px; background: var(--soc-surface); color: var(--soc-ink); font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer; }
#page-social .social-compose-btn, :is(#page-social, .connect-card-surface) .social-feed-empty-btn.primary { border-color: transparent; background: var(--soc-accent); color: var(--soc-on-accent); }
#page-social :is(.social-compose-btn, .social-compose-cancel):hover, :is(#page-social, .connect-card-surface) .social-feed-empty-btn:hover { filter: brightness(.95); }
#page-social button:disabled { opacity: .5; cursor: default; }
#page-social .social-feed-posts { display: flex; flex-direction: column; gap: 12px; }
#page-social .social-feed-post { min-width: 0; scroll-margin-top: var(--topnav-controls-top, 100px); }
#page-social .social-feed-post.highlighted { border-radius: 14px; outline: 3px solid var(--soc-accent); outline-offset: 3px; }

/* Own-content menu (OwnContentMenu.razor): the author's kebab and delete confirmation on their own post
   or comment. Base metrics and colours mirror BlockReportMenu's .brm-* rules so both kebabs match on
   the book page; the Connect and profile restyle extends the .brm-* rules above. No overflow: hidden
   on the popover, so page focus rings with an outer offset stay visible. */
.ocm-container, .ocm-overlay { --ocm-danger: #dc2626; --ocm-danger-hover: #b91c1c; --ocm-danger-text: #b91c1c; }
:is(body, html).dark-mode :is(.ocm-container, .ocm-overlay) { --ocm-danger-text: #fca5a5; }
.ocm-container { position: relative; display: inline-block; }
.ocm-trigger { display: inline-flex; align-items: center; justify-content: center; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary, #999); cursor: pointer; transition: background .15s, color .15s; }
.ocm-trigger:hover, .ocm-trigger[aria-expanded="true"] { background: var(--bg-hover, #f0f0f0); color: var(--text-color, #333); }
:is(body, html).dark-mode .ocm-trigger:is(:hover, [aria-expanded="true"]) { background: var(--bg-hover, #2a2a2a); color: var(--text-color, #e0e0e0); }
/* cursor: pointer lets iOS deliver the tap that closes the menu or cancels the dialog. */
.ocm-backdrop { position: fixed; inset: 0; z-index: 99; background: transparent; cursor: pointer; }
/* The scroll margins keep an opened menu clear of the fixed top bar and the phone's bottom nav
   (OwnContentMenu scrolls it into view with unqbdRevealElement). */
.ocm-popover { position: absolute; top: 100%; right: 0; z-index: 100; min-width: 160px; padding: 4px; border: 1px solid var(--border-color, #ddd); border-radius: 8px; background: var(--bg-secondary, #fff); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); scroll-margin-top: var(--topnav-controls-top, 100px); scroll-margin-bottom: calc(var(--bottom-nav-height, 52px) + 24px + env(safe-area-inset-bottom, 0px)); }
/* Phones: the "Get the app" bar can sit on top of the bottom nav, so a revealed menu leaves room for it too. */
@media (max-width: 768px) { .ocm-popover { scroll-margin-bottom: calc(var(--bottom-nav-height, 52px) + 80px + env(safe-area-inset-bottom, 0px)); } }
:is(body, html).dark-mode .ocm-popover { border-color: var(--border-color, #333); background: var(--bg-secondary, #1e1e1e); }
.ocm-item { display: flex; align-items: center; gap: .5rem; width: 100%; padding: 10px 14px; border: 0; border-radius: 6px; background: transparent; color: var(--ocm-danger-text); font-size: .9rem; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; transition: background .15s; }
.ocm-item:hover { background: var(--bg-hover, #f3f3f3); }
:is(body, html).dark-mode .ocm-item:hover { background: var(--bg-hover, #2a2a2a); }
:is(.ocm-trigger, .ocm-item, .ocm-btn):focus-visible { outline: 2px solid var(--primary-color, #00b4ff); outline-offset: 2px; }
/* Above the fixed top nav (1002), the audio mini player (1001) and the bottom nav (1000), like the support modal. */
.ocm-overlay { position: fixed; inset: 0; z-index: 10010; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, .5); cursor: pointer; }
.ocm-dialog { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 420px; box-sizing: border-box; padding: 1.5rem; border: 1px solid var(--border-color, rgba(2, 6, 23, .08)); border-radius: 12px; background: var(--card-bg, #fff); color: var(--text-color, #222); box-shadow: 0 10px 25px rgba(0, 0, 0, .2); cursor: auto; }
.ocm-dialog:focus { outline: none; }
.ocm-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--text-color, #222); }
.ocm-body { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--text-color-muted, #64748b); }
.ocm-error { margin: 0; font-size: .875rem; font-weight: 600; line-height: 1.5; color: var(--ocm-danger-text); }
/* app.css sets body.dark-mode p to the plain text colour; restate both paragraphs above it. */
:is(body, html).dark-mode .ocm-body { color: var(--text-color-muted, #9ca3af); }
:is(body, html).dark-mode .ocm-error { color: var(--ocm-danger-text); }
.ocm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding-top: .25rem; }
.ocm-btn { min-height: 40px; padding: .5rem 1.25rem; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.ocm-btn:disabled { opacity: .6; cursor: not-allowed; }
.ocm-btn-cancel { border-color: var(--divider-color, rgba(2, 6, 23, .12)); background: transparent; color: var(--text-color, #222); }
.ocm-btn-cancel:hover:not(:disabled) { background: var(--divider-color, rgba(2, 6, 23, .12)); }
.ocm-btn-delete { background: var(--ocm-danger); color: #fff; }
.ocm-btn-delete:hover:not(:disabled) { background: var(--ocm-danger-hover); }

/* Reuse the current post card on Connect and member profiles. */
:is(#page-social, .connect-card-surface) .social-post-card { padding: 0; border: 1px solid var(--soc-border); border-radius: 14px; background: var(--soc-surface); color: var(--soc-ink); box-shadow: 0 1px 2px rgb(2 6 23 / 5%); }
:is(#page-social, .connect-card-surface) .social-post-card:hover { box-shadow: 0 1px 2px rgb(2 6 23 / 5%); }
:is(#page-social, .connect-card-surface) .social-post-header { gap: 12px; margin: 0; padding: 12px 8px 8px 16px; }
:is(#page-social, .connect-card-surface) .social-avatar { width: 40px; height: 40px; border: 1px solid var(--soc-border); background: var(--soc-alt); color: var(--soc-ink-2); font-size: 14px; }
:is(#page-social, .connect-card-surface) .social-post-meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
:is(#page-social, .connect-card-surface) .social-post-author { color: var(--soc-ink); font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
:is(#page-social, .connect-card-surface) .social-post-time { color: var(--soc-muted); font-size: 13px; line-height: 1.3; }
:is(#page-social, .connect-card-surface) :is(.brm-trigger, .ocm-trigger) { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--soc-muted); }
:is(#page-social, .connect-card-surface) :is(.brm-trigger, .ocm-trigger):hover, :is(#page-social, .connect-card-surface) .ocm-trigger[aria-expanded="true"] { background: var(--soc-alt); }
:is(#page-social, .connect-card-surface) :is(.brm-popover, .ocm-popover) { border-color: var(--soc-border); background: var(--soc-surface); }
:is(#page-social, .connect-card-surface) .brm-item { min-height: 44px; color: var(--soc-ink); }
:is(#page-social, .connect-card-surface) .ocm-item { min-height: 44px; }
:is(#page-social, .connect-card-surface) :is(.brm-item, .ocm-item):hover { background: var(--soc-alt); }
/* #page-social resets button fonts and rings every focused [tabindex]; the delete dialog keeps its own
   type scale, and the dialog box itself (focused only while "Deleting...") draws no ring. */
:is(#page-social, .connect-card-surface) :is(.ocm-btn, .ocm-item) { font-size: .9rem; font-weight: 600; line-height: 1.3; }
:is(#page-social, .connect-card-surface) .ocm-dialog { border-color: var(--soc-border); background: var(--soc-surface); color: var(--soc-ink); }
:is(#page-social, .connect-card-surface) .ocm-title { color: var(--soc-ink); }
:is(#page-social, .connect-card-surface) .ocm-body { color: var(--soc-muted); }
:is(#page-social, .connect-card-surface) .ocm-dialog:focus-visible { outline: none; }
:is(#page-social, .connect-card-surface) .social-post-content { margin: 0; padding: 0 16px 12px; color: var(--soc-ink); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
:is(#page-social, .connect-card-surface) .social-post-usertext { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--soc-ink); font-size: 15px; line-height: 1.55; }
:is(#page-social, .connect-card-surface) .social-post-spoiler { padding: 12px; border: 1px solid var(--soc-border); border-radius: 10px; background: var(--soc-alt); }
:is(#page-social, .connect-card-surface) .social-post-spoiler p { margin: 0; }
:is(#page-social, .connect-card-surface) .social-post-spoiler .social-action-btn { min-height: 44px; border: 1px solid var(--soc-border); margin: 8px 0; }
:is(#page-social, .connect-card-surface) .social-post-announcement { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
:is(#page-social, .connect-card-surface) .social-announcement-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%; padding: 5px 12px 5px 10px; border: 1px solid transparent; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; }
:is(#page-social, .connect-card-surface) .social-announcement-badge.book { background: var(--soc-book-badge-bg); color: var(--soc-book-badge-fg); border-color: var(--soc-book-badge-border); }
:is(#page-social, .connect-card-surface) .social-announcement-badge.audio { background: var(--soc-audio-badge-bg); color: var(--soc-audio-badge-fg); border-color: var(--soc-audio-badge-border); }
:is(#page-social, .connect-card-surface) .social-announcement-badge.watch { background: var(--soc-watch-badge-bg); color: var(--soc-watch-badge-fg); border-color: var(--soc-watch-badge-border); }
:is(#page-social, .connect-card-surface) .social-announcement-badge svg { flex: none; width: 16px; height: 16px; }
:is(#page-social, .connect-card-surface) .social-post-book-row.announcement, :is(#page-social, .connect-card-surface) .social-post-show-row { align-items: flex-start; gap: 20px; margin: 8px 0 4px; padding: 0; border: 0; border-radius: 0; background: transparent; }
:is(#page-social, .connect-card-surface) .social-post-book-row { gap: 12px; align-items: center; }
:is(#page-social, .connect-card-surface) .social-post-cover { display: block; flex: none; width: 72px; max-width: 30%; }
:is(#page-social, .connect-card-surface) .social-post-cover img, :is(#page-social, .connect-card-surface) .social-post-cover.small img, :is(#page-social, .connect-card-surface) .social-post-cover.large img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 4px; background: var(--soc-art); box-shadow: 0 2px 8px rgb(2 6 23 / 6%); }
:is(#page-social, .connect-card-surface) .announcement .social-post-cover { width: 120px; max-width: none; }
:is(#page-social, .connect-card-surface) .announcement .social-post-cover img { border-radius: 8px; box-shadow: 0 4px 12px rgb(2 6 23 / 12%); }
:is(#page-social, .connect-card-surface) .social-post-cover:hover img, :is(#page-social, .connect-card-surface) .social-post-show-art:hover img { transform: none; }
:is(#page-social, .connect-card-surface) .social-announcement-details { flex: 1; min-width: 0; gap: 4px; }
:is(#page-social, .connect-card-surface) .social-announcement-title { margin: 0; color: var(--soc-ink); font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
:is(#page-social, .connect-card-surface) .social-announcement-title a { color: var(--soc-ink); }
:is(#page-social, .connect-card-surface) .social-announcement-author { margin: 0; color: var(--soc-ink-2); font-size: 15px; font-weight: 500; line-height: 1.4; }
:is(#page-social, .connect-card-surface) .social-announcement-desc { display: -webkit-box; -webkit-line-clamp: 4; margin: 4px 0 0; color: var(--soc-ink); font-size: 15px; line-height: 1.5; }
:is(#page-social, .connect-card-surface) .social-post-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
:is(#page-social, .connect-card-surface) .social-cta-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--soc-accent); color: var(--soc-on-accent); font-size: 15px; font-weight: 600; line-height: 1.3; box-shadow: none; }
:is(#page-social, .connect-card-surface) .social-cta-btn:hover { filter: brightness(.95); transform: none; box-shadow: none; }
:is(#page-social, .connect-card-surface) .social-post-show-row { flex-wrap: wrap; }
:is(#page-social, .connect-card-surface) .social-post-show-art { width: 300px; max-width: 100%; }
:is(#page-social, .connect-card-surface) .social-post-show-art img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 10px; background: var(--soc-art); box-shadow: 0 4px 12px rgb(2 6 23 / 12%); }
:is(#page-social, .connect-card-surface) .social-post-show-row .social-announcement-details { min-width: min(220px, 100%); }
:is(#page-social, .connect-card-surface) .reading-book { padding: 12px; gap: 16px; border: 1px solid var(--soc-border); border-radius: 10px; }
:is(#page-social, .connect-card-surface) .social-reading-details { min-width: 0; }
:is(#page-social, .connect-card-surface) .social-reading-title { margin: 0; color: var(--soc-ink); font-size: 17px; font-weight: 700; line-height: 1.3; }
:is(#page-social, .connect-card-surface) .social-reading-title a { color: inherit; }
:is(#page-social, .connect-card-surface) .social-reading-author { margin: 4px 0 0; color: var(--soc-ink-2); font-size: 14px; line-height: 1.4; }
:is(#page-social, .connect-card-surface) .social-post-activity { gap: 8px; margin-bottom: 8px; }
:is(#page-social, .connect-card-surface) .social-activity-icon { width: 24px; height: 24px; border-radius: 0; background: transparent; color: var(--soc-muted); }
:is(#page-social, .connect-card-surface) .social-activity-icon svg { width: 18px; height: 18px; }
:is(#page-social, .connect-card-surface) .social-activity-text { color: var(--soc-ink-2); font-size: 14px; line-height: 1.5; }
:is(#page-social, .connect-card-surface) .social-book-link { color: var(--soc-accent); font-weight: 600; }
:is(#page-social, .connect-card-surface) .social-post-review, :is(#page-social, .connect-card-surface) .social-post-comment-text { padding: 12px; background: var(--soc-bg); color: var(--soc-ink); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
:is(#page-social, .connect-card-surface) .social-post-actions { display: flex; gap: 0; margin: 0; padding: 4px 8px; border-top: 1px solid var(--soc-border); }
:is(#page-social, .connect-card-surface) .social-action-btn { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--soc-ink-2); font-size: 13px; font-weight: 500; line-height: 1.3; }
:is(#page-social, .connect-card-surface) .social-action-btn:hover { background: var(--soc-alt); color: var(--soc-accent); }
:is(#page-social, .connect-card-surface) .social-action-btn.liked { color: var(--soc-accent); }
:is(#page-social, .connect-card-surface) .social-action-btn svg { flex: none; width: 18px; height: 18px; }
:is(#page-social, .connect-card-surface) .social-action-btn .action-count { font-size: inherit; }
:is(#page-social, .connect-card-surface) .social-post-comments { padding: 12px 16px; border-top: 1px solid var(--soc-border); background: transparent; }
:is(#page-social, .connect-card-surface) .social-comment-form { display: flex; gap: 8px; align-items: center; }
:is(#page-social, .connect-card-surface) .social-comment-input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--soc-border); border-radius: 10px; background: var(--soc-bg); color: var(--soc-ink); font-size: 14px; }
:is(#page-social, .connect-card-surface) .social-comment-input::placeholder { color: var(--soc-muted); }
/* Outside #page-social nothing rings the comment box, and the card's own :focus rule removes the outline;
   deleting a member's last comment moves focus here, so keyboard users need to see it. */
.connect-card-surface .social-comment-input:focus-visible { outline: 3px solid var(--soc-accent); outline-offset: 3px; }
:is(#page-social, .connect-card-surface) .social-comment-submit { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--soc-accent); color: var(--soc-on-accent); }
:is(#page-social, .connect-card-surface) .social-comment { gap: 8px; padding: 12px 0 0; border: 0; background: transparent; }
:is(#page-social, .connect-card-surface) .social-comment-content { min-width: 0; background: transparent; color: var(--soc-ink); }
:is(#page-social, .connect-card-surface) .social-comment-author { color: var(--soc-ink); font-size: 14px; }
:is(#page-social, .connect-card-surface) .social-comment-text { color: var(--soc-ink-2); overflow-wrap: anywhere; }
:is(#page-social, .connect-card-surface) .social-comment-time { color: var(--soc-muted); font-size: 12px; }
:is(#page-social, .connect-card-surface) .social-comment-avatar { width: 32px; height: 32px; background: var(--soc-alt); color: var(--soc-muted); }
:is(#page-social, .connect-card-surface) .social-comment.highlighted { outline: 2px solid var(--soc-accent); outline-offset: 2px; border-radius: 8px; }

/* Real data states. Failed pagination retains the loaded cards and its offset. */
#page-social .social-feed-empty, :is(#page-social, .connect-card-surface) .social-feed-error { padding: 28px; border: 1px solid var(--soc-border); border-radius: 14px; background: var(--soc-surface); text-align: left; }
#page-social .social-feed-empty-icon { margin-bottom: 12px; }
#page-social .social-feed-empty-icon i, :is(#page-social, .connect-card-surface) .social-feed-error > i { color: var(--soc-muted); font-size: 32px; }
#page-social .social-feed-empty-title, :is(#page-social, .connect-card-surface) .social-feed-error h2 { margin: 12px 0 0; color: var(--soc-ink); font-size: 20px; font-weight: 700; line-height: 1.3; }
#page-social .social-feed-empty-description, :is(#page-social, .connect-card-surface) :is(.social-feed-error, .social-feed-retry) p { margin: 8px 0 20px; color: var(--soc-ink-2); font-size: 15px; line-height: 1.5; }
#page-social .social-feed-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#page-social .social-feed-empty-suggestions { margin-top: 20px; }
:is(#page-social, .connect-card-surface) .social-feed-retry { margin-top: 16px; padding: 16px; border: 1px solid var(--soc-border); border-radius: 10px; background: var(--soc-surface); }
#page-social .social-feed-loading-more { display: flex; justify-content: center; gap: 8px; padding: 20px 0; color: var(--soc-muted); font-size: 14px; }
#page-social .social-feed-end { display: flex; align-items: center; gap: 12px; padding: 24px 0; }
#page-social .social-feed-end-line { flex: 1; height: 1px; background: var(--soc-border); }
#page-social .social-feed-end-text { color: var(--soc-muted); font-size: 13px; }
#page-social .social-feed-skeletons { display: grid; gap: 12px; }
#page-social .social-feed-skeleton { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--soc-border); border-radius: 14px; background: var(--soc-surface); }
#page-social .social-feed-skeleton span { display: block; height: 14px; width: 90%; border-radius: 4px; background: var(--soc-skeleton); }
#page-social .social-feed-skeleton > span:nth-child(3) { width: 70%; }
#page-social .social-feed-skeleton > span:last-child { width: 100%; height: 44px; margin-top: 8px; }
#page-social .social-skeleton-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
#page-social .social-skeleton-heading > span { flex: none; width: 40px; height: 40px; border-radius: 50%; }
#page-social .social-skeleton-heading > div { flex: 1; display: grid; gap: 8px; }
#page-social .social-skeleton-heading > div span { width: 40%; }
#page-social .social-skeleton-heading > div span:last-child { width: 24%; height: 12px; }
.social-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.connect-page-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 70vh; padding: calc(120px + var(--topnav-inset-top, 0px)) 24px 64px; background: #F6FBFF; color: #64748B; font: 15px/1.5 'Inter', system-ui, sans-serif; }
body.dark-mode .connect-page-loading { background: #0F1620; color: #94A3B2; }
.connect-page-loading-spinner, #page-social .social-feed-spinner { width: 32px; height: 32px; border: 3px solid #CBD3DC; border-top-color: #0174B1; border-radius: 50%; animation: social-spin .8s linear infinite; }
#page-social .social-feed-spinner.small { width: 20px; height: 20px; border-top-color: var(--soc-accent); }
@keyframes social-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
    #page-social { padding: calc(104px + var(--topnav-inset-top, 0px)) 16px calc(112px + env(safe-area-inset-bottom, 0px)); }
    #page-social .social-title { font-size: 28px; }
    :is(#page-social, .connect-card-surface) .social-post-cover { width: 64px; }
    :is(#page-social, .connect-card-surface) .announcement .social-post-cover { width: 104px; }
    :is(#page-social, .connect-card-surface) .social-post-book-row.announcement { gap: 16px; }
    :is(#page-social, .connect-card-surface) .social-announcement-title { font-size: 18px; }
    #page-social .social-feed-empty, :is(#page-social, .connect-card-surface) .social-feed-error { padding: 20px; }
    :is(#page-social, .connect-card-surface) .social-post-show-row { flex-direction: column; align-items: stretch; gap: 16px; }
    :is(#page-social, .connect-card-surface) .social-post-show-art { width: 100%; max-width: none; }
}
@media (max-width: 360px) {
    :is(#page-social, .connect-card-surface) .social-post-book-row.announcement { flex-wrap: wrap; }
    :is(#page-social, .connect-card-surface) .social-post-book-row.announcement .social-announcement-details { flex-basis: 140px; }
    :is(#page-social, .connect-card-surface) .social-action-btn { gap: 4px; font-size: 12px; }
    :is(#page-social, .connect-card-surface) .social-action-btn svg { width: 16px; height: 16px; }
    #page-social .social-compose-actions { gap: 6px; }
    #page-social .social-compose-cancel, #page-social .social-compose-btn { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    #page-social *, #page-social *::before, #page-social *::after, .connect-page-loading-spinner { animation: none !important; transition: none !important; }
}
