/* ========== 统一编辑器样式（前后端共用） ========== */
/* 由 css/style.css 和 admin/css/admin.css 共同引用；
   尺寸采用前端的紧凑样式（180-400px 高度、14.5px 字号、1.7 行高、200px 图片最大高度） */

#editorContainer, #unifiedEditorContainer {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
}

.unified-editor-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    padding: 6px 8px;
    border: 1px solid var(--line, #e5e7eb);
    border-bottom: none;
    border-radius: var(--radius-sm, 6px) var(--radius-sm, 6px) 0 0;
    background: #fafbfc;
    position: relative;
    flex-shrink: 0;
}
.editor-btn {
    display: inline-flex; align-items: center; gap: 4px;
    height: 30px; padding: 0 10px;
    border: 1px solid #e2e8f0; border-radius: 6px;
    background: white; font-size: 12.5px; font-weight: 600;
    color: var(--t2, #475569); cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.editor-btn:hover {
    border-color: var(--pri, #1D5BFF); color: var(--pri, #1D5BFF);
    background: rgba(29,91,255,0.06);
}
.editor-btn.active {
    background: var(--pri, #1D5BFF); color: white; border-color: var(--pri, #1D5BFF);
}
.editor-btn-sep {
    display: inline-block;
    width: 1px; height: 18px;
    background: #e2e8f0;
    margin: 0 4px;
}
.unified-editor {
    min-height: 200px; flex: 1; padding: 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 0 0 var(--radius-sm, 6px) var(--radius-sm, 6px);
    font-size: 14.5px; line-height: 1.7; background: #fafbfd;
    overflow-y: auto; color: var(--t1, #111827);
    outline: none; transition: border-color 0.15s, background 0.15s;
    word-break: break-word;
}
.unified-editor:focus { border-color: var(--pri, #1D5BFF); background: white; }
.unified-editor:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af; pointer-events: none;
}
.unified-editor img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    cursor: pointer;
    /* 行内块：图片与文字可在同一行，光标能落到图片右侧。
       display:block 时图片独占一行行盒，图右侧没有行内位置，
       浏览器只能把光标放到下一行（表现为"点图片右侧就自动换行"）。
       间距只用 margin，不用 padding：Chrome 画插入光标会把 inline-block 的
       padding 算进光标高度，14px 上下内边距会让光标比图片本身长一截 */
    display: inline-block;
    vertical-align: middle;
    margin: 10px 8px;
}
.unified-editor img.img-selected {
    outline: 2px solid var(--pri, #1D5BFF);
    outline-offset: 2px;
    border-radius: 4px;
}
.unified-editor.uploading { opacity: 0.6; pointer-events: none; }
.unified-editor h1, #previewBody h1, .seg-card-body h1 { font-size: 1.6em; margin: 0.6em 0 0.3em; font-weight: 700; }
.unified-editor h2, #previewBody h2, .seg-card-body h2 { font-size: 1.4em; margin: 0.6em 0 0.3em; font-weight: 700; }
.unified-editor h3, #previewBody h3, .seg-card-body h3 { font-size: 1.2em; margin: 0.6em 0 0.3em; font-weight: 700; }
.unified-editor h4, #previewBody h4, .seg-card-body h4,
.unified-editor h5, #previewBody h5, .seg-card-body h5,
.unified-editor h6, #previewBody h6, .seg-card-body h6 { margin: 0.5em 0 0.25em; font-weight: 700; }
.unified-editor p, #previewBody p, .seg-card-body p { margin: 0.4em 0; }
.unified-editor ul, .unified-editor ol, #previewBody ul, #previewBody ol, .seg-card-body ul, .seg-card-body ol { margin: 0.4em 0; padding-left: 24px; }
.unified-editor li, #previewBody li, .seg-card-body li { margin: 0.2em 0; }
.unified-editor blockquote, #previewBody blockquote, .seg-card-body blockquote {
    border-left: 3px solid var(--pri-l, #7dd3fc);
    padding: 4px 12px;
    margin: 0.5em 0;
    color: var(--t2, #475569);
    background: rgba(29,91,255,0.04);
    border-radius: 0 4px 4px 0;
}
.unified-editor a, #previewBody a, .seg-card-body a { color: var(--pri, #1D5BFF); text-decoration: underline; }
.unified-editor code, #previewBody code, .seg-card-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Menlo', monospace;
    font-size: 0.9em;
}
.unified-editor pre, #previewBody pre, .seg-card-body pre {
    background: #f1f5f9;
    padding: 12px 14px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.5em 0;
    font-size: 0.9em;
    line-height: 1.6;
}
.unified-editor pre code, #previewBody pre code, .seg-card-body pre code {
    background: none; padding: 0;
}
.unified-editor table, #previewBody table, .seg-card-body table {
    width: 100%; border-collapse: collapse; margin: 0.5em 0;
}
.unified-editor th, .unified-editor td, #previewBody th, #previewBody td, .seg-card-body th, .seg-card-body td {
    border: 1px solid var(--line, #e5e7eb);
    padding: 6px 10px;
}
.unified-editor-source {
    min-height: 200px; flex: 1; padding: 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 0 0 var(--radius-sm, 6px) var(--radius-sm, 6px);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12.5px; line-height: 1.6;
    background: #1e293b; color: #e2e8f0;
    resize: none; outline: none;
    width: 100%; box-sizing: border-box;
}
/* 字数统计、最后更新时间、失效提示已迁移到弹窗 modal-head-meta / modal-foot-meta，
   由 editor.js 的 buildMetaHTML 生成，前后台共用此样式（前台 style.css + editor.css，
   后台 admin.css + editor.css 均引入） */

/* 弹窗标题右侧元信息（字数统计 + 最后更新时间） */
.modal-head-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    margin-right: 12px;
    min-width: 0;
    font-size: 12px;
    color: var(--t3, #94a3b8);
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.modal-head-meta:empty { display: none; }
.modal-head-meta .modal-head-updated { color: var(--t3, #94a3b8); }

/* 底部按钮行失效提示（与按钮同一行，左对齐，按钮靠右） */
.modal-foot-meta {
    margin-right: auto;
    display: flex;
    align-items: center;
    min-width: 0;
}
.modal-foot-meta:empty { display: none; }
.modal-foot-meta .modal-foot-expired {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #d97706;
    font-weight: 500;
    background: rgba(217, 119, 6, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    border-left: 3px solid #d97706;
    line-height: 1.4;
}
.modal-foot-meta .modal-foot-expired svg { flex-shrink: 0; }

/* 上传占位符：本地路径图片转码中的占位卡片 */
.local-image-placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 80px; height: 80px;
    border: 2px dashed #f59e0b;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    font-size: 12px;
    cursor: pointer;
    padding: 6px;
    vertical-align: middle;
    margin: 2px;
}
.local-image-placeholder:hover { background: rgba(245, 158, 11, 0.16); }

/* 手动分段符：主题色虚线 + 居中标签药丸（占满整行，居中标线） */
.unified-editor hr.segment-divider,
#previewBody hr.segment-divider {
    border: none;
    border-top: 1.5px dashed var(--pri-l, #7dd3fc);
    height: 0;
    width: 100%;
    margin: 8px 0;
    background: transparent;
    position: relative;
}
.unified-editor hr.segment-divider::after,
#previewBody hr.segment-divider::after {
    content: '分段';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card, #fff);
    color: var(--pri, #1D5BFF);
    border: 1px solid var(--pri-l, #7dd3fc);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 1px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
}

/* 编辑器内分段线：原子元素（<hr contenteditable="false">），只起隔离作用 ——
   光标不可进入、内容不会与其合并；点击/退格由 JS 统一处理 */
.unified-editor hr.segment-divider {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
/* 扩大点击命中区：药丸标签区域也可点击（伪元素事件归属宿主 hr） */
.unified-editor hr.segment-divider::after {
    pointer-events: auto;
    cursor: pointer;
}

/* 手动同段标记：编辑器内四边细边 + 浅色背景 + 右上角标签 */
/* 同段：扁平标记块模型 —— 顶层块携带 segment-keep 类，
   连续标记块用兄弟选择器拼成一个整体盒子（无嵌套容器，点击/光标全部原生） */
.unified-editor .segment-keep {
    position: relative;
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.06);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 8px 0;
}
/* 组内后继块：贴合前块（去上边框/上圆角/上外距/上内距），标签只在组首显示 */
.unified-editor .segment-keep + .segment-keep {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
    padding-top: 0;
}
.unified-editor .segment-keep + .segment-keep::before {
    display: none;
}
/* 组内非末块（后面还有同段块）：去下边框/下圆角/下外距/下内距，视觉上与下一块无缝贴合 */
.unified-editor .segment-keep:has(+ .segment-keep) {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.unified-editor .segment-keep::before {
    content: '同段';
    position: absolute;
    top: -9px;
    right: 10px;
    background: #10b981;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 8px;
    letter-spacing: 1px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
}

/* 预览弹窗：不显示同段的编辑标记（边框/背景/标签），仅以普通分段内容显示；
   分段逻辑（同段整体为一段）不受影响，与分享页行为一致 */
#previewBody div.segment-keep {
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    position: static;
}

/* ========== Emoji 选择器弹层 ========== */
.emoji-picker {
    display: none; position: fixed !important;
    z-index: 999999 !important; width: 400px;
    background: white; border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.15), 0 -2px 10px rgba(0,0,0,0.08);
    animation: emojiPickerInUp 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto !important;
    will-change: transform;
    backface-visibility: hidden;
}
@keyframes emojiPickerInUp {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.emoji-picker.show { display: flex; flex-direction: column; }
.emoji-body {
    display: flex; flex-direction: column; flex: 1; overflow: hidden;
}
.emoji-picker-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 16px; border-bottom: 1px solid #f1f5f9;
    background: white; border-radius: 13px 13px 0 0;
    width: 100%; box-sizing: border-box; order: -1;
}
.emoji-picker-title {
    font-size: 13.5px; font-weight: 700; color: var(--t1, #111827);
}
.emoji-close-btn {
    width: 26px; height: 26px; border: none; border-radius: 6px;
    background: transparent; font-size: 14px; color: var(--t3, #94a3b8);
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.emoji-close-btn:hover { background: #f1f5f9; color: var(--t1, #111827); transform: rotate(90deg); }
.emoji-grid {
    height: 200px; overflow-y: auto;
}
.emoji-grid::-webkit-scrollbar { width: 4px; }
.emoji-grid::-webkit-scrollbar-track { background: transparent; }
.emoji-grid::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.emoji-grid-pane {
    display: none; grid-template-columns: repeat(9, 1fr); gap: 3px;
    padding: 12px 14px;
}
.emoji-grid-pane.active { display: grid; }
.emoji-item {
    width: 34px; height: 34px; display: flex; align-items: center;
    justify-content: center; font-size: 21px; border: none; border-radius: 7px;
    background: transparent; cursor: pointer;
}
.emoji-item:hover { background: #e0f2fe; transform: scale(1.2); }
.emoji-categories {
    display: flex; gap: 4px; padding: 10px 14px 12px;
    background: #fafbfc; border-top: 1px solid #f1f5f9;
    border-radius: 0 0 13px 13px; overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.emoji-categories::-webkit-scrollbar { height: 4px; }
.emoji-categories::-webkit-scrollbar-track { background: transparent; }
.emoji-categories::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #cbd5e1, #94a3b8); border-radius: 3px;
}
.emoji-cat-btn {
    flex-shrink: 0; height: 32px; padding: 0 10px;
    border: 2px solid transparent; border-radius: 9px;
    background: transparent; font-size: 18px; cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.emoji-cat-btn:hover { background: #f1f5f9; }
.emoji-cat-btn.active {
    background: white; border-color: var(--pri, #1D5BFF);
    box-shadow: 0 2px 8px rgba(29,91,255,0.2); transform: scale(1);
}

.editor-btn .feather,
.emoji-close-btn .feather {
    width: 13px;
    height: 13px;
    margin-right: 2px;
}

/* ========== 暗色模式 ========== */
:root.dark-mode .unified-editor-toolbar {
    background: #1f2937;
    border-color: var(--line, #334155);
}
:root.dark-mode .editor-btn {
    background: #1e293b; border-color: #334155; color: var(--t2, #cbd5e1);
}
:root.dark-mode .editor-btn:hover {
    background: rgba(29,91,255,0.12); border-color: var(--pri, #1D5BFF); color: var(--pri, #4C86FF);
}
:root.dark-mode .editor-btn-sep { background: #334155; }
:root.dark-mode .unified-editor,
:root.dark-mode .unified-editor-source {
    background: #111827;
    color: var(--t1, #f1f5f9);
    border-color: var(--line, #334155);
}
:root.dark-mode .unified-editor:focus { background: #0f172a; }
:root.dark-mode .unified-editor .segment-keep {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.10);
}
:root.dark-mode .unified-editor .segment-keep::before {
    background: #34d399;
    color: #053b2c;
}
:root.dark-mode .emoji-picker {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.5), 0 -2px 10px rgba(0,0,0,0.3);
}
:root.dark-mode .emoji-picker-head {
    background: #1e293b;
    border-bottom-color: #334155;
}
:root.dark-mode .emoji-picker-title { color: var(--t1, #f1f5f9); }
:root.dark-mode .emoji-close-btn { color: var(--t3, #94a3b8); }
:root.dark-mode .emoji-close-btn:hover { background: #334155; color: var(--t1, #f1f5f9); }
:root.dark-mode .emoji-grid::-webkit-scrollbar-thumb { background: #475569; }
:root.dark-mode .emoji-item:hover { background: #334155; }
:root.dark-mode .emoji-categories {
    background: #0f172a;
    border-top-color: #334155;
}
:root.dark-mode .emoji-cat-btn:hover { background: #334155; }
:root.dark-mode .emoji-cat-btn.active {
    background: rgba(99,102,241,0.15);
}

/* ========== 图片选中浮动工具条 ========== */
.editor-img-toolbar {
    position: fixed;
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: #1f2937;
    color: #fff;
    border-radius: 9px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.28);
    font-size: 12px;
    transform: translateY(-2px);
    animation: imgTbIn 0.16s ease;
}
@keyframes imgTbIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(-2px); }
}
.editor-img-toolbar .img-tb-title {
    padding: 0 8px 0 6px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.5px;
}
.img-tb-btn {
    display: inline-flex; align-items: center; gap: 3px;
    height: 26px; padding: 0 8px;
    border: none; border-radius: 6px;
    background: transparent; color: #e2e8f0;
    font-size: 12px; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.img-tb-btn:hover { background: #374151; color: #fff; }
.img-tb-btn .feather { width: 12px; height: 12px; }
.img-tb-del:hover { background: #ef4444; color: #fff; }
.img-tb-sep {
    width: 1px; height: 16px;
    background: #475569; margin: 0 4px;
}

/* ========== 文字颜色面板 ========== */
.editor-color-picker {
    display: none;
    position: fixed !important;
    z-index: 999997 !important;
    width: 224px;
    padding: 10px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.16);
    animation: colorPickIn 0.16s ease;
}
@keyframes colorPickIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.editor-color-picker.show { display: block; }
.ecp-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 700;
    color: var(--t1, #111827);
    margin-bottom: 8px;
}
.ecp-close {
    width: 24px; height: 24px;
    border: none; border-radius: 6px;
    background: transparent; color: var(--t3, #94a3b8);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.ecp-close:hover { background: #f1f5f9; color: var(--t1, #111827); transform: rotate(90deg); }
.ecp-close .feather { width: 12px; height: 12px; }
.ecp-swatches {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.ecp-swatch {
    width: 24px; height: 24px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    padding: 0;
}
.ecp-swatch:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ecp-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: 10px;
}
.ecp-native {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--t2, #475569);
    cursor: pointer;
}
.ecp-native .feather { width: 12px; height: 12px; }
.ecp-native input[type="color"] {
    width: 26px; height: 22px;
    border: 1px solid #e2e8f0; border-radius: 5px;
    background: #fff; cursor: pointer; padding: 0;
}
.ecp-link-btn {
    height: 26px; padding: 0 10px;
    border: 1px solid #e2e8f0; border-radius: 6px;
    background: #fff; color: var(--t2, #475569);
    font-size: 12px; cursor: pointer;
    transition: background 0.15s;
}
.ecp-link-btn:hover { background: #f1f5f9; color: var(--t1, #111827); }

:root.dark-mode .editor-img-toolbar { background: #0f172a; }
:root.dark-mode .editor-img-toolbar .img-tb-title { color: #64748b; }
:root.dark-mode .img-tb-btn { color: #cbd5e1; }
:root.dark-mode .img-tb-btn:hover { background: #334155; }
:root.dark-mode .img-tb-sep { background: #334155; }
:root.dark-mode .editor-color-picker {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 12px 34px rgba(0,0,0,0.5);
}
:root.dark-mode .ecp-head { color: var(--t1, #f1f5f9); }
:root.dark-mode .ecp-close { color: #94a3b8; }
:root.dark-mode .ecp-close:hover { background: #334155; color: #f1f5f9; }
:root.dark-mode .ecp-native { color: #cbd5e1; }
:root.dark-mode .ecp-native input[type="color"] { background: #111827; border-color: #334155; }
:root.dark-mode .ecp-link-btn { background: #111827; border-color: #334155; color: #cbd5e1; }
:root.dark-mode .ecp-link-btn:hover { background: #334155; }

/* ========== 插入链接弹窗 ========== */
/* 由 editor.js 动态创建；z-index 设为本层级体系最高，
   以盖过 emoji 选择器(999999)/图片工具条(999998)/颜色面板(999997)等编辑器浮层，确保可见可交互 */
.editor-link-dlg {
    display: none;
    position: fixed;
    z-index: 1000000;
    width: 320px;
    padding: 0;
    background: var(--card, #ffffff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(29, 91, 255, 0.03), 0 4px 16px rgba(29, 91, 255, 0.06);
    overflow: hidden;
    animation: linkDlgIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.editor-link-dlg.show { display: block; }
@keyframes linkDlgIn {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.eld-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px;
    font-size: 14px; font-weight: 700;
    color: var(--t1, #111827);
    background: linear-gradient(180deg, rgba(29, 91, 255, 0.06), rgba(29, 91, 255, 0));
    border-bottom: 1px solid var(--line, #eef2f7);
    letter-spacing: 0.2px;
}
.eld-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; padding: 0;
    border: none; border-radius: 8px;
    background: transparent; color: var(--t2, #475569);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.eld-close:hover { background: rgba(29, 91, 255, 0.08); color: var(--pri, #1D5BFF); }

.eld-field { padding: 14px 16px 0; }
.eld-label {
    display: block; margin-bottom: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--t2, #475569);
    letter-spacing: 0.3px;
}
.eld-input {
    width: 100%; box-sizing: border-box;
    height: 34px; padding: 0 11px;
    border: 1px solid var(--line, #e2e8f0); border-radius: 8px;
    background: var(--bg, #fafafa);
    color: var(--t1, #111827);
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.eld-input:focus {
    border-color: var(--pri, #1D5BFF);
    background: var(--card, #ffffff);
    box-shadow: 0 0 0 3px rgba(29, 91, 255, 0.12);
}
.eld-input::placeholder { color: #9ca3af; }

.eld-check {
    display: flex; align-items: center; gap: 8px;
    margin: 14px 16px 0;
    font-size: 13px; color: var(--t2, #475569);
    cursor: pointer; user-select: none;
}
.eld-check input[type="checkbox"] {
    width: 15px; height: 15px; margin: 0;
    accent-color: var(--pri, #1D5BFF); cursor: pointer;
}

.eld-actions {
    display: flex; justify-content: flex-end; align-items: center; gap: 8px;
    margin-top: 16px; padding: 12px 16px;
    border-top: 1px solid var(--line, #eef2f7);
    background: rgba(29, 91, 255, 0.02);
}
.eld-btn {
    height: 32px; padding: 0 16px;
    border: 1px solid var(--line, #e2e8f0); border-radius: 8px;
    background: var(--card, #ffffff); color: var(--t2, #475569);
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.eld-btn:hover { border-color: #cbd5e1; color: var(--t1, #111827); }
.eld-btn.eld-primary {
    background: var(--pri, #1D5BFF); border-color: var(--pri, #1D5BFF); color: #ffffff;
}
.eld-btn.eld-primary:hover {
    background: var(--pri-l, #4C86FF); border-color: var(--pri-l, #4C86FF);
    box-shadow: 0 4px 12px rgba(29, 91, 255, 0.3);
}

:root.dark-mode .editor-link-dlg {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}
:root.dark-mode .eld-head {
    background: linear-gradient(180deg, rgba(51, 154, 255, 0.08), rgba(51, 154, 255, 0));
}
:root.dark-mode .eld-input { background: #111827; border-color: #334155; }
:root.dark-mode .eld-input:focus { background: #1e293b; }
:root.dark-mode .eld-actions { background: rgba(255, 255, 255, 0.02); border-top-color: #334155; }
:root.dark-mode .eld-btn { background: #111827; border-color: #334155; color: #cbd5e1; }
:root.dark-mode .eld-btn:hover { border-color: #475569; color: #f1f5f9; }
