:root{
  --ink:#1d2433; --ink2:#475569; --muted:#8a94a6; --line:#e6e9ef; --line2:#d6dbe4;
  --soft:#f6f7f9; --soft2:#eef1f5; --acc:#2f5bea; --acc2:#2448c4; --acc-soft:#eaf0ff;
  --danger:#e5484d; --ok:#22a06b; --r:10px;
  --shadow:0 10px 32px rgba(20,30,60,.13),0 2px 6px rgba(20,30,60,.06);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%;background:#fff;color:var(--ink);font:13.5px/1.45 Inter,"Segoe UI",system-ui,Arial,sans-serif;overflow:hidden;-webkit-font-smoothing:antialiased}
em,i,cite,address{font-style:normal}
button{font:inherit;color:inherit;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
svg{display:block}
body{display:grid;grid-template-rows:56px 1fr 46px;height:100vh;height:100dvh}

/* ---------- topbar ---------- */
.topbar{display:flex;align-items:center;gap:10px;padding:0 12px;border-bottom:1px solid var(--line);background:#fff;z-index:20;min-width:0}
.brand{display:flex;align-items:center;gap:9px;flex:none}
.brand svg{width:38px;height:30px}
.brand-t{display:flex;flex-direction:column;line-height:1.1}
.brand-t b{font-size:15px;font-weight:800;letter-spacing:-.01em}
.brand-t span{font-size:11px;color:var(--muted);font-weight:500}
.title-input{flex:0 1 300px;min-width:120px;border:1px solid transparent;border-radius:8px;padding:7px 10px;font-weight:600;font-size:14px;background:transparent;outline:none;text-overflow:ellipsis}
.title-input:hover{border-color:var(--line)}
.title-input:focus{border-color:var(--acc);background:#fff;box-shadow:0 0 0 3px var(--acc-soft)}
.tb{display:flex;align-items:center;gap:3px;padding-left:8px;border-left:1px solid var(--line);flex:none}
.spacer{flex:1}
.ib{width:34px;height:34px;display:inline-grid;place-items:center;border:0;background:transparent;border-radius:8px;color:var(--ink2)}
.ib:hover{background:var(--soft2);color:var(--ink)}
.ib:disabled{opacity:.35;cursor:default;background:transparent}
.ib svg,.tbtn svg{width:18px;height:18px}
.tbtn{height:34px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;border-radius:8px;padding:0 11px;font-weight:600;font-size:13px;color:var(--ink);white-space:nowrap}
.tbtn:hover{background:var(--soft);border-color:var(--line2)}
.tbtn.primary{background:var(--acc);border-color:var(--acc);color:#fff}
.tbtn.primary:hover{background:var(--acc2)}
.tbtn.sm{height:30px;font-size:12.5px;padding:0 10px}
.tbtn.on{background:var(--acc-soft);border-color:#c9d6ff;color:var(--acc2)}
.zpct{border:0;background:transparent;font-weight:600;font-size:12.5px;width:48px;height:34px;border-radius:8px;color:var(--ink2)}
.zpct:hover{background:var(--soft2)}
@media (max-width:1280px){ .tbtn .lbl{display:none} .brand-t span{display:none} }

/* ---------- layout ---------- */
.main{display:grid;grid-template-columns:252px 1fr 368px;min-height:0;position:relative}
body.focus .main{grid-template-columns:0 1fr 0}
body.focus .left,body.focus .right{visibility:hidden}
body.noright .main{grid-template-columns:252px 1fr 0}
.left,.right{background:#fff;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.left{border-right:1px solid var(--line)}
.right{border-left:1px solid var(--line)}
.lscroll,.rscroll{overflow:auto;min-height:0;flex:1;scrollbar-width:thin}
.lsec{padding:12px 12px 10px;border-bottom:1px solid var(--line)}
.lsec h3{margin:0 0 9px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--ink2);display:flex;align-items:baseline;justify-content:space-between;gap:6px}
.lsec h3 .hint{text-transform:none;letter-spacing:0;font-weight:500;color:var(--muted);font-size:11px}
.tiny{font-size:11.5px;color:var(--muted);margin:-3px 0 8px;line-height:1.4}
.tiny b{color:var(--acc)}

.figgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.figtile{border:1px solid var(--line);border-radius:10px;background:#fff;padding:6px 2px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;touch-action:none;user-select:none;cursor:grab;transition:border-color .12s, box-shadow .12s, transform .12s}
.figtile:hover{border-color:#c9d6ff;box-shadow:0 2px 8px rgba(47,91,234,.12);transform:translateY(-1px)}
.figtile svg{width:38px;height:46px;pointer-events:none}
.figtile span{font-size:10.5px;font-weight:600;color:var(--ink2);text-align:center;line-height:1.15;pointer-events:none}
.elgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.eltile{border:1px solid var(--line);border-radius:9px;background:#fff;padding:7px 4px;display:flex;flex-direction:column;align-items:center;gap:3px;touch-action:none;user-select:none;cursor:grab;font-size:11px;font-weight:600;color:var(--ink2)}
.eltile:hover{border-color:#c9d6ff;background:#fbfcff}
.eltile svg{width:24px;height:24px;pointer-events:none}
.badgegrid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
.btile{aspect-ratio:1;border:1px solid transparent;border-radius:8px;background:transparent;display:grid;place-items:center;touch-action:none;user-select:none;cursor:grab;padding:0}
.btile:hover{background:var(--soft2);border-color:var(--line)}
.btile svg{width:30px;height:30px;pointer-events:none}
.colgrid{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}
.ctile{aspect-ratio:1;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--line2);background:var(--c);touch-action:none;cursor:grab;padding:0}
.ctile:hover{transform:scale(1.12)}
.linklist{display:flex;flex-direction:column;gap:2px}
.ltile{display:flex;align-items:center;gap:9px;border:1px solid transparent;border-radius:8px;background:transparent;padding:5px 7px;text-align:left;font-size:12.5px;font-weight:500}
.ltile:hover{background:var(--soft)}
.ltile.on{background:var(--acc-soft);border-color:#c9d6ff;font-weight:600}
.ltile svg{width:44px;height:14px;flex:none}
.search{width:100%;border:1px solid var(--line);border-radius:8px;padding:6px 9px;font-size:12.5px;outline:none;margin-bottom:6px}
.search:focus{border-color:var(--acc)}
.plist{display:flex;flex-direction:column;gap:1px}
.pitem{display:flex;align-items:center;gap:8px;padding:5px 6px;border-radius:7px;cursor:pointer;min-width:0}
.pitem:hover{background:var(--soft)}
.pitem.sel{background:var(--acc-soft)}
.pitem.absent{opacity:.55}
.pdot{width:10px;height:10px;border-radius:50%;flex:none}
.pname{font-weight:600;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prole{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.pitem .pb{display:flex;gap:2px;flex:none}
.pitem .pb i{width:7px;height:7px;border-radius:50%;display:block}
.pitem .padd{border:1px solid var(--line2);background:#fff;border-radius:6px;font-size:11px;padding:1px 6px;font-weight:600;color:var(--acc)}

/* ---------- stage ---------- */
.stage{position:relative;overflow:hidden;background:#fff;min-width:0}
#svg{width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none;cursor:default}
#svg text{user-select:none;-webkit-user-select:none}
#svg [data-k="p"],#svg [data-k="e"]{cursor:grab}
#svg [data-k="l"]{cursor:pointer}
#svg [data-h="resize"],#svg [data-h="eres"]{cursor:nwse-resize}
#svg [data-h="link"]{cursor:crosshair}
.stage.dragging #svg,.stage.dragging #svg *{cursor:grabbing!important}
.stage.panning #svg{cursor:grabbing}
.stage.dragging .ctx{opacity:0;pointer-events:none}

.ctx{position:absolute;z-index:15;display:flex;align-items:center;gap:2px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:4px;transition:opacity .12s;white-space:nowrap}
.ctx button{border:0;background:transparent;border-radius:7px;height:30px;min-width:30px;display:inline-grid;place-items:center;color:var(--ink2);padding:0 6px}
.ctx button.txt{display:inline-flex;gap:5px;font-size:12px;font-weight:600}
.ctx button:hover{background:var(--soft2);color:var(--ink)}
.ctx button.danger:hover{background:#fdecec;color:var(--danger)}
.ctx button svg{width:17px;height:17px}
.ctx .cdot{min-width:0;width:20px;height:20px;border-radius:50%;background:var(--c);border:2px solid #fff;box-shadow:0 0 0 1px var(--line2);padding:0;margin:0 1px}
.ctx .cdot:hover{background:var(--c);transform:scale(1.15)}
.ctx .sep{width:1px;height:22px;background:var(--line);margin:0 4px}
.cpick{width:22px;height:22px;border-radius:50%;background:conic-gradient(#e5484d,#f59e0b,#eab308,#22a06b,#0ea5e9,#2f5bea,#a855f7,#e5484d);position:relative;cursor:pointer;margin:0 2px;box-shadow:0 0 0 1px var(--line2)}
.cpick input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.ctx .sz{font-size:11px;color:var(--muted);font-weight:600;min-width:34px;text-align:center}

.dinfo{position:absolute;z-index:16;pointer-events:none;background:var(--ink);color:#fff;font-size:12px;font-weight:600;padding:5px 9px;border-radius:7px;white-space:nowrap;box-shadow:var(--shadow)}
.inl{position:absolute;z-index:18;border:2px solid var(--acc);border-radius:8px;padding:4px 8px;outline:none;resize:none;background:#fff;box-shadow:0 0 0 4px var(--acc-soft);font-weight:600;line-height:1.3;text-align:left}
.inl.single{text-align:center;white-space:nowrap;overflow:hidden}
.clegend{position:absolute;left:14px;bottom:14px;z-index:12;background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 18px rgba(20,30,60,.08);padding:10px 12px;max-width:300px;max-height:60%;overflow:auto;font-size:12px}
.clegend h4{margin:0 0 6px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink2)}
.clegend .row{display:flex;align-items:center;gap:8px;margin:3px 0}
.clegend .sw{width:12px;height:12px;border-radius:50%;flex:none}
.clegend svg{width:20px;height:20px;flex:none}
.clegend .blk+.blk{margin-top:10px;padding-top:8px;border-top:1px solid var(--line)}
.empty{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.empty-in{display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;max-width:380px;background:rgba(255,255,255,.92);padding:18px 22px;border-radius:14px;border:1px dashed var(--line2)}
.empty-in b{font-size:16px}
.empty-in span{color:var(--muted)}

/* ---------- right panel ---------- */
.tabs{display:flex;border-bottom:1px solid var(--line);padding:0 8px;gap:2px;flex:none}
.tabs button{border:0;background:transparent;padding:13px 9px 11px;font-weight:600;font-size:12.5px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs button:hover{color:var(--ink)}
.tabs button.on{color:var(--acc);border-bottom-color:var(--acc)}
.rp{padding:14px 16px 30px}
.rp h2{font-size:16px;margin:0 0 2px;font-weight:800;letter-spacing:-.01em}
.rp .sub{color:var(--muted);font-size:12px;margin-bottom:12px}
.grp{border:1px solid var(--line);border-radius:12px;margin:10px 0;background:#fff}
.grp>summary{list-style:none;cursor:pointer;padding:10px 12px;font-weight:700;font-size:12.5px;display:flex;align-items:center;gap:8px;user-select:none}
.grp>summary::-webkit-details-marker{display:none}
.grp>summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:transform .15s}
.grp[open]>summary::after{transform:rotate(45deg)}
.grp>summary .tag{font-weight:600;font-size:10.5px;color:var(--acc);background:var(--acc-soft);border-radius:20px;padding:1px 7px}
.grp .gb{padding:0 12px 12px}
.fld{margin:10px 0 0}
.fld:first-child{margin-top:0}
.fld>label,.fld>.lab{display:flex;justify-content:space-between;align-items:baseline;font-size:11.5px;font-weight:700;color:var(--ink2);margin-bottom:5px;gap:8px}
.fld>label small,.fld>.lab small{font-weight:500;color:var(--muted);font-size:11px;text-align:right}
.inp{width:100%;border:1px solid var(--line);border-radius:8px;padding:7px 9px;outline:none;background:#fff;font-size:13px}
.inp:focus{border-color:var(--acc);box-shadow:0 0 0 3px var(--acc-soft)}
textarea.inp{resize:vertical;min-height:58px;line-height:1.4}
select.inp{padding:6px 8px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.seg{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--soft)}
.seg button{flex:1;border:0;background:transparent;padding:6px 0;font-size:12px;font-weight:700;color:var(--ink2);border-right:1px solid var(--line);min-width:0}
.seg button:last-child{border-right:0}
.seg button:hover{background:#fff}
.seg button.on{background:var(--ink);color:#fff}
.seg.h button.on[data-v="-2"]{background:#dc2626}
.seg.h button.on[data-v="-1"]{background:#f97316}
.seg.h button.on[data-v="0"]{background:#94a3b8}
.seg.h button.on[data-v="1"]{background:#22c55e}
.seg.h button.on[data-v="2"]{background:#15803d}
.seg.h button.on[data-v="null"]{background:#64748b}
.seg.n button.on{background:var(--acc)}
.slider{display:flex;align-items:center;gap:10px}
.slider input{flex:1;accent-color:var(--acc)}
.slider output{font-size:12px;font-weight:700;width:42px;text-align:right;color:var(--ink2)}
.swatches{display:flex;flex-wrap:wrap;gap:5px}
.swatches button{width:22px;height:22px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--line2);background:var(--c);padding:0}
.swatches button.on{box-shadow:0 0 0 2px var(--ink)}
.bpick{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.bpick button{aspect-ratio:1;border:1px solid transparent;border-radius:8px;background:transparent;padding:0;display:grid;place-items:center}
.bpick button:hover{background:var(--soft2)}
.bpick button.on{background:var(--acc-soft);border-color:#b9cbff}
.bpick svg{width:28px;height:28px;pointer-events:none}
.hd{display:flex;gap:12px;align-items:center;margin-bottom:6px}
.hd .pv{width:56px;height:64px;flex:none;border-radius:12px;background:var(--soft);display:grid;place-items:center}
.hd .pv svg{width:44px;height:54px}
.hd .nm{flex:1;min-width:0}
.hd .nm input{font-weight:800;font-size:16px;border:1px solid transparent;padding:4px 6px;margin-left:-7px;width:calc(100% + 7px)}
.hd .nm input:hover{border-color:var(--line)}
.hd .nm input:focus{border-color:var(--acc)}
.hint-box{background:var(--soft);border-radius:10px;padding:10px 12px;font-size:12.5px;color:var(--ink2);line-height:1.45;margin-top:8px}
.hint-box b{color:var(--ink)}
.hint-box.acc{background:var(--acc-soft);color:#24366f}
.chk{display:flex;gap:6px;flex-wrap:wrap}
.chk label{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:5px 9px;font-size:12.5px;font-weight:600;cursor:pointer;user-select:none}
.chk label.on{background:var(--acc-soft);border-color:#b9cbff;color:var(--acc2)}
.chk input{accent-color:var(--acc);margin:0}
.btnrow{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 11px;font-weight:600;font-size:12.5px;display:inline-flex;align-items:center;gap:6px}
.btn:hover{background:var(--soft)}
.btn.danger{color:var(--danger)}
.btn.danger:hover{background:#fdecec;border-color:#f6c9ca}
.btn.pri{background:var(--acc);border-color:var(--acc);color:#fff}
.btn.pri:hover{background:var(--acc2)}
.btn svg{width:15px;height:15px}

/* analysis */
.kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:8px 0 12px}
.kpi{background:var(--soft);border-radius:10px;padding:8px 6px;text-align:center}
.kpi b{display:block;font-size:20px;font-weight:800;line-height:1.1}
.kpi span{font-size:10.5px;color:var(--muted);font-weight:600}
.stack{display:flex;height:12px;border-radius:7px;overflow:hidden;background:var(--soft2);margin:4px 0 4px}
.stack i{display:block;height:100%}
.alist{list-style:none;margin:6px 0 0;padding:0}
.alist li{display:flex;gap:8px;align-items:flex-start;padding:7px 0;border-top:1px solid var(--line);font-size:12.5px;cursor:pointer}
.alist li:first-child{border-top:0}
.alist li:hover .an{color:var(--acc)}
.alist .an{font-weight:700}
.alist .ad{color:var(--ink2);font-size:12px;display:block}
.alist .sw{width:10px;height:10px;border-radius:50%;flex:none;margin-top:4px}
.muted{color:var(--muted)}
.mini{width:100%;height:auto;background:#fff;border:1px solid var(--line);border-radius:10px}
.qlist{margin:6px 0 0;padding-left:18px}
.qlist li{margin:5px 0;font-size:12.5px;color:var(--ink2)}
table.at{width:100%;border-collapse:collapse;font-size:12px}
table.at th{text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:5px 4px;border-bottom:1px solid var(--line)}
table.at td{padding:6px 4px;border-bottom:1px solid var(--line);vertical-align:top}
.delta-up{color:#15803d;font-weight:700}
.delta-down{color:#dc2626;font-weight:700}
.legrow{display:flex;align-items:center;gap:9px;padding:4px 0}
.legrow svg{width:26px;height:26px;flex:none}
.legrow input{flex:1;border:1px solid transparent;border-radius:6px;padding:4px 6px;font-size:12.5px;outline:none;min-width:0}
.legrow input:hover{border-color:var(--line)}
.legrow input:focus{border-color:var(--acc)}
.legrow .cnt{font-size:10.5px;font-weight:700;color:var(--acc);background:var(--acc-soft);border-radius:20px;padding:1px 7px}

/* ---------- bottom bar ---------- */
.bottombar{display:flex;align-items:center;gap:8px;padding:0 12px;border-top:1px solid var(--line);background:#fff;min-width:0}
.scen{display:flex;gap:4px;overflow-x:auto;min-width:0;scrollbar-width:none}
.stab{height:30px;border:1px solid var(--line);background:#fff;border-radius:8px;padding:0 12px;font-size:12.5px;font-weight:600;color:var(--ink2);white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.stab:hover{background:var(--soft)}
.stab.on{background:var(--ink);border-color:var(--ink);color:#fff}
.stab .n{font-size:10.5px;opacity:.6}
.vsep{width:1px;height:22px;background:var(--line)}
.status{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- menus, modals ---------- */
.menu{position:fixed;z-index:60;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;min-width:240px;max-height:80vh;overflow:auto}
.menu .mh{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:8px 10px 4px}
.menu .mi{display:flex;width:100%;align-items:flex-start;gap:10px;border:0;background:transparent;border-radius:8px;padding:7px 10px;text-align:left;font-size:13px}
.menu .mi:hover{background:var(--soft)}
.menu .mi .ck{width:16px;flex:none;color:var(--acc);font-weight:800}
.menu .mi .mt{display:flex;flex-direction:column;min-width:0}
.menu .mi .mt small{color:var(--muted);font-size:11.5px}
.menu .mi svg{width:16px;height:16px;flex:none;margin-top:1px}
.menu .ms{height:1px;background:var(--line);margin:5px 4px}
.menu.bmenu{min-width:0;padding:8px}
.modal{position:fixed;inset:0;z-index:70;background:rgba(17,24,39,.36);display:grid;place-items:center;padding:20px}
.dialog{background:#fff;border-radius:16px;box-shadow:0 30px 80px rgba(15,23,42,.3);width:min(560px,100%);max-height:calc(100vh - 40px);display:flex;flex-direction:column;overflow:hidden}
.dialog.wide{width:min(920px,100%)}
.dialog .dh{padding:18px 22px 10px;display:flex;align-items:flex-start;gap:12px}
.dialog .dh h2{margin:0;font-size:19px;font-weight:800;letter-spacing:-.01em;flex:1}
.dialog .dh p{margin:4px 0 0;color:var(--muted);font-size:13px}
.dialog .db{padding:6px 22px 18px;overflow:auto}
.dialog .df{padding:12px 22px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px;background:#fcfcfd}
.dialog .x{border:0;background:transparent;width:32px;height:32px;border-radius:8px;display:grid;place-items:center;color:var(--muted)}
.dialog .x:hover{background:var(--soft2)}
.dialog .x svg{width:18px;height:18px}
.steps{display:grid;gap:10px}
.step{display:grid;grid-template-columns:34px 1fr;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px}
.step .no{width:34px;height:34px;border-radius:50%;background:var(--acc-soft);color:var(--acc);display:grid;place-items:center;font-weight:800}
.step h4{margin:2px 0 3px;font-size:14px}
.step p{margin:0;color:var(--ink2);font-size:13px}
.step .th{margin-top:5px;font-size:11.5px;color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.card{border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:6px}
.card.cur{border-color:#b9cbff;background:#fbfcff}
.card h4{margin:0;font-size:14px}
.card .meta{font-size:11.5px;color:var(--muted)}
.card .btnrow{margin-top:auto;padding-top:6px}
.welcome{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:6px}
.wopt{border:1px solid var(--line);border-radius:14px;padding:16px;text-align:left;background:#fff;display:flex;flex-direction:column;gap:6px}
.wopt:hover{border-color:#b9cbff;background:#fbfcff}
.wopt b{font-size:15px}
.wopt span{color:var(--ink2);font-size:12.5px}
.kbd{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:12.5px;margin-top:6px}
.kbd kbd{font:600 11.5px Inter,monospace;background:var(--soft2);border:1px solid var(--line2);border-bottom-width:2px;border-radius:5px;padding:1px 6px;white-space:nowrap}
.drag-ghost{position:fixed;left:0;top:0;z-index:90;pointer-events:none;margin:-28px 0 0 -24px;opacity:.9;filter:drop-shadow(0 6px 12px rgba(15,23,42,.25))}
.drag-ghost svg{width:48px;height:58px}
.drag-ghost.badge svg{width:34px;height:34px}
.drag-ghost.badge{margin:-17px 0 0 -17px}
.toast{position:fixed;left:50%;bottom:60px;transform:translateX(-50%);z-index:80;background:var(--ink);color:#fff;padding:9px 14px;border-radius:10px;font-weight:600;font-size:13px;box-shadow:var(--shadow)}
[data-drop="1"] *{}

/* ---------- report ---------- */
.report{position:fixed;inset:0;z-index:75;background:#f3f4f7;overflow:auto}
.rep-bar{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:10px 20px;z-index:2}
.rep-bar b{flex:1}
.rep{max-width:980px;margin:22px auto 60px;background:#fff;border-radius:6px;box-shadow:0 4px 20px rgba(20,30,60,.08);padding:44px 52px;color:#1d2433}
.rep h1{font-size:26px;margin:0 0 4px;letter-spacing:-.02em}
.rep h2{font-size:17px;margin:30px 0 10px;padding-bottom:6px;border-bottom:2px solid var(--ink)}
.rep h3{font-size:14px;margin:18px 0 6px}
.rep .meta{color:var(--muted);font-size:12.5px}
.rep .board{border:1px solid var(--line);border-radius:8px;margin:12px 0;overflow:hidden}
.rep .board svg{width:100%;height:auto}
.rep table{width:100%;border-collapse:collapse;font-size:12px;margin:8px 0}
.rep th{text-align:left;background:var(--soft);padding:6px;border:1px solid var(--line);font-size:11px}
.rep td{padding:6px;border:1px solid var(--line);vertical-align:top}
.rep .ctxgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px 24px;font-size:13px}
.rep .ctxgrid div b{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.rep .pcard{border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin:10px 0;break-inside:avoid}
.rep .pcard h3{margin:0 0 4px;display:flex;gap:8px;align-items:center}
.rep .pcard .kv{display:grid;grid-template-columns:150px 1fr;gap:3px 10px;font-size:12.5px;margin-top:6px}
.rep .pcard .kv b{color:var(--ink2);font-weight:600}
@media print{
  @page{size:A4;margin:14mm}
  html,body{overflow:visible;height:auto;display:block;background:#fff}
  body>*:not(#report){display:none!important}
  .report{position:static;background:#fff;overflow:visible}
  .rep-bar{display:none}
  .rep{box-shadow:none;margin:0;padding:0;max-width:none}
  .rep h2{break-after:avoid}
}
