/* ===== Markdown 工具栏（参考图样式：浅灰圆角方块按钮，分组间竖线） ===== */
.thread-editor .thread-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:10px;border:1px solid #d9dfe8;border-bottom:0;border-radius:10px 10px 0 0;background:#fff}
.thread-editor .thread-toolbar .thread-tb-sep{width:1px;height:20px;background:#e2e8f0;margin:0 4px}
.thread-editor .thread-toolbar button{min-width:34px;height:32px;padding:0 8px;border:0;border-radius:8px;background:#f1f3f5;color:#343a40;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s ease}
.thread-editor .thread-toolbar button:hover{background:#e2e6ea}
.thread-editor .thread-toolbar button i{font-size:13px}
.thread-editor .thread-toolbar .thread-tb-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.thread-editor .thread-preview-toggle{display:inline-flex;align-items:center;gap:8px;cursor:pointer;user-select:none;font-size:13px;color:#5b6577}
.thread-editor .thread-preview-toggle input{position:absolute;opacity:0;width:0;height:0}
.thread-editor .thread-preview-switch{width:38px;height:20px;border-radius:999px;background:#ced4da;position:relative;transition:background .2s ease;flex-shrink:0}
.thread-editor .thread-preview-switch::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .2s ease}
.thread-editor .thread-preview-toggle input:checked + .thread-preview-switch{background:var(--thread-primary, #1677ff)}
.thread-editor .thread-preview-toggle input:checked + .thread-preview-switch::after{left:20px}
/* ===== 编辑器与预览面板 ===== */
.thread-editor{border:1px solid #d9dfe8;border-radius:0 0 10px 10px;background:#f1f3f5}
.thread-editor textarea{display:block;width:100%;min-height:280px;border:0;outline:none;background:transparent;padding:16px;font-size:14px;line-height:1.8;color:#343a40;resize:vertical;font-family:inherit}
.thread-editor textarea::placeholder{color:#adb5bd}
.thread-editor .thread-preview-pane{display:none;min-height:280px;padding:16px;background:#fff;overflow:auto}
.thread-editor.is-preview textarea{display:none}
.thread-editor.is-preview .thread-preview-pane{display:block}
.thread-editor.is-preview .thread-toolbar button[data-md]{opacity:.4;pointer-events:none}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md){font-size:14px;line-height:1.9;color:#343a40;word-break:break-word}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h1,:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h2,:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h3,:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h4,:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h5,:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h6{margin:14px 0 8px;line-height:1.4}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h1{font-size:24px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h2{font-size:20px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) h3{font-size:17px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) p{margin:0 0 10px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) ul,:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) ol{margin:0 0 10px;padding-left:22px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) blockquote{margin:0 0 10px;padding:8px 14px;border-left:4px solid #d9dfe8;background:#f8f9fa;color:#5b6577}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) pre{margin:0 0 10px;padding:12px;background:#212529;color:#f1f3f5;border-radius:8px;overflow:auto}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) pre code{background:transparent;color:inherit;padding:0}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) code{background:#eef2ff;color:#4263eb;padding:1px 5px;border-radius:4px;font-size:13px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) img{max-width:100%;border-radius:8px}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) a{color:var(--thread-primary, #1677ff)}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) hr{border:0;border-top:1px solid #e2e8f0;margin:14px 0}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) details{margin:0 0 10px;border:1px solid #e2e8f0;border-radius:8px;padding:8px 12px;background:#f8f9fa}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) summary{cursor:pointer;font-weight:600;color:#495057}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) .more-video{position:relative;padding-top:56.25%;margin:0 0 10px;border-radius:8px;overflow:hidden}
:is(.thread-editor .thread-preview-pane .thread-md,#tudou-reviews-root .tr-feedback-body.thread-md) .more-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.thread-editor .thread-md-loading{padding:24px;text-align:center;color:#98a2b3;font-size:13px}
.thread-editor textarea:focus-visible{outline:2px solid var(--thread-primary, #1677ff);outline-offset:-2px}
.thread-editor .thread-preview-toggle input:focus-visible + .thread-preview-switch{outline:2px solid var(--thread-primary, #1677ff);outline-offset:2px}
.thread-editor button:disabled{opacity:.4;cursor:default}
@media(max-width:767.98px){
  .thread-editor .thread-toolbar{gap:4px;padding:8px}
  .thread-editor .thread-toolbar button{min-width:30px;height:30px}
}
