.rich-editor-wrapper{position:relative;border:1px solid color-mix(in srgb,var(--foreground) 15%,transparent);border-radius:8px;overflow:hidden;background:var(--card);color:var(--card-foreground)}.editor-content-scroll{overflow-y:auto}.editor-resize-handle{width:100%;height:10px;cursor:ns-resize;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--foreground) 4%,var(--card));border:0;border-top:1px solid color-mix(in srgb,var(--foreground) 10%,transparent);padding:0;user-select:none;touch-action:none;transition:background .15s}.editor-resize-handle:focus-visible{outline:3px solid var(--ring);outline-offset:-3px}.editor-resize-handle:hover{background:color-mix(in srgb,var(--foreground) 10%,var(--card))}.editor-resize-handle:after{content:"";width:40px;height:4px;border-radius:2px;background:color-mix(in srgb,var(--foreground) 25%,transparent)}@media (max-width:768px){.editor-resize-handle{display:none}}.editor-toolbar{display:flex;align-items:center;gap:2px;padding:8px 12px;border-bottom:1px solid color-mix(in srgb,var(--foreground) 12%,transparent);background:color-mix(in srgb,var(--foreground) 4%,var(--card));flex-wrap:wrap}@media (max-width:768px){.editor-toolbar{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:12px}.editor-toolbar::-webkit-scrollbar{display:none}}.editor-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border:none;border-radius:4px;background:transparent;cursor:pointer;font-size:14px;font-weight:600;color:var(--card-foreground);transition:background .15s,color .15s}.editor-toolbar-btn:hover{background:color-mix(in srgb,var(--foreground) 10%,transparent)}.editor-toolbar-btn.is-active{background:var(--primary);color:#fff}.editor-toolbar-separator{width:1px;height:20px;background:color-mix(in srgb,var(--foreground) 15%,transparent);margin:0 4px}.editor-toolbar-container{flex:1}.editor-toolbar-container .editor-toolbar{border-bottom:none}.editor-link-input-row{display:flex;align-items:center;gap:6px;padding:6px 12px;border-top:1px solid color-mix(in srgb,var(--foreground) 12%,transparent);background:color-mix(in srgb,var(--foreground) 4%,var(--card))}.editor-link-input-label{font-size:14px;flex-shrink:0}.editor-link-input{flex:1;padding:5px 10px;border:1px solid color-mix(in srgb,var(--foreground) 20%,transparent);border-radius:4px;font-size:13px;outline:none;background:var(--card);color:var(--card-foreground)}.editor-link-input:focus{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 20%,transparent)}.editor-link-input-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid color-mix(in srgb,var(--foreground) 20%,transparent);border-radius:4px;background:var(--card);cursor:pointer;font-size:14px;font-weight:700;transition:all .15s}.editor-link-input-btn.apply{color:var(--success,#16a34a)}.editor-link-input-btn.apply:hover{background:var(--success,#16a34a);color:#fff;border-color:var(--success,#16a34a)}.editor-link-input-btn.remove{color:var(--destructive,#dc2626)}.editor-link-input-btn.remove:hover{background:var(--destructive,#dc2626);color:#fff;border-color:var(--destructive,#dc2626)}.editor-color-picker{display:flex;align-items:center;gap:6px;padding:6px 12px;border-top:1px solid color-mix(in srgb,var(--foreground) 12%,transparent);background:color-mix(in srgb,var(--foreground) 4%,var(--card));flex-wrap:wrap}.editor-color-swatch{width:24px;height:24px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:transform .15s,border-color .15s,box-shadow .15s;padding:0}.editor-color-swatch:hover{transform:scale(1.2);box-shadow:0 2px 8px color-mix(in srgb,var(--foreground) 20%,transparent)}.editor-color-swatch.is-active{border-color:var(--card-foreground);box-shadow:0 0 0 2px var(--card),0 0 0 4px var(--card-foreground)}.editor-color-reset{margin-left:4px;padding:4px 10px;border:1px solid color-mix(in srgb,var(--foreground) 20%,transparent);border-radius:4px;background:var(--card);color:var(--muted-foreground,#64748b);cursor:pointer;font-size:12px;transition:all .15s}.editor-color-reset:hover{background:color-mix(in srgb,var(--foreground) 10%,var(--card));color:var(--card-foreground)}.editor-color-custom{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:16px;position:relative;transition:transform .15s}.editor-color-custom:hover{transform:scale(1.2)}.editor-color-custom-input{position:absolute;width:0;height:0;padding:0;border:0;opacity:0}.rich-editor-content{padding:16px 20px;background:var(--card);color:var(--card-foreground)}.rich-editor-content .ProseMirror,.rich-editor-content .tiptap{outline:none;min-height:inherit;background-color:var(--card);color:var(--card-foreground);color-scheme:light dark}.rich-editor-content .tiptap p{margin:0 0 .75em;line-height:1.7}.rich-editor-content .tiptap h2{font-size:1.4em;font-weight:700;margin:1.2em 0 .6em}.rich-editor-content .tiptap h3{font-size:1.2em;font-weight:700;margin:1em 0 .5em}.rich-editor-content .tiptap h4{font-size:1.05em;font-weight:700;margin:.8em 0 .4em}.rich-editor-content .tiptap img{max-width:100%;height:auto;border-radius:4px;margin:.5em 0;cursor:pointer}.rich-editor-content .tiptap img.ProseMirror-selectednode{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}.rich-editor-content .tiptap .video-embed{position:relative;margin:.75em 0;border-radius:6px;overflow:hidden;background:color-mix(in srgb,var(--foreground) 5%,var(--card))}.rich-editor-content .tiptap .video-embed:after{content:"";position:absolute;inset:0;z-index:1;cursor:pointer}.rich-editor-content .tiptap .video-embed iframe{display:block;width:100%;aspect-ratio:16/9;border:0}.rich-editor-content .tiptap .video-embed.ProseMirror-selectednode{outline:2px solid var(--primary);outline-offset:2px}.rich-editor-wrapper .rich-editor-preview .video-embed:after{display:none}.rich-editor-content .tiptap a{color:var(--primary);text-decoration:underline}.rich-editor-content .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:color-mix(in srgb,var(--foreground) 35%,transparent);pointer-events:none;height:0}.editor-toolbar-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid color-mix(in srgb,var(--foreground) 12%,transparent);background:color-mix(in srgb,var(--foreground) 4%,var(--card))}.editor-toolbar-row .editor-toolbar-container{flex:1;min-width:0}.editor-mode-toggles{display:flex;align-items:center;gap:2px;padding:6px 12px;flex-shrink:0}.editor-mode-toggles.preview-active{flex:1;justify-content:flex-end}@media (max-width:768px){.editor-toolbar-row{flex-direction:column;align-items:stretch}.editor-toolbar-row .editor-toolbar-container{width:100%}.editor-mode-toggles{justify-content:flex-end;flex-wrap:wrap;border-top:1px solid color-mix(in srgb,var(--foreground) 12%,transparent)}}.editor-mode-btn{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border:1px solid color-mix(in srgb,var(--foreground) 15%,transparent);border-radius:6px;background:var(--card);cursor:pointer;font-size:13px;color:color-mix(in srgb,var(--foreground) 65%,transparent);transition:all .15s;white-space:nowrap}.editor-mode-btn:hover{background:color-mix(in srgb,var(--foreground) 8%,var(--card))}.editor-mode-btn.is-active{background:var(--primary);color:#fff;border-color:var(--primary)}.rich-editor-preview{padding:24px 28px;line-height:1.8;color:var(--card-foreground)}.rich-editor-wrapper .rich-editor-preview p{margin:0 0 .75em;line-height:1.8}.rich-editor-wrapper .rich-editor-preview h2{font-size:1.4em;font-weight:700;margin:1.2em 0 .6em;border-bottom:2px solid color-mix(in srgb,var(--foreground) 10%,transparent);padding-bottom:.3em}.rich-editor-wrapper .rich-editor-preview h3{font-size:1.2em;font-weight:700;margin:1em 0 .5em}.rich-editor-wrapper .rich-editor-preview h4{font-size:1.05em;font-weight:700;margin:.8em 0 .4em}.rich-editor-wrapper .rich-editor-preview img{max-width:100%;height:auto;border-radius:4px;margin:.5em 0}.rich-editor-wrapper .rich-editor-preview a{color:var(--primary);text-decoration:underline}.rich-editor-preview strong{font-weight:700}.rich-editor-preview em{font-style:italic}.rich-editor-preview.is-trusted{padding:0;line-height:inherit}.rich-editor-preview.is-trusted h2,.rich-editor-preview.is-trusted h3,.rich-editor-preview.is-trusted h4,.rich-editor-preview.is-trusted p{margin:0;padding:0;border:0;font-size:inherit;font-weight:inherit;line-height:inherit}.rich-editor-preview.is-trusted a{color:inherit;text-decoration:inherit}.rich-editor-html-textarea{width:100%;display:block;border:none;outline:none;resize:vertical;padding:12px 16px;background:#1e1e2e;color:#a6e3a1;font-family:Fira Code,SF Mono,Cascadia Code,Consolas,monospace;font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:2;box-sizing:border-box}.editor-image-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 16px;background:var(--secondary);color:var(--secondary-foreground);border-top:1px solid color-mix(in srgb,var(--foreground) 12%,transparent);animation:imageToolbarIn .15s ease-out}@keyframes imageToolbarIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.editor-image-toolbar-title{font-size:13px;font-weight:600;white-space:nowrap}.editor-image-toolbar-label{font-size:12px;opacity:.7;white-space:nowrap}.editor-image-toolbar-group{display:flex;align-items:center;gap:4px}.editor-image-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:30px;padding:0 8px;border:1px solid color-mix(in srgb,var(--secondary-foreground) 20%,transparent);border-radius:6px;background:color-mix(in srgb,var(--secondary-foreground) 8%,transparent);cursor:pointer;font-size:12px;font-weight:600;color:var(--secondary-foreground);transition:all .15s;white-space:nowrap}.editor-image-toolbar-btn:hover{background:color-mix(in srgb,var(--secondary-foreground) 18%,transparent)}.editor-image-toolbar-btn.is-active{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:0 0 6px color-mix(in srgb,var(--primary) 40%,transparent)}.editor-image-toolbar-btn.delete:hover{background:var(--destructive,#ef4444);color:#fff;border-color:var(--destructive,#ef4444)}.editor-image-toolbar-sep{width:1px;height:20px;background:color-mix(in srgb,var(--secondary-foreground) 20%,transparent)}.editor-image-link-row{display:flex;align-items:center;gap:6px;width:100%;margin-top:4px;padding-top:6px;border-top:1px solid color-mix(in srgb,var(--secondary-foreground) 12%,transparent)}.editor-image-link-input{flex:1;min-width:200px;padding:5px 10px;border:1px solid color-mix(in srgb,var(--secondary-foreground) 25%,transparent);border-radius:4px;font-size:13px;outline:none;background:color-mix(in srgb,var(--secondary-foreground) 8%,transparent);color:var(--secondary-foreground)}.editor-image-link-input:focus{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 25%,transparent)}.editor-image-link-apply,.editor-image-link-remove{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid color-mix(in srgb,var(--secondary-foreground) 20%,transparent);border-radius:4px;background:color-mix(in srgb,var(--secondary-foreground) 8%,transparent);cursor:pointer;font-size:14px;font-weight:700;color:var(--secondary-foreground);transition:all .15s}.editor-image-link-apply:hover{background:var(--success,#16a34a);color:#fff;border-color:var(--success,#16a34a)}.editor-image-link-remove:hover{background:var(--destructive,#ef4444);color:#fff;border-color:var(--destructive,#ef4444)}.draft-badge{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--primary);color:#fff;font-size:10px;font-weight:700;margin-left:2px}