.ask-rich-body {
    line-height: 1.85;
    word-break: break-word;
    color: #303133;
    font-size: 14px;
}

.ask-rich-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
    cursor: zoom-in;
    transition: opacity 0.15s, box-shadow 0.15s;
}

.ask-rich-body p img,
.ask-rich-body li img {
    display: inline-block;
    vertical-align: middle;
    margin: 4px 0;
}
.ask-rich-body img:hover {
    opacity: 0.92;
    box-shadow: 0 2px 12px rgba(32, 107, 231, 0.2);
}

/* Element UI 图片预览器（富文本点击触发） */
.ask-el-image-preview-trigger {
    position: fixed !important;
    width: 1px !important;
    height: 1px !important;
    left: -9999px !important;
    top: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
.ask-jn-page .el-image-viewer__wrapper {
    z-index: 100000 !important;
}
.ask-jn-page .el-image-viewer__close,
.ask-jn-page .el-image-viewer__btn,
.ask-jn-page .el-image-viewer__canvas {
    z-index: 100001 !important;
}
.ask-rich-body p { margin: 0 0 10px; }
.ask-rich-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 8px;
    overflow-x: auto;
    line-height: 1.55;
    margin: 0 0 12px;
    font-size: 13px;
}
.ask-rich-body code {
    padding: 2px 8px;
    background: #f0f2f5;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    color: #c7254e;
}
.ask-rich-body pre code {
    padding: 0;
    background: none;
    color: inherit;
    white-space: pre;
    word-break: normal;
}

.ask-rich-body pre[class*="language-"] {
    position: relative;
}

.ask-rich-body pre[class*="language-"] code {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.55;
    tab-size: 4;
}
.ask-rich-body blockquote {
    margin: 0 0 12px;
    padding: 10px 16px;
    border-left: 3px solid #206be7;
    color: #606266;
    background: #f8f9fb;
    border-radius: 0 6px 6px 0;
}
.ask-rich-body h1, .ask-rich-body h2, .ask-rich-body h3 {
    margin: 16px 0 10px;
    line-height: 1.4;
}
.ask-rich-body ul, .ask-rich-body ol { padding-left: 22px; margin: 0 0 10px; }

/* 社区昵称设置 */
.ask-nickname-dialog .el-dialog__body {
    padding-top: 8px;
}
.ask-nickname-intro {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #606266;
}
.ask-nickname-intro em {
    color: #206be7;
    font-style: normal;
    font-weight: 600;
}
.ask-nickname-random-tip {
    margin-top: 8px;
    font-size: 12px;
    color: #909399;
}
.ask-nickname-check-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #f56c6c;
}
.ask-nickname-check-hint.is-ok {
    color: #67c23a;
}
.ask-jn-notice--warn {
    background: #fdf6ec;
    border-color: #faecd8;
    color: #e6a23c;
}
.ask-jn-notice--warn i {
    color: #e6a23c;
}

.ask-profile-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ask-profile-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ebeef5;
}

.ask-profile-avatar-block .el-avatar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    line-height: 1 !important;
}
.ask-profile-hint {
    margin: 0;
    font-size: 12px;
    color: #909399;
    line-height: 1.5;
    text-align: center;
}
.ask-profile-hint--warn {
    color: #e6a23c;
}
.ask-profile-upload {
    display: inline-block;
}

.ask-profile-cover-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ebeef5;
}

.ask-profile-cover-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
}

