/* Community routes share the homepage palette. Loaded after the legacy page styles. */
body.portal-page.portal-community-theme :is(.forum-page, .pm) {
    color-scheme: dark;
    color: var(--portal-text);
    font-family: var(--font);
    --forum-ink: var(--portal-text);
    --forum-muted: var(--portal-muted);
    --forum-accent: var(--portal-accent);
    --forum-line: var(--portal-border);
    --forum-soft: var(--portal-raised);
    --tone: var(--portal-accent);
    --tone-bg: #f5a53b14;
    --pm-ink: var(--portal-text);
    --pm-muted: var(--portal-muted);
    --pm-line: var(--portal-border);
    --pm-cyan: var(--portal-accent);
    --pm-soft: var(--portal-raised);
}
body.portal-page.portal-community-theme :is(.forum-page, .pm) :is(h1, h2, h3, .forum-stats strong) {
    font-family: var(--font);
    font-weight: 700;
    color: var(--portal-text);
}
body.portal-page.portal-community-theme :is(.forum-page, .pm) :is(button, input, select, textarea) { font-family: var(--font); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) :focus-visible {
    outline: 2px solid var(--portal-accent);
    outline-offset: 3px;
}

/* Forum overview, sections, discussions and posts. */
body.portal-page.portal-community-theme .forum-page :is(.forum-hero, .forum-card, .forum-section-card, .forum-topic-list, .forum-post, .forum-side-card, .forum-admin-panel, .forum-admin-jumps) {
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: var(--portal-panel) !important;
    color: var(--portal-text) !important;
    box-shadow: none;
}
body.portal-page.portal-community-theme .forum-page .forum-hero {
    background: radial-gradient(ellipse at 100% 0, #f5a53b13, transparent 60%), var(--portal-panel) !important;
}
body.portal-page.portal-community-theme .forum-page .forum-hero-art::before {
    content: "";
    position: absolute;
    width: 176px;
    height: 176px;
    left: 31px;
    top: 3px;
    border: 1px solid #f5a53b40;
    border-radius: 50%;
    box-shadow: 0 0 0 22px #f5a53b05, inset 0 0 0 22px #f5a53b05;
}
body.portal-page.portal-community-theme .forum-page .forum-hero-art::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    left: 64px;
    top: 36px;
    background: linear-gradient(var(--portal-accent), var(--portal-accent)) center/1px 100% no-repeat, linear-gradient(90deg, var(--portal-accent), var(--portal-accent)) center/100% 1px no-repeat;
    opacity: .6;
}
body.portal-page.portal-community-theme .forum-page .forum-art-dot { display: none; }
body.portal-page.portal-community-theme .forum-page .forum-art-caption { color: var(--portal-muted); transform: none; }
body.portal-page.portal-community-theme .forum-page .forum-eyebrow { color: var(--portal-accent); font-weight: 600; }
body.portal-page.portal-community-theme .forum-page .forum-eyebrow > span { background: var(--portal-accent); box-shadow: 0 0 0 4px #f5a53b12; }
body.portal-page.portal-community-theme .forum-page :is(.forum-hero-copy > p, .forum-page-heading > div > p, .forum-section-card header p, .forum-hero-actions > span, .forum-side-card > p, .forum-side-card > small, .forum-small-label, .forum-rules-list li, .forum-side-note, .forum-sidebar-signature, .forum-category-copy > span, .forum-category-count > span, .forum-topic-meta, .forum-topic-replies > span, .forum-topic-last, .forum-topic-last > span, .forum-post-topline, .forum-post-topline > a, .forum-discussion-meta, .forum-locked p, .forum-field-help, .forum-field-hint, .forum-form-actions > span, .forum-moderation-hint, .forum-search-summary, .forum-compose-category > div > span, .forum-author-topic-owner, .forum-author-counts dt, .forum-author-rating-label, .forum-admin-summary-title small, .forum-admin-child-heading > span) { color: var(--portal-muted) !important; }
body.portal-page.portal-community-theme .forum-page :is(.forum-stats strong, .forum-category-count strong, .forum-topic-replies strong, .forum-author-counts dd, .forum-switch-row strong, .forum-admin-summary-title, .forum-file-download strong, .forum-upload-preview-caption > strong, .forum-attach-panel > button b, .forum-existing-files h3) { color: var(--portal-text); }
body.portal-page.portal-community-theme .forum-page :is(.forum-breadcrumbs, .forum-breadcrumbs a, .forum-breadcrumbs > span[aria-hidden]) { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page :is(.forum-breadcrumbs a:hover, .forum-topic-copy h3 a:hover, .forum-category-copy strong:hover, .forum-topic-meta a, .forum-text-link, .forum-section-footer, .forum-compose-category > a, .forum-move-field .icon, .forum-file-download > svg, .forum-existing-file > a, .forum-attachment figcaption > a, .forum-author-rating > strong, .forum-rules-list li::before, .forum-side-heading .forum-icon, .forum-locked > .forum-icon) { color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page :is(.forum-section-card > header, .forum-subsections > .forum-card-heading, .forum-post-author, .forum-switch-row, .forum-admin-child > summary, .forum-info-note) {
    border-color: var(--portal-border) !important;
    background: var(--portal-raised) !important;
    color: var(--portal-muted) !important;
}
body.portal-page.portal-community-theme .forum-page :is(.forum-section-heading, .forum-card-heading) { background: transparent !important; }
body.portal-page.portal-community-theme .forum-page :is(.forum-category-row, .forum-topic-row) {
    background: var(--portal-panel) !important;
    border-color: var(--portal-border) !important;
    color: var(--portal-text) !important;
}
body.portal-page.portal-community-theme .forum-page :is(.forum-category-row:hover, .forum-topic-row:hover) { background: var(--portal-raised) !important; }
body.portal-page.portal-community-theme .forum-page .forum-topic-row-rules { background: #f5a53b08 !important; }
body.portal-page.portal-community-theme .forum-page :is(.forum-section-footer, .forum-small-label, .forum-post-actions, .forum-author-rating, .forum-author-counts, .forum-compose-category, .forum-side-note, .forum-seo-details, .forum-admin-details[open] > summary, .forum-admin-child, .forum-admin-child-heading, .forum-moderation-row) { border-color: var(--portal-border); }
body.portal-page.portal-community-theme .forum-page :is(.forum-category-arrow, .forum-topic-mark, .forum-details-chevron) { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page :is(.forum-icon-tile, .forum-topic-mark.is-rules, .forum-category-icon, .forum-icon-preview) {
    --tone: var(--portal-accent);
    --tone-bg: #f5a53b14;
    background: #f5a53b14 !important;
    border-color: #f5a53b30 !important;
    color: var(--portal-accent) !important;
    border-radius: 10px;
}
body.portal-page.portal-community-theme .forum-page :is(.forum-count-label, .forum-tag, .forum-post-author .forum-author-role) { background: #f5a53b14; color: var(--portal-accent); border-radius: 6px; }
body.portal-page.portal-community-theme .forum-page .forum-tag-muted { background: var(--portal-raised); color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .forum-tag-warning { background: #f5a53b20; color: #ffc56e; }
body.portal-page.portal-community-theme .forum-page .forum-post-hidden { border-color: #9a7139 !important; }
body.portal-page.portal-community-theme .forum-page .forum-avatar { background: var(--portal-raised); border-color: var(--portal-border); color: var(--portal-accent); box-shadow: none; }
body.portal-page.portal-community-theme .forum-page .forum-avatar-admin { background: #f5a53b18; color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page .forum-inline-avatar { border-color: var(--portal-border); }
body.portal-page.portal-community-theme .forum-page .forum-author-level { background: transparent !important; color: var(--portal-muted) !important; }
body.portal-page.portal-community-theme .forum-page .forum-author-stars svg { fill: #4d525d; }
body.portal-page.portal-community-theme .forum-page .forum-author-stars svg.is-earned { fill: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page .forum-author-counts .forum-icon { color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page :is(.forum-post-author a.forum-author-name:hover, .forum-admin-summary-title .forum-icon, .forum-existing-file-icon) { color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page :is(.forum-heading-count, .forum-upload-preview-media) { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .forum-post-actions > a,
body.portal-page.portal-community-theme .forum-page .forum-post-actions > form > button { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .forum-post-actions > a:hover,
body.portal-page.portal-community-theme .forum-page .forum-post-actions > form > button:hover { color: var(--portal-accent); }

/* Forms and their rich-text controls keep the same surface and focus treatment. */
body.portal-page.portal-community-theme .forum-page .forum-button {
    border-radius: 8px;
    background: var(--portal-accent);
    border-color: var(--portal-accent);
    color: #14171c !important;
    font-weight: 700;
    box-shadow: none;
}
body.portal-page.portal-community-theme .forum-page .forum-button:hover { background: var(--portal-accent-hover); border-color: var(--portal-accent-hover); box-shadow: none; }
body.portal-page.portal-community-theme .forum-page .forum-button-soft { background: var(--portal-raised); border-color: var(--portal-border); color: var(--portal-text) !important; }
body.portal-page.portal-community-theme .forum-page .forum-button-soft:hover { background: #2b3039; border-color: #454b56; }
body.portal-page.portal-community-theme .forum-page .forum-form label:not(.forum-check):not(.forum-switch-row) { color: #bac0ca; font-weight: 600; }
body.portal-page.portal-community-theme .forum-page :is(.forum-check, .forum-switch-row small, .forum-seo-details > summary) { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page :is(.forum-check, .forum-switch-row) input[type="checkbox"] { accent-color: var(--portal-accent); }
body.portal-page.portal-community-theme :is(.forum-page, .pm, .pm-dialog) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]), select, textarea) {
    background: #15181d !important;
    color: var(--portal-text) !important;
    border-color: var(--portal-border) !important;
    border-radius: 10px;
    box-shadow: none;
}
body.portal-page.portal-community-theme :is(.forum-page, .pm, .pm-dialog) :is(input, select, textarea):focus-visible { outline-color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page .forum-form :is(input, select, textarea):focus { outline: 2px solid #f5a53b70; outline-offset: 1px; border-color: var(--portal-accent) !important; }
body.portal-page.portal-community-theme .forum-page .forum-form [aria-invalid="true"] { border-color: #e38f92 !important; }
body.portal-page.portal-community-theme .forum-page :is(.forum-field-error, .forum-editor-footer .is-error, .forum-editor-status.is-error) { color: #f2a0a8; }
body.portal-page.portal-community-theme .forum-page .forum-search { border-color: var(--portal-border); border-radius: 10px; background: var(--portal-panel); }
body.portal-page.portal-community-theme .forum-page .forum-search input { background: transparent !important; border: 0; border-radius: 0; }
body.portal-page.portal-community-theme .forum-page .forum-search:focus-within { outline: 2px solid #f5a53b70; outline-offset: 2px; }
body.portal-page.portal-community-theme .forum-page .forum-search > .forum-icon { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .forum-search-button { background: #f5a53b14; color: var(--portal-accent); border: 1px solid #f5a53b30; border-radius: 8px; }
body.portal-page.portal-community-theme .forum-page .forum-search-button:hover { background: #f5a53b24; }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-modes, .forum-editor-frame, .forum-attach-panel, .forum-upload-preview, .forum-existing-file, .forum-attachment) { background: var(--portal-panel); border-color: var(--portal-border); border-radius: 10px; box-shadow: none; }
body.portal-page.portal-community-theme .forum-page .forum-editor-frame:focus-within { border-color: var(--portal-accent); box-shadow: 0 0 0 2px #f5a53b20; }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-toolbar, .forum-editor-link, .forum-editor-code, .forum-editor-modes, .forum-upload-preview-media, .forum-attachment-image img) { background: var(--portal-raised); border-color: var(--portal-border); }
body.portal-page.portal-community-theme .forum-page .forum-editor-toolbar { border-radius: 10px 10px 0 0; }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-tool-group, .forum-editor-footer, .forum-attach-panel > p) { border-color: var(--portal-border); }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-toolbar button, .forum-editor-modes button, .forum-editor-close, .forum-attach-panel > button, .forum-attach-picker > summary, .forum-composer .social-picker summary) { color: var(--portal-muted); background: transparent; border-color: var(--portal-border); border-radius: 8px; }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-toolbar button:hover, .forum-editor-toolbar button[aria-pressed="true"], .forum-editor-toolbar button[aria-expanded="true"], .forum-editor-modes button[aria-pressed="true"], .forum-attach-picker[open] > summary, .forum-attach-panel > button:hover) { background: #f5a53b14; border-color: #f5a53b30; color: var(--portal-accent); box-shadow: none; }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-footer, .forum-editor-code-actions > span, .forum-editor-status, .forum-attach-panel > strong, .forum-attach-panel > p, .forum-attach-panel > button small, .forum-upload-preview-caption > small, .forum-existing-file > a small, .forum-attachment figcaption, .forum-file-download small) { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page :is(.forum-editor-visual, .forum-rich-body, .forum-post-body) { color: #c2c9d2; }
body.portal-page.portal-community-theme .forum-page .forum-editor-visual:empty::before { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .forum-editor-source { font-family: Consolas, Monaco, monospace; }
body.portal-page.portal-community-theme .forum-page .forum-editor-toolbar select { background-image: none; }
body.portal-page.portal-community-theme .forum-page .forum-upload-remove { background: #15181de8; border-color: var(--portal-border); color: var(--portal-text); }
body.portal-page.portal-community-theme .forum-page .forum-existing-file.is-removed { background: #352325; border-color: #673c40; }
body.portal-page.portal-community-theme .forum-page .forum-rich-body blockquote { background: var(--portal-raised); color: #b1bac8; border-color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page .forum-rich-body a { color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page .forum-rich-body em { color: inherit; font-style: italic; }
body.portal-page.portal-community-theme .forum-page .forum-rich-body :is(code, pre) { background: #111316; color: #d1d7e0; border-color: var(--portal-border); scrollbar-color: #4d525d #111316; }
body.portal-page.portal-community-theme .forum-page .forum-rich-body pre > code { background: transparent; border: 0; }
body.portal-page.portal-community-theme .forum-page .forum-status { color: #9fd3b1; background: #25362c; }
body.portal-page.portal-community-theme .forum-page .forum-status.is-off { color: var(--portal-muted); background: var(--portal-raised); }
body.portal-page.portal-community-theme .forum-page :is(.forum-admin-jumps > a, .forum-admin-jumps > a > span) { background: var(--portal-raised); color: var(--portal-muted); border-radius: 8px; }
body.portal-page.portal-community-theme .forum-page .forum-admin-jumps > a:hover { color: var(--portal-accent); background: #f5a53b14; box-shadow: none; }
body.portal-page.portal-community-theme .forum-page :is(.activity-settings-form .table-wrap, .activity-settings-form td) { border-color: var(--portal-border); }
body.portal-page.portal-community-theme .forum-page .activity-settings-form th { background: var(--portal-raised); color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .activity-settings-form > p { color: var(--portal-muted); }
body.portal-page.portal-community-theme .forum-page .forum-engagement :is(.product-like, .product-share, .like-statistics-button) { color: var(--portal-muted); border-color: var(--portal-border); border-radius: 8px; }
body.portal-page.portal-community-theme .forum-page .forum-engagement .like-statistics-button { font-family: var(--font); }
body.portal-page.portal-community-theme .forum-page .forum-engagement :is(.product-like, .product-share) { background: var(--portal-raised); }
body.portal-page.portal-community-theme .forum-page .forum-engagement :is(.product-like:hover, .product-share:hover, .like-statistics-button:hover) { background: #f5a53b14; color: var(--portal-accent); }
body.portal-page.portal-community-theme .forum-page .forum-engagement .product-like[aria-pressed="true"] { background: #f5a53b14; color: var(--portal-accent); border-color: #f5a53b30; }
body.portal-page.portal-community-theme .forum-page .forum-engagement :is(.product-like .icon, .product-share .icon, .like-heart-readonly) { color: var(--portal-accent); }

/* Private messages: hierarchy remains clear between chat list, incoming and own messages. */
body.portal-page.portal-community-theme :is(.pm-board, .pm-dialog) { background: var(--portal-panel) !important; color: var(--portal-text) !important; border-color: var(--portal-border) !important; border-radius: 14px; box-shadow: none; }
body.portal-page.portal-community-theme :is(.pm-sidebar, .pm-thread-head, .pm-composer-wrap, .pm-popover, .pm-dialog-head, .pm-compose-context, .pm-file-chip, .pm-file, .pm-person, .pm-thread-search) { background: var(--portal-panel) !important; color: var(--portal-text) !important; border-color: var(--portal-border) !important; }
body.portal-page.portal-community-theme .pm-thread { background: #15181d !important; color: var(--portal-text) !important; border-color: var(--portal-border) !important; }
body.portal-page.portal-community-theme :is(.pm-tabs, .pm-folder-tabs, .pm-side-foot, .pm-popover > hr, .pm-reaction-strip) { border-color: var(--portal-border); }
body.portal-page.portal-community-theme .pm-popover > hr { background: var(--portal-border); }
body.portal-page.portal-community-theme .pm-popover { border-radius: 10px; box-shadow: 0 12px 40px #0006; }
body.portal-page.portal-community-theme :is(.pm-popover button, .pm-popover > a, .pm-popover > details > summary) { border-radius: 8px; }
body.portal-page.portal-community-theme :is(.pm-icon-button, .pm-popover .pm-icon, .pm-side-search > div > .pm-icon, .pm-heading > a, .pm-connection, .pm-search-heading, .pm-compose-hint, .pm-typing-none, .pm-message-footer, .pm-forwarded) { color: var(--portal-muted); }
body.portal-page.portal-community-theme .pm-icon-button { border-radius: 8px; }
body.portal-page.portal-community-theme :is(.pm-icon-button:hover, .pm-menu[open] > .pm-icon-button, .pm-icon-button.is-accent) { color: var(--portal-accent); background: #f5a53b14; }
body.portal-page.portal-community-theme :is(.pm-tab, .pm-folder-tabs a, .pm-conversation-row) { background: transparent !important; color: var(--portal-muted) !important; border-color: var(--portal-border) !important; border-radius: 8px; }
body.portal-page.portal-community-theme :is(.pm-tab:hover, .pm-folder-tabs a:hover, .pm-conversation-row:hover, .pm-person:hover) { background: var(--portal-raised) !important; color: var(--portal-text) !important; }
body.portal-page.portal-community-theme :is(.pm-tab.is-active, .pm-folder-tabs .is-active, .pm-conversation-row.is-current, .pm-person.is-selected) { background: #f5a53b14 !important; color: var(--portal-accent) !important; border-color: #f5a53b40 !important; }
body.portal-page.portal-community-theme .pm-conversation-copy strong { color: var(--portal-text); }
body.portal-page.portal-community-theme .pm :is(.pm-avatar, .pm-avatar.is-group) { background: var(--portal-raised); color: var(--portal-accent); }
body.portal-page.portal-community-theme .pm-dialog .pm-avatar { background: var(--portal-raised); color: var(--portal-accent); }
body.portal-page.portal-community-theme .pm-badge { background: var(--portal-accent); color: #14171c; border-radius: 6px; }
body.portal-page.portal-community-theme .pm-badge.is-muted { background: #4b515d; color: #e0e3e9; }
body.portal-page.portal-community-theme .pm-conversation-meta > .pm-icon { color: var(--portal-muted); }
body.portal-page.portal-community-theme .pm-bubble { background: var(--portal-raised) !important; color: var(--portal-text) !important; border-color: var(--portal-border) !important; border-radius: 4px 14px 14px; box-shadow: none; }
body.portal-page.portal-community-theme .pm-message.is-mine .pm-bubble { background: #332b20 !important; color: #efe1ca !important; border-color: #58452c !important; border-radius: 14px 4px 14px 14px; }
body.portal-page.portal-community-theme .pm-message.is-deleted .pm-bubble { background: transparent !important; border-style: dashed; color: var(--portal-muted) !important; }
body.portal-page.portal-community-theme :is(.pm-sender, .pm-message-text a, .pm-compose-context strong, .pm-reply-preview strong, .pm-file > .pm-icon) { color: var(--portal-accent); }
body.portal-page.portal-community-theme .pm-reply-preview { background: #11131666 !important; color: #b7bfcc !important; border-color: var(--portal-accent) !important; }
body.portal-page.portal-community-theme .pm-reaction { background: var(--portal-panel) !important; color: #bdc4cf !important; border-color: var(--portal-border) !important; }
body.portal-page.portal-community-theme .pm-reaction.is-mine { background: #f5a53b18 !important; color: var(--portal-accent) !important; border-color: #f5a53b55 !important; }
body.portal-page.portal-community-theme .pm-attachments :is(img, video) { background: #111316; border-radius: 10px; }
body.portal-page.portal-community-theme :is(.pm-file, .pm-file-chip, .pm-compose-context) { border-radius: 10px; }
body.portal-page.portal-community-theme .pm-compose-context { border-left-color: var(--portal-accent) !important; }
body.portal-page.portal-community-theme .pm-compose-tools :is(button, .social-picker-trigger) { background: transparent !important; border-color: var(--portal-border) !important; color: var(--portal-muted) !important; border-radius: 8px; }
body.portal-page.portal-community-theme .pm-compose-tools :is(button:hover, .social-picker-trigger:hover) { background: #f5a53b14 !important; color: var(--portal-accent) !important; }
body.portal-page.portal-community-theme :is(.pm-button, .pm-send) { border-radius: 8px; font-weight: 700; background: var(--portal-raised); border-color: var(--portal-border) !important; color: var(--portal-text) !important; }
body.portal-page.portal-community-theme :is(.pm-button.is-primary, .pm-send, .pm-compose-tools .pm-send) { background: var(--portal-accent) !important; border-color: var(--portal-accent) !important; color: #14171c !important; }
body.portal-page.portal-community-theme :is(.pm-button.is-primary:hover, .pm-send:hover, .pm-compose-tools .pm-send:hover) { background: var(--portal-accent-hover) !important; border-color: var(--portal-accent-hover) !important; color: #14171c !important; }
body.portal-page.portal-community-theme :is(.pm-popover .is-danger, .pm-button.is-danger) { color: #f2a0a8 !important; }
body.portal-page.portal-community-theme .pm-button.is-danger { background: #352325; border-color: #673c40 !important; }
body.portal-page.portal-community-theme .pm-error { color: #f2a0a8; background: #352325; border-color: #673c40; border-radius: 8px; }
body.portal-page.portal-community-theme .pm-toast { color: var(--portal-text); background: var(--portal-raised); border: 1px solid var(--portal-border); border-radius: 10px; box-shadow: 0 8px 30px #0006; }
body.portal-page.portal-community-theme .pm-dialog::backdrop { background: #080a0ddd; }
body.portal-page.portal-community-theme .pm-dialog :is(h1, h2, h3) { font-family: var(--font); color: var(--portal-text); font-weight: 700; }
body.portal-page.portal-community-theme .pm-dialog :is(button, input, textarea, select) { font-family: var(--font); }
body.portal-page.portal-community-theme .pm-dialog label { color: #bac0ca; }
body.portal-page.portal-community-theme .pm-dialog-body > p { color: var(--portal-muted); }
body.portal-page.portal-community-theme .pm-message.is-highlight .pm-bubble { outline-color: var(--portal-accent); }
body.portal-page.portal-community-theme .pm :is(.pm-conversations, .pm-thread-scroll, .pm-tabs, .pm-folder-tabs) { scrollbar-color: #4d525d transparent; }
body.portal-page.portal-community-theme .pm-saved-tag, body.portal-page.portal-community-theme .pm-saved-tag .pm-icon { color: var(--portal-accent); fill: var(--portal-accent); }

/* Shared previews and pickers are mounted inside forum composers and message threads. */
body.portal-page.portal-community-theme :is(.forum-page, .pm) :is(.social-picker-panel, .social-sticker-preview, .shared-preview, .shared-preview-unavailable) { background: var(--portal-panel); border-color: var(--portal-border); color: var(--portal-text); border-radius: 10px; }
body.portal-page.portal-community-theme .pm .pm-compose-tools .social-sticker-preview { background: var(--portal-panel); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker { color: var(--portal-text); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker :is(.social-carousel-arrow, .social-pack-button, .social-emoji-category, .social-picker-more, .social-sticker-preview button) { color: var(--portal-text) !important; border-color: var(--portal-border) !important; background: var(--portal-raised) !important; border-radius: 8px; }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker :is(.social-pack-button[aria-pressed="true"], .social-emoji-category[aria-pressed="true"], .social-sticker-grid button[aria-pressed="true"]) { color: var(--portal-accent) !important; border-color: #f5a53b55 !important; background: #f5a53b18 !important; box-shadow: none; }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker :is(.social-pack-status, .social-picker-section-heading > span:last-child, [data-emoji-status]) { color: var(--portal-muted); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker .social-carousel-track { scrollbar-color: #4d525d transparent; }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker :is(button, summary):focus-visible { outline-color: var(--portal-accent); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .social-picker :is(.social-emoji-grid button:hover, .social-sticker-grid button:hover) { background: #f5a53b14 !important; }
body.portal-page.portal-community-theme :is(.forum-page, .pm) :is(.shared-preview-cover, .shared-preview-placeholder) { background: var(--portal-raised); color: var(--portal-muted); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .shared-preview-cover > img { background: var(--portal-raised); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .shared-preview:hover { border-color: #f5a53b55; box-shadow: none; }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .shared-preview :is(.shared-preview-info > small, .shared-preview-info > strong, .shared-preview-meta) { font-family: var(--font); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) :is(.shared-preview-info > small, .shared-preview-meta, .shared-preview-unavailable small) { color: var(--portal-muted); }
body.portal-page.portal-community-theme :is(.forum-page, .pm) .shared-preview-info > strong { color: var(--portal-text); }
body.portal-page.portal-community-theme :is(.forum-pagination, .pm-pagination) .pb-pagination { border-color: var(--portal-border); color: var(--portal-muted); }
body.portal-page.portal-community-theme :is(.forum-pagination, .pm-pagination) :is(.pb-pagination__step, .pb-pagination__number) { background: var(--portal-raised); color: #bac0ca; border-color: var(--portal-border); border-radius: 8px; }
body.portal-page.portal-community-theme :is(.forum-pagination, .pm-pagination) .pb-pagination a:hover { color: var(--portal-accent); background: #f5a53b14; border-color: #f5a53b55; }
body.portal-page.portal-community-theme :is(.forum-pagination, .pm-pagination) .pb-pagination [aria-current="page"] { background: #f5a53b18; color: var(--portal-accent); border-color: #f5a53b55; }
body.portal-page.portal-community-theme :is(.forum-pagination, .pm-pagination) .pb-pagination [aria-disabled="true"] { background: transparent; border-color: transparent; color: #707784; }

@media (max-width: 600px) {
    body.portal-page.portal-community-theme .forum-page :is(.forum-hero, .forum-card, .forum-section-card, .forum-topic-list, .forum-post, .forum-side-card) { border-radius: 14px; }
    body.portal-page.portal-community-theme .forum-page .forum-button { border-radius: 8px; }
    body.portal-page.portal-community-theme .forum-page .forum-post-author { border-color: var(--portal-border); }
    body.portal-page.portal-community-theme .forum-page .forum-composer-actions { flex-wrap: wrap; }
    body.portal-page.portal-community-theme .forum-page .forum-attach-panel { width: min(254px, calc(100vw - 74px)); }
    body.portal-page.portal-community-theme :is(.pm-board, .pm-dialog) { border-radius: 14px; }
    body.portal-page.portal-community-theme .pm-dialog-head { padding-inline: 18px; }
}
