*{box-sizing:border-box;margin:0;padding:0}:root{--primary:#1a365d;--primary-light:#2563eb;--bg:#f8fafc;--card:#fff;--border:#e2e8f0;--text:#1e293b;--text-light:#64748b;--success:#059669;--error:#dc2626}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.6}.header{background:var(--primary);color:#fff;padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 8px rgba(0,0,0,.15)}.header h1{font-size:1.4rem;font-weight:700;letter-spacing:-.5px}.header-nav{display:flex;gap:1rem}.btn{padding:.5rem 1.2rem;border:none;border-radius:6px;font-size:.9rem;font-weight:600;cursor:pointer;transition:all .2s}.btn-primary{background:var(--primary-light);color:#fff}.btn-primary:hover{background:#1d4ed8}.btn-secondary{background:#fff;color:var(--primary);border:1px solid var(--border)}.btn-secondary:hover{background:#f1f5f9}.btn-success{background:var(--success);color:#fff}.btn-success:hover{background:#047857}.btn-upload{background:#7c3aed;color:#fff}.btn-upload:hover{background:#6d28d9}.btn:disabled{opacity:.5;cursor:not-allowed}.main{max-width:900px;margin:2rem auto;padding:0 1.5rem}.card{background:var(--card);border-radius:12px;padding:2rem;box-shadow:0 1px 3px rgba(0,0,0,.08);border:1px solid var(--border);margin-bottom:1.5rem}.card h2{font-size:1.1rem;color:var(--primary);margin-bottom:1rem}.url-section{text-align:center;padding:3rem 2rem}.url-section h2{font-size:1.5rem;margin-bottom:.5rem}.url-section p{color:var(--text-light);margin-bottom:1.5rem}.url-input-group{display:flex;gap:.75rem;max-width:600px;margin:0 auto}.url-input-group input{flex:1 1;padding:.75rem 1rem;border:2px solid var(--border);border-radius:8px;font-size:1rem;outline:none;transition:border-color .2s}.url-input-group input:focus{border-color:var(--primary-light)}.loading{text-align:center;padding:3rem}.spinner{width:40px;height:40px;border:4px solid var(--border);border-top-color:var(--primary-light);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 1rem}@keyframes spin{to{transform:rotate(1turn)}}.loading-message{animation:fadeInOut 3s ease-in-out infinite;font-weight:500}@keyframes fadeInOut{0%{opacity:0;transform:translateY(4px)}15%{opacity:1;transform:translateY(0)}85%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}.error{background:#fef2f2;border:1px solid #fecaca;color:var(--error);padding:1rem;border-radius:8px;margin-bottom:1rem;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.btn-switch-mode{background:var(--primary-light);color:#fff;border:none;padding:.4rem 1rem;border-radius:6px;cursor:pointer;font-size:.85rem;font-weight:500;white-space:nowrap}.btn-switch-mode:hover{background:var(--primary)}.url-hint{width:100%;margin-top:.5rem;font-size:.85rem;color:var(--text-light);background:#fffbeb;border:1px solid #fde68a;padding:.6rem .8rem;border-radius:6px}.link-btn{background:none;border:none;color:var(--primary-light);text-decoration:underline;cursor:pointer;font-size:inherit;padding:0;font-weight:600}.bookmarklet-section h3{margin-bottom:.5rem;color:var(--primary)}.bookmarklet-drag-area{display:flex;justify-content:center;padding:1.5rem;margin:1rem 0;background:#f0f9ff;border:2px dashed #93c5fd;border-radius:10px}.bookmarklet-link{display:inline-block;padding:.75rem 1.5rem;background:linear-gradient(135deg,var(--primary-light),var(--primary));color:#fff!important;text-decoration:none!important;border-radius:8px;font-size:1.1rem;font-weight:600;cursor:-webkit-grab;cursor:grab;box-shadow:0 3px 10px rgba(37,99,235,.3);transition:transform .15s,box-shadow .15s}.bookmarklet-link:hover{transform:translateY(-2px);box-shadow:0 5px 15px rgba(37,99,235,.4)}.bookmarklet-link:active{cursor:-webkit-grabbing;cursor:grabbing}.bookmarklet-steps{margin-top:1rem;padding:1rem;background:#fafafa;border-radius:8px}.bookmarklet-steps h4{margin-bottom:.75rem;color:var(--primary);font-size:.95rem}.bookmarklet-steps ol{padding-left:1.25rem;list-style:decimal}.bookmarklet-steps li{padding:.3rem 0;font-size:.9rem;color:var(--text);line-height:1.5}.editor-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.editor-actions{display:flex;gap:.5rem}.pdf-path-info{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;padding:.6rem 1rem;border-radius:8px;margin-bottom:1rem;font-size:.9rem}.pdf-path-info code{background:#dcfce7;padding:2px 6px;border-radius:4px;font-size:.85rem;word-break:break-all}.toolbar{display:flex;gap:4px;padding:.5rem;background:#f8fafc;border:1px solid var(--border);border-radius:8px 8px 0 0;flex-wrap:wrap}.toolbar button{padding:.35rem .65rem;border:1px solid transparent;border-radius:4px;background:transparent;cursor:pointer;font-size:.85rem;font-weight:600;color:var(--text-light);transition:all .15s}.toolbar button:hover{background:#fff;border-color:var(--border);color:var(--text)}.toolbar button.is-active{background:var(--primary-light);color:#fff;border-color:var(--primary-light)}.editor-content{border:1px solid var(--border);border-top:none;border-radius:0 0 8px 8px;min-height:300px;padding:1rem}.editor-content .tiptap{outline:none;min-height:280px}.editor-content .tiptap h2{font-size:1.3rem;margin:1.2rem 0 .5rem;color:var(--primary)}.editor-content .tiptap h3{font-size:1.1rem;margin:1rem 0 .4rem;color:var(--primary)}.editor-content .tiptap p{margin-bottom:.6rem}.editor-content .tiptap ol,.editor-content .tiptap ul{padding-left:1.5rem;margin-bottom:.6rem}.editor-content .tiptap img{max-width:100%;height:auto;border-radius:8px;margin:.5rem 0;display:block}.image-node-wrapper{position:relative;display:inline-block;max-width:100%;margin:.5rem 0}.image-node-wrapper img{display:block;max-width:100%;height:auto;border-radius:8px}.image-action-buttons{position:absolute;top:8px;right:8px;display:flex;gap:6px;opacity:0;transition:opacity .2s}.image-node-wrapper:hover .image-action-buttons{opacity:1}.image-delete-btn,.image-enhance-btn{width:32px;height:32px;border-radius:50%;border:none;font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,.3);transition:transform .15s}.image-delete-btn:hover,.image-enhance-btn:hover{transform:scale(1.1)}.image-enhance-btn{background:rgba(37,99,235,.9);color:#fff}.image-delete-btn{background:rgba(220,38,38,.9);color:#fff}.enhance-dropdown{position:absolute;top:48px;right:8px;background:#fff;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,.2);overflow:hidden;z-index:50;min-width:180px;animation:dropdownIn .15s ease-out}@keyframes dropdownIn{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.enhance-dropdown button{display:block;width:100%;padding:10px 16px;border:none;background:none;font-size:.9rem;text-align:left;cursor:pointer;transition:background .15s}.enhance-dropdown button:hover{background:#f1f5f9}.enhance-divider{height:1px;background:#e2e8f0;margin:2px 0}.enhance-delete-option{color:#dc2626}.enhance-delete-option:hover{background:#fef2f2!important}.image-enhancing-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.85);border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;z-index:40;font-weight:600;color:var(--primary)}.enhance-spinner{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--primary-light);border-radius:50%;animation:spin .8s linear infinite}.editor-content .tiptap strong{font-weight:700}.images-section{margin-top:1rem}.images-section h3{margin-bottom:.75rem;color:var(--primary)}.images-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-gap:.75rem;gap:.75rem}.images-grid img{height:180px;object-fit:cover;border-radius:8px}.email-section textarea,.images-grid img{width:100%;border:1px solid var(--border)}.email-section textarea{min-height:220px;padding:1rem;border-radius:8px;font-family:inherit;font-size:.95rem;line-height:1.6;resize:vertical;outline:none}.email-section textarea:focus{border-color:var(--primary-light)}.copy-btn{margin-top:.75rem}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:100}.modal{background:#fff;border-radius:12px;padding:2rem;width:90%;max-width:480px;box-shadow:0 20px 60px rgba(0,0,0,.2)}.modal h2{color:var(--primary);margin-bottom:1.5rem}.form-group{margin-bottom:1rem}.form-group label{display:block;font-size:.85rem;font-weight:600;color:var(--text-light);margin-bottom:.3rem}.form-group input{width:100%;padding:.6rem .8rem;border:1px solid var(--border);border-radius:6px;font-size:.95rem;outline:none}.form-group input:focus{border-color:var(--primary-light)}.modal-actions{display:flex;gap:.75rem;justify-content:flex-end;margin-top:1.5rem}.mode-toggle{display:flex;justify-content:center;gap:0;margin-bottom:1.5rem;background:#f1f5f9;border-radius:8px;padding:4px;max-width:400px;margin-left:auto;margin-right:auto}.mode-btn{flex:1 1;padding:.5rem 1rem;border:none;border-radius:6px;background:transparent;font-size:.9rem;font-weight:600;color:var(--text-light);cursor:pointer;transition:all .2s}.mode-btn.active{background:#fff;color:var(--primary);box-shadow:0 1px 3px rgba(0,0,0,.1)}.text-input-section{max-width:650px;margin:0 auto;text-align:left}.paste-textarea{width:100%;padding:1rem;border:2px solid var(--border);border-radius:8px;font-family:inherit;font-size:.95rem;line-height:1.5;resize:vertical;outline:none;transition:border-color .2s}.paste-textarea:focus{border-color:var(--primary-light)}.hint{font-size:.85rem;color:var(--text-light);margin-bottom:.75rem;line-height:1.5}.hint strong{background:#f1f5f9;padding:1px 5px;border-radius:3px;font-size:.8rem}.source-textarea{font-family:Courier New,monospace;font-size:.8rem;line-height:1.3}.drop-zone{margin-top:1rem;padding:2rem;border:2px dashed var(--border);border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;background:#fafbfc}.drop-zone.drag-over,.drop-zone:hover{border-color:var(--primary-light);background:#eef2ff}.drop-zone p{font-size:.9rem;color:var(--text-light);margin:0}.drop-hint{font-size:.8rem;color:#94a3b8}.upload-previews{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.preview-thumb{position:relative;width:80px;height:80px}.preview-thumb img{width:100%;height:100%;object-fit:cover;border-radius:6px;border:1px solid var(--border)}.remove-btn{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;background:var(--error);color:#fff;border:none;font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}@media (max-width:640px){.url-input-group{flex-direction:column}.editor-header,.header{flex-direction:column;gap:.75rem}.editor-header{align-items:flex-start}}