.ask-profile-cover-preview {
    height: 72px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #ebeef5;
    background: linear-gradient(135deg, #206be7 0%, #4a9eff 100%);
}

.ask-profile-cover-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ask-profile-cover-preset {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ask-profile-cover-preset:hover:not(:disabled) {
    transform: translateY(-1px);
}

.ask-profile-cover-preset.is-active {
    border-color: #206be7;
    box-shadow: 0 0 0 2px rgba(32, 107, 231, 0.2);
}

.ask-profile-cover-preset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 官方人员勋章 */
.ask-official-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 0 7px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--jn-color, #206be7);
    border-radius: 4px;
    vertical-align: middle;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.ask-official-badge__icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='rgba(255%2C255%2C255%2C0.28)'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M5.2 8.1l1.9 1.9 3.9-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ask-official-badge--mini {
    height: 16px;
    line-height: 16px;
    padding: 0 5px;
    font-size: 10px;
    margin-left: 4px;
}

.ask-official-badge--mini .ask-official-badge__icon {
    width: 11px;
    height: 11px;
}

.ask-user-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.ask-jn .user-avatar.is-official-user .el-avatar,
.ask-jn .el-avatar.is-official-user {
    box-shadow: 0 0 0 2px #fff, 0 0 0 2px var(--jn-color, #206be7);
}

.ask-jn .as-user-name {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.ask-jn .topic-meta .topic-author {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    color: var(--jn-gray, #666);
    font-size: 13px;
}

.ask-ip-location {
    color: #999;
    font-size: inherit;
    font-weight: 400;
    white-space: nowrap;
}

.ask-jn .as-user-meta .ask-ip-location {
    display: none;
}

.ask-form-editor-item .el-form-item__content {
    width: 100%;
    line-height: normal;
}

/* 富文本编辑器 — 观星云社区主题 */
.ask-rich-editor-wrap {
    --ask-ed-border: #e4e7ed;
    --ask-ed-border-hover: #c8cdd4;
    --ask-ed-focus: #206be7;
    --ask-ed-focus-ring: rgba(32, 107, 231, 0.14);
    --ask-ed-toolbar-bg: #f8f9fb;
    --ask-ed-toolbar-border: #eef0f3;
    --ask-ed-body-bg: #fff;
    --ask-ed-radius: 8px;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ask-rich-editor-wrap .tox-tinymce {
    width: 100% !important;
    max-width: 100%;
    border: 1px solid var(--ask-ed-border) !important;
    border-radius: var(--ask-ed-radius) !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    background: var(--ask-ed-body-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ask-rich-editor-wrap .tox-tinymce:hover {
    border-color: var(--ask-ed-border-hover) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.ask-rich-editor-wrap .tox-tinymce:focus-within {
    border-color: var(--ask-ed-focus) !important;
    box-shadow: 0 0 0 3px var(--ask-ed-focus-ring), 0 2px 8px rgba(32, 107, 231, 0.08);
}

.ask-rich-editor-wrap .tox-editor-container,
.ask-rich-editor-wrap .tox-editor-header,
.ask-rich-editor-wrap .tox-sidebar-wrap,
.ask-rich-editor-wrap .tox-edit-area {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

.ask-rich-editor-wrap .tox-editor-header {
    border-bottom: 1px solid var(--ask-ed-toolbar-border) !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.ask-rich-editor-wrap .tox .tox-toolbar-overlord {
    background: var(--ask-ed-toolbar-bg) !important;
    padding: 0 !important;
}

.ask-rich-editor-wrap .tox .tox-toolbar,
.ask-rich-editor-wrap .tox .tox-toolbar__overflow,
.ask-rich-editor-wrap .tox .tox-toolbar__primary {
    background: var(--ask-ed-toolbar-bg) !important;
    flex-wrap: wrap !important;
    padding: 4px 8px !important;
}

.ask-rich-editor-wrap .tox .tox-toolbar__overflow {
    flex-shrink: 0;
}

.ask-rich-editor-wrap .tox .tox-tbtn--select.tox-tbtn--bespoke {
    max-width: 90px;
}

.ask-rich-editor-wrap .tox .tox-toolbar__group {
    padding: 0 4px;
    border-right: 1px solid var(--ask-ed-toolbar-border);
    margin: 0;
    flex-shrink: 0;
}

.ask-rich-editor-wrap .tox .tox-toolbar__group:last-child {
    border-right: none;
}

.ask-rich-editor-wrap .tox .tox-tbtn {
    border-radius: 4px;
    margin: 1px;
    color: #606266;
    transition: background 0.15s ease, color 0.15s ease;
}

.ask-rich-editor-wrap .tox .tox-tbtn:hover {
    background: rgba(32, 107, 231, 0.08) !important;
    color: var(--ask-ed-focus) !important;
}

.ask-rich-editor-wrap .tox .tox-tbtn--enabled,
.ask-rich-editor-wrap .tox .tox-tbtn--enabled:hover {
    background: rgba(32, 107, 231, 0.12) !important;
    color: var(--ask-ed-focus) !important;
}

.ask-rich-editor-wrap .tox .tox-tbtn svg {
    fill: currentColor;
}

.ask-rich-editor-wrap .tox .tox-split-button:hover {
    box-shadow: none;
}

.ask-rich-editor-wrap .tox .tox-split-button__chevron {
    border-radius: 0 4px 4px 0;
}

.ask-rich-editor-wrap .tox .tox-listboxfield .tox-listbox--select,
.ask-rich-editor-wrap .tox .tox-selectfield select {
    border-radius: 4px;
    border-color: var(--ask-ed-border);
    font-size: 13px;
}

.ask-rich-editor-wrap .tox .tox-listboxfield .tox-listbox--select:focus,
.ask-rich-editor-wrap .tox .tox-selectfield select:focus {
    border-color: var(--ask-ed-focus);
}

.ask-rich-editor-wrap .tox-edit-area {
    border-top: none !important;
}

.ask-rich-editor-wrap .tox-edit-area__iframe {
    background: var(--ask-ed-body-bg) !important;
}

.ask-rich-editor-wrap .tox-edit-area iframe {
    width: 100% !important;
}

.ask-rich-editor-wrap .tox .tox-statusbar {
    display: none !important;
}

/* 弹窗内编辑回复 */
.ask-editor-dialog .ask-rich-editor-wrap .tox-tinymce,
.el-dialog__body .ask-rich-editor-wrap .tox-tinymce {
    border-radius: var(--ask-ed-radius) !important;
}

.ask-post-page-editor {
    flex: 1;
    min-height: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ask-post-page-editor.ask-rich-editor-wrap {
    min-height: 280px;
}

.ask-post-page-editor .tox-tinymce {
    flex: 1;
    min-height: 0;
}

.ask-reply-editor {
    min-height: 280px;
}

.ask-sub-reply-editor.ask-rich-editor-wrap {
    min-height: 200px;
}

.ask-dialog-editor.ask-rich-editor-wrap {
    min-height: 220px;
}

.ask-editor-dialog .el-dialog__body {
    padding: 16px 20px 8px;
}

@media (max-width: 768px) {
    .ask-rich-editor-wrap {
        --ask-ed-radius: 6px;
    }

    .ask-rich-editor-wrap .tox .tox-toolbar,
    .ask-rich-editor-wrap .tox .tox-toolbar__primary {
        padding: 4px 6px !important;
    }

    .ask-post-page-editor,
    .ask-post-page-editor.ask-rich-editor-wrap {
        min-height: 220px;
    }

    .ask-reply-editor {
        min-height: 220px;
    }
}

.ask-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: #909399;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.ask-report-btn:hover {
    color: #f56c6c;
    background: rgba(245, 108, 108, 0.08);
}

.ask-report-btn i {
    font-size: 14px;
}

.ask-report-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ask-report-target {
    margin: 0;
    color: #606266;
    font-size: 14px;
}

.ask-report-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ask-report-reason-btn {
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #606266;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.ask-report-reason-btn.is-active,
.ask-report-reason-btn:hover {
    border-color: #f56c6c;
    color: #f56c6c;
    background: rgba(245, 108, 108, 0.06);
}

.ask-report-images-head {
    font-size: 13px;
    color: #909399;
    margin-bottom: 8px;
}

.ask-report-image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ask-report-image-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ebeef5;
}

.ask-report-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ask-report-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ask-report-upload-btn {
    width: 72px;
    height: 72px;
    border: 1px dashed #dcdfe6;
    border-radius: 6px;
    background: #fafafa;
    color: #909399;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
}

.ask-report-upload-btn:disabled,
.ask-report-upload-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 问答社区消息提醒（右侧边栏，与 q-btn-plain 对齐） */
.ask-notify-entry {
    display: contents;
}

.ask-jn .q-btn-plain .ask-notify-sidebar-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f56c6c;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.ask-jn-space-actions .ask-notify-entry + .jn-author-btn,
.ask-jn-space-actions .jn-author-btn + .ask-notify-entry {
    margin-top: 0;
}

.ask-jn-space-actions .ask-notify-entry .q-btn-plain {
    width: 100%;
    margin-top: 10px;
}

.ask-notify-drawer .el-drawer__header {
    margin-bottom: 0;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #ebeef5;
}

.ask-notify-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-right: 24px;
}

.ask-notify-drawer-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.ask-notify-drawer-title i {
    color: #206be7;
    margin-right: 6px;
}

.ask-notify-read-all {
    border: none;
    background: none;
    color: #206be7;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.ask-notify-read-all:disabled {
    color: #c0c4cc;
    cursor: not-allowed;
}

.ask-notify-drawer-body {
    min-height: 200px;
    padding: 0 0 16px;
}

.ask-notify-empty {
    padding: 48px 20px;
    text-align: center;
    color: #909399;
}

.ask-notify-empty i {
    font-size: 42px;
    color: #dcdfe6;
    display: block;
    margin-bottom: 12px;
}

.ask-notify-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ask-notify-item {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid #f2f3f5;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ask-notify-item:hover,
.ask-notify-item.is-active {
    background: #f5f9ff;
}

.ask-notify-item.is-unread {
    background: #fafcff;
}

.ask-notify-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: #206be7;
}

.ask-notify-item-main {
    flex: 1;
    min-width: 0;
}

.ask-notify-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    line-height: 1.5;
    margin-bottom: 4px;
}

.ask-notify-item-text {
    font-size: 13px;
    color: #606266;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ask-notify-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #909399;
}

.ask-notify-item-delete {
    border: none;
    background: none;
    color: #c0c4cc;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
}

.ask-notify-item-delete:hover {
    color: #f56c6c;
}

.ask-notify-more {
    padding: 12px 20px 0;
    text-align: center;
}
