.community-editor {
    overflow: hidden;
    border: 1px solid #edf0f4;
    border-radius: 6px;
    background: #fff;
}

.community-dropdown {
    position: relative;
    z-index: 20;
}

.community-dropdown__trigger {
    display: flex;
    width: 100%;
    height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    padding: 0 12px;
    color: #151515;
    font-size: 14px;
    transition: border-color .16s ease, background-color .16s ease;
}

.community-dropdown__trigger:hover,
.community-dropdown.is-open .community-dropdown__trigger {
    border-color: #2563eb;
    background: #f8fbff;
}

.community-dropdown__current {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.community-dropdown__icon,
.community-dropdown__option-icon {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 21px;
}

.community-dropdown__chevron {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 20px;
    transition: transform .16s ease;
}

.community-dropdown.is-open .community-dropdown__chevron {
    transform: rotate(180deg);
}

.community-dropdown__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    display: grid;
    gap: 4px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease;
}

.community-dropdown.is-open .community-dropdown__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.community-dropdown__option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    padding: 9px 10px;
    text-align: left;
    color: #151515;
    transition: background-color .16s ease, color .16s ease;
}

.community-dropdown__option:hover,
.community-dropdown__option.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.community-dropdown__option-text {
    min-width: 0;
    flex: 1 1 auto;
}

.community-dropdown__option-label {
    display: block;
    font-size: 14px;
    line-height: 20px;
}

.community-dropdown__option-desc {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 12px;
    line-height: 18px;
}

.community-dropdown__check {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 18px;
    opacity: 0;
}

.community-dropdown__option.is-active .community-dropdown__check {
    opacity: 1;
}

.community-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.community-modal[hidden] {
    display: none;
}

.community-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .38);
}

.community-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(920px, calc(100vw - 32px));
    height: min(830px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #151515;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.community-modal__head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #edf0f4;
    padding: 18px 20px;
}

.community-modal__title {
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
}

.community-modal__desc {
    margin-top: 2px;
    color: #64748b;
    font-size: 13px;
}

.community-modal__close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #64748b;
    font-size: 20px;
}

.community-modal__close:hover {
    background: #f1f5f9;
    color: #151515;
}

.community-modal__form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.community-modal__body {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 14px;
    overflow-y: auto;
    padding: 18px 20px;
}

.community-modal__alert-slot[hidden] {
    display: none;
}

.community-modal__editor-field {
    display: flex;
    min-height: 400px;
    flex-direction: column;
}

