.model-audit{position:fixed;z-index:22000;top:86px;left:82px;width:min(520px,calc(100vw - 104px));max-height:calc(100dvh - 104px);display:flex;flex-direction:column;background:#242629;color:#eee;border:1px solid #4c4a45;border-radius:14px;box-shadow:0 20px 60px #0009;font:13px Inter,Arial,sans-serif;overflow:hidden}
.model-audit[hidden]{display:none}
.ma-head{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 18px 10px;border-bottom:1px solid #3c3d3f}
.ma-head small{color:#c7a65f;letter-spacing:.12em;font-size:10px;font-weight:700}.ma-head h2{margin:5px 0 0;font-size:17px}
.ma-head button{background:none;border:0;color:#bbb;font-size:19px;cursor:pointer}
.ma-summary{display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px}.ma-summary span{background:#303338;border:1px solid #44484c;border-radius:20px;padding:5px 8px;font-size:11px}.ma-summary b{color:#d9b977}
.ma-sheet{padding:8px 14px 12px;border-bottom:1px solid #3c3d3f;display:flex;align-items:center;gap:7px;flex-wrap:wrap}.ma-sheet input{width:70px;padding:6px;background:#1c1f23;color:#eee;border:1px solid #51545a;border-radius:5px}.ma-sheet button,.ma-rename button,.ma-foot button{background:#b89a5f;color:#18191a;border:0;border-radius:6px;padding:7px 10px;font-weight:700;cursor:pointer}.ma-sheet small{width:100%;color:#aaa}
.ma-tabs{display:flex;gap:4px;overflow:auto;padding:9px 12px;border-bottom:1px solid #3c3d3f;flex-shrink:0}.ma-tabs button{white-space:nowrap;border:1px solid #494b4e;border-radius:7px;color:#ddd;background:#303338;padding:8px;font:600 11px Inter,Arial,sans-serif;cursor:pointer}.ma-tabs button.on{color:#1b1a16;background:#c5a35e}.ma-tabs b{margin-left:3px}
.ma-content{padding:10px 14px 16px;overflow:auto;min-height:140px}.ma-content p{font-size:11px;color:#aaa;margin:2px 0 12px;line-height:1.5}.ma-result{display:flex;flex-direction:column;gap:3px;width:100%;border:1px solid #3e4246;border-radius:8px;background:#2c3035;color:#f1f1f1;text-align:left;margin:0 0 6px;padding:9px;cursor:pointer}.ma-result:hover{border-color:#b89a5f}.ma-result b{font-size:12px}.ma-result small{color:#aeb6c0}.ma-empty{padding:28px 8px;text-align:center;color:#aaa}
.ma-rename{display:flex;align-items:center;gap:6px;margin-bottom:7px}.ma-rename span{width:78px;flex-shrink:0;color:#aaa;font-size:11px}.ma-rename input{min-width:0;flex:1;border:1px solid #555a60;border-radius:5px;padding:8px;background:#1c1f23;color:#fff}.ma-rename button:disabled,.ma-rename input:disabled{opacity:.4;cursor:not-allowed}
.ma-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #3c3d3f;padding:10px 14px}.ma-foot span{color:#aaa;font-size:11px}
@media(max-width:768px){.model-audit{top:auto;bottom:0;left:0;width:100%;max-height:86dvh;border-radius:16px 16px 0 0}.ma-head{padding:13px 15px 9px}.ma-content{min-height:100px}.ma-rename span{width:55px}}

/* Compact script workspace: categories remain visible while results scroll. */
.model-audit{width:min(440px,calc(100vw - 104px));background:#202327;border-color:#44464a;border-radius:18px;box-shadow:0 18px 65px #0007}
.model-audit *{box-sizing:border-box}
.ma-head{padding:18px;gap:12px;background:linear-gradient(135deg,#303034,#22252a);flex-shrink:0}
.ma-head h2{font-size:19px;line-height:1.3;letter-spacing:-.3px}.ma-head small{color:#e0bb73;letter-spacing:.1em}
.ma-head-actions{display:flex;gap:6px}.ma-head button{display:grid;place-items:center;width:32px;height:32px;background:#ffffff08;border:1px solid #ffffff12;border-radius:9px;color:#ddd;font-size:17px}
.ma-head button:hover{background:#ffffff16}.ma-head button:focus-visible,.ma-tabs button:focus-visible,.ma-result:focus-visible,.script-menu-pop button:focus-visible{outline:2px solid #e1bc70;outline-offset:2px}
.ma-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 16px;flex-shrink:0}
.ma-summary span{display:flex;align-items:center;justify-content:space-between;border-radius:10px;background:#ffffff04;border-color:#ffffff0d;padding:10px 12px;color:#afb5bf;font-size:11px}
.ma-summary b{font-size:18px;font-variant-numeric:tabular-nums;color:#f0d197}
.ma-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 16px 14px;overflow:visible}
.ma-tabs button{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;white-space:normal;min-height:42px;padding:9px 10px;border-color:#ffffff10;background:#ffffff04;color:#c9cdd3;border-radius:9px;line-height:1.35;font-size:11px}
.ma-tabs button:hover{border-color:#9f8658;background:#ffffff09}.ma-tabs button.on{background:#d1af6b;color:#191b1e;border-color:#e2c48a}
.ma-tabs b{min-width:22px;padding:3px 5px;border-radius:6px;background:#0002;text-align:center;font-variant-numeric:tabular-nums;flex-shrink:0}
.ma-sheet{padding:12px 16px;background:#ffffff03;flex-shrink:0}.ma-sheet[hidden]{display:none}.ma-sheet label{font-size:12px}.ma-sheet small{font-size:10px;line-height:1.5}
.ma-content{min-height:100px;max-height:42dvh;padding:14px 16px;scrollbar-width:thin;scrollbar-color:#62605b transparent;overscroll-behavior:contain;counter-reset:result}
.ma-content>p{padding:0 2px 9px;color:#929ba8;line-height:1.65}
.ma-result{position:relative;padding:12px 12px 12px 43px;border-color:#ffffff10;background:#ffffff04;border-radius:10px;margin-bottom:8px;line-height:1.45;transition:background .15s,border-color .15s}
.ma-result:before{counter-increment:result;content:counter(result);position:absolute;left:11px;top:12px;display:grid;place-items:center;min-width:23px;height:23px;background:#ffffff09;color:#cdb079;border-radius:6px;font-size:11px}
.ma-result b{overflow-wrap:anywhere;font-weight:600}.ma-result small{font-size:11px;color:#949fab}.ma-result.is-picked{border-color:#64a5ff;background:#2266ac26}.ma-result.is-picked:before{background:#328cff;color:white}
.ma-empty{padding:28px 12px;border:1px dashed #ffffff18;border-radius:10px;line-height:1.6}
.ma-rename{flex-wrap:wrap;padding:10px;border:1px solid #ffffff10;border-radius:10px;background:#ffffff03;margin-bottom:9px}.ma-rename span{width:100%;font-size:10px}.ma-rename input{padding:10px;border-radius:7px;font:12px Inter,Arial,sans-serif}.ma-rename input:focus{outline:1px solid #d1af6b;border-color:#d1af6b}
.ma-foot{padding:13px 16px;background:#1c1f23;flex-shrink:0}.ma-foot button{padding:10px 12px;border-radius:8px}.ma-foot span{max-width:48%;line-height:1.5}.ma-sheet button,.ma-rename button{border-radius:7px;padding:9px 10px}
.model-audit.is-minimized .ma-summary,.model-audit.is-minimized .ma-sheet,.model-audit.is-minimized .ma-tabs,.model-audit.is-minimized .ma-content,.model-audit.is-minimized .ma-foot{display:none}.model-audit.is-minimized .ma-head{border-bottom:0}
.script-menu-pop{width:330px;padding:10px;background:#25282d;border-color:#48494b;border-radius:15px;box-shadow:0 20px 55px #0006}.script-menu-pop>b{padding:9px 10px 12px;letter-spacing:.08em;text-transform:uppercase;font-size:10px}.script-menu-pop button,.script-menu-pop a{position:relative;padding:13px 12px 13px 42px;margin:3px 0;border:1px solid #ffffff0b;background:#ffffff03;line-height:1.45;border-radius:9px;color:#e1e3e7}.script-menu-pop button:before,.script-menu-pop a:before{position:absolute;left:13px;top:13px;color:#d6b36d;content:'›';font-size:17px}.script-menu-pop button:hover,.script-menu-pop a:hover{background:#d1af6b14;border-color:#b8995c66}.script-menu-pop #scriptDownloadB3d{margin-top:10px;border-color:#d1af6b55;color:#e4c78b}
@media(max-width:768px){.model-audit{left:8px;bottom:8px;width:calc(100vw - 16px);max-height:82dvh;border-radius:16px}.ma-head{padding:13px 14px}.ma-head h2{font-size:17px}.ma-summary{padding:9px 12px;gap:6px}.ma-summary span{padding:7px 10px}.ma-tabs{padding:0 12px 10px;gap:5px}.ma-tabs button{min-height:37px;padding:7px 9px;font-size:10px}.ma-content{padding:12px;max-height:34dvh}.ma-foot{padding:10px 12px}.ma-rename span{width:100%}.model-audit.is-minimized{bottom:82px}.script-menu-pop{width:310px}}

