:root{
  --brand:#4f6ef7; --brand-dark:#3a56d4; --brand-soft:#eef2ff;
  --text:#1f2430; --muted:#8b93a7; --line:#e6e8ef; --bg:#f5f7fb; --panel:#fff;
  --danger:#ef4444; --warn:#f59e0b; --ok:#10b981;
  --radius:12px; --shadow:0 6px 22px rgba(20,29,61,.08);
}
*{box-sizing:border-box}
/* 关键：类选择器（如 .app{display:flex}）优先级高于 hidden 属性的 UA 样式 display:none，
   若不强制覆盖，hidden 的视图/面板会一直显示，导致登录页与工作台、各视图同时堆叠。 */
[hidden]{display:none!important}
html,body{height:100%;margin:0}
.sound-btn{
  margin-left:auto;flex:none;width:26px;height:26px;padding:0;border:1px solid var(--line);
  background:#fff;border-radius:8px;cursor:pointer;font-size:13px;line-height:1;
  display:flex;align-items:center;justify-content:center;
}
.sound-btn:hover{border-color:var(--brand)}
.sound-btn.muted{opacity:.45}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--text);background:var(--bg);font-size:14px;
}
button{font-family:inherit}
input,textarea,select{
  font-family:inherit;font-size:14px;padding:9px 12px;border:1px solid var(--line);
  border-radius:10px;outline:none;width:100%;background:#fff;color:var(--text);
}
input:focus,textarea:focus{border-color:var(--brand)}
input[type=color]{padding:3px;height:38px}
input[type=checkbox]{width:auto}
label{display:block;margin-bottom:12px;font-size:13px;color:var(--muted);font-weight:600}
label.switch{display:flex;align-items:center;gap:8px;color:var(--text);font-weight:500}
.row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.row label{flex:1;margin-bottom:0;/*new*/display: contents;}
.btn-primary,.btn-ghost,.btn-danger{
  border:1px solid transparent;border-radius:10px;padding:10px 18px;font-size:14px;font-weight:600;
  cursor:pointer;transition:.16s;
}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-dark)}
.btn-ghost{background:#fff;color:var(--text);border-color:var(--line)}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand)}
.btn-danger{background:#fff;color:var(--danger);border-color:#fecaca}
.btn-danger:hover{background:var(--danger);color:#fff}
.sm{padding:9px 13px;font-size:13px; margin: 0 5px;}
.muted{color:var(--muted)}
.code{
  background:#111827;color:#e5e7eb;border-radius:10px;padding:14px 16px;overflow-x:auto;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;white-space:pre-wrap;
}
.hint{margin-top:10px;font-size:13px;color:var(--muted)}
.hint.ok{color:var(--ok)}.hint.err{color:var(--danger)}

/* 登录 */
.login-wrap{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(900px 500px at 50% -100px,var(--brand-soft),transparent 70%);
}
.login-card{
  width:400px;max-width:92vw;background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:32px;box-shadow:var(--shadow);
}
.brand{display:flex;align-items:center;gap:11px;margin-bottom:20px}
.brand .mark{
  width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,var(--brand),#7b8cff);
  color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:19px;
}
.brand b{display:block;font-size:16px}
.brand small{color:var(--muted);font-size:12px}
.login-card h2{margin:0 0 18px;font-size:20px}
#loginForm button{width:100%;margin-top:6px}
.login-error{color:var(--danger);font-size:13px;min-height:20px;margin-bottom:6px}
.login-foot{display:flex;justify-content:space-between;margin-top:14px;font-size:12.5px;color:var(--muted)}
/* 模态弹窗（找回密码） */
.modal{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center}
.modal-mask{position:absolute;inset:0;background:rgba(15,23,42,.45);animation:kfFade .18s ease}
.modal-card{
  position:relative;width:400px;max-width:92vw;background:#fff;border-radius:16px;
  box-shadow:0 24px 60px rgba(15,23,42,.28);padding:20px 22px 22px;animation:kfPop .18s ease;
}
.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.modal-head b{font-size:16px}
.modal-close{
  border:none;background:transparent;font-size:22px;line-height:1;color:var(--muted);cursor:pointer;
  padding:2px 8px;border-radius:8px;
}
.modal-close:hover{background:var(--bg);color:var(--text)}
.modal-body .row{display:flex;gap:8px;margin-bottom:12px}
.modal-body .row input{flex:1;margin-bottom:0}
.modal-body .row button{flex:none}
.modal-body button[type="button"].btn-primary,#resetBtn{width:100%;margin-top:4px}
.agent-list{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-direction:column;gap:8px}
.agent-list li{display:flex;align-items:center;gap:10px;font-size:14px}
.agent-list li .dot{width:9px;height:9px}
.agent-list li .name{flex:1;font-weight:500}
@keyframes kfFade{from{opacity:0}to{opacity:1}}
@keyframes kfPop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.mobile-only{display:none}

/* 主布局 */
.app{display:flex;height:100vh;overflow:hidden}
.sidebar{
  width:230px;flex:none;background:#fff;border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:18px 14px;
}
.status-line{
  display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);
  background:var(--bg);border-radius:9px;padding:8px 11px;margin-bottom:16px;
}
.dot{width:8px;height:8px;border-radius:50%;background:var(--ok);flex:none}
.dot.off{background:#cbd5e1}.dot.warn{background:var(--warn)}
/* 实时连接区：有人在线时可点击查看在线客服 */
#wsText.clickable{cursor:pointer}
#wsText.clickable:hover{color:var(--text)}
.ws-link{color:var(--brand-dark);font-weight:600;margin-left:2px;text-decoration:underline}
.menu{display:flex;flex-direction:column;gap:4px;flex:1}
.menu-item{
  display:flex;align-items:center;justify-content:space-between;gap:8px;border:none;background:transparent;
  padding:10px 12px;border-radius:10px;cursor:pointer;color:var(--muted);font-size:14px;text-align:left;
}
.menu-item:hover{background:var(--bg);color:var(--text)}
.menu-item.active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}
.count{
  background:var(--danger);color:#fff;border-radius:9px;font-size:11px;padding:1px 7px;font-weight:700;
}
.count.zero{background:#e2e8f0;color:var(--muted)}
.side-foot{border-top:1px solid var(--line);padding-top:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.me b{display:block;font-size:13px}
.me small{color:var(--muted);font-size:11.5px}

.main{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.view{flex:1;display:flex;min-height:0}

/* 会话列表 */
.list-pane{
  width:320px;flex:none;border-right:1px solid var(--line);background:#fff;
  display:flex;flex-direction:column;
}
.list-head{padding:14px;border-bottom:1px solid var(--line)}
.search{width:100%}
.filters{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.chip{
  border:1px solid var(--line);background:#fff;border-radius:16px;padding:4px 11px;font-size:12.5px;
  cursor:pointer;color:var(--muted);
}
.chip.active{background:var(--brand);border-color:var(--brand);color:#fff}
.conv-list{flex:1;overflow-y:auto}
.conv{
  padding:12px 14px;border-bottom:1px solid #f1f3f8;cursor:pointer;display:flex;gap:10px;
  transition:background .14s;
}
.conv:hover{background:var(--bg)}
.conv.active{background:var(--brand-soft)}
.conv .avatar{
  width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#c7d2fe,#e0e7ff);
  color:var(--brand-dark);display:flex;align-items:center;justify-content:center;font-weight:700;flex:none;
}
.conv .body{flex:1;min-width:0}
.conv .top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.conv .name{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv .time{font-size:11.5px;color:var(--muted);flex:none}
.conv .last{
  font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px;
}
.conv .foot{display:flex;align-items:center;gap:6px;margin-top:6px;flex-wrap:wrap}
.tag{font-size:11px;padding:2px 8px;border-radius:8px;background:var(--bg);color:var(--muted)}
.tag.ai{background:#ede9fe;color:#7c3aed}
.tag.human{background:#dcfce7;color:#15803d}
.tag.closed{background:#f1f5f9;color:#64748b}
.tag.online{background:#dcfce7;color:#15803d}
.tag.offline{background:#e2e8f0;color:#64748b}
.tag.disabled{background:#fee2e2;color:#b91c1c}
.badge{
  margin-left:auto;background:var(--danger);color:#fff;border-radius:9px;font-size:11px;
  padding:1px 7px;font-weight:700;
}

/* 聊天区 */
.chat-pane{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}
.empty{margin:auto;color:var(--muted)}
.chat{flex:1;display:flex;flex-direction:column;min-height:0}
.chat-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;
  background:#fff;border-bottom:1px solid var(--line);
}
.chat-head .who b{font-size:15px;cursor:pointer}
.chat-head .who b:hover{color:var(--brand)}
.chat-head .sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.chat-head .actions{display:flex;gap:6px;flex-wrap:wrap}
.tags{padding:8px 18px;background:#fff;border-bottom:1px solid var(--line);display:flex;gap:6px;flex-wrap:wrap}
.tags:empty{display:none}
.msg-list{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px}
.msg{display:flex;gap:10px;align-items:flex-end;max-width:100%}
.msg.me{flex-direction:row-reverse}
/* flex 子项默认 min-width:auto，长数字串会把气泡撑破；必须显式置 0 */
.msg > div{min-width:0}
/* 限宽必须写在外层内容列上而非气泡：内容列按内容收缩，短消息时气泡可占满整列、文字横排；
   若写在气泡上（max-width:68%），短内容时气泡被压到「收缩宽度的 68%」，文字会被逐字挤成竖排 */
.msg:not(.system) > div:not(.avatar){max-width:68%}
/* 自己发出的消息：右侧内容列（气泡+时间）整体右对齐，紧贴头像 */
.msg.me > div:not(.avatar){display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}
.msg .avatar{
  width:32px;height:32px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;
  font-size:12px;color:#fff;background:#4f6ef7;
}
.msg.visitor .avatar{background:var(--brand)}
.msg.agent .avatar{background:var(--ok)}
.msg.ai .avatar{background:#8b5cf6}
.msg .bubble{
  max-width:100%;padding:10px 14px;border-radius:14px;background:#fff;line-height:1.6;
  box-shadow:0 1px 3px rgba(20,29,61,.08);white-space:pre-wrap;
  /* 连续数字/长串必须能断行：anywhere 同时缩小 min-content，避免撑破 flex 布局 */
  overflow-wrap:anywhere;word-break:break-word;
  border-bottom-left-radius:4px;
}
.msg.me .bubble{background:var(--brand);color:#fff;border-bottom-left-radius:14px;border-bottom-right-radius:4px}
.msg.system{justify-content:center}
.msg.system .bubble{
  background:rgba(15,23,42,.06);color:var(--muted);font-size:12px;box-shadow:none;
  border-radius:10px;padding:5px 13px;text-align:center;
}
.msg img{max-width:220px;max-height:260px;width:auto;border-radius:10px;display:block}
.msg .time{font-size:11px;color:var(--muted);margin-top:5px}
.msg.me .time{text-align:right}
.typing{padding:0 18px 6px;font-size:12.5px;color:var(--muted)}
.quick{padding:8px 18px;display:flex;gap:8px;flex-wrap:wrap;background:#fff;border-top:1px solid var(--line);flex-shrink:0}
.quick button{
  border:1px solid var(--line);background:#fff;border-radius:16px;padding:5px 12px;font-size:12.5px;
  cursor:pointer;color:var(--muted);
}
.quick button:hover{border-color:var(--brand);color:var(--brand)}
.composer{
  display:flex;align-items:flex-end;gap:8px;padding:12px 18px;background:#fff;border-top:1px solid var(--line);
  flex-shrink:0;
}
.composer textarea{flex:1;max-height:120px;min-height:40px;resize:none}
.composer .tool{
  background:transparent;border:none;color:var(--muted);font-size:20px;width:40px;height:40px;fill: currentColor;
  border-radius:10px;cursor:pointer;flex:none;
}
.composer .tool:hover{background:var(--bg);color:var(--brand)}

/* 面板 / 表格 */
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);margin:18px;box-shadow:var(--shadow);overflow:hidden}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;/*border-bottom:1px solid var(--line)*/}
.panel-head h3{margin:0;font-size:15px}
.panel-head .search{width:260px}
.panel .row{margin-bottom:12px}
.panel > .tab-body, #viewAccount .panel{padding:18px}
#viewSettings, #viewVisitors, #viewQuick, #viewAuto, #viewFiles, #viewFaq, #viewAccount{padding:0;overflow-y:auto;display:block}
.table-wrap{overflow-x:auto}
.table{width:100%;border-collapse:collapse;font-size:13.5px}
.table th,.table td{padding:11px 14px;text-align:left;border-bottom:1px solid #f1f3f8}
.table th:nth-last-child(1), .table td:nth-last-child(1){min-width:230px;}
.table th{background:var(--bg);color:var(--muted);font-weight:600;font-size:12.5px}
.table tbody tr:hover{background:var(--bg)}
.tabs{display:flex;gap:6px;padding:14px 18px 0;border-bottom:1px solid var(--line)}
.tab{
  border:none;background:transparent;padding:9px 15px;border-radius:10px 10px 0 0;cursor:pointer;
  color:var(--muted);font-size:14px;
}
.tab.active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}
.tab-body{padding:18px}

/* Toast */
.toast{
  position:fixed;left:50%;bottom:34px;transform:translateX(-50%);
  background:#111827;color:#fff;padding:11px 20px;border-radius:10px;font-size:13.5px;z-index:9999;
  box-shadow:0 8px 24px rgba(0,0,0,.24);
}
.toast.ok{background:var(--ok)}
.toast.err{background:var(--danger)}

/* 美化滚动条：细条 + 圆角滑块，hover 加深；兼容 Firefox 的 scrollbar-color */
*{scrollbar-width:thin;scrollbar-color:#cdd4e5 transparent}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{
  background:#cdd4e5;border-radius:9px;border:2px solid transparent;background-clip:padding-box;
}
::-webkit-scrollbar-thumb:hover{background:#aab3cc;background-clip:padding-box}
::-webkit-scrollbar-corner{background:transparent}

/* 面板头部操作区（文件管理等按钮较多的页面） */
.head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.head-actions .muted{font-size:12.5px}

/* ---------- 文件管理（聊天图片） ---------- */
.clean-box{
  display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;background:var(--bg);
  border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:14px;
}
.clean-box .switch{margin-bottom:0}
.clean-box .days{width:132px;margin-bottom:0}
.clean-box .hint{flex:1;min-width:180px}
.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:12px}
.file-empty{grid-column:1/-1;padding:30px 16px;text-align:center;color:var(--muted);font-size:13px}
.file-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;position:relative}
.file-card.on{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.file-pick{position:absolute;left:8px;top:8px;z-index:2;margin:0;display:flex}
.file-pick input{width:18px;height:18px;cursor:pointer}
.file-thumb{
  height:124px;background:var(--bg);display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.file-thumb img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.file-info{padding:8px 10px 10px}
.file-name{font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-sub{font-size:11.5px;color:var(--muted);margin:2px 0 7px}
.file-ops{display:flex;align-items:center;justify-content:space-between;gap:6px}
.file-ops .btn-danger{padding:5px 10px;font-size:12px}

/* ---------- 排序（数值越大越靠前 + 拖拽） ---------- */
.drag-cell{text-align:center;padding-left:6px;padding-right:6px}
.drag-handle{
  display:inline-flex;align-items:center;justify-content:center;width:22px;height:26px;
  cursor:grab;color:#b6bdd0;font-size:15px;line-height:1;user-select:none;border-radius:6px;
}
.drag-handle:hover{background:var(--bg);color:var(--brand)}
.table tr.dragging{opacity:.45;background:var(--brand-soft)}
.table tr[draggable="true"]{cursor:default}
.sort-input{width:72px;padding:6px 8px;font-size:13px;text-align:center}

/* 统一 mi-icon 风格：固定尺寸容器 + 内联 SVG 填充当前文字色，保证全站图标视觉一致 */
.menu-item .mi-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none}
.menu-item .mi-icon svg{width:20px;height:20px;fill:currentColor;display:block}
.menu-item .mi-label{flex:1}

@media (max-width:900px){
  .sidebar{width:70px;padding:14px 8px}
  /* 平板：侧栏收窄为图标模式，只留图标 */
  .sidebar .brand div,.menu-item .mi-label{display:none}
  .menu-item{justify-content:center}
  .list-pane{width:270px}
}

/* 手机端：侧边栏改为底部导航栏，各视图单栏显示 */
@media (max-width:720px){
  /* 高度用 100% 链（html/body 已 100%）：100vh 在手机上会比可视区高（地址栏未收回），
     会把快捷回复和输入框顶到底部导航后面造成「看不到」 */
  .app{display:block;height:100%;overflow:hidden}
  .sidebar{
    position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;z-index:80;
    flex-direction:row;align-items:stretch;gap:0;padding:4px 2px calc(4px + env(safe-area-inset-bottom));
    border-right:none;border-top:1px solid var(--line);box-shadow:0 -2px 14px rgba(20,29,61,.08);
  }
  .sidebar .brand,.status-line,.side-foot{display:none}
  .menu{flex-direction:row;gap:2px}
  /* 手机端底部导航只保留高频入口：访客与设置在手机上隐藏 */
  .menu-item[data-view="visitors"],.menu-item[data-view="settings"]{display:none}
  .menu-item{
    flex:1;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    padding:6px 2px;font-size:11px;position:relative;text-align:center;line-height:1.25;
  }
  .menu-item .mi-label{display:block;flex:none;font-size:11px}
  .menu-item .mi-icon{font-size:18px}
  .menu-item .count{position:absolute;top:2px;right:50%;margin-right:-26px;font-size:10px;padding:0 5px}
  .main{height:100%;padding-bottom:calc(58px + env(safe-area-inset-bottom))}
  .view{display:flex;min-height:0}
  .list-pane{width:100%;border-right:none}
  .chat-pane{display:none}
  body.chat-open .list-pane{display:none}
  body.chat-open .chat-pane{display:flex}
  .mobile-only{display:inline-flex}
  .chat-head{flex-wrap:wrap;gap:8px}
  .chat-head .actions{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .chat-head .actions button{flex:none;}
  .sm{margin: 0; padding: 7px 12px;}
  .panel{margin:0;border-radius:0;border-left:none;border-right:none}
  /* 面板头部在窄屏换行，按钮区单独一行横向排列，避免挤压标题 */
  .panel-head{flex-wrap:wrap;gap:8px}
  .panel-head .search{width:100%}
  .head-actions{width:100%;justify-content:flex-start}
  /* 设置页标签页横向滚动，避免 4 个标签挤成一团 */
  .tabs{overflow-x:auto;padding:12px 12px 0}
  .tab{flex:none}
  .tab-body{padding:14px 12px}
  /* 表格转卡片：表头隐藏，单元格用表头文字做标签，手机上更易读 */
  .table-wrap{overflow-x:visible}
  .table,.table tbody,.table tr,.table td{display:block;width:100%}
  .table thead{display:none}
  .table tr{
    border:1px solid var(--line);border-radius:12px;margin-bottom:10px;padding:6px 12px;background:#fff;
  }
  .table tbody tr:hover{background:#fff}
  .table td{
    border:none;padding:7px 0;display:flex;align-items:center;justify-content:space-between;justify-content:left;gap:12px;
    text-align:right;
  }
  .table td::before{
    content:attr(data-label);flex:none;color:var(--muted);font-size:12.5px;font-weight:600;text-align:left;
  }
  .table td[data-label="拖动"],.table td[data-label=""]::before{content:none}
  .table td[data-label="拖动"]{justify-content:flex-start}
  .sort-input{width:88px}
  .file-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .clean-box .days{width:100%}
  #viewAccount .row,#tabSmtp .row,.modal-body .row{flex-direction:column}
  .login-card{width:100%;max-width:100%;border-radius:0;min-height:100vh;padding:24px 20px}
  .login-wrap{min-height:100vh;align-items:stretch}
  /* 弹窗在手机上贴近底部、可滚动，避免小屏被截断 */
  .modal{align-items:flex-end}
  .modal-card{
    width:100%;max-width:100%;border-radius:16px 16px 0 0;max-height:88vh;overflow-y:auto;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .msg:not(.system) > div:not(.avatar){max-width:82%}
  .quick{
    padding:8px 12px;flex-shrink:0;
    /* 手机端快捷回复横向一行滚动，避免换行堆叠挤压输入区 */
    flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
  }
  .quick button{flex:none}
  .composer{padding:8px 10px;flex-shrink:0}
}

/* ---------------- 富文本编辑器（欢迎语 / 离线留言） ---------------- */
.fe{
  position:relative;border:1px solid var(--line);border-radius:10px;background:#fff;margin-top:6px;
}
.fe:focus-within{border-color:var(--brand)}
.fe-bar{
  display:flex;flex-wrap:wrap;gap:4px;padding:6px;border-bottom:1px solid var(--line);
  background:#f8fafc;border-radius:10px 10px 0 0;
}
.fe-btn{
  min-width:30px;height:28px;padding:0 8px;border:1px solid var(--line);background:#fff;
  border-radius:6px;color:var(--text);font-size:13px;line-height:1;cursor:pointer;display:flex;
  align-items:center;justify-content:center;
}
.fe-btn:hover{border-color:var(--brand);color:var(--brand)}
.fe-btn.on{background:var(--brand-soft);border-color:var(--brand);color:var(--brand)}
.fe-area{
  padding:10px 12px;font-size:13.5px;line-height:1.7;outline:none;max-height:300px;overflow-y:auto;
  word-break:break-word;
}
.fe-area:empty::before{content:attr(data-ph);color:var(--muted)}
.fe-area img{max-width:100%;border-radius:8px}
.fe-area a{color:var(--brand)}
.fe-src{width:100%;border:none;border-radius:0 0 10px 10px;font-family:ui-monospace,Menlo,Consolas,monospace}
.fe-pop{
  position:absolute;left:0;top:34px;z-index:30;display:flex;gap:6px;padding:6px;background:#fff;
  border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);
}
.fe-dot{width:20px;height:20px;border-radius:50%;border:1px solid rgba(0,0,0,.08);cursor:pointer;padding:0}