.community-modal__editor-field .community-editor {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.community-modal__editor-field .community-editor__body,
.community-modal__editor-field .community-editor__source {
    min-height: 0 !important;
    flex: 1 1 auto;
}

.community-modal__topline {
    display: grid;
    gap: 14px;
}

.community-modal__title-input {
    height: 44px;
    line-height: 20px;
}

@media (min-width: 768px) {
    .community-modal__topline {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        align-items: start;
    }
}

.community-modal__foot {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #edf0f4;
    padding: 12px 18px;
}

.community-modal__cancel,
.community-modal__submit {
    display: inline-flex;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
}

.community-modal__cancel {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #334155;
}

.community-modal__cancel:hover {
    background: #f8fafc;
}

.community-modal__submit {
    background: #2563eb;
    color: #fff;
}

.community-modal__submit:hover {
    background: #1d4ed8;
}

.community-modal__submit:disabled {
    cursor: default;
    opacity: .64;
}

.community-modal__alert {
    display: flex;
    height: 38px;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
}

.community-modal__alert-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-modal__alert-close {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: currentColor;
    font-size: 16px;
    opacity: .68;
}

.community-modal__alert-close:hover {
    background: rgba(15, 23, 42, .08);
    opacity: 1;
}

.community-modal__alert.is-error {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.community-modal__alert.is-success {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

@media (max-height: 700px) {
    .community-modal__editor-field {
        min-height: 300px;
    }
}

.community-report-modal__panel {
    width: min(480px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100vh - 40px);
}

.community-report-modal__body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.community-report-modal__field {
    display: grid;
    gap: 7px;
    color: #111827;
    font-size: 13px;
}

.community-report-modal__field span {
    font-weight: 500;
}

.community-report-modal__field select,
.community-report-modal__field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    outline: none;
}

.community-report-modal__field select {
    height: 40px;
    padding: 0 10px;
}

.community-report-modal__field textarea {
    resize: vertical;
    min-height: 96px;
    padding: 10px;
    line-height: 1.6;
}

.community-report-modal__field select:focus,
.community-report-modal__field textarea:focus {
    border-color: #2563eb;
}

.community-feed-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    padding: 2px 7px;
    color: #2563eb;
    font-size: 11px;
    line-height: 16px;
}

.community-tag-editor {
    min-width: 0;
}

.community-tag-editor__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.community-tag-editor__heading label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.community-tag-editor__heading label > span:first-child {
    color: #6366f1;
    font-size: 17px;
}

.community-tag-editor__count {
    border-radius: 999px;
    background: #f1f5f9;
    padding: 2px 8px;
    color: #64748b;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.community-tag-editor__surface {
    display: flex;
    min-height: 46px;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    background: #fff;
    padding: 6px 7px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.community-tag-editor__surface:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.community-tag-editor__list {
    display: contents;
}

.community-tag-editor__pill {
    display: inline-flex;
    height: 30px;
    align-items: center;
    gap: 5px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    padding: 0 5px 0 11px;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.community-tag-editor__remove {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #818cf8;
    font-size: 14px;
}

.community-tag-editor__remove:hover {
    background: #e0e7ff;
    color: #4338ca;
}

.community-tag-editor__entry {
    display: flex;
    min-width: 190px;
    height: 32px;
    flex: 1 1 220px;
    align-items: center;
    gap: 6px;
}

.community-tag-editor__plus {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 17px;
}

.community-tag-editor__entry input {
    min-width: 90px;
    height: 100%;
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    color: #172033;
    font-size: 12px;
    outline: 0;
}

.community-tag-editor__entry input::placeholder {
    color: #94a3b8;
}

.community-tag-editor__entry button {
    display: inline-flex;
    height: 30px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eef2ff;
    padding: 0 11px;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 600;
}

.community-tag-editor__entry button:hover {
    background: #e0e7ff;
}

.community-tag-editor__entry button:disabled,
.community-tag-editor__entry input:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.community-tag-editor__hint {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 17px;
}

html.dark .community-tag-editor__heading label,
html.tw-dark .community-tag-editor__heading label {
    color: #e2e8f0;
}

html.dark .community-tag-editor__count,
html.tw-dark .community-tag-editor__count {
    background: rgba(255, 255, 255, .08);
    color: #94a3b8;
}

html.dark .community-tag-editor__surface,
html.tw-dark .community-tag-editor__surface {
    border-color: #343b48;
    background: #20242b;
}

html.dark .community-tag-editor__pill,
html.tw-dark .community-tag-editor__pill {
    border-color: rgba(129, 140, 248, .35);
    background: rgba(99, 102, 241, .14);
    color: #c7d2fe;
}

html.dark .community-tag-editor__entry input,
html.tw-dark .community-tag-editor__entry input {
    color: #f1f5f9;
}

body.community-modal-open {
    overflow: hidden;
}

.community-page {
    min-height: calc(100vh - 65px);
    background:
        radial-gradient(circle at 16px 16px, rgba(37, 99, 235, .035) 0 2px, transparent 3px) 0 0 / 96px 96px,
        linear-gradient(180deg, #eef7ff 0%, #f4f7fb 46%, #f5f7fa 100%);
}

.community-side-sticky,
.community-feed-sticky {
    position: sticky;
}

.community-side-sticky {
    top: 85px;
    align-self: start;
}

.community-feed-sticky {
    top: 85px;
}

.community-feed-list {
    overflow: hidden;
}

.community-feed-images {
    display: grid;
    width: min(100%, 540px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.community-feed-images.is-single {
    width: min(100%, 600px);
    grid-template-columns: minmax(0, 1fr);
}

.community-feed-image {
    position: relative;
    display: flex;
    height: 160px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f5f9;
    cursor: zoom-in;
}

.community-feed-images.is-single .community-feed-image {
    height: 280px;
    max-height: 280px;
}

.community-feed-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
}

.community-feed-image.is-long-image img {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin: 0;
    object-fit: initial;
    transform: translateY(-50%);
}

@media (max-width: 640px) {
    .community-feed-image {
        height: 110px;
    }

    .community-feed-images.is-single .community-feed-image {
        height: 220px;
        max-height: 220px;
    }
}

html.dark .community-feed-image,
html.tw-dark .community-feed-image {
    background: rgba(255, 255, 255, .08);
}

.community-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid #edf0f4;
    background: #f8fafc;
    padding: 8px;
}

.community-editor__toolbar button,
.community-editor__toolbar label {
    display: inline-flex;
    width: 32px;
    height: 32px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6b7280;
    font-size: 18px;
    transition: color .16s ease, background-color .16s ease;
}

.community-editor__toolbar button:hover,
.community-editor__toolbar label:hover {
    background: #fff;
    color: #2563eb;
}

.community-editor__toolbar button.is-active {
    background: #eff6ff;
    color: #2563eb;
}

.community-editor__toolbar input {
    display: none;
}

.community-editor__divider {
    width: 1px;
    height: 20px;
    margin: 0 4px;
    background: #edf0f4;
}

.community-editor__body {
    width: 100%;
    overflow-x: hidden;
    padding: 12px;
    color: #151515;
    font-size: 14px;
    line-height: 1.75;
}

.community-editor__body:focus {
    outline: none;
}

.community-editor__body:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.community-editor__source {
    display: none;
    width: 100%;
    resize: none;
    border: 0;
    background: #0f172a !important;
    padding: 12px;
    color: #e2e8f0 !important;
    font-family: Consolas, "SFMono-Regular", Menlo, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.7;
}

.community-editor__source:focus,
.community-editor__source:focus-visible {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.community-editor.is-source-mode .community-editor__body {
    display: none;
}

.community-editor.is-source-mode .community-editor__source {
    display: block;
}

.community-editor__status {
    border-top: 1px solid #edf0f4;
    padding: 8px 12px;
    color: #6b7280;
    font-size: 12px;
}

.community-rich-content {
    overflow-wrap: break-word;
}

.community-rich-content p {
    margin: 8px 0;
}

.community-rich-content .community-editor__image-row {
    margin: 8px 0 0;
}

.community-rich-content .community-editor__after-image {
    min-height: 0;
    margin: 8px 0;
    line-height: 1.75;
}

.community-rich-content h2 {
    margin: 12px 0;
    font-size: 20px;
    font-weight: 600;
}

.community-rich-content h3 {
    margin: 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.community-rich-content h4 {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.community-rich-content ul,
.community-rich-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.community-rich-content ul {
    list-style: disc;
}

.community-rich-content ol {
    list-style: decimal;
}

.community-rich-content li + li {
    margin-top: 4px;
}

.community-rich-content blockquote {
    margin: 12px 0;
    border-left: 2px solid #2563eb;
    background: #eff6ff;
    padding: 8px 12px;
    color: #6b7280;
}

.community-rich-content pre {
    margin: 12px 0;
    overflow-x: auto;
    border-radius: 6px;
    background: #020617;
    padding: 12px;
    color: #f1f5f9;
    font-size: 12px;
    line-height: 1.6;
}

.community-rich-content code {
    border-radius: 4px;
    background: #f1f5f9;
    padding: 1px 4px;
    font-size: .92em;
}

.community-rich-content pre code {
    background: transparent;
    padding: 0;
}

.community-rich-content a {
    color: #2563eb;
    text-underline-offset: 2px;
}

.community-rich-content a:hover {
    text-decoration: underline;
}

.community-rich-content img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    margin: 0;
    border: 1px solid #edf0f4;
    border-radius: 6px;
    object-fit: contain;
}

.community-editor .community-rich-content img {
    max-width: min(380px, 100%);
}

.community-post-page {
    min-height: calc(100vh - 64px);
    background:
        radial-gradient(circle at 16px 16px, rgba(37, 99, 235, .035) 0 2px, transparent 3px) 0 0 / 96px 96px,
        linear-gradient(180deg, #eef7ff 0%, #f4f7fb 46%, #f5f7fa 100%);
    padding: 26px 16px 56px;
}

.community-post-layout {
    display: grid;
    max-width: 1180px;
    margin: 0 auto;
    grid-template-columns: 92px minmax(0, 1fr) 320px;
    gap: 12px;
    align-items: start;
}

.community-post-actions,
.community-post-sidebar {
    position: sticky;
    top: 78px;
}

.community-post-actions {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    padding-top: 10px;
}

.community-post-actions form {
    margin: 0;
}

.community-post-action {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 74px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 1px solid #edf0f4;
    color: #8a8f98;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    transition: background-color .16s ease, color .16s ease;
}

.community-post-action:hover,
.community-post-action.is-active {
    background: #f7fbff;
    color: #2563eb;
}

.community-post-action:last-child {
    border-bottom: 0;
}

.community-post-action > span:first-child {
    font-size: 25px;
    line-height: 1;
}

.community-post-action strong {
    position: absolute;
    top: 14px;
    left: 50%;
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    padding: 0 5px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
    transform: translateX(7px);
}

.community-post-main {
    min-width: 0;
}

.community-post-card,
.community-reply-panel,
.community-related-card,
.community-author-card {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
}

.community-post-card {
    padding: 28px 28px 24px;
}

.community-post-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.community-post-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    background: #f1f5f9;
    padding: 4px 9px;
    color: #64748b;
    font-size: 12px;
    line-height: 18px;
}

.community-post-chip .tw-icon-\[mdi--forum-outline\] {
    color: #2563eb;
}

.community-post-chip.is-warn {
    background: #fff7ed;
    color: #c2410c;
}

.community-post-chip.is-tag {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
}

.community-post-title {
    margin: 0;
    color: #1f2937;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
}

.community-post-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 18px;
    color: #8a94a6;
    font-size: 13px;
    line-height: 20px;
}

.community-post-content {
    margin-top: 32px;
    color: #111827;
    font-size: 16px;
    line-height: 1.9;
}

.community-post-content img {
    margin: 16px 0;
}

.community-post-content img.community-post-lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    cursor: zoom-in;
}

.community-reply-panel {
    margin-top: 14px;
    padding: 0 24px 26px;
}

.community-reply-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid #edf0f4;
    color: #64748b;
    font-size: 14px;
}

.community-reply-tabs button {
    position: relative;
    padding: 17px 0 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.community-reply-tabs button.is-active {
    color: #2563eb;
}

.community-reply-tabs button.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: #2563eb;
    content: "";
}

.community-reply-tabs strong {
    margin-left: auto;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 400;
}

.community-reply-compose {
    display: flex;
    gap: 14px;
    padding: 26px 0 24px;
    border-bottom: 1px solid #edf0f4;
}

.community-reply-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.community-reply-form {
    min-width: 0;
    flex: 1 1 auto;
}

.community-reply-form .community-editor__body,
.community-reply-form .community-editor__source {
    min-height: 112px;
}

.community-reply-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.community-reply-submit,
.community-author-actions a:last-child {
    display: inline-flex;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #2563eb;
    padding: 0 18px;
    color: #fff;
    font-size: 14px;
    transition: background-color .16s ease;
}

.community-reply-submit:hover,
.community-author-actions a:last-child:hover {
    background: #1d4ed8;
}

.community-reply-login,
.community-reply-empty {
    flex: 1 1 auto;
    border-radius: 6px;
    background: #f8fafc;
    padding: 18px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

.community-reply-list {
    display: grid;
}

.community-reply-item {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #edf0f4;
}

.community-reply-item:last-child {
    border-bottom: 0;
}

.community-reply-body {
    min-width: 0;
    flex: 1 1 auto;
}

.community-reply-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.community-reply-meta span {
    color: #111827;
}

.community-reply-meta em {
    font-style: normal;
}

.community-reply-meta b {
    border-radius: 999px;
    background: #f1f5f9;
    padding: 2px 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
}

.community-reply-content {
    margin-top: 8px;
    color: #1f2937;
    font-size: 14px;
}

.community-reply-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 12px;
}

.community-reply-actions button {
    display: inline-flex;
    height: 28px;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    padding: 0 7px;
    color: #64748b;
    font-size: 13px;
    line-height: 28px;
    transition: background-color .16s ease, color .16s ease;
}

.community-reply-actions button:hover,
.community-reply-actions button.is-liked {
    background: #eff6ff;
    color: #2563eb;
}

.community-reply-actions button:disabled {
    cursor: wait;
    opacity: .65;
}

.community-reply-actions span:first-child {
    font-size: 15px;
}

.community-reply-actions em {
    font-style: normal;
}

.community-reply-children {
    display: none;
    gap: 0;
    margin-top: 12px;
    border-radius: 8px;
}

.community-reply-children:not(.is-empty) {
    display: grid;
    background: rgba(248, 250, 252, .86);
    padding: 12px;
}

.community-reply-children .community-reply-item {
    padding: 0;
    border-bottom: 0;
}

.community-reply-children .community-reply-item + .community-reply-item {
    margin-top: 12px;
    border-top: 1px dashed rgba(148, 163, 184, .28);
    padding-top: 12px;
}

.community-reply-item.is-child .community-reply-avatar {
    width: 34px;
    height: 34px;
}

.community-reply-item.is-child .community-reply-content {
    margin-top: 7px;
}

.community-inline-reply {
    margin-top: 12px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
}

.community-inline-reply__input {
    display: block;
    width: 100%;
    min-height: 72px;
    resize: vertical;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
}

.community-inline-reply__input::placeholder {
    color: #94a3b8;
}

.community-inline-reply__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.community-inline-reply__cancel,
.community-inline-reply__submit {
    display: inline-flex;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 13px;
}

.community-inline-reply__cancel {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #64748b;
}

.community-inline-reply__submit {
    background: #2563eb;
    color: #fff;
}

.community-inline-reply__submit:disabled {
    cursor: wait;
    opacity: .65;
}

.community-post-sidebar {
    display: grid;
    gap: 12px;
}

.community-related-card {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    color: inherit;
}

.community-related-card:hover h2 {
    color: #2563eb;
}

.community-related-thumb {
    overflow: hidden;
    border-radius: 8px;
    background: #f1f5f9;
}

.community-related-thumb img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.community-related-card h2,
.community-author-card h2 {
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.community-related-card p,
.community-author-head p {
    margin: 6px 0 0;
    color: #8a94a6;
    font-size: 12px;
    line-height: 1.6;
}

.community-author-card {
    padding: 18px 18px 20px;
}

.community-author-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.community-author-head img {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.community-author-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 24px 0 18px;
    text-align: center;
}

.community-author-stats span {
    display: grid;
    gap: 4px;
}

.community-author-stats strong {
    color: #111827;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

.community-author-stats em {
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.community-author-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.community-author-actions a {
    display: inline-flex;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #edf0f4;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: 14px;
}

.community-author-actions a:hover {
    border-color: #bfdbfe;
    color: #2563eb;
}

@media (max-width: 1120px) {
    .community-post-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .community-post-actions {
        display: none;
    }
}

@media (max-width: 900px) {
    .community-post-page {
        padding: 14px 10px 36px;
    }

    .community-post-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .community-post-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .community-post-card {
        padding: 20px 16px;
    }

    .community-post-title {
        font-size: 22px;
    }

    .community-reply-panel {
        padding: 0 16px 20px;
    }

    .community-reply-compose,
    .community-reply-item {
        gap: 10px;
    }
}

html.dark .community-editor,
html.tw-dark .community-editor {
    border-color: #2a2a2a;
    background: #171717;
}

html.dark .community-feed-search,
html.tw-dark .community-feed-search {
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

html.dark .community-feed-search:focus-within,
html.tw-dark .community-feed-search:focus-within {
    background: rgba(56, 189, 248, .075);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .2);
}

html.dark .community-feed-publish,
html.dark .community-page-submit,
html.dark .community-modal__submit,
html.tw-dark .community-feed-publish,
html.tw-dark .community-page-submit,
html.tw-dark .community-modal__submit {
    border: 1px solid rgba(56, 189, 248, .32);
    background: rgba(14, 165, 233, .14);
    color: #7dd3fc;
}

html.dark .community-feed-publish:hover,
html.dark .community-page-submit:hover,
html.dark .community-modal__submit:hover,
html.tw-dark .community-feed-publish:hover,
html.tw-dark .community-page-submit:hover,
html.tw-dark .community-modal__submit:hover {
    border-color: rgba(56, 189, 248, .48);
    background: rgba(14, 165, 233, .24);
    color: #e0f2fe;
}

html.dark .community-feed-publish:focus-visible,
html.dark .community-page-submit:focus-visible,
html.dark .community-modal__submit:focus-visible,
html.tw-dark .community-feed-publish:focus-visible,
html.tw-dark .community-page-submit:focus-visible,
html.tw-dark .community-modal__submit:focus-visible {
    outline: 2px solid rgba(56, 189, 248, .35);
    outline-offset: 2px;
}

html.dark .community-feed-mine,
html.tw-dark .community-feed-mine {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .035);
    color: #d4d4d4;
}

html.dark .community-feed-mine:hover,
html.tw-dark .community-feed-mine:hover {
    border-color: rgba(56, 189, 248, .2);
    background: rgba(56, 189, 248, .08);
    color: #bae6fd;
}

html.dark .community-feed-stats,
html.tw-dark .community-feed-stats {
    color: #a3a3a3;
}

html.dark .community-nav-count,
html.tw-dark .community-nav-count {
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .055);
    color: #a3a3a3;
}

html.dark .community-post-label,
html.tw-dark .community-post-label {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    border: 1px solid rgba(148, 163, 184, .2);
    background: rgba(148, 163, 184, .09);
    color: #cbd5e1;
}

html.dark .community-post-label.is-pinned,
html.tw-dark .community-post-label.is-pinned {
    border-color: rgba(167, 139, 250, .28);
    background: rgba(139, 92, 246, .12);
    color: #c4b5fd;
}

html.dark .community-post-label.is-featured,
html.tw-dark .community-post-label.is-featured {
    border-color: rgba(251, 191, 36, .28);
    background: rgba(245, 158, 11, .11);
    color: #fcd34d;
}

html.dark .community-latest-reply,
html.tw-dark .community-latest-reply {
    box-shadow: inset 2px 0 0 rgba(56, 189, 248, .24);
    background: rgba(255, 255, 255, .04);
    color: #a3a3a3;
}

html.dark .community-discuss-link,
html.tw-dark .community-discuss-link {
    border: 1px solid rgba(251, 191, 36, .2);
    border-radius: 6px;
    background: rgba(245, 158, 11, .075);
    padding: 5px 9px;
    color: #fcd34d;
}

html.dark .community-discuss-link:hover,
html.tw-dark .community-discuss-link:hover {
    border-color: rgba(251, 191, 36, .34);
    background: rgba(245, 158, 11, .14);
    color: #fef3c7;
}

html.dark .community-post-page,
html.dark .community-page,
html.tw-dark .community-post-page {
    background:
        radial-gradient(circle at 16px 16px, rgba(56, 189, 248, .04) 0 2px, transparent 3px) 0 0 / 96px 96px,
        linear-gradient(180deg, #101827 0%, #0f172a 100%);
}

html.tw-dark .community-page {
    background:
        radial-gradient(circle at 16px 16px, rgba(56, 189, 248, .04) 0 2px, transparent 3px) 0 0 / 96px 96px,
        linear-gradient(180deg, #101827 0%, #0f172a 100%);
}

html.dark .community-post-actions,
html.dark .community-post-card,
html.dark .community-reply-panel,
html.dark .community-related-card,
html.dark .community-author-card,
html.tw-dark .community-post-actions,
html.tw-dark .community-post-card,
html.tw-dark .community-reply-panel,
html.tw-dark .community-related-card,
html.tw-dark .community-author-card {
    border-color: #2a2a2a;
    background: rgba(23, 23, 23, .94);
}

html.dark .community-post-action,
html.tw-dark .community-post-action {
    border-color: #2a2a2a;
    color: #a3a3a3;
}

html.dark .community-post-action:hover,
html.dark .community-post-action.is-active,
html.tw-dark .community-post-action:hover,
html.tw-dark .community-post-action.is-active {
    background: rgba(56, 189, 248, .1);
    color: #7dd3fc;
}

html.dark .community-post-action strong,
html.tw-dark .community-post-action strong {
    border-color: rgba(56, 189, 248, .24);
    background: rgba(56, 189, 248, .14);
    color: #7dd3fc;
}

html.dark .community-post-title,
html.dark .community-related-card h2,
html.dark .community-author-card h2,
html.dark .community-post-content,
html.dark .community-reply-meta span,
html.dark .community-reply-content,
html.dark .community-author-stats strong,
html.tw-dark .community-post-title,
html.tw-dark .community-related-card h2,
html.tw-dark .community-author-card h2,
html.tw-dark .community-post-content,
html.tw-dark .community-reply-meta span,
html.tw-dark .community-reply-content,
html.tw-dark .community-author-stats strong {
    color: #f2f2f2;
}

html.dark .community-post-chip,
html.dark .community-reply-login,
html.dark .community-reply-empty,
html.dark .community-reply-meta b,
html.dark .community-related-thumb,
html.tw-dark .community-post-chip,
html.tw-dark .community-reply-login,
html.tw-dark .community-reply-empty,
html.tw-dark .community-reply-meta b,
html.tw-dark .community-related-thumb {
    background: rgba(255, 255, 255, .06);
    color: #a3a3a3;
}

html.dark .community-reply-tabs,
html.dark .community-reply-compose,
html.dark .community-reply-item,
html.dark .community-author-actions a,
html.tw-dark .community-reply-tabs,
html.tw-dark .community-reply-compose,
html.tw-dark .community-reply-item,
html.tw-dark .community-author-actions a {
    border-color: #2a2a2a;
}

html.dark .community-reply-actions button,
html.tw-dark .community-reply-actions button {
    color: #a3a3a3;
}

html.dark .community-reply-actions button:hover,
html.dark .community-reply-actions button.is-liked,
html.tw-dark .community-reply-actions button:hover,
html.tw-dark .community-reply-actions button.is-liked {
    background: rgba(56, 189, 248, .12);
    color: #7dd3fc;
}

html.dark .community-reply-children:not(.is-empty),
html.tw-dark .community-reply-children:not(.is-empty) {
    background: rgba(255, 255, 255, .035);
}

html.dark .community-reply-children .community-reply-item + .community-reply-item,
html.tw-dark .community-reply-children .community-reply-item + .community-reply-item {
    border-color: rgba(255, 255, 255, .09);
}

html.dark .community-inline-reply,
html.tw-dark .community-inline-reply {
    border-color: #2a2a2a;
    background: rgba(255, 255, 255, .04);
}

html.dark .community-inline-reply__input,
html.tw-dark .community-inline-reply__input {
    color: #f2f2f2;
}

html.dark .community-inline-reply__cancel,
html.tw-dark .community-inline-reply__cancel {
    border-color: #2a2a2a;
    background: #171717;
    color: #a3a3a3;
}

html.dark .community-author-actions a,
html.tw-dark .community-author-actions a {
    background: rgba(255, 255, 255, .04);
    color: #a3a3a3;
}

html.dark .community-dropdown__trigger,
html.tw-dark .community-dropdown__trigger {
    border-color: #2a2a2a;
    background: #171717;
    color: #f2f2f2;
}

html.dark .community-dropdown__trigger:hover,
html.dark .community-dropdown.is-open .community-dropdown__trigger,
html.tw-dark .community-dropdown__trigger:hover,
html.tw-dark .community-dropdown.is-open .community-dropdown__trigger {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, .08);
}

html.dark .community-dropdown__menu,
html.tw-dark .community-dropdown__menu {
    border-color: #2a2a2a;
    background: #171717;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .32);
}

html.dark .community-dropdown__option,
html.tw-dark .community-dropdown__option {
    color: #f2f2f2;
}

html.dark .community-dropdown__option:hover,
html.dark .community-dropdown__option.is-active,
html.tw-dark .community-dropdown__option:hover,
html.tw-dark .community-dropdown__option.is-active {
    background: rgba(56, 189, 248, .12);
    color: #7dd3fc;
}

html.dark .community-dropdown__option-desc,
html.tw-dark .community-dropdown__option-desc {
    color: #a3a3a3;
}

html.dark .community-dropdown__icon,
html.dark .community-dropdown__option-icon,
html.dark .community-dropdown__check,
html.tw-dark .community-dropdown__icon,
html.tw-dark .community-dropdown__option-icon,
html.tw-dark .community-dropdown__check {
    color: #38bdf8;
}

html.dark .community-modal__panel,
html.tw-dark .community-modal__panel {
    border-color: #2a2a2a;
    background: #171717;
    color: #f2f2f2;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

html.dark .community-modal__head,
html.dark .community-modal__foot,
html.tw-dark .community-modal__head,
html.tw-dark .community-modal__foot {
    border-color: #2a2a2a;
}

html.dark .community-modal__desc,
html.tw-dark .community-modal__desc {
    color: #a3a3a3;
}

html.dark .community-modal__close,
html.tw-dark .community-modal__close {
    color: #a3a3a3;
}

html.dark .community-modal__close:hover,
html.tw-dark .community-modal__close:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

html.dark .community-modal__cancel,
html.tw-dark .community-modal__cancel {
    border-color: #2a2a2a;
    background: #171717;
    color: #f2f2f2;
}

html.dark .community-modal__cancel:hover,
html.tw-dark .community-modal__cancel:hover {
    background: rgba(255, 255, 255, .06);
}

html.dark .community-modal__alert.is-error,
html.tw-dark .community-modal__alert.is-error {
    border-color: rgba(244, 63, 94, .3);
    background: rgba(244, 63, 94, .12);
    color: #fecdd3;
}

html.dark .community-modal__alert.is-success,
html.tw-dark .community-modal__alert.is-success {
    border-color: rgba(56, 189, 248, .26);
    background: rgba(56, 189, 248, .1);
    color: #7dd3fc;
}

html.dark .community-report-modal__field,
html.tw-dark .community-report-modal__field {
    color: #f2f2f2;
}

html.dark .community-report-modal__field select,
html.dark .community-report-modal__field textarea,
html.tw-dark .community-report-modal__field select,
html.tw-dark .community-report-modal__field textarea {
    border-color: #2a2a2a;
    background: #171717;
    color: #f2f2f2;
}

html.dark .community-report-modal__field select:focus,
html.dark .community-report-modal__field textarea:focus,
html.tw-dark .community-report-modal__field select:focus,
html.tw-dark .community-report-modal__field textarea:focus {
    border-color: #38bdf8;
}

html.dark .community-editor__toolbar,
html.tw-dark .community-editor__toolbar {
    border-color: #2a2a2a;
    background: rgba(255, 255, 255, .05);
}

html.dark .community-editor__toolbar button,
html.dark .community-editor__toolbar label,
html.tw-dark .community-editor__toolbar button,
html.tw-dark .community-editor__toolbar label {
    color: #a3a3a3;
}

html.dark .community-editor__toolbar button:hover,
html.dark .community-editor__toolbar label:hover,
html.tw-dark .community-editor__toolbar button:hover,
html.tw-dark .community-editor__toolbar label:hover {
    background: rgba(255, 255, 255, .1);
    color: #7dd3fc;
}

html.dark .community-editor__toolbar button.is-active,
html.tw-dark .community-editor__toolbar button.is-active {
    background: rgba(56, 189, 248, .14);
    color: #7dd3fc;
}

html.dark .community-editor__divider,
html.tw-dark .community-editor__divider {
    background: #2a2a2a;
}

html.dark .community-editor__body,
html.tw-dark .community-editor__body {
    color: #f2f2f2;
}

html.dark .community-editor__body:empty::before,
html.tw-dark .community-editor__body:empty::before {
    color: rgba(255, 255, 255, .35);
}

html.dark .community-editor__status,
html.tw-dark .community-editor__status {
    border-color: #2a2a2a;
    color: #a3a3a3;
}

html.dark .community-rich-content blockquote,
html.tw-dark .community-rich-content blockquote {
    background: rgba(14, 165, 233, .1);
    color: #a3a3a3;
}

html.dark .community-rich-content code,
html.tw-dark .community-rich-content code {
    background: rgba(255, 255, 255, .1);
}

html.dark .community-rich-content a,
html.tw-dark .community-rich-content a {
    color: #7dd3fc;
}

html.dark .community-rich-content img,
html.tw-dark .community-rich-content img {
    border-color: #2a2a2a;
}


/* Black Desert booklet: compact, flat surfaces and readable mobile channels. */
.bdo-community-page .community-page,.bdo-community-page .community-post-page {background:transparent;background-image:none}
html.tw-dark .bdo-community-page .community-page,html.tw-dark .bdo-community-page .community-post-page {background:transparent;background-image:none}
.bdo-community-page .community-post-page {padding-left:0;padding-right:0}
.bdo-community-page .community-page>.layout-shell,.bdo-community-page .community-post-layout {width:min(1320px,calc(100% - 32px));max-width:1320px;padding-left:0;padding-right:0}
@media(max-width:760px){.bdo-community-page .community-page>.layout-shell,.bdo-community-page .community-post-layout {width:min(1320px,calc(100% - 24px))}}
.bdo-community-page .community-page .tw-border {border-color:transparent;box-shadow:none;border-radius:4px}
.bdo-community-page .community-feed-search {min-height:44px;flex-shrink:0}
.bdo-community-page [class*="tw-text-[11px]"],.bdo-community-page [class*="tw-text-[10px]"] {font-size:12px}
.bdo-community-mobile-channels {display:none}
@media(max-width:1023px){
 .bdo-community-mobile-channels {display:flex;gap:8px;overflow:auto;padding:0 0 12px;margin-bottom:4px}
 .bdo-community-mobile-channels a {display:flex;align-items:center;gap:6px;flex:none;padding:8px 10px;border-radius:4px;background:#fff;color:#444;font-size:14px;white-space:nowrap}
 .tw-dark .bdo-community-mobile-channels a {background:#242729;color:#ddd}
}

/* Topic tags retain readable contrast in both themes. */
.bdo-community-page .community-feed-tag {border:0;border-radius:4px;padding:3px 8px;background:#eeebe3;color:#665329;font-size:12px;line-height:18px;text-decoration:none}
.bdo-community-page .community-feed-tag:hover {background:#e3dccb;color:#4f3d1a}
.bdo-community-page .community-feed-tag:focus-visible {outline:2px solid #bd9148;outline-offset:2px}
html.tw-dark .bdo-community-page .community-feed-tag,html.dark .bdo-community-page .community-feed-tag {background:#343128;color:#dfc58e}
html.tw-dark .bdo-community-page .community-feed-tag:hover,html.dark .bdo-community-page .community-feed-tag:hover {background:#423b2c;color:#f0d69c}
