/* style: styles/main.css */
/*
 * 主样式文件。
 * 从原单文件 HTML 的 <style> 拆出，保留原顺序，避免视觉回归。
 * 后续可继续拆分为 base.css / graph.css / modal.css / flashcard.css / question-bank.css。
 */

:root{
  --bg:#f6f7fb;--panel:#fff;--text:#172033;--muted:#64748b;--line:#2563eb;--border:#d7dce8;
  --shadow:0 18px 48px rgba(15,23,42,.14);--card-w:128px;--card-h:132px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;margin:0;overflow:hidden;font-family:"Microsoft YaHei","PingFang SC",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);overscroll-behavior:none}
button,input,textarea,select{font:inherit}
button{border:0;border-radius:12px;background:#fff;color:#172033;padding:9px 12px;box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08);cursor:pointer;transition:.15s ease;touch-action:manipulation;white-space:nowrap}
button:hover{transform:none;box-shadow:0 7px 20px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.1)}
button:focus-visible{outline:3px solid rgba(103,87,232,.28);outline-offset:3px}

/* v8.5.4.2 · 统一操作按钮设计语言 */
.ui-button{
  --ui-button-bg:#fff;--ui-button-ink:#344156;--ui-button-border:#d5dae4;--ui-button-depth:#b8c0cd;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:160px;width:160px;height:48px;padding:0 20px;
  border:1px solid var(--ui-button-border);border-radius:13px;background:var(--ui-button-bg);color:var(--ui-button-ink);
  font-weight:900;line-height:1;text-align:center;text-decoration:none;cursor:pointer;
  box-shadow:0 4px 0 var(--ui-button-depth);transform:translateY(0);
  transition:background-color .14s ease,border-color .14s ease,color .14s ease,filter .14s ease,box-shadow .08s ease,transform .08s ease
}
.ui-button:hover{transform:translateY(0);filter:brightness(1.035);box-shadow:0 4px 0 var(--ui-button-depth)}
.ui-button:active:not(:disabled):not([aria-disabled="true"]){transform:translateY(4px);box-shadow:0 0 0 var(--ui-button-depth)}
.ui-button:focus-visible{outline:3px solid rgba(103,87,232,.3);outline-offset:3px}
.ui-button:disabled,.ui-button[aria-disabled="true"]{opacity:.56;cursor:not-allowed;filter:none;transform:none;box-shadow:0 4px 0 var(--ui-button-depth)}
.ui-button--primary{--ui-button-bg:#6757e8;--ui-button-ink:#fff;--ui-button-border:#6757e8;--ui-button-depth:#4938bd}
.ui-button--secondary{--ui-button-bg:#fff;--ui-button-ink:#4c5565;--ui-button-border:#d4d9e3;--ui-button-depth:#b9c0cc}
.ui-button--danger{--ui-button-bg:#d94b5b;--ui-button-ink:#fff;--ui-button-border:#d94b5b;--ui-button-depth:#a92e3c}
.ui-button--compact{min-width:0;width:auto;height:40px;padding:0 14px;border-radius:11px}
.ui-option-control{transform:none;transition:background-color .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease,transform .08s ease}
.ui-option-control:hover{transform:none}
.ui-option-control:active:not(:disabled){transform:translateY(2px)}
button.primary{background:#2563eb;color:#fff;box-shadow:0 8px 22px rgba(37,99,235,.24)}
button.danger{background:#fff1f2;color:#be123c;box-shadow:0 0 0 1px rgba(190,18,60,.16)}
button.ghost{background:#f8fafc;color:#475569;box-shadow:0 0 0 1px rgba(15,23,42,.08)}

button.active-toggle{background:#0f172a;color:#fff;box-shadow:0 8px 22px rgba(15,23,42,.16)}
.style-control{display:inline-flex;align-items:center;gap:6px;border-radius:12px;background:#fff;color:#475569;padding:6px 9px;box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08);white-space:nowrap;font-size:13px}
.style-control input[type=color],.form-grid input[type=color]{width:34px;height:28px;border:0;border-radius:9px;padding:0;background:transparent;cursor:pointer}
.mobile-color-control{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:1;border-radius:15px;background:#fff;color:#172033;padding:7px 4px;box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08);font-size:12px;white-space:nowrap}
.mobile-color-control input[type=color]{width:26px;height:24px;border:0;border-radius:8px;padding:0;background:transparent}
.app{position:fixed;inset:0;display:flex;flex-direction:column}
.toolbar{height:60px;display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:1px solid rgba(15,23,42,.08);background:rgba(247,249,253,.92);backdrop-filter:blur(14px);z-index:30;overflow-x:auto;overflow-y:hidden}
.brand{display:flex;flex-direction:column;gap:1px;margin-right:8px;min-width:150px}
.brand h1{font-size:16px;margin:0;white-space:nowrap;line-height:1.1}.brand span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
.toolbar .spacer{flex:1}.toolbar .hint{color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:570px}
.stage{position:relative;flex:1;overflow:hidden;cursor:grab;background-image:radial-gradient(circle at 1px 1px,rgba(15,23,42,.12) 1px,transparent 0);background-size:28px 28px;background-color:#f7f8fc;touch-action:none;user-select:none}
.stage.focus-mode{background-color:#111827;background-image:radial-gradient(circle at 1px 1px,rgba(255,255,255,.10) 1px,transparent 0)}
.stage.focus-mode .help-card{opacity:.18}
.stage.focus-mode .knowledge-card{filter:grayscale(1) brightness(.58);opacity:.58}
.stage.focus-mode .knowledge-card.focus-card{filter:none;opacity:1;animation:focusGlow 2.4s ease-in-out infinite;z-index:8}
.stage.focus-mode .knowledge-card.focus-card .node-title{color:#0f172a}
.stage.focus-mode .edge-visible{stroke:#64748b;opacity:.28;filter:none}
.stage.focus-mode .edge-hit.selected+.edge-visible{stroke:#93c5fd;opacity:.9}
.stage.focus-mode .edge-label{fill:#94a3b8;opacity:.45}

.stage.focus-mode .edge-visible.focus-important-edge{stroke:var(--edge-color,var(--line))!important;opacity:.95!important;stroke-width:4.5;filter:none}
.stage.focus-mode .edge-hit.selected+.edge-visible.focus-important-edge{stroke:var(--edge-color,var(--line))!important;opacity:1!important;stroke-width:6}
.stage.focus-mode .edge-label.focus-important-label{fill:#f8fafc;opacity:.95;stroke:#111827;stroke-width:4px}
@keyframes focusGlow{0%,100%{box-shadow:0 18px 46px rgba(37,99,235,.26),0 0 0 3px rgba(37,99,235,.86),0 0 16px rgba(250,204,21,.45)}50%{box-shadow:0 22px 58px rgba(37,99,235,.34),0 0 0 4px rgba(250,204,21,.95),0 0 34px rgba(250,204,21,.95)}}
/* 重点聚焦模式轻量性能修复：拖拽、平移、缩放时临时关闭高成本滤镜和发光动画，减少整图重绘。 */
.stage.is-interacting .knowledge-card{transition:none!important}
.stage.focus-mode.is-interacting .knowledge-card{filter:none!important}
.stage.focus-mode.is-interacting .knowledge-card.focus-card{animation:none!important}
.stage.focus-mode.is-interacting .knowledge-card:hover,
.stage.focus-mode.is-interacting .knowledge-card.dragging,
.stage.focus-mode.is-interacting .knowledge-card.group-dragging{box-shadow:0 10px 26px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.08)!important}
.stage.is-interacting .edge-hit{pointer-events:none!important}
.stage.focus-mode.is-interacting .edge-label{display:none!important}

.stage.panning{cursor:grabbing}
.world{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform;touch-action:none}
.edge-layer{position:absolute;left:-50000px;top:-50000px;width:100000px;height:100000px;overflow:visible;z-index:1;pointer-events:none}
.cards-layer{position:absolute;left:0;top:0;z-index:2}
.edge-visible{fill:none;stroke:var(--edge-color,var(--line));stroke-width:4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 3px 3px rgba(37,99,235,.18));pointer-events:none}
.edge-hit{fill:none;stroke:rgba(37,99,235,.001);stroke-width:28;stroke-linecap:round;stroke-linejoin:round;cursor:pointer;pointer-events:stroke;vector-effect:non-scaling-stroke}
.edge-hit:hover+.edge-visible,.edge-hit.selected+.edge-visible{stroke-width:7;filter:drop-shadow(0 0 6px rgba(37,99,235,.45)) drop-shadow(0 3px 3px rgba(37,99,235,.18))}
.edge-label{font-size:14px;paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round;fill:#1e3a8a;pointer-events:none;font-weight:800}
.knowledge-card{position:absolute;width:var(--card-w);height:var(--card-h);border-radius:20px;background:#fff;box-shadow:0 10px 26px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.08);overflow:hidden;cursor:grab;user-select:none;transition:box-shadow .14s ease,transform .14s ease;touch-action:none;container-type:inline-size}

.knowledge-card.size-small{--card-w:104px;--card-h:110px;border-radius:18px}
.knowledge-card.size-small .node-top{height:66px}
.knowledge-card.size-small .node-icon{width:46px;height:46px;border-radius:15px;font-size:18px}
.knowledge-card.size-small .node-title{height:44px;font-size:13px;padding:0 7px}
.knowledge-card.size-big{--card-w:160px;--card-h:166px;border-radius:24px}
.knowledge-card.size-big .node-top{height:100px}
.knowledge-card.size-big .node-icon{width:70px;height:70px;border-radius:22px;font-size:25px}
.knowledge-card.size-big .node-title{height:66px;font-size:17px;padding:0 12px}
.knowledge-card:hover{box-shadow:0 16px 34px rgba(15,23,42,.18),0 0 0 1px rgba(37,99,235,.28)}
.knowledge-card.dragging{cursor:grabbing;transition:none;box-shadow:0 20px 48px rgba(15,23,42,.24),0 0 0 2px rgba(37,99,235,.35)}
.knowledge-card.active{box-shadow:0 20px 48px rgba(37,99,235,.22),0 0 0 3px rgba(37,99,235,.78)}
.knowledge-card.link-source:after{content:"连线起点";position:absolute;left:50%;top:-34px;transform:translateX(-50%);box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:max-content;min-width:56px;max-width:calc(100% + 40px);height:22px;padding:0 9px;font-size:clamp(9px,10cqw,12px);line-height:1;white-space:nowrap;overflow:hidden;text-overflow:clip;font-weight:900;color:#fff;background:#2563eb;border-radius:999px;box-shadow:0 4px 12px rgba(37,99,235,.28);pointer-events:none}
.node-top{height:78px;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#f3f4f6,#e5e7eb)}
.node-icon{width:56px;height:56px;border-radius:18px;background:#d1d5db;display:grid;place-items:center;color:#fff;font-weight:1000;font-size:20px;box-shadow:inset 0 -8px 0 rgba(15,23,42,.08),0 8px 18px rgba(15,23,42,.10)}
.node-title{height:54px;display:flex;align-items:center;justify-content:center;padding:0 9px;text-align:center;font-weight:850;font-size:15px;line-height:1.2;color:#111827;border-top:1px solid rgba(15,23,42,.06);background:#fff;word-break:break-word}
.status-chip{position:absolute;left:16px;bottom:16px;background:#111827;color:#fff;border-radius:999px;padding:8px 12px;font-size:13px;box-shadow:var(--shadow);opacity:0;transform:translateY(8px);pointer-events:none;transition:.2s ease;z-index:40;max-width:calc(100vw - 32px)}
.status-chip.show{opacity:1;transform:translateY(0)}
.detail-panel{position:absolute;right:18px;top:78px;width:min(396px,calc(100vw - 36px));background:rgba(255,255,255,.94);border:1px solid rgba(15,23,42,.08);box-shadow:var(--shadow);backdrop-filter:blur(16px);border-radius:22px;z-index:25;padding:18px;display:none;pointer-events:auto}
.detail-panel.show{display:block;animation:panelIn .18s ease both}@keyframes panelIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.detail-top{display:flex;align-items:flex-start;gap:12px;margin-bottom:12px}.detail-mini-icon{width:52px;height:52px;border-radius:17px;flex:0 0 auto;display:grid;place-items:center;font-weight:1000;color:#fff}.detail-name{font-size:21px;font-weight:950;line-height:1.15;margin-top:1px}.detail-title{font-size:13px;color:#4b5563;margin-top:5px;line-height:1.4}.close-detail{position:absolute;right:12px;top:12px;width:30px;height:30px;border-radius:10px;padding:0;box-shadow:none;background:#f3f4f6;color:#64748b}
.detail-grid{display:grid;grid-template-columns:82px 1fr;gap:8px 10px;font-size:14px;line-height:1.55;border-top:1px solid rgba(15,23,42,.08);padding-top:13px}.detail-grid .label{color:#64748b;text-align:right}.detail-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}.detail-actions button{flex:1 1 120px}
.badge{display:inline-flex;align-items:center;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:800;padding:2px 8px;margin-right:4px}
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.44);display:none;align-items:center;justify-content:center;z-index:60;padding:20px;touch-action:none}.modal-backdrop.show{display:flex}.modal{width:min(590px,100%);max-height:calc(100vh - 42px);overflow:auto;background:#fff;border-radius:24px;box-shadow:0 30px 90px rgba(0,0,0,.30);padding:22px;border:1px solid rgba(255,255,255,.7)}.modal h2{margin:0 0 14px;font-size:20px}.modal p{margin:0 0 14px;color:#64748b;line-height:1.55;font-size:14px}.form-grid{display:grid;grid-template-columns:96px 1fr;gap:10px 12px;align-items:center}.form-grid label{font-size:14px;color:#475569;text-align:right}.form-grid input,.form-grid textarea,.form-grid select{width:100%;border:1px solid #cfd6e4;border-radius:12px;padding:10px 12px;background:#fff;color:#111827;outline:none;user-select:text;touch-action:auto}.form-grid textarea{min-height:78px;resize:vertical;line-height:1.45}.modal-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}.modal-actions .left{margin-right:auto}
.learning-entry-chooser-backdrop{z-index:100}.learning-entry-chooser-modal{width:min(650px,100%);padding:26px;background:linear-gradient(135deg,#fff,#f8fbff)}.learning-entry-chooser-intro{margin-top:-5px}.learning-entry-chooser-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.learning-entry-choice{min-height:116px;text-align:left;border:1px solid #d7dce8;border-radius:18px;padding:17px;background:#f8fafc;color:#0f172a;box-shadow:none;transition:.15s ease}.learning-entry-choice:hover,.learning-entry-choice:focus-visible{border-color:#93c5fd;background:#fff;transform:translateY(-1px);box-shadow:0 12px 28px rgba(37,99,235,.14);outline:0}.learning-entry-choice:focus-visible{box-shadow:0 0 0 3px rgba(37,99,235,.22),0 12px 28px rgba(37,99,235,.14)}.learning-entry-choice:disabled{cursor:wait;opacity:.72}.learning-entry-choice-title,.learning-entry-choice-description{display:block}.learning-entry-choice-title{font-size:16px;font-weight:900}.learning-entry-choice-description{margin-top:8px;color:#64748b;font-size:13px;font-weight:650}.learning-entry-chooser-error{min-height:20px;margin:14px 0 0!important;color:#dc2626!important;font-weight:750}
.template-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.template-card{border:1px solid #d7dce8;border-radius:18px;padding:15px;background:#f8fafc;cursor:pointer;transition:.15s ease}.template-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(15,23,42,.12);border-color:#93c5fd}.template-card h3{margin:0 0 7px;font-size:16px}.template-card div{font-size:13px;color:#64748b;line-height:1.5}
.help-card{position:absolute;left:18px;top:78px;width:min(440px,calc(100vw - 36px));background:rgba(255,255,255,.86);border:1px solid rgba(15,23,42,.08);box-shadow:0 12px 38px rgba(15,23,42,.10);backdrop-filter:blur(14px);border-radius:20px;z-index:20;padding:14px 16px;color:#475569;font-size:13px;line-height:1.7}.help-card strong{color:#111827}.help-card.hide{display:none}.help-card-copy{padding-right:34px}.help-card-close{position:absolute;right:10px;top:10px;width:26px;height:26px;padding:0;border-radius:9px;box-shadow:none;background:#f3f4f6;color:#64748b}.help-card-actions{display:flex;justify-content:flex-end;margin-top:10px;padding-top:9px;border-top:1px solid rgba(15,23,42,.08)}.help-card-actions .help-card-tour-btn{position:static;width:auto;height:auto;padding:7px 10px}
.home-mobile-readonly-notice{position:fixed;z-index:180;left:12px;right:12px;top:calc(env(safe-area-inset-top,0px) + 12px);display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:11px;padding:12px;border:1px solid rgba(148,163,184,.32);border-radius:18px;background:rgba(255,255,255,.97);box-shadow:0 18px 46px rgba(15,23,42,.22);color:#172033;font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}.home-mobile-readonly-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#f2f0ff;color:#6757e8;font-size:25px;font-weight:800}.home-mobile-readonly-notice strong{display:block;font-size:14px;line-height:1.25}.home-mobile-readonly-notice p{margin:4px 0 0;color:#64748b;font-size:12px;line-height:1.45}.home-mobile-readonly-notice button{min-width:54px;height:34px;padding:0 10px;border:0;border-radius:10px;background:#6757e8;color:#fff;box-shadow:none;font-size:12px;font-weight:800}
.mobile-bar{display:none;position:absolute;left:10px;right:10px;bottom:10px;z-index:32;background:rgba(255,255,255,.92);border:1px solid rgba(15,23,42,.09);box-shadow:0 15px 46px rgba(15,23,42,.18);backdrop-filter:blur(16px);border-radius:22px;padding:8px;gap:7px;align-items:center;justify-content:space-between}
.mobile-bar button{flex:1;padding:9px 5px;font-size:13px;border-radius:15px;box-shadow:none;background:#f8fafc}.mobile-bar button.primary{background:#2563eb;color:#fff}.mobile-bar button.small{flex:.7}

/* 记忆闪卡 */
.flashcard-modal{width:min(760px,100%);max-height:calc(100vh - 34px);background:linear-gradient(135deg,#fbfeff 0%,#f0fdf4 46%,#f8fbff 100%);border:1px solid rgba(148,163,184,.22)}
.flashcard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.flashcard-head h2{margin:0;font-size:22px}
.flashcard-head .sub{color:#64748b;font-size:13px;line-height:1.55;margin-top:4px}
.flashcard-close{width:34px;height:34px;padding:0;border-radius:12px;background:#ffffffcc;color:#64748b}
.flashcard-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0 14px}
.flashcard-tools button{background:#fff;border-radius:999px;padding:8px 12px;box-shadow:0 0 0 1px rgba(148,163,184,.22)}
.flashcard-tools button.active-toggle{background:#0f172a;color:#fff}
.flashcard-tip{margin-left:auto;color:#64748b;font-size:13px}
.flash-speed-control{display:flex;align-items:center;gap:8px;margin:2px 0 12px;padding:8px 12px;border-radius:16px;background:rgba(255,255,255,.78);box-shadow:0 0 0 1px rgba(148,163,184,.18);color:#475569;font-size:13px;font-weight:800;width:fit-content;max-width:100%}
.flash-speed-control input{width:150px;accent-color:#2563eb}
.flash-speed-control span{min-width:36px;color:#0f172a}
.flashcard-grid{display:flex;align-items:center;justify-content:center;min-height:min(560px,calc(100vh - 255px));max-height:none;overflow:visible;padding:8px 0 12px;overscroll-behavior:contain}
.memory-card{aspect-ratio:3/4;perspective:1200px;cursor:pointer;min-height:224px}
.memory-card-inner{position:relative;width:100%;height:100%;transition:transform .62s cubic-bezier(.2,.8,.2,1);transform-style:preserve-3d}
.memory-card.flipped .memory-card-inner{transform:rotateY(180deg)}
.memory-face{position:absolute;inset:0;border-radius:24px;backface-visibility:hidden;overflow:hidden;box-shadow:0 16px 38px rgba(15,23,42,.13),0 0 0 1px rgba(148,163,184,.18);display:flex;flex-direction:column}
.memory-front{align-items:center;justify-content:center;text-align:center;padding:18px;background:linear-gradient(150deg,#eff6ff 0%,#ecfeff 45%,#f0fdf4 100%)}
.memory-front:before{content:"";position:absolute;inset:12px;border-radius:20px;border:1px dashed rgba(37,99,235,.18)}
.memory-subject{position:absolute;top:14px;left:14px;right:14px;text-align:left;font-size:12px;color:#64748b;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.memory-title{font-weight:950;font-size:20px;line-height:1.25;color:#0f172a;z-index:1;word-break:break-word}
.memory-front .memory-badge{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);border-radius:999px;background:#ffffffcc;color:#2563eb;font-size:12px;font-weight:850;padding:5px 10px;box-shadow:0 0 0 1px rgba(37,99,235,.10)}
.memory-back{transform:rotateY(180deg);padding:16px;background:linear-gradient(160deg,#ffffff 0%,#f8fafc 38%,#ecfeff 100%);gap:9px}
.memory-card.key-card .memory-back{background:linear-gradient(160deg,#ffffff 0%,#fefce8 42%,#ecfeff 100%);box-shadow:0 16px 38px rgba(15,23,42,.13),0 0 0 2px rgba(217,249,157,.9),0 0 26px rgba(217,249,157,.55)}
.memory-back h3{margin:0;font-size:16px;line-height:1.25;color:#0f172a}
.memory-back .section-title{font-size:12px;font-weight:950;color:#0f766e;margin-top:1px}
.memory-back .explain,.memory-back .mnemonic{font-size:13px;line-height:1.48;color:#334155;overflow:auto;max-height:34%}
.memory-back .mnemonic{padding:6px 7px;border-radius:11px;background:rgba(240,253,244,.75)}
.memory-highlight{display:inline;border-radius:5px;padding:0 .12em;background:linear-gradient(transparent 52%,rgba(217,249,157,.92) 0);font-weight:900;color:#0f172a;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.memory-card.key-card .memory-back .mnemonic{background:rgba(240,253,244,.75)}
.memory-key{position:absolute;right:12px;top:12px;background:#d9f99d;color:#365314;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:950;box-shadow:0 0 18px rgba(217,249,157,.9)}
.memory-actions{margin-top:auto;display:flex;gap:8px}
.memory-actions button{flex:1;border-radius:13px;padding:8px 8px;font-size:13px;background:#dcfce7;color:#166534;box-shadow:0 0 0 1px rgba(34,197,94,.18)}
.memory-actions button.secondary{background:#eff6ff;color:#1d4ed8;box-shadow:0 0 0 1px rgba(37,99,235,.16)}
.flashcard-empty{grid-column:1/-1;padding:28px;border-radius:22px;background:#fff;color:#64748b;text-align:center;border:1px dashed #cbd5e1}
@media(max-width:850px),(pointer:coarse){
  .flashcard-modal{width:100%;max-height:90vh;border-radius:24px 24px 18px 18px}
  .flashcard-grid{min-height:min(510px,calc(92vh - 300px))}
  .memory-card{min-height:190px}.memory-title{font-size:17px}.memory-back{padding:13px}.memory-back .explain,.memory-back .mnemonic{font-size:12px;line-height:1.42}
  .flashcard-tip{width:100%;margin-left:0}
  .flash-speed-control{width:100%;justify-content:space-between}
  .flash-speed-control input{flex:1;min-width:120px}
}

input[type=file]{display:none}
@media(max-width:850px),(pointer:coarse){
  .toolbar{height:56px;padding:8px 10px}.brand{min-width:126px}.brand h1{font-size:14px}.brand span{display:none}.toolbar .hint{display:none}
  .stage{padding-bottom:76px}
  .help-card{left:10px;right:10px;top:66px;width:auto;font-size:12px;padding:12px 14px;line-height:1.55}
  .detail-panel{left:10px;right:10px;top:auto;bottom:78px;width:auto;max-height:48vh;overflow:auto;border-radius:24px;padding:16px}
  .detail-name{font-size:20px}.detail-grid{grid-template-columns:64px 1fr;font-size:13px}.detail-grid .label{text-align:left}
  .mobile-bar{display:flex}
  .status-chip{left:10px;right:10px;bottom:84px;max-width:none;text-align:center;border-radius:16px}
  .modal-backdrop{align-items:flex-end;padding:10px}.modal{border-radius:24px 24px 18px 18px;max-height:88vh;padding:18px}.form-grid{grid-template-columns:1fr;gap:7px}.form-grid label{text-align:left;margin-top:3px}
  .template-grid,.learning-entry-chooser-grid{grid-template-columns:1fr}
}
@media(max-width:440px){.mobile-bar{gap:4px;padding:7px}.mobile-bar button{min-width:0;font-size:11px;padding:8px 2px}.toolbar button{padding:8px 10px}.knowledge-card{--card-w:120px}}

/* 单张滑动式记忆闪卡增强 */
.flashcard-tools{align-items:center}
.flashcard-tools input[type=file]{display:none}
.flashcard-progress{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin:6px 0 12px;color:#64748b;font-size:13px}
.flashcard-progress strong{color:#0f172a}
.flash-import-guide{display:none;margin:8px 0 12px;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.72);box-shadow:0 0 0 1px rgba(148,163,184,.22);color:#475569;font-size:13px;line-height:1.6}
.flash-import-guide.show{display:block}
.flash-import-guide table{width:100%;border-collapse:collapse;margin:8px 0;background:#fff;border-radius:12px;overflow:hidden}
.flash-import-guide th,.flash-import-guide td{border:1px solid #e2e8f0;padding:6px 8px;text-align:left;white-space:nowrap}
.flash-import-guide code{background:#f1f5f9;border-radius:7px;padding:2px 5px;color:#0f172a}
.flashcard-session{width:100%;display:flex;flex-direction:column;align-items:center;gap:10px}
.memory-swipe-hints{width:min(360px,82vw);display:flex;justify-content:space-between;align-items:center;color:#94a3b8;font-size:13px;font-weight:800;pointer-events:none}
.flashcard-deck{position:relative;width:min(360px,82vw);aspect-ratio:3/4;display:grid;place-items:center;perspective:1400px;touch-action:none}
.flashcard-deck .memory-card{width:100%;height:100%;min-height:0;aspect-ratio:3/4;will-change:transform,opacity;touch-action:none;transform:translate3d(0,0,0) rotate(0deg);transform-origin:50% 78%;transition:transform .48s cubic-bezier(.18,1.18,.28,1),opacity .24s ease}
.flashcard-deck .memory-card.dragging{transition:none;cursor:grabbing}
.flashcard-deck .memory-card.rebounding,.flashcard-deck .memory-card.flying{pointer-events:none}
.flashcard-deck .memory-card.dragging .memory-card-inner{transition:transform .22s ease}
.flashcard-deck .memory-card.dragging .memory-review-mark{transition:opacity .08s ease,transform .08s ease}
.flashcard-deck .memory-card.swipe-left{animation:swipeLeftOut .34s ease-in forwards}
.flashcard-deck .memory-card.swipe-right{animation:swipeRightOut .34s ease-in forwards}
.flashcard-deck .memory-card.peek-left .memory-face{box-shadow:0 16px 42px rgba(244,63,94,.18),0 0 0 2px rgba(244,63,94,.25)}
.flashcard-deck .memory-card.peek-right .memory-face{box-shadow:0 16px 42px rgba(34,197,94,.20),0 0 0 2px rgba(34,197,94,.28)}
.memory-review-mark{position:absolute;z-index:4;top:18px;padding:6px 10px;border-radius:999px;font-size:13px;font-weight:1000;opacity:0;transform:scale(.92);transition:.16s ease;background:#fff}
.memory-review-mark.left{left:16px;color:#be123c;box-shadow:0 0 0 1px rgba(244,63,94,.18)}
.memory-review-mark.right{right:16px;color:#15803d;box-shadow:0 0 0 1px rgba(34,197,94,.18)}
.memory-card.peek-left .memory-review-mark.left,.memory-card.peek-right .memory-review-mark.right{opacity:1;transform:scale(1)}
.flashcard-review-actions{display:flex;gap:12px;width:min(360px,82vw)}
.flashcard-review-actions button{flex:1;border-radius:16px;padding:11px 12px}
.flashcard-review-actions .unclear{background:#fff1f2;color:#be123c;box-shadow:0 0 0 1px rgba(244,63,94,.16)}
.flashcard-review-actions .remember{background:#dcfce7;color:#166534;box-shadow:0 0 0 1px rgba(34,197,94,.18)}
.memory-schedule{font-size:12px;color:#64748b;line-height:1.45;border-radius:12px;background:rgba(248,250,252,.75);padding:6px 8px}
.memory-back .explain,.memory-back .mnemonic{max-height:29%}
.flashcard-empty{width:100%;max-width:520px}
@keyframes swipeLeftOut{to{transform:translateX(-118vw) rotate(-22deg);opacity:0}}
@keyframes swipeRightOut{to{transform:translateX(118vw) rotate(22deg);opacity:0}}
@media(max-width:850px),(pointer:coarse){
  .flashcard-modal{width:100%;max-height:92vh}
  .flash-import-guide{max-height:180px;overflow:auto}
}


/* 移动端闪卡全屏适配增强 */
.flash-tools-toggle{display:none}
@media(max-width:850px),(pointer:coarse){
  .flashcard-backdrop.show{
    align-items:center;
    justify-content:center;
    padding:0;
  }
  .flashcard-backdrop .flashcard-modal{
    width:100vw;
    height:100vh;
    height:100dvh;
    max-width:none;
    max-height:none;
    border-radius:0;
    border:0;
    padding:
      calc(10px + env(safe-area-inset-top))
      calc(12px + env(safe-area-inset-right))
      calc(10px + env(safe-area-inset-bottom))
      calc(12px + env(safe-area-inset-left));
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .flashcard-backdrop .flashcard-head{
    flex:0 0 auto;
    align-items:center;
    gap:8px;
    margin-bottom:6px;
  }
  .flashcard-backdrop .flashcard-head h2{
    font-size:18px;
    line-height:1.2;
  }
  .flashcard-backdrop .flashcard-head .sub{
    display:none;
  }
  .flashcard-backdrop .flashcard-close{
    flex:0 0 34px;
  }

  .flashcard-backdrop .flashcard-tools{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    margin:6px 0 8px;
  }
  .flashcard-backdrop .flashcard-tools button{
    justify-content:center;
    min-width:0;
    padding:8px 10px;
    font-size:13px;
  }
  .flashcard-backdrop .flash-tools-toggle{
    display:inline-flex!important;
    width:38px;
    height:34px;
    padding:0;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    font-size:16px;
    line-height:1;
    grid-column:2;
    grid-row:1;
  }
  .flashcard-backdrop .flashcard-tools>button:not(:first-of-type):not(.flash-tools-toggle),
  .flashcard-backdrop .flashcard-tools>.flashcard-tip{
    display:none;
  }
  .flashcard-backdrop .flashcard-tools.tools-expanded{
    grid-template-columns:repeat(2,minmax(0,1fr)) auto;
  }
  .flashcard-backdrop .flashcard-tools.tools-expanded>button:not(.flash-tools-toggle){
    display:inline-flex;
  }
  .flashcard-backdrop .flashcard-tools.tools-expanded>.flashcard-tip{
    display:block;
    grid-column:1 / -1;
    font-size:12px;
    line-height:1.35;
    margin:0;
  }
  .flashcard-backdrop .flashcard-tools input[type=file]{
    display:none;
  }

  .flashcard-backdrop .flash-speed-control{
    flex:0 0 auto;
    width:100%;
    margin:0 0 6px;
    padding:6px 10px;
    font-size:12px;
  }
  .flashcard-backdrop .flashcard-progress{
    flex:0 0 auto;
    margin:4px 0 6px;
    gap:4px;
    font-size:12px;
  }
  .flashcard-backdrop .flashcard-progress span{
    min-width:0;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .flashcard-backdrop .flash-import-guide.show{
    flex:0 0 auto;
    max-height:28vh;
    max-height:28dvh;
    overflow:auto;
    margin:4px 0 6px;
  }

  .flashcard-backdrop .flashcard-grid{
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:visible;
    padding:4px 0;
  }
  .flashcard-backdrop .flashcard-session{
    width:100%;
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
  }
  .flashcard-backdrop .memory-swipe-hints{
    display:none!important;
  }
  .flashcard-backdrop .flashcard-deck{
    width:min(86vw,48vh,360px);
    width:min(86vw,48dvh,360px);
    max-width:360px;
    flex:0 0 auto;
  }
  .flashcard-backdrop .flashcard-review-actions{
    width:min(86vw,360px);
    gap:8px;
    flex:0 0 auto;
  }
  .flashcard-backdrop .flashcard-review-actions button{
    padding:9px 10px;
    font-size:13px;
  }
  .flashcard-backdrop .memory-card{
    min-height:0;
  }
  .flashcard-backdrop .memory-face{
    border-radius:20px;
  }
  .flashcard-backdrop .memory-title{
    font-size:18px;
  }
  .flashcard-backdrop .memory-back{
    padding:12px;
  }
  .flashcard-backdrop .memory-back h3{
    font-size:15px;
  }
  .flashcard-backdrop .memory-back .explain,
  .flashcard-backdrop .memory-back .mnemonic{
    max-height:27%;
    font-size:12px;
    line-height:1.4;
  }
}
@media(max-width:380px),(max-height:620px){
  .flashcard-backdrop .flashcard-modal{
    padding:
      calc(8px + env(safe-area-inset-top))
      calc(10px + env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom))
      calc(10px + env(safe-area-inset-left));
  }
  .flashcard-backdrop .flashcard-deck{
    width:min(84vw,44vh,320px);
    width:min(84vw,44dvh,320px);
  }
  .flashcard-backdrop .flashcard-tools button{
    padding:7px 8px;
    font-size:12px;
  }
  .flashcard-backdrop .flash-speed-control{
    padding:5px 9px;
  }
  .flashcard-backdrop .flashcard-progress{
    font-size:11px;
  }
}


/* 知识点详情面板：操作按钮默认折叠 */
.detail-actions-toggle{
  position:absolute;
  right:48px;
  top:12px;
  width:30px;
  height:30px;
  border-radius:10px;
  padding:0;
  box-shadow:none;
  background:#eef2ff;
  color:#334155;
  font-weight:950;
  line-height:1;
}
.detail-panel .detail-actions{
  display:none!important;
}
.detail-panel.detail-actions-expanded .detail-actions{
  display:flex!important;
}
.detail-panel.hover-preview{
  border-color:rgba(37,99,235,.22);
  box-shadow:0 18px 52px rgba(37,99,235,.16),var(--shadow);
}
@media(max-width:850px),(pointer:coarse){
  .detail-actions-toggle{
    right:48px;
    top:12px;
  }
}


/* 重点与闪卡按钮配色 */
#focusBtn,#mFocusBtn{
  background:#f97316;
  color:#fff;
  box-shadow:0 8px 22px rgba(249,115,22,.24);
}
#flashcardBtn,#mFlashcardBtn{
  background:#ef4444;
  color:#fff;
  box-shadow:0 8px 22px rgba(239,68,68,.24);
}

/* 连线起点卡牌右侧尺寸微调按钮 */
.knowledge-card{
  overflow:visible;
}
.knowledge-card .card-body{
  width:100%;
  height:100%;
  border-radius:inherit;
  overflow:hidden;
  background:#fff;
}
.node-size-tools{
  position:absolute;
  left:calc(100% + 7px);
  top:50%;
  transform:translateY(-50%);
  display:none;
  flex-direction:column;
  gap:5px;
  z-index:12;
  pointer-events:auto;
}
.knowledge-card.link-source .node-size-tools{
  display:flex;
}
.node-size-btn{
  width:24px;
  height:24px;
  min-width:24px;
  padding:0;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-size:13px;
  line-height:1;
  font-weight:950;
  background:#0f172a;
  color:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.22),0 0 0 1px rgba(255,255,255,.9);
}
.node-size-btn:hover{
  transform:none;
}

/* 详情窗口可拖拽、按钮折叠与移动端顶部显示 */
.detail-panel{
  cursor:default;
}
.detail-panel .detail-top{
  cursor:move;
  touch-action:none;
}
.detail-panel.detail-dragging{
  user-select:none;
}
.detail-panel.detail-dragging .detail-top{
  cursor:grabbing;
}
.detail-panel .detail-actions{
  display:none!important;
}
.detail-panel.detail-actions-expanded .detail-actions{
  display:flex!important;
}
@media(max-width:850px),(pointer:coarse){
  .detail-panel{
    top:64px;
    bottom:auto;
    left:10px;
    right:10px;
    width:auto;
    max-height:calc(100dvh - 142px);
    overflow:auto;
    border-radius:22px;
  }
}

/* 记忆闪卡：PC/移动端顶部工具默认折叠，滑轨随工具一起收起 */
.flash-tools-toggle{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-width:36px;
  height:34px;
  padding:0 10px;
  border-radius:999px;
  font-weight:950;
}
.flashcard-tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.flashcard-tools:not(.tools-expanded)>button:not(:first-of-type):not(.flash-tools-toggle),
.flashcard-tools:not(.tools-expanded)>.flashcard-tip{
  display:none!important;
}
.flashcard-tools:not(.tools-expanded) ~ .flash-speed-control{
  display:none!important;
}
.flashcard-tools.tools-expanded>.flashcard-tip{
  display:inline-flex;
}
@media(hover:hover){
  .memory-card:not(.flipped):not(.dragging):not(.rebounding):not(.flying):hover .memory-card-inner{
    transform:none!important;
  }
}
@media(max-width:850px),(pointer:coarse){
  .flashcard-backdrop .flashcard-tools.tools-expanded{
    grid-template-columns:repeat(2,minmax(0,1fr)) auto;
  }
}


/* === 性能优化补丁：闪卡拖拽流畅、防卡死、移动端低绘制压力 === */
.flashcard-deck,
.flashcard-deck .memory-card{
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  touch-action:none;
}
.flashcard-deck{
  contain:layout;
}
.flashcard-deck .memory-card{
  contain:layout;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  will-change:transform,opacity;
  transform:translate3d(0,0,0) rotate(0deg);
}
.flashcard-deck .memory-card.dragging{
  transition:none!important;
}
.flashcard-deck .memory-card.dragging .memory-card-inner{
  transition:none!important;
}
.flashcard-deck.drag-active .memory-face{
  box-shadow:0 10px 24px rgba(15,23,42,.10),0 0 0 1px rgba(148,163,184,.16)!important;
}
.flashcard-deck.drag-active .memory-back .explain,
.flashcard-deck.drag-active .memory-back .mnemonic{
  overflow:hidden!important;
  pointer-events:none;
}
.flashcard-deck .memory-card.rebounding,
.flashcard-deck .memory-card.flying{
  pointer-events:none;
}
@media(max-width:850px),(pointer:coarse){
  .flashcard-deck .memory-face{
    box-shadow:0 10px 26px rgba(15,23,42,.11),0 0 0 1px rgba(148,163,184,.16);
  }
  .flashcard-deck .memory-card{
    transform-origin:50% 76%;
  }
}


/* === 闪卡拖拽无遮挡修复补丁 ===
   修复原因：
   1) 移动端 flashcard-grid 原本 overflow:hidden，会裁切偏移后的闪卡；
   2) 防卡顿补丁中的 contain:layout paint 会形成绘制裁切边界；
   3) 拖拽/滑出时闪卡层级不够，可能被底部按钮或上方区域遮住。
*/
.flashcard-backdrop .flashcard-modal{
  overflow:visible!important;
}
.flashcard-backdrop .flashcard-grid,
.flashcard-backdrop .flashcard-session,
.flashcard-backdrop .flashcard-deck{
  overflow:visible!important;
}
.flashcard-deck{
  contain:layout!important;
  isolation:isolate;
  z-index:8;
}
.flashcard-deck .memory-card{
  contain:layout!important;
}
.flashcard-deck.drag-active{
  z-index:80!important;
}
.flashcard-deck .memory-card.dragging,
.flashcard-deck .memory-card.flying,
.flashcard-deck .memory-card.rebounding{
  z-index:90!important;
}
.flashcard-review-actions,
.memory-swipe-hints,
.flashcard-progress,
.flashcard-tools,
.flash-speed-control{
  position:relative;
  z-index:2;
}
.flashcard-deck.drag-active + .flashcard-review-actions{
  z-index:1;
}
@media(max-width:850px),(pointer:coarse){
  .flashcard-backdrop.show{
    overflow:hidden;
  }
  .flashcard-backdrop .flashcard-modal{
    overflow:visible!important;
  }
  .flashcard-backdrop .flashcard-grid{
    overflow:visible!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .flashcard-backdrop .flashcard-session{
    overflow:visible!important;
  }
  .flashcard-backdrop .flashcard-deck{
    overflow:visible!important;
    contain:layout!important;
    z-index:80!important;
  }
  .flashcard-backdrop .memory-card.dragging,
  .flashcard-backdrop .memory-card.flying,
  .flashcard-backdrop .memory-card.rebounding{
    z-index:90!important;
  }
}


/* 画布鼠标框选与多选高亮 */
.selection-box{
  position:absolute;
  left:0;
  top:0;
  width:0;
  height:0;
  z-index:35;
  display:none;
  pointer-events:none;
  border:1.5px dashed #2563eb;
  background:rgba(37,99,235,.10);
  box-shadow:0 0 0 1px rgba(255,255,255,.85),0 10px 24px rgba(37,99,235,.12);
  border-radius:0;
}
.selection-box.show{
  display:block;
}
.knowledge-card.multi-selected{
  box-shadow:0 20px 48px rgba(37,99,235,.18),0 0 0 3px rgba(14,165,233,.72),0 0 0 7px rgba(14,165,233,.13);
}
.knowledge-card.group-dragging{
  transition:none!important;
  box-shadow:0 22px 56px rgba(37,99,235,.24),0 0 0 3px rgba(37,99,235,.82);
}
.flashcard-tools #flashAddMissingBtn{
  background:#ecfeff;
  color:#0e7490;
  box-shadow:0 0 0 1px rgba(6,182,212,.22);
}
.flashcard-tools #flashAddMissingBtn:disabled{
  opacity:.48;
  cursor:not-allowed;
}


/* 新手教程弹窗 */
.tutorial-menu-btn{
  background:#f0f9ff;
  color:#0369a1;
  font-weight:850;
  box-shadow:0 8px 22px rgba(14,165,233,.16),0 0 0 1px rgba(14,165,233,.18);
}
.tutorial-menu-btn:hover{
  box-shadow:0 10px 26px rgba(14,165,233,.22),0 0 0 1px rgba(14,165,233,.28);
}
.upgrade-member-btn{
  background:linear-gradient(135deg,var(--role-primary,#7c3aed),var(--role-accent,#f59e0b));
  color:#fff;
  font-weight:950;
  box-shadow:0 10px 24px color-mix(in srgb,var(--role-primary,#7c3aed) 22%,transparent),0 0 0 1px rgba(255,255,255,.28) inset;
}
.upgrade-member-btn:hover{
  box-shadow:0 13px 30px color-mix(in srgb,var(--role-primary,#7c3aed) 28%,transparent),0 0 0 1px rgba(255,255,255,.34) inset;
}
.tutorial-modal{
  width:min(920px,100%);
  max-height:calc(100vh - 42px);
  padding:0;
  overflow:hidden;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 45%,#f0fdf4 100%);
}
.tutorial-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:22px 24px 14px;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(15,23,42,.08);
}
.tutorial-header h2{margin:0;font-size:23px;line-height:1.2}
.tutorial-header p{margin:6px 0 0;color:#64748b;font-size:14px;line-height:1.55}
.tutorial-close{width:34px;height:34px;flex:0 0 auto;padding:0;border-radius:12px;box-shadow:none;background:#f1f5f9;color:#64748b}
.tutorial-body{max-height:calc(100vh - 154px);overflow:auto;padding:18px 24px 24px}
.tutorial-section{margin-bottom:18px}
.tutorial-section h3{margin:0 0 10px;font-size:17px;color:#0f172a}
.tutorial-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.tutorial-card{border:1px solid rgba(148,163,184,.24);background:rgba(255,255,255,.78);border-radius:18px;padding:14px 15px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.tutorial-card strong{display:flex;align-items:center;gap:8px;margin-bottom:7px;color:#0f172a;font-size:15px}
.tutorial-card p{margin:0;color:#475569;font-size:13px;line-height:1.6}
.tutorial-badge{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:999px;background:#2563eb;color:#fff;font-size:12px;font-weight:950}
.tutorial-note{margin-top:12px;padding:12px 14px;border-radius:16px;background:#fffbeb;color:#92400e;font-size:13px;line-height:1.65;box-shadow:0 0 0 1px rgba(245,158,11,.18)}
.tutorial-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:2px 7px;margin:0 2px;border-radius:7px;background:#0f172a;color:#fff;font-size:12px;font-weight:900;box-shadow:inset 0 -1px 0 rgba(255,255,255,.16)}
.tutorial-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px 22px;border-top:1px solid rgba(15,23,42,.08);background:rgba(255,255,255,.80)}
@media(max-width:850px),(pointer:coarse){
  .tutorial-modal{width:100%;max-height:90vh;border-radius:24px 24px 18px 18px}
  .tutorial-header{padding:18px 18px 12px}
  .tutorial-header h2{font-size:20px}
  .tutorial-body{max-height:calc(90vh - 132px);padding:14px 18px 18px}
  .tutorial-grid{grid-template-columns:1fr}
  .tutorial-actions{padding:12px 18px 16px}
}


/* 首次进入页面的新手引导遮罩 */
.guided-tour-layer{position:fixed;inset:0;z-index:9999;display:none;pointer-events:none;font-family:"Microsoft YaHei","PingFang SC",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.guided-tour-layer.show{display:block;pointer-events:auto}
.guided-tour-dim{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(2px)}
.guided-tour-spotlight{position:absolute;left:50%;top:50%;width:160px;height:90px;border-radius:20px;box-shadow:0 0 0 9999px rgba(15,23,42,.58),0 0 0 4px rgba(255,255,255,.96),0 0 0 8px rgba(37,99,235,.55),0 20px 56px rgba(37,99,235,.34);background:rgba(255,255,255,.04);transition:left .22s ease,top .22s ease,width .22s ease,height .22s ease,border-radius .22s ease;pointer-events:none}
.guided-tour-pulse{position:absolute;inset:-8px;border-radius:inherit;border:2px solid rgba(255,255,255,.72);animation:tourPulse 1.4s ease-in-out infinite}
@keyframes tourPulse{0%,100%{opacity:.34;transform:scale(.98)}50%{opacity:.86;transform:scale(1.02)}}
.guided-tour-card{position:absolute;width:min(390px,calc(100vw - 28px));border-radius:22px;background:#fff;color:#0f172a;box-shadow:0 28px 82px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.8);padding:18px;transition:left .22s ease,top .22s ease}
.guided-tour-step{display:inline-flex;align-items:center;gap:7px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:12px;font-weight:950;padding:4px 9px;margin-bottom:9px}
.guided-tour-title{font-size:20px;font-weight:950;margin:0 0 8px;line-height:1.25}
.guided-tour-text{margin:0;color:#475569;font-size:14px;line-height:1.65}
.guided-tour-tip{margin-top:10px;padding:9px 10px;border-radius:14px;background:#f8fafc;color:#64748b;font-size:12px;line-height:1.55}
.guided-tour-actions{display:flex;align-items:center;gap:8px;margin-top:14px}
.guided-tour-actions button{border:0;border-radius:12px;padding:9px 12px;cursor:pointer;font-weight:850;box-shadow:0 0 0 1px rgba(15,23,42,.08)}
.guided-tour-actions .tour-skip{background:#f8fafc;color:#64748b;margin-right:auto}
.guided-tour-actions .tour-prev{background:#f1f5f9;color:#334155}
.guided-tour-actions .tour-next{background:#2563eb;color:#fff;box-shadow:0 10px 24px rgba(37,99,235,.25)}
.guided-tour-actions button:disabled{opacity:.45;cursor:not-allowed}
.guided-tour-progress{display:flex;gap:5px;margin-top:13px}
.guided-tour-dot{height:5px;flex:1;border-radius:999px;background:#e2e8f0}
.guided-tour-dot.active{background:#2563eb}
.guided-tour-target-raised{position:relative!important;z-index:10000!important;isolation:isolate}
@media(max-width:850px),(pointer:coarse){
  .guided-tour-card{left:12px!important;right:12px;bottom:calc(14px + env(safe-area-inset-bottom));top:auto!important;width:auto;padding:16px}
  .guided-tour-title{font-size:18px}
  .guided-tour-text{font-size:13px}
  .guided-tour-actions button{padding:8px 10px}
}


/* 分步引导显示修复：只高亮原页面目标，不复制目标 DOM */
.guided-tour-dim{
  background:transparent!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  z-index:0;
}
.guided-tour-spotlight{
  z-index:2;
  background:transparent!important;
  pointer-events:none;
  box-shadow:
    0 0 0 9999px rgba(15,23,42,.58),
    0 0 0 4px rgba(255,255,255,.98),
    0 0 0 9px rgba(37,99,235,.62),
    0 20px 56px rgba(37,99,235,.36)!important;
}
.guided-tour-card{
  z-index:3;
  pointer-events:auto;
}
.help-card.guided-tour-temporary-hidden{
  display:none!important;
}
.guided-tour-no-clone .guided-tour-focus-clone{
  display:none!important;
}
.guided-tour-target-raised{
  z-index:auto!important;
  isolation:auto!important;
  filter:none!important;
}


/* PMP 考题破案训练 MVP */
.question-menu-btn{background:#7c3aed;color:#fff;font-weight:850;box-shadow:0 8px 22px rgba(124,58,237,.25)}
.question-modal{width:min(1180px,100%);max-height:calc(100vh - 36px);padding:0;overflow:hidden;background:linear-gradient(135deg,#fff 0%,#f8fbff 48%,#f5f3ff 100%)}
.question-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:18px 20px 12px;border-bottom:1px solid rgba(15,23,42,.08);background:rgba(255,255,255,.92);backdrop-filter:blur(12px)}
.question-head h2{margin:0;font-size:22px;line-height:1.2}.question-head .sub{margin-top:5px;color:#64748b;font-size:13px;line-height:1.5}
.question-close{width:34px;height:34px;padding:0;border-radius:12px;box-shadow:none;background:#f1f5f9;color:#64748b}
.question-body{display:grid;grid-template-columns:minmax(310px,1.08fr) minmax(260px,.88fr) minmax(310px,1fr);gap:12px;padding:14px;max-height:calc(100vh - 118px);overflow:auto}
.q-panel{border:1px solid rgba(148,163,184,.25);border-radius:20px;background:rgba(255,255,255,.82);box-shadow:0 10px 28px rgba(15,23,42,.06);padding:14px;min-width:0}
.q-panel h3{margin:0 0 10px;font-size:16px;color:#0f172a}
.q-stem{color:#172033;font-size:15px;line-height:1.8;user-select:text}.q-clue{color:inherit;border-radius:7px;padding:1px 2px;cursor:help;transition:.12s ease}.q-clue:hover{background:rgba(124,58,237,.08)}.q-clue.found{background:linear-gradient(transparent 54%,rgba(196,181,253,.85) 0);color:#4c1d95;font-weight:900}
.q-options{display:flex;flex-direction:column;gap:9px;margin-top:12px}.q-option{text-align:left;white-space:normal;border-radius:15px;padding:11px 12px;background:#fff;color:#172033;box-shadow:0 0 0 1px rgba(148,163,184,.24)}.q-option.selected{background:#eef2ff;box-shadow:0 0 0 2px rgba(99,102,241,.45)}.q-option.correct{background:#dcfce7;color:#166534;box-shadow:0 0 0 2px rgba(34,197,94,.35)}.q-option.wrong{background:#fff1f2;color:#be123c;box-shadow:0 0 0 2px rgba(244,63,94,.28)}
.q-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.q-actions button{border-radius:13px}.q-actions button.primary{background:#7c3aed;color:#fff;box-shadow:0 8px 22px rgba(124,58,237,.24)}
.q-chip-list{display:flex;flex-wrap:wrap;gap:7px;min-height:42px;padding:10px;border-radius:16px;background:#f8fafc;box-shadow:inset 0 0 0 1px rgba(148,163,184,.18)}
.q-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;background:#ede9fe;color:#5b21b6}.q-chip.method{background:#dcfce7;color:#166534}.q-chip.time{background:#ffedd5;color:#9a3412}.q-chip.change{background:#fee2e2;color:#991b1b}.q-chip.constraint{background:#e0f2fe;color:#075985}.q-chip.action{background:#fef9c3;color:#854d0e}.q-empty{color:#94a3b8;font-size:13px;line-height:1.6}
.q-concepts{display:flex;flex-direction:column;gap:9px;margin-top:10px}.q-concept{border-radius:16px;background:#fff;padding:10px 11px;box-shadow:0 0 0 1px rgba(148,163,184,.22)}.q-concept strong{display:block;color:#0f172a;margin-bottom:4px}.q-concept p{margin:0;color:#475569;font-size:12px;line-height:1.55}
.q-score{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.q-score div{border-radius:14px;background:#f8fafc;padding:9px;color:#475569;font-size:12px}.q-score strong{display:block;font-size:18px;color:#0f172a;margin-top:2px}
.q-graph{min-height:360px;border-radius:18px;background:radial-gradient(circle at 1px 1px,rgba(124,58,237,.16) 1px,transparent 0);background-size:24px 24px;background-color:#fbfbff;padding:12px;position:relative;overflow:auto;box-shadow:inset 0 0 0 1px rgba(148,163,184,.18)}.q-graph-placeholder{display:grid;place-items:center;min-height:320px;text-align:center;color:#94a3b8;font-size:13px;line-height:1.7}
.q-graph-flow{display:flex;flex-direction:column;gap:10px;min-width:260px}.q-graph-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.q-node{border-radius:16px;padding:10px 12px;background:#fff;color:#0f172a;font-size:13px;font-weight:900;text-align:center;min-width:112px;max-width:220px;box-shadow:0 10px 24px rgba(15,23,42,.08),0 0 0 1px rgba(148,163,184,.22)}.q-node.clue{background:#ede9fe;color:#5b21b6}.q-node.concept{background:#ecfeff;color:#0e7490}.q-node.rule{background:#fef9c3;color:#854d0e}.q-node.answer{background:#dcfce7;color:#166534}.q-node.trap{background:#fff1f2;color:#be123c}.q-arrow{color:#64748b;font-weight:950;text-align:center}
.q-review{margin-top:10px;border-radius:16px;background:#fff;box-shadow:0 0 0 1px rgba(148,163,184,.22);padding:11px;display:none}.q-review.show{display:block}.q-review h4{margin:0 0 7px;font-size:15px}.q-review p,.q-review li{color:#475569;font-size:13px;line-height:1.6}.q-review ul{padding-left:18px;margin:8px 0 0}.q-mini-note{margin-top:9px;padding:9px 10px;border-radius:14px;background:#fffbeb;color:#92400e;font-size:12px;line-height:1.55}
@media(max-width:980px){.question-body{grid-template-columns:1fr;max-height:calc(100vh - 112px)}.q-graph{min-height:260px}}
@media(max-width:850px),(pointer:coarse){.question-modal{width:100%;max-height:94vh;border-radius:24px 24px 18px 18px}.question-head{padding:16px 16px 10px}.question-head h2{font-size:19px}.question-body{padding:10px}}


/* 考题训练按钮点击修复兜底 */
#questionTrainBtn.question-menu-btn{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  pointer-events:auto!important;
  position:relative;
  z-index:31;
}
#questionModal.show{
  display:flex!important;
}


/* 考题训练窗口扩大 + 关键词可取消选择优化 */
.question-modal{
  width:min(1480px,calc(100vw - 20px))!important;
  height:calc(100vh - 20px)!important;
  max-height:calc(100vh - 20px)!important;
  border-radius:26px!important;
}
.question-body{
  height:calc(100vh - 112px)!important;
  max-height:none!important;
  grid-template-columns:minmax(380px,1.15fr) minmax(320px,.92fr) minmax(420px,1.18fr)!important;
  align-items:stretch;
}
.question-body .q-panel{
  min-height:0;
  overflow:auto;
}
.question-body .q-panel:nth-child(3){
  display:flex;
  flex-direction:column;
}
.question-body .q-panel:nth-child(3) .q-graph{
  flex:1 1 auto;
  min-height:520px;
}
.q-clue.found{
  cursor:pointer;
  box-shadow:0 0 0 1px rgba(124,58,237,.18);
}
.q-clue.found:hover{
  background:linear-gradient(transparent 54%,rgba(253,186,116,.95) 0);
  color:#9a3412;
}
.q-clue.found:hover:after{
  content:" ×";
  font-weight:950;
  color:#ea580c;
}
@media(max-width:1180px){
  .question-body{
    grid-template-columns:1fr 1fr!important;
  }
  .question-body .q-panel:nth-child(3){
    grid-column:1 / -1;
  }
}
@media(max-width:850px),(pointer:coarse){
  .question-modal{
    width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
  }
  .question-body{
    height:calc(100dvh - 96px)!important;
    grid-template-columns:1fr!important;
  }
  .question-body .q-panel:nth-child(3){
    grid-column:auto;
  }
  .question-body .q-panel:nth-child(3) .q-graph{
    min-height:320px;
  }
}


/* 考题训练关键词取消与字体缩放优化 */
.q-clue.found:hover:after{
  content:""!important;
  display:none!important;
}
.q-clue.found:hover{
  background:linear-gradient(transparent 54%,rgba(196,181,253,.85) 0)!important;
  color:#4c1d95!important;
}
.question-font-tools{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:10px;
  flex-wrap:wrap;
}
.question-font-tools .font-tool-label{
  font-size:12px;
  color:#64748b;
  font-weight:850;
}
.question-font-tools button{
  min-width:34px;
  height:32px;
  padding:0 10px;
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  box-shadow:0 0 0 1px rgba(148,163,184,.25);
}
.question-font-tools button.active{
  background:#ede9fe;
  color:#5b21b6;
  box-shadow:0 0 0 2px rgba(124,58,237,.24);
}
.question-modal.q-font-small{
  --q-font-scale:.92;
}
.question-modal.q-font-normal{
  --q-font-scale:1;
}
.question-modal.q-font-large{
  --q-font-scale:1.12;
}
.question-modal.q-font-xlarge{
  --q-font-scale:1.24;
}
.question-modal .q-stem{
  font-size:calc(15px * var(--q-font-scale,1))!important;
}
.question-modal .q-option{
  font-size:calc(14px * var(--q-font-scale,1))!important;
}
.question-modal .q-concept p,
.question-modal .q-review p,
.question-modal .q-review li,
.question-modal .q-mini-note{
  font-size:calc(13px * var(--q-font-scale,1))!important;
}
.question-modal .q-chip,
.question-modal .q-node{
  font-size:calc(12px * var(--q-font-scale,1))!important;
}
.question-modal .q-panel h3{
  font-size:calc(16px * var(--q-font-scale,1))!important;
}


/* 考题训练字体缩放强制修复版 */
#questionModal.question-modal{
  --q-font-scale:1;
}
#questionModal[data-q-font-size="small"]{--q-font-scale:.9}
#questionModal[data-q-font-size="normal"]{--q-font-scale:1}
#questionModal[data-q-font-size="large"]{--q-font-scale:1.18}
#questionModal[data-q-font-size="xlarge"]{--q-font-scale:1.34}

#questionModal .q-stem,
#questionModal .q-stem .q-clue{
  font-size:calc(16px * var(--q-font-scale,1))!important;
  line-height:calc(1.82 + (var(--q-font-scale,1) - 1) * .18)!important;
}
#questionModal .q-option{
  font-size:calc(15px * var(--q-font-scale,1))!important;
  line-height:1.62!important;
}
#questionModal .q-panel h3{
  font-size:calc(16px * var(--q-font-scale,1))!important;
}
#questionModal .q-concept strong{
  font-size:calc(14px * var(--q-font-scale,1))!important;
}
#questionModal .q-concept p,
#questionModal .q-review p,
#questionModal .q-review li,
#questionModal .q-mini-note,
#questionModal .q-empty{
  font-size:calc(13px * var(--q-font-scale,1))!important;
}
#questionModal .q-score div{
  font-size:calc(12px * var(--q-font-scale,1))!important;
}
#questionModal .q-score strong{
  font-size:calc(18px * var(--q-font-scale,1))!important;
}
#questionModal .q-chip{
  font-size:calc(12px * var(--q-font-scale,1))!important;
}
#questionModal .q-node{
  font-size:calc(13px * var(--q-font-scale,1))!important;
  line-height:1.38!important;
}
#questionModal .question-font-tools button{
  pointer-events:auto!important;
  user-select:none;
}
#questionModal .question-font-tools button.active{
  background:#7c3aed!important;
  color:#fff!important;
  box-shadow:0 0 0 2px rgba(124,58,237,.28),0 8px 20px rgba(124,58,237,.18)!important;
}


/* 本地登录与多用户管理 */
.auth-status{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
  color:#64748b;
  background:#f8fafc;
  box-shadow:0 0 0 1px rgba(148,163,184,.22);
  white-space:nowrap;
}
.auth-status.logged-in{
  color:#166534;
  background:#dcfce7;
  box-shadow:0 0 0 1px rgba(34,197,94,.22);
}
.auth-login-btn{
  background:#0f172a;
  color:#fff;
  font-weight:850;
}
.auth-logout-btn{
  background:#f1f5f9;
  color:#475569;
}
.auth-modal{
  width:min(430px,calc(100vw - 28px));
  padding:0;
  overflow:hidden;
  border-radius:24px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
}
.auth-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:20px 20px 12px;
  border-bottom:1px solid rgba(148,163,184,.18);
  background:rgba(255,255,255,.92);
}
.auth-head h2{
  margin:0;
  font-size:21px;
}
.auth-head p{
  margin:6px 0 0;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
}
.auth-close{
  width:34px;
  height:34px;
  padding:0;
  border-radius:12px;
  box-shadow:none;
  background:#f1f5f9;
  color:#64748b;
}
.auth-body{
  padding:18px 20px 20px;
}
.auth-body label{
  display:block;
  margin-bottom:12px;
  color:#334155;
  font-size:13px;
  font-weight:850;
}
.auth-body input{
  width:100%;
  margin-top:6px;
  padding:11px 12px;
  border:1px solid rgba(148,163,184,.35);
  border-radius:14px;
  font-size:15px;
  outline:none;
  box-sizing:border-box;
}
.auth-body input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.auth-msg{
  min-height:20px;
  color:#dc2626;
  font-size:13px;
  line-height:1.45;
  margin:2px 0 10px;
}
.auth-msg.ok{
  color:#16a34a;
}
.auth-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.auth-actions button{
  flex:1 1 140px;
  border-radius:14px;
}
.auth-note{
  margin-top:13px;
  padding:10px 11px;
  border-radius:14px;
  background:#fffbeb;
  color:#92400e;
  font-size:12px;
  line-height:1.55;
}
.auth-body .auth-agreement{display:flex;align-items:flex-start;gap:8px;margin:14px 0 0;color:#64748b;font-size:12px;font-weight:600;line-height:1.6;cursor:pointer}
.auth-body .auth-agreement input[type="checkbox"]{width:16px;height:16px;min-width:16px;margin:2px 0 0;padding:0;accent-color:#7c5cff;box-shadow:none;cursor:pointer}
.auth-body .auth-agreement input[type="checkbox"]:focus{box-shadow:0 0 0 3px rgba(124,92,255,.18);border-color:#7c5cff}
.auth-agreement a{color:#7058e8;font-weight:800;text-decoration:none}.auth-agreement a:hover{text-decoration:underline}
body.auth-readonly .knowledge-card{
  cursor:default;
}
body.auth-readonly .auth-edit-locked{
  opacity:.62;
}
@media(max-width:850px),(pointer:coarse){
  .auth-status{
    display:none;
  }
}


/* 题库管理 MVP */
.question-bank-menu-btn{background:#0891b2;color:#fff;font-weight:850;box-shadow:0 8px 22px rgba(8,145,178,.24)}
.question-bank-modal{width:min(1420px,calc(100vw - 22px));height:calc(100vh - 24px);max-height:calc(100vh - 24px);padding:0;overflow:hidden;background:linear-gradient(135deg,#fff 0%,#f8fbff 45%,#ecfeff 100%)}
.qb-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:18px 20px 12px;border-bottom:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.92);backdrop-filter:blur(12px)}
.qb-head h2{margin:0;font-size:22px}.qb-head p{margin:6px 0 0;color:#64748b;font-size:13px;line-height:1.55}.qb-close{width:34px;height:34px;padding:0;border-radius:12px;box-shadow:none;background:#f1f5f9;color:#64748b}
.qb-toolbar{display:flex;gap:8px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.76)}
.qb-toolbar button{border-radius:13px}.qb-toolbar .primary{background:#0891b2;color:#fff;box-shadow:0 8px 20px rgba(8,145,178,.22)}
.qb-body{display:grid;grid-template-columns:260px 360px 1fr;gap:12px;padding:12px;height:calc(100vh - 137px);box-sizing:border-box;overflow:hidden}
.qb-panel{min-height:0;overflow:auto;border:1px solid rgba(148,163,184,.25);border-radius:20px;background:rgba(255,255,255,.84);box-shadow:0 10px 28px rgba(15,23,42,.06);padding:12px}
.qb-panel h3{margin:0 0 10px;font-size:16px;color:#0f172a}.qb-list{display:flex;flex-direction:column;gap:8px}
.qb-item{border-radius:15px;background:#fff;padding:10px 11px;box-shadow:0 0 0 1px rgba(148,163,184,.22);cursor:pointer;text-align:left}
.qb-item:hover{box-shadow:0 0 0 2px rgba(8,145,178,.18)}.qb-item.active{background:#ecfeff;box-shadow:0 0 0 2px rgba(8,145,178,.35)}
.qb-item strong{display:block;color:#0f172a;font-size:14px;margin-bottom:4px}.qb-item span{display:block;color:#64748b;font-size:12px;line-height:1.45}
.qb-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 7px;font-size:11px;font-weight:900;background:#f1f5f9;color:#475569;margin:4px 4px 0 0}
.qb-badge.current{background:#dcfce7;color:#166534}.qb-badge.warn{background:#fef3c7;color:#92400e}
.qb-detail h4{margin:0 0 8px;font-size:18px}.qb-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.qb-detail-section{border-radius:16px;background:#fff;padding:11px 12px;box-shadow:0 0 0 1px rgba(148,163,184,.18);margin-bottom:10px}
.qb-detail-section h5{margin:0 0 7px;font-size:14px;color:#0f172a}.qb-detail-section p,.qb-detail-section li{font-size:13px;line-height:1.6;color:#475569}
.qb-detail-section ul{margin:6px 0 0;padding-left:18px}.qb-option-line{display:block;margin:5px 0}.qb-option-line.correct{color:#166534;font-weight:900}
.qb-empty{display:grid;place-items:center;text-align:center;color:#94a3b8;font-size:13px;line-height:1.7;min-height:180px}
.qb-error{color:#dc2626;background:#fff1f2;border-radius:14px;padding:10px 11px;font-size:13px;line-height:1.55}.qb-ok{color:#166534;background:#dcfce7;border-radius:14px;padding:10px 11px;font-size:13px;line-height:1.55}
@media(max-width:1100px){.qb-body{grid-template-columns:260px 1fr}.qb-detail-panel{grid-column:1/-1}}
@media(max-width:760px),(pointer:coarse){.question-bank-modal{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.qb-body{height:calc(100dvh - 150px);grid-template-columns:1fr}.qb-detail-panel{grid-column:auto}.qb-head{padding:16px}.qb-toolbar{padding:9px 10px}}


/* 左侧可拖拽图标工具菜单 + 精简顶部信息栏 */
.app-header{
  height:64px;
  min-height:64px;
  overflow:visible;
  gap:10px;
  padding:9px 14px;
}
.app-header .brand{
  min-width:190px;
  max-width:min(420px,38vw);
  margin-right:0;
  padding:6px 10px;
  border-radius:13px;
  cursor:pointer;
  user-select:none;
  transition:background .16s ease,box-shadow .16s ease;
}
.app-header .brand:hover,
.app-header .brand:focus-visible{
  background:rgba(255,255,255,.88);
  box-shadow:0 0 0 1px rgba(37,99,235,.18);
  outline:none;
}
.app-header .brand h1{font-size:17px}
.app-header .brand span{max-width:100%}
.app-header .hint{max-width:min(520px,34vw)}
.floating-toolbox{
  position:absolute;
  left:16px;
  top:18px;
  z-index:34;
  width:104px;
  padding:7px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:21px;
  background:rgba(255,255,255,.91);
  box-shadow:0 18px 52px rgba(15,23,42,.18);
  backdrop-filter:blur(16px);
  touch-action:none;
  user-select:none;
}
.floating-toolbox.dragging{
  opacity:.94;
  box-shadow:0 24px 66px rgba(15,23,42,.25);
}
.floating-toolbox-handle{
  width:100%;
  height:24px;
  display:grid;
  place-items:center;
  padding:0;
  margin:0 0 6px;
  border-radius:13px;
  color:#64748b;
  background:#f8fafc;
  box-shadow:none;
  cursor:grab;
  touch-action:none;
}
.floating-toolbox-handle:active{cursor:grabbing}
.floating-toolbox-handle:hover{transform:none;background:#eef2ff;color:#2563eb;box-shadow:none}
.floating-toolbox-handle svg{width:20px;height:20px}
.floating-toolbox-grid{
  display:grid;
  grid-template-columns:repeat(2,40px);
  justify-content:center;
  gap:6px;
}
.floating-tool-btn{
  position:relative;
  width:40px;
  height:40px;
  min-width:40px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:13px;
  color:#334155;
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08);
  overflow:visible;
}
.floating-tool-btn svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.floating-tool-btn:hover{transform:translateY(-1px)}
.floating-tool-btn:focus-visible{outline:3px solid rgba(37,99,235,.24);outline-offset:2px}
.floating-tool-btn[data-tooltip]::after{
  content:attr(data-tooltip);
  position:absolute;
  left:48px;
  top:50%;
  transform:translateY(-50%) translateX(-4px);
  z-index:5;
  padding:6px 8px;
  border-radius:9px;
  background:#0f172a;
  color:#fff;
  font-size:12px;
  font-weight:750;
  line-height:1;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:.14s ease;
}
.floating-tool-btn[data-tooltip]:hover::after,
.floating-tool-btn[data-tooltip]:focus-visible::after{
  opacity:1;
  transform:translateY(-50%) translateX(0);
}
.floating-toolbox-divider{
  grid-column:1/-1;
  height:1px;
  margin:2px 3px;
  background:rgba(148,163,184,.28);
}
.floating-tool-span{grid-column:1/-1;width:86px}
.floating-color-tool{cursor:pointer}
.floating-color-tool input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.floating-color-swatch{
  position:absolute;
  right:7px;
  bottom:6px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--floating-line-color,#2563eb);
  box-shadow:0 0 0 2px #fff,0 0 0 3px rgba(15,23,42,.15);
  pointer-events:none;
}
#focusBtn.floating-tool-btn,#flashcardBtn.floating-tool-btn,#questionTrainBtn.floating-tool-btn{color:#fff}
.help-card{left:134px}
.detail-panel{top:18px}
body.toolbox-dragging{cursor:grabbing!important}

/* 修复左侧工具栏双列按钮中，左侧按钮 tooltip 被右侧按钮遮挡的问题。 */
.floating-toolbox,
.floating-toolbox-grid{overflow:visible}
.floating-tool-btn:hover,
.floating-tool-btn:focus-visible,
.floating-color-tool:hover,
.floating-color-tool:focus-within{
  z-index:80;
}
.floating-tool-btn[data-tooltip]::after{
  z-index:999;
}
.floating-color-tool[data-tooltip]:focus-within::after{
  opacity:1;
  transform:translateY(-50%) translateX(0);
}



@media(max-width:850px),(pointer:coarse){
  .app-header{height:56px;min-height:56px;padding:7px 9px;gap:7px}
  .app-header .brand{min-width:0;max-width:none;flex:1;padding:5px 7px}
  .app-header .brand h1{font-size:14px}
  .app-header .brand span{display:none}
  .app-header .hint{display:none}
  .app-header .tutorial-menu-btn,
  .app-header .upgrade-member-btn{padding:8px 9px;font-size:12px}
  .app-header .auth-login-btn,.app-header .auth-logout-btn{padding:8px 9px;font-size:12px}
  .floating-toolbox{display:none}
  .help-card{left:10px}
  .detail-panel{top:auto}
}
#questionTrainBtn.floating-tool-btn{background:#7c3aed;color:#fff;box-shadow:0 8px 22px rgba(124,58,237,.25)}

/* 破案模式标签栏与简化证据栏优化 */
.question-modal .q-tabs{
  display:flex;
  gap:8px;
  align-items:center;
  padding:10px 14px 0;
  background:rgba(255,255,255,.78);
  border-bottom:1px solid rgba(148,163,184,.18);
}
.question-modal .q-tab{
  appearance:none;
  border:0;
  border-radius:16px 16px 0 0;
  padding:10px 18px;
  background:#eef2ff;
  color:#475569;
  font-weight:950;
  box-shadow:inset 0 -1px 0 rgba(148,163,184,.16);
}
.question-modal .q-tab:hover{
  background:#e0e7ff;
  color:#3730a3;
}
.question-modal .q-tab.active{
  background:#fff;
  color:#5b21b6;
  box-shadow:0 -6px 18px rgba(79,70,229,.08),0 0 0 1px rgba(124,58,237,.16);
}
.question-body.q-case-body{
  display:block!important;
  height:calc(100vh - 166px)!important;
  max-height:none!important;
  overflow:auto!important;
  padding:14px!important;
}
.question-body.q-case-body .q-panel{
  min-height:100%;
  overflow:visible!important;
}
.question-body.q-case-body .q-tab-panel{
  display:none!important;
}
.question-body.q-case-body .q-tab-panel.active{
  display:block!important;
}
.question-body.q-case-body .q-tab-panel[hidden]{
  display:none!important;
}
.q-question-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(230px,300px);
  gap:14px;
  align-items:start;
}
.q-question-main{
  min-width:0;
}
.q-evidence-dock{
  position:sticky;
  top:0;
  border-radius:20px;
  padding:12px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 12px 32px rgba(15,23,42,.08),0 0 0 1px rgba(148,163,184,.22);
}
.q-evidence-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
  color:#0f172a;
  font-weight:950;
}
.q-evidence-head small{
  border-radius:999px;
  padding:3px 8px;
  background:#ede9fe;
  color:#6d28d9;
  font-size:11px;
}
.q-evidence-dock .q-chip-list{
  display:block;
  min-height:70px;
  padding:10px;
}
.q-evidence-keywords{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}
.q-evidence-empty{
  display:flex;
  flex-direction:column;
  gap:5px;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
}
.q-evidence-empty strong{
  color:#334155;
  font-size:13px;
}
.q-evidence-progress{
  display:grid;
  grid-template-columns:1fr auto;
  gap:7px;
  align-items:center;
  color:#475569;
  font-size:12px;
}
.q-evidence-progress strong{
  color:#4c1d95;
  font-size:16px;
}
.q-evidence-progress em{
  grid-column:1 / -1;
  height:7px;
  border-radius:999px;
  background:linear-gradient(90deg,#8b5cf6 var(--q-progress,0%),#e2e8f0 0);
}
.q-evidence-dock .q-score{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}
.q-evidence-dock .q-score div{
  padding:8px;
  font-size:11px!important;
}
.q-evidence-dock .q-score strong{
  font-size:16px!important;
}
.q-tab-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.q-tab-section-head h3{
  margin:0 0 4px!important;
}
.q-tab-section-head p{
  margin:0;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
}
.q-tab-panel[data-q-tab-panel="graph"]{
  min-height:100%;
}
.q-tab-panel[data-q-tab-panel="graph"].active{
  display:flex!important;
  flex-direction:column;
}
.q-tab-panel[data-q-tab-panel="graph"] .q-graph{
  flex:1 1 auto;
  min-height:520px!important;
}
.q-detective-notes{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.q-notes-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.q-note-card{
  border-radius:18px;
  background:#fff;
  padding:13px 14px;
  box-shadow:0 0 0 1px rgba(148,163,184,.2),0 10px 26px rgba(15,23,42,.05);
}
.q-note-card.wide{
  width:100%;
}
.q-note-card h4,
.q-notes-title{
  margin:0 0 8px;
  color:#0f172a;
  font-size:15px;
}
.q-note-card p,
.q-note-card li{
  color:#475569;
  font-size:13px;
  line-height:1.65;
}
.q-note-card ol,
.q-note-card ul{
  margin:0;
  padding-left:18px;
}
.q-clue-chain{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-left:0!important;
  list-style:none;
}
.q-clue-chain li{
  display:grid;
  grid-template-columns:minmax(110px,180px) minmax(0,1fr);
  gap:8px 12px;
  align-items:start;
  padding:9px 10px;
  border-radius:14px;
  background:#f8fafc;
}
.q-clue-chain li strong{
  color:#5b21b6;
}
.q-clue-chain li em{
  grid-column:2;
  color:#0e7490;
  font-style:normal;
  font-weight:850;
}
.q-trap-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding-left:0!important;
  list-style:none;
}
.q-trap-list li{
  border-radius:14px;
  padding:9px 10px;
  background:#f8fafc;
}
.q-trap-list li.correct{
  background:#dcfce7;
  color:#166534;
}
.q-trap-list li.wrong,
.q-trap-list li.selected.wrong{
  background:#fff1f2;
  color:#be123c;
}
.q-trap-list li strong{
  margin-right:5px;
}
.q-answer-hint,
.q-missed,
.q-concept-note{
  margin-top:9px!important;
  border-radius:13px;
  padding:9px 10px;
  background:#fffbeb;
  color:#92400e!important;
}
.q-concepts{
  margin-top:12px;
}
.q-concepts .q-notes-title{
  margin-top:4px;
}
.q-concept-note{
  background:#f5f3ff;
  color:#5b21b6!important;
}
#questionModal .q-stem .q-clue{
  cursor:pointer!important;
}
#questionModal .q-stem .q-clue.found{
  background:linear-gradient(transparent 54%,rgba(196,181,253,.9) 0)!important;
  color:#4c1d95!important;
  font-weight:950!important;
}
@media(max-width:960px){
  .question-body.q-case-body{
    height:calc(100dvh - 150px)!important;
    padding:10px!important;
  }
  .question-modal .q-tabs{
    overflow-x:auto;
    padding:8px 10px 0;
  }
  .question-modal .q-tab{
    white-space:nowrap;
    padding:9px 14px;
  }
  .q-question-layout,
  .q-notes-grid,
  .q-trap-list{
    grid-template-columns:1fr;
  }
  .q-evidence-dock{
    position:static;
  }
  .q-tab-section-head{
    flex-direction:column;
  }
  .q-tab-panel[data-q-tab-panel="graph"] .q-graph{
    min-height:340px!important;
  }
  .q-clue-chain li{
    grid-template-columns:1fr;
  }
  .q-clue-chain li em{
    grid-column:auto;
  }
}

/* 破案模式 2.0：固定式逐步推理图谱 + 悬浮引导优化 */
.q-tab-panel[data-q-tab-panel="graph"] .q-graph{
  overflow:auto;
  padding:18px!important;
  background-size:28px 28px;
}
.q-logic-board{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:720px;
  max-width:1180px;
  margin:0 auto;
  padding:2px 2px 22px;
}
.q-logic-stage{
  display:grid;
  grid-template-columns:minmax(150px,210px) minmax(0,1fr);
  gap:12px;
  align-items:stretch;
  border-radius:22px;
  background:rgba(255,255,255,.92);
  box-shadow:0 12px 30px rgba(15,23,42,.07),0 0 0 1px rgba(148,163,184,.2);
  padding:13px;
}
.q-stage-title{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:7px 9px;
  align-content:start;
  color:#0f172a;
}
.q-stage-title b{
  width:34px;
  height:34px;
  border-radius:12px;
  display:inline-grid;
  place-items:center;
  background:#ede9fe;
  color:#5b21b6;
  font-size:16px;
}
.q-stage-title span{
  align-self:center;
  font-size:15px;
  font-weight:950;
}
.q-stage-title em{
  grid-column:1 / -1;
  color:#64748b;
  font-style:normal;
  font-size:12px;
  line-height:1.55;
}
.q-stage-nodes{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(138px,1fr));
  gap:9px;
  align-items:stretch;
}
.q-map-node{
  appearance:none;
  width:100%;
  min-height:58px;
  border:0;
  border-radius:18px;
  padding:10px 12px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 8px 22px rgba(15,23,42,.07),0 0 0 1px rgba(148,163,184,.24);
  font-size:13px;
  font-weight:900;
  line-height:1.35;
  text-align:center;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.q-map-node span{
  display:block;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.q-map-node:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(15,23,42,.11),0 0 0 2px rgba(124,58,237,.16);
}
.q-map-node.locked{
  background:linear-gradient(180deg,#f1f5f9,#e2e8f0);
  color:#94a3b8;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.45);
  font-size:24px;
}
.q-map-node.locked:hover{
  color:#64748b;
}
.q-map-node.keyword.revealed{background:#ede9fe;color:#5b21b6}
.q-map-node.concept.revealed{background:#ecfeff;color:#0e7490}
.q-map-node.rule.revealed{background:#fef9c3;color:#854d0e}
.q-map-node.trap.revealed{background:#fff1f2;color:#be123c}
.q-map-node.answer.revealed{background:#dcfce7;color:#166534}
.q-map-node.done{
  box-shadow:0 10px 24px rgba(22,163,74,.12),0 0 0 2px rgba(34,197,94,.22);
}
.q-map-node.done em{
  flex:0 0 auto;
  width:20px;
  height:20px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  background:#16a34a;
  color:#fff;
  font-size:12px;
  font-style:normal;
}
.q-map-node.decoy-done{
  background:#fff7ed!important;
  color:#c2410c!important;
}
.q-stage-arrow{
  text-align:center;
  color:#8b5cf6;
  font-size:22px;
  font-weight:950;
  line-height:1;
}
.q-reason-float{
  position:fixed;
  z-index:10050;
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff,#fbfaff);
  box-shadow:0 24px 70px rgba(15,23,42,.24),0 0 0 1px rgba(124,58,237,.18);
  padding:13px;
  color:#0f172a;
  max-height:calc(100vh - 48px);
  max-width:calc(100vw - 48px);
  overflow:auto;
  overscroll-behavior:contain;
}
.q-reason-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid rgba(148,163,184,.18);
  padding-bottom:9px;
  margin-bottom:10px;
}
.q-reason-head strong{
  display:block;
  font-size:15px;
  line-height:1.35;
}
.q-reason-head span{
  display:block;
  margin-top:2px;
  color:#7c3aed;
  font-size:12px;
  font-weight:850;
}
.q-reason-close{
  position:relative;
  flex:0 0 auto;
  border:0;
  width:30px;
  height:30px;
  border-radius:999px;
  background:linear-gradient(180deg,#ffffff,#eef2ff);
  color:#64748b;
  cursor:pointer;
  display:inline-grid;
  place-items:center;
  padding:0;
  box-shadow:0 8px 18px rgba(15,23,42,.10),inset 0 1px 0 rgba(255,255,255,.9);
  transition:background .15s ease,color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.q-reason-close span{position:absolute;inset:0;display:block}
.q-reason-close span::before,
.q-reason-close span::after{content:"";display:block;position:absolute;width:12px;height:2px;border-radius:999px;background:currentColor;left:50%;top:50%;transform-origin:center}
.q-reason-close span::before{transform:translate(-50%,-50%) rotate(45deg)}
.q-reason-close span::after{transform:translate(-50%,-50%) rotate(-45deg)}
.q-reason-close:hover{background:#eef2ff;color:#4f46e5;transform:translateY(-1px);box-shadow:0 10px 22px rgba(79,70,229,.14),inset 0 1px 0 rgba(255,255,255,.9)}
.q-reason-body{
  color:#475569;
  font-size:13px;
  line-height:1.65;
}
.q-guide-lead{
  margin:0 0 10px!important;
  color:#475569!important;
  line-height:1.7!important;
}
.q-guide-mini{
  border-radius:14px;
  padding:9px 10px;
  background:#f8fafc;
  color:#0e7490;
  font-size:12px;
  line-height:1.6;
}
.q-guide-inline-btn{
  border:0;
  border-radius:12px;
  padding:8px 12px;
  background:#7c3aed;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.q-reason-choices{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.q-reason-choices button{
  border:0;
  border-radius:14px;
  background:#f8fafc;
  color:#0f172a;
  padding:10px 11px;
  font-size:13px;
  line-height:1.5;
  font-weight:850;
  text-align:left;
  cursor:pointer;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.22);
}
.q-reason-choices button:hover{
  background:#ede9fe;
  color:#5b21b6;
}
.q-reason-choices button.wrong{
  background:#fff1f2;
  color:#be123c;
  box-shadow:inset 0 0 0 1px rgba(244,63,94,.26);
}
.q-reason-feedback{
  min-height:18px;
  margin-top:9px;
  color:#be123c;
  font-size:12px;
  line-height:1.5;
  font-weight:850;
}
.q-option-reminder{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:8px;
  align-items:start;
  border-radius:16px;
  padding:10px 11px;
  background:#f8fafc;
  color:#0f172a;
  margin-bottom:10px;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.22);
}
.q-option-reminder strong{
  display:inline-grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:10px;
  background:#ede9fe;
  color:#5b21b6;
}
.q-option-reminder span{
  line-height:1.6;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.q-option-reminder.correct{
  background:#dcfce7;
  color:#166534;
}
.q-option-reminder.correct strong{
  background:#16a34a;
  color:#fff;
}
@media(max-width:960px){
  .q-logic-board{min-width:0;max-width:none}
  .q-logic-stage{grid-template-columns:1fr}
  .q-stage-nodes{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
  .q-reason-float{left:10px!important;right:10px!important;width:auto!important;max-height:62vh}
}

/* 破案模式 2.1：合并干扰排除与锁定答案，并在锁定后高亮关键路径 */
.q-logic-board{
  position:relative;
}
.q-logic-board .q-path-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  overflow:visible;
  z-index:3;
}
.q-logic-stage,
.q-stage-arrow{
  position:relative;
  z-index:2;
}
.q-stage-nodes{
  position:relative;
  z-index:4;
}
.q-map-node{
  position:relative;
  z-index:4;
}
.q-answer-nodes{
  grid-template-columns:repeat(4,minmax(96px,1fr));
}
.q-map-node.answer-choice{
  min-height:64px;
  font-size:14px;
  letter-spacing:.02em;
}
.q-map-node.answer-choice.revealed{
  background:#eef2ff;
  color:#3730a3;
}
.q-map-node.answer-choice.rejected{
  background:#f8fafc!important;
  color:#64748b!important;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.36);
}
.q-map-node.answer-choice.rejected em{
  background:#94a3b8;
}
.q-map-node.answer-choice.muted-after-lock{
  opacity:.58;
  filter:saturate(.75);
}
.q-map-node.path-node{
  z-index:6;
  box-shadow:0 14px 30px rgba(124,58,237,.20),0 0 0 3px rgba(124,58,237,.28)!important;
  outline:2px solid rgba(253,224,71,.75);
  outline-offset:2px;
}
.q-map-node.path-final{
  background:linear-gradient(135deg,#dcfce7,#bbf7d0)!important;
  color:#14532d!important;
  box-shadow:0 16px 36px rgba(22,163,74,.20),0 0 0 3px rgba(34,197,94,.30)!important;
}
.q-path-line{
  fill:none;
  stroke:#7c3aed;
  stroke-width:3.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:9 7;
  filter:drop-shadow(0 3px 5px rgba(124,58,237,.24));
  marker-end:url(#qPathArrow);
  animation:qPathDash 1.4s linear infinite;
}
.q-path-arrow-head{
  fill:#7c3aed;
}
@keyframes qPathDash{
  to{stroke-dashoffset:-32}
}
.q-answer-stage{
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(245,243,255,.92));
}
@media(max-width:960px){
  .q-answer-nodes{grid-template-columns:repeat(2,minmax(110px,1fr))}
}

/* 综合试卷前端选择 */
.q-paper-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px;padding:10px 12px;border-radius:16px;background:#f8fafc;border:1px solid rgba(148,163,184,.24)}
.q-paper-bar label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800;color:#334155}
.q-paper-bar select{min-width:220px;max-width:360px;padding:8px 10px;border-radius:12px;border:1px solid rgba(148,163,184,.34);background:#fff;color:#0f172a;font-weight:700}
.q-paper-bar button{padding:8px 11px;border-radius:12px;border:0;background:#e2e8f0;color:#0f172a;font-weight:900;cursor:pointer}
.q-paper-bar button#qStartPaperBtn{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff}
.q-paper-bar span{font-size:12px;color:#64748b;font-weight:800}
@media (max-width:640px){.q-paper-bar{align-items:stretch}.q-paper-bar label,.q-paper-bar select,.q-paper-bar button{width:100%}.q-paper-bar label{display:grid}.q-paper-bar select{max-width:none;min-width:0}}


/* 角色状态与角色主题 */
.auth-status{gap:7px}
.auth-status .role-dot{width:9px;height:9px;border-radius:99px;background:var(--role-primary,#64748b);box-shadow:0 0 0 3px var(--role-soft,#f1f5f9)}
.auth-status .role-badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 7px;background:#fff;color:var(--role-primary,#2563eb);box-shadow:0 0 0 1px rgba(255,255,255,.7);font-size:11px}
.auth-status.logged-in{color:var(--role-text,#1e3a8a);background:linear-gradient(135deg,var(--role-soft,#dbeafe),#fff);box-shadow:0 0 0 1px color-mix(in srgb,var(--role-primary,#2563eb) 28%,transparent)}
body[data-role-theme] .toolbar{background:linear-gradient(135deg,rgba(255,255,255,.94),var(--role-soft,#f8fafc));border-bottom-color:color-mix(in srgb,var(--role-primary,#2563eb) 24%,transparent)}
body[data-role-theme] .floating-tool-btn.primary,body[data-role-theme] button.primary{background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#7c3aed));}
.permission-disabled{opacity:.46;filter:grayscale(.5);pointer-events:none}
.role-permission-denied{min-height:100vh;display:grid;place-items:center;padding:28px;background:linear-gradient(135deg,var(--role-soft,#f8fafc),#fff)}
.role-denied-card{width:min(560px,calc(100vw - 36px));padding:34px;border-radius:28px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.16);text-align:center;border:1px solid rgba(148,163,184,.24)}
.role-denied-icon{width:70px;height:70px;border-radius:24px;margin:0 auto 14px;display:grid;place-items:center;background:var(--role-soft,#f8fafc);font-size:34px}
.role-denied-card h1{margin:0 0 10px;color:#0f172a}
.role-denied-card p{margin:0 auto 18px;color:#64748b;line-height:1.7}
.role-denied-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.role-denied-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 14px;border-radius:14px;text-decoration:none;background:var(--role-primary,#2563eb);color:#fff;font-weight:900}

[data-permission][hidden],[data-permission-any][hidden],.permission-hidden{display:none!important;}

/* 微信扫码登录 */
.wechat-login-section{margin-top:14px;border-top:1px dashed #cbd5e1;padding-top:14px}
.wechat-divider{display:flex;align-items:center;gap:10px;margin-bottom:12px;color:#94a3b8;font-size:12px;font-weight:900}.wechat-divider:before,.wechat-divider:after{content:"";height:1px;background:#e2e8f0;flex:1}.wechat-divider span{white-space:nowrap}
.wechat-login-entry{width:100%;border:0;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border-radius:14px;padding:11px 14px;font-weight:900;box-shadow:0 12px 26px rgba(22,163,74,.22);cursor:pointer}.wechat-login-entry:hover{transform:translateY(-1px);box-shadow:0 16px 32px rgba(22,163,74,.28)}
.wechat-login-panel{margin-top:12px}.wechat-login-card{border:1px solid #bbf7d0;border-radius:18px;background:linear-gradient(135deg,#f0fdf4,#fff);padding:14px;box-shadow:0 12px 28px rgba(22,163,74,.09)}
.wechat-login-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.wechat-icon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#22c55e;color:#fff;font-weight:1000;box-shadow:0 8px 18px rgba(34,197,94,.24)}.wechat-login-title strong{display:block;color:#14532d}.wechat-login-title small{display:block;margin-top:2px;color:#64748b;font-size:12px;line-height:1.4}
.wechat-login-hint{margin:0 0 10px;color:#64748b;font-size:13px;line-height:1.6}
#authModal.wechat-login-mode .auth-body>label,#authModal.wechat-login-mode .auth-msg,#authModal.wechat-login-mode .auth-actions,#authModal.wechat-login-mode .auth-note{display:none}
#authModal.wechat-login-mode .wechat-login-section{margin-top:0;padding-top:0;border-top:0}
#authModal.wechat-login-mode .wechat-divider,#authModal.wechat-login-mode .wechat-login-hint,#authModal.wechat-login-mode .wechat-login-entry{display:none}
.wechat-login-copy{text-align:center}
.wechat-login-copy strong{display:block;margin-bottom:6px;color:#14532d;font-size:15px;font-weight:900}
.wechat-login-copy p{margin:0 0 12px;color:#64748b;font-size:13px;line-height:1.5}
.wechat-login-qr{height:320px;display:flex;justify-content:center;align-items:flex-start;overflow:hidden}
.wechat-login-qr iframe{transform:scale(.8);transform-origin:top center;width:300px;height:400px;border:0;max-width:100%}
.wechat-login-back{display:inline-flex;align-items:center;justify-content:center;min-height:36px;margin:14px auto 0;padding:0 14px;border:1px solid #bbf7d0;border-radius:10px;background:#fff;color:#166434;font-size:13px;font-weight:900;box-shadow:none;cursor:pointer}.wechat-login-back:hover{background:#f0fdf4;color:#14532d;box-shadow:0 0 0 2px rgba(34,197,94,.12)}
.wechat-login-body{display:grid;grid-template-columns:120px minmax(0,1fr);gap:14px;align-items:center}.wechat-pseudo-qr{width:116px;height:116px;border:8px solid #fff;border-radius:16px;display:grid;grid-template-columns:repeat(13,1fr);grid-template-rows:repeat(13,1fr);gap:2px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.14)}.wechat-pseudo-qr span{border-radius:2px;background:#dcfce7}.wechat-pseudo-qr span.on{background:#166534}.wechat-login-copy p{margin:0 0 10px;color:#475569;font-size:12px;line-height:1.6}.wechat-login-copy code{background:#dcfce7;color:#166534;border-radius:6px;padding:1px 4px}.wechat-login-actions{display:flex;gap:8px;flex-wrap:wrap}.wechat-login-actions button{border:1px solid #86efac;border-radius:12px;background:#fff;color:#166534;padding:9px 11px;font-weight:900;cursor:pointer}.wechat-login-actions button:first-child{background:#16a34a;color:#fff;border-color:#16a34a}.wechat-login-actions button:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.4)}.wechat-login-tip{display:block;margin-top:9px;color:#64748b;line-height:1.45}
@media(max-width:560px){.wechat-login-body{grid-template-columns:1fr}.wechat-pseudo-qr{margin:0 auto}}


/* 大图谱性能模式：节点/关系线数量过大时，优先保证打开、缩放、拖拽和查看节点。 */
.stage.large-graph-mode .knowledge-card{
  transition:none!important;
  box-shadow:0 1px 4px rgba(15,23,42,.10),0 0 0 1px rgba(15,23,42,.08)!important;
}
.stage.large-graph-mode .knowledge-card:hover{
  transform:none!important;
  box-shadow:0 2px 7px rgba(15,23,42,.13),0 0 0 1px rgba(15,23,42,.10)!important;
}
.stage.large-graph-mode.focus-mode .knowledge-card{
  filter:none!important;
  opacity:.78;
}
.stage.large-graph-mode.focus-mode .knowledge-card.focus-card{
  animation:none!important;
  opacity:1;
  box-shadow:0 3px 10px rgba(37,99,235,.16),0 0 0 2px rgba(37,99,235,.58)!important;
}
.stage.large-graph-mode .edge-visible{
  filter:none!important;
  opacity:.42;
  stroke-width:2.4;
}
.stage.large-graph-mode.focus-mode .edge-visible.focus-important-edge{
  stroke-width:3.2!important;
  opacity:.72!important;
}


/* 大图谱体验恢复 v2：默认保留主干概览，选中/悬停时显示局部关系与标签。 */
.stage.large-graph-mode.large-graph-overview-relations .edge-label{display:none!important}
.stage.large-graph-mode.large-graph-overview-relations .edge-hit{pointer-events:none!important}
.stage.large-graph-mode.large-graph-local-relations .edge-hit{pointer-events:stroke!important}
.stage.large-graph-mode.large-graph-local-relations .edge-label{
  display:block!important;
  font-size:13px;
  stroke-width:4px;
  opacity:.82;
}
.stage.large-graph-mode.large-graph-overview-relations .edge-visible{
  opacity:.24;
  stroke-width:2.1;
}
.stage.large-graph-mode.large-graph-local-relations .edge-visible{
  opacity:.72;
  stroke-width:3;
}
.stage.large-graph-mode.large-graph-local-relations .edge-hit:hover+.edge-visible,
.stage.large-graph-mode.large-graph-local-relations .edge-hit.selected+.edge-visible{
  stroke-width:5;
  filter:none!important;
  opacity:.92;
}
.stage.large-graph-mode.focus-mode.large-graph-local-relations .edge-visible.focus-important-edge{
  stroke-width:3.6!important;
  opacity:.88!important;
}


/* 大图谱 v3：默认关闭主干概览线，只在选中卡牌后显示局部关系。 */
.stage.large-graph-mode.large-graph-lines-off .edge-layer{
  pointer-events:none!important;
}
.floating-tool-btn.soft-disabled{
  opacity:.46;
}
.floating-tool-btn#largeGraphLinesBtn.active-toggle{
  background:#0f172a;
  color:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.16);
}


/* 大图谱 v4：拖拽时仅让当前已显示的局部关系线实时跟随，标签和 hit 区松手后刷新。 */
.stage.large-graph-mode.large-graph-dragging-local-lines .edge-label{
  opacity:.36!important;
}
.stage.large-graph-mode.large-graph-dragging-local-lines .edge-hit{
  pointer-events:none!important;
}
.stage.large-graph-mode.large-graph-dragging-local-lines .edge-visible{
  transition:none!important;
  filter:none!important;
}


/* 大图谱 v5：局部探索。选中卡牌后突出一度相关卡牌，必要时只看相关。 */
.stage.large-graph-mode.large-graph-related-focus .knowledge-card.large-related-anchor{
  opacity:1!important;
  z-index:18;
  box-shadow:0 8px 24px rgba(37,99,235,.22),0 0 0 3px rgba(37,99,235,.72)!important;
}
.stage.large-graph-mode.large-graph-related-focus .knowledge-card.large-related-neighbor{
  opacity:1!important;
  z-index:12;
  box-shadow:0 5px 16px rgba(15,23,42,.15),0 0 0 2px rgba(16,185,129,.48)!important;
}
.stage.large-graph-mode.large-graph-related-focus .knowledge-card.large-related-muted{
  opacity:.24!important;
  filter:none!important;
}
.stage.large-graph-mode.large-graph-related-focus .knowledge-card.large-related-muted:hover{
  opacity:.48!important;
}
.stage.large-graph-mode.large-graph-related-only .knowledge-card.large-related-hidden{
  display:none!important;
}
.stage.large-graph-mode.large-graph-related-only .knowledge-card.large-related-anchor,
.stage.large-graph-mode.large-graph-related-only .knowledge-card.large-related-neighbor{
  display:block!important;
}
.floating-tool-btn#largeGraphRelatedBtn.active-toggle{
  background:#0f172a;
  color:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.16);
}
.floating-tool-btn#largeGraphRelatedBtn.needs-selection:not(.active-toggle){
  opacity:.58;
}

/* 大图谱 v6：图谱索引与邻接表优化，不改变 v5 视觉体验。 */


/* 大图谱 v7：搜索与定位浮层。 */
.graph-search-panel{
  position:absolute;
  left:18px;
  top:96px;
  width:min(360px,calc(100vw - 36px));
  max-height:min(620px,calc(100vh - 130px));
  display:none;
  flex-direction:column;
  gap:10px;
  z-index:34;
  padding:12px;
  border-radius:20px;
  background:rgba(255,255,255,.96);
  box-shadow:0 18px 48px rgba(15,23,42,.18),0 0 0 1px rgba(15,23,42,.08);
  backdrop-filter:blur(14px);
}
.graph-search-panel.show{display:flex}
.graph-search-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#0f172a}
.graph-search-head button{
  border:0;
  width:30px;
  height:30px;
  border-radius:12px;
  background:#f1f5f9;
  color:#334155;
  box-shadow:none;
}
.graph-search-input{
  width:100%;
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  padding:10px 12px;
  font-size:14px;
  outline:none;
  background:#fff;
}
.graph-search-input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.graph-search-meta{font-size:12px;color:#64748b;line-height:1.35}
.graph-search-results{display:flex;flex-direction:column;gap:7px;overflow:auto;padding-right:2px}
.graph-search-result{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  text-align:left;
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  padding:9px 10px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 1px 3px rgba(15,23,42,.06);
}
.graph-search-result:hover{transform:none;background:#f8fafc;box-shadow:0 4px 14px rgba(15,23,42,.10)}
.graph-search-result-title{font-weight:700;font-size:13px;line-height:1.25}
.graph-search-result-sub{font-size:12px;color:#475569;line-height:1.25}
.graph-search-result-keywords{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  color:#94a3b8;
}
.graph-search-empty{
  padding:18px 10px;
  border-radius:14px;
  background:#f8fafc;
  color:#64748b;
  font-size:13px;
  text-align:center;
}
@media (max-width:720px){
  .graph-search-panel{left:10px;right:10px;top:80px;width:auto;max-height:calc(100vh - 160px)}
}


/* v7 搜索滚动修复：搜索结果内滚动不再传递到画布缩放。 */
.graph-search-panel,
.graph-search-results{
  overscroll-behavior:contain;
}


/* v7.1 自适应性能阈值：200/300/400 张卡牌测试包也进入局部探索性能模式。 */


/* v7.2 中型图谱阈值前移：100 张左右开始启用局部探索性能模式，50 张仍保持完整普通模式。 */


/* v7.4 正常模式局部探索：只看相关、高亮相关、弱化无关不再仅限性能模式。 */
.stage.graph-related-focus:not(.large-graph-mode) .knowledge-card.large-related-anchor{
  opacity:1!important;
  z-index:18;
  box-shadow:0 8px 24px rgba(37,99,235,.22),0 0 0 3px rgba(37,99,235,.62)!important;
}
.stage.graph-related-focus:not(.large-graph-mode) .knowledge-card.large-related-neighbor{
  opacity:1!important;
  z-index:12;
  box-shadow:0 5px 16px rgba(15,23,42,.15),0 0 0 2px rgba(16,185,129,.42)!important;
}
.stage.graph-related-focus:not(.large-graph-mode) .knowledge-card.large-related-muted{
  opacity:.34!important;
  filter:none!important;
}
.stage.graph-related-focus:not(.large-graph-mode) .knowledge-card.large-related-muted:hover{
  opacity:.58!important;
}
.stage.graph-related-only .knowledge-card.large-related-hidden{
  display:none!important;
}
.stage.graph-related-only .knowledge-card.large-related-anchor,
.stage.graph-related-only .knowledge-card.large-related-neighbor{
  display:block!important;
}


/* v7.5 普通模式关系线分层：选中卡牌后相关线正常，无关线弱化；只看相关时仍直接过滤无关线。 */
.stage.graph-related-focus:not(.large-graph-mode):not(.graph-related-only) .edge-visible.edge-related-active{
  opacity:1;
}
.stage.graph-related-focus:not(.large-graph-mode):not(.graph-related-only) .edge-visible.edge-related-muted{
  opacity:.14!important;
  stroke-width:2.5!important;
  filter:none!important;
}
.stage.graph-related-focus:not(.large-graph-mode):not(.graph-related-only) .edge-label.edge-related-muted{
  display:none!important;
}
.stage.graph-related-focus:not(.large-graph-mode):not(.graph-related-only) .edge-hit.edge-related-muted{
  pointer-events:none!important;
}
.stage.graph-related-focus:not(.large-graph-mode):not(.graph-related-only) .edge-hit.edge-related-active:hover+.edge-visible,
.stage.graph-related-focus:not(.large-graph-mode):not(.graph-related-only) .edge-hit.edge-related-active.selected+.edge-visible{
  stroke-width:7;
}


/* v7.6 正常模式骨架线：主干线按钮在普通模式下显示知识骨架，选中卡牌时仍保留一度局部关系。 */
.stage.graph-trunk-lines:not(.large-graph-mode) .edge-layer{
  pointer-events:auto;
}
.stage.graph-trunk-lines:not(.large-graph-mode) .edge-visible{
  opacity:.9;
}
.stage.graph-trunk-lines:not(.large-graph-mode) .edge-label{
  opacity:.82;
}


/* v7.7.1 心流模式与讲解范围锁定：制作时默认不弱化，开启心流/只看相关后才进入局部聚焦。 */
.floating-tool-btn#flowModeBtn.active-toggle{
  background:linear-gradient(135deg,#7c3aed,#2563eb);
  color:#fff;
  box-shadow:0 8px 22px rgba(59,130,246,.22);
}
.card-context-actions{
  position:absolute;
  display:none;
  z-index:48;
  gap:6px;
  align-items:center;
  padding:6px;
  border-radius:14px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(37,99,235,.16);
  box-shadow:0 12px 32px rgba(15,23,42,.18);
  backdrop-filter:blur(12px);
  pointer-events:auto;
}
.card-context-actions.show{display:flex}
.card-context-actions button{
  width:32px;
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:999px;
  padding:0;
  background:#eff6ff;
  color:#1d4ed8;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:none;
}
.card-context-actions button svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.card-context-actions button:hover{
  background:#2563eb;
  color:#fff;
  transform:none;
}
.card-context-actions button[data-action="restore"]{
  background:#fff7ed;
  color:#c2410c;
}
.card-context-actions button[data-action="restore"]:hover{
  background:#f97316;
  color:#fff;
}
.stage.graph-gather-layout .knowledge-card.gather-temp-card{
  outline:2px solid rgba(37,99,235,.22);
  outline-offset:2px;
}
.stage.graph-gather-layout .knowledge-card.gather-anchor-card{
  outline-color:rgba(124,58,237,.44);
  box-shadow:0 16px 36px rgba(124,58,237,.20),0 0 0 3px rgba(124,58,237,.16);
}
.stage.graph-gather-layout .knowledge-card:not(.gather-temp-card){
  opacity:.12;
  pointer-events:none;
}
.stage.large-graph-mode.large-graph-overview-relations.large-graph-local-relations g[data-large-edge-mode="overview"] .edge-visible{
  opacity:.18!important;
  stroke-width:1.9!important;
}
.stage.large-graph-mode.large-graph-overview-relations.large-graph-local-relations g[data-large-edge-mode="local"] .edge-visible{
  opacity:.78!important;
  stroke-width:3.2!important;
}
.stage.large-graph-mode.large-graph-overview-relations.large-graph-local-relations g[data-large-edge-mode="overview"] .edge-hit{
  pointer-events:none!important;
}
.stage.large-graph-mode.large-graph-overview-relations.large-graph-local-relations g[data-large-edge-mode="overview"] .edge-label{
  display:none!important;
}


/* v7.9.1 临时相关画布弹窗：更大的只读学习视图 */
body.related-canvas-open{overflow:hidden;}
.related-canvas-backdrop{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(6px);
}
.related-canvas-dialog{
  position:relative;
  width:min(98vw,1760px);
  height:min(94vh,1080px);
  min-width:min(760px,calc(100vw - 20px));
  min-height:min(560px,calc(100vh - 20px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.38);
  border-radius:24px;
  background:linear-gradient(180deg,#f8fafc,#eef2ff);
  box-shadow:0 30px 90px rgba(15,23,42,.36);
}
.related-canvas-backdrop.related-canvas-fullscreen{padding:0;}
.related-canvas-backdrop.related-canvas-fullscreen .related-canvas-dialog{
  width:100vw;height:100vh;min-width:0;min-height:0;border-radius:0;border:none;
}
.related-canvas-header{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid rgba(148,163,184,.32);
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(10px);
}
.related-canvas-header strong{display:block;font-size:16px;color:#111827;}
.related-canvas-header span{display:block;margin-top:2px;font-size:12px;color:#64748b;}
.related-canvas-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
.related-canvas-tool{
  height:34px;min-width:34px;padding:0 10px;border:none;border-radius:999px;
  background:#e2e8f0;color:#0f172a;font-weight:800;cursor:pointer;
}
.related-canvas-tool:hover{background:#dbeafe;color:#1d4ed8;}
.related-canvas-zoom-label{min-width:46px;text-align:center;font-size:12px;font-weight:800;color:#334155;}
.related-canvas-close{
  width:36px;height:36px;border:none;border-radius:999px;
  background:#e2e8f0;color:#0f172a;font-size:24px;line-height:1;cursor:pointer;
}
.related-canvas-close:hover{background:#2563eb;color:#fff;}
.related-canvas-body{
  position:relative;
  flex:1 1 auto;
  overflow:auto;
  overscroll-behavior:contain;
  padding:14px;
  background:radial-gradient(circle at 20% 0%,rgba(37,99,235,.08),transparent 28%),linear-gradient(180deg,#f8fafc,#eef2ff);
}
.related-canvas-viewport{
  position:relative;
  min-width:100%;
  min-height:100%;
}
.related-canvas-stage{
  position:absolute;
  left:0;top:0;
  min-width:0;
  min-height:0;
  border-radius:18px;
  background-image:radial-gradient(rgba(100,116,139,.22) 1px,transparent 1px);
  background-size:24px 24px;
  transform-origin:0 0;
}
.related-canvas-edges,.related-canvas-cards{position:absolute;left:0;top:0;}
.related-canvas-edges{overflow:visible;pointer-events:none;}
.related-canvas-cards{right:0;bottom:0;}
.related-canvas-card.knowledge-card{
  position:absolute;
  cursor:grab;
  user-select:none;
  pointer-events:auto;
}
.related-canvas-card.knowledge-card.dragging{cursor:grabbing;z-index:8;}
.related-canvas-card.knowledge-card .node-size-tools{display:none!important;}
.related-canvas-anchor-card{
  outline:3px solid rgba(124,58,237,.36);
  outline-offset:3px;
  box-shadow:0 16px 38px rgba(124,58,237,.18),0 0 0 4px rgba(124,58,237,.12)!important;
}
.related-canvas-edge{stroke:var(--edge-color,#64748b);stroke-width:2.6;fill:none;opacity:.72;filter:none!important;}
.related-canvas-label{font-size:11px;fill:#475569;paint-order:stroke;stroke:#f8fafc;stroke-width:4px;stroke-linejoin:round;}
.related-canvas-info{
  position:absolute;
  left:auto;
  right:auto;
  top:auto;
  bottom:auto;
  width:min(380px,calc(100% - 36px));
  max-height:calc(100% - 104px);
  overflow:hidden;
  z-index:20;
  border:1px solid rgba(148,163,184,.42);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 18px 50px rgba(15,23,42,.22);
  backdrop-filter:blur(10px);
}
.related-canvas-info.dragging{user-select:none;box-shadow:0 22px 60px rgba(15,23,42,.28);}
.related-canvas-info-header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 12px 10px 14px;cursor:move;border-bottom:1px solid rgba(148,163,184,.22);
}
.related-canvas-info-header .detail-top{margin:0;min-width:0;flex:1;}
.related-canvas-info-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;}
.related-canvas-info-content{max-height:calc(100vh - 210px);overflow:auto;padding:14px 16px 16px;}
.related-canvas-info.collapsed .related-canvas-info-content{display:none;}
.related-canvas-info.collapsed{max-height:88px;}
.related-canvas-info-close,.related-canvas-info-collapse{
  width:28px;height:28px;border:none;border-radius:999px;background:#e2e8f0;color:#0f172a;cursor:pointer;font-weight:900;
}
.related-canvas-info-close:hover{background:#ef4444;color:#fff;}
.related-canvas-info-collapse:hover{background:#2563eb;color:#fff;}
@media (max-width: 760px){
  .related-canvas-backdrop{padding:8px;}
  .related-canvas-dialog{width:100vw;height:100vh;min-width:0;min-height:0;border-radius:0;}
  .related-canvas-body{padding:10px;}
  .related-canvas-info{width:min(360px,calc(100% - 24px));max-height:48%;}
}


/* v7.9.3 临时相关画布：控制按钮居中与空白画布拖拽平移 */
.related-canvas-tool,
.related-canvas-close,
.related-canvas-info-close,
.related-canvas-info-collapse{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box;
  line-height:1!important;
  vertical-align:middle;
}
.related-canvas-tool{
  width:34px;
  min-width:34px;
  padding:0!important;
  font-size:17px;
}
.related-canvas-zoom-reset{
  width:auto;
  min-width:52px;
  padding:0 12px!important;
  font-size:13px;
}
.related-canvas-close{
  padding:0!important;
  font-size:0!important;
}
.related-canvas-info-close,
.related-canvas-info-collapse{
  padding:0!important;
  font-size:0!important;
}
.related-canvas-tool svg,
.related-canvas-close svg,
.related-canvas-info-close svg,
.related-canvas-info-collapse svg{
  width:17px;
  height:17px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.related-canvas-fullscreen-toggle svg{width:18px;height:18px;}
.related-canvas-close svg{width:19px;height:19px;}
.related-canvas-info-close svg,
.related-canvas-info-collapse svg{width:15px;height:15px;}
.related-canvas-body{
  cursor:grab;
  touch-action:none;
}
.related-canvas-body.panning{
  cursor:grabbing;
  user-select:none;
}
.related-canvas-body.panning .related-canvas-stage,
.related-canvas-body.panning .related-canvas-viewport{
  cursor:grabbing;
}
.related-canvas-card.knowledge-card{cursor:grab;}
.related-canvas-card.knowledge-card.dragging{cursor:grabbing;}
.related-canvas-info,
.related-canvas-info *,
.related-canvas-header,
.related-canvas-header *{
  cursor:auto;
}
.related-canvas-info-header{cursor:move!important;}


/* v7.9.4 临时相关画布：真正的画布平移与控制按钮精修 */
.related-canvas-body{
  overflow:hidden!important;
  cursor:grab;
  touch-action:none;
}
.related-canvas-viewport{
  position:absolute!important;
  inset:0;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden;
}
.related-canvas-stage{
  will-change:transform;
  transform-origin:0 0!important;
}
.related-canvas-header-actions{
  align-items:center!important;
  gap:8px!important;
}
.related-canvas-tool,
.related-canvas-close,
.related-canvas-info-close,
.related-canvas-info-collapse{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  box-sizing:border-box!important;
  padding:0!important;
  margin:0!important;
  text-align:center!important;
  vertical-align:middle!important;
  line-height:1!important;
}
.related-canvas-tool{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  border-radius:999px!important;
  font-size:17px!important;
}
.related-canvas-zoom-reset{
  width:auto!important;
  min-width:56px!important;
  padding:0 12px!important;
  font-size:13px!important;
  line-height:1!important;
}
.related-canvas-close{
  width:42px!important;
  height:42px!important;
  border-radius:999px!important;
  font-size:0!important;
}
.related-canvas-info-close,
.related-canvas-info-collapse{
  width:32px!important;
  height:32px!important;
  border-radius:999px!important;
  font-size:0!important;
}
.related-canvas-tool svg,
.related-canvas-close svg,
.related-canvas-info-close svg,
.related-canvas-info-collapse svg{
  display:block!important;
  margin:auto!important;
  position:static!important;
  transform:none!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2.2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  pointer-events:none!important;
}
.related-canvas-close svg{width:20px!important;height:20px!important;}
.related-canvas-info-close svg,.related-canvas-info-collapse svg{width:16px!important;height:16px!important;}


/* v7.9.5 详情窗口长标题避让关闭按钮，并移除“尺寸”后保持信息区紧凑。 */
.detail-panel>.detail-top{
  padding-right:76px;
}
.detail-panel>.detail-top>div:not(.detail-mini-icon),
.related-canvas-info-header .detail-top>div:not(.detail-mini-icon){
  min-width:0;
  flex:1 1 auto;
}
.detail-panel .detail-name,
.detail-panel .detail-title,
.related-canvas-info .detail-name,
.related-canvas-info .detail-title{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.related-canvas-info-header .detail-name,
.related-canvas-info-header .detail-title{
  display:block;
}

/* v7.9.16：连线起点提示移到卡片外上方，始终保持单行。 */
.knowledge-card.size-small.link-source:after{top:-30px;min-width:52px;padding:0 7px}
.knowledge-card.size-big.link-source:after{top:-36px;min-width:64px;padding:0 10px}

/* v7.9.43：卡牌四向快速生长创建。 */
.node-growth-layer{
  position:absolute;
  left:0;
  top:0;
  z-index:20;
  pointer-events:none;
}
.node-growth-handle{
  position:absolute;
  width:18px;
  height:18px;
  padding:0;
  border:0;
  border-radius:999px;
  background:transparent;
  transform:translate(-50%,-50%);
  cursor:pointer;
  pointer-events:auto;
  z-index:24;
}
.node-growth-handle::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:3px;
  height:3px;
  border-radius:999px;
  background:#3b82f6;
  border:1.5px solid #fff;
  box-shadow:0 4px 10px rgba(37,99,235,.28),0 0 0 1px rgba(37,99,235,.24);
  transform:translate(-50%,-50%);
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease;
}
.node-growth-handle:hover::before,
.node-growth-handle:focus-visible::before{
  background:#2563eb;
  transform:translate(-50%,-50%) scale(1.45);
  box-shadow:0 5px 14px rgba(37,99,235,.34),0 0 0 4px rgba(59,130,246,.14);
}
.node-growth-preview-card{
  position:absolute;
  box-sizing:border-box;
  border:2px dashed rgba(37,99,235,.72);
  border-radius:20px;
  background:rgba(255,255,255,.72);
  box-shadow:0 18px 42px rgba(15,23,42,.13),0 0 0 6px rgba(37,99,235,.08);
  pointer-events:none;
  overflow:hidden;
  z-index:22;
}
.node-growth-preview-card::before{
  content:"";
  position:absolute;
  inset:0 0 42% 0;
  background:var(--node-color,#3b82f6);
  opacity:.34;
}
.node-growth-preview-card::after{
  content:"未命名知识点";
  position:absolute;
  left:12px;
  right:12px;
  bottom:13px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:13px;
  font-weight:850;
  letter-spacing:.02em;
  opacity:.82;
}
.node-growth-preview-card.size-small{
  border-radius:18px;
}
.node-growth-preview-card.size-small::after{
  left:7px;
  right:7px;
  bottom:9px;
  font-size:11px;
}
.node-growth-preview-card.size-big{
  border-radius:24px;
}
.node-growth-preview-card.size-big::after{
  bottom:18px;
  font-size:15px;
}
.node-growth-preview-line{
  position:absolute;
  box-sizing:border-box;
  pointer-events:none;
  z-index:21;
}
.node-growth-preview-line.horizontal{
  height:0;
  border-top:3px dashed rgba(51,65,85,.95);
}
.node-growth-preview-line.vertical{
  width:0;
  border-left:3px dashed rgba(51,65,85,.95);
}
.node-growth-preview-line::after{
  content:"";
  position:absolute;
  width:0;
  height:0;
}
.node-growth-preview-line-right::after{
  right:-2px;
  top:-8px;
  border-left:14px solid rgba(51,65,85,.95);
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
}
.node-growth-preview-line-left::after{
  left:-2px;
  top:-8px;
  border-right:14px solid rgba(51,65,85,.95);
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
}
.node-growth-preview-line-bottom::after{
  left:-8px;
  bottom:-2px;
  border-top:14px solid rgba(51,65,85,.95);
  border-left:7px solid transparent;
  border-right:7px solid transparent;
}
.node-growth-preview-line-top::after{
  left:-8px;
  top:-2px;
  border-bottom:14px solid rgba(51,65,85,.95);
  border-left:7px solid transparent;
  border-right:7px solid transparent;
}
.stage.panning .node-growth-layer,
.stage.is-interacting .node-growth-layer,
.stage.graph-gather-layout .node-growth-layer,
.stage.viewport-fitting .node-growth-layer{
  display:none;
}
@media (pointer:coarse){
  .node-growth-handle{
    width:30px;
    height:30px;
  }
  .node-growth-handle::before{
    width:5px;
    height:5px;
  }
}

/* v7.9.44：缩小快速生长小点，并让视觉点离卡牌边线留出距离；点击区域保留为 18px 便于操作。 */
.node-growth-handle::before{
  width:3px;
  height:3px;
  border-width:1.5px;
}

/* v7.9.45：快速生长小点改为 div 直绑事件，禁用文本选择并保留键盘焦点可见性。 */
.node-growth-handle{
  appearance:none;
  -webkit-appearance:none;
  user-select:none;
  -webkit-user-select:none;
  outline:none;
}
.node-growth-handle:focus-visible::before{
  background:#2563eb;
  transform:translate(-50%,-50%) scale(1.45);
  box-shadow:0 5px 14px rgba(37,99,235,.34),0 0 0 4px rgba(59,130,246,.14);
}

/* v7.9.46：预览虚框完全不接管鼠标，离开小点后由全局 pointermove 兜底清理。 */
.node-growth-preview-card,
.node-growth-preview-line{
  pointer-events:none!important;
}

/* v7.9.49：四向快速生长预览线改为 SVG 折线，遮挡绕位时也能准确连接虚框卡牌。 */
.node-growth-preview-svg{
  position:absolute;
  overflow:visible;
  pointer-events:none!important;
  z-index:21;
}
.node-growth-preview-path{
  fill:none;
  stroke:rgba(51,65,85,.95);
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:6 5;
}
.node-growth-preview-arrow{
  fill:rgba(51,65,85,.95);
}

/* v7.9.52：左侧工具栏合并按钮的二级菜单。 */
.floating-tool-menu-shell{
  position:relative;
  width:40px;
  height:40px;
  overflow:visible;
}
.floating-tool-menu-shell .floating-menu-trigger::before{
  content:"";
  position:absolute;
  right:5px;
  bottom:5px;
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid currentColor;
  opacity:.48;
  transform:scale(.82);
}
.floating-tool-menu-shell.menu-open .floating-menu-trigger{
  background:#eff6ff;
  color:#2563eb;
  box-shadow:0 0 0 1px rgba(37,99,235,.16);
}
.floating-submenu{
  position:absolute;
  left:48px;
  top:50%;
  min-width:134px;
  display:grid;
  grid-template-columns:1fr;
  gap:5px;
  padding:7px;
  border-radius:15px;
  background:rgba(255,255,255,.97);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 16px 42px rgba(15,23,42,.18);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  opacity:0;
  transform:translateY(-50%) translateX(-6px);
  pointer-events:none;
  transition:opacity .14s ease,transform .14s ease;
  z-index:120;
}
.floating-tool-menu-shell.menu-open .floating-submenu,
.floating-tool-menu-shell:hover .floating-submenu,
.floating-tool-menu-shell:focus-within .floating-submenu{
  opacity:1;
  transform:translateY(-50%) translateX(0);
  pointer-events:auto;
}
.floating-subtool-btn{
  width:100%;
  min-width:118px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 9px;
  border-radius:11px;
  color:#334155;
  background:#fff;
  box-shadow:0 0 0 1px rgba(15,23,42,.06);
  font-size:12px;
  font-weight:850;
  text-align:center;
  white-space:nowrap;
}

.detail-panel-control{display:grid;place-items:center;background:#f3f4f6;color:#64748b;border:0;box-shadow:none}
.detail-panel-control svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.detail-actions-chevron{display:block;transform:rotate(0deg);transition:transform .16s ease}
.detail-actions-toggle.is-expanded .detail-actions-chevron{transform:rotate(180deg)}
.floating-subtool-btn svg{
  width:17px;
  height:17px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.floating-subtool-btn:hover,
.floating-subtool-btn:focus-visible{
  transform:none;
  background:#eef2ff;
  color:#2563eb;
  outline:none;
}
.floating-subtool-btn.active-toggle{
  background:#2563eb;
  color:#fff;
  box-shadow:0 8px 18px rgba(37,99,235,.22);
}
.floating-toolbox input[type="file"][hidden]{
  display:none!important;
}


/* v7.9.53/v7.9.54：合并按钮二级面板只由 menu-open 控制，点击选项后不再被 hover/focus 强行保留。 */
.floating-tool-menu-shell:not(.menu-open) .floating-submenu{
  opacity:0!important;
  transform:translateY(-50%) translateX(-6px)!important;
  pointer-events:none!important;
}

/* v7.9.58：缩放动画期间提示浏览器提前启用合成层，减少顿挫。 */
.stage.viewport-smooth-zooming .world{will-change:transform}
.stage.viewport-smooth-zooming .edge-layer,.stage.viewport-smooth-zooming .cards-layer{will-change:transform}

/* v8.4.30.16-light-alpha · 学习模式入口 */
.learning-mode-entry{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 12px;border:1px solid rgba(109,93,252,.22);border-radius:10px;background:#fff;color:#5b4dd1;font-size:12px;font-weight:850;text-decoration:none}
.learning-mode-entry:hover{background:#f5f3ff}

/* 桌面端统一图谱顶栏右上角三个入口（学习路径 / 升级会员 / 账号菜单）的几何尺寸，
   使三者等高、等内边距、等圆角；移动端仍沿用账号胶囊的紧凑样式。 */
@media (min-width:851px){
  .stage>.canvas-toolbar-right .learning-mode-entry,
  .stage>.canvas-toolbar-right .upgrade-member-btn,
  .stage>.canvas-toolbar-right .account-menu-trigger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:0 14px;
    border-radius:10px;
  }
}


/* v8.5.4.3 · 统一按钮普通态底座保护
 * 旧版 button.primary 与角色主题规则曾覆盖普通态 box-shadow，造成深色底座仅在 hover 时出现。
 * 此处在全局样式末尾重新确立组件自身的背景、边框、颜色与 4px 底座。
 */
button.ui-button,a.ui-button{
  border-color:var(--ui-button-border);
  background:var(--ui-button-bg);
  color:var(--ui-button-ink);
  box-shadow:0 4px 0 var(--ui-button-depth);
  transform:translateY(0)
}
body[data-role-theme] button.ui-button,body[data-role-theme] a.ui-button{
  border-color:var(--ui-button-border);
  background:var(--ui-button-bg);
  color:var(--ui-button-ink);
  box-shadow:0 4px 0 var(--ui-button-depth)
}
button.ui-button:hover,a.ui-button:hover,
body[data-role-theme] button.ui-button:hover,body[data-role-theme] a.ui-button:hover{
  background:var(--ui-button-bg);
  color:var(--ui-button-ink);
  box-shadow:0 4px 0 var(--ui-button-depth);
  transform:translateY(0)
}
button.ui-button:active:not(:disabled):not([aria-disabled="true"]),
a.ui-button:active:not([aria-disabled="true"]),
body[data-role-theme] button.ui-button:active:not(:disabled):not([aria-disabled="true"]),
body[data-role-theme] a.ui-button:active:not([aria-disabled="true"]){
  box-shadow:none;
  transform:translateY(4px)
}
button.ui-button:disabled,button.ui-button[aria-disabled="true"],
a.ui-button[aria-disabled="true"],
body[data-role-theme] button.ui-button:disabled,body[data-role-theme] button.ui-button[aria-disabled="true"],
body[data-role-theme] a.ui-button[aria-disabled="true"]{
  opacity:.56;
  cursor:not-allowed;
  filter:none;
  box-shadow:0 4px 0 var(--ui-button-depth);
  transform:none
}


/* v8.5.4.4 · 禁用按钮保留立体底座
 * 禁用仅降低视觉权重并停止交互，不再移除 4px 深色底座。
 */
button.ui-button:disabled,button.ui-button[aria-disabled="true"],
a.ui-button[aria-disabled="true"],
body[data-role-theme] button.ui-button:disabled,body[data-role-theme] button.ui-button[aria-disabled="true"],
body[data-role-theme] a.ui-button[aria-disabled="true"]{
  opacity:.56;cursor:not-allowed;filter:none;transform:none;
  box-shadow:0 4px 0 var(--ui-button-depth)
}

/* v8.6.2 P2.2.28 — hover affordance and drag-to-connect graph handles. */
@media (hover:hover) and (pointer:fine){
  .stage .knowledge-card:hover:not(.dragging):not(.group-dragging){
    outline:2px solid #ef4444;
    outline-offset:1px;
  }
}
.stage .knowledge-card.is-connector-drag-source{
  outline:2px solid #2563eb;
  outline-offset:2px;
}
.stage .knowledge-card.is-connector-drag-target{
  outline:3px solid #10b981!important;
  outline-offset:3px!important;
}
.edge-connect-draft{
  fill:none;
  stroke:#ef4444;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:8 6;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
  opacity:.9;
}
.edge-connect-draft.has-target{
  stroke:#10b981;
  stroke-dasharray:none;
}
.stage.graph-connector-dragging .node-growth-handle{
  cursor:crosshair;
}
.stage.graph-connector-dragging .knowledge-card{
  cursor:crosshair;
}

/* P2.2.34 · knowledge graph toolbar and connector hover stability */
.floating-toolbox .floating-tool-btn,
.floating-toolbox .floating-menu-trigger,
.floating-toolbox #focusBtn.floating-tool-btn,
.floating-toolbox #flashcardBtn.floating-tool-btn,
.floating-toolbox #questionTrainBtn.floating-tool-btn,
.floating-toolbox #addBtn.floating-tool-btn{
  background:#fff!important;
  color:#334155!important;
  box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08)!important;
}
.floating-toolbox .floating-tool-btn:hover,
.floating-toolbox .floating-menu-trigger:hover{
  background:#f8fafc!important;
  color:#0f172a!important;
  transform:none;
  box-shadow:0 5px 14px rgba(15,23,42,.10),0 0 0 1px rgba(15,23,42,.10)!important;
}
.node-growth-handle::before{
  transition:background-color .12s ease,box-shadow .12s ease!important;
  transform:translate(-50%,-50%)!important;
}
.node-growth-handle:hover::before,
.node-growth-handle:focus-visible::before{
  width:4px;
  height:4px;
  transform:translate(-50%,-50%)!important;
  background:#2563eb;
  box-shadow:0 4px 12px rgba(37,99,235,.30),0 0 0 4px rgba(59,130,246,.14);
}

/* P2.2.35 · left graph toolbar: inactive white, active deep gray. */
.floating-toolbox .floating-tool-btn.active-toggle,
.floating-toolbox .floating-tool-btn.is-active,
.floating-toolbox .floating-tool-btn[aria-pressed="true"],
.floating-toolbox .floating-menu-trigger.active-toggle,
.floating-toolbox .floating-menu-trigger[aria-pressed="true"],
.floating-toolbox .floating-tool-menu-shell.menu-open > .floating-menu-trigger{
  background:#111827!important;
  color:#fff!important;
  box-shadow:0 7px 16px rgba(15,23,42,.24),0 0 0 1px rgba(15,23,42,.82)!important;
}
.floating-toolbox .floating-tool-btn.active-toggle:hover,
.floating-toolbox .floating-tool-btn.is-active:hover,
.floating-toolbox .floating-tool-btn[aria-pressed="true"]:hover,
.floating-toolbox .floating-menu-trigger.active-toggle:hover,
.floating-toolbox .floating-menu-trigger[aria-pressed="true"]:hover,
.floating-toolbox .floating-tool-menu-shell.menu-open > .floating-menu-trigger:hover{
  background:#111827!important;
  color:#fff!important;
  transform:none!important;
  box-shadow:0 7px 16px rgba(15,23,42,.24),0 0 0 1px rgba(15,23,42,.82)!important;
}
/* Keep P2.2.34 ID-specific inactive overrides from winning when those tools are active. */
.floating-toolbox #focusBtn.floating-tool-btn.active-toggle,
.floating-toolbox #flashcardBtn.floating-tool-btn.active-toggle,
.floating-toolbox #questionTrainBtn.floating-tool-btn.active-toggle,
.floating-toolbox #addBtn.floating-tool-btn.active-toggle{
  background:#111827!important;
  color:#fff!important;
  box-shadow:0 7px 16px rgba(15,23,42,.24),0 0 0 1px rgba(15,23,42,.82)!important;
}

/* P2.2.37 · 框选关系线的批量选中反馈 */
.edge-hit.batch-selected + .edge-visible,
g.is-batch-selected .edge-visible{
  stroke-width:7;
  opacity:1;
  filter:drop-shadow(0 0 6px rgba(37,99,235,.45)) drop-shadow(0 3px 3px rgba(37,99,235,.18));
}

/* Current knowledge-point editor: start with the two fields needed for a quick capture. */
#nodeModal .modal{width:min(520px,100%)}
#nodeModal .node-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
#nodeModal .node-modal-head h2{margin:0}
#nodeModal .node-modal-mode-btn{width:34px;height:34px;display:grid;place-items:center;padding:0;border:1px solid #dbe3ef;border-radius:10px;background:#fff;color:#64748b;box-shadow:none;cursor:pointer}
#nodeModal .node-modal-mode-btn:hover{background:#f8fafc;color:#334155;border-color:#cbd5e1}
#nodeModal .node-modal-mode-btn[aria-pressed="true"]{background:#eef2ff;color:#4f46e5;border-color:#c7d2fe}
#nodeModal .node-modal-mode-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#nodeModal .node-simple-form{grid-template-columns:1fr;gap:7px;align-items:stretch}
#nodeModal .node-simple-form label{text-align:left;margin-top:2px;font-weight:750;color:#334155}
#nodeModal .node-simple-form textarea{min-height:190px}
#nodeModal .node-advanced-form[hidden]{display:none!important}
#nodeModal .node-advanced-form{margin-top:14px;padding-top:14px;border-top:1px solid #e2e8f0}
#nodeModal .node-advanced-form textarea{min-height:76px}
#nodeModal .node-advanced-form input[type="color"]{justify-self:start}
#nodeModal.node-editor-full .node-simple-form textarea{min-height:120px}

/* kg:wechat-login-custom */
.wechat-login-section{margin-top:14px;border-top:1px dashed #cbd5e1;padding-top:14px}
.wechat-divider{display:flex;align-items:center;gap:10px;margin-bottom:12px;color:#94a3b8;font-size:12px;font-weight:900}.wechat-divider:before,.wechat-divider:after{content:"";height:1px;background:#e2e8f0;flex:1}.wechat-divider span{white-space:nowrap}
.wechat-login-entry{width:100%;border:0;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border-radius:14px;padding:11px 14px;font-weight:900;box-shadow:0 12px 26px rgba(22,163,74,.22);cursor:pointer}.wechat-login-entry:hover{transform:translateY(-1px);box-shadow:0 16px 32px rgba(22,163,74,.28)}
.wechat-login-panel{margin-top:12px}.wechat-login-card{border:1px solid #bbf7d0;border-radius:18px;background:linear-gradient(135deg,#f0fdf4,#fff);padding:14px;box-shadow:0 12px 28px rgba(22,163,74,.09)}
.wechat-login-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.wechat-icon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#22c55e;color:#fff;font-weight:1000;box-shadow:0 8px 18px rgba(34,197,94,.24)}.wechat-login-title strong{display:block;color:#14532d}.wechat-login-title small{display:block;margin-top:2px;color:#64748b;font-size:12px;line-height:1.4}
.wechat-login-hint{margin:0 0 10px;color:#64748b;font-size:13px;line-height:1.6}
#authModal.wechat-login-mode .auth-body>label,#authModal.wechat-login-mode .auth-msg,#authModal.wechat-login-mode .auth-actions,#authModal.wechat-login-mode .auth-note{display:none}
/* style: styles/global-shortcuts.css */
/*
 * 全局快捷悬浮栏。
 * 在首页、多题归纳、深度回忆、教师工作台、用户管理等独立页面统一显示。
 * 入口可按角色权限自动显示，支持拖拽到任意位置，并可在纵向/横向排布间切换。
 */
.kg-global-shortcuts{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:2147483000;
  width:168px;
  padding:9px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:22px;
  background:rgba(255,255,255,.93);
  box-shadow:0 18px 52px rgba(15,23,42,.18);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  color:#0f172a;
  user-select:none;
  touch-action:none;
  font-family:"Microsoft YaHei","PingFang SC",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.kg-global-shortcuts[hidden]{display:none!important}
.kg-global-shortcuts.dragging{
  opacity:.95;
  box-shadow:0 24px 66px rgba(15,23,42,.26);
}
.kg-global-shortcuts-head{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:2px 2px 8px;
  cursor:grab;
}
.kg-global-shortcuts.dragging .kg-global-shortcuts-head{cursor:grabbing}
.kg-global-shortcuts-title{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.kg-global-shortcuts-grip{
  width:26px;
  height:26px;
  border-radius:10px;
  display:grid;
  place-items:center;
  color:#64748b;
  background:#f8fafc;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.22);
  flex:0 0 auto;
}
.kg-global-shortcuts-grip svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
}
.kg-global-shortcuts-title strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  line-height:1.2;
  white-space:nowrap;
}
.kg-global-shortcuts-title small{
  display:block;
  margin-top:1px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
}
.kg-global-shortcuts-toggle{
  width:26px;
  height:26px;
  min-width:26px;
  padding:0;
  border:0;
  border-radius:10px;
  background:#eef2ff;
  color:#2563eb;
  display:grid;
  place-items:center;
  box-shadow:none;
  cursor:pointer;
}
.kg-global-shortcuts-toggle:hover{
  transform:none;
  background:#dbeafe;
  box-shadow:none;
}
.kg-global-shortcuts-toggle svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.kg-global-shortcuts.layout-vertical{
  width:168px;
}
.kg-global-shortcuts.layout-vertical .kg-global-shortcuts-toggle svg{
  transform:rotate(0deg);
}
.kg-global-shortcuts.layout-horizontal{
  width:auto;
  max-width:calc(100vw - 36px);
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px;
  border-radius:22px;
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-head{
  width:auto;
  min-width:126px;
  padding:2px;
  flex:0 0 auto;
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-toggle svg{
  transform:rotate(-90deg);
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-body{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-link{
  width:auto;
  min-width:42px;
  min-height:38px;
  justify-content:center;
  padding:8px 10px;
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-link span{
  max-width:74px;
}
@media(max-width:720px),(pointer:coarse){
  .kg-global-shortcuts.layout-horizontal{
    max-width:calc(100vw - 20px);
    overflow-x:auto;
    scrollbar-width:none;
  }
  .kg-global-shortcuts.layout-horizontal::-webkit-scrollbar{display:none}
  .kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-head{
    min-width:112px;
  }
  .kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-link span{
    max-width:64px;
  }
}
@media(max-width:520px){
  .kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-title strong{
    display:none;
  }
  .kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-title small{
    display:none;
  }
  .kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-head{
    min-width:auto;
  }
}
.kg-global-shortcuts-body{
  display:grid;
  gap:7px;
}
.kg-global-shortcuts-link{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  border:0;
  border-radius:14px;
  padding:8px 10px;
  background:#fff;
  color:#0f172a;
  text-decoration:none;
  font-size:13px;
  font-weight:950;
  line-height:1.15;
  box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08);
  cursor:pointer;
  box-sizing:border-box;
}
.kg-global-shortcuts-link:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.10);
}
.kg-global-shortcuts-link svg{
  width:18px;
  height:18px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.kg-global-shortcuts-link span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.kg-global-shortcuts-link.current{
  background:linear-gradient(135deg,var(--role-soft,#dbeafe),#fff);
  color:var(--role-primary,#2563eb);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--role-primary,#2563eb) 18%,transparent);
}
.kg-global-shortcuts-link.training{
  background:linear-gradient(135deg,#7c3aed,#6366f1);
  color:#fff;
  box-shadow:0 10px 24px rgba(124,58,237,.22);
}
.kg-global-shortcuts-link.recall{
  background:linear-gradient(135deg,#db2777,#f97316);
  color:#fff;
  box-shadow:0 10px 24px rgba(219,39,119,.20);
}
.kg-global-shortcuts-link.bank{
  background:linear-gradient(135deg,#0891b2,#0e7490);
  color:#fff;
  box-shadow:0 10px 24px rgba(8,145,178,.24);
}
.kg-global-shortcuts-link.users{
  background:linear-gradient(135deg,#7c3aed,#f59e0b);
  color:#fff;
  box-shadow:0 10px 24px rgba(124,58,237,.22);
}
.kg-global-shortcuts-link.current.training,
.kg-global-shortcuts-link.current.recall,
.kg-global-shortcuts-link.current.bank,
.kg-global-shortcuts-link.current.users{
  outline:3px solid rgba(255,255,255,.72);
  outline-offset:-5px;
}
.kg-global-shortcuts-empty{
  border-radius:14px;
  padding:10px;
  color:#64748b;
  background:#f8fafc;
  font-size:12px;
  line-height:1.45;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.22);
}
@media(max-width:720px),(pointer:coarse){
  .kg-global-shortcuts{
    right:10px;
    bottom:82px;
    padding:8px;
    border-radius:19px;
  }
  .kg-global-shortcuts.layout-vertical{
    width:152px;
  }
  .kg-global-shortcuts-link{
    min-height:35px;
    padding:7px 9px;
    border-radius:12px;
    font-size:12px;
  }
  .kg-global-shortcuts-link svg{width:16px;height:16px}
}
@media(max-width:420px){
  .kg-global-shortcuts{
    max-width:calc(100vw - 20px);
  }
  .kg-global-shortcuts.layout-vertical{
    width:auto;
  }
  .kg-global-shortcuts-body{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

.kg-global-shortcuts-link.settings{
  background:linear-gradient(135deg,#0f172a,#475569);
  color:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.22);
}
.kg-global-shortcuts-link.current.settings{
  outline:3px solid rgba(255,255,255,.72);
  outline-offset:-5px;
}

/* 修复切换按钮位于拖拽手柄内时点击被拖拽事件吞掉的视觉/交互边界。 */
.kg-global-shortcuts-toggle{
  position:relative;
  z-index:2;
  touch-action:manipulation;
}
.kg-global-shortcuts-link{
  position:relative;
  z-index:1;
  touch-action:manipulation;
}

/* 图标栏不能依赖浏览器原生 title：它首悬停会有额外停留阈值，且后续悬停的表现不一致。 */
.kg-global-shortcuts [data-tooltip]{position:relative}
.kg-global-shortcuts [data-tooltip]::after{
  content:attr(data-tooltip);position:absolute;z-index:4;left:calc(100% + 8px);top:50%;
  transform:translate(4px,-50%);padding:6px 9px;border-radius:8px;background:#0f172a;color:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.22);font:750 12px/1.2 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity 80ms ease,transform 80ms ease,visibility 0s;transition-delay:0ms;
}
.kg-global-shortcuts [data-tooltip][data-tooltip-side="left"]::after{
  right:calc(100% + 8px);left:auto;transform:translate(-4px,-50%);
}
.kg-global-shortcuts [data-tooltip]:hover::after,
.kg-global-shortcuts [data-tooltip]:focus-visible::after{
  opacity:1;visibility:visible;transform:translate(0,-50%);transition-delay:0ms;
}
.kg-global-shortcuts [data-tooltip][data-tooltip-side="left"]:hover::after,
.kg-global-shortcuts [data-tooltip][data-tooltip-side="left"]:focus-visible::after{transform:translate(0,-50%)}


/* v8.6.2 P2.2.10 — compact icon-only global shortcut bar */
.kg-global-shortcuts{
  width:54px!important;
  padding:6px!important;
  box-sizing:border-box!important;
  border-radius:16px!important;
}
.kg-global-shortcuts-head{
  justify-content:center!important;
  gap:2px!important;
  padding:0 0 5px!important;
}
.kg-global-shortcuts-title{gap:0!important}
.kg-global-shortcuts-title>div,
.kg-global-shortcuts-title strong,
.kg-global-shortcuts-title small{display:none!important}
.kg-global-shortcuts-grip,
.kg-global-shortcuts-toggle{
  width:19px!important;
  min-width:19px!important;
  height:19px!important;
  border-radius:7px!important;
}
.kg-global-shortcuts-grip svg,
.kg-global-shortcuts-toggle svg{
  width:13px!important;
  height:13px!important;
}
.kg-global-shortcuts.layout-vertical{width:54px!important}
.kg-global-shortcuts-body{gap:5px!important}
.kg-global-shortcuts-link{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  min-height:38px!important;
  height:38px!important;
  justify-content:center!important;
  gap:0!important;
  padding:0!important;
  border-radius:11px!important;
}
.kg-global-shortcuts-link svg{width:18px!important;height:18px!important}
.kg-global-shortcuts-link span{display:none!important}
.kg-global-shortcuts.layout-horizontal{
  width:auto!important;
  max-width:calc(100vw - 24px)!important;
  gap:5px!important;
  padding:6px!important;
  border-radius:16px!important;
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-head{
  width:auto!important;
  min-width:40px!important;
  padding:0 5px 0 0!important;
  gap:2px!important;
}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-body{gap:5px!important}
.kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-link{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  min-height:38px!important;
  height:38px!important;
  padding:0!important;
}
.kg-global-shortcuts-link.workspace{
  background:linear-gradient(135deg,#7c3aed,#6366f1);
  color:#fff;
  box-shadow:0 8px 18px rgba(124,58,237,.20);
}
.kg-global-shortcuts-link.current.workspace{
  outline:3px solid rgba(255,255,255,.72);
  outline-offset:-5px;
}
@media(max-width:720px),(pointer:coarse){
  .kg-global-shortcuts{
    right:10px;
    bottom:82px;
    width:48px!important;
    padding:5px!important;
    border-radius:15px!important;
  }
  .kg-global-shortcuts.layout-vertical{width:48px!important}
  .kg-global-shortcuts-link,
  .kg-global-shortcuts.layout-horizontal .kg-global-shortcuts-link{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    border-radius:10px!important;
  }
  .kg-global-shortcuts-link svg{width:17px!important;height:17px!important}
}
@media(max-width:420px){
  .kg-global-shortcuts.layout-vertical{width:48px!important}
  .kg-global-shortcuts-body{grid-template-columns:1fr!important}
}

/* P2.2.34 · inactive shortcuts use white surfaces; only current shortcut is color-filled. */
.kg-global-shortcuts-link.training,
.kg-global-shortcuts-link.recall,
.kg-global-shortcuts-link.bank,
.kg-global-shortcuts-link.users,
.kg-global-shortcuts-link.settings,
.kg-global-shortcuts-link.workspace{
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.08),0 0 0 1px rgba(15,23,42,.08);
}
.kg-global-shortcuts-link.training{color:#6d28d9}
.kg-global-shortcuts-link.recall{color:#be185d}
.kg-global-shortcuts-link.bank{color:#0e7490}
.kg-global-shortcuts-link.users{color:#9a3412}
.kg-global-shortcuts-link.settings{color:#334155}
.kg-global-shortcuts-link.workspace{color:#4f46e5}
.kg-global-shortcuts-link.current.training{
  background:linear-gradient(135deg,#7c3aed,#6366f1);color:#fff;box-shadow:0 8px 18px rgba(124,58,237,.20)
}
.kg-global-shortcuts-link.current.recall{
  background:linear-gradient(135deg,#db2777,#f97316);color:#fff;box-shadow:0 8px 18px rgba(219,39,119,.20)
}
.kg-global-shortcuts-link.current.bank{
  background:linear-gradient(135deg,#0891b2,#0e7490);color:#fff;box-shadow:0 8px 18px rgba(8,145,178,.22)
}
.kg-global-shortcuts-link.current.users{
  background:linear-gradient(135deg,#7c3aed,#f59e0b);color:#fff;box-shadow:0 8px 18px rgba(124,58,237,.20)
}
.kg-global-shortcuts-link.current.settings{
  background:linear-gradient(135deg,#0f172a,#475569);color:#fff;box-shadow:0 8px 18px rgba(15,23,42,.20)
}
.kg-global-shortcuts-link.current.workspace{
  background:linear-gradient(135deg,#7c3aed,#6366f1);color:#fff;box-shadow:0 8px 18px rgba(124,58,237,.20)
}

/* P2.2.35 · global shortcuts: black icons by default, color fill only when current. */
.kg-global-shortcuts-link.training,
.kg-global-shortcuts-link.recall,
.kg-global-shortcuts-link.bank,
.kg-global-shortcuts-link.users,
.kg-global-shortcuts-link.settings,
.kg-global-shortcuts-link.workspace{
  color:#111827;
}
.kg-global-shortcuts-link:not(.current):hover,
.kg-global-shortcuts-link:not(.current):focus-visible{
  color:#111827;
  background:#f8fafc;
}
.kg-global-shortcuts-link.current.training,
.kg-global-shortcuts-link.current.recall,
.kg-global-shortcuts-link.current.bank,
.kg-global-shortcuts-link.current.users,
.kg-global-shortcuts-link.current.settings,
.kg-global-shortcuts-link.current.workspace{
  color:#fff;
}

/* P4.5 · canvas pages must retain a visible shortcut surface after every redraw. */
.kg-global-shortcuts{
  background:#1f2937!important;
  border-color:#475569!important;
  color:#f8fafc!important;
  box-shadow:0 16px 38px rgba(15,23,42,.34)!important;
}
.kg-global-shortcuts-grip{
  background:#334155!important;
  color:#e2e8f0!important;
  box-shadow:inset 0 0 0 1px rgba(226,232,240,.18)!important;
}
.kg-global-shortcuts-toggle{
  background:#f97316!important;
  color:#fff!important;
  box-shadow:0 5px 12px rgba(249,115,22,.38)!important;
}
.kg-global-shortcuts-toggle:hover,
.kg-global-shortcuts-toggle:focus-visible{
  background:#ea580c!important;
  outline:2px solid #fed7aa!important;
  outline-offset:2px;
}
/* style: styles/subscription.css */
/* 学员订阅权益：订阅状态与锁定提示的通用样式 */
.subscription-badge,
[data-subscription-status]{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  color:var(--role-text,#1e3a8a);
  background:linear-gradient(135deg,var(--role-soft,#dbeafe),#fff);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--role-primary,#2563eb) 22%,transparent);
}
.subscription-locked{
  opacity:.58;
  filter:saturate(.75);
  cursor:not-allowed!important;
}
.subscription-plan-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.subscription-plan-card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.24);
  border-radius:22px;
  padding:16px;
  background:linear-gradient(135deg,#fff,#f8fafc);
  box-shadow:0 14px 38px rgba(15,23,42,.08);
}
.subscription-plan-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:4px;
  background:linear-gradient(90deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
}
.subscription-plan-card h3{
  margin:0;
  color:#0f172a;
  font-size:18px;
}
.subscription-plan-card .price{
  margin:8px 0 4px;
  color:var(--role-primary,#2563eb);
  font-size:20px;
  font-weight:1000;
}
.subscription-plan-card p{
  margin:0;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
}
.subscription-plan-card ul{
  margin:12px 0 0;
  padding-left:18px;
  color:#334155;
  font-size:13px;
  line-height:1.7;
}
.subscription-policy-note{
  margin-top:12px;
  padding:12px 13px;
  border-radius:18px;
  background:#f8fafc;
  color:#475569;
  font-size:13px;
  line-height:1.65;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.20);
}
@media(max-width:980px){
  .subscription-plan-grid{grid-template-columns:1fr}
}

/* Step 7：订阅套餐模型校准后的展示样式 */
.subscription-plan-grid{
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
}
.subscription-plan-card.recommended{
  border-color:color-mix(in srgb,var(--role-primary,#2563eb) 42%,rgba(148,163,184,.22));
  box-shadow:0 18px 46px rgba(37,99,235,.14);
}
.subscription-plan-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:4px;
}
.subscription-plan-head span{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  color:var(--role-text,#1e3a8a);
  background:color-mix(in srgb,var(--role-soft,#dbeafe) 76%,#fff);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--role-primary,#2563eb) 18%,transparent);
  font-size:11px;
  font-weight:1000;
}
.subscription-duration{
  margin:0 0 8px!important;
  color:#475569!important;
  font-weight:900;
}
.subscription-limit-note{
  margin-top:12px;
  padding:9px 10px;
  border-radius:14px;
  color:#475569;
  background:#f8fafc;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
  font-size:12px;
  line-height:1.55;
}

/* Step 8：订阅 UI 基础层 */
.kg-user-subscription-box{
  grid-column:1/-1;
  border-radius:18px;
  padding:13px;
  background:linear-gradient(135deg,#fff,#f8fafc);
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.20);
}
.kg-user-subscription-main{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.kg-user-subscription-main strong{
  display:block;
  color:#0f172a;
  font-size:15px;
  line-height:1.25;
}
.kg-user-subscription-main span,
.kg-user-subscription-empty{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.55;
}
.kg-user-subscription-main em{
  flex:0 0 auto;
  padding:5px 9px;
  border-radius:999px;
  color:var(--role-text,#1e3a8a);
  background:color-mix(in srgb,var(--role-soft,#dbeafe) 76%,#fff);
  font-style:normal;
  font-size:12px;
  font-weight:1000;
}
.kg-user-subscription-meta,
.um-subscription-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.kg-user-subscription-meta span,
.um-subscription-summary span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  color:#475569;
  background:#f1f5f9;
  font-size:12px;
  font-weight:900;
}
.kg-user-subscription-note{
  margin:10px 0 0;
  color:#64748b;
  font-size:12px;
  line-height:1.55;
}
.um-subscription-card{
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:24px;
  background:rgba(255,255,255,.88);
  box-shadow:0 14px 38px rgba(15,23,42,.08);
}
.um-subscription-card[hidden]{display:none!important}
.um-subscription-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.um-subscription-grid .full{grid-column:1/-1}
.um-subscription-grid input,
.um-subscription-grid select{
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:13px;
  padding:9px 10px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-weight:800;
  outline:none;
}
.um-subscription-grid input:focus,
.um-subscription-grid select:focus{
  border-color:var(--role-primary,#2563eb);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--role-primary,#2563eb) 13%,transparent);
}
.um-subscription-actions,
.subscription-admin-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.um-subscription-actions button,
.subscription-admin-actions button{
  padding:9px 12px;
  border-radius:13px;
}
.subscription-admin-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  padding:12px 13px;
  border-radius:18px;
  background:linear-gradient(135deg,#f8fafc,#fff);
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
}
.subscription-admin-toolbar strong{
  color:#0f172a;
  font-size:15px;
}
.subscription-admin-toolbar p{
  margin:3px 0 0;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
}
.subscription-admin-toolbar button{
  flex:0 0 auto;
  border-radius:13px;
}
.subscription-admin-card{display:flex;flex-direction:column}
.subscription-admin-switches{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 10px;
}
.subscription-admin-switches label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
}
.subscription-admin-switches input{accent-color:var(--role-primary,#2563eb)}
.subscription-admin-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-bottom:10px;
}
.subscription-admin-fields label{
  color:#334155;
  font-size:12px;
  font-weight:900;
}
.subscription-admin-fields label.full{grid-column:1/-1}
.subscription-admin-fields input,
.subscription-admin-fields textarea{
  display:block;
  width:100%;
  margin-top:5px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:8px 9px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-size:13px;
  font-weight:750;
  outline:none;
}
.subscription-admin-fields textarea{resize:vertical;min-height:72px;line-height:1.5}
.subscription-admin-fields input:focus,
.subscription-admin-fields textarea:focus{
  border-color:var(--role-primary,#2563eb);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--role-primary,#2563eb) 13%,transparent);
}
.subscription-admin-grid .subscription-plan-card ul{margin-top:auto}
@media(max-width:820px){
  .um-subscription-grid,
  .subscription-admin-fields{grid-template-columns:1fr}
  .subscription-admin-toolbar{align-items:stretch;flex-direction:column}
  .subscription-admin-toolbar button{width:100%}
}

/* Step 7 补充：原价 + 折扣系数自动计算现价展示 */
.subscription-admin-price-preview,
.kg-user-subscription-price{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:6px;
}
.subscription-admin-price-preview{
  margin:2px 0 10px;
}
.subscription-admin-price-preview strong{
  color:var(--role-primary,#2563eb);
  font-size:18px;
  font-weight:1000;
}
.subscription-admin-price-preview del,
.kg-user-subscription-price del{
  color:#94a3b8;
  font-weight:900;
  text-decoration-thickness:2px;
}
.kg-user-subscription-price span{
  color:var(--role-text,#1e3a8a);
}

/* Step 7 补充：用户中心订阅快捷入口与会员权益详情 */
.kg-user-subscription-renew,
.kg-subscription-buy-btn{
  flex:0 0 auto;
  border:0;
  border-radius:14px;
  padding:9px 13px;
  color:#fff;
  background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
  box-shadow:0 12px 24px color-mix(in srgb,var(--role-primary,#2563eb) 22%,transparent);
  font-size:13px;
  font-weight:1000;
  cursor:pointer;
}
.kg-user-subscription-renew:hover,
.kg-subscription-buy-btn:hover{transform:translateY(-1px)}
.user-subscription-detail-backdrop{
  z-index:2147483300;
}
.kg-subscription-detail-modal{
  width:min(980px,calc(100vw - 28px));
  max-height:min(86vh,820px);
  overflow:auto;
}
.kg-subscription-detail-body{padding:0 20px 20px}
.kg-subscription-detail-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}
.kg-subscription-purchase-card.current{
  border-color:color-mix(in srgb,var(--role-primary,#2563eb) 58%,rgba(148,163,184,.22));
  box-shadow:0 18px 48px color-mix(in srgb,var(--role-primary,#2563eb) 16%,rgba(15,23,42,.06));
}
.kg-subscription-purchase-price{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:7px;
  margin:8px 0 8px;
}
.kg-subscription-purchase-price strong{
  color:var(--role-primary,#2563eb);
  font-size:20px;
  font-weight:1000;
}
.kg-subscription-purchase-price del{
  color:#94a3b8;
  font-weight:900;
  text-decoration-thickness:2px;
}
.subscription-discount-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:1000;
}
.kg-subscription-buy-btn{width:100%;margin-top:12px}
@media(max-width:640px){
  .kg-user-subscription-main{flex-direction:column;align-items:stretch}
  .kg-user-subscription-renew{width:100%}
  .kg-subscription-detail-body{padding:0 14px 16px}
}

/* Step 7 补充：会员权益弹窗卡片化购买与展示对齐 */
.kg-subscription-detail-grid{
  align-items:stretch;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
}
.kg-subscription-purchase-card{
  display:flex;
  flex-direction:column;
  min-height:410px;
  height:100%;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  outline:none;
}
.kg-subscription-purchase-card:hover,
.kg-subscription-purchase-card:focus-visible{
  transform:translateY(-4px);
  border-color:color-mix(in srgb,var(--role-primary,#2563eb) 56%,rgba(148,163,184,.24));
  box-shadow:0 24px 64px color-mix(in srgb,var(--role-primary,#2563eb) 18%,rgba(15,23,42,.08));
  filter:saturate(1.04);
}
.kg-subscription-purchase-card:focus-visible{
  box-shadow:0 0 0 4px color-mix(in srgb,var(--role-primary,#2563eb) 16%,transparent),0 24px 64px color-mix(in srgb,var(--role-primary,#2563eb) 18%,rgba(15,23,42,.08));
}
.kg-subscription-purchase-card.current::after{
  content:"✓";
  position:absolute;
  top:10px;
  right:10px;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:999px;
  color:#fff;
  background:#0f172a;
  font-size:14px;
  font-weight:1000;
  box-shadow:0 10px 20px rgba(15,23,42,.18);
}
.kg-subscription-plan-desc{
  min-height:44px;
}
.kg-subscription-benefit-list{
  flex:1 1 auto;
  min-height:142px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.kg-subscription-usage-text{
  min-height:50px;
  display:flex;
  align-items:center;
  margin-top:14px;
}
.kg-subscription-card-cta{
  margin-top:12px;
  min-height:38px;
  display:grid;
  place-items:center;
  border-radius:14px;
  color:#fff;
  background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
  box-shadow:0 12px 24px color-mix(in srgb,var(--role-primary,#2563eb) 18%,transparent);
  font-size:13px;
  font-weight:1000;
  pointer-events:none;
}
.kg-subscription-purchase-card:hover .kg-subscription-card-cta,
.kg-subscription-purchase-card:focus-visible .kg-subscription-card-cta{
  transform:translateY(-1px);
}
.subscription-admin-fields textarea[data-plan-field="benefitText"]{
  min-height:116px;
}
.subscription-admin-fields textarea[data-plan-field="usageText"]{
  min-height:64px;
}
@media(max-width:640px){
  .kg-subscription-purchase-card{min-height:0}
  .kg-subscription-benefit-list{min-height:0;justify-content:flex-start}
  .kg-subscription-usage-text{min-height:0}
}

/* Step 8A：订阅限制提示 */
.subscription-limit-toast,
.kr-limit-toast{
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translateX(-50%) translateY(10px);
  z-index:2147483600;
  max-width:min(520px,calc(100vw - 32px));
  padding:12px 16px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:16px;
  background:rgba(15,23,42,.92);
  color:#fff;
  box-shadow:0 22px 60px rgba(15,23,42,.28);
  font-size:14px;
  font-weight:900;
  line-height:1.5;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
.subscription-limit-toast.show,
.kr-limit-toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

/* Step 8B：订阅申请/订单占位流程 */
.kg-subscription-order-confirm{
  display:grid;
  gap:14px;
}
.kg-subscription-back-btn{
  justify-self:start;
  border:1px solid rgba(148,163,184,.28);
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:9px 13px;
  font-weight:900;
  cursor:pointer;
}
.kg-subscription-order-card{
  border:1px solid rgba(148,163,184,.22);
  border-radius:24px;
  padding:20px;
  background:linear-gradient(180deg,#fff,rgba(248,250,252,.92));
  box-shadow:0 22px 60px rgba(15,23,42,.08);
}
.kg-subscription-order-card.success{
  text-align:center;
  max-width:620px;
  margin:0 auto;
}
.kg-subscription-order-done{
  width:52px;
  height:52px;
  margin:4px auto 12px;
  display:grid;
  place-items:center;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,#22c55e,#14b8a6);
  font-size:28px;
  font-weight:1000;
  box-shadow:0 18px 40px rgba(34,197,94,.26);
}
.kg-subscription-order-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.kg-subscription-order-head p{
  margin:0 0 4px;
  color:#64748b;
  font-size:12px;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.kg-subscription-order-head h3{
  margin:0;
  color:#0f172a;
  font-size:24px;
}
.kg-subscription-order-head span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
  font-size:12px;
  font-weight:1000;
}
.kg-subscription-order-price{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0 10px;
}
.kg-subscription-order-price strong{
  color:var(--role-primary,#2563eb);
  font-size:28px;
  font-weight:1000;
}
.kg-subscription-order-price del{color:#94a3b8;font-weight:900;text-decoration-thickness:2px}
.kg-subscription-order-price em{
  padding:3px 8px;
  border-radius:999px;
  color:#fff;
  background:#ef4444;
  font-size:12px;
  font-style:normal;
  font-weight:1000;
}
.kg-subscription-order-desc{
  margin:0 0 14px;
  color:#64748b;
  line-height:1.65;
  font-weight:800;
}
.kg-subscription-order-meta,
.subscription-order-submeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.kg-subscription-order-meta span,
.subscription-order-submeta span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 9px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.22);
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:900;
}
.kg-subscription-order-benefits{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:8px;
  margin:14px 0;
  padding:0;
  list-style:none;
}
.kg-subscription-order-benefits li{
  padding:9px 10px;
  border-radius:14px;
  background:rgba(37,99,235,.06);
  color:#334155;
  font-size:13px;
  font-weight:900;
}
.kg-subscription-order-actions,
.subscription-order-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}
.kg-subscription-order-actions button,
.subscription-order-actions button{
  border:1px solid rgba(148,163,184,.28);
  border-radius:14px;
  padding:10px 14px;
  background:#fff;
  color:#334155;
  font-weight:1000;
  cursor:pointer;
}
.kg-subscription-order-actions button.primary,
.subscription-order-actions button.primary{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
  box-shadow:0 14px 28px color-mix(in srgb,var(--role-primary,#2563eb) 18%,transparent);
}
.subscription-order-actions button:disabled{opacity:.46;cursor:not-allowed;box-shadow:none}
.subscription-order-admin-panel{
  margin-top:18px;
  padding-top:18px;
  border-top:1px dashed rgba(148,163,184,.32);
}
.subscription-order-toolbar{align-items:flex-start}
.subscription-order-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.subscription-order-stats span{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  color:#334155;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.22);
  font-size:12px;
  font-weight:1000;
}
.subscription-order-list{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.subscription-order-item{
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  padding:14px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.04);
}
.subscription-order-item.pending{border-color:rgba(245,158,11,.36);background:linear-gradient(180deg,#fff,rgba(255,251,235,.78))}
.subscription-order-item.approved{border-color:rgba(34,197,94,.28)}
.subscription-order-item.cancelled{opacity:.78}
.subscription-order-main{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.subscription-order-main strong{
  display:block;
  color:#0f172a;
  font-size:16px;
}
.subscription-order-main span,
.subscription-order-item p{
  display:block;
  margin:4px 0 0;
  color:#64748b;
  font-size:13px;
  font-weight:800;
  line-height:1.55;
}
.subscription-order-main em{
  flex:0 0 auto;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  color:#fff;
  background:#0f172a;
  font-style:normal;
  font-size:12px;
  font-weight:1000;
}
.subscription-order-item.pending .subscription-order-main em{background:#f59e0b}
.subscription-order-item.approved .subscription-order-main em{background:#22c55e}
.subscription-order-item.cancelled .subscription-order-main em{background:#94a3b8}
@media(max-width:640px){
  .kg-subscription-order-head,
  .subscription-order-main,
  .kg-subscription-order-actions,
  .subscription-order-actions{align-items:stretch;flex-direction:column}
  .kg-subscription-order-actions button,
  .subscription-order-actions button{width:100%}
  .subscription-order-stats{justify-content:flex-start}
}

/* Step 8B 补充：卡密兑换与卡密管理分页 */
.kg-subscription-redeem-panel{
  margin-top:16px;
  padding:14px;
  border:1px solid rgba(59,130,246,.16);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(239,246,255,.9),rgba(255,255,255,.95));
  box-shadow:0 12px 28px rgba(15,23,42,.06);
  display:grid;
  gap:10px;
}
.kg-subscription-redeem-panel strong{display:block;color:#0f172a;font-size:15px;margin-bottom:3px}
.kg-subscription-redeem-panel p{margin:0;color:#64748b;font-size:12px;line-height:1.55}
.kg-subscription-redeem-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.kg-subscription-redeem-form input{
  width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;font-weight:800;letter-spacing:.04em;color:#0f172a;background:#fff;
}
.kg-subscription-redeem-form button{border:0;border-radius:12px;padding:10px 14px;background:#2563eb;color:#fff;font-weight:900;cursor:pointer;box-shadow:0 10px 20px rgba(37,99,235,.18)}
.kg-subscription-redeem-msg{min-height:18px;font-size:12px;color:#dc2626;font-weight:800}
.kg-subscription-redeem-msg.ok{color:#15803d}
.subscription-code-admin-panel{margin-top:18px;border:1px solid rgba(148,163,184,.24);border-radius:20px;background:#fff;padding:16px;box-shadow:0 16px 34px rgba(15,23,42,.06)}
.subscription-code-toolbar{margin-bottom:12px}
.subscription-code-create{display:grid;grid-template-columns:1.2fr .7fr .8fr minmax(180px,1fr) auto;gap:10px;align-items:end;margin-bottom:14px;padding:12px;border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0}
.subscription-code-create label{display:grid;gap:5px;font-size:12px;color:#475569;font-weight:900}
.subscription-code-create input,.subscription-code-create select{border:1px solid #cbd5e1;border-radius:11px;padding:9px 10px;background:#fff;color:#0f172a;font-weight:800;min-width:0}
.subscription-code-create button{border:0;border-radius:12px;padding:10px 14px;background:#2563eb;color:#fff;font-weight:900;cursor:pointer;box-shadow:0 10px 20px rgba(37,99,235,.17)}
.subscription-code-list{display:grid;gap:10px}
.subscription-code-item{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:12px;display:grid;gap:8px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.subscription-code-item:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(15,23,42,.08);border-color:#bfdbfe}
.subscription-code-item.used{background:#f8fafc}.subscription-code-item.disabled{opacity:.72;background:#f1f5f9}
.subscription-code-main{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.subscription-code-main strong{display:block;color:#0f172a;font-size:15px;letter-spacing:.04em}
.subscription-code-main span{display:block;margin-top:4px;color:#64748b;font-size:12px;font-weight:800}
.subscription-code-main em{font-style:normal;border-radius:999px;padding:4px 9px;background:#dcfce7;color:#166534;font-weight:900;font-size:12px;white-space:nowrap}
.subscription-code-item.used .subscription-code-main em{background:#e0e7ff;color:#3730a3}.subscription-code-item.disabled .subscription-code-main em{background:#e2e8f0;color:#475569}
.subscription-code-submeta{display:flex;gap:8px;flex-wrap:wrap;color:#64748b;font-size:12px}.subscription-code-submeta span{padding:3px 7px;border-radius:999px;background:#f1f5f9}
.subscription-code-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.subscription-code-actions button{border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#334155;padding:7px 10px;font-weight:900;cursor:pointer}.subscription-code-actions button:disabled{opacity:.45;cursor:not-allowed}.subscription-code-actions button[data-code-action="remove"]{color:#dc2626;border-color:#fecaca}
.subscription-code-pagination{margin-top:12px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;color:#475569;font-size:12px;font-weight:900}
.subscription-code-pagination button{border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#334155;padding:7px 10px;font-weight:900;cursor:pointer}.subscription-code-pagination button:disabled{opacity:.45;cursor:not-allowed}.subscription-code-pagination strong{color:#2563eb}
@media(max-width:900px){.subscription-code-create{grid-template-columns:1fr}.kg-subscription-redeem-form{grid-template-columns:1fr}.subscription-code-main{display:grid}.subscription-code-actions{justify-content:flex-start}}


/* C-1.4.3：会员权益弹窗紧凑布局与单行横向浏览 */
.kg-subscription-detail-grid{
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:2px 2px 10px;
  scroll-snap-type:x proximity;
  overscroll-behavior-inline:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(100,116,139,.55) transparent;
  -webkit-overflow-scrolling:touch;
}
.kg-subscription-detail-grid::-webkit-scrollbar{height:8px}
.kg-subscription-detail-grid::-webkit-scrollbar-track{background:transparent}
.kg-subscription-detail-grid::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(100,116,139,.45);
}
.kg-subscription-detail-grid::-webkit-scrollbar-thumb:hover{background:rgba(71,85,105,.65)}
.kg-subscription-purchase-card{
  flex:0 0 276px;
  width:276px;
  min-height:0;
  height:auto;
  scroll-snap-align:start;
}
.kg-subscription-plan-desc{
  min-height:0;
  margin-bottom:0;
}
.kg-subscription-plan-desc:empty,
.kg-subscription-benefit-list:empty{display:none}
.kg-subscription-benefit-list{
  flex:0 0 auto;
  min-height:0;
  justify-content:flex-start;
  margin-top:12px;
}
.kg-subscription-usage-text{
  min-height:0;
  margin-top:12px;
}
.kg-subscription-card-cta{
  margin-top:12px;
}
.kg-subscription-redeem-panel{
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:8px 12px;
  margin-top:12px;
  padding:10px 12px;
  border-radius:15px;
}
.kg-subscription-redeem-title{
  white-space:nowrap;
}
.kg-subscription-redeem-panel strong{
  margin:0;
  font-size:14px;
}
.kg-subscription-redeem-form{
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.kg-subscription-redeem-form input,
.kg-subscription-redeem-form button{
  min-height:36px;
  padding-top:8px;
  padding-bottom:8px;
}
.kg-subscription-redeem-msg{
  grid-column:1/-1;
  min-height:0;
  margin-top:-1px;
}
.kg-subscription-redeem-msg:empty{display:none}
@media(max-width:640px){
  .kg-subscription-purchase-card{
    flex-basis:min(276px,calc(100vw - 76px));
    width:min(276px,calc(100vw - 76px));
  }
  .kg-subscription-redeem-panel{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .kg-subscription-redeem-form{grid-template-columns:1fr}
  .kg-subscription-redeem-msg{grid-column:auto}
}
/* style: styles/user-center.css */
/*
 * 用户中心：当前登录用户自助修改个人资料。
 * 该组件跨页面使用，不依赖后台用户管理页。
 */
.user-center-backdrop{
  position:fixed;
  inset:0;
  z-index:2147483200;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.45);
  box-sizing:border-box;
}
.user-center-backdrop.show{
  display:flex;
}
.user-center-backdrop .modal{
  box-sizing:border-box;
  box-shadow:0 26px 86px rgba(15,23,42,.30);
}
.user-center-backdrop button{
  appearance:none;
  border:0;
  cursor:pointer;
  font-family:inherit;
  font-weight:900;
  transition:.16s ease;
}
.user-center-backdrop button:hover{
  transform:translateY(-1px);
}
.user-center-backdrop button.primary,
.kg-user-center-actions .primary{
  background:#2563eb;
  color:#fff;
}
.auth-status{
  cursor:pointer;
  user-select:none;
}
.auth-status:hover,
.auth-status:focus-visible{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(15,23,42,.10),0 0 0 1px rgba(37,99,235,.22);
  outline:none;
}
.auth-status::after{
  content:"";
  width:0;
  height:0;
  margin-left:6px;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid currentColor;
  opacity:.55;
}
.kg-user-center-modal{
  width:min(620px,calc(100vw - 28px));
  max-height:calc(100vh - 34px);
  padding:0;
  overflow:hidden;
  border-radius:26px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 46%,#f5f3ff 100%);
  display:flex;
  flex-direction:column;
}
.kg-user-center-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:20px 22px 14px;
  border-bottom:1px solid rgba(148,163,184,.18);
  background:rgba(255,255,255,.90);
  backdrop-filter:blur(12px);
}
.kg-user-center-title{
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
}
.kg-user-avatar{
  width:46px;
  height:46px;
  border-radius:17px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:1000;
  font-size:18px;
  background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
  box-shadow:0 12px 28px rgba(37,99,235,.18);
  flex:0 0 auto;
}
.kg-user-center-head h2{
  margin:0;
  font-size:22px;
  color:#0f172a;
  line-height:1.16;
}
.kg-user-center-head p{
  margin:5px 0 0;
  color:#64748b;
  font-size:13px;
  line-height:1.5;
}
.kg-user-center-close{
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  border-radius:12px;
  background:#f1f5f9;
  color:#64748b;
  box-shadow:none;
}
.kg-user-center-body{
  padding:18px 22px 20px;
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.kg-user-center-footer{flex:0 0 auto;padding:11px 22px 16px;border-top:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.94);box-shadow:0 -10px 24px rgba(15,23,42,.04)}
.kg-user-center-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px;
}
.kg-user-field{
  display:block;
  color:#334155;
  font-size:13px;
  font-weight:900;
}
.kg-user-field.full{
  grid-column:1/-1;
}
.kg-user-field span{
  display:block;
  margin-bottom:6px;
}
.kg-user-field input,
.kg-user-field textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(148,163,184,.36);
  border-radius:14px;
  padding:11px 12px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-weight:700;
  outline:none;
}
.kg-user-field textarea{
  min-height:86px;
  resize:vertical;
  line-height:1.55;
}
.kg-user-field input:focus,
.kg-user-field textarea:focus{
  border-color:var(--role-primary,#2563eb);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--role-primary,#2563eb) 14%,transparent);
}
.kg-user-field input[readonly]{
  background:#f8fafc;
  color:#64748b;
}
.kg-user-readonly-line{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  grid-column:1/-1;
}
.kg-user-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border-radius:999px;
  padding:6px 10px;
  background:#eef2ff;
  color:#3730a3;
  font-size:12px;
  font-weight:950;
}
.kg-user-password-box{
  grid-column:1/-1;
  margin-top:2px;
  padding:13px;
  border-radius:18px;
  background:rgba(255,255,255,.72);
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
}
.kg-user-password-box h3{
  margin:0 0 9px;
  color:#0f172a;
  font-size:15px;
}
.kg-user-center-tip{
  margin:12px 0 0;
  padding:10px 11px;
  border-radius:14px;
  background:#fffbeb;
  color:#92400e;
  font-size:12px;
  line-height:1.55;
}
.kg-user-center-msg{
  min-height:20px;
  margin:11px 0 0;
  color:#dc2626;
  font-size:13px;
  line-height:1.45;
  font-weight:850;
}
.kg-user-center-msg.ok{
  color:#16a34a;
}
.kg-user-center-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  margin-top:8px;
}
.kg-user-center-actions button{
  border-radius:14px;
  padding:10px 15px;
}
.kg-user-center-actions .primary{
  background:linear-gradient(135deg,var(--role-primary,#2563eb),var(--role-accent,#22c55e));
  color:#fff;
}
@media(max-width:640px){
  .kg-user-center-grid{
    grid-template-columns:1fr;
  }
  .kg-user-center-head{
    padding:18px 18px 12px;
  }
  .kg-user-center-body{
    padding:16px 18px 18px;
  }
  .kg-user-center-footer{padding:10px 18px 14px}
}

/* 用户中心成品稿：限定在新版弹窗，避免影响其他页面的既有组件。 */
.kg-user-center-modal.uc-dialog{--uc-green:#11a84b;--uc-green-dark:#087535;--uc-green-soft:#e8f8ee;--uc-ink:#111c35;--uc-muted:#6f7d95;--uc-line:#dfe5ee;width:min(960px,calc(100vw - 48px));max-height:calc(100vh - 48px);padding:0;overflow:hidden;border:1px solid rgba(255,255,255,.9);border-radius:34px;background:rgba(255,255,255,.985);box-shadow:0 34px 90px rgba(16,28,51,.24),0 8px 28px rgba(16,28,51,.1);color:var(--uc-ink);font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif}
.uc-dialog *{box-sizing:border-box}.uc-dialog button,.uc-dialog input,.uc-dialog textarea{font:inherit}.uc-dialog button{border:0}.uc-dialog .uc-header{min-height:144px;display:flex;align-items:center;justify-content:space-between;gap:32px;padding:30px 46px 26px;border-bottom:1px solid #edf1f6}.uc-dialog .uc-profile-heading{display:flex;min-width:0;align-items:center;gap:24px}.uc-dialog .uc-avatar{display:grid;width:84px;height:84px;flex:0 0 auto;place-items:center;border-radius:27px;background:linear-gradient(145deg,#20bb5e,#0c903f);box-shadow:0 12px 30px rgba(10,150,63,.22),inset 0 1px rgba(255,255,255,.24);color:#fff;font-size:34px;font-weight:700}.uc-dialog .uc-header h2{margin:0;color:#0c1730;font-size:clamp(32px,3.1vw,43px);line-height:1.2;letter-spacing:-.04em}.uc-dialog .uc-header p{margin:9px 0 0;color:#53617a;font-size:18px;line-height:1.55}.uc-dialog .uc-close{/* display:grid; */width:54px;height:54px;flex:0 0 auto;place-items:center;border:1px solid var(--uc-line);border-radius:17px;background:#fbfcfe;color:#6f7d95;cursor:pointer;font-size:32px;font-weight:400;line-height:1;transition:.16s ease}.uc-dialog .uc-close:hover{border-color:#c9d2df;background:#f3f6fa;color:var(--uc-ink);transform:translateY(-1px)}
.uc-dialog .uc-body{padding:30px 46px 28px;overflow-y:auto;background:#fff}.uc-dialog .uc-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px 28px}.uc-dialog .uc-field{display:grid;min-width:0;gap:10px;color:var(--uc-ink);font-size:17px;font-weight:700;line-height:1.35}.uc-dialog .uc-field>div{position:relative}.uc-dialog .uc-field input,.uc-dialog .uc-field textarea{width:100%;outline:none;border:1px solid #cfd7e4;background:#fff;color:#0c1730;transition:border-color .16s ease,box-shadow .16s ease}.uc-dialog .uc-field input{height:64px;padding:0 20px;border-radius:16px;font-size:18px;font-weight:560}.uc-dialog .uc-field input:hover,.uc-dialog .uc-field textarea:hover{border-color:#b8c4d3}.uc-dialog .uc-field input:focus,.uc-dialog .uc-field textarea:focus{border-color:var(--uc-green);box-shadow:0 0 0 4px rgba(17,168,75,.1)}.uc-dialog .uc-field input::placeholder,.uc-dialog .uc-field textarea::placeholder{color:#8a94a6;opacity:1}.uc-dialog .uc-field-readonly input{padding-right:52px;background:#f7f9fc;color:#758298}.uc-dialog .uc-field-readonly b{position:absolute;top:50%;right:18px;color:#b4becb;font-size:20px;font-weight:400;transform:translateY(-50%)}
.uc-dialog .uc-status-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}.uc-dialog .uc-status-chip{display:inline-flex;min-height:40px;align-items:center;padding:8px 16px;border-radius:999px;font-size:16px;font-weight:700}.uc-dialog .uc-role{background:#f0efff;color:#4940b8}.uc-dialog .uc-normal{background:#e9f7ee;color:#24804e}
.uc-dialog .uc-info-card{position:relative;display:flex;min-width:0;align-items:center;margin-top:22px;border:1px solid var(--uc-line);border-radius:23px;background:linear-gradient(115deg,#fff 0%,#fff 64%,#f8fcf9 100%);box-shadow:0 10px 28px rgba(39,58,88,.04)}.uc-dialog .uc-binding-card{min-height:112px;gap:18px;padding:20px 22px;overflow:hidden}.uc-dialog .uc-card-icon{display:grid;width:64px;height:64px;flex:0 0 auto;place-items:center;border-radius:50%;font-size:31px;font-weight:700}.uc-dialog .uc-card-icon-wechat{background:linear-gradient(145deg,#e9faef,#dff5e7);color:#16a448}.uc-dialog .uc-card-icon-membership{border-radius:50%;background:linear-gradient(145deg,#75c98f,#29985a);box-shadow:0 9px 24px rgba(41,152,90,.18);color:#fff}.uc-dialog .uc-card-content{min-width:0;flex:1}.uc-dialog .uc-card-content h3,.uc-dialog .uc-membership-main h3{margin:0;color:#0c1730;font-size:21px;line-height:1.3}.uc-dialog .uc-card-content p,.uc-dialog .uc-membership-main p{margin:7px 0 0;color:#53617a;font-size:15.5px;line-height:1.55}
.uc-dialog .uc-button{display:inline-flex;min-height:54px;align-items:center;justify-content:center;padding:0 27px;border-radius:16px;cursor:pointer;font-size:17px;font-weight:720;line-height:1;transition:.16s ease}.uc-dialog .uc-button:hover{transform:translateY(-1px)}.uc-dialog .uc-button:disabled{cursor:wait;opacity:.65;transform:none}.uc-dialog .uc-button-compact{min-height:50px;padding-inline:24px}.uc-dialog .uc-button-primary{background:linear-gradient(135deg,#19b254,#0b923f);box-shadow:0 11px 24px rgba(11,146,63,.2);color:#fff}.uc-dialog .uc-button-primary:hover{box-shadow:0 14px 29px rgba(11,146,63,.27)}.uc-dialog .uc-button-outline{border:1px solid #21b95b;background:#fff;color:#07823a}.uc-dialog .uc-button-outline:hover{background:#f6fcf8}.uc-dialog .uc-button-secondary{border:1px solid #cfd7e4;background:#fff;color:var(--uc-ink)}.uc-dialog .uc-button-secondary:hover{border-color:#b8c3d2;background:#f8fafc}
.uc-dialog .uc-membership-card{align-items:flex-start;gap:20px;padding:24px 24px 22px;overflow:hidden}.uc-dialog .uc-membership-card::after{position:absolute;right:-22px;bottom:-40px;width:180px;height:180px;background-image:radial-gradient(circle,#dcefe3 1.5px,transparent 1.5px);background-size:11px 11px;content:"";opacity:.45}.uc-dialog .uc-membership-main{position:relative;z-index:1;min-width:0;flex:1}.uc-dialog .uc-membership-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.uc-dialog .uc-membership-heading p{margin-top:4px}.uc-dialog .uc-meta-chips{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.uc-dialog .uc-meta-chips span{display:inline-flex;min-height:34px;align-items:center;padding:6px 11px;border-radius:10px;background:#f0f6f2;color:#5b687e;font-size:13.5px;font-weight:610}.uc-dialog .uc-membership-note{margin-top:15px!important}
.uc-dialog .uc-notes-field{margin-top:22px}.uc-dialog .uc-textarea-wrap{position:relative}.uc-dialog .uc-field textarea{min-height:108px;resize:vertical;padding:17px 18px 34px;border-radius:16px;font-size:15px;font-weight:400;line-height:1.7}.uc-dialog .uc-textarea-wrap em{position:absolute;right:16px;bottom:12px;color:#7a879a;font-size:13px;font-style:normal;font-weight:400;pointer-events:none}.uc-dialog .uc-password-card{margin-top:22px;padding:20px 22px;border:1px solid var(--uc-line);border-radius:23px;background:#f8fafc}.uc-dialog .uc-password-card h3{margin:0;color:#0c1730;font-size:18px}.uc-dialog .uc-password-card>p{margin:7px 0 18px;color:#6f7d95;font-size:13px;line-height:1.55}.uc-dialog .uc-password-grid{gap:18px}.uc-dialog .uc-password-grid .uc-field{font-size:14px}.uc-dialog .uc-password-grid .uc-field input{height:54px;font-size:15px}
.uc-dialog .kg-user-center-footer[data-uc-footer]{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:108px;padding:22px 46px;border-top:1px solid #edf1f6;background:rgba(255,255,255,.97);box-shadow:0 -10px 28px rgba(35,49,73,.035)}.uc-dialog .uc-message{min-height:0;margin:0;flex:1;font-size:13px}.uc-dialog .uc-actions{display:flex;flex:0 0 auto;gap:14px}
@media(max-width:860px){.kg-user-center-modal.uc-dialog{width:calc(100vw - 24px);max-height:calc(100vh - 24px);border-radius:24px}.uc-dialog .uc-header{min-height:118px;padding:24px 24px 20px}.uc-dialog .uc-avatar{width:68px;height:68px;border-radius:22px;font-size:28px}.uc-dialog .uc-profile-heading{gap:17px}.uc-dialog .uc-header h2{font-size:31px}.uc-dialog .uc-header p{font-size:15px}.uc-dialog .uc-body{padding:24px}.uc-dialog .uc-form-grid{grid-template-columns:1fr;gap:20px}.uc-dialog .uc-membership-heading{align-items:stretch;flex-direction:column}.uc-dialog .uc-membership-heading .uc-button{align-self:flex-start}.uc-dialog .kg-user-center-footer[data-uc-footer]{min-height:92px;padding:18px 24px}}
@media(max-width:610px){.user-center-backdrop{padding:0;align-items:stretch}.kg-user-center-modal.uc-dialog{width:100%;max-height:none;min-height:100vh;border-radius:0}.uc-dialog .uc-header{align-items:flex-start;padding:20px}.uc-dialog .uc-avatar{width:58px;height:58px;border-radius:18px;font-size:24px}.uc-dialog .uc-profile-heading{align-items:flex-start;gap:14px}.uc-dialog .uc-header h2{font-size:26px}.uc-dialog .uc-header p{margin-top:5px;font-size:13.5px}.uc-dialog .uc-close{width:44px;height:44px;border-radius:14px;font-size:28px}.uc-dialog .uc-body{padding:22px 18px}.uc-dialog .uc-field input{height:58px;font-size:16px}.uc-dialog .uc-binding-card,.uc-dialog .uc-membership-card{align-items:flex-start;flex-wrap:wrap;padding:20px}.uc-dialog .uc-binding-card .uc-button{margin-left:82px}.uc-dialog .uc-membership-card .uc-card-icon{width:54px;height:54px;font-size:26px}.uc-dialog .uc-card-content h3,.uc-dialog .uc-membership-main h3{font-size:19px}.uc-dialog .uc-card-content p,.uc-dialog .uc-membership-main p{font-size:14px}.uc-dialog .uc-meta-chips{gap:7px}.uc-dialog .uc-meta-chips span{font-size:12px}.uc-dialog .kg-user-center-footer[data-uc-footer]{align-items:stretch;flex-direction:column;padding:14px 18px}.uc-dialog .uc-message{min-height:0}.uc-dialog .uc-actions{width:100%}.uc-dialog .uc-actions .uc-button{flex:1;padding:0 12px}}

/* 当前系统使用紧凑比例，避免用户中心在工作区上显得过大。 */
.kg-user-center-modal.uc-dialog{width:min(780px,calc(100vw - 48px));max-height:calc(100vh - 72px);border-radius:26px;box-shadow:0 24px 64px rgba(16,28,51,.2),0 6px 18px rgba(16,28,51,.08)}
.uc-dialog .uc-header{min-height:108px;gap:20px;padding:21px 30px 19px}.uc-dialog .uc-profile-heading{gap:16px}.uc-dialog .uc-avatar{width:62px;height:62px;border-radius:20px;font-size:27px}.uc-dialog .uc-header h2{font-size:30px}.uc-dialog .uc-header p{margin-top:5px;font-size:14px}.uc-dialog .uc-close{width:42px;height:42px;border-radius:13px;font-size:26px}
.uc-dialog .uc-body{padding:22px 30px 20px}.uc-dialog .uc-form-grid{gap:16px 20px}.uc-dialog .uc-field{gap:7px;font-size:14px}.uc-dialog .uc-field input{height:48px;padding:0 14px;border-radius:12px;font-size:15px}.uc-dialog .uc-field-readonly input{padding-right:40px}.uc-dialog .uc-field-readonly b{right:14px;font-size:16px}.uc-dialog .uc-status-row{gap:8px;margin-top:15px}.uc-dialog .uc-status-chip{min-height:30px;padding:5px 11px;font-size:13px}
.uc-dialog .uc-info-card{margin-top:15px;border-radius:17px;box-shadow:0 6px 18px rgba(39,58,88,.035)}.uc-dialog .uc-binding-card{min-height:82px;gap:13px;padding:14px 16px}.uc-dialog .uc-card-icon{width:45px;height:45px;font-size:22px}.uc-dialog .uc-card-content h3,.uc-dialog .uc-membership-main h3{font-size:16px}.uc-dialog .uc-card-content p,.uc-dialog .uc-membership-main p{margin-top:4px;font-size:13px;line-height:1.45}.uc-dialog .uc-button{min-height:40px;padding:0 16px;border-radius:12px;font-size:14px}.uc-dialog .uc-button-compact{min-height:38px;padding-inline:14px}
.uc-dialog .uc-membership-card{gap:14px;padding:16px}.uc-dialog .uc-meta-chips{gap:6px;margin-top:11px}.uc-dialog .uc-meta-chips span{min-height:27px;padding:4px 8px;border-radius:8px;font-size:11.5px}.uc-dialog .uc-membership-note{margin-top:9px!important}.uc-dialog .uc-notes-field{margin-top:15px}.uc-dialog .uc-field textarea{min-height:78px;padding:12px 14px 29px;border-radius:12px;font-size:13px}.uc-dialog .uc-textarea-wrap em{right:12px;bottom:9px;font-size:11px}
.uc-dialog .uc-password-card{margin-top:15px;padding:15px 16px;border-radius:17px}.uc-dialog .uc-password-card h3{font-size:15px}.uc-dialog .uc-password-card>p{margin:4px 0 12px;font-size:12px}.uc-dialog .uc-password-grid{gap:12px}.uc-dialog .uc-password-grid .uc-field input{height:44px;font-size:13px}.uc-dialog .kg-user-center-footer[data-uc-footer]{min-height:72px;padding:14px 30px}.uc-dialog .uc-message{font-size:12px}.uc-dialog .uc-actions{gap:10px}
@media(max-width:860px){.kg-user-center-modal.uc-dialog{max-height:calc(100vh - 32px)}.uc-dialog .uc-header{padding:18px 22px}.uc-dialog .uc-body{padding:20px 22px}.uc-dialog .kg-user-center-footer[data-uc-footer]{padding:13px 22px}}

/* 第二轮紧凑化：与工作区的字号和密度保持一致。 */
.kg-user-center-modal.uc-dialog{width:min(740px,calc(100vw - 48px));max-height:calc(100vh - 96px);border-radius:23px}.uc-dialog .uc-header{min-height:94px;padding:17px 26px 15px}.uc-dialog .uc-avatar{width:54px;height:54px;border-radius:17px;font-size:23px}.uc-dialog .uc-header h2{font-size:26px}.uc-dialog .uc-header p{font-size:12.5px}.uc-dialog .uc-close{width:38px;height:38px;font-size:23px}.uc-dialog .uc-body{padding:18px 26px}.uc-dialog .uc-form-grid{gap:13px 16px}.uc-dialog .uc-field{font-size:13px}.uc-dialog .uc-field input{height:44px;font-size:14px}.uc-dialog .uc-status-chip{font-size:12px}.uc-dialog .uc-card-content h3,.uc-dialog .uc-membership-main h3{font-size:15px}.uc-dialog .uc-card-content p,.uc-dialog .uc-membership-main p{font-size:12px}.uc-dialog .uc-button{min-height:36px;font-size:13px}.uc-dialog .uc-button-compact{min-height:35px}.uc-dialog .uc-meta-chips span{font-size:11px}.uc-dialog .uc-field textarea{font-size:12px}.uc-dialog .uc-password-card h3{font-size:14px}.uc-dialog .uc-password-card>p,.uc-dialog .uc-message{font-size:11px}.uc-dialog .kg-user-center-footer[data-uc-footer]{min-height:64px;padding:12px 26px}
.dialog-close .modal-close-icon{display:block;width:18px;height:18px;margin:0;background-image:url('../assets/membership-ui/icons/close.svg');background-position:center;background-repeat:no-repeat;background-size:contain}
/* style: styles/membership-ui.css */
/* 会员中心成品稿：所有规则限定在会员弹窗内，避免影响图谱工作区。 */
.membership-ui-backdrop{z-index:2147483300;background:rgba(29,42,58,.42);backdrop-filter:blur(8px)}
.membership-ui{--green:#16a34a;--green-2:#22c55e;--green-dark:#15803d;--green-soft:#eaf9ee;--ink:#142744;--text:#5b6f89;--muted:#8494a9;--line:#dce5ee;--line-soft:#ebf0f5;--shadow-md:0 14px 32px rgba(26,46,73,.11);--shadow-lg:0 18px 42px rgba(21,41,67,.14);box-sizing:border-box;width:min(1080px,calc(100vw - 44px));max-height:calc(100vh - 58px);padding:22px 26px 20px;overflow:auto;border:1px solid rgba(255,255,255,.78);border-radius:26px;background:linear-gradient(145deg,#fff,#fbfcfd);box-shadow:0 24px 64px rgba(14,29,48,.28);color:var(--ink);font-family:inherit}
.membership-ui *, .membership-ui *::before, .membership-ui *::after{box-sizing:border-box}
.membership-ui button{font:inherit}
.membership-ui .modal-header{display:flex;align-items:center;justify-content:space-between;gap:24px}
.membership-ui .brand{display:flex;flex-direction:row;align-items:center;gap:18px;margin-right:0;min-width:0}
.membership-ui .brand-mark{display:grid;width:54px;height:54px;flex:0 0 auto;place-items:center;border-radius:18px;background:linear-gradient(145deg,var(--green-2),var(--green-dark));box-shadow:0 11px 24px rgba(22,163,74,.22);color:#fff;font-size:25px;font-weight:900}
.membership-ui .brand-title{margin:0;color:var(--ink);font-size:clamp(26px,2vw,32px);font-weight:900;line-height:1.1;letter-spacing:-.03em}
.membership-ui .brand-copy{margin:6px 0 0;color:var(--text);font-size:14px;line-height:1.5}
.membership-ui .icon{display:inline-block;width:1.2em;height:1.2em;flex:0 0 auto;background:center/contain no-repeat;vertical-align:-.18em}
.membership-ui .i-arrow-left{background-image:url('../assets/membership-ui/icons/arrow-left.svg')}.membership-ui .i-card{background-image:url('../assets/membership-ui/icons/card.svg')}.membership-ui .i-check-circle{background-image:url('../assets/membership-ui/icons/check-circle.svg')}.membership-ui .i-chevron-right{background-image:url('../assets/membership-ui/icons/chevron-right.svg')}.membership-ui .i-clock{background-image:url('../assets/membership-ui/icons/clock.svg')}.membership-ui .i-close{background-image:url('../assets/membership-ui/icons/close.svg')}.membership-ui .i-infinity{background-image:url('../assets/membership-ui/icons/infinity.svg')}.membership-ui .i-info{background-image:url('../assets/membership-ui/icons/info.svg')}.membership-ui .i-money{background-image:url('../assets/membership-ui/icons/money.svg')}.membership-ui .i-qr-code{background-image:url('../assets/membership-ui/icons/qr-code.svg')}.membership-ui .i-receipt{background-image:url('../assets/membership-ui/icons/receipt.svg')}.membership-ui .i-refresh{background-image:url('../assets/membership-ui/icons/refresh.svg')}.membership-ui .i-scan{background-image:url('../assets/membership-ui/icons/scan.svg')}.membership-ui .i-shield-check{background-image:url('../assets/membership-ui/icons/shield-check.svg')}.membership-ui .i-star{background-image:url('../assets/membership-ui/icons/star.svg')}.membership-ui .i-ticket{background-image:url('../assets/membership-ui/icons/ticket.svg')}.membership-ui .i-user{background-image:url('../assets/membership-ui/icons/user.svg')}.membership-ui .i-wallet{background-image:url('../assets/membership-ui/icons/wallet.svg')}.membership-ui .i-wechat{background-image:url('../assets/membership-ui/icons/wechat.svg')}
.membership-ui .icon-button{/* display:grid; */width:46px;height:46px;flex:0 0 auto;place-items:center;border:1px solid var(--line-soft);border-radius:15px;background:#f3f6f9;cursor:pointer;transition:.18s ease}.membership-ui .icon-button:hover{background:#fff;box-shadow:var(--shadow-md);transform:translateY(-1px)}.membership-ui .icon-button .icon{width:21px;height:21px}
.membership-ui .divider{height:1px;margin:20px 0 18px;background:var(--line-soft)}
.membership-ui .kg-subscription-detail-body{padding:0;overflow:visible}
.membership-ui .plans-grid{display:flex;gap:16px;overflow-x:auto;overflow-y:hidden;margin-top:-14px;padding:14px 2px 14px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#b9c8d5 transparent}
.membership-ui .plan-card{position:relative;display:flex;min-height:340px;flex:0 0 300px;flex-direction:column;padding:22px;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#fff,#fcfefd);box-shadow:0 8px 22px rgba(24,44,70,.05);scroll-snap-align:start;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.membership-ui .plan-card:hover{transform:translateY(-5px);border-color:#9bdcb0;box-shadow:0 12px 26px rgba(24,44,70,.10)}
.membership-ui .plan-card.featured{border:2px solid var(--green-2);background:radial-gradient(circle at 78% 17%,rgba(34,197,94,.12),transparent 31%),linear-gradient(180deg,#fff,#f7fff9);box-shadow:0 18px 42px rgba(22,163,74,.15)}
.membership-ui .plan-card.featured::before{display:none}
.membership-ui .plan-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.membership-ui .plan-title{margin:0;color:var(--ink);font-size:24px;line-height:1.2}.membership-ui .plan-price{display:flex;align-items:baseline;gap:10px;margin-top:18px}.membership-ui .plan-price strong{color:var(--green);font-size:31px;line-height:1}.membership-ui .plan-price del{color:#9aa9bc;font-size:16px;font-weight:700}.membership-ui .plan-desc{margin:14px 0 0;color:var(--text);font-size:15px}.membership-ui .plan-rule{margin:19px 0;border-top:1px dashed var(--line)}
.membership-ui .benefit-line{display:flex;align-items:center;gap:10px;color:#293f5e;font-size:14px}.membership-ui .benefit-dot{width:6px;height:6px;flex:0 0 auto;border-radius:50%;background:var(--green-2);box-shadow:0 0 0 4px var(--green-soft)}.membership-ui .feature-chip{display:flex;align-items:center;gap:8px;margin-top:16px;padding:10px 12px;border:1px solid var(--line-soft);border-radius:12px;background:#f7f9fb;color:#475c77;font-size:13px;line-height:1.35}.membership-ui .feature-chip .icon{filter:none}
.membership-ui .btn{display:inline-flex;min-height:46px;align-items:center;justify-content:center;gap:8px;padding:0 20px;border:0;border-radius:13px;cursor:pointer;color:var(--ink);font-size:15px;font-weight:800;text-decoration:none;transition:.18s ease}.membership-ui .btn:hover{transform:translateY(-1px)}.membership-ui .btn:disabled{cursor:wait;opacity:.68;transform:none}.membership-ui .btn-primary{background:linear-gradient(135deg,var(--green-2),var(--green-dark));box-shadow:0 9px 20px rgba(22,163,74,.20);color:#fff}.membership-ui .btn-primary .i-chevron-right{filter:brightness(0) invert(1)}.membership-ui .btn-primary:hover{box-shadow:0 13px 26px rgba(22,163,74,.27)}.membership-ui .btn-secondary{border:1px solid var(--line);background:#fff;box-shadow:0 4px 12px rgba(27,49,76,.04)}.membership-ui .btn-secondary:hover{border-color:#c7d3df;box-shadow:var(--shadow-md)}.membership-ui .plan-card .btn{width:100%;margin-top:auto}.membership-ui .current-btn{border:1px solid #bfe6ca;background:#fff;color:var(--green-dark)}
.membership-ui .pill{display:inline-flex;min-height:32px;align-items:center;gap:6px;padding:0 12px;border:1px solid #c4e9cf;border-radius:999px;background:var(--green-soft);color:var(--green-dark);font-size:13px;font-weight:800;white-space:nowrap}.membership-ui .pill-warning{border-color:#f7d7ad;background:#fff5e9;color:#cf7410}.membership-ui .pill-solid{border-color:transparent;background:linear-gradient(135deg,var(--green-2),var(--green-dark));box-shadow:0 10px 22px rgba(22,163,74,.18);color:#fff}
.membership-ui .plan-card.checkout-selected{border-color:#fb7b35;background:radial-gradient(circle at 78% 17%,rgba(251,146,60,.12),transparent 31%),linear-gradient(180deg,#fff,#fffaf5);box-shadow:0 16px 34px rgba(234,88,12,.16)}.membership-ui .plan-card.checkout-selected .btn{background:linear-gradient(135deg,#fb923c,#ea580c);box-shadow:0 9px 20px rgba(234,88,12,.22)}
.membership-ui .membership-checkout{display:grid;grid-template-columns:190px minmax(0,1fr) auto;align-items:center;gap:24px;margin-top:16px;padding:18px 20px;border:1px solid #fed7aa;border-radius:18px;background:linear-gradient(105deg,#fff8f1,#fff 47%,#f4fbf5);box-shadow:0 16px 34px rgba(124,45,18,.10)}.membership-ui .membership-checkout[hidden]{display:none}.membership-ui .checkout-qr{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px}.membership-ui .checkout-qr .payment-tag{grid-column:1/-1;justify-self:start}.membership-ui .checkout-qr .qr-frame{width:116px;margin:0;padding:7px;border-radius:12px;box-shadow:none}.membership-ui .checkout-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;align-items:center;min-width:0}.membership-ui .checkout-plan-name{margin:3px 0 0;font-size:22px;line-height:1.2}.membership-ui .checkout-help{margin:5px 0 0;color:var(--text);font-size:12px;line-height:1.5}.membership-ui .checkout-amount{min-width:124px;text-align:right}.membership-ui .checkout-amount span{display:block;color:var(--muted);font-size:12px;font-weight:700}.membership-ui .checkout-amount strong{display:block;margin-top:3px;color:#ea580c;font-size:34px;line-height:1;letter-spacing:-.035em}.membership-ui .checkout-meta{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:9px 16px;padding-top:9px;border-top:1px dashed #f3cba7;color:var(--muted);font-size:11px}.membership-ui .checkout-meta #nativePayStatus{color:#d97706;font-weight:800}.membership-ui .checkout-actions{display:flex;min-width:112px;flex-direction:column;gap:8px}.membership-ui .checkout-actions .btn{min-height:36px;white-space:nowrap}
.membership-ui .redeem{display:grid;grid-template-columns:auto minmax(200px,1fr) auto;align-items:center;gap:16px;margin-top:18px;padding:15px 18px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-md)}.membership-ui .redeem-intro{display:flex;min-width:210px;align-items:center;gap:11px;padding-right:18px;border-right:1px solid var(--line-soft)}.membership-ui .redeem-icon{display:grid;width:38px;height:38px;place-items:center;border-radius:12px;background:linear-gradient(145deg,var(--green-2),var(--green-dark));box-shadow:0 8px 16px rgba(22,163,74,.16);color:#fff}.membership-ui .redeem-title{margin:0;font-size:16px}.membership-ui .redeem-copy{margin:3px 0 0;color:var(--muted);font-size:12px}.membership-ui .redeem-input{width:100%;height:46px;padding:0 13px;border:1px solid var(--line);border-radius:12px;outline:none;background:#fff;color:var(--ink);font:inherit;font-size:14px;transition:.18s ease}.membership-ui .redeem-input:focus{border-color:#88d5a1;box-shadow:0 0 0 4px rgba(34,197,94,.11)}.membership-ui .redeem-message{grid-column:2/-1;min-height:0;color:#dc2626;font-size:13px;font-weight:700}.membership-ui .redeem-message.ok{color:var(--green)}
.membership-ui .footnote{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:16px;color:var(--muted);font-size:12px}.membership-ui .footnote .icon{width:16px;height:16px}
.membership-ui .toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.membership-ui .back-button{display:inline-flex;min-height:44px;align-items:center;gap:8px;padding:0 17px;border:1px solid var(--line);border-radius:999px;background:#fff;box-shadow:0 5px 14px rgba(25,43,66,.04);color:var(--ink);cursor:pointer;font-size:15px;font-weight:800;transition:.18s ease}.membership-ui .back-button:hover{border-color:#c9d5e1;box-shadow:var(--shadow-md);transform:translateY(-1px)}
.membership-ui .confirm-card{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.95fr);overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow-md)}.membership-ui .confirm-main{padding:24px 28px 22px}.membership-ui .confirm-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.membership-ui .kicker{margin:0 0 6px;color:var(--text);font-size:13px;font-weight:800;letter-spacing:.04em}.membership-ui .confirm-title{margin:0;color:var(--ink);font-size:30px;line-height:1.15}.membership-ui .confirm-price{display:flex;align-items:baseline;gap:10px;margin-top:17px}.membership-ui .confirm-price strong{color:var(--green);font-size:34px}.membership-ui .confirm-price del{color:#9aa9be;font-size:16px;font-weight:700}.membership-ui .confirm-help{max-width:790px;margin:9px 0 0;color:var(--text);font-size:14px;line-height:1.65}
.membership-ui .meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.membership-ui .meta-card{display:flex;min-width:0;align-items:center;gap:9px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fff}.membership-ui .meta-icon{display:grid;width:35px;height:35px;flex:0 0 auto;place-items:center;border-radius:11px;background:#f4f7fa}.membership-ui .meta-icon .icon{width:18px;height:18px}.membership-ui .meta-icon.green{background:var(--green-soft)}.membership-ui .meta-label{color:var(--muted);font-size:11px;font-weight:700}.membership-ui .meta-value{margin-top:2px;overflow:hidden;color:var(--ink);font-size:12px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.membership-ui .benefits{margin-top:18px}.membership-ui .section-title{margin:0 0 9px;font-size:14px}.membership-ui .benefit-item{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:10px;background:linear-gradient(90deg,#f6f8fb,#fbfcfd);color:#2c4360;font-size:14px}.membership-ui .benefit-item+.benefit-item{margin-top:7px}.membership-ui .benefit-item .icon{width:17px;height:17px}.membership-ui .usage-item{font-size:12px}
.membership-ui .guide{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;border-left:1px solid var(--line-soft);background:radial-gradient(circle at 50% 30%,rgba(34,197,94,.10),transparent 38%),linear-gradient(180deg,#fff,#fbfefc);text-align:center}.membership-ui .guide-visual{position:relative;display:grid;width:190px;height:150px;place-items:center;margin-bottom:8px}.membership-ui .guide-browser{position:relative;width:150px;height:100px;border:1px solid #d7eadf;border-radius:15px;background:#fff;box-shadow:var(--shadow-md)}.membership-ui .guide-browser::before{position:absolute;inset:0 0 auto;height:24px;border-radius:15px 15px 0 0;background:linear-gradient(90deg,var(--green-2),#70d895);content:''}.membership-ui .guide-browser::after{position:absolute;top:42px;left:18px;width:48px;height:22px;border-radius:6px;background:#dff4e6;box-shadow:62px 0 0 #eef7f1,0 34px 0 #42bf6d,62px 34px 0 #eef7f1;content:''}.membership-ui .guide-wechat{position:absolute;right:2px;bottom:6px;display:grid;width:66px;height:66px;place-items:center;border:5px solid #fff;border-radius:50%;background:linear-gradient(145deg,var(--green-2),var(--green-dark));box-shadow:0 15px 32px rgba(22,163,74,.23)}.membership-ui .guide-wechat .icon{width:34px;height:34px;filter:brightness(0) invert(1)}.membership-ui .guide-title{margin:7px 0 0;font-size:23px}.membership-ui .guide-copy{margin:8px 0 0;color:var(--text);font-size:14px}.membership-ui .steps{display:grid;width:100%;grid-template-columns:1fr auto 1fr auto 1fr;align-items:start;gap:8px;margin-top:23px}.membership-ui .step-icon{display:grid;width:50px;height:50px;margin:0 auto 8px;place-items:center;border-radius:50%;background:var(--green-soft)}.membership-ui .step-icon .icon{width:22px;height:22px}.membership-ui .step-title{color:var(--ink);font-size:12px;font-weight:800}.membership-ui .step-copy{margin-top:4px;color:var(--muted);font-size:11px}.membership-ui .step-arrow{display:grid;height:50px;place-items:center}.membership-ui .step-arrow .icon{width:18px;height:18px}.membership-ui .confirm-actions{display:flex;justify-content:flex-end;gap:14px;margin-top:20px}
.membership-ui .payment-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.95fr);gap:18px}.membership-ui .payment-card{position:relative;min-height:430px;padding:23px 26px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow-md)}.membership-ui .payment-card--qr{display:flex;flex-direction:column;align-items:center}.membership-ui .payment-card-head{width:100%}.membership-ui .payment-tag{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #c8ead2;border-radius:9px;background:var(--green-soft);color:var(--green-dark);font-size:13px;font-weight:800}.membership-ui .payment-tag .icon{width:16px;height:16px}.membership-ui .payment-title{margin:11px 0 0;font-size:29px;line-height:1.15}.membership-ui .payment-help{margin:7px 0 0;color:var(--text);font-size:14px;line-height:1.55}.membership-ui .qr-frame{display:grid;width:min(245px,100%);aspect-ratio:1;place-items:center;margin:16px auto 0;padding:13px;border:1px solid #bce7ca;border-radius:18px;background:linear-gradient(145deg,#f9fffb,#edf9f1);box-shadow:0 14px 32px rgba(22,163,74,.10)}.membership-ui .qr-frame img{width:100%;height:100%;padding:8px;border-radius:12px;background:#fff;object-fit:contain}.membership-ui .wechat-hint{display:flex;align-items:center;gap:10px;width:min(350px,100%);margin-top:13px;padding:10px 13px;border:1px solid #ccebd5;border-radius:12px;background:linear-gradient(90deg,#f0faf3,#f8fcf9)}.membership-ui .wechat-hint-icon{display:grid;width:38px;height:38px;flex:0 0 auto;place-items:center;border-radius:50%;background:linear-gradient(145deg,var(--green-2),var(--green-dark))}.membership-ui .wechat-hint-icon .icon{width:21px;height:21px;filter:brightness(0) invert(1)}.membership-ui .wechat-hint strong{display:block;font-size:13px}.membership-ui .wechat-hint span{display:block;margin-top:2px;color:var(--text);font-size:12px}
.membership-ui .payment-summary{display:flex;flex-direction:column}.membership-ui .summary-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.membership-ui .summary-label{margin:0;color:var(--text);font-size:16px;font-weight:800}.membership-ui .summary-amount{margin:20px 0 0;color:var(--green);font-size:52px;font-weight:900;line-height:1;letter-spacing:-.035em}.membership-ui .summary-divider{margin:31px 0 16px;border-top:1px dashed var(--line)}.membership-ui .summary-list{margin:0}.membership-ui .summary-row{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;gap:18px;min-height:66px;border-bottom:1px solid var(--line-soft)}.membership-ui .summary-row:last-child{border-bottom:0}.membership-ui .summary-key{display:flex;align-items:center;gap:11px;color:#405671;font-weight:700}.membership-ui .summary-key .icon{width:20px;height:20px}.membership-ui .summary-value{min-width:0;margin:0;overflow-wrap:anywhere;color:var(--ink);text-align:right;font-weight:700}.membership-ui .summary-value.green{color:var(--green);font-size:17px}.membership-ui .summary-note{display:flex;align-items:center;gap:10px;margin-top:auto;padding:15px 16px;border:1px solid var(--line);border-radius:14px;background:#f7f9fb;color:var(--text)}.membership-ui .summary-note .icon{width:20px;height:20px}.membership-ui .payment-actions{display:flex;justify-content:flex-end;gap:14px;margin-top:22px}
/* 支付视图不能 overflow:hidden：内容超过 max-height 时二维码会被截断且无法滚动，保持与 .membership-ui 基础规则一致的 overflow:auto。 */
.membership-ui.is-payment-view{width:min(980px,calc(100vw - 44px));overflow:auto}.membership-ui.is-payment-view .divider{margin:14px 0}.membership-ui.is-payment-view .payment-card{min-height:360px;padding:20px 22px}.membership-ui.is-payment-view .qr-frame{width:min(220px,100%);margin-top:12px}.membership-ui.is-payment-view .wechat-hint{margin-top:10px}.membership-ui.is-payment-view .summary-amount{margin-top:12px;font-size:40px}.membership-ui.is-payment-view .summary-divider{margin:20px 0 9px}.membership-ui.is-payment-view .summary-row{min-height:49px;grid-template-columns:120px minmax(0,1fr);gap:10px}.membership-ui.is-payment-view .summary-key{font-size:14px}.membership-ui.is-payment-view .summary-note{margin-top:12px;padding:11px 12px;font-size:13px}.membership-ui.is-payment-view .payment-actions{margin-top:14px}.membership-ui.is-payment-view .footnote{margin-top:12px}
.membership-ui .payment-success{display:flex;min-height:380px;align-items:center;flex-direction:column;justify-content:center;padding:46px 30px;border:1px solid var(--line);border-radius:24px;background:radial-gradient(circle at 50% 20%,rgba(34,197,94,.15),transparent 28%),#fff;box-shadow:var(--shadow-md);text-align:center}.membership-ui .success-icon{display:grid;width:82px;height:82px;place-items:center;border-radius:50%;background:var(--green-soft);box-shadow:0 0 0 12px rgba(34,197,94,.08)}.membership-ui .success-icon .icon{width:46px;height:46px}.membership-ui .payment-success h3{margin:24px 0 0;font-size:32px}.membership-ui .payment-success p{margin:10px 0 0;color:var(--text);font-size:16px}.membership-ui .success-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:25px 0}.membership-ui .success-meta span{padding:9px 12px;border-radius:999px;background:#f6f8fb;color:#405671;font-size:13px;font-weight:700}
@media(max-width:1180px){.membership-ui{width:min(880px,calc(100vw - 36px))}.membership-ui .plan-card{min-height:320px;flex-basis:280px}.membership-ui .confirm-card,.membership-ui .payment-grid{grid-template-columns:1fr}.membership-ui .guide{border-top:1px solid var(--line-soft);border-left:0}.membership-ui .payment-card{min-height:auto}}
@media(max-width:760px){.membership-ui-backdrop{align-items:stretch;padding:0}.membership-ui{width:100%;max-height:none;min-height:100vh;padding:24px 18px;border:0;border-radius:0}.membership-ui .brand{gap:13px}.membership-ui .brand-mark{width:54px;height:54px;border-radius:17px;font-size:26px}.membership-ui .brand-title{font-size:27px}.membership-ui .brand-copy{font-size:14px}.membership-ui .icon-button{width:46px;height:46px;border-radius:14px}.membership-ui .divider{margin:21px 0 18px}.membership-ui .redeem{grid-template-columns:1fr}.membership-ui .redeem-intro{min-width:0;padding-right:0;padding-bottom:16px;border-right:0;border-bottom:1px solid var(--line-soft)}.membership-ui .redeem-message{grid-column:auto}.membership-ui .meta-grid{grid-template-columns:1fr}.membership-ui .confirm-main{padding:24px 20px}.membership-ui .guide{padding:26px 18px}.membership-ui .steps{grid-template-columns:1fr;gap:14px}.membership-ui .step-arrow{display:none}.membership-ui .confirm-actions,.membership-ui .payment-actions{flex-direction:column-reverse}.membership-ui .confirm-actions .btn,.membership-ui .payment-actions .btn{width:100%}.membership-ui .payment-card{padding:25px 20px}.membership-ui .summary-row{grid-template-columns:1fr;gap:7px;padding:13px 0}.membership-ui .summary-value{text-align:left}}

/* 第二轮紧凑化：会员页在工作区内使用更轻量的字级与卡片尺寸。 */
.membership-ui{width:min(920px,calc(100vw - 44px));max-height:calc(100vh - 88px);padding:18px 20px 16px;border-radius:22px}.membership-ui .modal-header{gap:16px}.membership-ui .brand{gap:13px}.membership-ui .brand-mark{width:46px;height:46px;border-radius:15px;font-size:21px}.membership-ui .brand-title{font-size:24px}.membership-ui .brand-copy{margin-top:4px;font-size:12.5px}.membership-ui .icon-button{width:40px;height:40px;border-radius:12px}.membership-ui .icon-button .icon{width:18px;height:18px}.membership-ui .divider{margin:15px 0 13px}.membership-ui .plans-grid{gap:12px;margin-top:-10px;padding:10px 2px}.membership-ui .plan-card{min-height:280px;flex-basis:260px;padding:16px;border-radius:16px}.membership-ui .plan-title{font-size:20px}.membership-ui .plan-price{gap:7px;margin-top:13px}.membership-ui .plan-price strong{font-size:26px}.membership-ui .plan-price del{font-size:13px}.membership-ui .plan-desc{margin-top:10px;font-size:13px}.membership-ui .plan-rule{margin:13px 0}.membership-ui .benefit-line{gap:8px;font-size:12.5px}.membership-ui .feature-chip{gap:6px;margin-top:11px;padding:7px 9px;border-radius:9px;font-size:11.5px}.membership-ui .btn{min-height:40px;gap:6px;padding:0 14px;border-radius:11px;font-size:13px}.membership-ui .pill{min-height:28px;padding:0 9px;font-size:11.5px}.membership-ui .redeem{gap:12px;margin-top:13px;padding:12px 14px;border-radius:13px}.membership-ui .redeem-intro{min-width:180px;gap:8px;padding-right:13px}.membership-ui .redeem-icon{width:32px;height:32px;border-radius:10px}.membership-ui .redeem-title{font-size:14px}.membership-ui .redeem-copy,.membership-ui .redeem-message{font-size:11px}.membership-ui .redeem-input{height:40px;border-radius:10px;font-size:12.5px}.membership-ui .footnote{margin-top:11px;font-size:11px}
.membership-ui .toolbar{margin-bottom:11px}.membership-ui .back-button{min-height:38px;padding:0 13px;font-size:13px}.membership-ui .confirm-card{border-radius:16px}.membership-ui .confirm-main{padding:18px 20px}.membership-ui .confirm-title{font-size:24px}.membership-ui .confirm-price{margin-top:12px}.membership-ui .confirm-price strong{font-size:28px}.membership-ui .confirm-help{font-size:12.5px}.membership-ui .benefits{margin-top:13px}.membership-ui .section-title{font-size:13px}.membership-ui .benefit-item{padding:7px 9px;font-size:12px}.membership-ui .guide{padding:20px}.membership-ui .guide-title{font-size:19px}.membership-ui .guide-copy{font-size:12px}.membership-ui .payment-grid{gap:13px}.membership-ui .payment-card{min-height:340px;padding:17px 19px;border-radius:16px}.membership-ui .payment-tag{font-size:11.5px}.membership-ui .payment-title{font-size:24px}.membership-ui .payment-help{font-size:12.5px}.membership-ui .qr-frame{width:min(195px,100%);margin-top:12px;padding:10px;border-radius:14px}.membership-ui .wechat-hint{margin-top:9px;padding:8px 10px;font-size:12px}.membership-ui .summary-label{font-size:13px}.membership-ui .summary-amount{margin-top:13px;font-size:40px}.membership-ui .summary-row{grid-template-columns:122px minmax(0,1fr);min-height:51px;gap:12px;font-size:13px}.membership-ui .summary-value.green{font-size:15px}.membership-ui .summary-note{padding:10px 11px;font-size:12px}.membership-ui .payment-actions{gap:10px;margin-top:14px}.membership-ui.is-payment-view{width:min(860px,calc(100vw - 44px))}.membership-ui.is-payment-view .payment-card{min-height:310px;padding:16px 18px}.membership-ui.is-payment-view .qr-frame{width:min(180px,100%)}.membership-ui.is-payment-view .summary-amount{font-size:34px}
@media(max-width:1180px){.membership-ui{width:min(820px,calc(100vw - 36px))}}
@media(max-width:760px){.membership-ui{width:100%;max-height:none;min-height:100vh;padding:18px 14px}.membership-ui .brand-mark{width:42px;height:42px;font-size:19px}.membership-ui .brand-title{font-size:22px}.membership-ui .brand-copy{font-size:12px}.membership-ui .plan-card{flex-basis:238px}.membership-ui.is-payment-view{width:100%}}

/* Native payment follows the supplied compact checkout: one prominent code and passive status only. */
.membership-ui .membership-checkout{grid-template-columns:236px minmax(0,1fr);gap:20px;padding:16px 18px}
.membership-ui .checkout-qr{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px}
.membership-ui .checkout-qr .payment-tag{align-self:center;font-size:11px}
.membership-ui .checkout-qr .qr-frame{width:220px;margin:0;padding:8px;border-radius:10px}
.membership-ui .checkout-plan-name{font-size:18px}
.membership-ui .checkout-help{font-size:11px}
.membership-ui .checkout-amount span{font-size:10px}
.membership-ui .checkout-amount strong{font-size:30px}
.membership-ui .checkout-meta{gap:6px 12px;padding-top:7px;font-size:10px}
@media(max-width:760px){.membership-ui .membership-checkout{grid-template-columns:1fr}.membership-ui .checkout-qr .qr-frame{width:min(220px,72vw)}}
/* style: styles/account-menu.css */
/*
 * C-1.2：右上角账号胶囊与下拉菜单。
 * 保留胶囊入口，移除外置“使用说明 / 退出”按钮。
 */
.account-menu-shell{
  position:relative;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
}
.account-menu-trigger{
  appearance:none;
  border:0;
  cursor:pointer;
  min-height:38px;
  max-width:220px;
  padding:0 11px;
  color:var(--role-text,#334155);
  justify-content:center;
  text-align:center;
  transition:box-shadow .16s ease,background .16s ease,transform .16s ease;
}
.account-menu-trigger:hover,
.account-menu-trigger:focus-visible,
.account-menu-shell.is-open .account-menu-trigger{
  transform:none;
  outline:none;
  background:#fff;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--role-primary,#2563eb) 24%,transparent),0 8px 22px rgba(15,23,42,.10);
}
.auth-status-label{
  min-width:0;
  max-width:150px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.account-menu-chevron{
  flex:0 0 auto;
  width:16px;
  height:16px;
  margin-left:2px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.7;
  transition:transform .16s ease;
}
.account-menu-chevron .kg-icon{width:100%;height:100%}
.account-menu-shell.is-open .account-menu-chevron{transform:rotate(180deg)}
.account-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:160;
  width:218px;
  padding:8px;
  border:1px solid rgba(148,163,184,.24);
  border-radius:15px;
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 50px rgba(15,23,42,.18),0 2px 8px rgba(15,23,42,.06);
  backdrop-filter:blur(18px);
  transform-origin:top right;
  animation:accountMenuIn .14s ease-out;
}
.account-menu[hidden]{display:none!important}
@keyframes accountMenuIn{
  from{opacity:0;transform:translateY(-4px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.account-menu-item{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:0 11px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#334155;
  box-shadow:none;
  font-size:13px;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}
.account-menu-item:hover,
.account-menu-item:focus-visible{
  transform:none;
  outline:none;
  background:#f1f5f9;
  color:#0f172a;
  box-shadow:none;
}
.account-menu-item svg{
  flex:0 0 auto;
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.account-menu-separator{
  height:1px;
  margin:7px 4px;
  background:#e2e8f0;
}
.account-menu-session.is-logout{color:#dc2626}
.account-menu-session.is-logout:hover,
.account-menu-session.is-logout:focus-visible{background:#fef2f2;color:#b91c1c}
.account-menu-session.is-login{color:var(--role-primary,#2563eb)}
.account-hidden-trigger{display:none!important}

@media(max-width:620px){
  .account-menu-trigger{max-width:150px;padding:0 9px}
  .auth-status-label{max-width:94px}
  .account-menu{position:fixed;top:calc(var(--graph-tabbar-height,46px) + 66px);right:8px;width:min(250px,calc(100vw - 16px))}
}

/* C-1.4.4：账号菜单新增会员入口，并避免旧样式额外绘制第二个箭头。 */
.account-menu-trigger::after{display:none!important}
.account-menu-upgrade{display:none;color:#b45309}
.account-menu-upgrade:hover,
.account-menu-upgrade:focus-visible{background:#fff7ed;color:#c2410c}

/*
 * 移动端 / 触摸设备：账号入口固定吸附在屏幕上边缘。
 * 视觉文字统一压缩为两个字：账号、用户、帮助、升级、登录/退出。
 */
@media (max-width:850px),(pointer:coarse),(hover:none){
  .account-menu-shell{
    position:relative;
    display:inline-flex;
    align-items:center;
  }
  .account-menu-trigger{
    display:inline-flex!important;
    width:58px;
    min-width:58px;
    max-width:58px;
    min-height:30px;
    height:30px;
    justify-content:center;
    gap:3px;
    padding:0 7px;
    border-radius:9px;
    color:var(--role-text,#334155);
    background:rgba(255,255,255,.96);
    box-shadow:0 0 0 1px rgba(148,163,184,.25),0 3px 12px rgba(15,23,42,.10);
  }
  .account-menu-trigger::before{
    content:"账号";
    display:block;
    font-size:12px;
    font-weight:900;
    line-height:1;
    white-space:nowrap;
  }
  .account-menu-trigger .role-dot,
  .account-menu-trigger .auth-status-label{display:none!important}
  .account-menu-chevron{
    width:13px;
    height:13px;
    margin-left:0;
  }
  .account-menu{
    position:fixed;
    top:calc(var(--graph-tabbar-height,38px) + 5px);
    right:6px;
    z-index:260;
    width:126px;
    max-height:calc(100dvh - var(--graph-tabbar-height,38px) - 12px);
    padding:6px;
    overflow-y:auto;
    border-radius:13px;
    transform-origin:top right;
  }
  .account-menu-upgrade{display:flex}
  .account-menu-item{
    min-height:40px;
    justify-content:center;
    gap:0;
    padding:0 8px;
    font-size:13px;
    text-align:center;
  }
  .account-menu-item svg{display:none}
  .account-menu-item span{
    display:block;
    font-size:0;
    line-height:1;
  }
  .account-menu-item span::after{
    content:attr(data-mobile-label);
    font-size:13px;
    font-weight:900;
  }
  .account-menu-separator{margin:5px 3px}
}

/* Learning path menu setting row */
.account-menu-setting-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 11px;
  border-radius:10px;
  color:#334155;
}
.account-menu-setting-row:hover{background:#f8fafc}
.account-menu-setting-label{font-size:12px;font-weight:800;color:#475569}
.account-menu-toggle{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.account-menu-toggle input{position:absolute;opacity:0;pointer-events:none}
.account-menu-toggle-ui{position:relative;display:block;width:42px;height:24px;border-radius:999px;background:#d8dee6;transition:background .16s ease,box-shadow .16s ease}
.account-menu-toggle-ui::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.18);transition:transform .16s ease}
.account-menu-toggle input:checked + .account-menu-toggle-ui{background:#10b981}
.account-menu-toggle input:checked + .account-menu-toggle-ui::after{transform:translateX(18px)}
.account-menu-toggle input:focus-visible + .account-menu-toggle-ui{box-shadow:0 0 0 3px rgba(16,185,129,.18)}

/* P2.2.33 · learning path account menu interaction fixes */
.guided-learning-page .account-menu-trigger{display:inline-flex;align-items:center;gap:7px;min-width:116px;border:1px solid rgba(148,163,184,.28);border-radius:999px;background:#fff}
.guided-learning-page .account-menu-setting-row{cursor:pointer;outline:none}
.guided-learning-page .account-menu-setting-row:focus-visible{background:#f1f5f9;box-shadow:inset 0 0 0 2px rgba(16,185,129,.2)}
@media(max-width:850px),(pointer:coarse),(hover:none){
  .guided-learning-page .account-menu{top:58px;right:8px;width:min(246px,calc(100vw - 16px))}
  .guided-learning-page .account-menu-setting-row{padding:9px 10px}
  .guided-learning-page .account-menu-setting-label{font-size:12px}
}
/* style: styles/support-center.css */
.support-center-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.support-center-trigger,
.engagement-close {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  font-size: 0;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
}

.support-center-trigger::-moz-focus-inner,
.engagement-close::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.support-center-trigger {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 11px;
  background: rgba(255, 255, 255, .94);
  color: #334155;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
}

.support-center-trigger:hover {
  background: #fff;
  color: #6d28d9;
}

.support-center-trigger svg,
.engagement-close svg {
  display: block;
  flex: 0 0 auto;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-center-trigger svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.support-center-badge {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font: 700 10px/17px system-ui;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.support-center-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  width: 205px;
  padding: 7px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
  z-index: 260;
}

.support-center-popover[hidden] {
  display: none;
}

.support-center-popover button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 11px;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  font: 600 13px/1.25 system-ui;
}

.support-center-popover button:hover {
  background: #f4f0ff;
  color: #6d28d9;
}

.support-center-popover svg {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-center-popover .menu-badge,
.feedback-tab-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #be123c;
  text-align: center;
  font: 700 10px/1.4 system-ui;
}

.engagement-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgba(15, 23, 42, .28);
  display: grid;
  place-items: center;
  padding: 18px;
}

.engagement-dialog-open .kg-global-shortcuts {
  visibility: hidden !important;
  pointer-events: none !important;
}

.engagement-form-error {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.engagement-backdrop[hidden] {
  display: none;
}

.engagement-dialog {
  width: min(720px, 96vw);
  max-height: min(780px, 92vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .3);
  overflow: hidden;
}

.engagement-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.engagement-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.engagement-dialog header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
}

.engagement-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}

.engagement-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.engagement-close svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.engagement-body {
  padding: 18px 20px;
  overflow: auto;
}

.engagement-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.engagement-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #ddd6fe;
  background: #faf8ff;
  color: #6d28d9;
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
}

.engagement-tabs button.active {
  background: #6d28d9;
  color: #fff;
}

.engagement-tabs button.active .feedback-tab-badge {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.engagement-form {
  display: grid;
  gap: 12px;
}

.engagement-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.engagement-form input,
.engagement-form select,
.engagement-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 11px;
  font: inherit;
  color: #0f172a;
  background: #fff;
}

.engagement-form textarea {
  min-height: 130px;
  resize: vertical;
}

.engagement-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.engagement-primary {
  justify-self: end;
  border: 0;
  border-radius: 11px;
  background: #6d28d9;
  color: #fff;
  padding: 10px 17px;
  font-weight: 700;
  cursor: pointer;
}

.engagement-note {
  color: #64748b;
  font-size: 11px;
}

.my-feedback-list,
.message-list {
  display: grid;
  gap: 10px;
}

.my-feedback-card,
.message-card {
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 13px;
  background: #fff;
}

.my-feedback-card.unread-reply {
  border-color: #c4b5fd;
  background: #faf8ff;
}

.my-feedback-card header,
.message-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.my-feedback-card header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.my-feedback-card h3,
.message-card h3 {
  margin: 0;
  font-size: 14px;
}

.my-feedback-card time,
.message-card time {
  font-size: 10px;
  color: #94a3b8;
}

.my-feedback-card p,
.message-card p {
  margin: 8px 0;
  color: #475569;
  white-space: pre-wrap;
  font-size: 12px;
}

.feedback-status,
.feedback-reply-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
}

.feedback-status {
  background: #f1f5f9;
  color: #475569;
}

.feedback-status.in_progress {
  background: #fef3c7;
  color: #92400e;
}

.feedback-status.resolved {
  background: #dcfce7;
  color: #166534;
}

.feedback-status.closed {
  background: #e2e8f0;
  color: #475569;
}

.feedback-reply-badge {
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 700;
}

.feedback-replies {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #cbd5e1;
}

.feedback-replies article {
  padding: 7px 9px;
  border-radius: 9px;
  background: #f8fafc;
  margin-top: 6px;
  font-size: 11px;
}

.message-card.unread {
  border-color: #c4b5fd;
  background: #faf8ff;
}

.message-card button,
.message-toolbar button {
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  background: #fff;
  color: #6d28d9;
  padding: 6px 10px;
  cursor: pointer;
}

.message-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.engagement-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  border-radius: 13px;
}

.contact-service-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.contact-service-title {
  margin: 4px 0 0;
  color: #334155;
  font-weight: 700;
  font-size: 18px;
}

.contact-service-subtitle,
.contact-service-tip {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.contact-service-subtitle {
  font-size: 13px;
}

.contact-service-qrcode {
  width: min(280px, 100%);
  max-width: 280px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.contact-service-tip {
  font-size: 11px;
}

.engagement-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 850;
  background: #172033;
  color: #fff;
  padding: 9px 14px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

.engagement-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.engagement-toast.error {
  background: #991b1b;
}

@media (max-width: 700px) {
  .engagement-form-row {
    grid-template-columns: 1fr;
  }

  .support-center-popover {
    right: -4px;
  }

  .engagement-dialog {
    width: 100%;
    max-height: 94vh;
  }
}
/* style: styles/home-file-library.css */
/*
 * 首页用户文件库基线样式。
 * 当前版本只预置安全的通用类，不主动显示任何新 UI。
 * 后续新增“我的图谱 / 用户文件库”面板时可直接复用。
 */
.home-file-library-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-file-library-list {
  display: grid;
  gap: 10px;
}

.home-file-library-card {
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.home-file-library-card-title {
  font-weight: 800;
  color: #0f172a;
}

.home-file-library-card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.home-file-library-empty {
  border: 1px dashed rgba(148, 163, 184, .55);
  border-radius: 16px;
  color: #64748b;
  padding: 18px;
  text-align: center;
}
/* style: styles/graph-file-tabs.css */
/*
 * 基线重构 C-1.1：对标式双层顶部结构。
 * 第一层为固定宽度文件页签；第二层为画布浮动工具栏。
 */
:root{
  --graph-tabbar-height:38px;
  --graph-tab-width:176px;
}

.graph-file-tabbar{
  position:relative;
  z-index:45;
  flex:0 0 var(--graph-tabbar-height);
  min-height:var(--graph-tabbar-height);
  display:flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-bottom:1px solid rgba(15,23,42,.08);
  background:#eef0f4;
  box-shadow:0 1px 0 rgba(255,255,255,.8) inset;
  overflow:hidden;
}
.graph-file-home,
.graph-file-add{
  flex:0 0 32px;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:9px;
  color:#64748b;
  background:transparent;
  box-shadow:none;
}
.graph-file-home:hover,
.graph-file-add:hover{
  transform:none;
  background:rgba(255,255,255,.82);
  box-shadow:0 0 0 1px rgba(15,23,42,.07);
  color:#334155;
}
.graph-file-home svg{
  width:21px;
  height:21px;
  fill:currentColor;
  stroke:none;
}
.graph-file-add{font-size:24px;font-weight:500;line-height:1}
.graph-file-tabs{
  flex:0 1 auto;
  width:max-content;
  max-width:calc(100% - 92px);
  min-width:0;
  height:100%;
  display:flex;
  align-items:center;
  gap:4px;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
}
.graph-file-tabs::-webkit-scrollbar{display:none}
.graph-file-tab{
  position:relative;
  flex:0 0 var(--graph-tab-width);
  width:var(--graph-tab-width);
  max-width:var(--graph-tab-width);
  height:32px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  padding:0 8px 0 12px;
  border-radius:9px 9px 4px 4px;
  color:#334155;
  background:rgba(255,255,255,.68);
  box-shadow:none;
  text-align:left;
  cursor:pointer;
  user-select:none;
  transition:background .14s ease,color .14s ease,box-shadow .14s ease;
}
.graph-file-tab:hover{
  transform:none;
  background:#fff;
  box-shadow:0 0 0 1px rgba(15,23,42,.07);
}
.graph-file-tab.is-active{
  color:#0f172a;
  background:#fff;
  font-weight:800;
  box-shadow:0 0 0 1px rgba(15,23,42,.06),0 2px 8px rgba(15,23,42,.05);
}
.graph-file-tab.is-active::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:0;
  height:2px;
  border-radius:2px 2px 0 0;
  background:#6d5dfc;
}
.graph-file-tab-title{
  display:block;
  flex:1 1 auto;
  width:auto;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:13px;
  line-height:1;
}

.graph-file-tab-close{
  flex:0 0 20px;
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:6px;
  color:#64748b;
  background:transparent;
  box-shadow:none;
  font-size:16px;
  font-weight:500;
  line-height:1;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease,background .12s ease,color .12s ease;
}
.graph-file-tab:hover .graph-file-tab-close,
.graph-file-tab:focus-within .graph-file-tab-close,
.graph-file-tab.is-active:hover .graph-file-tab-close{
  opacity:1;
  pointer-events:auto;
}
.graph-file-tab-close:hover,
.graph-file-tab-close:focus-visible{
  transform:none;
  color:#0f172a;
  background:#e9edf3;
  box-shadow:none;
  outline:none;
}

/* 画布上的第二层工具改为左右独立悬浮，不再由整行容器承载。 */
.stage>.canvas-toolbar-left,
.stage>.canvas-toolbar-right{
  position:absolute;
  top:14px;
  z-index:50;
  isolation:isolate;
  display:flex;
  align-items:center;
  min-height:48px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:10px;
  background:rgba(255,255,255,.94);
  box-shadow:0 9px 28px rgba(15,23,42,.12);
  backdrop-filter:blur(14px);
  pointer-events:auto;
  touch-action:manipulation;
  user-select:auto;
}
.stage>.canvas-toolbar-left{
  left:14px;
  gap:4px;
  min-width:0;
  max-width:min(500px,calc(100vw - 620px));
  padding:0 10px;
  overflow:hidden;
}
.stage>.canvas-toolbar-right{
  right:14px;
  gap:8px;
  padding:6px 8px;
  white-space:nowrap;
}
.stage>.canvas-toolbar-left *,
.stage>.canvas-toolbar-right *{
  pointer-events:auto;
}
.stage>[data-stage-ui],
.stage>[data-stage-ui] *{
  pointer-events:auto;
}
.canvas-toolbar-right button{box-shadow:none}
.canvas-toolbar-right button:hover{transform:none}

.graph-save-state{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:32px;
  height:32px;
  margin-right:8px;
  padding:0 4px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#16a34a;
  font:inherit;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease;
}
.graph-save-state:hover:not(:disabled){
  background:color-mix(in srgb,currentColor 9%,transparent);
  border-color:color-mix(in srgb,currentColor 24%,transparent);
  transform:translateY(-1px);
}
.graph-save-state:active:not(:disabled){transform:translateY(0) scale(.95)}
.graph-save-state:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px color-mix(in srgb,currentColor 20%,transparent);
}
.graph-save-state:disabled{cursor:wait;opacity:.82}
.graph-save-state svg{
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.graph-save-state-text{display:none}
.graph-save-state.is-dirty{color:#d97706}
.graph-save-state.is-saving{color:#2563eb}
.graph-save-state.is-saving svg{animation:graph-save-pulse .9s ease-in-out infinite alternate}
@keyframes graph-save-pulse{to{transform:scale(1.09);opacity:.68}}
.graph-save-state.is-error{color:#dc2626}

.stage>.canvas-toolbar-left .brand{
  flex:1 1 auto;
  min-width:0;
  width:auto;
  max-width:none;
  margin:0;
  padding:5px 7px;
  overflow:hidden;
  border-radius:8px;
}
.stage>.canvas-toolbar-left .brand:hover,
.stage>.canvas-toolbar-left .brand:focus-visible{
  background:#f8fafc;
  box-shadow:none;
}
.stage>.canvas-toolbar-left .brand h1,
.stage>.canvas-toolbar-left .brand span{
  display:block;
  flex:1 1 auto;
  width:auto;
  max-width:100%;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.stage>.canvas-toolbar-left .brand h1{
  margin:0;
  font-size:15px;
  line-height:1.25;
}
.stage>.canvas-toolbar-left .brand span{
  display:none!important;
}

.graph-meta-search-btn{
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  box-shadow:none;
}
.graph-meta-search-btn:hover,
.graph-meta-search-btn:focus-visible{
  transform:none;
  background:#e0f2fe;
  color:#0369a1;
  box-shadow:none;
  outline:none;
}
.graph-meta-search-btn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* 避免浮动工具与文件状态栏重叠。 */
.floating-toolbox{top:82px}
.help-card{top:82px}
.detail-panel{top:82px}

@media(max-width:1180px){
  .stage>.canvas-toolbar-left{max-width:380px}
}

@media(max-width:930px){
  :root{--graph-tab-width:150px}
  .stage>.canvas-toolbar-left{min-width:0;max-width:320px}
  .stage>.canvas-toolbar-left .brand{width:auto;max-width:none}
  .stage>.canvas-toolbar-right .upgrade-member-btn{display:none}
}

@media(max-width:850px),(pointer:coarse){
  :root{--graph-tabbar-height:37px;--graph-tab-width:136px}
  .graph-file-tabbar{padding:3px 6px;gap:4px}
  .graph-file-home,.graph-file-add{flex-basis:30px;width:30px;height:30px}
  .graph-file-tab{height:30px;padding:0 6px 0 10px}
  .stage>.canvas-toolbar-left{
    top:8px;
    left:8px;
    min-width:0;
    max-width:calc(100vw - 94px);
    height:44px;
    min-height:44px;
    padding:0 8px;
  }
  .stage>.canvas-toolbar-right{
    display:none;
  }
  .stage>.canvas-toolbar-left .brand{width:auto;max-width:none;flex:1;padding:4px 5px}
  .stage>.canvas-toolbar-left .brand h1{font-size:14px}
  .stage>.canvas-toolbar-left .brand span{display:none}
  .graph-meta-search-btn{width:32px;height:32px;border-radius:10px}
  .graph-save-state{margin-right:4px}
  .help-card{top:62px}
  .detail-panel{top:auto}
}

/* C-1.4.4：移动端账号入口固定到顶部，并为其预留页签栏空间。 */
@media (max-width:850px),(pointer:coarse),(hover:none){
  .graph-file-tabbar{
    padding-right:70px;
  }
  .graph-file-tabs{
    max-width:calc(100% - 138px);
  }
  .stage>.canvas-toolbar-right{
    display:flex;
    position:fixed;
    top:3px;
    right:6px;
    z-index:55;
    width:auto;
    min-width:0;
    height:32px;
    min-height:32px;
    gap:0;
    padding:0;
    border:0;
    border-radius:9px;
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
    pointer-events:auto;
  }
  .stage>.canvas-toolbar-right>.upgrade-member-btn{
    display:none!important;
  }
  .stage>.canvas-toolbar-right .account-menu-shell,
  .stage>.canvas-toolbar-right .account-menu-trigger{
    pointer-events:auto;
  }

  /* 触摸设备不存在可靠 hover，关闭按钮必须常显并可直接点击。 */
  .graph-file-tab-close{
    opacity:1;
    pointer-events:auto;
  }
}

/* v7.9.29：图谱页签鼠标拖拽排序。 */
.graph-file-tab[draggable="true"]{
  cursor:grab;
}
.graph-file-tab.is-dragging{
  opacity:.46;
  transform:scale(.985);
  cursor:grabbing;
  box-shadow:0 8px 18px rgba(15,23,42,.12),0 0 0 1px rgba(37,99,235,.18);
}
.graph-file-tab.drag-before::before,
.graph-file-tab.drag-after::before{
  content:"";
  position:absolute;
  top:5px;
  bottom:5px;
  width:3px;
  border-radius:999px;
  background:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.14);
  pointer-events:none;
  z-index:3;
}
.graph-file-tab.drag-before::before{
  left:-4px;
}
.graph-file-tab.drag-after::before{
  right:-4px;
}
.graph-file-tabs:has(.is-dragging) .graph-file-tab:not(.is-dragging){
  transition:background .14s ease,color .14s ease,box-shadow .14s ease,opacity .14s ease;
}

/* v7.9.30：拖拽排序时相邻页签产生“让位 / 被挤开”的动态反馈。 */
.graph-file-tabs{
  --graph-tab-drag-shift:48px;
}
.graph-file-tabs.drag-active .graph-file-tab{
  transition:
    transform .22s cubic-bezier(.22,.61,.36,1),
    background .16s ease,
    color .16s ease,
    box-shadow .16s ease,
    opacity .16s ease!important;
}
.graph-file-tabs.drag-active .graph-file-tab:not(.is-dragging){
  will-change:transform;
}
.graph-file-tab.drag-shift-left{
  transform:translateX(calc(-1 * var(--graph-tab-drag-shift)));
}
.graph-file-tab.drag-shift-right{
  transform:translateX(var(--graph-tab-drag-shift));
}
.graph-file-tabs.drag-active .graph-file-tab.drag-before,
.graph-file-tabs.drag-active .graph-file-tab.drag-after{
  background:#fff;
  translate:0 -3px;
  scale:1.025;
  box-shadow:0 0 0 2px rgba(37,99,235,.22),0 12px 26px rgba(37,99,235,.16);
}
.graph-file-tabs.drag-active .graph-file-tab.is-dragging{
  transform:scale(.955) translateY(3px);
  transition:opacity .12s ease,transform .18s cubic-bezier(.22,.61,.36,1),box-shadow .16s ease!important;
}

/* v7.9.31：左上图谱标题支持原处单击编辑，双击查看文件信息。 */
.graph-meta-display{
  cursor:text;
}
.graph-title-inline-input{
  flex:1 1 auto;
  min-width:120px;
  width:100%;
  max-width:100%;
  height:28px;
  margin:0;
  padding:0 8px;
  border:0;
  outline:none;
  border-radius:8px;
  background:#eef6ff;
  color:#0f172a;
  font-size:15px;
  font-weight:850;
  line-height:28px;
  box-shadow:0 0 0 2px rgba(37,99,235,.16) inset;
}
.graph-title-inline-input:focus{
  background:#dbeafe;
  box-shadow:0 0 0 2px rgba(37,99,235,.28) inset;
}
.graph-info-modal .graph-info-grid{
  grid-template-columns:92px minmax(0,1fr);
}
.graph-info-readonly{
  min-height:38px;
  display:flex;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  background:#f8fafc;
  color:#475569;
  font-size:13px;
  font-weight:750;
  box-shadow:0 0 0 1px rgba(15,23,42,.06) inset;
}

/* v7.9.33：左下角独立画布缩放 / 全屏控制。 */
.canvas-zoom-dock{
  position:absolute;
  left:8px;
  bottom:8px;
  z-index:54;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:6px 8px;
  border-radius:16px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 14px 38px rgba(15,23,42,.16);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  pointer-events:auto;
  user-select:none;
}
.canvas-zoom-btn{
  width:31px;
  height:31px;
  min-width:31px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:21px;
  font-weight:750;
  line-height:1;
  box-shadow:none;
}
.canvas-zoom-btn:hover,
.canvas-zoom-btn:focus-visible{
  transform:none;
  background:#eff6ff;
  color:#2563eb;
  box-shadow:0 0 0 1px rgba(37,99,235,.16);
  outline:none;
}
.canvas-zoom-btn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.canvas-fullscreen-btn.active-toggle{
  background:#0f172a;
  color:#fff;
}
.canvas-zoom-percent-wrap{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.canvas-zoom-percent{
  min-width:58px;
  height:31px;
  padding:0 9px;
  border-radius:999px;
  background:#f8fafc;
  color:#334155;
  font-size:13px;
  font-weight:900;
  line-height:31px;
  text-align:center;
  box-shadow:none;
}
.canvas-zoom-percent:hover,
.canvas-zoom-percent:focus-visible{
  transform:none;
  background:#eef2ff;
  color:#1d4ed8;
  box-shadow:0 0 0 1px rgba(37,99,235,.14);
  outline:none;
}
.canvas-zoom-divider{
  width:1px;
  height:24px;
  background:rgba(148,163,184,.38);
  margin:0 1px;
}
.canvas-zoom-slider-popover{
  position:absolute;
  left:50%;
  bottom:42px;
  width:172px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 11px;
  border-radius:999px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 12px 30px rgba(15,23,42,.18);
  transform:translateX(-50%) translateY(6px);
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.canvas-zoom-dock.slider-open .canvas-zoom-slider-popover{
  opacity:1;
  pointer-events:auto;
  transform:translateX(-50%) translateY(0);
}
.canvas-zoom-slider-popover input[type="range"]{
  width:148px;
  accent-color:#6d5dfc;
  cursor:pointer;
}
.stage:fullscreen{
  width:100vw;
  height:100vh;
  background-color:#f7f8fc;
}
.stage:fullscreen .canvas-zoom-dock{
  bottom:10px;
  left:10px;
}
.stage:fullscreen .mobile-bar{
  display:none!important;
}
@media(max-width:850px),(pointer:coarse){
  .canvas-zoom-dock{
    left:8px;
    right:auto;
    bottom:58px;
    padding:5px 6px;
    gap:6px;
    border-radius:15px;
  }
  .canvas-zoom-btn{
    width:29px;
    height:29px;
    min-width:29px;
  }
  .canvas-zoom-percent{
    min-width:52px;
    height:29px;
    line-height:29px;
    font-size:12px;
  }
  .canvas-zoom-slider-popover{
    width:154px;
    bottom:38px;
  }
  .canvas-zoom-slider-popover input[type="range"]{
    width:130px;
  }
}

/* v7.9.34：缩放栏贴边，状态消息显示在缩放栏右侧，避免相互遮挡。 */
.stage .status-chip{
  left:224px;
  bottom:11px;
  z-index:55;
  max-width:calc(100vw - 248px);
}
.stage:fullscreen .status-chip{
  left:226px;
  bottom:13px;
}
@media(max-width:850px),(pointer:coarse){
  .stage .status-chip{
    left:8px;
    right:8px;
    bottom:106px;
    max-width:calc(100vw - 16px);
  }
}

/* v7.9.52：图谱名称后的设置入口升级为“偏好设置 / 图谱文件”二级入口。 */
.graph-meta-actions-menu{
  position:fixed;
  z-index:120;
  padding:8px;
  border-radius:18px;
  background:rgba(255,255,255,.97);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 18px 46px rgba(15,23,42,.18);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  opacity:0;
  transform:translateY(-6px);
  pointer-events:none;
  transition:opacity .15s ease,transform .15s ease;
}
.graph-meta-actions-menu.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.graph-meta-actions-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:4px 4px 8px 8px;
  color:#0f172a;
}
.graph-meta-actions-head strong{
  font-size:13px;
  font-weight:950;
}
.graph-meta-actions-close{
  width:26px;
  height:26px;
  min-width:26px;
  padding:0;
  border-radius:999px;
  background:#f1f5f9;
  color:#334155;
  font-size:18px;
  line-height:1;
  box-shadow:none;
}
.graph-meta-actions-close:hover{
  transform:none;
  background:#e0e7ff;
  color:#2563eb;
}
.graph-meta-action-primary,
.graph-meta-action-item{
  width:100%;
  border:0;
  box-shadow:0 0 0 1px rgba(15,23,42,.06);
  background:#fff;
  color:#334155;
  text-align:left;
}
.graph-meta-action-primary{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border-radius:14px;
}
.graph-meta-action-primary:hover,
.graph-meta-action-item:hover{
  transform:none;
  background:#eef2ff;
  color:#1d4ed8;
}
.graph-meta-action-title{
  font-size:13px;
  font-weight:950;
}
.graph-meta-action-desc{
  font-size:11px;
  font-weight:750;
  color:#64748b;
}
.graph-meta-action-section-title{
  margin:10px 5px 6px;
  font-size:11px;
  font-weight:950;
  color:#94a3b8;
  letter-spacing:.04em;
}
.graph-meta-action-item{
  height:34px;
  padding:0 12px;
  margin-top:5px;
  border-radius:12px;
  font-size:12px;
  font-weight:900;
}
.canvas-fit-btn svg{
  width:17px;
  height:17px;
}


/* v7.9.54：缩放栏加长后动态避让状态消息；图谱设置改为指向式二级菜单。 */
@media(min-width:851px) and (pointer:fine){
  .stage .status-chip{
    left:var(--canvas-status-left,286px);
    bottom:11px;
    max-width:var(--canvas-status-max-width,calc(100vw - 310px));
  }
  .stage:fullscreen .status-chip{
    left:var(--canvas-status-left,286px);
    bottom:13px;
    max-width:var(--canvas-status-max-width,calc(100vw - 310px));
  }
}
.graph-meta-actions-menu.graph-meta-cascade-menu{
  z-index:238;
  width:178px;
  padding:6px;
  border-radius:16px;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 18px 46px rgba(15,23,42,.18);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.graph-meta-actions-menu[hidden],
.graph-meta-actions-submenu[hidden]{
  display:none!important;
}
.graph-meta-cascade-list{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.graph-meta-cascade-item{
  width:100%;
  height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 10px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#334155;
  box-shadow:none;
  text-align:left;
  font-size:13px;
  font-weight:900;
}
.graph-meta-cascade-item svg,
.graph-meta-file-action svg{
  flex:0 0 auto;
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.graph-meta-cascade-item:hover,
.graph-meta-cascade-item:focus-visible,
.graph-meta-cascade-item.active{
  transform:none;
  outline:none;
  background:#f1f5f9;
  color:#1d4ed8;
  box-shadow:none;
}
.graph-meta-cascade-chevron{
  margin-left:auto;
  color:#94a3b8;
  font-size:22px;
  line-height:1;
}
.graph-meta-actions-submenu{
  position:fixed;
  z-index:239;
  padding:6px;
  border-radius:16px;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 18px 46px rgba(15,23,42,.18);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  opacity:0;
  transform:translateX(-4px);
  pointer-events:none;
  transition:opacity .14s ease,transform .14s ease;
}
.graph-meta-actions-submenu.show{
  opacity:1;
  transform:translateX(0);
  pointer-events:auto;
}
.graph-meta-file-action{
  width:100%;
  height:40px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  margin:0;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#334155;
  box-shadow:none;
  text-align:left;
  font-size:13px;
  font-weight:900;
}
.graph-meta-file-action:hover,
.graph-meta-file-action:focus-visible{
  transform:none;
  outline:none;
  background:#eef2ff;
  color:#1d4ed8;
  box-shadow:none;
}
.graph-prefs-menu{
  z-index:240;
  max-height:calc(100vh - 16px);
  overflow-y:auto;
}
@media(max-width:850px),(pointer:coarse){
  .graph-meta-actions-menu.graph-meta-cascade-menu,
  .graph-meta-actions-submenu{
    max-width:calc(100vw - 16px);
  }
}


/* v7.9.55：图谱名称后设置入口精简为“文件 / 偏好设置”指向式菜单。 */
.graph-meta-actions-menu.graph-meta-cascade-menu{
  width:188px;
  padding:6px;
}
.graph-meta-cascade-item{
  height:42px;
  padding:0 11px;
  gap:10px;
}
.graph-meta-cascade-item span:not(.graph-meta-cascade-chevron){
  white-space:nowrap;
}
.graph-meta-actions-submenu{
  transform:translateX(-8px);
}
.graph-meta-actions-submenu.show{
  transform:translateX(0);
}

/* v7.9.56：导出格式增加 ZIP / PNG / PDF 三级指向菜单。 */
.graph-meta-export-submenu{
  z-index:241;
}
.graph-meta-file-action.active,
.graph-meta-file-action[aria-expanded="true"]{
  transform:none;
  outline:none;
  background:#eef2ff;
  color:#1d4ed8;
  box-shadow:none;
}
.graph-meta-file-export-action .graph-meta-cascade-chevron{
  margin-left:auto;
  font-size:20px;
}
.graph-meta-file-action[data-meta-export-format="png"] svg,
.graph-meta-file-action[data-meta-export-format="pdf"] svg,
.graph-meta-file-action[data-meta-export-format="zip"] svg{
  width:18px;
  height:18px;
}
/* style: styles/graph-user-preferences.css */
/*
 * 图谱用户偏好与高性能模式。
 * 这些样式只通过 html 上的 kg-perf-* class 生效，不改变图谱数据。
 */

.graph-meta-preferences-btn{
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  box-shadow:none;
}
.graph-meta-preferences-btn:hover,
.graph-meta-preferences-btn:focus-visible,
.graph-meta-preferences-btn[aria-expanded="true"]{
  transform:none;
  background:#ede9fe;
  color:#6d28d9;
  box-shadow:none;
  outline:none;
}
.graph-meta-preferences-btn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.15;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.graph-prefs-menu{
  position:fixed;
  z-index:220;
  width:320px;
  max-width:calc(100vw - 16px);
  padding:12px;
  border:1px solid rgba(15,23,42,.09);
  border-radius:18px;
  background:rgba(255,255,255,.97);
  box-shadow:0 22px 58px rgba(15,23,42,.18);
  backdrop-filter:blur(18px);
  color:#0f172a;
  user-select:none;
}
.graph-prefs-menu[hidden]{display:none!important}
.graph-prefs-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:2px 2px 10px;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.graph-prefs-head strong{
  display:block;
  font-size:15px;
  line-height:1.25;
}
.graph-prefs-head span{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
}
.graph-prefs-close{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border-radius:10px;
  background:#f1f5f9;
  color:#64748b;
  font-size:20px;
  line-height:1;
  box-shadow:none;
}
.graph-prefs-close:hover,
.graph-prefs-close:focus-visible{
  transform:none;
  background:#e2e8f0;
  color:#0f172a;
  outline:none;
  box-shadow:none;
}
.graph-prefs-section{
  padding:12px 2px 4px;
}
.graph-prefs-section-title{
  margin-bottom:8px;
  color:#475569;
  font-size:12px;
  font-weight:900;
}
.graph-prefs-presets{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.graph-prefs-presets button{
  height:34px;
  border:1px solid rgba(15,23,42,.1);
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  font-size:13px;
  font-weight:800;
  box-shadow:none;
}
.graph-prefs-presets button:hover,
.graph-prefs-presets button:focus-visible{
  transform:none;
  background:#eef2ff;
  color:#4338ca;
  outline:none;
  box-shadow:none;
}
.graph-prefs-presets button.active{
  border-color:rgba(124,58,237,.32);
  background:#ede9fe;
  color:#6d28d9;
}
.graph-prefs-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:38px;
  padding:8px 10px;
  border-radius:13px;
  color:#334155;
  font-size:13px;
  font-weight:750;
  cursor:pointer;
}
.graph-prefs-toggle:hover{
  background:#f8fafc;
}
.graph-prefs-toggle input{
  order:2;
  width:18px;
  height:18px;
  accent-color:#7c3aed;
}
.graph-prefs-note{
  margin-top:8px;
  padding:10px;
  border-radius:14px;
  background:#f8fafc;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}

@media(max-width:850px),(pointer:coarse){
  .graph-meta-preferences-btn{
    width:32px;
    height:32px;
    border-radius:10px;
  }
  .graph-prefs-menu{
    width:calc(100vw - 16px)!important;
    border-radius:16px;
  }
}

/* 高性能视觉开关：阴影 */
.kg-perf-no-shadows .knowledge-card,
.kg-perf-no-shadows .detail-panel,
.kg-perf-no-shadows .floating-toolbox,
.kg-perf-no-shadows .help-card,
.kg-perf-no-shadows .graph-search-panel,
.kg-perf-no-shadows .canvas-toolbar-left,
.kg-perf-no-shadows .canvas-toolbar-right,
.kg-perf-no-shadows .graph-prefs-menu,
.kg-perf-no-shadows .modal-card,
.kg-perf-no-shadows .account-menu,
.kg-perf-no-shadows .home-package-card,
.kg-perf-no-shadows .home-file-card,
.kg-perf-no-shadows .graph-file-tabbar,
.kg-perf-no-shadows .related-canvas-shell,
.kg-perf-no-shadows .related-canvas-card,
.kg-perf-no-shadows .related-canvas-info,
.kg-perf-no-shadows .related-canvas-tool,
.kg-perf-no-shadows .graph-meta-preferences-btn,
.kg-perf-no-shadows .graph-meta-search-btn{
  box-shadow:none!important;
  filter:none!important;
}

/* 高性能视觉开关：玻璃模糊 / 滤镜 */
.kg-perf-no-blur .canvas-toolbar-left,
.kg-perf-no-blur .canvas-toolbar-right,
.kg-perf-no-blur .detail-panel,
.kg-perf-no-blur .floating-toolbox,
.kg-perf-no-blur .help-card,
.kg-perf-no-blur .graph-search-panel,
.kg-perf-no-blur .graph-prefs-menu,
.kg-perf-no-blur .modal-card,
.kg-perf-no-blur .modal-backdrop,
.kg-perf-no-blur .account-menu,
.kg-perf-no-blur .graph-file-tabbar,
.kg-perf-no-blur .related-canvas-shell,
.kg-perf-no-blur .related-canvas-info{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  filter:none!important;
}

/* 高性能视觉开关：动画 */
.kg-perf-no-animations *,
.kg-perf-no-animations *::before,
.kg-perf-no-animations *::after{
  transition:none!important;
  animation:none!important;
  scroll-behavior:auto!important;
}

/* 高性能视觉开关：关系标签 */
.kg-perf-hide-relation-labels .edge-label,
.kg-perf-hide-relation-labels .related-canvas-label{
  display:none!important;
}

/* 高性能视觉开关：卡牌渐变背景 */
.kg-perf-no-gradients .knowledge-card .node-top,
.kg-perf-no-gradients .related-canvas-card .node-top{
  background:#f1f5f9!important;
}

/* 多选拖动性能优化：拖动中暂停连接线几何刷新，并淡化旧位置连接线。 */
.graph-card-dragging-defer-edges .edge-visible{
  opacity:.14!important;
}
.graph-card-dragging-defer-edges .edge-hit{
  opacity:0!important;
  pointer-events:none!important;
}
.graph-card-dragging-defer-edges .edge-label{
  opacity:0!important;
}
.kg-perf-no-animations .graph-card-dragging-defer-edges .edge-visible,
.kg-perf-no-animations .graph-card-dragging-defer-edges .edge-label{
  display:none!important;
}

.graph-prefs-toggle-important{
  background:#faf5ff;
  color:#581c87;
}
.graph-prefs-toggle-important:hover{
  background:#f3e8ff;
}
.kg-large-graph-mode-disabled .graph-meta-preferences-btn{
  background:#fff7ed;
  color:#c2410c;
}

/* v7.9.11：大图模式下强化选中标识，避免性能模式阴影覆盖 active / multi-selected 视觉。 */
.stage.large-graph-mode .knowledge-card.active,
.stage.large-graph-mode .knowledge-card.multi-selected{
  opacity:1!important;
  filter:none!important;
  z-index:32!important;
  outline:3px solid #2563eb!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 4px rgba(37,99,235,.18),0 8px 22px rgba(37,99,235,.20)!important;
}
.stage.large-graph-mode .knowledge-card.multi-selected{
  outline-color:#0891b2!important;
  box-shadow:0 0 0 4px rgba(8,145,178,.18),0 8px 22px rgba(8,145,178,.20)!important;
}
.stage.large-graph-mode .knowledge-card.active::before,
.stage.large-graph-mode .knowledge-card.multi-selected::before{
  content:"已选";
  position:absolute;
  right:7px;
  top:7px;
  z-index:5;
  padding:2px 7px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-size:11px;
  line-height:1.35;
  font-weight:950;
  pointer-events:none;
  box-shadow:0 4px 12px rgba(37,99,235,.22);
}
.stage.large-graph-mode .knowledge-card.multi-selected::before{
  background:#0891b2;
}
.stage.large-graph-mode.large-graph-related-focus .knowledge-card.active,
.stage.large-graph-mode.large-graph-related-focus .knowledge-card.multi-selected,
.stage.large-graph-mode.large-graph-related-only .knowledge-card.active,
.stage.large-graph-mode.large-graph-related-only .knowledge-card.multi-selected{
  display:block!important;
  opacity:1!important;
}
.kg-perf-no-shadows .stage.large-graph-mode .knowledge-card.active,
.kg-perf-no-shadows .stage.large-graph-mode .knowledge-card.multi-selected{
  box-shadow:none!important;
  outline-width:3px!important;
}
.kg-perf-no-shadows .stage.large-graph-mode .knowledge-card.active::before,
.kg-perf-no-shadows .stage.large-graph-mode .knowledge-card.multi-selected::before{
  box-shadow:none!important;
}

/* v7.9.13：箭头编辑模式 / 手型演示模式。 */
.stage.pointer-edit-mode,
.stage.pointer-edit-mode .world{
  cursor:default!important;
}
.stage.pointer-edit-mode .knowledge-card{
  cursor:grab;
}
.stage.pointer-edit-mode .knowledge-card.dragging,
.stage.pointer-edit-mode .knowledge-card.group-dragging{
  cursor:grabbing!important;
}
.stage.pointer-edit-mode .edge-hit{
  cursor:pointer;
}
.stage.pointer-pan-mode,
.stage.pointer-temp-pan-mode,
.stage.pointer-pan-mode .world,
.stage.pointer-temp-pan-mode .world,
.stage.pointer-pan-mode .knowledge-card,
.stage.pointer-temp-pan-mode .knowledge-card,
.stage.pointer-pan-mode .edge-hit,
.stage.pointer-temp-pan-mode .edge-hit{
  cursor:grab!important;
}
.stage.pointer-pan-mode.panning,
.stage.pointer-temp-pan-mode.panning,
.stage.pointer-pan-mode.panning .world,
.stage.pointer-temp-pan-mode.panning .world,
.stage.pointer-pan-mode.panning .knowledge-card,
.stage.pointer-temp-pan-mode.panning .knowledge-card{
  cursor:grabbing!important;
}
#pointerModeBtn.active-toggle{
  background:#0f172a;
  color:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.18);
}
#pointerModeBtn svg{
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* v7.9.15：选中状态改为卡牌颜色小圆点，替代“已选”文字标签。 */
.stage .knowledge-card.active::before,
.stage .knowledge-card.multi-selected::before,
.stage.large-graph-mode .knowledge-card.active::before,
.stage.large-graph-mode .knowledge-card.multi-selected::before{
  content:""!important;
  position:absolute!important;
  right:8px!important;
  top:8px!important;
  z-index:6!important;
  width:11px!important;
  height:11px!important;
  min-width:11px!important;
  min-height:11px!important;
  padding:0!important;
  border:2px solid #fff!important;
  border-radius:999px!important;
  background:var(--node-color,#2563eb)!important;
  color:transparent!important;
  font-size:0!important;
  line-height:0!important;
  pointer-events:none!important;
  box-shadow:0 3px 10px rgba(15,23,42,.22),0 0 0 2px rgba(255,255,255,.72)!important;
}
.stage .knowledge-card.multi-selected::before,
.stage.large-graph-mode .knowledge-card.multi-selected::before{
  width:12px!important;
  height:12px!important;
  min-width:12px!important;
  min-height:12px!important;
  box-shadow:0 3px 10px rgba(15,23,42,.24),0 0 0 2px rgba(14,165,233,.36)!important;
}
.kg-perf-no-shadows .stage .knowledge-card.active::before,
.kg-perf-no-shadows .stage .knowledge-card.multi-selected::before{
  box-shadow:0 0 0 2px rgba(255,255,255,.72)!important;
}

/* v7.9.17：连线选中状态与线型快捷浮层。 */
.edge-hit.selected + .edge-visible,
.stage.focus-mode .edge-hit.selected + .edge-visible{
  opacity:1!important;
  stroke-width:6.4!important;
  filter:drop-shadow(0 0 6px rgba(37,99,235,.38)) drop-shadow(0 3px 6px rgba(37,99,235,.24))!important;
}
.edge-hit.selected + .edge-visible + .edge-label,
.edge-label.edge-selected-label{
  fill:#1d4ed8!important;
  opacity:1!important;
  font-weight:950!important;
  stroke:#fff!important;
  stroke-width:4px!important;
  paint-order:stroke!important;
}
.edge-quick-style-panel{
  position:absolute;
  left:0;
  top:0;
  z-index:58;
  display:none;
  align-items:center;
  gap:5px;
  padding:5px;
  border-radius:999px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(37,99,235,.18);
  box-shadow:0 12px 28px rgba(15,23,42,.18),0 0 0 1px rgba(255,255,255,.72);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  pointer-events:auto;
  user-select:none;
}
.edge-quick-style-panel.show{
  display:flex;
}
.edge-quick-style-title{
  padding:0 5px 0 7px;
  color:#475569;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.edge-quick-style-panel button{
  width:auto;
  height:28px;
  min-width:48px;
  padding:0 8px;
  border:0;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  background:#f1f5f9;
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:none;
}
.edge-quick-style-panel button:hover,
.edge-quick-style-panel button:focus-visible{
  background:#dbeafe;
  color:#1d4ed8;
  outline:none;
}
.edge-quick-style-panel button.active{
  background:#2563eb;
  color:#fff;
}
.edge-quick-style-panel svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.kg-perf-no-shadows .edge-quick-style-panel{
  box-shadow:none!important;
}
.kg-perf-no-blur .edge-quick-style-panel{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* v7.9.18：关系线快捷线型按钮改为纯图标，并靠近点击位置。 */
.edge-quick-style-panel{
  gap:4px!important;
  padding:4px!important;
  border-radius:14px!important;
}
.edge-quick-style-title,
.edge-quick-style-panel span{
  display:none!important;
}
.edge-quick-style-panel button{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  padding:0!important;
  border-radius:10px!important;
  gap:0!important;
}
.edge-quick-style-panel svg{
  width:19px!important;
  height:19px!important;
}

/* v7.9.19：双击关系线就地编辑线上文字。 */
.edge-inline-label-editor{
  position:absolute;
  left:0;
  top:0;
  z-index:62;
  display:none;
  padding:5px;
  border-radius:14px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(37,99,235,.22);
  box-shadow:0 14px 30px rgba(15,23,42,.20),0 0 0 1px rgba(255,255,255,.76);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  pointer-events:auto;
}
.edge-inline-label-editor.show{
  display:block;
}
.edge-inline-label-editor input{
  width:190px;
  height:32px;
  box-sizing:border-box;
  border:0;
  outline:none;
  border-radius:10px;
  padding:0 10px;
  background:#eff6ff;
  color:#0f172a;
  font-size:13px;
  font-weight:850;
  line-height:32px;
}
.edge-inline-label-editor input::placeholder{
  color:#64748b;
  font-weight:750;
}
.edge-inline-label-editor input:focus{
  background:#dbeafe;
  box-shadow:0 0 0 2px rgba(37,99,235,.18) inset;
}
.edge-label.edge-selected-label{
  display:block!important;
}
.kg-perf-hide-relation-labels .edge-label.edge-selected-label{
  display:block!important;
}
.kg-perf-no-shadows .edge-inline-label-editor{
  box-shadow:none!important;
}
.kg-perf-no-blur .edge-inline-label-editor{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* v7.9.26：居中视角平滑过渡期间降低重绘成本。 */
.stage.viewport-fitting .knowledge-card,
.stage.viewport-fitting .edge-visible,
.stage.viewport-fitting .edge-label{
  transition:none!important;
}
.stage.viewport-fitting .edge-visible{
  filter:none!important;
}

/* v7.9.28：聚焦 / 心流 / 只看相关 / 主干线视觉切换缓起缓停。 */
.stage.focus-visual-transition{
  transition:background-color 560ms cubic-bezier(.22,.61,.36,1);
}
.stage.focus-visual-transition .knowledge-card{
  transition:
    opacity 560ms cubic-bezier(.22,.61,.36,1),
    filter 560ms cubic-bezier(.22,.61,.36,1),
    box-shadow 560ms cubic-bezier(.22,.61,.36,1),
    outline-color 560ms cubic-bezier(.22,.61,.36,1),
    transform 560ms cubic-bezier(.22,.61,.36,1)!important;
}
.stage.focus-visual-transition .edge-visible{
  transition:
    opacity 520ms cubic-bezier(.22,.61,.36,1),
    stroke 520ms cubic-bezier(.22,.61,.36,1),
    stroke-width 520ms cubic-bezier(.22,.61,.36,1),
    filter 520ms cubic-bezier(.22,.61,.36,1)!important;
}
.stage.focus-visual-transition .edge-label{
  transition:
    opacity 520ms cubic-bezier(.22,.61,.36,1),
    fill 520ms cubic-bezier(.22,.61,.36,1),
    stroke 520ms cubic-bezier(.22,.61,.36,1)!important;
}
.stage.focus-visual-transition .help-card,
.stage.focus-visual-transition .detail-panel{
  transition:opacity 520ms cubic-bezier(.22,.61,.36,1),filter 520ms cubic-bezier(.22,.61,.36,1)!important;
}
.stage.focus-visual-transition .edge-layer{
  animation:focusEdgeSoftFade 520ms cubic-bezier(.22,.61,.36,1) both;
}
@keyframes focusEdgeSoftFade{
  0%{opacity:.42}
  45%{opacity:.76}
  100%{opacity:1}
}
.kg-perf-no-animations .stage.focus-visual-transition,
.kg-perf-no-animations .stage.focus-visual-transition *,
.kg-perf-no-animations .stage.focus-visual-transition *::before,
.kg-perf-no-animations .stage.focus-visual-transition *::after{
  transition:none!important;
  animation:none!important;
}

/* v7.9.35：关系线快捷菜单改为圆弧形，并新增曲线 / 直线 / 折线路径形态。 */
.edge-radial-style-panel.edge-quick-style-panel{
  width:142px!important;
  height:126px!important;
  min-width:142px!important;
  padding:0!important;
  border-radius:999px!important;
  display:none!important;
  align-items:initial!important;
  justify-content:initial!important;
  gap:0!important;
  background:radial-gradient(circle at 50% 52%,rgba(255,255,255,.98) 0 34%,rgba(239,246,255,.96) 58%,rgba(255,255,255,.92) 100%)!important;
  border:1px solid rgba(37,99,235,.18)!important;
  box-shadow:0 18px 42px rgba(15,23,42,.18),0 0 0 1px rgba(255,255,255,.72)!important;
  transform-origin:center center!important;
}
.edge-radial-style-panel.edge-quick-style-panel.show{
  display:block!important;
  animation:edgeRadialMenuPop .18s cubic-bezier(.18,.9,.32,1.28) both!important;
}
@keyframes edgeRadialMenuPop{
  from{opacity:0;transform:scale(.72)}
  to{opacity:1;transform:scale(1)}
}
.edge-radial-style-panel .edge-radial-btn{
  position:absolute!important;
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  padding:0!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:#fff!important;
  color:#334155!important;
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 6px 16px rgba(15,23,42,.10)!important;
  transition:transform .14s ease,background .14s ease,color .14s ease,box-shadow .14s ease!important;
}
.edge-radial-style-panel .edge-radial-btn:hover,
.edge-radial-style-panel .edge-radial-btn:focus-visible{
  transform:scale(1.08)!important;
  background:#dbeafe!important;
  color:#1d4ed8!important;
  outline:none!important;
}
.edge-radial-style-panel .edge-radial-btn.active{
  background:#2563eb!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(37,99,235,.28)!important;
}
.edge-radial-style-panel .edge-radial-btn svg{
  width:20px!important;
  height:20px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2.35!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.edge-radial-style-panel .edge-radial-solid{left:42px!important;top:8px!important;}
.edge-radial-style-panel .edge-radial-dashed{left:70px!important;top:8px!important;}
.edge-radial-style-panel .edge-radial-straight{left:20px!important;top:74px!important;}
.edge-radial-style-panel .edge-radial-elbow{left:55px!important;top:88px!important;}
.edge-radial-style-panel .edge-radial-curve{left:90px!important;top:74px!important;}
.kg-perf-no-animations .edge-radial-style-panel.edge-quick-style-panel.show{
  animation:none!important;
}
.kg-perf-no-shadows .edge-radial-style-panel .edge-radial-btn,
.kg-perf-no-shadows .edge-radial-style-panel.edge-quick-style-panel{
  box-shadow:none!important;
}

/* v7.9.36：关系线圆弧菜单去掉背景圆盘，仅保留按钮；上下两组均按圆弧排布。 */
.edge-radial-style-panel.edge-quick-style-panel{
  width:148px!important;
  height:132px!important;
  min-width:148px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.edge-radial-style-panel.edge-quick-style-panel.show{
  display:block!important;
}
.edge-radial-style-panel .edge-radial-btn{
  background:rgba(255,255,255,.96)!important;
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 8px 22px rgba(15,23,42,.16),0 0 0 1px rgba(255,255,255,.78)!important;
}
.edge-radial-style-panel .edge-radial-btn.active{
  background:#2563eb!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(37,99,235,.30),0 0 0 1px rgba(255,255,255,.62)!important;
}
/* 上半部两颗按钮改成圆弧：左上 / 右上，不再水平并排。 */
.edge-radial-style-panel .edge-radial-solid{
  left:35px!important;
  top:10px!important;
}
.edge-radial-style-panel .edge-radial-dashed{
  left:81px!important;
  top:10px!important;
}
/* 下半部三颗按钮保持圆弧，整体更松散一点。 */
.edge-radial-style-panel .edge-radial-straight{
  left:18px!important;
  top:76px!important;
}
.edge-radial-style-panel .edge-radial-elbow{
  left:58px!important;
  top:94px!important;
}
.edge-radial-style-panel .edge-radial-curve{
  left:98px!important;
  top:76px!important;
}
.kg-perf-no-shadows .edge-radial-style-panel .edge-radial-btn{
  box-shadow:none!important;
}

/* v7.9.37：关系线圆弧菜单加入文字 T 和颜色圆点，七个按钮统一沿圆弧排布。 */
.edge-radial-style-panel.edge-quick-style-panel{
  width:178px!important;
  height:178px!important;
  min-width:178px!important;
}
.edge-radial-style-panel .edge-radial-label,
.edge-radial-style-panel .edge-radial-color{
  font-size:14px!important;
  font-weight:950!important;
}
.edge-radial-text-icon{
  font-size:15px;
  font-weight:1000;
  line-height:1;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.edge-radial-color-dot{
  width:17px;
  height:17px;
  display:block;
  border-radius:999px;
  background:var(--edge-radial-color,#2563eb);
  box-shadow:0 0 0 2px rgba(255,255,255,.95),0 0 0 3px rgba(15,23,42,.10);
}
.edge-radial-style-panel .edge-radial-color.active .edge-radial-color-dot,
.edge-radial-style-panel .edge-radial-color:hover .edge-radial-color-dot{
  box-shadow:0 0 0 2px rgba(255,255,255,.95),0 0 0 4px rgba(37,99,235,.22);
}
/* 上弧：实线 / T / 虚线。 */
.edge-radial-style-panel .edge-radial-solid{
  left:42px!important;
  top:22px!important;
}
.edge-radial-style-panel .edge-radial-label{
  left:73px!important;
  top:8px!important;
}
.edge-radial-style-panel .edge-radial-dashed{
  left:104px!important;
  top:22px!important;
}
/* 左侧弧：颜色圆点。 */
.edge-radial-style-panel .edge-radial-color{
  left:12px!important;
  top:74px!important;
}
/* 下弧：直线 / 折线 / 曲线。 */
.edge-radial-style-panel .edge-radial-straight{
  left:36px!important;
  top:122px!important;
}
.edge-radial-style-panel .edge-radial-elbow{
  left:73px!important;
  top:138px!important;
}
.edge-radial-style-panel .edge-radial-curve{
  left:110px!important;
  top:122px!important;
}

/* v7.9.38：关系线菜单对称化；顶部为长虚线 / 实线 / 短虚线，中部 T 与颜色左右对称。 */
.edge-radial-style-panel.edge-quick-style-panel{
  width:186px!important;
  height:176px!important;
  min-width:186px!important;
}
.edge-radial-style-panel .edge-radial-color{
  overflow:hidden!important;
}
.edge-radial-color-input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
  border:0;
  padding:0;
}
.edge-radial-style-panel .edge-radial-dotted{
  font-size:14px!important;
  font-weight:950!important;
}
/* 顶部三颗：左长虚线，中实线，右短虚线。 */
.edge-radial-style-panel .edge-radial-dashed{
  left:40px!important;
  top:10px!important;
}
.edge-radial-style-panel .edge-radial-solid{
  left:77px!important;
  top:0!important;
}
.edge-radial-style-panel .edge-radial-dotted{
  left:114px!important;
  top:10px!important;
}
/* 中部左右：T 与实时颜色圆点。 */
.edge-radial-style-panel .edge-radial-label{
  left:22px!important;
  top:72px!important;
}
.edge-radial-style-panel .edge-radial-color{
  left:132px!important;
  top:72px!important;
}
/* 底部三颗：直线、折线、曲线。 */
.edge-radial-style-panel .edge-radial-straight{
  left:40px!important;
  top:128px!important;
}
.edge-radial-style-panel .edge-radial-elbow{
  left:77px!important;
  top:144px!important;
}
.edge-radial-style-panel .edge-radial-curve{
  left:114px!important;
  top:128px!important;
}

/* v7.9.39：关系线菜单正圆排布、侧按钮增强识别、虚线段直角化。 */
.edge-radial-style-panel.edge-quick-style-panel{
  width:190px!important;
  height:190px!important;
  min-width:190px!important;
}
.edge-radial-text-icon,
.edge-radial-color-dot{
  display:block!important;
}
.edge-radial-style-panel .edge-radial-label{
  background:#eef2ff!important;
  color:#1d4ed8!important;
  border-color:rgba(37,99,235,.18)!important;
}
.edge-radial-style-panel .edge-radial-color{
  background:var(--edge-radial-color,#2563eb)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.78)!important;
}
.edge-radial-style-panel .edge-radial-color-dot{
  width:14px!important;
  height:14px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 0 0 2px rgba(15,23,42,.16)!important;
}
/* 8 个按钮按同一正圆半径排布。 */
.edge-radial-style-panel .edge-radial-dashed{
  left:31px!important;
  top:22px!important;
}
.edge-radial-style-panel .edge-radial-solid{
  left:79px!important;
  top:5px!important;
}
.edge-radial-style-panel .edge-radial-dotted{
  left:127px!important;
  top:22px!important;
}
.edge-radial-style-panel .edge-radial-label{
  left:5px!important;
  top:79px!important;
}
.edge-radial-style-panel .edge-radial-color{
  left:153px!important;
  top:79px!important;
}
.edge-radial-style-panel .edge-radial-straight{
  left:31px!important;
  top:136px!important;
}
.edge-radial-style-panel .edge-radial-elbow{
  left:79px!important;
  top:153px!important;
}
.edge-radial-style-panel .edge-radial-curve{
  left:127px!important;
  top:136px!important;
}
/* 虚线每个小段使用直角端点，避免圆角小段带来的视觉噪声和额外绘制成本。 */
.edge-visible[stroke-dasharray],
.related-canvas-edge[stroke-dasharray]{
  stroke-linecap:butt!important;
}

/* v7.9.40：关系线菜单紧凑化、T 图标修复、虚线比例规范与文字输入框去白边。 */
.edge-radial-style-panel.edge-quick-style-panel{
  width:160px!important;
  height:160px!important;
  min-width:160px!important;
}
/* 八颗按钮使用更小的同心圆半径，保持正圆与上下左右对称。 */
.edge-radial-style-panel .edge-radial-dashed{
  left:22px!important;
  top:22px!important;
}
.edge-radial-style-panel .edge-radial-solid{
  left:64px!important;
  top:4px!important;
}
.edge-radial-style-panel .edge-radial-dotted{
  left:106px!important;
  top:22px!important;
}
.edge-radial-style-panel .edge-radial-label{
  left:4px!important;
  top:64px!important;
}
.edge-radial-style-panel .edge-radial-color{
  left:124px!important;
  top:64px!important;
}
.edge-radial-style-panel .edge-radial-straight{
  left:22px!important;
  top:106px!important;
}
.edge-radial-style-panel .edge-radial-elbow{
  left:64px!important;
  top:124px!important;
}
.edge-radial-style-panel .edge-radial-curve{
  left:106px!important;
  top:106px!important;
}
/* 覆盖旧版“隐藏所有 span”的通用规则，确保文字按钮始终清晰显示 T。 */
.edge-radial-style-panel .edge-radial-text-icon{
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  color:currentColor!important;
  font-size:16px!important;
  font-weight:950!important;
  line-height:1!important;
}
/* 菜单图标直接使用矩形几何：短虚线为正方形，长虚线为 4:1 长方形。 */
.edge-radial-style-panel .edge-radial-dashed svg rect,
.edge-radial-style-panel .edge-radial-dotted svg rect{
  fill:currentColor!important;
  stroke:none!important;
  shape-rendering:crispEdges;
}
/* 关系文字编辑仅保留蓝色输入框，移除外围白色边框、底板与留白。 */
.edge-inline-label-editor{
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:10px!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* v7.9.42：关系线快捷菜单选中态改为深灰色，降低蓝色抢眼感，和线条颜色操作解耦。 */
.edge-quick-style-panel button.active,
.edge-radial-style-panel .edge-radial-btn.active,
.edge-radial-style-panel .edge-radial-btn.active:hover,
.edge-radial-style-panel .edge-radial-btn.active:focus-visible{
  background:#334155!important;
  color:#fff!important;
  border-color:rgba(15,23,42,.28)!important;
  box-shadow:0 10px 24px rgba(51,65,85,.28),0 0 0 1px rgba(255,255,255,.64)!important;
}
/* style: styles/unified-canvas-runtime.css */
/* V9.0-P4.3.0 unified canvas runtime */
.uc-canvas-surface{--uc-canvas-bg:#f4f6f8;--uc-canvas-pattern-ink:rgba(71,85,105,.13);--uc-canvas-pattern-major-ink:rgba(71,85,105,.20);--uc-canvas-grid-size:24px;--uc-canvas-grid-major-size:96px;--uc-canvas-grid-x:0px;--uc-canvas-grid-y:0px;--uc-canvas-grid-major-x:0px;--uc-canvas-grid-major-y:0px;background-color:var(--uc-canvas-bg)!important;background-position:var(--uc-canvas-grid-x) var(--uc-canvas-grid-y),var(--uc-canvas-grid-major-x) var(--uc-canvas-grid-major-y)!important;background-attachment:local!important;transition:background-color .16s ease,color .16s ease}
.uc-canvas-surface[data-canvas-pattern="dots"]{background-image:radial-gradient(circle,var(--uc-canvas-pattern-ink) 1.15px,transparent 1.2px)!important;background-size:var(--uc-canvas-grid-size) var(--uc-canvas-grid-size)!important}
.uc-canvas-surface[data-canvas-pattern="grid"]{background-image:linear-gradient(var(--uc-canvas-pattern-ink) 1px,transparent 1px),linear-gradient(90deg,var(--uc-canvas-pattern-ink) 1px,transparent 1px),linear-gradient(var(--uc-canvas-pattern-major-ink) 1px,transparent 1px),linear-gradient(90deg,var(--uc-canvas-pattern-major-ink) 1px,transparent 1px)!important;background-size:var(--uc-canvas-grid-size) var(--uc-canvas-grid-size),var(--uc-canvas-grid-size) var(--uc-canvas-grid-size),var(--uc-canvas-grid-major-size) var(--uc-canvas-grid-major-size),var(--uc-canvas-grid-major-size) var(--uc-canvas-grid-major-size)!important;background-position:var(--uc-canvas-grid-x) var(--uc-canvas-grid-y),var(--uc-canvas-grid-x) var(--uc-canvas-grid-y),var(--uc-canvas-grid-major-x) var(--uc-canvas-grid-major-y),var(--uc-canvas-grid-major-x) var(--uc-canvas-grid-major-y)!important}
.uc-canvas-surface[data-canvas-pattern="solid"]{background-image:none!important}
.uc-canvas-surface[data-canvas-theme="dark"]{color-scheme:dark}
.uc-canvas-surface[data-canvas-theme="dark"] :is(.canvas-zoom-dock,.lp-canvas-zoom-dock,.uc-minimap-dock){--uc-control-bg:rgba(25,30,38,.94);--uc-control-border:rgba(226,232,240,.18);--uc-control-ink:#e2e8f0}
.uc-canvas-surface>.qt-canvas-background{opacity:0!important}
.uc-fullscreen-button svg,.uc-canvas-settings-button svg,.uc-minimap-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.uc-fullscreen-button,.uc-canvas-settings-button{display:inline-grid!important;place-items:center!important}
.uc-minimap-dock{position:absolute;right:16px;bottom:16px;z-index:42;display:flex;align-items:flex-end;gap:7px;pointer-events:auto}
.uc-minimap-dock.collapsed .uc-minimap{display:none}
.uc-minimap{position:relative;width:210px;height:116px;overflow:hidden;border:1px solid var(--uc-control-border,#dbe1eb);border-radius:14px;background:var(--uc-control-bg,rgba(255,255,255,.94));box-shadow:0 14px 36px rgba(15,23,42,.16);cursor:crosshair;touch-action:none}
.uc-minimap-world{position:absolute;inset:0;pointer-events:none}
.uc-minimap-item{position:absolute;display:block;min-width:3px;min-height:3px;border-radius:2px;background:#8b9bb0;opacity:.72}
.uc-minimap-item.is-note{background:#d6a329}.uc-minimap-item.is-text{background:#8b5cf6}.uc-minimap-item.is-group{border:1px solid #8b5cf6;background:rgba(139,92,246,.10)}.uc-minimap-item.is-current{background:#4f46e5}
.uc-minimap-view{position:absolute;z-index:3;min-width:8px;min-height:6px;border:1.5px solid #6d5dfc;border-radius:3px;background:rgba(109,93,252,.10);box-shadow:0 0 0 1px rgba(255,255,255,.55) inset;cursor:grab;touch-action:none}
.uc-minimap-view.dragging{cursor:grabbing}
.uc-minimap-toggle{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid var(--uc-control-border,#dbe1eb);border-radius:11px;background:var(--uc-control-bg,#fff);color:var(--uc-control-ink,#475569);box-shadow:0 10px 26px rgba(15,23,42,.14);cursor:pointer}
.uc-settings-backdrop{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.35);backdrop-filter:blur(8px)}
.uc-settings-backdrop[hidden]{display:none}
.uc-settings-dialog{width:min(690px,calc(100vw - 32px));max-height:calc(100vh - 36px);overflow:auto;border:1px solid rgba(100,116,139,.22);border-radius:22px;background:#fff;color:#0f172a;box-shadow:0 32px 90px rgba(15,23,42,.28)}
.uc-settings-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px 18px;border-bottom:1px solid #edf0f5}.uc-settings-dialog header small{color:#6d5dfc;font-size:10px;font-weight:950;letter-spacing:.16em}.uc-settings-dialog header h2{margin:5px 0 4px;font-size:24px}.uc-settings-dialog header p{margin:0;color:#64748b;font-size:12px;line-height:1.5}.uc-icon-button{display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc;color:#64748b}.uc-icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.uc-settings-body{display:grid;gap:16px;padding:20px 24px}.uc-setting-block{display:grid;gap:10px}.uc-setting-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.uc-setting-title strong{font-size:13px}.uc-setting-title span{color:#94a3b8;font-size:10px}.uc-segmented{display:grid;grid-template-columns:1fr 1fr;padding:4px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.uc-segmented button{height:36px;border:0;border-radius:9px;background:transparent;color:#64748b;font-weight:850}.uc-segmented button.is-active{background:#fff;color:#5145cd;box-shadow:0 2px 9px rgba(15,23,42,.09)}
.uc-pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.uc-pattern-grid button{display:grid;gap:7px;padding:8px;border:1px solid #e2e8f0;border-radius:13px;background:#fff;color:#475569;text-align:left}.uc-pattern-grid button.is-active{border-color:#8b7cfb;box-shadow:0 0 0 2px rgba(109,93,252,.11)}.uc-pattern-grid i{height:54px;border-radius:8px;background-color:#f4f6f8}.uc-pattern-grid .is-dots{background-image:radial-gradient(circle,rgba(71,85,105,.24) 1px,transparent 1.2px);background-size:14px 14px}.uc-pattern-grid .is-grid{background-image:linear-gradient(rgba(71,85,105,.17) 1px,transparent 1px),linear-gradient(90deg,rgba(71,85,105,.17) 1px,transparent 1px);background-size:14px 14px}.uc-pattern-grid b{font-size:11px}
.uc-color-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.uc-color-swatch{display:flex;align-items:center;gap:8px;min-height:43px;padding:6px 8px;border:1px solid #e2e8f0;border-radius:11px;background:#fff;color:#475569;text-align:left}.uc-color-swatch.is-active{border-color:#8b7cfb;box-shadow:0 0 0 2px rgba(109,93,252,.11)}.uc-color-swatch span{width:28px;height:28px;flex:0 0 auto;border:1px solid rgba(15,23,42,.10);border-radius:8px;background:var(--uc-swatch)}.uc-color-swatch b{font-size:10px}
.uc-settings-preview{position:relative;height:120px;overflow:hidden;border:1px solid #e2e8f0;border-radius:14px}.uc-settings-preview>span{position:absolute;width:54px;height:30px;border:1px solid rgba(100,116,139,.25);border-radius:7px;background:rgba(255,255,255,.86);box-shadow:0 5px 14px rgba(15,23,42,.08)}.uc-settings-preview>span:nth-child(1){left:32px;top:44px}.uc-settings-preview>span:nth-child(2){left:135px;top:22px}.uc-settings-preview>span:nth-child(3){right:36px;top:62px}.uc-settings-preview svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#7c6df6;stroke-width:3}
.uc-settings-dialog>footer{display:flex;justify-content:flex-end;gap:9px;padding:16px 24px;border-top:1px solid #edf0f5}.uc-settings-dialog>footer button{min-width:88px;height:38px;border:1px solid #dbe1eb;border-radius:10px;background:#fff;color:#475569;font-weight:850}.uc-settings-dialog>footer .is-primary{border-color:#6d5dfc;background:#6d5dfc;color:#fff}
@media(max-width:720px){.uc-minimap{width:166px;height:92px}.uc-color-list{grid-template-columns:repeat(2,1fr)}.uc-pattern-grid{grid-template-columns:1fr}.uc-settings-dialog{border-radius:17px}.uc-settings-body{padding:16px}.uc-settings-dialog>header{padding:18px 16px}.uc-settings-dialog>footer{padding:14px 16px}}
.uc-canvas-surface>.qw-background{opacity:0!important}
.uc-canvas-surface:fullscreen,.uc-canvas-surface:-webkit-full-screen{width:100vw!important;height:100vh!important}

/* V9.0-P4.3.2 selection categories and screen-space alignment guides */
.uc-selection-filter{
  position:absolute;
  z-index:690;
  display:flex;
  align-items:center;
  gap:4px;
  padding:5px;
  border:1px solid rgba(100,116,139,.22);
  border-radius:11px;
  background:rgba(255,255,255,.98);
  box-shadow:0 14px 38px rgba(15,23,42,.18);
  backdrop-filter:blur(10px);
  pointer-events:auto;
}
.uc-selection-filter[hidden]{display:none!important}
.uc-selection-filter button{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  padding:0 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#64748b;
  font:inherit;
  font-size:11px;
  font-weight:850;
  cursor:pointer;
  white-space:nowrap;
}
.uc-selection-filter button small{
  display:grid;
  place-items:center;
  min-width:18px;
  height:18px;
  padding:0 4px;
  border-radius:999px;
  background:#eef2f7;
  color:#64748b;
  font-size:9px;
}
.uc-selection-filter button.is-active{
  background:#eef2ff;
  color:#4f46e5;
}
.uc-selection-filter button.is-active small{
  background:#4f46e5;
  color:#fff;
}
.uc-alignment-guides{
  position:absolute;
  inset:0;
  z-index:680;
  overflow:hidden;
  pointer-events:none;
}
.uc-alignment-guides[hidden]{display:none!important}
.uc-alignment-guide{
  position:absolute;
  display:block;
  box-sizing:border-box;
  pointer-events:none;
}
.uc-alignment-guide.is-vertical{
  width:0;
  border-left:1px dashed #ec4899;
}
.uc-alignment-guide.is-horizontal{
  height:0;
  border-top:1px dashed #ec4899;
}
.uc-alignment-guide[hidden]{display:none!important}

/* V9.0-P4.3.4 · hover selection filter, outline-only bounds and stabilized edge toolbar */
.uc-selection-filter-wrap{position:relative;display:flex;align-items:center;align-self:stretch;flex:0 0 auto}
.uc-selection-filter-wrap[hidden]{display:none!important}
.uc-selection-filter-trigger{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;
  width:auto!important;min-width:78px!important;height:34px!important;padding:0 9px!important;border:0!important;
  border-radius:8px!important;background:transparent!important;color:#475569!important;font-size:12px!important;font-weight:760!important;
  white-space:nowrap!important;cursor:pointer!important
}
.uc-selection-filter-trigger:hover:not(:disabled),.uc-selection-filter-trigger[aria-expanded="true"],.uc-selection-filter-trigger.is-filtered{background:#eef2ff!important;color:#4338ca!important}
.uc-selection-filter-trigger:disabled{cursor:default!important;opacity:1!important}
.uc-selection-filter-trigger svg{display:block;width:14px!important;height:14px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.uc-selection-filter-trigger svg[hidden]{display:none!important}
.uc-selection-filter-inline{
  position:absolute!important;left:0!important;top:calc(100% + 8px)!important;z-index:980!important;
  width:236px!important;min-width:236px!important;padding:6px!important;border:1px solid #e2e8f0!important;border-radius:10px!important;
  background:#fff!important;box-shadow:0 10px 26px rgba(15,23,42,.14)!important;transform:none!important
}
.uc-selection-filter-inline[hidden]{display:none!important}
.uc-selection-filter-inline button{
  display:grid!important;grid-template-columns:20px minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;
  width:100%!important;min-height:38px!important;padding:0 9px!important;border:0!important;border-radius:7px!important;background:transparent!important;
  color:#475569!important;font-size:12px!important;text-align:left!important;cursor:pointer!important
}
.uc-selection-filter-inline button:hover{background:#f8fafc!important;color:#1e293b!important}
.uc-selection-filter-inline button.is-active{background:#eef2ff!important;color:#4338ca!important;font-weight:760!important}
.uc-selection-filter-inline button small{color:#94a3b8!important;font-size:11px!important;font-variant-numeric:tabular-nums!important}
.uc-selection-filter-inline button.is-active small{color:#6366f1!important}
.uc-selection-filter-check{position:relative;display:block;width:16px;height:16px;border:1.5px solid #cbd5e1;border-radius:4px;background:#fff}
.uc-selection-filter-inline button.is-active .uc-selection-filter-check{border-color:#6366f1;background:#6366f1}
.uc-selection-filter-inline button.is-active .uc-selection-filter-check::after{content:"";position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.uc-selection-bounds{
  position:absolute;z-index:548;box-sizing:border-box;border:1px solid #2898ff;background:transparent;
  pointer-events:none
}
.uc-selection-bounds[hidden]{display:none!important}
.uc-selection-bounds>i{position:absolute;width:8px;height:8px;box-sizing:border-box;border:1px solid #2898ff;border-radius:1px;background:#fff}
.uc-selection-bounds>[data-corner="nw"]{left:-4px;top:-4px}.uc-selection-bounds>[data-corner="ne"]{right:-4px;top:-4px}.uc-selection-bounds>[data-corner="se"]{right:-4px;bottom:-4px}.uc-selection-bounds>[data-corner="sw"]{left:-4px;bottom:-4px}

.uc-floating-toolbar{position:absolute;z-index:570;pointer-events:auto}
.uc-floating-toolbar[hidden]{display:none!important}
.uc-toolbar-shell{min-width:0;filter:none}
.uc-toolbar-main{
  display:flex;align-items:center;gap:3px;min-height:44px;padding:5px;
  border:1px solid rgba(148,163,184,.34);border-radius:13px;background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.12)
}
.uc-toolbar-btn{
  position:relative;display:grid;place-items:center;width:34px;min-width:34px;height:34px;padding:0;
  border:1px solid transparent;border-radius:9px;background:transparent;color:#334155;box-shadow:none;cursor:pointer
}
.uc-toolbar-btn:hover:not(:disabled),.uc-toolbar-btn:focus-visible,.uc-toolbar-btn.active,.uc-toolbar-btn[aria-expanded="true"]{background:#e0e7ff;color:#4338ca;border-color:#a5b4fc;outline:0}
.uc-toolbar-btn:disabled{opacity:.35;cursor:not-allowed;filter:grayscale(1)}
.uc-toolbar-grip{margin-right:2px;border-radius:9px 4px 4px 9px;color:#64748b;cursor:grab}
.uc-toolbar-grip:active,.uc-toolbar-shell.dragging .uc-toolbar-grip{background:#eef2ff;color:#4338ca;cursor:grabbing}
.uc-toolbar-shell.manual-position .uc-toolbar-grip{background:#f1f5f9;color:#334155}
.uc-toolbar-btn svg,.uc-toolbar-popover svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.uc-toolbar-divider{display:block;width:1px;height:24px;margin:0 3px;background:#e5e7eb}
.uc-toolbar-panels{position:relative}
.uc-toolbar-popover{
  position:absolute;left:0;top:8px;z-index:4;min-width:170px;padding:10px;
  border:1px solid rgba(148,163,184,.32);border-radius:13px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.15);
  opacity:0;transform:scaleY(.96);transform-origin:top center;transition:opacity .14s ease,transform .14s ease;will-change:opacity,transform
}
.uc-toolbar-popover.is-above{transform-origin:bottom center}
.uc-toolbar-popover.show{opacity:1;transform:scaleY(1)}
.uc-toolbar-popover.is-closing{opacity:0;transform:scaleY(.96);pointer-events:none}
.uc-toolbar-popover[hidden]{display:none!important}
.kg-perf-no-animations .uc-toolbar-popover{transition:none!important}
.kg-perf-no-shadows .uc-toolbar-main,.kg-perf-no-shadows .uc-toolbar-popover{box-shadow:none!important}
.uc-toolbar-panel-title{display:block;margin:1px 2px 9px;color:#475569;font-size:12px;font-weight:850}
.uc-toolbar-panel-title.secondary{margin-top:12px;padding-top:10px;border-top:1px solid #e2e8f0}
.uc-toolbar-btn[data-tooltip]::after,.uc-edge-toolbar-popover [data-tooltip]::after{
  content:attr(data-tooltip);position:absolute;z-index:240;left:50%;bottom:calc(100% + 8px);max-width:220px;padding:6px 9px;border-radius:7px;
  background:#30343b;color:#fff;box-shadow:0 8px 20px rgba(15,23,42,.22);font:650 12px/1.25 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,4px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease;transition-delay:0s
}
.uc-toolbar-btn[data-tooltip]::before,.uc-edge-toolbar-popover [data-tooltip]::before{
  content:"";position:absolute;z-index:241;left:50%;bottom:calc(100% + 3px);border:5px solid transparent;border-top-color:#30343b;
  opacity:0;visibility:hidden;pointer-events:none;transform:translateX(-50%);transition:opacity .12s ease,visibility .12s ease;transition-delay:0s
}
.uc-toolbar-btn[data-tooltip]:hover::after,.uc-toolbar-btn[data-tooltip]:focus-visible::after,.uc-edge-toolbar-popover [data-tooltip]:hover::after,.uc-edge-toolbar-popover [data-tooltip]:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0);transition-delay:260ms}
.uc-toolbar-btn[data-tooltip]:hover::before,.uc-toolbar-btn[data-tooltip]:focus-visible::before,.uc-edge-toolbar-popover [data-tooltip]:hover::before,.uc-edge-toolbar-popover [data-tooltip]:focus-visible::before{opacity:1;visibility:visible;transition-delay:260ms}
.uc-edge-toolbar{min-width:0}
.uc-edge-toolbar-main{width:max-content}
.uc-edge-color-dot{display:block;width:20px;height:20px;border:2px solid #fff;border-radius:50%;background:var(--uc-edge-color,#64748b);box-shadow:0 0 0 1px rgba(100,116,139,.28)}
.uc-edge-text-icon{font:800 18px/1 ui-sans-serif,system-ui,sans-serif}
.uc-edge-toolbar-popover{width:268px;max-height:min(420px,calc(100vh - 24px));padding:12px;overflow:auto}
.uc-edge-option-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.uc-edge-option-grid>button{position:relative;display:grid;place-items:center;height:36px;padding:0;border:1px solid transparent;border-radius:8px;background:#f8fafc;color:#64748b;cursor:pointer}
.uc-edge-option-grid>button:hover,.uc-edge-option-grid>button:focus-visible,.uc-edge-option-grid>button.active{border-color:#c7d2fe;background:#eef2ff;color:#4338ca;outline:0}
.uc-edge-arrow-grid>button{font-size:19px;font-weight:700}
.uc-edge-width-row{display:grid;grid-template-columns:minmax(150px,1fr) 48px;align-items:center;gap:10px}
.uc-edge-width-row input{width:100%;accent-color:#6d5dfc}.uc-edge-width-row output{display:grid;place-items:center;height:34px;border-radius:8px;background:#f8fafc;color:#475569;font-size:12px;font-variant-numeric:tabular-nums}
.node-style-toolbar.mixed-selection-context .node-style-toolbar-main>.node-toolbar-btn:not(.node-toolbar-grip){opacity:.28;pointer-events:none}
.node-style-toolbar.mixed-selection-context .node-style-toolbar-panels{display:none!important}
.qw-selection-toolbar-pro.mixed-selection-context>button:not(.danger),.qw-selection-toolbar-pro.mixed-selection-context>.qw-selection-menu-wrap,.qw-selection-toolbar-pro.mixed-selection-context>.qw-selection-color-wrap{opacity:.3;pointer-events:none}
@media(max-width:900px){.uc-selection-bounds{display:none!important}.uc-edge-toolbar{max-width:calc(100vw - 18px)}}
.uc-selection-filter-inline{display:block!important}
.uc-edge-batch-count{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;padding:0 7px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.uc-edge-batch-count[hidden]{display:none!important}
body.qw-selection-toolbar-motion .uc-selection-bounds,.stage.graph-card-dragging .uc-selection-bounds,.stage.graph-box-selecting .uc-selection-bounds,.stage.panning .uc-selection-bounds{display:none!important}
.uc-selection-filter-wrap.is-standalone{position:absolute;z-index:690;align-self:auto;padding:5px;border:1px solid rgba(100,116,139,.18);border-radius:11px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.13);pointer-events:auto}
.uc-selection-filter-wrap.is-standalone .uc-selection-filter-inline{left:50%!important;top:calc(100% + 8px)!important;transform:translateX(-50%)!important}

/* V9.0-P4.3.9 · unified edge preset palette and exact submenu anchoring */
.qw-edge-quick-menu.uc-toolbar-shell{
  display:block;
  flex-wrap:nowrap;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}
.qw-edge-quick-menu.uc-toolbar-shell .uc-edge-toolbar-panels{
  position:relative;
  width:100%;
  height:0;
}
.uc-edge-color-popover{width:260px;min-width:260px;overflow:visible}
.uc-edge-color-grid{
  display:grid;
  grid-template-columns:repeat(8,24px);
  gap:6px;
  margin:6px 0 10px;
}
.uc-edge-color-grid>.uc-edge-color-swatch{
  position:relative;
  display:block;
  width:24px;
  min-width:24px;
  height:24px;
  padding:0;
  border:1px solid rgba(15,23,42,.18);
  border-radius:7px;
  background:var(--uc-edge-swatch,#fff);
  box-shadow:none;
  cursor:pointer;
  transition:transform .12s ease,border-color .12s ease;
}
.uc-edge-color-grid>.uc-edge-color-swatch:hover,
.uc-edge-color-grid>.uc-edge-color-swatch:focus-visible{
  transform:scale(1.08);
  border-color:#818cf8;
  outline:0;
}
.uc-edge-color-grid>.uc-edge-color-swatch.active::after{
  content:"";
  position:absolute;
  inset:5px;
  border:2px solid currentColor;
  border-radius:50%;
  mix-blend-mode:difference;
}
.uc-edge-toolbar-popover .uc-edge-custom-color-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:100%;
  min-width:0;
  height:34px;
  padding:0 10px;
  border:1px solid #dbe4ef;
  border-radius:9px;
  background:#f8fafc;
  color:#334155;
  box-shadow:none;
  font-size:12px;
  font-weight:750;
  cursor:pointer;
}
.uc-edge-toolbar-popover .uc-edge-custom-color-btn:hover,
.uc-edge-toolbar-popover .uc-edge-custom-color-btn:focus-visible{
  border-color:#a5b4fc;
  background:#eef2ff;
  color:#4338ca;
  outline:0;
}
.uc-edge-toolbar-popover .uc-edge-custom-color-btn svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
/* style: styles/home-graph-components.css */
/* 新版图谱功能组件兼容层：只承载新增图元、工具条与交互态，不覆盖当前项目的页面壳层。 */
.knowledge-card .node-title{justify-content:var(--node-title-justify,center);text-align:var(--node-text-align,center)}

/* V9.0-P4.2.0 graph appearance model hooks. Standard remains the legacy default. */
.knowledge-card.card-style-standard .card-body{background:var(--node-fill-color,#fff)}
.knowledge-card.card-style-sticky .card-body{border-radius:12px;background:var(--node-fill-color,#fef3c7)}
.knowledge-card.card-style-rounded .node-top{display:none}
.knowledge-card.card-style-rounded .node-title{height:100%;border-top:0;background:transparent;padding:14px}

/* V9.0-P4.2.1 节点外观系统与图标式悬浮工具栏 */
.knowledge-card .card-body{
  box-sizing:border-box;
  background:var(--node-fill-color,#fff);
  border:var(--node-border-width,1px) var(--node-border-style,solid) var(--node-border-color,#cbd5e1);
}
.knowledge-card .node-title{
  color:var(--node-text-color,#0f172a);
  background:transparent;
  font-size:var(--node-font-size,15px)!important;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.knowledge-card.card-style-standard .node-top{
  border-bottom:1px solid color-mix(in srgb,var(--node-border-color,#cbd5e1) 55%,transparent);
}
.knowledge-card.card-style-standard .node-title{border-top:0}
.knowledge-card.card-style-sticky{border-radius:12px;transform:rotate(-.2deg)}
.knowledge-card.card-style-sticky .card-body{
  position:relative;
  border-radius:12px;
  box-shadow:0 10px 26px rgba(100,75,20,.14);
}
.knowledge-card.card-style-sticky .card-body::after{
  content:"";position:absolute;right:0;bottom:0;width:20px;height:20px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--node-border-color,#f59e0b) 22%,transparent) 0 50%,rgba(255,255,255,.78) 51% 100%);
  pointer-events:none;
}
.knowledge-card.card-style-sticky .node-top{display:none}
.knowledge-card.card-style-sticky .node-title{height:100%;border-top:0;padding:14px 14px 18px;align-items:flex-start;justify-content:flex-start}
.knowledge-card.card-style-rounded{
  border-radius:24px;
  overflow:visible;
}
.knowledge-card.card-style-rounded .card-body{
  border-radius:24px;overflow:hidden;
  box-shadow:0 10px 26px rgba(30,64,175,.12);
}
.knowledge-card.card-style-rounded:hover{box-shadow:0 12px 30px rgba(30,64,175,.18)}
.knowledge-card.card-style-rounded.active,.knowledge-card.card-style-rounded.multi-selected{box-shadow:0 0 0 3px rgba(37,99,235,.72),0 14px 32px rgba(30,64,175,.18)}
.knowledge-card.card-style-rounded .node-top{display:none}
.knowledge-card.card-style-rounded .node-title{
  height:100%;border:0;padding:14px;overflow:auto;
  align-items:center;justify-content:center;text-align:var(--node-text-align,center);
}

.node-style-toolbar{
  position:absolute;z-index:48;display:none;pointer-events:auto;
}
.node-style-toolbar.show{display:block}
.node-style-toolbar-main{
  display:flex;align-items:center;gap:3px;padding:5px;
  background:#fff;border:1px solid rgba(148,163,184,.34);border-radius:13px;
  box-shadow:0 8px 22px rgba(15,23,42,.12);
}
.node-toolbar-grip{cursor:grab;color:#64748b;border-right-color:#e2e8f0!important;border-radius:9px 4px 4px 9px!important;margin-right:2px}
.node-toolbar-grip:active,.node-style-toolbar.dragging .node-toolbar-grip{cursor:grabbing;background:#eef2ff;color:#4338ca}
.node-style-toolbar.manual-position .node-toolbar-grip{background:#f1f5f9;color:#334155}
.node-toolbar-btn,.node-style-option{
  width:34px;height:34px;min-width:34px;padding:0;display:grid;place-items:center;border-radius:9px;
  border:1px solid transparent;background:transparent;color:#334155;box-shadow:none;
}
.node-toolbar-btn:hover,.node-style-option:hover{background:#f1f5f9;border-color:#dbe4ef;transform:none}
.node-toolbar-btn[aria-expanded="true"],.node-style-option.active{background:#e0e7ff;color:#4338ca;border-color:#a5b4fc}
.node-toolbar-btn:disabled,.node-style-option:disabled{opacity:.35;cursor:not-allowed}
.node-toolbar-btn svg,.node-style-option svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.node-style-toolbar-panels{position:relative}
.node-style-popover{
  position:absolute;left:0;top:8px;min-width:170px;padding:10px;background:#fff;
  border:1px solid rgba(148,163,184,.32);border-radius:13px;box-shadow:0 10px 28px rgba(15,23,42,.15);
}
.node-style-popover[hidden]{display:none!important}
.node-style-popover.show{display:block}
.node-style-panel-title{font-size:12px;font-weight:850;color:#475569;margin:1px 2px 8px}
.node-style-panel-title.secondary{margin-top:12px;padding-top:10px;border-top:1px solid #e2e8f0}
.node-style-icon-grid{display:grid;grid-template-columns:repeat(4,34px);gap:6px}
.node-style-icon-grid.compact{grid-template-columns:repeat(4,34px);margin-bottom:10px}
.node-style-type-panel .node-style-icon-grid{grid-template-columns:repeat(3,38px)}
.node-style-type-panel .node-style-option{width:38px;height:38px}
.node-style-align-panel{min-width:190px}
.node-style-align-panel .node-style-icon-grid{grid-template-columns:repeat(4,34px)}
.node-style-more-panel .node-style-icon-grid{grid-template-columns:repeat(3,34px)}
.node-style-more-panel [data-node-toolbar-action="more:delete"]{color:#dc2626}
.node-style-more-panel [data-node-toolbar-action="more:delete"]:hover{background:#fee2e2;border-color:#fecaca}
.node-color-grid{display:grid;grid-template-columns:repeat(8,24px);gap:6px;margin:6px 0 10px}
.node-color-swatch{
  width:24px;height:24px;min-width:24px;padding:0;border-radius:7px;background:var(--swatch,#fff);border:1px solid rgba(15,23,42,.18);box-shadow:none;position:relative;
}
.node-color-swatch:hover{transform:scale(1.08)}
.node-color-swatch.active::after{content:"";position:absolute;inset:5px;border:2px solid currentColor;border-radius:50%;mix-blend-mode:difference}
.node-color-swatch.transparent{background:linear-gradient(135deg,#fff 0 46%,#ef4444 47% 53%,#fff 54% 100%)}
.node-style-color-panel,.node-style-border-panel{min-width:260px}
.node-style-control-row{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:12px;color:#475569}
.node-style-control-row label{display:flex;align-items:center;gap:5px;white-space:nowrap}
.node-style-control-row input[type="color"]{width:30px;height:26px;padding:1px;border:1px solid #cbd5e1;border-radius:7px;background:#fff}
.node-style-control-row input[type="range"]{width:92px}
.node-style-control-row output{min-width:34px;text-align:right;font-variant-numeric:tabular-nums}
.font-icon{font-weight:850;line-height:1}.font-icon.small{font-size:12px}.font-icon.medium{font-size:15px}.font-icon.large{font-size:19px}.font-icon.xlarge{font-size:23px}
.size-preset-icon{display:block;border:2px solid currentColor;border-radius:4px}.size-preset-icon.compact{width:13px;height:13px}.size-preset-icon.standard{width:18px;height:16px}.size-preset-icon.large{width:22px;height:19px}
.node-style-related-actions{display:flex;gap:6px;margin-top:10px;padding-top:9px;border-top:1px solid #e2e8f0}
.node-style-related-actions[hidden]{display:none}
@media(max-width:720px),(pointer:coarse){
  .node-style-toolbar{max-width:calc(100vw - 16px)}
  .node-style-toolbar-main{overflow-x:auto;max-width:calc(100vw - 16px)}
  .node-style-popover{left:auto;right:0;max-width:calc(100vw - 16px)}
}


/* V9.0-P4.2.2 统一颜色面板、文字颜色与节点原位编辑 */
.node-style-color-panel,.node-style-border-panel,.node-style-text-color-panel{min-width:260px}
.node-style-text-color-panel{min-width:260px}
.kg-color-picker{display:grid;gap:9px;min-width:282px}
.kg-color-picker-sv{
  --picker-hue:0;
  position:relative;height:142px;border-radius:11px;overflow:hidden;cursor:crosshair;
  background:
    linear-gradient(to top,#000,transparent),
    linear-gradient(to right,#fff,hsl(var(--picker-hue) 100% 50%));
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.14);
  touch-action:none;
}
.kg-color-picker-marker{
  position:absolute;width:14px;height:14px;border:2px solid #fff;border-radius:50%;
  transform:translate(-50%,-50%);box-shadow:0 0 0 1px rgba(15,23,42,.65),0 2px 5px rgba(15,23,42,.22);
  pointer-events:none;
}
.kg-color-picker-slider-row{display:grid;grid-template-columns:34px minmax(0,1fr) 40px;align-items:center;gap:8px;font-size:11px;color:#64748b}
.kg-color-picker-slider-row:not(:has(output)){grid-template-columns:34px minmax(0,1fr)}
.kg-color-picker-slider-row input[type="range"]{width:100%;margin:0;accent-color:#6366f1}
.kg-color-picker-slider-row [data-color-picker-hue]{
  appearance:none;height:10px;border-radius:999px;
  background:linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);
}
.kg-color-picker-slider-row [data-color-picker-hue]::-webkit-slider-thumb,
.kg-color-picker-alpha-track input::-webkit-slider-thumb{
  appearance:none;width:15px;height:15px;border-radius:50%;background:#fff;border:1px solid #64748b;box-shadow:0 1px 4px rgba(15,23,42,.25)
}
.kg-color-picker-alpha-track{
  --picker-alpha-color:#000;
  border-radius:999px;padding:0;
  background:
    linear-gradient(90deg,transparent,var(--picker-alpha-color)),
    linear-gradient(45deg,#d7dee8 25%,transparent 25%,transparent 75%,#d7dee8 75%),
    linear-gradient(45deg,#d7dee8 25%,#fff 25%,#fff 75%,#d7dee8 75%);
  background-size:auto,10px 10px,10px 10px;background-position:0 0,0 0,5px 5px;
}
.kg-color-picker-alpha-track input{appearance:none;display:block;width:100%;height:10px;margin:0;background:transparent}
.kg-color-picker-slider-row output{text-align:right;font-variant-numeric:tabular-nums}
.kg-color-picker-fields{display:grid;grid-template-columns:34px 1fr 34px;gap:8px;align-items:center}
.kg-color-picker-preview{width:34px;height:30px;border-radius:8px;border:1px solid rgba(15,23,42,.16)}
.kg-color-picker-fields label{display:flex;align-items:center;gap:4px;height:30px;padding:0 9px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#64748b;font-size:12px}
.kg-color-picker-fields input{min-width:0;width:100%;border:0;outline:0;text-transform:uppercase;font:600 12px/1 ui-monospace,SFMono-Regular,Consolas,monospace;color:#0f172a}
.kg-color-picker-eyedropper{width:34px;height:30px;min-width:34px;padding:0;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#475569;box-shadow:none}
.kg-color-picker-transparent{height:30px;border:1px dashed #cbd5e1;border-radius:8px;background:linear-gradient(135deg,#fff 0 47%,#ef4444 48% 52%,#fff 53% 100%);color:#475569;font-size:12px}
.kg-color-picker-section{display:grid;gap:6px;padding-top:7px;border-top:1px solid #eef2f7}
.kg-color-picker-section[hidden]{display:none}
.kg-color-picker-section>span{font-size:11px;font-weight:750;color:#64748b}
.kg-color-picker-swatches{display:grid;grid-template-columns:repeat(9,24px);gap:6px}
.kg-color-picker-swatch{
  width:24px;height:24px;min-width:24px;padding:0;border-radius:7px;border:1px solid rgba(15,23,42,.16);
  background:var(--picker-swatch);box-shadow:none;position:relative;
}
.kg-color-picker-swatch:hover{transform:scale(1.08)}
.kg-color-picker-swatch.active::after{content:"";position:absolute;inset:5px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(15,23,42,.7)}
.node-border-width-row{margin-top:10px;padding-top:9px;border-top:1px solid #eef2f7}
.node-inline-edit-host{position:relative!important;overflow:visible!important}
.node-inline-text-editor{
  position:absolute;inset:4px;z-index:5;box-sizing:border-box;width:calc(100% - 8px);height:calc(100% - 8px);
  margin:0;padding:8px 9px;border:2px solid #6366f1;border-radius:8px;resize:none;outline:0;
  background:rgba(255,255,255,.98);color:var(--node-text-color,#0f172a);
  font:inherit;font-size:var(--node-font-size,15px);line-height:1.45;text-align:var(--node-text-align,left);
  box-shadow:0 8px 24px rgba(79,70,229,.22);
}
.knowledge-card.node-inline-editing{z-index:45!important}
.knowledge-card.node-inline-editing .node-size-tools{display:none!important}
.graph-inline-text-editing .node-growth-handle-layer{display:none!important}

/* V9.0-P4.2.3 · 可拖拽节点工具栏、独立调色窗与独立文本元素 */
.node-custom-color-btn{
  width:100%;height:34px;display:flex;align-items:center;justify-content:center;gap:7px;
  border:1px solid #dbe4ef;border-radius:9px;background:#f8fafc;color:#334155;box-shadow:none;font-size:12px;font-weight:750;
}
.node-custom-color-btn:hover{background:#eef2ff;border-color:#a5b4fc;color:#4338ca;transform:none}
.node-custom-color-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.node-style-toolbar.text-element-context [data-node-toolbar-panel="type"],
.node-style-toolbar.text-element-context [data-node-toolbar-panel="fill"],
.node-style-toolbar.text-element-context [data-node-toolbar-panel="border"],
.node-style-toolbar.text-element-context [data-node-toolbar-panel="align"]{display:none!important}
.node-style-toolbar.text-element-context .node-style-size-panel .secondary,
.node-style-toolbar.text-element-context .node-style-size-panel .secondary + .node-style-icon-grid{display:none!important}

.graph-floating-color-window{
  position:absolute;z-index:72;width:326px;max-width:calc(100% - 20px);display:none;
  background:rgba(255,255,255,.985);border:1px solid rgba(148,163,184,.38);border-radius:15px;
  box-shadow:0 24px 64px rgba(15,23,42,.24);backdrop-filter:blur(18px);overflow:hidden;pointer-events:auto;
}
.graph-floating-color-window.show{display:block}
.graph-floating-color-head{height:42px;display:flex;align-items:center;gap:8px;padding:0 8px;border-bottom:1px solid #e2e8f0;background:#f8fafc;user-select:none}
.graph-floating-color-head strong{flex:1;font-size:13px;color:#1e293b}
.graph-floating-color-grip,.graph-floating-color-close{
  width:30px;height:30px;min-width:30px;padding:0;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:#64748b;box-shadow:none;
}
.graph-floating-color-grip{cursor:grab}.graph-floating-color-window.dragging .graph-floating-color-grip{cursor:grabbing;background:#e0e7ff;color:#4338ca}
.graph-floating-color-close:hover,.graph-floating-color-grip:hover{background:#e2e8f0;color:#0f172a;transform:none}
.graph-floating-color-grip svg,.graph-floating-color-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.graph-floating-color-grip circle{fill:currentColor;stroke:none}
.graph-floating-color-body{padding:12px}
.graph-floating-color-body.kg-color-picker{min-width:0}

.graph-text-element{
  position:absolute;z-index:9;box-sizing:border-box;background:transparent;border:0;box-shadow:none;
  color:var(--text-element-color,#0f172a);cursor:move;touch-action:none;user-select:none;
}
.graph-text-element-content{
  width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;
  justify-content:center;padding:6px 8px;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;
  color:var(--text-element-color,#0f172a);font-size:var(--text-element-font-size,20px);font-weight:650;line-height:1.45;
  text-align:var(--text-element-align,center);
}
.graph-text-element.active{outline:2px solid #6366f1;outline-offset:4px;border-radius:6px}
.graph-text-element:hover:not(.active){outline:1px dashed rgba(99,102,241,.48);outline-offset:4px;border-radius:6px}
.graph-text-element.node-inline-editing{z-index:46;outline:2px solid #6366f1;outline-offset:4px}
.graph-text-element .node-inline-text-editor{
  color:var(--text-element-color,#0f172a);font-size:var(--text-element-font-size,20px);text-align:var(--text-element-align,center);
}

@media(max-width:720px),(pointer:coarse){
  .graph-floating-color-window{width:min(326px,calc(100% - 16px))}
}


/* V9.0-P4.2.4 · 悬停菜单、相关画布快捷入口与文本元素八向缩放 */
.home-text-tool-icon{
  display:grid;place-items:center;width:22px;height:22px;
  font:900 21px/1 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:currentColor;pointer-events:none;transform:translateY(-.5px);
}
.node-style-popover{transform-origin:top center}
.node-style-popover.is-above{transform-origin:bottom center}
.node-style-toolbar.text-element-context [data-node-toolbar-action="related-canvas"]{display:none!important}
.node-style-toolbar [data-node-toolbar-action="related-canvas"] svg{stroke-width:1.65}
.node-style-more-panel{min-width:122px}
.node-style-more-panel .node-style-icon-grid{grid-template-columns:repeat(3,34px)}

.graph-text-element-content{
  overflow:hidden!important;
  scrollbar-width:none;
}
.graph-text-element-content::-webkit-scrollbar,
.graph-text-element .node-inline-text-editor::-webkit-scrollbar{display:none;width:0;height:0}
.graph-text-element .node-inline-text-editor{overflow:hidden!important;scrollbar-width:none}
.graph-element-resize-layer{position:absolute;inset:0;z-index:9;pointer-events:none}
.graph-element-resize-handle{
  --handle-size:10px;
  position:absolute;display:none;box-sizing:border-box;pointer-events:auto;
  width:var(--handle-size);height:var(--handle-size);border:2px solid #4f46e5;border-radius:50%;
  background:#fff;box-shadow:0 1px 5px rgba(30,41,59,.28);touch-action:none;
}
.graph-text-element.active:not(.node-inline-editing) .graph-element-resize-handle{display:block}
.graph-element-resize-handle:hover{background:#eef2ff;box-shadow:0 0 0 3px rgba(99,102,241,.16),0 2px 7px rgba(30,41,59,.25)}
.graph-element-resize-handle.handle-nw{left:-9px;top:-9px;cursor:nwse-resize}
.graph-element-resize-handle.handle-ne{right:-9px;top:-9px;cursor:nesw-resize}
.graph-element-resize-handle.handle-se{right:-9px;bottom:-9px;cursor:nwse-resize}
.graph-element-resize-handle.handle-sw{left:-9px;bottom:-9px;cursor:nesw-resize}
.graph-element-resize-handle.handle-n,
.graph-element-resize-handle.handle-s{width:22px;height:8px;border-radius:999px;left:50%;margin-left:-11px}
.graph-element-resize-handle.handle-n{top:-8px;cursor:ns-resize}
.graph-element-resize-handle.handle-s{bottom:-8px;cursor:ns-resize}
.graph-element-resize-handle.handle-e,
.graph-element-resize-handle.handle-w{width:8px;height:22px;border-radius:999px;top:50%;margin-top:-11px}
.graph-element-resize-handle.handle-e{right:-8px;cursor:ew-resize}
.graph-element-resize-handle.handle-w{left:-8px;cursor:ew-resize}
.graph-element-resizing .graph-text-element.active{cursor:default}
.graph-element-resizing .node-style-toolbar{pointer-events:none;opacity:.72}
@media(max-width:720px),(pointer:coarse){
  .graph-element-resize-handle{--handle-size:14px}
  .graph-element-resize-handle.handle-nw{left:-11px;top:-11px}.graph-element-resize-handle.handle-ne{right:-11px;top:-11px}
  .graph-element-resize-handle.handle-se{right:-11px;bottom:-11px}.graph-element-resize-handle.handle-sw{left:-11px;bottom:-11px}
}

/* V9.0-P4.2.5 · 紧贴文本选区、固定屏幕线宽与文字排版工具 */
.knowledge-card .node-title{
  font-family:var(--node-font-family,ui-sans-serif,system-ui,sans-serif);
  font-weight:var(--node-font-weight,800);
  letter-spacing:var(--node-letter-spacing,0px);
}
.node-inline-text-editor{
  font-family:var(--node-font-family,ui-sans-serif,system-ui,sans-serif)!important;
  font-weight:var(--node-font-weight,700)!important;
  letter-spacing:var(--node-letter-spacing,0px)!important;
}
.node-toolbar-letter-icon{
  display:grid;place-items:center;width:20px;height:20px;
  font:800 18px/1 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.node-toolbar-bold-icon{font-weight:950}
.node-toolbar-btn.active,[data-node-toolbar-action="font-bold"][aria-pressed="true"]{
  background:#e0e7ff;color:#4338ca;border-color:#a5b4fc;
}
.node-style-font-family-panel{min-width:214px}
.node-style-font-family-panel .font-family-grid{grid-template-columns:repeat(5,34px)}
.font-family-icon{display:grid;place-items:center;width:26px;height:22px;font-size:15px;line-height:1}
.font-family-icon.system{font-family:ui-sans-serif,system-ui,sans-serif;font-weight:800}
.font-family-icon.sans{font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;font-weight:800}
.font-family-icon.serif{font-family:"Songti SC","SimSun",Georgia,serif;font-weight:700}
.font-family-icon.kai{font-family:"Kaiti SC","KaiTi","STKaiti",serif;font-weight:700}
.font-family-icon.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:800}
.node-style-font-size-panel,.node-style-node-size-panel{min-width:176px}
.node-style-letter-spacing-panel{min-width:220px}
.node-style-letter-spacing-panel .letter-spacing-grid{grid-template-columns:repeat(4,40px)}
.node-style-letter-spacing-panel .node-style-option{width:40px}
.letter-spacing-icon{display:block;white-space:nowrap;font:800 12px/1 ui-sans-serif,system-ui,sans-serif}
.node-letter-spacing-row{margin-top:10px;padding-top:9px;border-top:1px solid #eef2f7}
.node-letter-spacing-row input[type="range"]{width:116px}
.node-style-toolbar.text-element-context [data-node-toolbar-panel="node-size"]{display:none!important}

.graph-text-element{
  --graph-selection-stroke:calc(1px * var(--graph-ui-inverse-scale,1));
  --graph-resize-handle:calc(9px * var(--graph-ui-inverse-scale,1));
  --graph-resize-edge-long:calc(18px * var(--graph-ui-inverse-scale,1));
  --graph-resize-edge-short:calc(7px * var(--graph-ui-inverse-scale,1));
  --graph-resize-border:calc(1px * var(--graph-ui-inverse-scale,1));
  border-radius:0!important;
}
.graph-text-element-content{
  padding:0!important;
  font-family:var(--text-element-font-family,ui-sans-serif,system-ui,sans-serif);
  font-weight:var(--text-element-font-weight,700);
  letter-spacing:var(--text-element-letter-spacing,0px);
  line-height:1.45;
  border-radius:0!important;
}
.graph-text-element.active{
  outline:none!important;
  box-shadow:0 0 0 var(--graph-selection-stroke) #4f46e5!important;
  border-radius:0!important;
}
.graph-text-element:hover:not(.active){
  outline:none!important;
  box-shadow:0 0 0 var(--graph-selection-stroke) rgba(79,70,229,.52)!important;
  border-radius:0!important;
}
.graph-text-element.node-inline-editing{
  outline:none!important;
  box-shadow:0 0 0 var(--graph-selection-stroke) #4f46e5!important;
  border-radius:0!important;
}
.graph-text-element .node-inline-text-editor{
  inset:0!important;width:100%!important;height:100%!important;padding:0!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  font-family:var(--text-element-font-family,ui-sans-serif,system-ui,sans-serif)!important;
  font-weight:var(--text-element-font-weight,700)!important;
  letter-spacing:var(--text-element-letter-spacing,0px)!important;
  line-height:1.45!important;
}
.graph-text-element.node-inline-editing .node-inline-text-editor{min-width:180px;min-height:64px;padding:5px 6px!important}
.graph-text-element-measure{
  position:absolute!important;left:-100000px!important;top:-100000px!important;z-index:-1!important;
  display:inline-block!important;width:max-content!important;max-width:640px!important;height:auto!important;
  padding:0!important;margin:0!important;border:0!important;box-sizing:border-box!important;
  white-space:pre-wrap!important;overflow-wrap:anywhere!important;visibility:hidden!important;pointer-events:none!important;
}
.graph-element-resize-handle{
  width:var(--graph-resize-handle)!important;height:var(--graph-resize-handle)!important;
  border-width:var(--graph-resize-border)!important;border-radius:0!important;
  box-shadow:0 calc(1px * var(--graph-ui-inverse-scale,1)) calc(4px * var(--graph-ui-inverse-scale,1)) rgba(30,41,59,.24)!important;
  transform:translate(-50%,-50%);
}
.graph-element-resize-handle::after{
  content:"";position:absolute;inset:calc(-4px * var(--graph-ui-inverse-scale,1));
}
.graph-element-resize-handle.handle-nw{left:0!important;top:0!important}
.graph-element-resize-handle.handle-ne{left:100%!important;right:auto!important;top:0!important}
.graph-element-resize-handle.handle-se{left:100%!important;right:auto!important;top:100%!important;bottom:auto!important}
.graph-element-resize-handle.handle-sw{left:0!important;top:100%!important;bottom:auto!important}
.graph-element-resize-handle.handle-n,
.graph-element-resize-handle.handle-s{
  width:var(--graph-resize-edge-long)!important;height:var(--graph-resize-edge-short)!important;
  left:50%!important;margin:0!important;
}
.graph-element-resize-handle.handle-n{top:0!important}
.graph-element-resize-handle.handle-s{top:100%!important;bottom:auto!important}
.graph-element-resize-handle.handle-e,
.graph-element-resize-handle.handle-w{
  width:var(--graph-resize-edge-short)!important;height:var(--graph-resize-edge-long)!important;
  top:50%!important;margin:0!important;
}
.graph-element-resize-handle.handle-e{left:100%!important;right:auto!important}
.graph-element-resize-handle.handle-w{left:0!important}

/* V9.0-P4.2.6 · 数值排版、扩展节点形状、节点缩放与轻量原位编辑 */
.node-toolbar-italic-icon{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:800}
.node-toolbar-underline-icon{text-decoration:underline;text-underline-offset:2px;font-weight:850}
.node-toolbar-strike-icon{text-decoration:line-through;text-decoration-thickness:2px;font-weight:850}
.node-toolbar-btn[aria-pressed="true"]{background:#e0e7ff;color:#4338ca;border-color:#a5b4fc}
.node-style-text-color-panel{min-width:286px}
.node-style-font-size-panel{min-width:316px}
.node-style-font-size-panel .font-size-grid.numeric{grid-template-columns:repeat(7,34px)}
.font-size-number,.line-height-number{display:grid;place-items:center;width:28px;height:22px;font:750 10px/1 ui-monospace,SFMono-Regular,Consolas,monospace}
.node-style-line-height-panel{min-width:224px}
.node-style-line-height-panel .line-height-grid{grid-template-columns:repeat(4,40px)}
.node-style-line-height-panel .node-style-option{width:40px}
.node-font-size-row,.node-line-height-row{margin-top:10px;padding-top:9px;border-top:1px solid #eef2f7}
.node-font-size-row label,.node-line-height-row label{display:flex;align-items:center;gap:7px}
.node-font-size-row input,.node-line-height-row input{width:72px;height:28px;padding:0 6px;border:1px solid #cbd5e1;border-radius:7px}

.knowledge-card{
  --graph-selection-stroke:calc(1px * var(--graph-ui-inverse-scale,1));
  --graph-resize-handle:calc(9px * var(--graph-ui-inverse-scale,1));
  --graph-resize-edge-long:calc(18px * var(--graph-ui-inverse-scale,1));
  --graph-resize-edge-short:calc(7px * var(--graph-ui-inverse-scale,1));
  --graph-resize-border:calc(1px * var(--graph-ui-inverse-scale,1));
  overflow:visible;
  background:transparent;
}
.knowledge-card .card-body{width:100%;height:100%;overflow:hidden;border-radius:inherit}
.knowledge-card .node-title{
  font-family:var(--node-font-family,ui-sans-serif,system-ui,sans-serif);
  font-size:var(--node-font-size,15px)!important;
  font-weight:var(--node-font-weight,800);
  font-style:var(--node-font-style,normal);
  line-height:var(--node-line-height,1.25);
  letter-spacing:normal!important;
  text-decoration-line:var(--node-text-decoration,none);
}
.node-text-content,.graph-text-inline{
  background:var(--node-text-background,transparent);
  color:inherit;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
  padding:0 2px;
}
.graph-text-inline{background:var(--text-element-background,transparent)}

/* Direct, transparent, in-place editing. The selected object itself remains visible. */
.node-inline-edit-host{position:relative!important;overflow:visible!important}
.node-inline-edit-host > .node-text-content,
.node-inline-edit-host > .graph-text-inline{visibility:hidden!important}
.node-inline-text-editor,
.graph-text-element .node-inline-text-editor{
  position:absolute!important;inset:0!important;z-index:5!important;box-sizing:border-box!important;
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:inherit!important;border:0!important;border-radius:inherit!important;resize:none!important;outline:0!important;
  background:transparent!important;color:var(--node-text-color,#0f172a)!important;
  font-family:var(--node-font-family,ui-sans-serif,system-ui,sans-serif)!important;
  font-size:var(--node-font-size,15px)!important;
  font-weight:var(--node-font-weight,700)!important;
  font-style:var(--node-font-style,normal)!important;
  line-height:var(--node-line-height,1.25)!important;
  letter-spacing:normal!important;
  text-decoration-line:var(--node-text-decoration,none)!important;
  text-align:var(--node-text-align,center)!important;
  box-shadow:none!important;caret-color:currentColor;
}
.graph-text-element .node-inline-text-editor{
  color:var(--text-element-color,#0f172a)!important;
  font-family:var(--text-element-font-family,ui-sans-serif,system-ui,sans-serif)!important;
  font-size:var(--text-element-font-size,20px)!important;
  font-weight:var(--text-element-font-weight,700)!important;
  font-style:var(--text-element-font-style,normal)!important;
  line-height:var(--text-element-line-height,1.45)!important;
  text-decoration-line:var(--text-element-text-decoration,none)!important;
  text-align:var(--text-element-align,center)!important;
}
.knowledge-card.node-inline-editing,.graph-text-element.node-inline-editing{z-index:46!important}

.graph-text-element-content{
  font-size:var(--text-element-font-size,20px);
  font-weight:var(--text-element-font-weight,700);
  font-style:var(--text-element-font-style,normal);
  line-height:var(--text-element-line-height,1.45);
  letter-spacing:normal!important;
  text-decoration-line:var(--text-element-text-decoration,none);
}

/* New registered node shapes. */
.knowledge-card.card-style-rectangle{border-radius:0;box-shadow:0 10px 24px rgba(15,23,42,.12)}
.knowledge-card.card-style-rectangle .card-body{border-radius:0}
.knowledge-card.card-style-rectangle .node-top,
.knowledge-card.card-style-circle .node-top,
.knowledge-card.card-style-triangle .node-top{display:none}
.knowledge-card.card-style-rectangle .node-title,
.knowledge-card.card-style-circle .node-title,
.knowledge-card.card-style-triangle .node-title{height:100%;border:0;background:transparent;align-items:center;justify-content:center;text-align:var(--node-text-align,center)}
.knowledge-card.card-style-rectangle .node-title{padding:14px}
.knowledge-card.card-style-circle{border-radius:50%;box-shadow:0 10px 26px rgba(8,145,178,.14)}
.knowledge-card.card-style-circle .card-body{border-radius:50%}
.knowledge-card.card-style-circle .node-title{padding:18%;overflow:hidden}
.knowledge-card.card-style-triangle{box-shadow:none}
.knowledge-card.card-style-triangle .card-body{
  border:0!important;border-radius:0!important;padding:var(--node-border-width,1px);
  background:var(--node-border-color,#ca8a04);clip-path:polygon(50% 0,100% 100%,0 100%);
}
.knowledge-card.card-style-triangle .node-title{
  width:100%;height:100%;box-sizing:border-box;padding:28% 15% 10%;
  background:var(--node-fill-color,#fefce8);clip-path:polygon(50% 0,100% 100%,0 100%);overflow:hidden;
}
.knowledge-card.card-style-triangle.active,
.knowledge-card.card-style-triangle.multi-selected{filter:drop-shadow(0 0 calc(3px * var(--graph-ui-inverse-scale,1)) rgba(37,99,235,.82))}

/* Eight-way resize handles are shared by text elements and nodes. */
.knowledge-card.active:not(.node-inline-editing) .graph-node-resize-layer .graph-element-resize-handle,
.graph-text-element.active:not(.node-inline-editing) .graph-text-resize-layer .graph-element-resize-handle{display:block}
.knowledge-card .graph-element-resize-layer{overflow:visible}
.graph-node-resizing .knowledge-card.active,.graph-text-resizing .graph-text-element.active{cursor:default}
.graph-element-resizing .node-growth-handle-layer{display:none!important}

/* V9.0-P4.2.7 · 右键节点交互、按需缩放与文字样式收纳 */
.node-style-font-style-panel{min-width:190px}
.node-style-font-style-panel .font-style-grid{grid-template-columns:repeat(4,34px)}
.node-style-toolbar-main [data-node-toolbar-panel="font-style"].active,
.node-style-toolbar-main [data-node-toolbar-panel="font-style"][aria-pressed="true"]{background:#e0e7ff;color:#4338ca;border-color:#a5b4fc}
.knowledge-card.active:not(.node-inline-editing) .graph-node-resize-layer .graph-element-resize-handle{display:none!important}
.knowledge-card.active.node-free-resize-mode:not(.node-inline-editing) .graph-node-resize-layer .graph-element-resize-handle{display:block!important}
.knowledge-card.node-free-resize-mode{cursor:default}
.knowledge-card.node-free-resize-mode::after{content:"";position:absolute;inset:calc(-3px * var(--graph-ui-inverse-scale,1));pointer-events:none;border:calc(1px * var(--graph-ui-inverse-scale,1)) dashed rgba(79,70,229,.58);border-radius:inherit}
.graph-context-menu{position:absolute;z-index:160;min-width:176px;padding:6px;border:1px solid rgba(148,163,184,.38);border-radius:10px;background:rgba(255,255,255,.98);box-shadow:0 18px 46px rgba(15,23,42,.2);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);opacity:0;transform:translateY(-3px) scale(.98);transform-origin:top left;pointer-events:none;transition:opacity .12s ease,transform .12s ease}
.graph-context-menu.show{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.graph-context-menu-list{display:grid;gap:2px}
.graph-context-menu-item{position:relative;display:flex;align-items:center;gap:10px;width:100%;height:34px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:#1e293b;text-align:left;font:600 13px/1.2 ui-sans-serif,system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;cursor:pointer;white-space:nowrap}
.graph-context-menu-item svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.graph-context-menu-item:hover,.graph-context-menu-item:focus-visible{background:#eef2ff;color:#4338ca;outline:none}
.graph-context-submenu-wrap{position:relative}
.graph-context-submenu-wrap>.graph-context-menu-item{padding-right:34px}
.graph-context-chevron{position:absolute;right:9px;top:9px;width:16px;height:16px;pointer-events:none;color:#64748b}
.graph-context-chevron svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.graph-context-submenu{position:absolute;left:calc(100% + 6px);top:-6px;display:grid;gap:2px;min-width:166px;padding:6px;border:1px solid rgba(148,163,184,.38);border-radius:10px;background:rgba(255,255,255,.99);box-shadow:0 16px 36px rgba(15,23,42,.18);opacity:0;visibility:hidden;transform:translateX(-4px);transition:opacity .1s ease,transform .1s ease,visibility .1s}
.graph-context-submenu-wrap.open-left .graph-context-submenu{left:auto;right:calc(100% + 6px);transform:translateX(4px)}
.graph-context-submenu-wrap:hover>.graph-context-submenu,.graph-context-submenu-wrap:focus-within>.graph-context-submenu{opacity:1;visibility:visible;transform:translateX(0)}
.graph-context-submenu-wrap:hover>.graph-context-chevron{color:#4338ca}


/* V9.0-P4.2.8 · 交互稳定、轻量右键菜单与画布模式提示 */
.graph-context-menu{min-width:158px;padding:5px;border-radius:9px;box-shadow:0 12px 30px rgba(15,23,42,.16)}
.graph-context-menu-item{height:32px;padding:0 9px;gap:9px;border-radius:6px;font-size:12px;font-weight:650}
.graph-context-menu-item svg{width:16px;height:16px;stroke-width:1.7}
.graph-context-separator{height:1px;margin:4px 5px;background:#e8edf4}
.graph-context-submenu{min-width:150px;padding:5px;border-radius:9px;box-shadow:0 12px 28px rgba(15,23,42,.15)}
.graph-mode-indicator{position:absolute;z-index:155;top:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;max-width:min(640px,calc(100% - 160px));min-height:36px;padding:5px 7px 5px 13px;border:1px solid transparent;border-radius:999px;background:rgba(255,255,255,.94);box-shadow:0 10px 28px rgba(15,23,42,.16);backdrop-filter:blur(14px);pointer-events:auto}
.graph-mode-indicator[hidden]{display:none}
.graph-mode-indicator strong{font-size:12px;white-space:nowrap}.graph-mode-indicator span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:11px}
.graph-mode-indicator button{height:26px;padding:0 11px;border:0;border-radius:999px;color:#fff;font-size:11px;font-weight:800;box-shadow:none}
.graph-mode-indicator.related{border-color:#fdba74}.graph-mode-indicator.related strong{color:#c2410c}.graph-mode-indicator.related button{background:#ea580c}
.graph-mode-indicator.flow{border-color:#86efac}.graph-mode-indicator.flow strong{color:#15803d}.graph-mode-indicator.flow button{background:#16a34a}
.stage.graph-mode-related::after,.stage.graph-mode-flow::after{content:"";position:absolute;z-index:150;inset:0;pointer-events:none;border:2px solid transparent;border-radius:inherit}
.stage.graph-mode-related::after{border-color:#f97316;box-shadow:inset 0 0 0 1px rgba(249,115,22,.16)}
.stage.graph-mode-flow::after{border-color:#22c55e;box-shadow:inset 0 0 0 1px rgba(34,197,94,.16)}
@media(max-width:720px){.graph-mode-indicator{top:8px;max-width:calc(100% - 24px)}.graph-mode-indicator span{display:none}}

/* V9.0-P4.2.9 · 标准卡牌分区配色 */
.knowledge-card.card-style-standard .card-body{background:var(--node-body-fill-color,var(--node-fill-color,#fff))}
.knowledge-card.card-style-standard .node-title{
  background:var(--node-body-fill-color,var(--node-fill-color,#fff));
  color:var(--node-body-text-color,var(--node-text-color,#0f172a));
}
.knowledge-card.card-style-standard .node-top{color:var(--node-header-text-color,#1e3a8a)}
.knowledge-card.card-style-standard .node-icon{color:inherit}
.node-color-region-tabs{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:8px;
}
.node-color-region-tabs button{
  min-width:0;height:28px;padding:0 7px;border:1px solid #dbe4ef;border-radius:7px;background:#fff;
  color:#475569;font-size:11px;font-weight:750;box-shadow:none;
}
.node-color-region-tabs button:last-child{grid-column:1/-1}
.node-color-region-tabs button:hover{background:#f8fafc;border-color:#a5b4fc;color:#4338ca;transform:none}
.node-color-region-tabs button.active{background:#eef2ff;border-color:#818cf8;color:#3730a3}
.node-style-color-panel:not(.standard-region-enabled) .node-color-region-tabs{display:none}

/* V9.0-P4.2.11 · 画布交互、标准卡牌配色与悬浮组件精修 */
.knowledge-card{cursor:default}
.knowledge-card.dragging,.knowledge-card.group-dragging{cursor:grabbing}

/* 标准卡牌：顶部为固定主题表面，仅图标色可编辑；底部背景独立。 */
.knowledge-card.card-style-standard .node-top{
  background:linear-gradient(180deg,#f8fafc 0%,#eef2ff 100%)!important;
  color:var(--node-header-text-color,#fff);
}
.knowledge-card.card-style-standard .card-body,
.knowledge-card.card-style-standard .node-title{background:var(--node-body-fill-color,var(--node-fill-color,#fff))}

/* 背景入口直接显示当前节点图标色。 */
.node-toolbar-color-circle{
  display:block;width:18px;height:18px;border-radius:50%;
  background:var(--toolbar-color,#64748b);border:1px solid rgba(15,23,42,.18);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.5),0 1px 3px rgba(15,23,42,.18);
}

/* 数值选项更清晰。 */
.font-size-number,.line-height-number{
  width:30px;height:24px;font-size:13px;font-weight:850;letter-spacing:-.2px;
}
.node-style-font-size-panel .node-style-option,.node-style-line-height-panel .node-style-option{min-height:36px}

/* 节点工具栏统一深灰提示，彻底替代浏览器 title。 */
.node-toolbar-btn[data-tooltip],.node-style-option[data-tooltip]{position:relative}
.node-toolbar-btn[data-tooltip]::after,.node-style-option[data-tooltip]::after{
  content:attr(data-tooltip);position:absolute;z-index:240;left:50%;bottom:calc(100% + 8px);
  transform:translate(-50%,4px);max-width:220px;padding:6px 9px;border-radius:7px;
  background:#30343b;color:#fff;box-shadow:0 8px 20px rgba(15,23,42,.22);
  font:650 12px/1.25 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .12s ease,transform .12s ease,visibility .12s ease;
}
.node-toolbar-btn[data-tooltip]::before,.node-style-option[data-tooltip]::before{
  content:"";position:absolute;z-index:241;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);
  border:5px solid transparent;border-top-color:#30343b;opacity:0;visibility:hidden;pointer-events:none;
}
.node-toolbar-btn[data-tooltip]:hover::after,.node-toolbar-btn[data-tooltip]:focus-visible::after,
.node-style-option[data-tooltip]:hover::after,.node-style-option[data-tooltip]:focus-visible::after{
  opacity:1;visibility:visible;transform:translate(-50%,0)
}
.node-toolbar-btn[data-tooltip]:hover::before,.node-toolbar-btn[data-tooltip]:focus-visible::before,
.node-style-option[data-tooltip]:hover::before,.node-style-option[data-tooltip]:focus-visible::before{opacity:1;visibility:visible}
.node-toolbar-btn[aria-expanded="true"]::after,.node-toolbar-btn[aria-expanded="true"]::before{display:none}

/* 标准卡牌颜色入口只保留“图标 / 背景”。 */
.node-color-region-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
.node-color-region-tabs button:last-child{grid-column:auto}

/* 颜色窗默认可点击外部关闭；拖动顶部后固定为手动关闭。 */
.graph-floating-color-head{cursor:grab}
.graph-floating-color-window.dragging .graph-floating-color-head{cursor:grabbing}
.graph-floating-color-pin-state{
  display:none!important;font-size:10px!important;color:#64748b!important;margin:0 2px!important;white-space:nowrap;
}
.graph-floating-color-window.manual-close .graph-floating-color-pin-state{display:block!important;color:#4f46e5!important}
.graph-floating-color-window.manual-close{border-color:rgba(99,102,241,.48);box-shadow:0 24px 64px rgba(79,70,229,.22)}

/* 临时相关画布：左键编辑卡牌，右键长按才平移。 */
.related-canvas-body,.related-canvas-viewport,.related-canvas-stage{cursor:default!important}
.related-canvas-body.right-pan-pending{cursor:default!important}
.related-canvas-body.panning,.related-canvas-body.panning .related-canvas-stage,.related-canvas-body.panning .related-canvas-viewport{cursor:grabbing!important;user-select:none}
.related-canvas-card.knowledge-card{cursor:default!important}
.related-canvas-card.knowledge-card.dragging{cursor:grabbing!important}
/* P4.2.10 修正：首页卡牌悬停保持默认箭头，实际拖动时才显示抓取状态。 */
.stage .knowledge-card{cursor:default!important}
.stage .knowledge-card.dragging,.stage .knowledge-card.group-dragging{cursor:grabbing!important}


/* V9.0-P4.2.11 · selection, lock, compact colour window and stable hover refinements */
.graph-floating-color-window{width:min(286px,calc(100% - 16px));border-radius:12px}
.graph-floating-color-head{height:34px;gap:5px;padding:0 6px}
.graph-floating-color-head strong{font-size:12px}
.graph-floating-color-grip,.graph-floating-color-close{width:27px;height:27px;min-width:27px;border-radius:7px}
.graph-floating-color-grip svg,.graph-floating-color-close svg{width:15px;height:15px}
.graph-floating-color-body{padding:8px}
.graph-floating-color-body .kg-color-picker-section{margin-top:7px}
.graph-floating-color-body .kg-color-picker-title{margin-bottom:5px;font-size:11px}
.graph-floating-color-body .kg-color-picker-grid{gap:5px}
.graph-floating-color-body .kg-color-picker-sv{height:118px}
.graph-floating-color-body .kg-color-picker-presets,.graph-floating-color-body .kg-color-picker-recent,.graph-floating-color-body .kg-color-picker-document{gap:5px}
.node-style-toolbar.popover-hover-active [data-tooltip]::after,.node-style-toolbar.popover-hover-active [data-tooltip]::before{display:none!important}
.stage.graph-box-selecting .node-style-toolbar,.stage.graph-card-dragging .node-style-toolbar{display:none!important}
.knowledge-card.node-locked .card-body{box-shadow:inset 0 0 0 1px rgba(100,116,139,.16)}
.knowledge-card.node-locked::after{content:"";position:absolute;right:7px;bottom:7px;width:13px;height:13px;z-index:8;pointer-events:none;background:currentColor;opacity:.62;clip-path:path("M3 6V4a3 3 0 0 1 6 0v2h1.2A1.8 1.8 0 0 1 12 7.8v5.4A1.8 1.8 0 0 1 10.2 15H1.8A1.8 1.8 0 0 1 0 13.2V7.8A1.8 1.8 0 0 1 1.8 6H3Zm1.5 0h3V4a1.5 1.5 0 1 0-3 0v2Z")}
.knowledge-card.card-style-standard .node-top{background:linear-gradient(135deg,#f8fafc 0%,#eef2ff 48%,#e0e7ff 100%)!important}
.knowledge-card.card-style-sticky{transform:none!important;transition:box-shadow .15s ease,filter .15s ease!important}
.knowledge-card.card-style-sticky:hover{transform:none!important}
.knowledge-card.card-style-sticky .card-body,.knowledge-card.card-style-sticky:hover .card-body{transform:none!important}
.node-style-toolbar-main [data-node-toolbar-action="lock"].active{background:#e2e8f0;color:#0f172a;border-color:#94a3b8}
.edge-radial-style-panel .edge-radial-delete{left:73px!important;top:137px!important;color:#dc2626!important}
.edge-radial-style-panel.batch-mode{width:190px!important;height:190px!important}
.edge-radial-style-panel .edge-batch-count{position:absolute;left:50%;top:76px;transform:translateX(-50%);min-width:46px;padding:3px 7px;border-radius:999px;background:#0f172a;color:#fff;font-size:10px;font-weight:850;text-align:center;pointer-events:none}
.edge-radial-style-panel:not(.batch-mode) .edge-batch-count{display:none}
.edge-radial-style-panel.batch-mode .edge-radial-label{display:none!important}
.related-canvas-body.panning{cursor:grabbing!important}

/* V9.0-P4.2.12 · 悬浮交互、完整锁定、画布菜单与连线菜单修复 */
/* 二级菜单打开后，鼠标仍停在主按钮上时继续显示深灰提示。 */
.node-toolbar-btn[aria-expanded="true"]::after,
.node-toolbar-btn[aria-expanded="true"]::before{display:block!important}
.node-style-toolbar.popover-hover-active [data-tooltip]::after,
.node-style-toolbar.popover-hover-active [data-tooltip]::before{display:block!important}

/* 完整锁定后，悬浮栏仅保留拖动、打开相关画布与解锁。 */
.node-style-toolbar.locked-context .node-style-toolbar-main>.node-toolbar-btn:not(.node-toolbar-grip):not([data-node-toolbar-action="lock"]):not([data-node-toolbar-action="related-canvas"]){display:none!important}
.node-style-toolbar.locked-context .node-style-toolbar-panels{display:none!important}
.node-style-toolbar.locked-context .node-style-toolbar-main{gap:4px;padding:5px 6px}
.node-style-toolbar.locked-context [data-node-toolbar-action="lock"]{background:#0f172a;color:#fff;border-color:#0f172a}
.knowledge-card.node-locked .node-growth-handle,
.knowledge-card.node-locked .graph-node-resize-layer{display:none!important}

/* 右键菜单轻量化，并为禁用项提供明确但克制的灰色状态。 */
.graph-context-menu{min-width:148px!important;padding:4px!important;border-radius:8px!important;box-shadow:0 10px 26px rgba(15,23,42,.15)!important}
.graph-context-menu-item{height:30px!important;padding:0 8px!important;gap:8px!important;border-radius:6px!important;font-size:12px!important}
.graph-context-menu-item:disabled{opacity:1!important;color:#94a3b8!important;background:transparent!important;cursor:not-allowed!important}
.graph-context-menu-item:disabled svg{opacity:.62}
.graph-context-menu [hidden]{display:none!important}
.graph-context-menu.locked-context .graph-context-separator{margin-top:0}

/* 关系线批量菜单不再提供删除按钮；文字按钮保留并灰显。 */
.edge-radial-style-panel .edge-radial-delete{display:none!important}
.edge-radial-style-panel.batch-mode .edge-radial-label{display:grid!important}
.edge-radial-style-panel .edge-radial-label:disabled{
  opacity:.46!important;background:#e2e8f0!important;color:#64748b!important;
  border-color:rgba(100,116,139,.18)!important;box-shadow:0 5px 12px rgba(15,23,42,.08)!important;
  cursor:not-allowed!important;transform:none!important;
}


/* V9.0-P4.2.13 · delayed hints, integrated mode banner and lightweight edge labels */
/* Homepage toolbar hints start promptly; node editing hints keep their longer dwell time. */
.floating-tool-btn[data-tooltip]::after,
.node-toolbar-btn[data-tooltip]::after,
.node-toolbar-btn[data-tooltip]::before,
.node-style-option[data-tooltip]::after,
.node-style-option[data-tooltip]::before{
  transition-delay:0s;
}
.floating-tool-btn[data-tooltip]:hover::after,
.floating-tool-btn[data-tooltip]:focus-visible::after,
.floating-color-tool[data-tooltip]:focus-within::after{
  transition-delay:60ms;
}
.node-toolbar-btn[data-tooltip]:hover::after,
.node-toolbar-btn[data-tooltip]:focus-visible::after,
.node-toolbar-btn[data-tooltip]:hover::before,
.node-toolbar-btn[data-tooltip]:focus-visible::before,
.node-style-option[data-tooltip]:hover::after,
.node-style-option[data-tooltip]:focus-visible::after,
.node-style-option[data-tooltip]:hover::before,
.node-style-option[data-tooltip]:focus-visible::before{
  transition-delay:260ms;
}

/* Mode reminder is a small rectangular tab joined to the coloured canvas border. */
.graph-mode-indicator{
  --graph-mode-color:#475569;
  top:0;
  min-height:32px;
  padding:4px 5px 4px 11px;
  border:0;
  border-radius:0 0 8px 8px;
  background:var(--graph-mode-color);
  color:#fff;
  box-shadow:0 7px 18px rgba(15,23,42,.14);
  backdrop-filter:none;
}
.graph-mode-indicator strong{font-size:12px;color:#fff}
.graph-mode-indicator span{font-size:11px;color:rgba(255,255,255,.92)}
.graph-mode-indicator button{
  height:24px;
  margin-left:3px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.48);
  border-radius:5px;
  background:rgba(255,255,255,.12)!important;
  color:#fff;
  box-shadow:none;
}
.graph-mode-indicator button:hover{background:rgba(255,255,255,.22)!important}
.graph-mode-indicator.related{--graph-mode-color:#f97316;background:var(--graph-mode-color)}
.graph-mode-indicator.flow{--graph-mode-color:#22c55e;background:var(--graph-mode-color)}
@media(max-width:720px){.graph-mode-indicator{top:0}}

/* 状态提示条使用画布外围状态色与白色文字。 */
.graph-mode-indicator.related strong,.graph-mode-indicator.flow strong,
.graph-mode-indicator.related span,.graph-mode-indicator.flow span,
.graph-mode-indicator.related button,.graph-mode-indicator.flow button{color:#fff}

/* Directly edit the painted text node so opening an editor never changes its box geometry. */
.node-text-content.node-inline-direct-editor,
.graph-text-inline.node-inline-direct-editor{
  visibility:visible!important;
  position:static!important;
  inset:auto!important;
  display:inline!important;
  width:auto!important;
  height:auto!important;
  min-width:1px!important;
  min-height:0!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:inherit;
  color:inherit!important;
  font:inherit!important;
  line-height:inherit!important;
  letter-spacing:inherit!important;
  text-align:inherit!important;
  text-decoration:inherit!important;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
  user-select:text!important;
  -webkit-user-select:text!important;
  cursor:text!important;
  caret-color:currentColor;
}

/* V9.0-P4.3.2 · compact batch relationship toolbar */
.edge-radial-style-panel.edge-quick-style-panel{
  width:min(560px,calc(100% - 20px))!important;
  height:auto!important;
  min-width:0!important;
  max-width:560px!important;
  padding:7px!important;
  display:none!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border-radius:12px!important;
}
.edge-radial-style-panel.edge-quick-style-panel.show{display:flex!important}
.edge-radial-style-panel .edge-radial-btn{
  position:static!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  flex:0 0 34px!important;
}
.edge-radial-style-panel .edge-batch-count{
  position:static!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  order:99;
}
.edge-radial-style-panel.batch-mode{width:min(560px,calc(100% - 20px))!important;height:auto!important}
.graph-text-element.group-dragging{opacity:.9;transition:none!important}
/* style: styles/home-canvas-performance.css */
/* V9.0-P4.3.6 · 首页画布独立关系线、轮廓悬浮与稳定便签阴影 */
.stage .edge-visible{
  filter:none!important;
  transition:none!important;
}
.stage .edge-hit:hover + .edge-visible,
.stage .edge-hit.selected + .edge-visible,
.stage .edge-hit.batch-selected + .edge-visible,
.stage g.is-batch-selected .edge-visible{
  filter:none!important;
  opacity:1!important;
  stroke-width:var(--edge-base-width,4)!important;
}
.edge-hover-layer,
.edge-feedback-layer,
.edge-control-layer{pointer-events:none}

/* 悬浮反馈位于原线下方：总宽度比原线多 2 个屏幕像素，因此两侧各露出约 1px 蓝色轮廓。 */
.edge-hover-overlay{
  display:none;
  fill:none;
  stroke:#2196f3;
  stroke-width:var(--edge-hover-outline-width,6);
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
  opacity:1;
  filter:none!important;
  transition:none!important;
}
.edge-hover-overlay.show{display:block}

/* 选中反馈仍为覆盖原线的轻量蓝色细线。 */
.edge-selection-overlay{
  fill:none;
  stroke:#2196f3;
  stroke-width:var(--edge-feedback-width,2);
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
  opacity:1;
  filter:none!important;
  transition:none!important;
}
.edge-control-guide{
  fill:none;
  stroke:#94a3b8;
  stroke-width:calc(1px * var(--edge-control-inverse-scale,1));
  stroke-dasharray:calc(4px * var(--edge-control-inverse-scale,1)) calc(4px * var(--edge-control-inverse-scale,1));
  pointer-events:none;
}
.edge-endpoint-handle,
.edge-control-handle{pointer-events:all;cursor:move;touch-action:none}
.edge-endpoint-hit,
.edge-control-hit{fill:rgba(33,150,243,.001);stroke:none;pointer-events:all}
.edge-endpoint-dot{
  fill:#2196f3;
  stroke:#fff;
  stroke-width:calc(1.5px * var(--edge-control-inverse-scale,1));
  pointer-events:none;
  filter:none;
}
.edge-control-dot{
  fill:#fff;
  stroke:#2196f3;
  stroke-width:calc(1.8px * var(--edge-control-inverse-scale,1));
  pointer-events:none;
  filter:none;
}
.stage .edge-hit{cursor:move}
.stage.graph-edge-moving .edge-hit,
.stage.graph-edge-control-dragging .edge-control-handle,
.stage.graph-edge-endpoint-dragging .edge-endpoint-handle{cursor:grabbing}
.stage.graph-edge-control-dragging .edge-hover-overlay,
.stage.graph-edge-endpoint-dragging .edge-hover-overlay,
.stage.graph-edge-moving .edge-hover-overlay,
.stage.graph-box-selecting .edge-hover-overlay,
.stage.is-interacting .edge-hover-overlay{display:none!important}
.stage .knowledge-card.edge-endpoint-bind-target{
  outline:calc(2px * var(--graph-ui-inverse-scale,1)) solid #2196f3!important;
  outline-offset:calc(3px * var(--graph-ui-inverse-scale,1))!important;
}

/* 卡牌默认不再使用阴影或泛光，选中仅由边框/尺寸控制点表达。 */
.stage .knowledge-card,
.stage .knowledge-card:hover,
.stage .knowledge-card.dragging,
.stage .knowledge-card.group-dragging,
.stage .knowledge-card.active,
.stage .knowledge-card.multi-selected,
.stage .knowledge-card.large-related-anchor,
.stage .knowledge-card.large-related-neighbor,
.stage .knowledge-card.gather-anchor-card,
.stage .knowledge-card.card-style-rounded,
.stage .knowledge-card.card-style-rounded:hover,
.stage .knowledge-card.card-style-rounded.active,
.stage .knowledge-card.card-style-rounded.multi-selected,
.stage .knowledge-card.card-style-triangle.active,
.stage .knowledge-card.card-style-triangle.multi-selected{
  box-shadow:none!important;
  filter:none!important;
}
.stage .knowledge-card .card-body,
.stage .knowledge-card.card-style-rounded .card-body{
  box-shadow:none!important;
  filter:none!important;
}
.stage .knowledge-card{
  transition:transform .12s ease,border-color .12s ease!important;
}
.stage .knowledge-card.active,
.stage .knowledge-card.multi-selected{
  outline:calc(2px * var(--graph-ui-inverse-scale,1)) solid #2196f3;
  outline-offset:calc(2px * var(--graph-ui-inverse-scale,1));
}

/* 便签阴影始终保持同一静态样式，拖动、缩放、框选和选中时均不隐藏或切换。 */
.stage .knowledge-card.card-style-sticky .card-body,
.stage .knowledge-card.card-style-sticky:hover .card-body,
.stage .knowledge-card.card-style-sticky.active .card-body,
.stage .knowledge-card.card-style-sticky.multi-selected .card-body,
.stage .knowledge-card.card-style-sticky.dragging .card-body,
.stage .knowledge-card.card-style-sticky.group-dragging .card-body,
.stage.is-interacting .knowledge-card.card-style-sticky .card-body,
.stage.graph-box-selecting .knowledge-card.card-style-sticky .card-body,
.stage.viewport-smooth-zooming .knowledge-card.card-style-sticky .card-body,
.stage.graph-card-dragging .knowledge-card.card-style-sticky .card-body{
  box-shadow:0 11px 24px rgba(71,85,105,.18),0 3px 7px rgba(71,85,105,.10)!important;
  filter:none!important;
  transition:none!important;
}
.stage .knowledge-card.card-style-sticky.active,
.stage .knowledge-card.card-style-sticky.multi-selected,
.stage .knowledge-card.card-style-sticky:hover{
  box-shadow:none!important;
  filter:none!important;
}
.kg-perf-no-shadows .edge-visible,
.kg-perf-no-shadows .edge-hover-overlay,
.kg-perf-no-shadows .edge-selection-overlay{
  filter:none!important;
}

.stage .knowledge-card.active::before,
.stage .knowledge-card.multi-selected::before,
.stage.large-graph-mode .knowledge-card.active::before,
.stage.large-graph-mode .knowledge-card.multi-selected::before{
  box-shadow:none!important;
  filter:none!important;
}
/* style: styles/home-selection-p4326.css */
/* V9.0-P4.3.26 — homepage selection parity and lightweight edge dragging. */
.stage.home-selection-interaction-locked .uc-selection-bounds{
  pointer-events:auto;
  cursor:move;
  touch-action:none;
}
.stage.home-selection-interaction-locked .uc-selection-bounds:active,
.stage.home-selection-bounds-dragging .uc-selection-bounds{
  cursor:grabbing;
}
.stage.home-selection-bounds-dragging .uc-selection-bounds,
.stage.graph-edge-drag-lite .uc-selection-bounds{
  display:none!important;
}
.stage.graph-edge-drag-lite .edge-hover-layer,
.stage.graph-edge-drag-lite .edge-feedback-layer,
.stage.graph-edge-drag-lite .edge-control-layer,
.stage.graph-edge-drag-lite .edge-hit,
.stage.graph-edge-drag-lite .edge-label,
.stage.graph-edge-drag-lite .uc-alignment-guides{
  display:none!important;
}
.stage.graph-edge-drag-lite .edge-visible{
  display:block!important;
  opacity:.82!important;
  stroke-width:var(--edge-base-width,3)!important;
  stroke-dasharray:none!important;
  marker-start:none!important;
  marker-end:none!important;
  filter:none!important;
  transition:none!important;
  animation:none!important;
}
.stage.graph-edge-drag-lite .knowledge-card.active,
.stage.graph-edge-drag-lite .knowledge-card.multi-selected,
.stage.graph-edge-drag-lite .graph-text-element.active{
  outline-color:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
.stage.graph-edge-drag-lite .knowledge-card.active::before,
.stage.graph-edge-drag-lite .knowledge-card.multi-selected::before{
  display:none!important;
}
/* style: styles/selection-bounds-drag-p4327.css */
/* V9.0-P4.3.27 — keep multi-selection bounds visible while grouped items move. */
.stage.home-selection-bounds-dragging .uc-selection-bounds,
.stage.home-selection-bounds-dragging.graph-card-dragging .uc-selection-bounds,
.stage.home-selection-bounds-dragging.graph-edge-drag-lite .uc-selection-bounds{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:none!important;
  transition:none!important;
}
body.question-workspace-page.qw-selection-bounds-dragging .uc-selection-bounds,
body.question-workspace-page.qw-selection-bounds-dragging.qw-selection-toolbar-motion .uc-selection-bounds{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:none!important;
  transition:none!important;
}
/* style: styles/home-selection-drag-controls-p4329.css */
/* V9.0-P4.3.29 — hide per-item editing handles while a locked home selection moves. */
.stage.home-selection-bounds-dragging .node-growth-layer,
.stage.home-selection-bounds-dragging .node-growth-handle,
.stage.home-selection-bounds-dragging .graph-text-resize-layer,
.stage.home-selection-bounds-dragging .graph-text-element .graph-element-resize-handle{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
/* style: styles/home-interaction-modes-p4330.css */
/* v9.0-p4.3.30 — 首页阅读 / 高效 / 专业模式 */
.graph-mode-switcher{position:relative;display:flex;align-items:flex-end;pointer-events:auto}
.graph-mode-trigger{display:flex;align-items:center;justify-content:center;gap:6px;height:38px;min-width:78px;padding:0 10px;border:1px solid var(--uc-control-border,#dbe1eb);border-radius:11px;background:var(--uc-control-bg,#fff);color:var(--uc-control-ink,#475569);box-shadow:0 10px 26px rgba(15,23,42,.14);font:700 12px/1 ui-sans-serif,system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;cursor:pointer}
.graph-mode-trigger:hover,.graph-mode-switcher.menu-open .graph-mode-trigger{border-color:#b8b1ff;background:#f5f3ff;color:#5b4ed6}
.graph-mode-trigger-icon,.graph-mode-option-icon{display:grid;place-items:center;width:18px;height:18px;flex:0 0 18px}
.graph-mode-trigger-icon svg,.graph-mode-option-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.graph-mode-trigger>svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;transition:transform .16s ease}
.graph-mode-switcher.menu-open .graph-mode-trigger>svg{transform:rotate(180deg)}
.graph-mode-menu{position:absolute;right:0;bottom:46px;z-index:140;display:grid;min-width:132px;padding:6px;border:1px solid #dbe1eb;border-radius:12px;background:rgba(255,255,255,.98);box-shadow:0 16px 40px rgba(15,23,42,.18)}
.graph-mode-menu[hidden]{display:none}
.graph-mode-menu button{display:flex;align-items:center;gap:9px;width:100%;min-height:36px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#475569;font-size:12px;font-weight:750;text-align:left;cursor:pointer}
.graph-mode-menu button:hover,.graph-mode-menu button.active{background:#f1efff;color:#5748d6}
.graph-mode-menu button.active::after{content:'✓';margin-left:auto;font-weight:900}

/* 模式切换只改变主悬浮工具栏和对象交互，不移动搜索、缩放、居中与缩略图。 */
body[data-graph-interaction-mode="reading"] .graph-mode-indicator{display:none!important}
body[data-graph-interaction-mode="reading"] .node-style-toolbar,
body[data-graph-interaction-mode="reading"] .uc-edge-toolbar,
body[data-graph-interaction-mode="reading"] .edge-control-layer,
body[data-graph-interaction-mode="reading"] .node-growth-layer{display:none!important}
body[data-graph-interaction-mode="efficient"] .edge-control-layer,
body[data-graph-interaction-mode="efficient"] .uc-edge-toolbar{display:none!important}

/* 高效模式节点工具栏：保留高频样式、尺寸、对齐和更多操作。 */
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-panel="border"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-panel="font-family"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-panel="font-size"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-panel="font-style"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-panel="line-height"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-panel="text-align"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-action="lock"],
body[data-graph-interaction-mode="efficient"] .node-style-toolbar [data-node-toolbar-action="related-canvas"]{display:none!important}

/* 阅读模式不创建编辑命中反馈；高效模式保留框选、多选和基础关系选中。 */
body[data-graph-interaction-mode="reading"] .edge-hit{pointer-events:none!important}
body[data-graph-interaction-mode="reading"] :is(.graph-element-resize-layer,.uc-selection-filter,.uc-selection-bounds){display:none!important}
body[data-graph-interaction-mode="reading"] .knowledge-card{cursor:pointer!important}
body[data-graph-interaction-mode="efficient"] .knowledge-card{cursor:grab}
body[data-graph-interaction-mode="efficient"] .knowledge-card:active{cursor:grabbing}

/* 手机端强制阅读模式，隐藏所有编辑入口与模式切换。 */
body.graph-phone-reading .graph-mode-switcher{display:none!important}
body.graph-phone-reading #mobileBar{display:none!important}
body.graph-phone-reading .graph-file-tabbar{display:none!important}
body.graph-phone-reading :is(.floating-toolbox,.canvas-toolbar-left,.canvas-toolbar-right,.canvas-zoom-dock,.support-center-shell,#kgGlobalShortcuts,.uc-minimap-dock,#graphSearchPanel){display:none!important}
.mobile-reading-mode-indicator{display:none}
body.graph-phone-reading .mobile-reading-mode-indicator{position:fixed;z-index:80;right:14px;bottom:14px;display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border:1px solid rgba(15,23,42,.18);border-radius:999px;background:#1f2937;color:#fff;box-shadow:0 8px 20px rgba(15,23,42,.22);font:800 12px/1 ui-sans-serif,system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}
body.home-mobile-readonly-notice-open .help-card{top:var(--home-mobile-readonly-offset,112px)}
@media(max-width:720px){.graph-mode-switcher{display:none!important}}

/* 阅读模式详情保持只读，隐藏所有可写操作；关系线也不绘制悬浮/选中反馈层。 */
body[data-graph-interaction-mode="reading"] .detail-panel :is(.detail-actions-toggle,.detail-actions),
body[data-graph-interaction-mode="reading"] .edge-hover-layer,
body[data-graph-interaction-mode="reading"] .edge-feedback-layer,
body[data-graph-interaction-mode="reading"] .node-resize-handle,
body[data-graph-interaction-mode="reading"] [data-element-resize-handle]{display:none!important}

/* 高效模式保留框选、多选及批量节点工具，但不开放自由缩放和高级关系线路径编辑。 */
body[data-graph-interaction-mode="efficient"] :is(.node-resize-handle,[data-element-resize-handle]){display:none!important}
body[data-graph-interaction-mode="efficient"] .edge-hit{cursor:pointer}
/* style: styles/home-selection-geometry-p4332.css */
/* V9.0-P4.3.32 — 首页图元几何选框：固定屏幕 1px、单选四角手柄、多选逐图元无手柄。 */
.stage{--home-selection-blue:#1d6fd8}
.stage .world{
  --home-selection-blue:#1d6fd8;
  --home-selection-stroke:calc(1px * var(--graph-ui-inverse-scale,1));
  --home-selection-handle:calc(8px * var(--graph-ui-inverse-scale,1));
  --home-selection-hit:calc(10px * var(--graph-ui-inverse-scale,1));
}

/* 选中反馈完全贴合图元的矩形几何边界，不跟随圆角、圆形或三角形轮廓。 */
.stage .knowledge-card.active,
.stage .knowledge-card.multi-selected,
.stage.large-graph-mode .knowledge-card.active,
.stage.large-graph-mode .knowledge-card.multi-selected,
.stage .graph-text-element.active,
.stage .graph-text-element.multi-selected{
  outline:none!important;
  box-shadow:none!important;
  filter:none!important;
}
.stage .knowledge-card.active::before,
.stage .knowledge-card.multi-selected::before,
.stage.large-graph-mode .knowledge-card.active::before,
.stage.large-graph-mode .knowledge-card.multi-selected::before{
  display:none!important;
}
.stage .knowledge-card.node-free-resize-mode::after{display:none!important}

body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.active,.knowledge-card.multi-selected,.graph-text-element.active,.graph-text-element.multi-selected) > .graph-element-resize-layer{
  display:block!important;
  box-sizing:border-box!important;
  border:var(--home-selection-stroke) solid var(--home-selection-blue)!important;
  border-radius:0!important;
  background:transparent!important;
  overflow:visible!important;
  pointer-events:none!important;
}

/* 单选时只绘制四个白底蓝边方形手柄，大小与线宽都不受画布缩放影响。 */
body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.active:not(.multi-selected),.graph-text-element.active:not(.multi-selected)):not(.node-inline-editing)
  > .graph-element-resize-layer > .graph-element-resize-handle{
  display:block!important;
}
body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.active:not(.multi-selected),.graph-text-element.active:not(.multi-selected)):not(.node-inline-editing)
  > .graph-element-resize-layer > .graph-element-resize-handle:is(.handle-nw,.handle-ne,.handle-se,.handle-sw){
  width:var(--home-selection-handle)!important;
  height:var(--home-selection-handle)!important;
  box-sizing:border-box!important;
  border:var(--home-selection-stroke) solid var(--home-selection-blue)!important;
  border-radius:1px!important;
  background:#fff!important;
  box-shadow:none!important;
  pointer-events:auto!important;
  z-index:3!important;
}

/* 四边不再显示中点手柄；整条边保留透明拖拽热区，文本框可直接从任意边线调整大小。 */
body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.active:not(.multi-selected),.graph-text-element.active:not(.multi-selected)):not(.node-inline-editing)
  > .graph-element-resize-layer > .graph-element-resize-handle:is(.handle-n,.handle-s,.handle-e,.handle-w){
  display:block!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:0!important;
  pointer-events:auto!important;
  z-index:2!important;
}
body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.active:not(.multi-selected),.graph-text-element.active:not(.multi-selected)):not(.node-inline-editing)
  > .graph-element-resize-layer > .graph-element-resize-handle:is(.handle-n,.handle-s){
  width:calc(100% + var(--home-selection-hit))!important;
  height:var(--home-selection-hit)!important;
  left:50%!important;
}
body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.active:not(.multi-selected),.graph-text-element.active:not(.multi-selected)):not(.node-inline-editing)
  > .graph-element-resize-layer > .graph-element-resize-handle:is(.handle-e,.handle-w){
  width:var(--home-selection-hit)!important;
  height:calc(100% + var(--home-selection-hit))!important;
  top:50%!important;
}
/* 热区完全放到选框外侧，横向框不会再遮住框内鼠标悬停内容。 */
body:not([data-graph-interaction-mode="reading"]) .stage .graph-element-resize-handle.handle-n{top:0!important;transform:translate(-50%,-100%)!important}
body:not([data-graph-interaction-mode="reading"]) .stage .graph-element-resize-handle.handle-s{top:100%!important;transform:translate(-50%,0)!important}
body:not([data-graph-interaction-mode="reading"]) .stage .graph-element-resize-handle.handle-e{left:100%!important;transform:translate(0,-50%)!important}
body:not([data-graph-interaction-mode="reading"]) .stage .graph-element-resize-handle.handle-w{left:0!important;transform:translate(-100%,-50%)!important}

/* 多选时每个图元独立显示几何边界框，但任何图元都不出现缩放手柄。 */
body:not([data-graph-interaction-mode="reading"]) .stage :is(.knowledge-card.multi-selected,.graph-text-element.multi-selected)
  > .graph-element-resize-layer > .graph-element-resize-handle{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* 整体多选范围继续承担整体移动与工具栏定位，但不显示缩放手柄。 */
.stage .uc-selection-bounds{
  border:1px solid var(--home-selection-blue)!important;
  background:transparent!important;
}
.stage .uc-selection-bounds > i{display:none!important}

/* 交互进行中保持现有轻量策略。 */
.stage.home-selection-bounds-dragging :is(.graph-element-resize-layer,.graph-element-resize-handle),
.stage.graph-card-dragging :is(.graph-element-resize-handle),
.stage.graph-element-resizing :is(.node-growth-layer,.node-growth-handle){
  transition:none!important;
}
/* style: styles/home-learning-entry-p4515.css */
/* V9.0-P4.5.17 · 首页学习入口沿用 update 的四色卡片。 */
.learning-entry-backdrop{z-index:10010;background:linear-gradient(135deg,#eef4ff 0%,#f8fbff 42%,#fff7f0 100%);backdrop-filter:none;padding:28px}
.learning-entry-modal{width:min(960px,96vw);max-width:none;padding:28px;border:1px solid #c9d5e6;border-radius:22px;background:rgba(255,255,255,.96);box-shadow:0 24px 80px rgba(36,52,78,.22)}
.learning-entry-head{position:relative;text-align:center;margin-bottom:24px;padding:0 48px}.learning-entry-head>div{width:100%}.learning-entry-head h2{margin:0;font-size:30px;letter-spacing:.02em;color:#1e2b3f}.learning-entry-head p{margin:9px auto 0;max-width:760px;color:#5b6b7f;font-size:14px;line-height:1.7}
.learning-entry-close{position:absolute;right:0;top:0;width:34px;height:34px;border:0;border-radius:10px;background:transparent;color:#7a8798;font-size:24px;line-height:1;cursor:pointer}.learning-entry-close:hover{background:#eef2f7;color:#1e2b3f}
.learning-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:0}.learning-entry-card{appearance:none;border:0;border-radius:18px;min-height:170px;padding:22px 18px;text-align:left;cursor:pointer;position:relative;overflow:hidden;box-shadow:0 10px 28px rgba(33,44,61,.13);transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;color:#142031;text-decoration:none}.learning-entry-card:hover,.learning-entry-card:focus-visible{transform:translateY(-3px) scale(1.01);box-shadow:0 16px 34px rgba(33,44,61,.2);filter:saturate(1.06);outline:3px solid rgba(91,77,209,.25)}.learning-entry-card:active{transform:translateY(0) scale(.99)}.learning-entry-card:disabled{cursor:wait;opacity:.72}.learning-entry-card::after{content:"";position:absolute;width:120px;height:120px;border-radius:50%;right:-28px;top:-36px;background:rgba(255,255,255,.27)}
.learning-entry-card.entry-graph{background:linear-gradient(135deg,#ffd3e1,#ffb6cf)}.learning-entry-card.entry-recall{background:linear-gradient(135deg,#d6e7ff,#acd0ff)}.learning-entry-card.entry-synthesis{background:linear-gradient(135deg,#d8f5df,#afe8bd)}.learning-entry-card.entry-practice{background:linear-gradient(135deg,#fff0c7,#ffdb7a)}
.learning-entry-avatar{width:68px;height:68px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:900;background:rgba(255,255,255,.78);border:2px solid rgba(255,255,255,.72);box-shadow:0 6px 20px rgba(0,0,0,.08)}.learning-entry-name,.learning-entry-id{display:block}.learning-entry-name{font-size:27px;font-weight:950;margin-top:16px;letter-spacing:.04em}.learning-entry-id{font-size:12px;line-height:1.5;margin-top:5px;opacity:.72;font-weight:700}
.learning-entry-error{min-height:20px;margin:12px 0 0!important;color:#c2410c!important;font-size:12px;font-weight:750;text-align:center}.learning-entry-foot{margin-top:12px;text-align:center;color:#7a8798;font-size:12px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}.learning-entry-foot button{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:9px;padding:7px 12px;font-weight:800;cursor:pointer}.learning-entry-foot button:hover{background:#f8fafc}
.help-card-tour-btn{border:1px solid rgba(37,99,235,.22);border-radius:9px;background:#fff;color:#2563eb;font:800 12px/1 inherit;cursor:pointer}.help-card-tour-btn:hover{background:#eff6ff}
@media(max-width:820px){.learning-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.learning-entry-backdrop{padding:14px}.learning-entry-modal{padding:18px}.learning-entry-grid{grid-template-columns:1fr}.learning-entry-card{min-height:132px}.learning-entry-head{padding:0 38px}.learning-entry-head h2{font-size:24px}.learning-entry-foot{flex-direction:column}.learning-entry-foot button{width:100%}}
/* style: styles/learning-weekly-open-gate.css */
/* 三学习板块周日 14:00 开放：入口倒计时 + 页面门禁 */
.learning-entry-card.is-scheduled-closed{filter:saturate(.82);cursor:not-allowed}
.learning-entry-card.is-scheduled-closed:hover,.learning-entry-card.is-scheduled-closed:focus-visible{transform:none;box-shadow:0 10px 28px rgba(33,44,61,.13);outline:2px solid rgba(194,65,12,.28)}
.learning-entry-countdown{display:block;margin-top:10px;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.78);color:#9a3412;font-size:11px;line-height:1.45;font-weight:850;letter-spacing:.01em;font-variant-numeric:tabular-nums;box-shadow:inset 0 0 0 1px rgba(194,65,12,.16)}
.learning-open-gate-backdrop{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;padding:24px;background:linear-gradient(160deg,rgba(238,244,255,.96),rgba(255,247,240,.96));backdrop-filter:blur(6px)}
.learning-open-gate-card{width:min(520px,92vw);padding:28px 26px;border-radius:22px;border:1px solid #c9d5e6;background:rgba(255,255,255,.98);box-shadow:0 24px 80px rgba(36,52,78,.18);text-align:center;color:#1e2b3f}
.learning-open-gate-kicker{display:inline-block;margin-bottom:10px;font-size:11px;font-weight:900;letter-spacing:.18em;color:#64748b}
.learning-open-gate-card h1{margin:0;font-size:28px;line-height:1.25}
.learning-open-gate-copy{margin:12px 0 0;color:#5b6b7f;font-size:14px;line-height:1.7}
.learning-open-gate-countdown{margin:18px 0 0;padding:12px 14px;border-radius:14px;background:#fff7ed;color:#c2410c;font-size:15px;font-weight:900;line-height:1.5;font-variant-numeric:tabular-nums;box-shadow:inset 0 0 0 1px rgba(251,146,60,.28)}
.learning-open-gate-back{display:inline-flex;align-items:center;justify-content:center;margin-top:18px;padding:10px 16px;border-radius:10px;border:1px solid #cbd5e1;background:#fff;color:#334155;font-size:13px;font-weight:800;text-decoration:none}
.learning-open-gate-back:hover{background:#f8fafc}
/* style: styles/close-button.css */
/*
 * 全局统一的「×」关闭按钮（close-button.css）
 * 精准命中无专属样式的裸 × 关闭按钮（button[aria-label="关闭"]），
 * 已有专属样式/含图标的按钮（.engagement-close 等）不受影响。
 * 新增弹窗只要用 aria-label="关闭" 的 × 按钮即可自动获得统一样式。
 */
button[aria-label="关闭"]:not(.engagement-close){
  display:inline-grid;
  place-items:center;
  flex:none;
  min-width:32px;
  min-height:32px;
  padding:0 8px;
  border:0;
  border-radius:10px;
  background:#f1f5f9;
  color:#64748b;
  font-size:17px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:background .14s ease,color .14s ease,transform .14s ease;
}
button[aria-label="关闭"]:not(.engagement-close):hover{
  background:#e2e8f0;
  color:#0f172a;
  transform:translateY(-1px);
}
button[aria-label="关闭"]:not(.engagement-close):focus-visible{
  outline:2px solid #2563eb;
  outline-offset:2px;
}
