/* Modelsn 接入模型 model-access-v4（v4 加：没检测到时的卡片、种下后的底部提示）· v3（v3 加：引导三步、检测动画、世界树卡片）· v2（独立块，配合 model-access.js）。黑底银白，和左栏 / 顶栏一套；绿点 = 已接入，琥珀 = 差一步。 */
.ma-overlay{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.6);backdrop-filter:blur(3px)}
.ma-overlay.hidden{display:none}
body.ma-open{overflow:hidden}
.ma-sheet{--ma-ink:#ECEAE3;--ma-soft:#C9C6BD;--ma-dim:#8F8D85;--ma-line:rgba(255,255,255,.08);--ma-row:rgba(255,255,255,.035);--ma-hover:rgba(255,255,255,.065);--ma-ok:#8fe0b8;--ma-warn:#f0b354;
  display:flex;flex-direction:column;width:min(540px,100%);max-height:min(760px,calc(100dvh - 32px));border:1px solid #3A3A3A;border-radius:16px;background:#1F1F1E;color:var(--ma-ink);box-shadow:0 24px 70px rgba(0,0,0,.6);font-family:"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:13.5px;line-height:1.5;overflow:hidden}
.ma-sheet button,.ma-sheet a{font:inherit;-webkit-tap-highlight-color:transparent}
.ma-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 14px 0 20px}
.ma-head h2{margin:0;font-family:Outfit,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:19px;font-weight:600;letter-spacing:.01em}
.ma-head-actions{display:flex;gap:2px}
.ma-icon{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:9px;background:transparent;color:var(--ma-dim);cursor:pointer}
.ma-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.ma-icon:hover,.ma-icon:focus-visible{background:var(--ma-hover);color:var(--ma-ink);outline:none}
.ma-icon.is-busy svg{animation:ma-spin .9s linear infinite}
@keyframes ma-spin{to{transform:rotate(360deg)}}
.ma-lead{margin:4px 20px 0;color:var(--ma-dim);font-size:12.5px}
.ma-body{flex:1;min-height:0;overflow-y:auto;padding:6px 14px 4px}
.ma-loading{margin:28px 6px;color:var(--ma-dim);text-align:center}
.ma-sec{margin-top:14px}
.ma-sec-title{display:flex;align-items:center;gap:10px;margin:0 6px 8px;font-size:11.5px;font-weight:650;letter-spacing:.16em;text-transform:uppercase;color:var(--ma-dim)}
.ma-sec-title::after{content:"";flex:1;order:1;height:1px;background:linear-gradient(90deg,var(--ma-line),transparent)}
.ma-sec-title em{order:2;font-style:normal;font-weight:400;letter-spacing:0;text-transform:none}
.ma-sec-note{margin:8px 6px 0;color:var(--ma-dim);font-size:12px}
.ma-row{margin-top:6px;border:1px solid var(--ma-line);border-radius:12px;background:var(--ma-row);overflow:hidden}
.ma-row-main{display:flex;align-items:center;gap:8px;padding-right:10px}
.ma-row-info{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 6px 8px 12px;border:0;background:transparent;color:inherit;text-align:left}
button.ma-row-info{cursor:pointer}
button.ma-row-info:hover{background:var(--ma-hover)}
button.ma-row-info:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(236,234,227,.5) inset}
.ma-ico{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:rgba(255,255,255,.07);color:var(--ma-ink)}
.ma-ico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ma-ico img{width:19px;height:19px;object-fit:contain;display:block}
.ma-ico-letter{font-family:Outfit,"Segoe UI",sans-serif;font-size:14px;font-weight:600}
.ma-ico-boss{background-color:#111;background-size:70% auto;background-position:center;background-repeat:no-repeat;box-shadow:0 0 0 1px rgba(255,255,255,.16) inset}
.ma-row-text{flex:1;min-width:0;display:grid;gap:1px}
.ma-row-text b{font-size:14.5px;font-weight:600}
.ma-row-text small{font-size:12px;color:var(--ma-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ma-state{flex:none;display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--ma-soft);white-space:nowrap}
.ma-dot{width:7px;height:7px;border-radius:50%;background:#5e5c56}
.is-ok>.ma-row-main .ma-dot{background:var(--ma-ok);box-shadow:0 0 8px rgba(143,224,184,.7)}
.is-warn>.ma-row-main .ma-dot{background:var(--ma-warn)}
.is-warn>.ma-row-main .ma-state{color:var(--ma-warn)}
.ma-chev{flex:none;width:10px;height:10px;fill:none;stroke:var(--ma-dim);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.ma-row.is-open .ma-chev{transform:rotate(90deg)}
.ma-row.is-off .ma-ico,.ma-row.is-later .ma-ico{filter:grayscale(.85);opacity:.6}
.ma-row.is-later{background:transparent;border-style:dashed}
.ma-row.is-later .ma-row-text b{color:var(--ma-soft);font-weight:500}
.ma-row-boss{border-color:rgba(255,255,255,.14);background:linear-gradient(120deg,rgba(255,255,255,.07),rgba(255,255,255,.02))}
.ma-tag{flex:none;display:inline-flex;align-items:center;height:24px;padding:0 9px;border:1px dashed rgba(236,234,227,.35);border-radius:12px;font-size:11.5px;color:var(--ma-soft);white-space:nowrap}
.ma-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 13px;border:1px solid #4A4A48;border-radius:9px;background:transparent;color:var(--ma-ink);font-size:13px;text-decoration:none;white-space:nowrap;cursor:pointer}
.ma-btn:hover,.ma-btn:focus-visible{border-color:#8C8C8C;background:var(--ma-hover);outline:none}
.ma-btn:disabled{opacity:.5;cursor:wait}
.ma-btn-main{border-color:#ECEAE3;background:#ECEAE3;color:#141413;font-weight:600}
.ma-btn-main:hover,.ma-btn-main:focus-visible{background:#fff;border-color:#fff}
.ma-detail{padding:10px 14px 12px 56px;border-top:1px solid var(--ma-line);display:grid;gap:7px}
.ma-facts{margin:0;font-size:12.5px;color:var(--ma-soft)}
.ma-facts i{font-style:normal;margin:0 7px;color:var(--ma-dim)}
.ma-hint{margin:0;padding:8px 10px;border-radius:8px;background:rgba(240,179,84,.1);color:#f6d9a6;font-size:12.5px}
.ma-steps ol{margin:6px 0 0;padding-left:20px}
.ma-steps li{margin:3px 0;line-height:1.55}
.ma-flash{animation:maFlash 1.2s ease-out}
@keyframes maFlash{0%,40%{box-shadow:0 0 0 2px rgba(240,179,84,.85)}100%{box-shadow:0 0 0 2px rgba(240,179,84,0)}}
.ma-test{margin:0;font-size:12px;word-break:break-word}
.ma-test.is-ok{color:var(--ma-ok)}
.ma-test.is-error{color:#ef8e9d}
.ma-test.is-running{color:var(--ma-soft)}
.ma-note{margin:0;font-size:11.5px;color:var(--ma-dim)}
.ma-detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}
.ma-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px 14px 20px;border-top:1px solid var(--ma-line);color:var(--ma-dim);font-size:12px}
.ma-foot .ma-btn{min-width:84px;min-height:36px}

/* v3：引导步骤 */
.ma-foot .ma-btn[hidden]{display:none}
.ma-step{display:grid;justify-items:center;gap:10px;padding:22px 10px 18px;text-align:center}
.ma-step-no{margin:0;font-size:11.5px;letter-spacing:.14em;color:var(--ma-dim)}
.ma-step-title{margin:0;font-family:Outfit,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:21px;font-weight:600}
.ma-step-text{margin:0;max-width:400px;color:var(--ma-soft);font-size:13.5px}
.ma-step-text b{color:var(--ma-ink)}
.ma-tiles{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:8px 0 10px}
.ma-tile{display:grid;justify-items:center;align-content:start;gap:6px;width:78px;padding:12px 4px 10px;border:1px solid var(--ma-line);border-radius:12px;background:var(--ma-row)}
.ma-tile b{font-size:12.5px;font-weight:600}
.ma-tile small{font-size:10.5px;color:var(--ma-dim);margin-top:-4px}
.ma-tile.is-later{border-style:dashed;background:transparent}
.ma-tile.is-later .ma-ico{filter:grayscale(.85);opacity:.6}
.ma-tile.is-later b{color:var(--ma-soft);font-weight:500}
.ma-btn-big{min-height:44px;padding:0 22px;font-size:14.5px;border-radius:11px}
.ma-link{border:0;background:none;padding:6px 8px;color:var(--ma-dim);font-size:12.5px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ma-link:hover,.ma-link:focus-visible{color:var(--ma-ink);outline:none}
.ma-scan{display:grid;gap:6px;width:100%;margin-top:6px;text-align:left}
.ma-scan-row{display:flex;align-items:center;gap:12px;min-height:50px;padding:6px 14px 6px 12px;border:1px solid var(--ma-line);border-radius:12px;background:var(--ma-row)}
.ma-scan-row b{flex:1;font-size:14.5px;font-weight:600}
.ma-scan-row span:last-child{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ma-soft)}
.ma-scan-row.is-ok .ma-dot{background:var(--ma-ok);box-shadow:0 0 8px rgba(143,224,184,.7)}
.ma-scan-row.is-ok span:last-child{color:var(--ma-ink)}
.ma-scan-row.is-warn .ma-dot{background:var(--ma-warn)}
.ma-scan-row.is-warn span:last-child{color:var(--ma-warn)}
.ma-scan-row.is-off .ma-ico{filter:grayscale(.85);opacity:.6}
.ma-scan-row.is-off b{color:var(--ma-soft);font-weight:500}
.ma-spin{width:12px;height:12px;border-radius:50%;border:1.5px solid rgba(236,234,227,.25);border-top-color:var(--ma-ink);animation:ma-spin .8s linear infinite}
/* v3：世界树卡片 */
.ma-ico-tree svg{width:19px;height:19px}
.ma-tree{display:grid;justify-items:center;gap:10px;padding:20px 18px 18px;border:1px solid rgba(143,224,184,.28);border-radius:14px;background:radial-gradient(120% 90% at 50% 0%,rgba(143,224,184,.1),rgba(255,255,255,.02) 60%);text-align:center}
.ma-tree-art{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:rgba(143,224,184,.12);color:var(--ma-ok)}
.ma-tree-art svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.ma-tree-art.is-big{width:64px;height:64px}
.ma-tree-art.is-big svg{width:34px;height:34px}
.ma-tree h4{margin:0;font-family:Outfit,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:18px;font-weight:600}
.ma-tree p{margin:0;max-width:420px;color:var(--ma-soft);font-size:13px}
.ma-tree-input{width:100%;box-sizing:border-box;height:44px;margin-top:4px;padding:0 14px;border:1px solid #4A4A48;border-radius:11px;background:#141413;color:var(--ma-ink);font:inherit;font-size:14.5px;outline:none}
.ma-tree-input::placeholder{color:var(--ma-dim)}
.ma-tree-input:focus{border-color:var(--ma-ok)}
.ma-seeds{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.ma-seed{min-height:30px;padding:0 11px;border:1px solid var(--ma-line);border-radius:15px;background:transparent;color:var(--ma-soft);font-size:12px;cursor:pointer}
.ma-seed:hover,.ma-seed:focus-visible{border-color:rgba(236,234,227,.5);color:var(--ma-ink);outline:none}
.ma-leaders{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;font-size:12px;color:var(--ma-dim)}
.ma-leaders span{margin-right:4px}
.ma-leader{min-height:30px;padding:0 12px;border:1px solid var(--ma-line);border-radius:9px;background:transparent;color:var(--ma-soft);font-size:12.5px;cursor:pointer}
.ma-leader:hover{border-color:rgba(236,234,227,.5)}
.ma-leader.is-on{border-color:var(--ma-ink);color:var(--ma-ink);background:var(--ma-hover);font-weight:600}
.ma-leader:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(236,234,227,.5)}
.ma-planted{padding-top:34px;padding-bottom:30px}
.ma-reveal{padding:10px 14px;border-radius:10px;background:var(--ma-row);border:1px solid var(--ma-line)}
[data-theme="light"] .ma-tree-input{background:#fff;border-color:#c9cfd8}
[data-theme="light"] .ma-spin{border-color:rgba(0,0,0,.18);border-top-color:#1b1d21}
@media (prefers-reduced-motion:reduce){.ma-spin{animation:none}}

/* v4：还没支持的合成一行；一家都没有时的卡片；种下后的底部提示 */
.ma-later-line{margin:10px 6px 0;font-size:12px;color:var(--ma-dim)}
.ma-none{border-color:rgba(240,179,84,.3);background:radial-gradient(120% 90% at 50% 0%,rgba(240,179,84,.09),rgba(255,255,255,.02) 60%)}
.ma-none-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.ma-toast{position:fixed;z-index:8500;left:50%;bottom:24px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;width:min(640px,calc(100vw - 24px));box-sizing:border-box;padding:14px 12px 14px 16px;border:1px solid rgba(143,224,184,.35);border-radius:14px;background:#1F1F1E;color:#ECEAE3;box-shadow:0 18px 50px rgba(0,0,0,.55);font-family:"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:13px;line-height:1.5;animation:ma-rise .35s ease both}
.ma-toast .ma-tree-art{flex:none;background:rgba(143,224,184,.12);color:#8fe0b8}
.ma-toast-text{flex:1;min-width:0;display:grid;gap:2px}
.ma-toast-text b{font-size:14.5px}
.ma-toast-text span{color:#C9C6BD}
.ma-toast-acts{flex:none;display:flex;align-items:center;gap:4px}
.ma-toast .ma-icon{color:#8F8D85}
.ma-toast .ma-btn-main{border-color:#ECEAE3;background:#ECEAE3;color:#141413}
@keyframes ma-rise{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
[data-theme="light"] .ma-toast{background:#fff;color:#1b1d21;border-color:rgba(18,163,106,.35);box-shadow:0 18px 50px rgba(30,50,78,.2)}
[data-theme="light"] .ma-toast-text span{color:#454a52}
[data-theme="light"] .ma-toast .ma-btn-main{background:#1b1d21;border-color:#1b1d21;color:#fff}
@media (max-width:640px){.ma-toast{flex-wrap:wrap;bottom:12px}.ma-toast-acts{width:100%;justify-content:flex-end}}
@media (prefers-reduced-motion:reduce){.ma-toast{animation:none}}

/* 左栏：Boss 下面那一行右边的「＋ 接入模型」 */
.ma-entry{flex:none;display:inline-flex;align-items:center;gap:5px;height:26px;margin:0 8px 0 4px;padding:0 10px 0 7px;border:1px solid rgba(236,234,227,.22);border-radius:13px;background:transparent;color:#C9C6BD;font:inherit;font-size:11.5px;white-space:nowrap;cursor:pointer}
.ma-entry svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.ma-entry:hover,.ma-entry:focus-visible{border-color:rgba(236,234,227,.6);color:#fff;background:rgba(255,255,255,.06);outline:none}
#councilSection > #bossAgentNodeSlot + .section-heading{margin-top:2px}
.ma-awaken-note{margin:4px 0 10px;font-size:12px;color:#8F8D85}

[data-theme="light"] .ma-overlay{background:rgba(20,24,30,.38)}
[data-theme="light"] .ma-sheet{--ma-ink:#1b1d21;--ma-soft:#454a52;--ma-dim:#6b7078;--ma-line:rgba(15,23,42,.1);--ma-row:rgba(15,23,42,.025);--ma-hover:rgba(15,23,42,.055);--ma-ok:#12a36a;--ma-warn:#b46d08;background:#fff;border-color:#d6dce5;box-shadow:0 24px 70px rgba(30,50,78,.22)}
[data-theme="light"] .ma-ico{background:rgba(15,23,42,.06)}
[data-theme="light"] .ma-row-boss{border-color:rgba(15,23,42,.18);background:rgba(15,23,42,.035)}
[data-theme="light"] .ma-btn{border-color:#c9cfd8}
[data-theme="light"] .ma-btn-main{background:#1b1d21;border-color:#1b1d21;color:#fff}
[data-theme="light"] .ma-btn-main:hover{background:#000;border-color:#000}
[data-theme="light"] .ma-tag{border-color:rgba(0,0,0,.3)}
[data-theme="light"] .ma-hint{background:rgba(180,109,8,.1);color:#7a4a05}
[data-theme="light"] .ma-entry{border-color:rgba(0,0,0,.22);color:#454a52}
[data-theme="light"] .ma-entry:hover{border-color:rgba(0,0,0,.5);color:#000;background:rgba(0,0,0,.04)}
@media (max-width:640px){
  .ma-overlay{padding:0;place-items:stretch}
  .ma-sheet{width:100%;max-height:100dvh;border-radius:0;border:0}
  .ma-btn{min-height:40px}
  .ma-icon{width:44px;height:44px}
  .ma-detail{padding-left:14px}
  .ma-state{font-size:0;gap:0}
}
@media (prefers-reduced-motion:reduce){.ma-icon.is-busy svg{animation:none}}

/* newbie-5（2026-11-24）：一家都没接上时，第一屏只放两个大按钮；完整列表收进「看全部」 */
.ma-first-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:14px 0 12px}
.ma-first-actions .ma-btn-big{min-width:180px;min-height:52px;font-size:16px;justify-content:center}
.ma-all{margin-top:6px}
.ma-all>summary{cursor:pointer;list-style:none;text-align:center;font-size:13px;color:var(--muted,#9aa0aa);padding:10px 0}
.ma-all>summary::-webkit-details-marker{display:none}
.ma-all>summary::after{content:" ›";display:inline-block;transition:transform .2s}
.ma-all[open]>summary::after{transform:rotate(90deg)}