/* DeepTalk — 一脉相承的"深水"色：冷调中性 + 青蓝，与中间那口潭同一色系 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --paper: #e8eef0; --paper2: #dde7e9; --panel: #f3f7f8; --line: #d1dcdf; --line2: #e0e9ea;
  --ink: #15282f; --ink2: #496069; --dim: #84979e; --cin: #2c7a90; --cin-soft: #d6ebf0;
  --chip: #e3edee; --ok: #3f8a72; --warn: #c0584a; --rel: #3f7da0;
  --serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
}
html, body { height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 14px; }
.hidden { display: none !important; }
.err { color: #9c3030; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #bccdd1; border-radius: 8px; }

#app { display: flex; height: 100vh; }

/* ---------- 话题侧栏 ---------- */
#sidebar {
  width: 210px; flex-shrink: 0; display: flex; flex-direction: column; padding: 18px 12px 12px;
  background: linear-gradient(180deg, #e4eced, #dae6e8); border-right: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .02em; padding: 2px 6px 14px; }
.brand-dot { display: inline-block; width: 7px; height: 7px; background: var(--cin); border-radius: 2px; transform: rotate(45deg); margin-left: 6px; vertical-align: 2px; }
#btn-new { border: 1px dashed #aec1c6; background: none; color: var(--ink2); border-radius: 9px; padding: 8px; cursor: pointer; font-size: 13px; margin-bottom: 12px; transition: all .15s; }
#btn-new:hover { border-color: var(--cin); color: var(--cin); }
#topic-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.topic { border-radius: 9px; padding: 9px 11px; cursor: pointer; position: relative; border: 1px solid transparent; transition: all .15s; }
.topic:hover { background: rgba(253,252,248,.6); }
.topic.active { background: var(--panel); border-color: var(--line); }
.topic .t { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.topic .del { position: absolute; top: 8px; right: 7px; border: none; background: none; color: var(--dim); cursor: pointer; font-size: 11px; display: none; }
.topic:hover .del { display: block; }
.topic .del:hover { color: var(--cin); }
.account { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 6px 8px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 12px; }
.acc-name { color: var(--ink2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-links { color: var(--dim); white-space: nowrap; flex-shrink: 0; }
.acc-links a { color: var(--dim); }
.acc-links a:hover { color: var(--cin); }
.sb-foot { font-size: 11px; color: #93a6ac; padding: 8px 6px 0; line-height: 1.6; }

/* ---------- 深潭 ---------- */
#pool { flex: 1; position: relative; min-width: 0; overflow: hidden; background:
  radial-gradient(1200px 700px at 50% 20%, #eef5f6, var(--paper)); }
#ink { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(14px); opacity: .9; transition: opacity .6s; }
#pool.thinking #ink { opacity: 1; }
#stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.pool-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; transition: opacity .5s; pointer-events: none; }
.pool-hint.gone { opacity: 0; }
.ph-title { font-family: var(--serif); font-size: 26px; color: var(--ink2); letter-spacing: .1em; }
.ph-title::after { content: ""; display: block; width: 30px; height: 2px; background: var(--cin); margin: 12px auto 0; }
.ph-sub { color: var(--dim); font-size: 13px; }
/* ===== 深潭：一口真的水（WebGL 焦散 + DOM 字），单一青蓝色系 ===== */
#stage.dp-mode { align-items: stretch; justify-content: stretch; padding: 0; overflow: hidden; }
.dp-water { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.dp-water.dp-fallback { background: linear-gradient(#dfeaec 0%, #4d7e92 55%, #091c27 100%); }
.dp-layer { position: absolute; inset: 0; z-index: 1; }

/* —— 被接住 / 听着 —— 浮在浅水面上的一句话 —— */
.dp-hold { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; gap: 22px; padding: 15vh 9% 12vh; animation: dpRise .8s cubic-bezier(.2,.8,.3,1) both; }
.dp-hold-img { width: 84px; height: 84px; opacity: .8; animation: dpFloat 6s ease-in-out infinite; filter: saturate(.7) hue-rotate(150deg); }
.dp-hold-img svg { width: 100%; height: 100%; overflow: visible; }
.dp-hold-say { font-family: var(--serif); font-size: 21px; line-height: 1.95; color: #1c3038; max-width: 21em; letter-spacing: .01em;
  text-shadow: 0 1px 16px rgba(232,244,247,.85); }
.dp-hold-say.dp-dim { color: #3d5560; font-size: 18px; }
.dp-hold-foot { display: flex; align-items: center; gap: 12px; color: #4a6470; font-size: 12px; }
.dp-gesture { padding: 3px 12px; border: 1px solid rgba(77,126,146,.35); border-radius: 20px; background: rgba(255,255,255,.5); letter-spacing: .04em; }
.dp-sink { letter-spacing: .14em; opacity: .8; }
.dp-sink::after { content: "···"; display: inline-block; animation: dpDots 1.7s steps(3,end) infinite; clip-path: inset(0 100% 0 0); }

/* —— 看清自己 —— 文字按深度落在潭里 —— */
.dp-head { position: absolute; left: 0; right: 0; padding: 0 8%; text-align: center; }
.dp-kicker { font-size: 11px; color: #6f93a0; letter-spacing: .24em; margin-bottom: 13px; animation: dpRise .7s both; }
.dp-title { font-family: var(--serif); font-size: 14px; color: #2f6b85; letter-spacing: .1em; margin-bottom: 12px; animation: dpRise .7s .05s both; }
.dp-through { font-family: var(--serif); font-size: 19.5px; line-height: 1.66; color: #16282f; max-width: 19em; margin: 0 auto;
  text-shadow: 0 1px 16px rgba(232,244,247,.8); animation: dpRise .8s .1s both; }

/* 发光的领悟，从水面沉到自己的深度 */
.dp-orb { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, #fff 12%, var(--col) 52%, transparent 74%);
  box-shadow: 0 0 14px 2px var(--col), 0 0 38px 7px color-mix(in srgb, var(--col) 45%, transparent);
  opacity: 0; transform: translateY(var(--from)); animation: dpSink 1s cubic-bezier(.25,.7,.3,1) forwards; animation-delay: var(--d); }

.dp-beat { position: absolute; left: 0; right: 0; transform: translateY(-50%); padding-left: 92px; padding-right: 30px;
  opacity: 0; animation: dpFade .9s ease forwards; animation-delay: var(--d); }
.dp-layer-tag { display: inline-block; font-size: 10.5px; color: var(--col); letter-spacing: .16em; font-weight: 700; margin-bottom: 3px;
  text-shadow: 0 0 14px rgba(0,0,0,.3); }
.dp-text { font-size: 15.5px; line-height: 1.68; color: var(--txt); text-shadow: 0 1px 13px rgba(6,18,24,.4);
  animation: dpSlide .9s cubic-bezier(.2,.8,.3,1) both; animation-delay: var(--d); }

.dp-floor { position: absolute; left: 0; right: 0; transform: translateY(-50%); padding: 0 9%; text-align: center;
  opacity: 0; animation: dpFade 1s ease forwards; animation-delay: var(--d); }
.dp-floor::before { content: ""; position: absolute; left: 50%; top: 50%; width: 260px; height: 130px; transform: translate(-50%,-50%);
  background: radial-gradient(ellipse, rgba(150,225,240,.22), transparent 70%); animation: dpGlow 4s ease-in-out infinite; pointer-events: none; }
.dp-floor-k { position: relative; font-size: 10.5px; color: #7fb6c6; letter-spacing: .24em; margin-bottom: 9px; }
.dp-open { position: relative; font-family: var(--serif); font-style: italic; font-size: 16.5px; line-height: 1.7; color: #d6eef4; max-width: 24em; margin: 0 auto;
  text-shadow: 0 1px 18px rgba(0,0,0,.45); }

/* —— 潭边做出来的 —— */
.dp-made { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
  padding: 12px 22px 16px; background: linear-gradient(transparent, rgba(6,20,28,.55)); }
.dp-made-h { width: 100%; font-size: 10px; color: rgba(214,238,244,.7); letter-spacing: .18em; }
.dp-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(196,236,243,.25); background: rgba(196,236,243,.1);
  border-radius: 9px; padding: 6px 12px; font-size: 12.5px; color: #dcecf0; cursor: pointer; transition: all .15s; backdrop-filter: blur(2px); }
.dp-chip:hover { border-color: #7fc8db; background: rgba(127,200,219,.22); }
.dp-chip-i { color: #93dcec; }
.dp-chip.canvas .dp-chip-i { color: #9cc4e8; }
.dp-chip-b { color: rgba(214,238,244,.6); font-size: 11px; }
.dp-chip.building { opacity: .7; }

@keyframes dpSink { 0% { opacity: 0; transform: translateY(var(--from)); } 55% { opacity: 1; } 100% { opacity: 1; transform: translateY(0); } }
@keyframes dpGlow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes dpRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dpFade { to { opacity: 1; } }

@keyframes dpRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dpFade { to { opacity: 1; } }
@keyframes dpSlide { from { transform: translateX(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes dpDots { to { clip-path: inset(0 0 0 0); } }

/* 视觉动画样式由 visuals.js 自注入（app/落地页通用） */
/* 节点详情抽屉 */
.node-detail {
  position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 80%;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -16px 0 40px -30px rgba(60,45,15,.5);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.3,1); z-index: 8;
  display: flex; flex-direction: column; padding: 0;
}
.node-detail.open { transform: none; }
.nd-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.nd-title { font-family: var(--serif); font-weight: 700; font-size: 18px; }
#nd-close { border: none; background: none; cursor: pointer; color: var(--dim); font-size: 15px; }
#nd-close:hover { color: var(--cin); }
.nd-essence { padding: 0 18px 10px; color: var(--ink2); font-size: 13.5px; line-height: 1.6; }
.nd-ann { padding: 0 18px; }
.nd-body { padding: 12px 18px 24px; overflow-y: auto; font-size: 14px; line-height: 1.75; }
.actnote { font-size: 12px; color: var(--dim); margin-top: 6px; letter-spacing: .02em; }
/* 管理员只读查看 */
body.view-only #composer { display: none; }
body.view-only #chat::after { content: "只读 · 管理员查看模式"; display: block; text-align: center; font-size: 11px; color: var(--dim); padding: 10px; border-top: 1px solid var(--line2); letter-spacing: .1em; }
body.view-only .account .acc-name { color: var(--cin); }

/* ---------- 对话 ---------- */
#chat { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -12px 0 30px -26px rgba(60,45,15,.4); }
#chat-log { flex: 1; overflow-y: auto; padding: 22px 18px 8px; }
.turn { margin-bottom: 20px; }
.msg.user { margin-left: auto; background: var(--ink); color: #f3f0e8; border-radius: 14px 14px 4px 14px;
  padding: 9px 14px; width: fit-content; max-width: 86%; white-space: pre-wrap; word-break: break-word; margin-bottom: 10px; }
.msg.ai { line-height: 1.72; }
.msg.ai .fast { animation: vrise .3s ease; }
.msg.ai .fast > :first-child { margin-top: 0; }
.deep { margin-top: 11px; padding: 10px 13px; border-left: 2px solid var(--cin); background: linear-gradient(100deg, #eef5f6, #e8f1f3);
  border-radius: 3px 10px 10px 3px; font-size: 13.5px; }
.deep.landed { animation: deepunfurl .55s cubic-bezier(.2,.8,.3,1); }
@keyframes deepunfurl { from { opacity: 0; transform: translateY(-4px); max-height: 0; } to { opacity: 1; transform: none; } }
.deep.pending { background: none; border-left-color: var(--line); padding: 4px 13px; }
.deepening { color: var(--dim); font-size: 12.5px; }
.deepening::after { content: "···"; animation: dots 1.3s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }
.dl { padding: 5px 0; display: block; color: var(--ink2); line-height: 1.65; }
.dtag { display: inline-block; font-size: 11px; padding: 1.5px 8px; border-radius: 6px; margin-right: 8px; font-weight: 600; vertical-align: 1.5px; letter-spacing: .02em; }
.dl.warn .dtag { background: #f7e0d8; color: #a33f22; }
.dl.ok .dtag { background: #e6efe6; color: #4a7350; }
.dl.rel .dtag { background: #e3ebf4; color: #38618f; }
.dl.eg .dtag { background: #e4edee; color: #566e74; }
.deep code { background: var(--chip); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.msg.ai p { margin: 0 0 8px; } .msg.ai ul, .msg.ai ol { margin: 0 0 8px; padding-left: 20px; }
.msg.ai strong { color: var(--ink); } .msg.ai code { background: var(--chip); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.typing { color: var(--dim); font-size: 12px; }
.typing::after { content: "···"; animation: dots 1.3s steps(4) infinite; }

#composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px 16px; border-top: 1px solid var(--line2); }
#chat-input { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; font: inherit; line-height: 1.5; outline: none; background: #fff; max-height: 140px; transition: border-color .15s; }
#chat-input:focus { border-color: #8fb6c0; }
#btn-voice, #btn-send { flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; cursor: pointer; border: 1px solid var(--line); background: #fff; font-size: 16px; transition: all .15s; display: flex; align-items: center; justify-content: center; }
#btn-voice { color: var(--ink2); }
#btn-voice:hover { border-color: var(--cin); color: var(--cin); }
#btn-voice.on { background: var(--cin); border-color: var(--cin); color: #fff; animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(44,122,144,.16); } }
#btn-send { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
#btn-send:hover { background: var(--cin); border-color: var(--cin); }
#btn-send:disabled { opacity: .4; cursor: default; }
.voice-hint { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); font-size: 12px; padding: 6px 14px; border-radius: 10px; }

/* ---------- setup ---------- */
.modal { position: fixed; inset: 0; background: rgba(44,39,28,.45); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-box { background: var(--panel); border-radius: 14px; padding: 26px; width: min(440px, 92vw); display: flex; flex-direction: column; gap: 12px; }
.modal-box h3 { font-family: var(--serif); }
.modal-box p { color: var(--ink2); font-size: 13px; line-height: 1.6; }
.modal-box input { border: 1px solid var(--line); border-radius: 9px; padding: 11px; font: inherit; }
.modal-box button { background: var(--ink); color: var(--paper); border: none; border-radius: 9px; padding: 11px; cursor: pointer; font-size: 14px; }
.modal-box button:hover { background: var(--cin); }

/* ---------- 手机端：单列 + 抽屉 + 对话/深潭切换 ---------- */
#mbar, #m-scrim { display: none; }

@media (max-width: 820px) {
  #mbar { display: flex; align-items: center; gap: 10px; position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
    background: var(--panel); border-bottom: 1px solid var(--line); }
  #m-menu { width: 36px; height: 34px; border: none; background: none; display: flex; flex-direction: column; justify-content: center; gap: 4px; cursor: pointer; padding: 0 6px; }
  #m-menu span { display: block; height: 2px; background: var(--ink2); border-radius: 2px; transition: .2s; }
  .m-title { flex: 1; font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--paper); flex-shrink: 0; }
  .m-seg button { border: none; background: none; padding: 6px 13px; font-size: 12.5px; color: var(--ink2); cursor: pointer; position: relative; }
  .m-seg button.on { background: var(--cin); color: #fff; }
  .m-seg [data-v="pool"].ping::after { content: ""; position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #7fd6e8; box-shadow: 0 0 7px #7fd6e8; }

  #app { display: block; }
  #sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(80%, 300px); flex-direction: column;
    transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.8,.3,1);
    box-shadow: 8px 0 36px -14px rgba(8,28,36,.45); padding-top: calc(18px + env(safe-area-inset-top)); }
  body.m-drawer #sidebar { transform: none; }
  #m-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10,26,32,.42);
    opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.m-drawer #m-scrim { opacity: 1; pointer-events: auto; }

  #pool, #chat { position: fixed; left: 0; right: 0; bottom: 0; top: calc(52px + env(safe-area-inset-top)); width: auto; }
  #chat { border-left: none; box-shadow: none; }
  #pool { display: none; }
  body.m-pool #pool { display: block; }
  body.m-pool #chat { display: none; }

  .dp-beat { padding-left: 80px; padding-right: 16px; }
  .dp-through { font-size: 18px; } .dp-hold-say { font-size: 18.5px; }
  .node-detail { width: 86%; }
}

/* ---------- toast（轻提示，错误不再静默吞掉）---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--paper); font-size: 13px; padding: 9px 16px;
  border-radius: 11px; box-shadow: 0 6px 22px rgba(40,37,31,.28); z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; max-width: 80vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 结晶卡片（深潭里点开后台产物）---------- */
.crys-doc { font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.crys-doc h1, .crys-doc h2, .crys-doc h3 { font-family: var(--serif); }
.crys-conflict { background: var(--cin-soft); color: var(--cin); border-radius: 8px; padding: 8px 11px; font-size: 12.5px; margin-bottom: 12px; }
.crys-ev { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.crys-h { font-size: 12px; color: var(--dim); margin-bottom: 8px; letter-spacing: .04em; }
.ev-basis { color: var(--dim); font-size: 11.5px; }
.crys-actions { display: flex; gap: 10px; margin-top: 16px; }
.crys-actions button { flex: 1; border-radius: 9px; padding: 9px; cursor: pointer; font-size: 13px; border: 1px solid var(--line); }
.ca-ok { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.ca-ok:hover { background: var(--cin); border-color: var(--cin); }
.ca-no { background: none; color: var(--ink2); }
.ca-no:hover { border-color: var(--cin); color: var(--cin); }

/* ---------- 意图药丸（按需展开，零常驻面板）---------- */
.intent-pill { position: absolute; top: 14px; left: 16px; z-index: 7; display: flex; align-items: center; gap: 7px;
  background: rgba(253,252,248,.86); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px 5px 10px; cursor: pointer; font-size: 12.5px; color: var(--ink2); transition: all .15s; box-shadow: 0 1px 6px rgba(40,37,31,.05); }
.intent-pill:hover { border-color: var(--cin); color: var(--ink); }
.intent-pill.hidden { display: none; }
.ip-dot { width: 7px; height: 7px; background: var(--cin); border-radius: 2px; transform: rotate(45deg); flex-shrink: 0; }
.ip-goal { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-n { background: var(--chip); border-radius: 999px; padding: 0 7px; font-size: 11px; color: var(--dim); }
.intent-pop { position: absolute; top: 48px; left: 16px; z-index: 8; width: min(320px, 80vw); background: var(--panel);
  border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 10px 34px rgba(40,37,31,.16); padding: 14px;
  display: none; flex-direction: column; gap: 8px; }
.intent-pop.open { display: flex; }
.ipop-h { font-family: var(--serif); font-weight: 700; font-size: 14px; }
.ipop-goal { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
.ipop-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--line2); }
.ipop-item.inferred { opacity: .82; }
.ii-k { background: var(--chip); border-radius: 6px; padding: 1px 7px; font-size: 11px; color: var(--ink2); flex-shrink: 0; }
.ii-t { flex: 1; color: var(--ink); }
.ipop-item.inferred .ii-t { font-style: italic; color: var(--ink2); }
.ii-ok, .ii-del { border: none; background: none; cursor: pointer; color: var(--dim); font-size: 12px; padding: 2px 4px; flex-shrink: 0; }
.ii-ok:hover { color: var(--ok); } .ii-del:hover { color: var(--cin); }
.ipop-empty { color: var(--dim); font-size: 12px; padding: 6px 0; }
.ipop-add { display: flex; gap: 6px; margin-top: 4px; }
.ipop-add select { border: 1px solid var(--line); border-radius: 8px; font-size: 12px; padding: 0 4px; }
.ipop-add input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 12.5px; }
.ipop-add button { border: none; background: var(--ink); color: var(--paper); border-radius: 8px; width: 32px; cursor: pointer; font-size: 16px; }
.ipop-add button:hover { background: var(--cin); }

/* ---------- 交互画布浮层 ---------- */
.canvas-ov { position: fixed; inset: 0; z-index: 60; background: rgba(44,39,28,.4); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 4vh 3vw; }
.canvas-ov.open { display: flex; }
.cov-box { background: var(--paper); border-radius: 16px; box-shadow: 0 20px 60px rgba(40,37,31,.32);
  width: min(860px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.cov-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px;
  border-bottom: 1px solid var(--line); background: var(--panel); }
.cov-title { font-family: var(--serif); font-weight: 700; font-size: 15px; }
.cov-tools button { border: none; background: none; color: var(--dim); cursor: pointer; font-size: 15px; padding: 4px 7px; }
.cov-tools button:hover { color: var(--cin); }
.cov-body { padding: 0; overflow-y: auto; }
.cov-frame { width: 100%; border: 0; display: block; background: var(--paper); min-height: 300px; }
.cov-loading { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--dim); }
